1"use strict";(self.webpackChunkaisbackend=self.webpackChunkaisbackend||[]).push([[436],{3436:(Ae,te,b)=>{b.r(te),b.d(te,{OperationModule:()=>rl});var y=b(69808),v=b(81810),I=b(49671),u=b(76704),R=b(80062),J=b(57087),P=b(82849);class T{constructor(){this.shiftid="",this.schoolid=""}}var e=b(5e3),A=b(85307),d=b(52382),Z=b(28788),C=b(96638);const V=["masterForm"],O=["unassignForm"];function G(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){return e.CHM(t),e.oxw().show("form")}),e._UZ(1,"i",2),e.qZA()}}function U(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",29),e.NdJ("click",function(){return e.CHM(t),e.oxw().show("details")}),e._UZ(1,"i",30),e.qZA()}}function N(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function S(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Shift name is mandatory"),e.qZA())}function Ie(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,S,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const W=function(n,a){return{"is-valid":n,"ng-error":a}};function De(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"label",37),e._uU(3,"School Name"),e.TgZ(4,"span",21),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",51,52),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).schoolObj=o})("change",function(){return e.CHM(t),e.oxw(2).onChangeSchool()}),e.YNc(8,N,2,2,"ng-option",40),e.qZA(),e.YNc(9,Ie,2,1,"span",41),e.qZA()()}if(2&n){const t=e.MAs(7);e.oxw();const i=e.MAs(2),o=e.oxw();e.xp6(6),e.Q6J("ngClass",e.WLB(6,W,t.valid,t.invalid&&i.submitted))("ngModel",o.schoolObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",o.schoolList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.submitted))}}function ke(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function qe(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Shift name is mandatory"),e.qZA())}function Oe(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,qe,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(13);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Se(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Fe(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Route is mandatory"),e.qZA())}function Ne(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,Fe,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(23);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Ue(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Le(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Vehicle is mandatory"),e.qZA())}function Pe(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,Le,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(33);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Je(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ve(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Driver is mandatory"),e.qZA())}function Re(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,Ve,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(43);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Qe(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ee(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Conductor is mandatory"),e.qZA())}function Ye(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,Ee,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(53);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const je=function(n){return{color:n}};function He(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td")(12,"div",65),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(3).openModalForUnAssign(s)}),e._uU(13),e._UZ(14,"br"),e._uU(15),e.qZA()(),e.TgZ(16,"td"),e._UZ(17,"input",66),e.qZA()()}if(2&n){const t=a.$implicit,i=a.index;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(""==t.studentname?"Not Found":t.studentname),e.xp6(2),e.Oqu(""==t.pickupname?"Not Found":t.pickupname),e.xp6(2),e.Oqu(""==t.dropname?"Not Found":t.dropname),e.xp6(2),e.AsE("",""==t.classname?"Not Found":t.classname," (",""==t.sectionname?"Not Found":t.sectionname,")"),e.xp6(2),e.Q6J("ngStyle",e.VKq(13,je,"assign"==t.status?"brown":"green")),e.xp6(1),e.hij("",t.status," "),e.xp6(2),e.Oqu(""==t.vehicleno?"":t.vehicleno),e.xp6(2),e.MGl("name","student",i,"")("id","student",i,""),e.Q6J("checked","assign"==t.status)("disabled","assign"==t.status)}}function ze(n,a){if(1&n){const t=e.EpF();
1e.TgZ(0,"div",19)(1,"div",56)(2,"table",57)(3,"thead")(4,"tr")(5,"th"),e._uU(6,"#"),e.qZA(),e.TgZ(7,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw(2).sorting(o,"studentname")}),e._uU(8,"Student Name"),e._UZ(9,"i",59),e.qZA(),e.TgZ(10,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw(2).sorting(o,"pickupname")}),e._uU(11,"Pickup Point"),e._UZ(12,"i",59),e.qZA(),e.TgZ(13,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw(2).sorting(o,"dropname")}),e._uU(14,"Drop Point"),e._UZ(15,"i",59),e.qZA(),e.TgZ(16,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw(2).sorting(o,"classname")}),e._uU(17,"Standard (Section)"),e._UZ(18,"i",59),e.qZA(),e.TgZ(19,"th",60),e._uU(20,"Assign Status"),e.qZA(),e._UZ(21,"th"),e.qZA()(),e.TgZ(22,"tbody"),e.YNc(23,He,18,15,"tr",61),e.qZA()()(),e.TgZ(24,"div",62)(25,"button",63),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).resetForm()}),e._uU(26,"Reset"),e.qZA(),e.TgZ(27,"button",64),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).validateBeforeSubmit()}),e._uU(28,"Submit"),e.qZA()()()}if(2&n){e.oxw();const t=e.MAs(2),i=e.oxw();e.xp6(23),e.Q6J("ngForOf",i.studentDetails),e.xp6(4),e.Q6J("disabled",t.invalid)}}function Be(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",31)(1,"form",32,33)(3,"div",19)(4,"div",18),e.YNc(5,De,10,9,"div",34),e.TgZ(6,"div",35)(7,"div",36)(8,"label",37),e._uU(9,"Shift Name"),e.TgZ(10,"span",21),e._uU(11,"*"),e.qZA()(),e.TgZ(12,"ng-select",38,39),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().shiftObj=o})("change",function(){return e.CHM(t),e.oxw().onChangeShift()}),e.YNc(14,ke,2,2,"ng-option",40),e.qZA(),e.YNc(15,Oe,2,1,"span",41),e.qZA()(),e.TgZ(16,"div",35)(17,"div",36)(18,"label",37),e._uU(19,"Route Name "),e.TgZ(20,"span",21),e._uU(21,"*"),e.qZA()(),e.TgZ(22,"ng-select",42,43),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().routeNameObj=o})("change",function(){return e.CHM(t),e.oxw().onChangeRoute()}),e.YNc(24,Se,2,2,"ng-option",40),e.qZA(),e.YNc(25,Ne,2,1,"span",41),e.qZA()(),e.TgZ(26,"div",35)(27,"div",36)(28,"label",37),e._uU(29,"Vehicle"),e.TgZ(30,"span",21),e._uU(31,"*"),e.qZA()(),e.TgZ(32,"ng-select",44,45),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleObj=o})("change",function(){return e.CHM(t),e.oxw().getStaffList()}),e.YNc(34,Ue,2,2,"ng-option",40),e.qZA(),e.YNc(35,Pe,2,1,"span",41),e.qZA()(),e.TgZ(36,"div",35)(37,"div",36)(38,"label",37),e._uU(39,"Driver"),e.TgZ(40,"span",21),e._uU(41,"*"),e.qZA()(),e.TgZ(42,"ng-select",46,47),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().driverObj=o}),e.YNc(44,Je,2,2,"ng-option",40),e.qZA(),e.YNc(45,Re,2,1,"span",41),e.qZA()(),e.TgZ(46,"div",35)(47,"div",36)(48,"label",37),e._uU(49,"Conductor"),e.TgZ(50,"span",21),e._uU(51,"*"),e.qZA()(),e.TgZ(52,"ng-select",48,49),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().conductorObj=o}),e.YNc(54,Qe,2,2,"ng-option",40),e.qZA(),e.YNc(55,Ye,2,1,"span",41),e.qZA()()()(),e.YNc(56,ze,29,2,"div",50),e.qZA()()}if(2&n){const t=e.MAs(2),i=e.MAs(13),o=e.MAs(23),s=e.MAs(33),r=e.MAs(43),c=e.MAs(53),f=e.oxw();e.xp6(5),e.Q6J("ngIf","200"!=f.loginRoleId),e.xp6(7),e.Q6J("ngClass",e.WLB(32,W,i.valid,i.invalid&&t.submitted))("ngModel",f.shiftObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",f.shiftList),e.xp6(1),e.Q6J("ngIf",i.errors&&(i.dirty||i.touched||t.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(35,W,o.valid,o.invalid&&t.submitted))("ngModel",f.routeNameObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",f.routeNameList),e.xp6(1),e.Q6J("ngIf",o.errors&&(o.dirty||o.touched||t.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(38,W,s.valid,s.invalid&&t.submitted))("ngModel",f.vehicleObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",f.vehicleList),e.xp6(1),e.Q6J("ngIf",s.errors&&(s.dirty||s.touched||t.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(41,W,r.valid,r.invalid&&t.submitted))("ngModel",f.driverObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",f.driverList),e.xp6(1),e.Q6J("ngIf",r.errors&&(r.dirty||r.touched||t.submitted)),e.xp6(7),e.Q6J("ngClass",e.WLB(44,W,c.valid,c.invalid&&t.submitted))("ngModel",f.conductorObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",f.conductorList),e.xp6(1),e.Q6J("ngIf",c.errors&&(c.dirty||c.touched||t.submitted)),e.xp6(1),e.Q6J("ngIf",f.studentDetails.length>0)}}function $e(n,a){1&n&&(e.TgZ(0,"ng-option",101),e._uU(1,"School"),e.qZA())}function Ge(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.name)}}function We(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Shift name is mandatory"),e.qZA())}function Ke(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,We,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(5);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Xe(n,a){if(1&n){const t=e.EpF();
1e.TgZ(0,"div",35)(1,"div",36)(2,"label",37),e._uU(3,"School Name"),e.qZA(),e.TgZ(4,"ng-select",102,52),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filterByObj=o})("change",function(){return e.CHM(t),e.oxw(2).onChangeSchool()})("change",function(){return e.CHM(t),e.oxw(2).filterBy("school")}),e.YNc(6,Ge,2,2,"ng-option",40),e.qZA(),e.YNc(7,Ke,2,1,"span",41),e.qZA()()}if(2&n){const t=e.MAs(5),i=e.oxw(2);e.xp6(4),e.Q6J("ngModel",i.filterByObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.schoolList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.masterForm.submitted))}}function et(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function tt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"label",37),e._uU(3,"Shift Name"),e.qZA(),e.TgZ(4,"ng-select",103,39),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filterByObj=o})("change",function(){return e.CHM(t),e.oxw(2).onChangeShift()})("change",function(){return e.CHM(t),e.oxw(2).filterBy("shift")}),e.YNc(6,et,2,2,"ng-option",40),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.filterByObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",t.shiftList)}}function it(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function nt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"label",37),e._uU(3,"Route Name"),e.qZA(),e.TgZ(4,"ng-select",104,43),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filterByObj=o})("change",function(){return e.CHM(t),e.oxw(2).onChangeRoute()})("change",function(){return e.CHM(t),e.oxw(2).filterBy("route")}),e.YNc(6,it,2,2,"ng-option",40),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.filterByObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",t.routeNameList)}}function ot(n,a){if(1&n&&(e.TgZ(0,"ng-option",53),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function at(n,a){1&n&&(e.TgZ(0,"span",20),e._uU(1,"Vehicle is mandatory"),e.qZA())}function st(n,a){if(1&n&&(e.TgZ(0,"span",54),e.YNc(1,at,2,0,"span",55),e.qZA()),2&n){e.oxw();const t=e.MAs(5);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function rt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",35)(1,"div",36)(2,"label",37),e._uU(3,"Vehicle"),e.qZA(),e.TgZ(4,"ng-select",105,45),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filterByObj=o})("change",function(){return e.CHM(t),e.oxw(2).filterBy("vehicle")}),e.YNc(6,ot,2,2,"ng-option",40),e.qZA(),e.YNc(7,st,2,1,"span",41),e.qZA()()}if(2&n){const t=e.MAs(5),i=e.oxw(2);e.xp6(4),e.Q6J("ngModel",i.filterByObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.vehicleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||i.masterForm.submitted))}}function lt(n,a){1&n&&(e.TgZ(0,"option",106),e._uU(1,"20"),e.qZA())}function ct(n,a){1&n&&(e.TgZ(0,"option",107),e._uU(1,"50"),e.qZA())}function dt(n,a){1&n&&(e.TgZ(0,"option",108),e._uU(1,"100"),e.qZA())}function pt(n,a){if(1&n&&(e.TgZ(0,"option",53),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function gt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw(2).Assignsorting(o,"schoolname")}),e._uU(1,"School"),e._UZ(2,"i",59),e.qZA()}}function mt(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",109)(3,"div",60),e._uU(4,"No Record Found"),e.qZA()()()())}function ut(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.schoolname?"Not Found":t.schoolname)}}function ht(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",110),e._uU(2),e.qZA(),e.YNc(3,ut,2,1,"td",98),e.TgZ(4,"td"),e._uU(5),e.qZA(),e.TgZ(6,"td"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA()()),2&n){const t=a.$implicit,i=e.oxw(3);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf","200"!=i.loginRoleId),e.xp6(2),e.Oqu(""==t.vehicleno?"Not Found":t.vehicleno),e.xp6(2),e.Oqu(""==t.studentname?"Not Found":t.studentname),e.xp6(2),e.Oqu(""==t.routename?"Not Found":t.routename),e.xp6(2),e.AsE("",""==t.pickuplocation?"Not Found":t.pickuplocation,"/",""==t.droplocation?"Not Found":" "+t.droplocation,""),e.xp6(2),e.Oqu(""==t.drivername?"Not Found":t.drivername),e.xp6(2),e.Oqu(""==t.conductorname?"Not Found":t.conductorname)}}function _t(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,ht,16,9,"tr",61),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.assignDetailData)}}function ft(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",111)(1,"ngb-pagination",112),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw(2).assignDetailsparam.pageno=o})("pageChange",function(){return e.CHM(t),e.oxw(2).Details("")}),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.assignDetailsparam.pageno)("maxSize",3)("pageSize",t.assignDetailsparam.itemperpage)}}function vt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",67)(1,"div",68)(2,"div",19)(3,"div",18)(4,"div",35)(5,"div",36)(6,"label",37),e._uU(7,"Filter By"),e.qZA(),e.TgZ(8,"ng-select",69,70),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().filterObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.onChangeFilter(o.filterObj)}),e.YNc(10,$e,2,0,"ng-option",71),e.TgZ(11,"ng-option",72),e._uU(12,"Vehicle"),e.qZA(),e.TgZ(13,"ng-option",73),e._uU(14,"Route"),e.qZA(),e.TgZ(15,"ng-option",74),e._uU(16,"Shift"),e.qZA()()()(),e.YNc(17,Xe,8,5,"div",34),e.YNc(18,tt,7,4,"div",34),e.YNc(19,nt,7,4,"div",34),e.YNc(20,rt,8,5,"div",34),e.qZA()(),e.TgZ(21,"div",19)(22,"div",75)(23,"div",76)(24,"span",77)(25,"label",78),e._uU(26,"Show "),e.TgZ(27,"select",79),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().assignDetailsparam.itemperpage=o})("change",function(){return e.CHM(t),e.oxw().Details("")}),e.TgZ(28,"option",80),e._uU(29," 10"),e.qZA(),e.YNc(30,lt,2,0,"option",81),e.YNc(31,ct,2,0,"option",82),e.YNc(32,dt,2,0,"option",83),e.YNc(33,pt,2,2,"option",84),e.qZA(),e._uU(34," entries"),e.qZA()()(),e.TgZ(35,"div",76)(36,"div",85),e._uU(37),e.qZA()(),e.TgZ(38,"div",86)(39,"
1span")(40,"button",87),e.NdJ("click",function(){return e.CHM(t),e.oxw().Details("refresh")}),e._UZ(41,"i",88),e.qZA()(),e.TgZ(42,"span")(43,"button",89),e.NdJ("click",function(){return e.CHM(t),e.oxw().downloadDoc("pdf")}),e._UZ(44,"i",90),e.qZA(),e.TgZ(45,"button",91),e.NdJ("click",function(){return e.CHM(t),e.oxw().downloadDoc("excel")}),e._UZ(46,"i",92),e.qZA()(),e.TgZ(47,"label")(48,"input",93),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().assignDetailsparam.searchby=o}),e.qZA()(),e.TgZ(49,"button",94),e.NdJ("click",function(){return e.CHM(t),e.oxw().Details("search")}),e._UZ(50,"span",95),e.qZA()()(),e.TgZ(51,"div",96)(52,"table",57)(53,"thead")(54,"tr")(55,"th"),e._uU(56,"#"),e.qZA(),e.YNc(57,gt,3,0,"th",97),e.TgZ(58,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"vehicleno")}),e._uU(59,"Vehicle No."),e._UZ(60,"i",59),e.qZA(),e.TgZ(61,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"studentname")}),e._uU(62,"Student"),e._UZ(63,"i",59),e.qZA(),e.TgZ(64,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"routename")}),e._uU(65,"Route Name"),e._UZ(66,"i",59),e.qZA(),e.TgZ(67,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"pickuplocation")}),e._uU(68,"Pickup/Drop"),e._UZ(69,"i",59),e.qZA(),e.TgZ(70,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"drivername")}),e._uU(71,"Driver"),e._UZ(72,"i",59),e.qZA(),e.TgZ(73,"th",58),e.NdJ("click",function(o){return e.CHM(t),e.oxw().Assignsorting(o,"conductorname")}),e._uU(74,"Conductor"),e._UZ(75,"i",59),e.qZA()()(),e.YNc(76,mt,5,0,"tbody",98),e.YNc(77,_t,2,1,"tbody",98),e.qZA(),e.TgZ(78,"div",99),e.YNc(79,ft,2,4,"div",100),e.qZA()()()()()}if(2&n){const t=e.oxw();e.xp6(8),e.Q6J("ngModel",t.filterObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngIf","200"!=t.loginRoleId),e.xp6(7),e.Q6J("ngIf","200"!=t.loginRoleId&&"school"==t.filterObj),e.xp6(1),e.Q6J("ngIf","shift"==t.filterObj),e.xp6(1),e.Q6J("ngIf","route"==t.filterObj),e.xp6(1),e.Q6J("ngIf","vehicle"==t.filterObj),e.xp6(7),e.Q6J("ngModel",t.assignDetailsparam.itemperpage),e.xp6(3),e.Q6J("ngIf",t.totalCount>20),e.xp6(1),e.Q6J("ngIf",t.totalCount>50),e.xp6(1),e.Q6J("ngIf",t.totalCount>100),e.xp6(1),e.Q6J("ngIf",t.totalCount<100&&t.totalCount>10),e.xp6(4),e.hij("Total Records : ",t.totalCount,""),e.xp6(6),e.Q6J("disabled","0"==t.totalCount),e.xp6(2),e.Q6J("disabled","0"==t.totalCount),e.xp6(3),e.Q6J("ngModel",t.assignDetailsparam.searchby),e.xp6(9),e.Q6J("ngIf","200"!=t.loginRoleId),e.xp6(19),e.Q6J("ngIf",0==t.totalCount),e.xp6(1),e.Q6J("ngIf",0!=t.totalCount),e.xp6(2),e.Q6J("ngIf",t.totalCount>t.assignDetailsparam.itemperpage)}}function bt(n,a){1&n&&(e.TgZ(0,"span",21),e._uU(1,"Remark is mandatory"),e.qZA())}class xt{constructor(){this.schoolid="0",this.searchBy="",this.filter2="",this.filter3="",this.filter1=""}}class Ct{constructor(){this.schoolid="0"}}class Tt{constructor(){this.schoolid="0",this.searchBy=""}}let yt=(()=>{class n{constructor(t,i,o,s){this.cv=t,this.cs=i,this.loader=o,this.es=s,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.pageHeading="Assignment Form",this.formsection=!1,this.routeListParam=new T,this.vehicleListParam=new xt,this.staffListParam=new Ct,this.shiftListParam=new Tt,this.filterList=["School","Shift","Route","Vehicle"],this.filterObj=null,this.schoolList=[],this.shiftList=[],this.routeNameList=[],this.vehicleList=[],this.staffList=[],this.studentList=[],this.studentDetails=[],this.driverList=[],this.conductorList=[],this.loadersect=!1,this.detailsparam=new u.MG,this.assignDetailsparam=new u.DB,this.studentMappingReq=new u.zK,this.remark="",this.studentData={studentname:"",classname:"",sectionname:""},this.unAssignmentRequest=new u.zP,this.sortDir=1,this.assignsortDir=1}ngOnInit(){"200"==this.loginRoleId?this.getShiftList():(this.getRouteList(),this.getStaffList(),this.getSchoolList())}getSchoolList(){this.es.apiCall({},"schoollist").subscribe(t=>{this.schoolList=200==t.statusCode?t.entity.listdetail:[]})}getShiftList(){this.shiftListParam.schoolid=this.schoolObj?this.schoolObj.id:"0",this.es.apiCall(this.shiftListParam,"shiftlist").subscribe(t=>{this.shiftList=200==t.statusCode?t.entity.listdetail:[]})}getRouteList(){this.routeListParam.schoolid=this.schoolObj?this.schoolObj.id:"",this.es.apiCall(this.routeListParam,"routelist").subscribe(t=>{this.routeNameList=200==t.statusCode?t.entity.listdetail:[]})}getVehicleList(){this.vehicleListParam.filter1=this.schoolObj?this.schoolObj.id:"",this.es.apiCall(this.vehicleListParam,"vehiclelist").subscribe(t=>{this.vehicleList=200==t.statusCode?t.entity.listdetail:[]})}getStaffList(){var t=this;return(0,I.Z)(function*(){t.staffListParam.schoolid=t.schoolObj?t.schoolObj.id:"",t.es.apiCall(t.staffListParam,"stafflist").subscribe(i=>{if(200==i.statusCode){t.staffList=i.entity.listdetail;let o=[],s=[];t.staffList.forEach(r=>{"driver"==r.employeetype.toLowerCase()&&o.push(r),"conductor"==r.employeetype.toLowerCase()&&s.push(r)}),t.driverList=o,t.conductorList=s,setTimeout(()=>{t.driverList.forEach(r=>
1{t.vehicleObj&&t.vehicleObj.driverid==r.id&&(t.driverObj=r)}),t.conductorList.forEach(r=>{t.vehicleObj&&t.vehicleObj.conductorid==r.id&&(t.conductorObj=r)})},1e3)}else t.staffList=[]})})()}getStudentDetails(){this.detailsparam.schoolid=this.schoolObj?this.schoolObj.id:"",this.detailsparam.shiftid=this.shiftObj?this.shiftObj.id:"",this.detailsparam.routeid=this.routeNameObj?this.routeNameObj.id:"",this.es.apiCall(this.detailsparam,"studentdetails").subscribe(t=>{"200"==t.statusCode?(this.studentDetails=t.entity.studentdetails,this.loadersect=!1):(this.loader.responseMessage="Student not found",this.loader.failedNotification(),this.studentDetails=[],this.loadersect=!0)},t=>{console.log(t)})}show(t){"form"==t&&(this.formsection=!1,this.loadersect=!1,this.studentDetails=[],setTimeout(()=>{this.masterForm.resetForm()},500)),"details"==t&&(this.formsection=!0,this.pageHeading="Assignment Details",this.filterObj=null,this.filterByObj=null,this.Details("all"))}Details(t){try{this.loader.loaderOff()}catch(i){}"all"==t&&(this.assignDetailsparam=new u.DB),"showrow"==t&&(this.assignDetailsparam.pageno=1),"search"==t&&(this.assignDetailsparam.pageno=1),"refresh"==t&&(this.assignDetailsparam=new u.DB),this.assignDetailsparam.searchby=this.assignDetailsparam.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(this.assignDetailsparam,"assigndetails").subscribe(i=>{try{this.loader.loaderOff()}catch(o){}200==i.statusCode?(this.assignDetailData=i.entity.assigndetails,this.totalCount=+i.entity.totalrecord,this.recordFrom=this.assignDetailData[0].rowno,this.recordTo=this.assignDetailData[this.assignDetailData.length-1].rowno,this.loadersect=!1,this.formsection=!0):(this.assignDetailsparam.searchby="",this.loader.responseMessage=i.entity,this.loader.failedNotification(),this.assignDetailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.assignDetailsparam.searchby="",this.loadersect=!0)},i=>{this.loader.loaderOff(),this.loader.logout()})}onChangeFilter(t){"school"==t&&this.getSchoolList(),"shift"==t&&this.getShiftList(),"vehicle"==t&&this.getVehicleList(),"route"==t&&this.getRouteList()}filterBy(t){"school"==t&&(this.assignDetailsparam.schoolid=this.filterByObj.id,this.assignDetailsparam.shiftid="",this.assignDetailsparam.vehicleid="",this.assignDetailsparam.routeid=""),"shift"==t&&(this.assignDetailsparam.shiftid=this.filterByObj.id,this.assignDetailsparam.schoolid="",this.assignDetailsparam.vehicleid="",this.assignDetailsparam.routeid=""),"vehicle"==t&&(this.assignDetailsparam.vehicleid=this.filterByObj.id,this.assignDetailsparam.schoolid="",this.assignDetailsparam.shiftid="",this.assignDetailsparam.routeid=""),"route"==t&&(this.assignDetailsparam.routeid=this.filterByObj.id,this.assignDetailsparam.schoolid="",this.assignDetailsparam.shiftid="",this.assignDetailsparam.vehicleid=""),this.Details("")}onChangeSchool(){this.getShiftList(),this.getStudentDetails(),this.getVehicleList(),this.getStaffList(),this.getRouteList()}onChangeShift(){"200"==this.loginRoleId&&(this.getStaffList(),this.getRouteList(),this.getStudentDetails())}onChangeRoute(){this.vehicleListParam.filter3=this.routeNameObj?this.routeNameObj.id:"",this.getVehicleList(),this.getStudentDetails()}viewStudentDetails(){this.getStudentDetails()}validateBeforeSubmit(){this.studentMappingReq.studentdetails=[],this.masterForm.valid&&(this.studentMappingReq.schoolid=this.schoolObj?this.schoolObj.id:"0",this.studentMappingReq.shiftid=this.shiftObj?this.shiftObj.id:"0",this.studentMappingReq.routeid=this.routeNameObj?this.routeNameObj.id:"0",this.studentMappingReq.driverid=this.driverObj?this.driverObj.id:"0",this.studentMappingReq.conductorid=this.conductorObj?this.conductorObj.id:"0",this.studentMappingReq.vehicleid=this.vehicleObj?this.vehicleObj.id:"0",this.submit())}submit(){this.studentDetails.forEach((t,i)=>{console.log(t),$("#student"+i).is(":checked")&&"unassign"==t.status&&this.studentMappingReq.studentdetails.push({studentid:t.studentid})}),0==this.studentMappingReq.studentdetails.length?(this.loader.responseMessage="Please select students for assignment",this.loader.failedNotification()):(this.loader.loaderOn(),this.es.apiCall(this.studentMappingReq,"studentassign").subscribe(t=>{this.es.pageDataInfo("",this.studentMappingReq,"Student Assignment","submit","Submit Event",t.entity),this.loader.loaderOff(),this.loader.responseMessage=t.entity,"200"==t.statusCode?(this.getStudentDetails(),this.loader.successNotification()):this.loader.failedNotification()}))}resetForm(){this.studentMappingReq=new u.zK,this.schoolObj=null,this.shiftObj=null,this.routeNameObj=null,this.driverObj=null,this.conductorObj=null,this.vehicleObj=null,this.masterForm.resetForm(),this.studentDetails=[]}openModalForUnAssign(t){this.remark="","assign"==t.status&&($("#unassignModal").modal("show"),this.studentData=t,this.unAssignmentRequest.schoolid=t.schoolid,this.unAssignmentRequest.shiftid=t.shiftid,this.unAssignmentRequest.routeid=t.routeid,this.unAssignmentRequest.vehicleid=t.vehicleid,this.unAssignmentRequest.mappid="",this.unAssignmentRequest.driverid=t.driverid,this.unAssignmentRequest.conductorid=t.conductorid,this.unAssignmentRequest.studentdetails=[{studentid:t.studentid}],this.unAssignmentRequest.remarks="",this.unAssignmentRequest.status="unassign")}unassign(t){let i=this.remark;0==i.length&&(this.remark=""),t.valid&&0!=i.length&&(this.unAssignmentRequest.remarks=this.remark,this.loader.loaderOn(),this.es.apiCall(this.unAssignmentRequest,"studentassignupdate").subscribe(o=>{this.loader.loaderOff(),"200"==o.statusCode?($("#unassignModal").modal("hide"),this.loader.responseMessage=o.entity,this.loader.successNotification(),this.get
1StudentDetails()):(this.loader.responseMessage=o.entity,this.loader.failedNotification())}))}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.studentDetails.length>0&&this.studentDetails.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}Assignsorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.assignsortDir=1==this.assignsortDir?-1:1;try{this.assignDetailData.length>0&&this.assignDetailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}downloadDoc(t){let i=new u.DB;i.pdfexcel=t,i.pageno="",i.itemperpage="",i.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.es.apiCall(i,"assigndetails").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.es.commonFileDownload(this.filePath),this.detailsparam.pdfexcel=""):this.detailsparam.pdfexcel=""})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(P.P))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-student-assignment"]],viewQuery:function(t,i){if(1&t&&(e.Gf(V,5),e.Gf(O,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.masterForm=o.first),e.iGM(o=e.CRH())&&(i.unassignForm=o.first)}},decls:45,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"card-labelmainpageheader"],["aria-hidden","true",1,"fa","fa-cubes"],["class","btn btn-sm btn-success add-new p-1 mb-1 mr-2",3,"click",4,"ngIf"],["class","btn btn-sm btn-dark add-new p-1 mb-1 mr-2",3,"click",4,"ngIf"],[1,"card"],["class","card-body p-3 assignEntry",4,"ngIf"],["class","card-body p-3",4,"ngIf"],["id","unassignModal","tabindex","-1","role","dialog","aria-labelledby","ModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal
1-sm"],[1,"modal-content"],[1,"modal-header","p-1"],["id","ModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],["novalidate","",3,"ngSubmit"],["unassignForm","ngForm"],[1,"modal-body","p-2"],[1,"row"],[1,"col-md-12"],[1,"text-small"],[1,"text-danger"],["type","text","minlength","3","maxlength","100","name","delete_remark","placeholder","Remark","required","",1,"form-control",3,"ngModel","ngModelChange","keypress"],["delete_remarkCtrl","ngModel"],["class","text-danger",4,"ngIf"],[1,"modal-footer","text-center","p-0"],["type","submit",1,"btn","btn-warning","p-2"],["type","button","data-bs-dismiss","modal",1,"btn","btn-secondary","p-2"],[1,"btn","btn-sm","btn-success","add-new","p-1","mb-1","mr-2",3,"click"],[1,"btn","btn-sm","btn-dark","add-new","p-1","mb-1","mr-2",3,"click"],["aria-hidden","true",1,"fa","fa-th"],[1,"card-body","p-3","assignEntry"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["masterForm","ngForm"],["class","col-md-2",4,"ngIf"],[1,"col-md-2"],[1,"form-group"],[1,"mb-0"],["name","shiftName","placeholder","Select Shift","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["shiftNameCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger validationmsg",4,"ngIf"],["name","routeName","placeholder","Select Route Name","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["routeNameCtrl","ngModel"],["name","vehicle","placeholder","Select Vehicle","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["vehicleCtrl","ngModel"],["name","driver","placeholder","Select Driver","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["driverCtrl","ngModel"],["name","conductor","placeholder","Select Conductor","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["conductorCtrl","ngModel"],["class","col-md-12",4,"ngIf"],["name","schoolName","placeholder","Select School","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["schoolNameCtrl","ngModel"],[3,"value"],[1,"form-control-feedback","text-danger","validationmsg"],["class","text-small",4,"ngIf"],[1,"scroll-assign-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-center","mt-4"],["type","button",1,"btn","btn-secondary","btn-sm","text-white","mx-2",3,"click"],["type","button",1,"btn","btn-primary","btn-sm","submit","text-white",3,"disabled","click"],[1,"fw-bold","text-center","text-uppercase",3,"ngStyle","click"],["type","checkbox",3,"checked","disabled","name","id"],[1,"card-body","p-3"],[1,"row","grid-section"],["name","filterName","placeholder","Select Filter","required","",3,"ngModel","multiple","closeOnSelect","ngModelChange","change"],["filterByCtrl","ngModel"],["value","school",4,"ngIf"],["value","vehicle"],["value","route"],["value","shift"],[1,"table-head","d-flex","justify-content-between"],[1,"mt-2"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],[1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[1,"mt-1"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[3,"click",4,"ngIf"],[4,"ngIf"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["value","school"],["name","schoolName","placeholder","Select School","required","",3,"ngModel","multiple","closeOnSelect","ngModelChange","change"],["name","shiftName","placeholder","Select Shift",3,"ngModel","multiple","closeOnSelect","ngModelChange","change"],["name","routeName","placeholder","Select Route Name",3,"ngModel","multiple","closeOnSelect","ngModelChange","change"],["name","vehicle","placeholder","Select Vehicle",3,"ngModel","multiple","closeOnSelect","ngModelChange","change"],["value","20"],["value","50"],["value","100"],["colspan","12"],[1,"srnotd"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"h5",1),e._UZ(2,"i",2),e._uU(3),e.qZA(),e.YNc(4,G,2,0,"button",3),e.YNc(5,U,2,0,"button",4),e.qZA(),e.TgZ(6,"div",5),e.YNc(7,Be,57,47,"div",6),e.YNc(8,vt,80,21,"div",7),e.qZA(),e.TgZ(9,"div",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"h5",12),e._uU(14,"UNASSIGN"),e.qZA(),e.TgZ(15,"button",13)(16,"span",14),e._uU(17,"\xd7"),e.qZA()()(),e.TgZ(18,"form",15,16),e.NdJ("ngSubmit",function(){e.CHM(o);const r=e.MAs(19);return i.unassign(r)}),e.TgZ(20,"div",17)(21,"div",18)(22,"div",19)(23,"div")(24,"p")(25,"strong"),e._uU(26,"Student: "),e.qZA(),e._uU(27),e.qZA(),e.TgZ(28,"p")(29,"strong"),e._uU(30,"Class: "),e.qZA(),e._uU(31),e.qZA()()(),e.TgZ(32,"div",19)(33,"label",20),e._uU(34,"Remark"),e.TgZ(35,"span",21),e._uU(36,"*"),e.qZA()(),e.TgZ(37,"textarea",22,23),e.NdJ("ngModelChange",function(r){return i.remark=r})("keypress",function(r){return i.cv.addressValidation(r)}),e.qZA(),e.YNc(39,bt,2,0,"span",24),e.qZA()()(),e.TgZ(40,"div",25)(41,"button",26),e._uU(42,"Unassign"),e.qZA(),e.TgZ(43,"button",27),e._uU(44,"Close"),e.qZA()()()()()()}if(2&t){const o=e.MAs(19),s=e.MAs(38);e.xp6(3),e.hij("\xa0\xa0\xa0",i.pageHeading,""),e.xp6(1),e.Q6J("ngIf",i.formsection),e.xp6(1),e.Q6J("ngIf",!i.formsection),e.xp6(2),e.Q6J("ngIf",!i.formsection),e.xp6(1),e.Q6J("ngIf",i.formsection),e.xp6(19),e.Oqu(i.studentData.studentname),e.xp6(4),e.AsE(" ",i.studentData.classname,"(",i.studentData.sectionname,")"),e.xp6(6),e.Q6J("ngModel",i.remark),e.xp6(2),e.Q6J("ngIf",o.submitted&&(null==s.errors?null:s.errors.required))}},directives:[y.O5,d._Y,d.JL,d.F,Z.w9,d.Q7,y.mk,d.JJ,d.On,y.sg,Z.xv,y.PC,d.EJ,d.YN,d.Kr,C._L,d.Fj,C.N9,d.wO,d.nD],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}.invalid-feedback[_ngcontent-%COMP%]{font-size:12px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.scroll-assign-tbl[_ngcontent-%COMP%]{overflow:auto;max-height:68vh;min-height:auto}.add-new[_ngcontent-%COMP%]{color:#fff!important;text-transform:uppercase;margin-bottom:5px;height:25px;padding:0 5px}.entrycard[_ngcontent-%COMP%]{background-color:#d2dedf}.entrydiv[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #9EC6C7;padding:1%!important}.mainpageheader[_ngcontent-%COMP%]{color:#cb5800;text-decoration:none;font-family:Tahoma}.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#101010;color:#06665e}.mendatorynote[_ngcontent-%COMP%]{color:#00008b;font-size:11px;text-align:center}
1.mendatorystar[_ngcontent-%COMP%]{color:#be0215}.assignEntry[_ngcontent-%COMP%]{background-color:#d8e1e1;border-bottom:3px solid #286254}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.card-shimmer[_ngcontent-%COMP%]{position:relative;box-shadow:0 6px 8px #0000001a;background-color:#fff;border-radius:0;height:auto;overflow:hidden;margin:0 auto}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}"]}),n})();var F=b(15439),z=b(82499);const Zt=["basicForm"];function Mt(n,a){if(1&n&&(e.TgZ(0,"div")(1,"h5",28),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.pageHeading)}}function wt(n,a){1&n&&(e.TgZ(0,"small",31),e._uU(1,"Select search by"),e.qZA())}function At(n,a){if(1&n&&(e.TgZ(0,"span",29),e.YNc(1,wt,2,0,"small",30),e.qZA()),2&n){e.oxw();const t=e.MAs(15);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function It(n,a){1&n&&e._UZ(0,"option",37),2&n&&e.s9C("value",a.$implicit.deviceimeino)}function Dt(n,a){1&n&&(e.TgZ(0,"small",31),e._uU(1,"Please enter imei number."),e.qZA())}function kt(n,a){if(1&n&&(e.TgZ(0,"span",29),e.YNc(1,Dt,2,0,"small",30),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function qt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",8)(2,"label",17),e._uU(3,"IMEI Number "),e.TgZ(4,"span",10),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",33,34),e.NdJ("keypress",function(o){return e.CHM(t),e.oxw().cv.onlyNumberKey(o)})("keyup",function(o){return e.CHM(t),e.oxw().searchIMEINo(o)})("paste",function(o){return e.CHM(t),e.oxw().pasteIMEINo(o)})("keyup",function(o){return e.CHM(t),e.oxw().getimeidata(o)})("ngModelChange",function(o){return e.CHM(t),e.oxw().imeiNoObj=o}),e.qZA(),e.TgZ(8,"datalist",35),e.YNc(9,It,1,1,"option",36),e.qZA(),e.YNc(10,kt,2,1,"span",15),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw();e.xp6(6),e.Q6J("ngModel",i.imeiNoObj),e.xp6(3),e.Q6J("ngForOf",i.IMEIlist),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched))}}function Ot(n,a){if(1&n&&(e.TgZ(0,"ng-option",37),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function St(n,a){1&n&&(e.TgZ(0,"small",31),e._uU(1,"Vehicle No. is required"),e.qZA())}function Ft(n,a){if(1&n&&(e.TgZ(0,"span",29),e.YNc(1,St,2,0,"small",30),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}const Nt=function(n,a){return{"has-danger":n,"has-success":a}},Ut=function(){return{maxlength:"11"}};function Lt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",32)(1,"div",8)(2,"label",17),e._uU(3,"Vehicle Number "),e.TgZ(4,"span",10),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",38,39),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleObj=o})("keyup",function(o){return e.CHM(t),e.oxw().pastevehicleNumber(o)}),e.YNc(8,Ot,2,2,"ng-option",36),e.qZA(),e.YNc(9,Ft,2,1,"span",15),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(6);e.xp6(6),e.Q6J("ngClass",e.WLB(7,Nt,t.invalid&&o.submitted,t.valid&&t.dirty))("ngModel",i.vehicleObj)("multiple",!1)("inputAttrs",e.DdM(10,Ut))("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.vehicleList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched))}}function Pt(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function Jt(n,a){if(1&n&&(e.TgZ(0,"span",68),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("Port No : ",t.portNo,"")}}function Vt(n,a){1&n&&(e.TgZ(0,"option",69),e._uU(1,"20"),e.qZA())}function Rt(n,a){1&n&&(e.TgZ(0,"option",70),e._uU(1,"50"),e.qZA())}function Qt(n,a){1&n&&(e.TgZ(0,"option",71),e._uU(1,"100"),e.qZA())}function Et(n,a){if(1&n&&(e.TgZ(0,"option",37),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Yt(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",72)(3,"div",73),e._uU(4,"No Record Found"),e.qZA()()()())}function jt(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",75)(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"td"),e._uU(9),e.qZA()()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(""==t.timestamp?"Not Found":t.timestamp),e.xp6(3),e.Oqu(""==t.devicestring?"Not Found":t.devicestring),e.xp6(2),e.Oqu(""==t.clientip?"Not Found":t.clientip)}}function Ht(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,jt,10,4,"tr",74),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function zt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",76)(1,"ngb-pagination",77),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw(2).detailsParam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw(2);return o.Details(""),o.es.pageDataInfo("",o.detailsParam,"Raw Data","Details method","On click page number",o.onclickeventmessage)}),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsParam.pageno)("maxSize",3)("pageSize",t.detailsParam.itemperpage)}}function Bt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",40)(1,"div",41)(2,"div",42)(3,"div",43),e.YNc(4,Pt,2,3,"span",1),e.qZA(),e.TgZ(5,"div",44)(6,"span"),e.YNc(7,Jt,2,1,"span",45),e.TgZ(8,"span",46)(9,"label",47),e._uU(10,"Show "),e.TgZ(11,"select",48),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().detailsParam.itemperpage=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details("showrow"),o.es.pageDataInfo("",o.detailsParam,"Raw Data","Details method","On click show row",o.onclickeventmessage)}),e.TgZ(12,"option",49),e._uU(13," 10"),e.qZA(),e.YNc(14,Vt,2,0,"option",50),e.YNc(15,Rt,2,0,"option",51),e.YNc(16,Qt,2,0,"option",52),e.YNc(17,Et,2,2,"option",53),e.qZA(),e._uU(18," entries"),e.qZA()(),e.TgZ(19,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.Details("refresh"),o.es.pageDataInfo("",o.detailsParam,"Raw Data","Details method","On click refresh button",o.onclickeventmessage)}),e._UZ(20,"i",55),e.qZA()(),e.TgZ(21,"span")(22,"button",56),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.downloadDoc("excel"),o.es.pageDataInfo("",o.detailsParam,"Raw Data","Download Excel method","On click downloadDoc Method",o.onclickeventmessage)}),e._UZ(23,"i",57),e.qZA()(),e.TgZ(24,"label")(25,"input",58),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().detailsParam.searchby=o}),e.qZA()(),e.TgZ(26,"button",59),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.Details("search"),o.es.pageDataInfo("",o.detailsParam,"Raw Data","Details method","On click search Method",o.onclickeventmessage)}),e._UZ(27,"span",60),e.qZA()(),e.TgZ(28,"div",61)(29,"table",62)(30,"thead")(31,"tr")(32,"th"),e._uU(33,"#"),e.qZA(),e.TgZ(34,"th",63),e._uU(35,"TIMESTAMP"),e.qZA(),e.TgZ(36,"th"),e._uU(37,"DEVICE STRING"),e.qZA(),e.TgZ(38,"th",64),e._uU(39,"Client IP"),e._UZ(40,"i",65),e.qZA()()(),e.YNc(41,Yt,5,0,"tbody",1),e.YNc(42,Ht,2,1,"tbody",1),e.qZA()(),e.TgZ(43,"div",66),e.YNc(44,zt,2,4,"div",67),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngIf",0!=t.totalCount),e.xp6(3),e.Q6J("ngIf",""!=t.portNo),e.xp6(4),e.Q6J("ngModel",t.detailsParam.itemperpage),e.xp6(3),e.Q6J("ngIf",t.totalCount>20),e.xp6(1),e.Q6J("ngIf",t.totalCount>50),e.xp6(1),e.Q6J("ngIf",t.totalCount>100),e.xp6(1),e.Q6J("ngIf",t.totalCount<100&&t.totalCount>10),e.xp6(8),e.Q6J("ngModel",t.detailsParam.searchby),e.xp6(16),e.Q6J("ngIf",0==t.totalCount),e.xp6(1),e.Q6J("ngIf",0!=t.totalCount),e.xp6(2),e.Q6J("ngIf",t.totalCount>t.detailsParam.itemperpage)}}const $t=function(n,a){return{"is-valid":n,"ng-error":a}};let Gt=(()=>{class n{constructor(t,i,o,s,r,c){this.cv=t,this.cs=i,this.loader=o,this.es=s,this.listService=r,this.router=c,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.detailsParam=new u.yn,this.pageHeading="Raw Data",this.vehicleListRequest=new u.nO,this.deviceListRequest=new u.nO,this.rawTable=!1,this.portNo="",this.loadersect=!0,this.onclickeventmessage="",this.sortDir=1}ngOnInit(){$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"}),this.getDate()}pasteIMEINo(t){setTimeout(()=>{this.enteredIMEIno=t.target.value.trim(),this.getIMEINo()},500)}getimeidata(t){var i=this;return(0,I.Z)(function*(){t.target.value.length>=5&&(i.enteredIMEIno=t.target.value,i.deviceListRequest.searchBy=i.enteredIMEIno,i.IMEIlist=yield i.listService.getDeviceList(i.deviceListRequest))})()}searchIMEINo(t){5==t.target.value.length&&(this.enteredIMEIno=t.target.value,this.getIMEINo())}getIMEINo(){var t=this;return(0,I.Z)(function*(){t.es.apiCall({pageName:"",pageURL:"",searchParameter:t.enteredIMEIno,searchType:"",filter1:"",filter2:"",filter3:"",filter4:"",pageId:"1"},"list/devicelist").subscribe(o=>{try{t.loader.loaderOff()}catch(s){}t.IMEIlist=o.entity.listdetail})})()}pastevehicleNumber(t){this.vehicleList=null,t.target.value.length>=4&&this.getvehicleList(t.target.value)}getvehicleList(t){var i=this;return(0,I.Z)(function*(){i.vehicleListRequest.searchBy=t,i.vehicleList=yield i.listService.getVehicleList(i.vehicleListRequest)})()}getDate(){$(function(){$('input[name="datetimes"]').daterangepicker({timePicker:!1,singleDatePicker:!0,startDate:F().startOf("hour"),locale:{format:"DD-MMM-YYYY"},maxDate:new Date,minYear:1901,maxYear:parseInt(F().format("YYYY"),10),function(t,i){$("#datetimepicker").html(t.format("DD-MMM-YYYY"))}})})}onSubmit(){if(this.basicForm.valid){const t=document.getElementById("datetimepicker").value;this.datetimerange=t.split(" - ",2),this.fromDatetime=this.datetimerange[0],this.toDatetime=this.datetimerange[1],this.detailsParam.date=this.fromDatetime,this.detailsParam.pageno=1,this.fromTime=$(".fromTime").val(),this.toTime=$(".toTime").val(),this.detailsParam.fromtime=this.fromTime,this.detailsParam.totime=this.toT
1ime,this.detailsParam.searchby="",this.Details("")}}reset(){this.rawTable=!1,this.portNo="",this.basicForm.resetForm(),this.getDate(),setTimeout(()=>{$(".fromTime").wickedpicker({title:"From Time",now:"00:00"}),$(".toTime").wickedpicker({title:"To Time",now:"23:59"})},1500)}Details(t){this.rawTable=!0;try{this.loader.loaderOff()}catch(i){}"showrow"==t&&(this.detailsParam.pageno=1),"search"==t&&(this.detailsParam.pageno=1),"refresh"==t&&(this.detailsParam.pageno=1,this.detailsParam.searchby=""),"Device"==this.searchByType&&(this.detailsParam.imeino=this.imeiNoObj?this.imeiNoObj:""),"Vehicle"==this.searchByType&&(this.detailsParam.imeino=this.vehicleObj?this.vehicleObj.imeino:""),this.detailsParam.searchby=this.detailsParam.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(this.detailsParam,"map/rawdataV1").subscribe(i=>{this.onclickeventmessage=i.entity?i.entity:i.message;try{this.loader.loaderOff()}catch(o){}"200"==i.statusCode?(this.detailData=i.entity.distancetraveldetails,this.totalCount=Number(i.entity.totalrecord),this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno,this.loadersect=!1,this.rawTable=!0):(this.loader.responseMessage=i.message,this.loader.failedNotification(),this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.detailsParam.searchby="",this.loadersect=!0,this.rawTable=!1),this.es.pageDataInfo("",this.detailsParam,"Raw Data","Details method","Called Function",i.message)})}onChangeFilter(){var t=this;return(0,I.Z)(function*(){t.searchByType&&"Vehicle"==t.searchByType&&(t.vehicleList=yield t.listService.getVehicleList(t.vehicleListRequest))})()}setData(t){}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}downloadDoc(t){let i=new u.yn;i.pdfexcel=t,i.pageno="",i.itemperpage="",i.imeino=this.detailsParam.imeino,i.date=this.detailsParam.date,i.fromtime=this.detailsParam.fromtime,i.totime=this.detailsParam.totime,i.searchby=this.detailsParam.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.es.apiCall(i,"operation/rawdata").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.es.commonFileDownload(this.filePath),this.detailsParam.pdfexcel=""):this.detailsParam.pdfexcel=""})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(P.P),e.Y36(z.X),e.Y36(v.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-raw-data"]],viewQuery:function(t,i){if(1&t&&e.Gf(Zt,5),2&t){let o;e.iGM(o=e.CRH())&&(i.basicForm=o.first)}},decls:46,vars:12,consts:[[1,"d-flex","justify-content-between"],[4,"ngIf"],[1,"card-body","p-1"],[1,"container","assignEntry"],["novalidate","","autocomplete","off"],["basicForm","ngForm"],[1,"row"],[1,"col-lg-2","col-md-4","col-sm-12"],[1,"form-group"],[1,"mb-0","label"],[1,"text-danger"],["name","searchByType","placeholder","Select Search Type *","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["searchByTypeCtrl","ngModel"],["value","Vehicle"],["value","Device"],["class","form-control-feedback text-danger validationmsg",4,"ngIf"],["class","col-lg-3 col-md-3 col-sm-12",4,"ngIf"],[1,"mb-0"],["type","text","name","datetimes","id","datetimepicker","required","",1,"form-control","form-control-sm",3,"change"],[1,"col-lg-3","col-md-3","col-sm-6"],[1,"form-group",2,"width","100px","float","left"],["type","text","name","timepicker",1,"fromTime","form-control","form-control-sm","text-center"],["type","text","name","timepicker",1,"toTime","form-control","form-control-sm","text-center"],[1,"col","text-right","pt-3"],[1,"text-left"],[1,"custom-btn","btn-13","Show","mb-3","btn-sm","float-right","p-1",3,"click"],["type","button",1,"custom-btn","btn-10","btn-sm","float-right","p-1","mr-2",3,"click"],["class","row grid-section",4,"ngIf"],[1,"card-label","mainpageheader"],[1,"form-control-feedback","text-danger","validationmsg"],["class","text-small",4,"ngIf"],[1,"text-small"],[1,"col-lg-3","col-md-3","col-sm-12"],["minlength","5","maxlength","23","placeholder","Search IMEI 5 digit","list","browsers","name","imeimo","required","",1,"form-control","form-control-sm",3,"ngModel","keypress","keyup","paste","ngModelChange"],["imeiNoCtrl","ngModel"],["id","browsers"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["required","","placeholder","Enter last 4 digit of vehicle","name","vehicl",3,"ngClass","ngModel","multiple","
1inputAttrs","closeOnSelect","ngModelChange","keyup"],["vehicleCtrl","ngModel"],[1,"row","grid-section"],[1,"col-md-12"],[1,"row","table-head","pb-2"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-md-4","mt-2","fw-bold","total-record-label"],[1,"col-md-8","text-end"],["class","mt-2 fw-bold total-record-label portno",4,"ngIf"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl","col-md-12"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[2,"width","120px"],[2,"width","220px"],[1,"fa","fa-sort-amount-desc"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],[1,"mt-2","fw-bold","total-record-label","portno"],["value","20"],["value","50"],["value","100"],["colspan","12"],[1,"text-center"],[4,"ngFor","ngForOf"],[2,"width","300px"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.YNc(1,Mt,3,1,"div",1),e._UZ(2,"div"),e.qZA(),e.TgZ(3,"div",2)(4,"div",3)(5,"form",4,5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"label",9),e._uU(11,"Select Search Type"),e.TgZ(12,"span",10),e._uU(13,"*"),e.qZA()(),e.TgZ(14,"ng-select",11,12),e.NdJ("ngModelChange",function(s){return i.searchByType=s})("change",function(){return i.vehicleObj=null,i.vehicleList=null,i.imeiNoObj=null,i.IMEIlist=null,i.onChangeFilter()}),e.TgZ(16,"ng-option",13),e._uU(17,"By Vehicle"),e.qZA(),e.TgZ(18,"ng-option",14),e._uU(19,"By IMEI No."),e.qZA()(),e.YNc(20,At,2,1,"span",15),e.qZA()(),e.YNc(21,qt,11,3,"div",16),e.YNc(22,Lt,10,11,"div",16),e.TgZ(23,"div",7)(24,"div",8)(25,"label",17),e._uU(26,"Date "),e.qZA(),e.TgZ(27,"input",18),e.NdJ("change",function(){return i.getDate()}),e.qZA()()(),e.TgZ(28,"div",19)(29,"div",20)(30,"label",17),e._uU(31,"Time "),e.qZA(),e._UZ(32,"input",21),e.qZA(),e._uU(33," \xa0\xa0 "),e.TgZ(34,"div",20),e._UZ(35,"label",17)(36,"input",22),e.qZA()(),e.TgZ(37,"div",23)(38,"div",24)(39,"button",25),e.NdJ("click",function(){return i.onSubmit()}),e._uU(40," Submit"),e.qZA(),e._uU(41,"\xa0 \xa0"),e.TgZ(42,"button",26),e.NdJ("click",function(){return i.reset()}),e._uU(43," Reset"),e.qZA(),e._uU(44,"\xa0 "),e.qZA()()()()()(),e.YNc(45,Bt,45,11,"div",27)),2&t){const o=e.MAs(6),s=e.MAs(15);e.xp6(1),e.Q6J("ngIf","/operation/rawdata"==i.router.url),e.xp6(13),e.Q6J("ngClass",e.WLB(9,$t,s.valid,s.invalid&&o.submitted))("ngModel",i.searchByType)("multiple",!1)("closeOnSelect",!0),e.xp6(6),e.Q6J("ngIf",s.errors&&o.submitted),e.xp6(1),e.Q6J("ngIf","Device"==i.searchByType),e.xp6(1),e.Q6J("ngIf","Vehicle"==i.searchByType),e.xp6(23),e.Q6J("ngIf",i.rawTable)}},directives:[y.O5,d._Y,d.JL,d.F,Z.w9,d.Q7,y.mk,d.JJ,d.On,Z.xv,d.Fj,d.wO,d.nD,y.sg,d.YN,d.Kr,d.EJ,C._L,C.N9],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}.invalid-feedback[_ngcontent-%COMP%]{font-size:12px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.portno[_ngcontent-%COMP%]{background:#467dac;padding:1px 16px;color:#fff}.entrycard[_ngcontent-%COMP%]{background-color:#d2dedf}.entrydiv[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #9EC6C7;padding:1%!important}.mainpageheader[_ngcontent-%COMP%]{color:#cb5800;text-decoration:none;font-family:Tahoma}.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#101010;color:#06665e}.mendatorynote[_ngcontent-%COMP%]{color:#00008b;font-size:11px;text-align:center}
1.mendatorystar[_ngcontent-%COMP%]{color:#be0215}.assignEntry[_ngcontent-%COMP%]{background-color:#d8e1e1;border-bottom:3px solid #286254}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:30px;max-height:30px;height:30px}.card-shimmer[_ngcontent-%COMP%]{position:relative;box-shadow:0 6px 8px #0000001a;background-color:#fff;border-radius:6px;height:290px;overflow:hidden}.shimmerBG[_ngcontent-%COMP%]{animation-duration:2.2s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:shimmer;animation-timing-function:linear;background:#E5F0FB;background:linear-gradient(to right,#cfeeeb 4%,#9ac9c6 25%,#d5f0f0 36%);background-size:1100px 100%}@keyframes shimmer{0%{background-position:-1200px 0}to{background-position:1200px 0}}.media[_ngcontent-%COMP%]{height:110px}.p-32[_ngcontent-%COMP%]{padding:32px}.title-line[_ngcontent-%COMP%]{height:24px;width:100%;margin-bottom:12px;border-radius:20px}.content-line[_ngcontent-%COMP%]{height:8px;width:100%;margin-bottom:16px;border-radius:8px}.end[_ngcontent-%COMP%]{width:40%}.m-t-24[_ngcontent-%COMP%]{margin-top:24px}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();var Wt=b(34236),Kt=b(52821);function Xt(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function ei(n,a){1&n&&(e.TgZ(0,"option",37),e._uU(1,"20"),e.qZA())}function ti(n,a){1&n&&(e.TgZ(0,"option",38),e._uU(1,"50"),e.qZA())}function ii(n,a){1&n&&(e.TgZ(0,"option",39),e._uU(1,"100"),e.qZA())}function ni(n,a){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function oi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",30),e.NdJ("click",function(o){return e.CHM(t),e.oxw().sorting(o,"schoolname")}),e._uU(1,"Customer"),e._UZ(2,"i",31),e.qZA()}}function ai(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",41)(3,"div",42),e._uU(4,"No Record Found"),e.qZA()()()())}function si(n,a){if(1&n&&(e.TgZ(0,"span",46),e._uU(1),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(1),e.hij(" ",""==t.schoolname?"Not Found":t.schoolname," ")}}function ri(n,a){if(1&n&&(e.TgZ(0,"span",46),e._uU(1),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(1),e.hij(" ",""==t.customername?"Not Found":t.customername," ")}}function li(n,a){if(1&n&&(e.TgZ(0,"td"),e.YNc(1,si,2,1,"span",50),e.YNc(2,ri,2,1,"span",50),e._UZ(3,"br"),e.TgZ(4,"span",51),e._uU(5),e.qZA()()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf","school"==t.customertypename||""==t.customertypename),e.xp6(1),e.Q6J("ngIf","customer"==t.customertypename),e.xp6(3),e.Oqu(""==t.customertypename?"":t.customertypename)}}function ci(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.AsE("",""==t.contractorname?"":t.contractorname," ",""==t.contractormobilno||"0"==t.contractormobilno?"":"("+t.contractormobilno+")"," ")}}const di=function(n,a){return{"text-success":n,"text-danger":a}};function pi(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",44),e._uU(2),e.qZA(),e.TgZ(3,"td",45),e._uU(4),e._UZ(5,"br"),e.qZA(),e.YNc(6,li,6,3,"td",9),e.TgZ(7,"td",46),e._uU(8),e._UZ(9,"br"),e.qZA(),e.TgZ(10,"td")(11,"span",47),e._uU(12),e.qZA(),e._UZ(13,"br"),e.YNc(14,ci,2,2,"span",9),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA(),e.TgZ(17,"td",42)(18,"span",48),e._uU(19),e.qZA(),e._uU(20),e.qZA(),e.TgZ(21,"td"),e._uU(22),e.ALo(23,"truncate"),e.qZA(),e.TgZ(24,"td")(25,"span"),e._uU(26),e.ALo(27,"truncate"),e.qZA()(),e.TgZ(28,"td")(29,"p",49),e._uU(30),e.qZA()()()),2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.hij(" ",""==t.vehicleno?"Not Found":t.vehicleno," "),e.xp6(2),e.Q6J("ngIf","101"==i.loginRoleId||"600"==i.loginRoleId),e.xp6(2),e.hij(" ",""==t.deviceimeino?"--":t.deviceimeino," "),e.xp6(4),e.Oqu(""==t.vehicletype?"":t.vehicletype),e.xp6(2),e.Q6J("ngIf","Contracted"==t.vehicletype),e.xp6(2),e.Oqu(""==t.vehiclecategoryname?"Not Found":t.vehiclecategoryname),e.xp6(3),e.Oqu(""==t.noofpanic||"0"==t.noofpanic?"Not Found":t.noofpanic),e.xp6(1),e.hij(" ",""==t.noofseats||"0"==t.noofseats?"Not Found":" - "+t.noofseats," "),e.xp6(2),e.Oqu(""==t.makename?"Not Found":e.xi3(23,13,t.makename,15)),e.xp6(4),e.Oqu(""==t.modelname?"Not Found":e.xi3(27,16,t.modelname,15)),e.xp6(3),e.Q6J("ngClass",e.WLB(19,di,"assign"==t.status,"unassign"==t.status)),e.xp6(1),e.hij(" ",""==t.status?"Not Found":t.status,"")}}function gi(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,pi,31,22,"tr",43),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function mi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",52)(1,"ngb-pagination",53),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Vehicle Details","Click Pageno","Click Event",o.eventmessage)}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}let ui=(()=>{class n{constructor(t,i,o,s,r,c){this.cv=t,this.cs=i,this.loader=o,this.route=s,this.es=r,this.listService=c,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.detailsparam=new u.U,this.pageHeading="Vehicle Details",this.eventmessage="",this.sortDir=1}ngOnInit(){this.Details("")}ngOnChanges(){this.status?(this.vehicleid="",this.detailsparam.status=this.status?this.status:"",this.detailsparam.vehicleid="",this.Details("")):this.vehicleid&&(this.detailsparam.status="",this.status="",this.detailsparam.vehicleid=this.vehicleid?this.vehicleid:"",this.Details(""))}Details(t){try{this.loader.loaderOff()}catch(i){}"all"==t&&(this.detailsparam=new u.U),"showrow"==t&&(this.detailsparam.pageno=1),"search"==t&&(this.detailsparam.pageno=1),"refresh"==t&&(this.status||this.vehicleid?(this.detailsparam.vehicleid=this.vehicleid?this.vehicleid:"",this.detailsparam.status=this.status?this.status:"",this.detailsparam.searchby="",this.detailsparam.pageno=1,this.detailsparam.itemperpage=10):this.detailsparam=new u.U),this.detailsparam.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(this.detailsparam,"customervehicledetails").subscribe(i=>{this.eventmessage=i.entity;try{this.loader.loaderOff()}catch(o){}200==i.statusCode?(this.detailData=i.entity.customervehicledetails,this.totalCount=+i.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):($("#loader").hide(),this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.detailsparam.searchby="")},i=>{this.loader.loaderOff()})}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}downloadDoc(t){let i=new u.U;i.pdfexcel=t,i.pageno="",i.itemperpage="",i.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.es.apiCall(i,"customervehicledetails").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.es.commonFileDownload(this.filePath),this.detailsparam.pdfexcel=""):this.detailsparam.pdfexcel=""})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(v.F0),e.Y36(P.P),e.Y36(z.X))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-vehicle-details"]],inputs:{status:"status",vehicleid:"vehicleid"},features:[e.TTD],decls:73,vars:12,consts:[[1,"d-flex","justify-content-between"],[1,"card-label","mainpageheader"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"card","grid-container"],[1,"card-body","p-3"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[3,"click",4,"ngIf"],[1,"panic-style","text-end"],[1,"pt-1","text-end"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["value","20"],["value","50"],["value","100"],[3,"value"],["colspan","13"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[1,"text-uppercase","fw-bolder"],[1,"text-uppercase"],[1,"fw-bolder"],[1,"panic-style"],[1,"fw-bolder","text-uppercase",2,"font-size","10px",3,"ngClass"],["class","text-uppercase",4,"ngIf"],[1,"mb-0","text-primary","text-small","text-capitalize"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4),e.qZA()()(),e.TgZ(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8),e.YNc(11,Xt,2,3,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"span",11)(14,"label",12),e._uU(15,"Show "),e.TgZ(16,"select",13),e.NdJ("ngModelChange",function(s){return i.detailsparam.itemperpage=s})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam,"Vehicle Details","Select Rows","Change Event",i.eventmessage)}),e.TgZ(17,"option",14),e._uU(18," 10"),e.qZA(),e.YNc(19,ei,2,0,"option",15),e.YNc(20,ti,2,0,"option",16),e.YNc(21,ii,2,0,"option",17),e.YNc(22,ni,2,2,"option",18),e.qZA(),e._uU(23," entries"),e.qZA()(),e.TgZ(24,"span")(25,"button",19),e.NdJ("click",function(){return i.Details("refresh"),i.es.pageDataInfo("",i.detailsparam,"Vehicle Details","Click Refresh","Click Event",i.eventmessage)}),e._UZ(26,"i",20),e.qZA()(),e.TgZ(27,"span")(28,"button",21),e.NdJ("click",function(){return i.downloadDoc("pdf"),i.es.pageDataInfo("",i.detailsparam,"Vehicle Details","Click PDF","Click Event",i.eventmessage)}),e._UZ(29,"i",22),e.qZA(),e.TgZ(30,"button",23),e.NdJ("click",function(){return i.downloadDoc("excel"),i.es.pageDataInfo("",i.detailsparam,"Vehicle Details","Click Excel","Click Event",i.eventmessage)}),e._UZ(31,"i",24),e.qZA()(),e.TgZ(32,"label")(33,"input",25),e.NdJ("ngModelChange",function(s){return i.detailsparam.searchby=s}),e.qZA()(),e.TgZ(34,"button",26),e.NdJ("click",function(){return i.Details("search"),i.es.pageDataInfo("",i.detailsparam,"Vehicle Details","Click Search","Click Event",i.eventmessage)}),e._UZ(35,"span",27),e.qZA()()(),e.TgZ(36,"div",28)(37,"table",29)(38,"thead")(39,"tr")(40,"th"),e._uU(41,"#"),e.qZA(),e.TgZ(42,"th",30),e.NdJ("click",function(s){return i.sorting(s,"vehicleno")}),e._uU(43,"Vehicle No."),e._UZ(44,"i",31),e.qZA(),e.YNc(45,oi,3,0,"th",32),e.TgZ(46,"th",30),e.NdJ("click",function(s){return i.sorting(s,"deviceimeino")}),e._uU(47,"IMEI No."),e._UZ(48,"i",31),e.qZA(),e.TgZ(49,"th",30),e.NdJ("click",function(s){return i.sorting(s,"vehicletype")}),e._uU(50,"Type"),e._UZ(51,"i",31),e.qZA(),e.TgZ(52,"th",30),e.NdJ("click",function(s){return i.sorting(s,"vehiclecategoryname")}),e._uU(53,"Category"),e._UZ(54,"i",31),e.qZA(),e.TgZ(55,"th")(56,"div",33),e._uU(57,"Panic Button"),e.qZA(),e.TgZ(58,"div",34),e._uU(59,"Seats"),e.qZA()(),e.TgZ(60,"th",30),e.NdJ("click",function(s){return i.sorting(s,"makename")}),e._uU(61,"Vehicle Make"),e._UZ(62,"i",31),e.qZA(),e.TgZ(63,"th",30),e.NdJ("click",function(s){return i.sorting(s,"modelname")}
1),e._uU(64,"Vehicle Model"),e._UZ(65,"i",31),e.qZA(),e.TgZ(66,"th",30),e.NdJ("click",function(s){return i.sorting(s,"status")}),e._uU(67,"Status"),e._UZ(68,"i",31),e.qZA()()(),e.YNc(69,ai,5,0,"tbody",9),e.YNc(70,gi,2,1,"tbody",9),e.qZA()(),e.TgZ(71,"div",35),e.YNc(72,mi,2,4,"div",36),e.qZA()()()()()),2&t&&(e.xp6(4),e.hij("\xa0\xa0\xa0",i.pageHeading,""),e.xp6(7),e.Q6J("ngIf",0!=i.totalCount),e.xp6(5),e.Q6J("ngModel",i.detailsparam.itemperpage),e.xp6(3),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(11),e.Q6J("ngModel",i.detailsparam.searchby),e.xp6(12),e.Q6J("ngIf","101"==i.loginRoleId||"600"==i.loginRoleId),e.xp6(24),e.Q6J("ngIf",0==i.totalCount),e.xp6(1),e.Q6J("ngIf",0!=i.totalCount),e.xp6(2),e.Q6J("ngIf",i.totalCount>i.detailsparam.itemperpage))},directives:[y.O5,d.EJ,d.JJ,d.On,d.YN,d.Kr,C._L,d.Fj,y.sg,y.mk,C.N9],pipes:[Kt.W],styles:[""]}),n})();var ie=b(94761);const hi=["actionForm"];function _i(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," (Out Of ",t.totalCount,")Entries")}}function fi(n,a){1&n&&(e.TgZ(0,"option",63),e._uU(1,"20"),e.qZA())}function vi(n,a){1&n&&(e.TgZ(0,"option",64),e._uU(1,"50"),e.qZA())}function bi(n,a){1&n&&(e.TgZ(0,"option",65),e._uU(1,"100"),e.qZA())}function xi(n,a){if(1&n&&(e.TgZ(0,"option",66),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Ci(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",67)(3,"div",68),e._uU(4,"No Record Found"),e.qZA()()()())}const Ti=function(n){return{color:n}},yi=function(n){return{background:n}};function Zi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",70),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA(),e.TgZ(11,"td",68),e._uU(12),e.qZA(),e.TgZ(13,"td",68),e._uU(14),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA(),e.TgZ(17,"td",68),e._uU(18),e.qZA(),e.TgZ(19,"td"),e._uU(20),e.qZA(),e.TgZ(21,"td")(22,"div",71),e._uU(23),e.qZA()(),e.TgZ(24,"td")(25,"div",72)(26,"button",73),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).setData(s)}),e._UZ(27,"i",74),e.qZA()()()()}if(2&n){const t=a.$implicit;e.xp6(2),e.Oqu(t.rowno),e.xp6(2),e.Oqu(""==t.enquiryno?"Not Found":t.enquiryno),e.xp6(2),e.Oqu(""==t.subject?"Not Found":t.subject),e.xp6(2),e.Oqu(""==t.customername?"Not Found":t.customername),e.xp6(2),e.Oqu(""==t.mobileno?"Not Found":t.mobileno),e.xp6(2),e.Oqu(""==t.vehicleno?"-":t.vehicleno),e.xp6(2),e.Oqu(""==t.deviceimeino?"-":t.deviceimeino),e.xp6(2),e.Oqu(""==t.requestedat?"Not Found":t.requestedat),e.xp6(2),e.Oqu(""==t.actiontime?"-":t.actiontime),e.xp6(2),e.Oqu(""==t.message?"-":t.message),e.xp6(2),e.Q6J("ngStyle",e.VKq(14,Ti,"-"==t.actiontaken||"escalated"==t.actiontaken||"Escalated"==t.actiontaken||"approvewaiting"==t.actiontaken||"Approve Waiting"==t.actiontaken||"Reopen"==t.actiontaken||"Open"==t.actiontaken||"Will Take Time"==t.actiontaken||"Pending"==t.actiontaken?"#cb1414":"green")),e.xp6(1),e.hij(" ",""==t.actiontaken?"-":t.actiontaken," "),e.xp6(3),e.s9C("title",t.actiontaken),e.Q6J("ngStyle",e.VKq(16,yi,"escalated"==t.actiontaken||"Escalated"==t.actiontaken||"approvewaiting"==t.actiontaken||"Approve Waiting"==t.actiontaken||"Reopen"==t.actiontaken||"Open"==t.actiontaken||"Will Take Time"==t.actiontaken||"Pending"==t.actiontaken?"#cb1414":"green"))}}function Mi(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Zi,28,18,"tr",69),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function wi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",75)(1,"ngb-pagination",76),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Grievance Page","Click On Pageno Button ","Click Event",o.eventmessage)}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}function Ai(n,a){1&n&&(e.TgZ(0,"ng-option",77),e._uU(1,"Issue Resolved "),e.qZA())}function Ii(n,a){1&n&&(e.TgZ(0,"ng-option",78),e._uU(1,"Reopen "),e.qZA())}function Di(n,a){1&n&&(e.TgZ(0,"ng-option",79),e._uU(1,"Approved Waiting "),e.qZA())}function ki(n,a){1&n&&(e.TgZ(0,"ng-option",80),e._uU(1,"Escalated "),e.qZA())}function qi(n,a){1&n&&(e.TgZ(0,"ng-option",81),e._uU(1,"Will Take Time "),e.qZA())}function Oi(n,a){1&n&&(e.TgZ(0,"small",82),e._uU(1,"Please Select Action"),e.qZA())}function Si(n,a){1&n&&(e.TgZ(0,"small"),e._uU(1,"Please Enter Remark"),e.qZA())}function Fi(n,a){1&n&&(e.TgZ(0,"small"),e._uU(1,"Remark should be 10 to 100 characters"),e.qZA())}function Ni(n,a){if(1&n&&(e.TgZ(0,"span",82),e.YNc(1,Si,2,0,"small",9),e.YNc(2,Fi,2,0,"small",9),e.qZA()),2&n){e.oxw();const t=e.MAs(110);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.minlength)}}const Ui=function(n,a){return{"is-valid":n,"ng-error":a}},Li=function(n,a){return{"has-danger":n,"has-success":a}};let Pi=(()=>{class n{constructor(t,i,o,s,r,c,f){this.cv=t,this.cs=i,this.loader=o,this.route=s,this.es=r,this.listService=c,this.apiService=f,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.detailsparam=new u.R1,this.pageHeading="Grievance Details",this.actionStatus="",this.grievanceFormRequest=new u.XZ,this.eventmessage="",this.sortDir=1,this.oldData=new u.jA}
1ngOnInit(){}Details(t){try{this.loader.loaderOff()}catch(i){}"all"==t&&(this.detailsparam=new u.R1),"showrow"==t&&(this.detailsparam.pageno=1),"search"==t&&(this.detailsparam.pageno=1),"refresh"==t&&(this.detailsparam.searchby="",this.detailsparam.pageno=1,this.detailsparam.itemperpage=10),this.detailsparam.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(this.detailsparam,"enquirydetails").subscribe(i=>{this.eventmessage=i.entity;try{this.loader.loaderOff()}catch(o){}200==i.statusCode?(this.detailData=i.entity.enquirydetails,this.totalCount=+i.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):($("#loader").hide(),this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.detailsparam.searchby=""),this.es.pageDataInfo("",this.detailsparam,"Grievance Page","Details method","Called Function",i.message)},i=>{this.loader.loaderOff(),this.loader.logout()})}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}setData(t){this.oldData=t,$("#actionModal").modal("show"),this.actionForm.resetForm(),this.grievanceFormRequest.id=t.id,this.grievanceFormRequest.enquiryno=t.enquiryno}actionOnEnquiry(){var t=this;return(0,I.Z)(function*(){if(t.actionForm.valid){let i;console.log(t.selectAction),"issue resolved"==t.selectAction.toLowerCase()&&(t.grievanceFormRequest.actiontaken="1"),"reopen"==t.selectAction.toLowerCase()&&(t.grievanceFormRequest.actiontaken="2"),"approved waiting"==t.selectAction.toLowerCase()&&(t.grievanceFormRequest.actiontaken="3"),"escalated"==t.selectAction.toLowerCase()&&(t.grievanceFormRequest.actiontaken="4"),"will take time"==t.selectAction.toLowerCase()&&(t.grievanceFormRequest.actiontaken="5"),i=yield t.apiService.updategrievance(t.grievanceFormRequest),t.loader.responseMessage=i.entity,"200"==i.statusCode?(t.loader.successNotification(),$("#actionModal").modal("hide"),t.Details("")):t.loader.failedNotification(),t.es.pageDataInfo("",t.grievanceFormRequest,"Grievance Page","actionOnEnquiry method","Called Function",i.entity)}})()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(v.F0),e.Y36(P.P),e.Y36(z.X),e.Y36(ie.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-grievance"]],viewQuery:function(t,i){if(1&t&&e.Gf(hi,5),2&t){let o;e.iGM(o=e.CRH())&&(i.actionForm=o.first)}},inputs:{status:"status",vehicleid:"vehicleid"},decls:115,vars:30,consts:[[1,"d-flex","justify-content-between"],[1,"card-label","mainpageheader"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"card","grid-container"],[1,"card-body","p-3"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-head","d-flex","justify-content-between"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange","change"],["value","10","selected",""],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"click"],["aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],[1,"scroll-tbl"],[1,"table","table-striped","table-style",2,"overflow-y","auto","overflow-x","auto"],[3,"click"],[1,"fa","fa-sort-amount-desc"],[1,"text-center",2,"width","78px"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","actionModal","tabindex","-1","role","dialog","aria-labelledby","ModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal
1-sm"],[1,"modal-content"],[1,"modal-header","p-1"],["id","ModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],[1,"modal-body","p-1"],["novalidate","","autocomplete","off"],["actionForm","ngForm"],[1,"row"],[1,"form-group"],[1,"mb-0"],[2,"color","red"],["name","actionName","placeholder","Select action","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["actionCtrl","ngModel"],["value","Issue Resolved",4,"ngIf"],["value","Reopen",4,"ngIf"],["value","Approve Waiting",4,"ngIf"],["value","Escalated",4,"ngIf"],["value","Will Take Time",4,"ngIf"],["class","text-danger text-small",4,"ngIf"],[1,"form-group","mb-0",3,"ngClass"],[1,"deleteLabel"],["id","deletefield","autocomplete","off","type","text","placeholder","Enter Your Remark","name","resolved","required","",1,"form-control",3,"ngModel","ngModelChange"],["resolvedCtrl","ngModel"],[1,"col-md-12","text-center","mt-3"],["type","submit",1,"btn","btn-sm","btn-danger","float-right","p-1",3,"click"],["value","20"],["value","50"],["value","100"],[3,"value"],["colspan","12"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[3,"ngStyle"],[1,"action-section","text-center"],["id","updatesidepanel","type","button","data-toggle","tooltip","data-placement","top",1,"btn","btn-successbtn-sm","p-1","me-2",2,"border","1px solid #06665e",3,"ngStyle","title","click"],["aria-hidden","true",1,"fa","fa-pencil",2,"color","white"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["value","Issue Resolved"],["value","Reopen"],["value","Approve Waiting"],["value","Escalated"],["value","Will Take Time"],[1,"text-danger","text-small"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h5",1),e._UZ(3,"i",2),e._uU(4),e.qZA()()(),e.TgZ(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8),e.YNc(11,_i,2,3,"span",9),e.qZA(),e.TgZ(12,"div",10)(13,"span",11)(14,"label",12),e._uU(15,"Show "),e.TgZ(16,"select",13),e.NdJ("ngModelChange",function(s){return i.detailsparam.itemperpage=s})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam,"Grievance Page","Select Rows","Change Event",i.eventmessage)}),e.TgZ(17,"option",14),e._uU(18," 10"),e.qZA(),e.YNc(19,fi,2,0,"option",15),e.YNc(20,vi,2,0,"option",16),e.YNc(21,bi,2,0,"option",17),e.YNc(22,xi,2,2,"option",18),e.qZA(),e._uU(23," entries"),e.qZA()(),e.TgZ(24,"span")(25,"button",19),e.NdJ("click",function(){return i.Details("refresh"),i.es.pageDataInfo("",i.detailsparam,"Grievance Page","Click On Refresh ","Click Event",i.eventmessage)}),e._UZ(26,"i",20),e.qZA()(),e.TgZ(27,"span")(28,"button",21),e._UZ(29,"i",22),e.qZA(),e.TgZ(30,"button",23),e._UZ(31,"i",24),e.qZA()(),e.TgZ(32,"label")(33,"input",25),e.NdJ("ngModelChange",function(s){return i.detailsparam.searchby=s}),e.qZA()(),e.TgZ(34,"button",26),e.NdJ("click",function(){return i.Details("search"),i.es.pageDataInfo("",i.detailsparam,"Grievance Page","Click On Search Button ","Click Event",i.eventmessage)}),e._UZ(35,"span",27),e.qZA()()(),e.TgZ(36,"div",28)(37,"table",29)(38,"thead")(39,"tr")(40,"th"),e._uU(41,"#"),e.qZA(),e.TgZ(42,"th",30),e.NdJ("click",function(s){return i.sorting(s,"enquiryno")}),e._uU(43,"Enquiry No"),e._UZ(44,"i",31),e.qZA(),e.TgZ(45,"th",30),e.NdJ("click",function(s){return i.sorting(s,"subject")}),e._uU(46,"Request For"),e._UZ(47,"i",31),e.qZA(),e.TgZ(48,"th",30),e.NdJ("click",function(s){return i.sorting(s,"customername")}),e._uU(49,"Request By"),e._UZ(50,"i",31),e.qZA(),e.TgZ(51,"th",30),e.NdJ("click",function(s){return i.sorting(s,"mobileno")}),e._uU(52,"Mobile No."),e._UZ(53,"i",31),e.qZA(),e.TgZ(54,"th",30),e.NdJ("click",function(s){return i.sorting(s,"vehicleno")}),e._uU(55,"Vehicle No."),e._UZ(56,"i",31),e.qZA(),e.TgZ(57,"th",30),e.NdJ("click",function(s){return i.sorting(s,"deviceimeino")}),e._uU(58,"IMEI No."),e._UZ(59,"i",31),e.qZA(),e.TgZ(60,"th",30),e.NdJ("click",function(s){return i.sorting(s,"requestedat")}),e._uU(61,"Requested At"),e._UZ(62,"i",31),e.qZA(),e.TgZ(63,"th",30),e.NdJ("click",function(s){return i.sorting(s,"actiontime")}),e._uU(64,"Response At"),e._UZ(65,"i",31),e.qZA(),e.TgZ(66,"th"),e._uU(67,"Remark"),e.qZA(),e.TgZ(68,"th"),e._uU(69,"Status"),e.qZA(),e.TgZ(70,"th",32),e._uU(71,"Action"),e.qZA()()(),e.YNc(72,Ci,5,0,"tbody",9),e.YNc(73,Mi,2,1,"tbody",9),e.qZA()(),e.TgZ(74,"div",33),e.YNc(75,wi,2,4,"div",34),e.qZA()()()()(),e.TgZ(76,"div",35)(77,"div",36)(78,"div",37)(79,"div",38)(80,"h5",39),e._uU(81,"Action On Enquiry"),e.qZA(),e.TgZ(82,"button",40)(83,"span",41),e._uU(84,"\xd7"),e.qZA()()(),e.TgZ(85,"div",42)(86,"form",43,44)(88,"div",45)(89,"div",6)(90,"div",46)(91,"label",47),e._uU(92,"Action"),e.TgZ(93,"span",48),e._uU(94,"*"),e.qZA()(),e.TgZ(95,"ng-select",49,50),e.NdJ("ngModelChange",function(s){return i.selectAction=s}),e.YNc(97,Ai,2,0,"ng-option",51),e.YNc(98,Ii,2,0,"ng-option",52),e.YNc(99,Di,2,0,"ng-option",53),e.YNc(100,ki,2,0,"ng-option",54),e.YNc(101,qi,2,0,"ng-option",55),e.qZA(),e.YNc(102,Oi,2,0,"small",56),e.qZA()(),e.TgZ(103,"div",6)(104,"div",57)(105,"label",58),e._uU(106,"Remark"),e.TgZ(107,"span",48),e._uU(108,"*"),e.qZA()(),e.TgZ(109,"textarea",59,60),e.NdJ("ngModelChange",function(s){return i.grievanceFormRequest.remarks=s}),e.qZA(),e.YNc(111,Ni,3,2,"span",56),e.qZA()(),e.TgZ(112,"div",61)(113,"button",62),e.NdJ("click",function(){return i.actionOnEnquiry()}),e._uU(114,"Submit"),e.qZA()()()()()()()()),2&t){const o=e.MAs(87),s=e.MAs(96),r=e.MAs(110);e.xp6(4),e.hij("\xa0\xa0\xa0",i.pageHeading,""),e.xp6(7),e.Q6J("ngIf",0!=i.totalCount),e.xp6(5),e.Q6J("ngModel",i.detailsparam.itemperpage),e.xp6(3),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(11),e.Q6J("ngModel",i.detailsparam.searchby),e.xp6(39),e.Q6J("ngIf",0==i.totalCount),e.xp6(1),e.Q6J("ngIf",0!=i.totalCount),e.xp6(2),e.Q6J("ngIf",i.totalCount>
1i.detailsparam.itemperpage),e.xp6(20),e.Q6J("ngClass",e.WLB(24,Ui,s.valid,s.invalid&&o.submitted))("ngModel",i.selectAction)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngIf","Issue Resolved"!=i.actionStatus),e.xp6(1),e.Q6J("ngIf","Issue Resolved"==i.actionStatus),e.xp6(1),e.Q6J("ngIf","Approve Waiting"!=i.actionStatus&&"Reopen"!=i.actionStatus),e.xp6(1),e.Q6J("ngIf","Escalated"!=i.actionStatus),e.xp6(1),e.Q6J("ngIf","Will Take Time"!=i.actionStatus),e.xp6(1),e.Q6J("ngIf",s.invalid&&o.submitted),e.xp6(2),e.Q6J("ngClass",e.WLB(27,Li,r.invalid&&o.submitted,r.valid&&(r.dirty||r.touched))),e.xp6(5),e.Q6J("ngModel",i.grievanceFormRequest.remarks),e.xp6(2),e.Q6J("ngIf",r.invalid&&o.submitted)}},directives:[y.O5,d.EJ,d.JJ,d.On,d.YN,d.Kr,C._L,d.Fj,y.sg,y.PC,C.N9,d._Y,d.JL,d.F,Z.w9,d.Q7,y.mk,Z.xv],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.invalid-feedback[_ngcontent-%COMP%]{font-size:10px!important;color:#dc3545!important}input[_ngcontent-%COMP%]{font-size:12px}"]}),n})();var X=b(55920),de=b(81779),K=b(74169),_e=b(67429),fe=b(88246);const Ji=["masterForm"],Vi=["f"];function Ri(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",91),e.NdJ("click",function(){return e.CHM(t),e.oxw().goBackToDashboard()}),e._UZ(1,"i",92),e._uU(2," Back "),e.qZA()}}function Qi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",93),e.NdJ("click",function(){return e.CHM(t),e.oxw().showForm("add")}),e._UZ(1,"i",94),e._uU(2," New Entry "),e.qZA()}}function Ei(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",95),e.NdJ("click",function(){return e.CHM(t),e.oxw().showForm("details")}),e._UZ(1,"i",96),e._uU(2," Details "),e.qZA()}}function Yi(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function ji(n,a){1&n&&(e.TgZ(0,"div",119),e._uU(1," Distributor selection is required. "),e.qZA())}function Hi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",33)(1,"div",114)(2,"label",115),e._uU(3," Select Distributor"),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",116),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).distributorObj=o})("change",function(){e.CHM(t);const o=e.oxw(2);return o.getDealerList(),o.getFreeDeviceList()}),e.YNc(7,Yi,2,2,"ng-option",105),e.qZA(),e.YNc(8,ji,2,0,"div",117),e.qZA()()}if(2&n){const t=e.oxw(2),i=e.MAs(14);e.xp6(6),e.Q6J("ngModel",t.distributorObj),e.xp6(1),e.Q6J("ngForOf",t.distributorList),e.xp6(1),e.Q6J("ngIf",i.submitted&&!t.distributorObj)}}function zi(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Bi(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Dealer is mandatory"),e.qZA())}function $i(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Bi,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(6);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}const Q=function(n,a){return{"is-valid":n,"ng-error":a}};function Gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",33)(1,"div",101)(2,"label",102),e._uU(3,"Dealer "),e.qZA(),e._uU(4,"\xa0 "),e.TgZ(5,"ng-select",120,121),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).dealerObj=o})("change",function(){return e.CHM(t),e.oxw(2).getFreeDeviceList()}),e.YNc(7,zi,2,2,"ng-option",105),e.qZA(),e.YNc(8,$i,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(6),i=e.oxw(2),o=e.MAs(14);e.xp6(5),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.dealerObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.dealerList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function Wi(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.deviceimeino," ")}}function Ki(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Device is mandatory"),e.qZA())}function Xi(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Ki,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(15);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function en(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",111),e._uU(2,"M2M provider"),e.qZA(),e.TgZ(3,"td",112),e._uU(4),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(4),e.Oqu(""!=t.deviceDetails.m2mprovidername?t.deviceDetails.m2mprovidername:"--")}}function tn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",14)(2,"div",98)(3,"h6",99),e._uU(4,"Device Details "),e.qZA()(),e.YNc(5,Hi,9,3,"div",100),e.YNc(6,Gi,9,9,"div",100),e.TgZ(7,"div",33)(8,"div",101)(9,"label",102),e._uU(10,"Device "),e.TgZ(11,"span",77),e._uU(12,"*"),e.qZA()(),e._uU(13,"\xa0 "),e.TgZ(14,"ng-select",103,104),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().deviceObj=o})("change",function(){return e.CHM(t),e.oxw().getDeviceDetails()}),e.YNc(16,Wi,2,2,"ng-option",105),e.qZA(),e.YNc(17,Xi,2,1,"span",106),e.qZA()(),e.TgZ(18,"div",33)(19,"div",107)(20,"table",108)(21,"tbody")(22,"tr",109)(23,"td",110),e._uU(24),e.qZA()(),e.TgZ(25,"tr")(26,"td",111),e._uU(27,"Vendor"),e.qZA(),e.TgZ(28,"td",112),e._uU(29),e.qZA()(),e.TgZ(30,"tr")(31,"td",111),e._uU(32,"Device Model"),e.qZA(),e.TgZ(33,"td",112),e._uU(34),e.qZA()(),e.TgZ(35,"tr")(36,"td",111),e._uU(37,"Device Serial No."),e.qZA(),e.TgZ(38,"td",112),e._uU(39),e.qZA()(),e.TgZ(40,"tr")(41,"td",111),e._uU(42,"IMEI No."),e.qZA(),e.TgZ(43,"td",112),e._uU(44),e.qZA()()()(),e.TgZ(45,"table",113)(46,"tbody")(47,"tr",109)(48,"td",110),e._uU(49," SIM Details "),e.qZA()(),e.TgZ(50,"tr")(51,"td",111),e._uU(52,"ICCID No."),e.qZA(),e.TgZ(53,"td",112),e._uU(54),e.qZA()(),e.YNc(55,en,5,1,"tr",58),e.TgZ(56,"tr")(57,"td",111),e._uU(58,"Primary Network"),e.qZA(),e.TgZ(59,"td",112),e._uU(60),e.qZA()(),e.TgZ(61,"tr")(62,"td",111),e._uU(63,"Secondary Network"),e.qZA(),e.TgZ(64,"td",112),e._uU(65),e.qZA()()()()()()()()}if(2&n){const t=e.MAs(15),i=e.oxw(),o=e.MAs(14);e.xp6(5),e.Q6J("ngIf","110"==i.loginRoleId||"100"==i.loginRoleId||"101"==i.loginRoleId),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag&&"121"!=i.loginRoleId),e.xp6(8),e.Q6J("ngClass",e.WLB(20,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.deviceObj)("multiple",!1)("closeOnSelect",!0)("disabled",1==i.updateFlag),e.xp6(2),e.Q6J("ngForOf",i.unassignedDeviceList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted)),e.xp6(7),e.hij(" Device Details ",""==i.deviceDetails.devicetype?"":"["+i.deviceDetails.devicetype+"]"," "),e.xp6(5),e.Oqu(""!=i.deviceDetails.vendorname?i.deviceDetails.vendorname:"--"),e.xp6(5),e.Oqu(""!=i.deviceDetails.devicemodelname?i.deviceDetails.devicemodelname:"--"),e.xp6(5),e.Oqu(""==i.deviceDetails.deviceuniqueno||"null"==i.deviceDetails.deviceuniqueno?"--":i.deviceDetails.deviceuniqueno),e.xp6(
15),e.Oqu(""!=i.deviceDetails.deviceimeino?i.deviceDetails.deviceimeino:"--"),e.xp6(10),e.Oqu(""!=i.deviceDetails.deviceiccidno?i.deviceDetails.deviceiccidno:"--"),e.xp6(1),e.Q6J("ngIf","AIS-140"==i.deviceDetails.devicetype),e.xp6(5),e.AsE("",""!=i.deviceDetails.networkname1?i.deviceDetails.networkname1:"--"," ","0"==i.deviceDetails.msisdnno1?"":i.deviceDetails.msisdnno1," "),e.xp6(5),e.AsE("",""!=i.deviceDetails.networkname2?i.deviceDetails.networkname2:"--"," ","0"==i.deviceDetails.msisdnno2?"":i.deviceDetails.msisdnno2," ")}}function nn(n,a){1&n&&(e.TgZ(0,"div",98)(1,"h6",99),e._uU(2,"Vehicle Details "),e.qZA()())}function on(n,a){if(1&n&&(e.TgZ(0,"ng-option",127),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("disabled",1==i.updateFlag)("value",t),e.xp6(1),e.hij("",t.name," ")}}function an(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"RTO is mandatory"),e.qZA())}function sn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,an,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(8);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function rn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"RTO "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e._uU(6,"\xa0 "),e.TgZ(7,"ng-select",124,125),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().rtoObj=o}),e.YNc(9,on,2,3,"ng-option",126),e.qZA(),e.YNc(10,sn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(8),i=e.oxw(),o=e.MAs(14);e.xp6(7),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.rtoObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.rtoList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function ln(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t," ")}}function cn(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Vehicle type is mandatory"),e.qZA())}function dn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,cn,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function pn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Type "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",128,129),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleTypeObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.onChangeVehicleType(o.vehicleTypeObj)}),e.YNc(8,ln,2,2,"ng-option",105),e.qZA(),e.YNc(9,dn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngClass",e.WLB(7,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.vehicleTypeObj)("multiple",!1)("closeOnSelect",!0)("clearable",!1),e.xp6(2),e.Q6J("ngForOf",i.vehicleTypeList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function gn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Vehicle no. is mandatory"),e.qZA())}function mn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1," Vehicle no. should be 9 to 10 character long. "),e.qZA())}function un(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,gn,2,0,"span",58),e.YNc(2,mn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.minlength)||(null==t.errors?null:t.errors.maxlength))}}const Y=function(n,a){return{"is-valid":n,"is-invalid":a}};function hn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Number "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",130,131),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.vehicleno=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.alphanumeric(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.vehicleno,o.masterFormRequest.vehicleno,"Vehicle Master","Entered Vehicle Number","Focus Out Event","")}),e.qZA(),e.YNc(8,un,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.vehicleno)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function _n(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Vehicle no. is mandatory"),e.qZA())}function fn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1," Vehicle no. should be 9 to 10 character long. "),e.qZA())}function vn(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,_n,2,0,"span",58),e.YNc(2,fn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(5);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.minlength)||(null==t.errors?null:t.errors.maxlength))}}function bn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Number "),e.qZA(),e.TgZ(4,"input",134,131),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.vehicleno=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.alphanumeric(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.vehicleno,o.masterFormRequest.vehicleno,"Vehicle Master","Entered Vehicle Number","Focus Out Event","")}),e.qZA(),e.YNc(6,vn,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(5),i=e.oxw(),o=e.MAs(14);e.xp6(4),e.Q6J("ngModel",i.masterFormRequest.vehicleno)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function xn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Chassis no. is mandatory"),e.qZA())}function Cn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1," Chassis no. should be 6 to 30 character long. "),e.qZA())}function Tn(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,xn,2,0,"span",58),e.YNc(2,Cn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.minlength)||(null==t.errors?null:t.errors.maxlength))}}function yn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Chassis Number "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",135,136),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.chassisno=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.alphanumeric(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.chassisno,o.masterFormRequest.chassisno,"Vehicle Master","Entered Chassis Number","Focus Out Event","")}),e.qZA(),e.YNc(8,Tn,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.chassisno)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function Zn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Engine no. is mandatory"),e.qZA())}function Mn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1," Engine no. should be 5 to 25 character long. "),e.qZA())}function wn(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,Zn,2,0,"span",58),e.YNc(2,Mn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.minlength)||(null==t.errors?null:t.errors.maxlength))}}function An(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Engine Number "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",137,138),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.engineno=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.alphanumeric(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.engineno,o.masterFormRequest.engineno,"Vehicle Master","Entered Engine Number","Focus Out Event","")}),e.qZA(),e.YNc(8,wn,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.engineno)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function In(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Dn(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Vehicle make is mandatory"),e.qZA())}function kn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Dn,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function qn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Make "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",139,140),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleMakeObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.getVehicleModelList(),o.es.pageDataInfo(o.oldData.makeid,o.vehicleMakeObj.name,"Vehicle Master","","Change Event","")}),e.YNc(8,In,2,2,"ng-option",105),e.qZA(),e.YNc(9,kn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.vehicleMakeObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.vehicleMakeList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function On(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Sn(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Vehicle model is mandatory"),e.qZA())}function Fn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Sn,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function Nn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Model "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",141,142),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleModelObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.modelid,o.vehicleModelObj.name,"Vehicle Master","","Change Event","")}),e.YNc(8,On,2,2,"ng-option",105),e.qZA(),e.YNc(9,Fn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.vehicleModelObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.vehicleModelList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function Un(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t.name," ")}}function Ln(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"Vehicle class is mandatory"),e.qZA())}function Pn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Ln,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function Jn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Class "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",143,144),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleClassObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.categoryid,o.vehicleClassObj.name,"Vehicle Master","","Change Event","")}),e.YNc(8,Un,2,2,"ng-option",105),e.qZA(),e.YNc(9,Pn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.vehicleClassObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.vehicleClassList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function Vn(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t," ")}}function Rn(n,a){1&n&&(e.TgZ(0,"span",76),e._uU(1,"MFG Year is mandatory"),e.qZA())}function Qn(n,a){if(1&n&&(e.TgZ(0,"span",122),e.YNc(1,Rn,2,0,"span",123),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function En(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"MFG Year "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",145,146),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().mfgYearObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.categoryid,o.mfgYearObj.name,"Vehicle Master","","Change Event","")}),e.YNc(8,Vn,2,2,"ng-option",105),e.qZA(),e.YNc(9,Qn,2,1,"span",106),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.mfgYearObj)("multiple",!1)("closeOnSelect",!0),e.xp6(2),e.Q6J("ngForOf",i.mfgYearList),e.xp6(1),e.Q6J("ngIf",t.errors&&(t.dirty||t.touched||o.submitted))}}function Yn(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",t," ")}}function jn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Panic Buttons"),e.qZA(),e.TgZ(4,"ng-select",147,148),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().panicButtonObj=o})("change",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.noofpanic,o.panicButtonObj.name,"Vehicle Master","","Change Event","")}),e.YNc(6,Yn,2,2,"ng-option",105),e.qZA()()()}if(2&n){const t=e.MAs(5),i=e.oxw(),o=e.MAs(14);e.xp6(4),e.Q6J("ngClass",e.WLB(6,Q,t.valid,t.invalid&&o.submitted))("ngModel",i.panicButtonObj)("multiple",!1)("closeOnSelect",!0)("clearable",!0),e.xp6(2),e.Q6J("ngForOf",i.panicButtonList)}}function Hn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Owner name is mandatory"),e.qZA())}function zn(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,Hn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function Bn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",149)(1,"div",101)(2,"label",102),e._uU(3,"Vehicle Owner Name "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",150,151),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.customername=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.addressValidation(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo(o.oldData.customername,o.masterFormRequest.customername,"Vehicle Master","Entered Owner Name","Focus Out Event","")}),e.qZA(),e.YNc(8,zn,2,1,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.customername)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function $n(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Mobile number is mandatory"),e.qZA())}function Gn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1," Mobile number should be 10 digits. "),e.qZA())}function Wn(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,$n,2,0,"span",58),e.YNc(2,Gn,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",(null==t.errors?null:t.errors.minlength)||(null==t.errors?null:t.errors.maxlength))}}function Kn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",102),e._uU(3,"Owner Mobile Number "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",152,153),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.customermobileno=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.onlyNumberKey(o)}),e.qZA(),e.YNc(8,Wn,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.customermobileno)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function Xn(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Email is mandatory."),e.qZA())}function eo(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Enter a valid email address."),e.qZA())}function to(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,Xn,2,0,"span",58),e.YNc(2,eo,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.email)}}function io(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",101)(2,"label",154),e._uU(3,"Email ID "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"input",155,156),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.customeremailid=o}),e.qZA(),e.YNc(8,to,3,2,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.customeremailid)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",t.invalid)}}function no(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Remark is mandatory"),e
1.qZA())}function oo(n,a){if(1&n&&(e.TgZ(0,"div",133),e.YNc(1,no,2,0,"span",58),e.qZA()),2&n){e.oxw();const t=e.MAs(7);e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.required)}}function ao(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",97)(1,"div",114)(2,"label",76),e._uU(3,"Remark "),e.TgZ(4,"span",77),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"textarea",157,158),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().masterFormRequest.remarks=o})("keypress",function(o){return e.CHM(t),e.oxw().cv.addressValidation(o)})("focusout",function(){e.CHM(t);const o=e.oxw();return o.es.pageDataInfo("",o.masterFormRequest.remarks,"Vehicle Master","Entered Remark","Focus Out Event","")}),e.qZA(),e.YNc(8,oo,2,1,"div",132),e.qZA()()}if(2&n){const t=e.MAs(7),i=e.oxw(),o=e.MAs(14);e.xp6(6),e.Q6J("ngModel",i.masterFormRequest.remarks)("ngClass",e.WLB(3,Y,t.valid,t.invalid&&o.submitted)),e.xp6(2),e.Q6J("ngIf",o.invalid)}}function so(n,a){1&n&&(e.TgZ(0,"div",33)(1,"div",98)(2,"h6",99),e._uU(3,"Upload Details "),e.qZA()()())}function ro(n,a){1&n&&e._UZ(0,"i",174)}function lo(n,a){1&n&&e._UZ(0,"i",175)}function co(n,a){1&n&&e._UZ(0,"i",181)}function po(n,a){1&n&&e._UZ(0,"i",175)}function go(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",176)(1,"span",177),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).viewDocuments("RC")}),e.YNc(2,co,1,0,"i",178),e.YNc(3,po,1,0,"i",164),e._uU(4),e.qZA(),e.TgZ(5,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).removeFile("RC")}),e._UZ(6,"i",180),e._uU(7," Remove "),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.ekj("disabled",t.isLoadingViewRC),e.xp6(1),e.Q6J("ngIf",!t.isLoadingViewRC),e.xp6(1),e.Q6J("ngIf",t.isLoadingViewRC),e.xp6(1),e.hij(" View File: ",t.imageFileNameRC," ")}}function mo(n,a){1&n&&e._UZ(0,"i",174)}function uo(n,a){1&n&&e._UZ(0,"i",175)}function ho(n,a){1&n&&e._UZ(0,"i",181)}function _o(n,a){1&n&&e._UZ(0,"i",175)}function fo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",176)(1,"span",177),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).viewDocuments("Insurance")}),e.YNc(2,ho,1,0,"i",178),e.YNc(3,_o,1,0,"i",164),e._uU(4),e.qZA(),e.TgZ(5,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).removeFile("Insurance")}),e._UZ(6,"i",180),e._uU(7," Remove "),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.ekj("disabled",t.isLoadingViewInsurance),e.xp6(1),e.Q6J("ngIf",!t.isLoadingViewInsurance),e.xp6(1),e.Q6J("ngIf",t.isLoadingViewInsurance),e.xp6(1),e.hij(" View File: ",t.imageFileNameInsurance," ")}}function vo(n,a){1&n&&e._UZ(0,"i",174)}function bo(n,a){1&n&&e._UZ(0,"i",175)}function xo(n,a){1&n&&e._UZ(0,"i",181)}function Co(n,a){1&n&&e._UZ(0,"i",175)}function To(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",176)(1,"span",177),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).viewDocuments("Invoice")}),e.YNc(2,xo,1,0,"i",178),e.YNc(3,Co,1,0,"i",164),e._uU(4),e.qZA(),e.TgZ(5,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).removeFile("Invoice")}),e._UZ(6,"i",180),e._uU(7," Remove "),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.ekj("disabled",t.isLoadingViewInvoice),e.xp6(1),e.Q6J("ngIf",!t.isLoadingViewInvoice),e.xp6(1),e.Q6J("ngIf",t.isLoadingViewInvoice),e.xp6(1),e.hij(" View File: ",t.imageFileNameInvoice," ")}}function yo(n,a){1&n&&e._UZ(0,"i",174)}function Zo(n,a){1&n&&e._UZ(0,"i",175)}function Mo(n,a){1&n&&e._UZ(0,"i",181)}function wo(n,a){1&n&&e._UZ(0,"i",175)}function Ao(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",176)(1,"span",177),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).viewDocuments("FrontImage")}),e.YNc(2,Mo,1,0,"i",178),e.YNc(3,wo,1,0,"i",164),e._uU(4),e.qZA(),e.TgZ(5,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).removeFile("FrontImage")}),e._UZ(6,"i",180),e._uU(7," Remove "),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.ekj("disabled",t.isLoadingViewFrontImage),e.xp6(1),e.Q6J("ngIf",!t.isLoadingViewFrontImage),e.xp6(1),e.Q6J("ngIf",t.isLoadingViewFrontImage),e.xp6(1),e.hij(" View File: ",t.imageFileNameFrontImage," ")}}function Io(n,a){1&n&&e._UZ(0,"i",174)}function Do(n,a){1&n&&e._UZ(0,"i",175)}function ko(n,a){1&n&&e._UZ(0,"i",181)}function qo(n,a){1&n&&e._UZ(0,"i",175)}function Oo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",176)(1,"span",177),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).viewDocuments("LeftImage")}),e.YNc(2,ko,1,0,"i",178),e.YNc(3,qo,1,0,"i",164),e._uU(4),e.qZA(),e.TgZ(5,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).removeFile("LeftImage")}),e._UZ(6,"i",180),e._uU(7," Remove "),e.qZA()()}if(2&n){const t=e.oxw(3);e.xp6(1),e.ekj("disabled",t.isLoadingViewLeftImage),e.xp6(1),e.Q6J("ngIf",!t.isLoadingViewLeftImage),e.xp6(1),e.Q6J("ngIf",t.isLoadingViewLeftImage),e.xp6(1),e.hij(" View File: ",t.imageFileNameLeftImage," ")}}function So(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",33)(2,"div",14)(3,"div",149)(4,"div",101)(5,"label",159),e._uU(6,"RC File Upload"),e.qZA(),e.TgZ(7,"div",160)(8,"input",161),e.NdJ("change",function(o){return e.CHM(t),e.oxw(2).onFileSelected(o,"RC","RC")}),e.qZA(),e.TgZ(9,"button",162),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.imageFileNameRC&&o.uploadFile("RC")}),e.YNc(10,ro,1,0,"i",163),e.YNc(11,lo,1,0,"i",164),e.qZA()(),e.YNc(12,go,8,5,"div",165),e.TgZ(13,"div",77)(14,"span"),e._uU(15),e.qZA()()()(),e.TgZ(16,"div",149)(17,"div",101)(18,"label",159),e._uU(19,"Insurance Certificate"),e.qZA(),e.TgZ(20,"div",160)(21,"input",166),e.NdJ("change",function(o){return e.CHM(t),e.oxw(2).onFileSelected(o,"Insurance","Insurance")}),e.qZA(),e.TgZ(22,"button",167),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.imageFileNameInsurance&&o.uploadFile("Insurance")}),e.YNc(23,mo,1,0,"i",163),e.YNc(24,uo,1,0,"i",164),e.qZA()(),e.YNc(25,fo,8,5,"div",165),e.TgZ(26,"div",77)(27,"span"),e._uU(28),e.qZA()()()(),e.TgZ(29,"div",149)(30,"div",101)(31,"label",159),e._uU(32,"Sales Invoice"),e.qZA(),e.TgZ(33,"div",160)(34,"input",168),e.NdJ("change",function(o){return e.CHM(t),e.oxw(2).onFileSelected(o,"Invoice","Invoice")}),e.qZA(),e.TgZ(35,"button",169),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.imageFileNameInvoice&&o.uploadFile("Invoice")}
1),e.YNc(36,vo,1,0,"i",163),e.YNc(37,bo,1,0,"i",164),e.qZA()(),e.YNc(38,To,8,5,"div",165),e.TgZ(39,"div",77)(40,"span"),e._uU(41),e.qZA()()()(),e.TgZ(42,"div",149)(43,"div",101)(44,"label",159),e._uU(45,"Upload Front Image :"),e.qZA(),e.TgZ(46,"div",160)(47,"input",170),e.NdJ("change",function(o){return e.CHM(t),e.oxw(2).onFileSelected(o,"FrontImage","FrontImage")}),e.qZA(),e.TgZ(48,"button",171),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.imageFileNameFrontImage&&o.uploadFile("FrontImage")}),e.YNc(49,yo,1,0,"i",163),e.YNc(50,Zo,1,0,"i",164),e.qZA()(),e.YNc(51,Ao,8,5,"div",165),e.TgZ(52,"div",77)(53,"span"),e._uU(54),e.qZA()()()(),e.TgZ(55,"div",149)(56,"div",101)(57,"label",159),e._uU(58,"Upload Left Image :"),e.qZA(),e.TgZ(59,"div",160)(60,"input",172),e.NdJ("change",function(o){return e.CHM(t),e.oxw(2).onFileSelected(o,"LeftImage","LeftImage")}),e.qZA(),e.TgZ(61,"button",173),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.imageFileNameLeftImage&&o.uploadFile("LeftImage")}),e.YNc(62,Io,1,0,"i",163),e.YNc(63,Do,1,0,"i",164),e.qZA()(),e.YNc(64,Oo,8,5,"div",165),e.TgZ(65,"div",77)(66,"span"),e._uU(67),e.qZA()()()()()(),e.BQk()}if(2&n){const t=e.oxw(2);e.xp6(9),e.Q6J("disabled",t.isLoadingRC),e.xp6(1),e.Q6J("ngIf",!t.isLoadingRC),e.xp6(1),e.Q6J("ngIf",t.isLoadingRC),e.xp6(1),e.Q6J("ngIf",t.imageFileNameRC),e.xp6(3),e.Oqu(t.errorMessageForFile),e.xp6(7),e.Q6J("disabled",t.isLoadingInsurance),e.xp6(1),e.Q6J("ngIf",!t.isLoadingInsurance),e.xp6(1),e.Q6J("ngIf",t.isLoadingInsurance),e.xp6(1),e.Q6J("ngIf",t.imageFileNameInsurance),e.xp6(3),e.Oqu(t.errorMessageForFile),e.xp6(6),e.Q6J("disabled",t.isLoadingInvoice),e.xp6(2),e.Q6J("ngIf",!t.isLoadingInvoice),e.xp6(1),e.Q6J("ngIf",t.isLoadingInvoice),e.xp6(1),e.Q6J("ngIf",t.imageFileNameInvoice),e.xp6(3),e.Oqu(t.errorMessageForFile),e.xp6(6),e.Q6J("disabled",t.isLoadingFrontImage),e.xp6(2),e.Q6J("ngIf",!t.isLoadingFrontImage),e.xp6(1),e.Q6J("ngIf",t.isLoadingFrontImage),e.xp6(1),e.Q6J("ngIf",t.imageFileNameFrontImage),e.xp6(3),e.Oqu(t.errorMessageForFile),e.xp6(6),e.Q6J("disabled",t.isLoadingLeftImage),e.xp6(2),e.Q6J("ngIf",!t.isLoadingLeftImage),e.xp6(1),e.Q6J("ngIf",t.isLoadingLeftImage),e.xp6(1),e.Q6J("ngIf",t.imageFileNameLeftImage),e.xp6(3),e.Oqu(t.errorMessageForFile)}}function Fo(n,a){if(1&n&&(e.TgZ(0,"div",14),e.YNc(1,so,4,0,"div",100),e.TgZ(2,"div",33)(3,"div",14),e.YNc(4,So,68,25,"ng-container",58),e.qZA()()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","Update"!=t.buttonName||t.viewfileuploadflag),e.xp6(3),e.Q6J("ngIf","Update"!=t.buttonName||t.viewfileuploadflag)}}function No(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",182),e.NdJ("click",function(){return e.CHM(t),e.oxw().showForm("add")}),e._uU(1,"Reset"),e.qZA()}}function Uo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",183),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.validateBeforeSubmit(o.buttonName)}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.buttonName)}}function Lo(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",183),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.validateUploadFormBeforeSubmit(o.buttonName)}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.buttonName)}}function Po(n,a){1&n&&(e.TgZ(0,"ng-option",184),e._uU(1,"20"),e.qZA())}function Jo(n,a){1&n&&(e.TgZ(0,"ng-option",185),e._uU(1,"50"),e.qZA())}function Vo(n,a){1&n&&(e.TgZ(0,"ng-option",186),e._uU(1,"100"),e.qZA())}function Ro(n,a){if(1&n&&(e.TgZ(0,"ng-option",118),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Qo(n,a){1&n&&(e.TgZ(0,"th",55),e._uU(1,"Device Vendor"),e.qZA())}function Eo(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Distributor"),e.qZA())}function Yo(n,a){1&n&&e._UZ(0,"hr",187)}function jo(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,"Dealer"),e.qZA())}function Ho(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",188)(3,"div",189),e._uU(4,"No Record Found"),e.qZA()()()())}function zo(n,a){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.schoolname?"--":t.schoolname)}}function Bo(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.distributorname?"--":t.distributorname)}}function $o(n,a){1&n&&e._UZ(0,"hr",187)}function Go(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.dealername?"--":t.dealername)}}function Wo(n,a){if(1&n&&e._UZ(0,"img",208),2&n){const t=e.oxw().$implicit,i=e.oxw(2);e.Q6J("src","assets/images/"+i.getVehicleIcon(t.classname),e.LSH)("ngbTooltip",t.classname)}}function Ko(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",209)(1,"div",210)(2,"button",211),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(2);return s.viewDetailsDocument(o),s.toggleDropdown(-1)}),e._uU(3,"View"),e.qZA(),e.TgZ(4,"button",212),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,s=e.oxw(2);return s.ViewDataUpload(o),s.toggleDropdown(-1)}),e._uU(5,"Edit/Upload"),e.qZA()()()}}const Xo=function(n,a){return{"text-success":n,"text-danger":a}};function ea(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.YNc(3,zo,2,1,"td",58),e.TgZ(4,"td",191),e._uU(5),e._UZ(6,"br"),e._uU(7),e.qZA(),e.TgZ(8,"td"),e._uU(9),e.qZA(),e.TgZ(10,"td")(11,"span",192),e._uU(12),e.qZA(),e._UZ(13,"br"),e.TgZ(14,"span",192),e._uU(15),e.qZA()(),e.TgZ(16,"td"),e.YNc(17,Bo,2,1,"span",58),e.YNc(18,$o,1,0,"hr",59),e.YNc(19,Go,2,1,"span",58),e.qZA(),e.TgZ(20,"td"),e._uU(21),e._UZ(22,"br"),e._uU(23),e.qZA(),e.TgZ(24,"td"),e.YNc(25,Wo,1,2,"img",193),e.qZA(),e.TgZ(26,"td",192),e._uU(27),e._UZ(28,"hr",187),e._uU(29),e.qZA(),e.TgZ(30,"td")(31,"div"),e._uU(32),e.qZA(),e.TgZ(33,"div",194),e._uU(34),e.qZA()(),e.TgZ(35,"td")(36,"div"),e._uU(37),e.qZA(),e.TgZ(38,"div",194),e._uU(39),e.qZA()(),e.TgZ(40,"td")(41,"p",195),e._uU(42),e.qZA()(),e.TgZ(43,"td",189)(44,"span",196),e._uU(45),e.qZA()(),e.TgZ(46,"td")(47,"div",197)(48,"div",198)(49,"button",199),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).openCertificatePage(s)}),e._UZ(50,"i",200),e.qZA()(),e.TgZ(51,"div",201)(52,"button",202),e.NdJ("click",function(){const s=e.CHM(t).index;return e.oxw(2).toggleDropdown(s)}),e._UZ(53,"i",203),e.qZA(),e.YNc(54,Ko,6,0,"div",204),e.qZA(),e.TgZ(55,"div",198)(56,"button",205),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).setData(s)}),e._UZ(57,"i",17),e.qZA()(),e.TgZ(58,"div",198)(59,"button",206),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).showConfirmModal(s.vehicleid)}),e._UZ(60,"i",207),e.qZA()()()()()}if(2&n){const t=a.$implicit,i=a.index,o=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(1),e.Q6J("ngIf","100"==o.loginRoleId),e.xp6(2),e.hij(" ",""==t.vehicleno?"--":t.vehicleno," "),e.xp6(2),e.hij(" ",""==t.deviceimeino?"--":t.deviceimeino," "),e.xp6(2),e.hij(" ",""==t.rtoname?"--":t.rtoname," "),e.xp6(3),e.hij(" ",""==t.customername?"--":t.customername," "),e.xp6(3),e.hij(" ",""==t.customermobileno?"--":t.customermobileno," "),e.xp6(2),e.Q6J("ngIf","100"==o.loginRoleId||"101"==o.loginRoleId||"110"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf","100"==o.loginRoleId||"101"==o.loginRoleId||"110"==o.loginRoleId),e.xp6(1),e.Q6J("ngIf","121"!=o.loginRoleId),e.xp6(2),e.hij(" ",""==t.makename?"--":t.makename,""),e.xp6(2),e.hij(" ",""==t.modelname?"--":t.modelname," "),e.xp6(2),e.Q6J("ngIf",null==t?null:t.classname),e.xp6(2),e.hij(" ",""==t.m2mprovidername?"--":t.m2mprovidername," "),e.xp6(2),e.hij(" ",""==t.deviceiccidno?"--":t.deviceiccidno," "),e.xp6(3),e.hij(" ",""==t.networkname1||"0"==t.networkname1?"--":t.networkname1," "),e.xp6(2),e.hij(" ",""==t.mobileno1||"0"==t.mobileno1?"":t.mobileno1," "),e.xp6(3),e.hij(" ",""==t.networkname2||"0"==t.networkname2?"--":t.networkname2," "),e.xp6(2),e.hij(" ",""==t.mobileno2||"0"==t.mobileno2?"":t.mobileno2," "),e.xp6(2),e.Q6J("ngClass",e.WLB(23,Xo,"assign"==t.status,"unassign"==t.status)),e.xp6(1),e.hij(" ",""==t.status?"--":t.status,""),e.xp6(3),e.Oqu(""==t.noofpanic||"0"==t.noofpanic?"--":t.noofpanic),e.xp6(9),e.Q6J("ngIf",o.dropdownOpenIndex===i)}}function ta(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,ea,61,26,"tr",190),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function ia(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",213)(1,"ngb-pagination",214),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Vehicle Master","Pageno Button","Click Event","")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}function na(n,a){1&n&&(e.TgZ(0,"span",77),e._uU(1,"Remark is mandatory"),e.qZA())}function oa(n,a){if(1&n&&(e.TgZ(0,"div",189),e._UZ(1,"img",215),e.ALo(2,"safe"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("src",e.xi3(2,1,t.viewUploadedDocument,"resourceUrl"),e.LSH)}}function aa(n,a){if(1&n&&(e.TgZ(0,"div",189),e._UZ(1,"embed",216),e.ALo(2,"safe"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("src",e.xi3(2,1,t.viewUploadedDocument,"resourceUrl"),e.uOi)}}function sa(n,a){if(1&n&&(e.ynx(0),e._UZ(1,"object",227),e.ALo(2,"safe"),e.BQk()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("data",e.xi3(2,1,t.RC_path,"resourceUrl"),e.uOi)}}function ra(n,a){1&n&&(e.TgZ(0,"p",228),e._uU(1,"No preview available"),e.qZA())}function la(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,sa,3,4,"ng-container",225),e.YNc(2,ra,2,0,"ng-template",null,226,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.RC_path)("ngIfElse",t)}}function ca(n,a){if(1&n&&(e.ynx(0),e._UZ(1,"object",227),e.ALo(2,"safe"),e.BQk()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("data",e.xi3(2,1,t.Insurance_path,"resourceUrl"),e.uOi)}}function da(n,a){1&n&&(e.TgZ(0,"p",228),e._uU(1,"No preview available"),e.qZA())}function pa(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,ca,3,4,"ng-container",225),e.YNc(2,da,2,0,"ng-template",null,229,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.Insurance_path)("ngIfElse",t)}}function ga(n,a){if(1&n&&(e.ynx(0),e._UZ(1,"object",227),e.ALo(2,"safe"),e.BQk()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("data",e.xi3(2,1,t.Invoice_path,"resourceUrl"),e.uOi)}}function ma(n,a){1&n&&(e.TgZ(0,"p",228),e._uU(1,"No preview available"),e.qZA())}function ua(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,ga,3,4,"ng-container",225),e.YNc(2,ma,2,0,"ng-template",null,230,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.Invoice_path)("ngIfElse",t)}}function ha(n,a){if(1&n&&(e.ynx(0),e._UZ(1,"object",227),e.ALo(2,"safe"),e.BQk()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("data",e.xi3(2,1,t.Front_Image_path,"resourceUrl"),e.uOi)}}function _a(n,a){1&n&&(e.TgZ(0,"p",228),e._uU(1,"No preview available"),e.qZA())}function fa(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,ha,3,4,"ng-container",225),e.YNc(2,_a,2,0,"ng-template",null,231,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.Front_Image_path)("ngIfElse",t)}}function va(n,a){if(1&n&&(e.ynx(0),e._UZ(1,"object",227),e.ALo(2,"safe"),e.BQk()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("data",e.xi3(2,1,t.Left_Image_path,"resourceUrl"),e.uOi)}}function ba(n,a){1&n&&(e.TgZ(0,"p",228),e._uU(1,"No preview available"),e.qZA())}function xa(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,va,3,4,"ng-container",225),e.YNc(2,ba,2,0,"ng-template",null,231,e.W1O),e.qZA()),2&n){const t=e.MAs(3),i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.Left_Image_path)("ngIfElse",t)}}function Ca(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",217)(1,"div",218)(2,"div",219)(3,"h5"),e._UZ(4,"i",220),e._uU(5," View Documents"),e.qZA(),e.TgZ(6,"span",221),e.NdJ("click",function(){return e.CHM(t),e.oxw().closeDocModal()}),e._uU(7,"\xd7"),e.qZA()(),e.TgZ(8,"div",222)(9,"button",223),e.NdJ("click",function(){return e.CHM(t),e.oxw().activeTab="RC"}),e._uU(10,"RC"),e.qZA(),e.TgZ(11,"button",223),e.NdJ("click",function(){return e.CHM(t),e.oxw().activeTab="Insurance"}),e._uU(12,"Insurance"),e.qZA(),e.TgZ(13,"button",223),e.NdJ("click",function(){return e.CHM(t),e.oxw().activeTab="Invoice"}),e._uU(14,"Invoice"),e.qZA(),e.TgZ(15,"button",223),e.NdJ("click",function(){return e.CHM(t),e.oxw().activeTab="FrontImage"}),e._uU(16,"Front Image"),e.qZA(),e.TgZ(17,"button",223),e.NdJ("click",function(){return e.CHM(t),e.oxw().activeTab="LeftImage"}),e._uU(18,"Left Image"),e.qZA()(),e.TgZ(19,"div",224),e.YNc(20,la,4,2,"div",58),e.YNc(21,pa,4,2,"div",58),e.YNc(22,ua,4,2,"div",58),e.YNc(23,fa,4,2,"div",58),e.YNc(24,xa,4,2,"div",58),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(9),e.ekj("active","RC"===t.activeTab),e.xp6(2),e.ekj("active","Insurance"===t.activeTab),e.xp6(2),e.ekj("active","Invoice"===t.activeTab),e.xp6(2),e.ekj("active","FrontImage"===t.activeTab),e.xp6(2),e.ekj("active","LeftImage"===t.activeTab),e.xp6(3),e.Q6J("ngIf","RC"===t.activeTab),e.xp6(1),e.Q6J("ngIf","Insurance"===t.activeTab),e.xp6(1),e.Q6J("ngIf","Invoice"===t.activeTab),e.xp6(1),e.Q6J("ngIf","FrontImage"===t.activeTab),e.xp6(1),e.Q6J("ngIf","LeftImage"===t.activeTab)}}const ve=function(n){return{display:n}};class Ta{constructor(){this.RCupload="",this.Insuranceupload="",this.Invoiceupload="",this.FrontImageupload="",this.LeftImageupload=""}}class ya{constructor(){this.filename="",this.pageurl="",this.pagename="",this.rcfileid="",this.vehicleid="",this.insurancefileid="",this.saleinvoicefileid="",this.frontfileid="",this.sidefileid=""}}let Za=(()=>{class n{constructor(t,i,o,s,r,c,f,D,w){this.cv=t,this.certificateDataService=i,this.cs=o,this.loader=s,this.activatedRoute=r,this.route=c,this.es=f,this.listService=D,this.cdr=w,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.masterFormRequest=new u.e8,this.updateFilesRequest=new ya,this.buttonName="Submit",this.apiname="",this.formsection=!1,this.detailsparam=new u.qm,this.detailData=[],this.pageHeading="Vehicle & Device Mapping Details",this.updateFlag=!1,this.deleteremark="",this.vehicleMakeList=[],this.vehicleModelList=[],this.vehicleClassList=[],this.panicButtonObj=1,this.panicButtonList=[1,2,3,4,5,6,7,8,9,10,11,12,13],this.distributorList=[],this.unassignedDeviceList=[],this.deviceDetails=new K.QU,this.vehicleTypeList=["OLD","NEW"],this.customerList=[],this.customerTypeList=[],this.customerType="",this.redirectFlag=!1,this.roleList=[],this.mfgYearList=[],this.uploadClass=new Ta,this.isFromDashboard=!1,this.ownerofficialemailid="",this.isLoadingRC=!1,this.isLoadingViewRC=!1,this.isLoadingInsurance=!1,this.isLoadingViewInsurance=!1,this.isLoadingViewInvoice=!1,this.isLoadingInvoice=!1,this.isLoadingFrontImage=!1,this.isLoadingViewFrontImage=!1,this.isLoadingViewLeftImage=!1,this.isLoadingLeftImage=!1,this.rtoList=[],this.tacFile=".pdf",this.copFile=".pdf",this.protocolFile=".pdf",this.devicephoto_path="",this.tac_cert_path="",this.tac_cert_String=null,this.cop_cert_path="",this.protocol_path="",this.updatetac_cert_path="",this.updatecop_cert_path="",this.updateprotocol_path="",this.viewfileuploadflag=!1,this.vehicleIconMap={Taxi:"taxi-app.png","Maxi Cab":"taxi-app.png","Luxury Cab":"taxi-app.png","Motor Cab":"taxi-app.png",Bus:"bus.png","Bus TR":"bus.png","School Bus":"schoolbus.png","Educational Institution Bus":"schoolbus.png","Mini Bus":"schoolbus.png",Car:"car.png",Bolero:"car.png",HardTop:"car.png",Van:"van.png","Mini Van":"van.png","Pickup Van":"van.png","School Van":"van.png","Camper Van":"van.png",Scooter:"motorcycle.png","M-Cycle":"motorcycle.png","Electric Scooty":"motorcycle.png","Goods Carrier":"goodscarrier.png","Good Carrier T":"goodscarrier.png",Truck:"goodscarrier.png",LGV:"goodscarrier.png","CABIN GOODS":"goodscarrier.png",Ambulance:"ambulance.png",Tractor:"tractor.png","Agricultural Tractor":"tractor.png",Harvesher:"tractor.png",JCB:"jcb.png","Poclain Excavator Machine":"jcb.png","Earth Moving Equipment":"jcb.png","Construction Equipment Vehice":"jcb.png","Construction Squarer":"jcb.png",Crane:"crane.png","Crane Mounted vehicle NT":"crane.png",Trailer:"trailer.png",Tipper:"trailer.png","Dummper T":"trailer.png","Articulated Vehicle":"trailer.png","Oil Tanker":"tanker.png","Water Tanker":"tanker.png","LPG GAS TANKER":"tanker.png","EXPLOSIVE VAN":"explosive.png"},this.validateBeforeSubmit=x=>{this.masterForm.valid&&this.Submit(x)},this.validateUploadFormBeforeSubmit=x=>{this.masterForm.valid&&this.subm
1itUploadFrom()},this.oldData=new u.Qr,this.imeiNo="",this.fitnessImageSpaceContains=!1,this.isFitnessValidFileType=!1,this.errorMessageForFitnessFile="",this.isFitnessFileUploaded="",this.fitnessImageString="",this.insuranceImageSpaceContains=!1,this.isInsuranceValidFileType=!1,this.errorMessageForInsuranceFile="",this.isInsuranceFileUploaded="",this.insuranceImageString="",this.RCImageSpaceContains=!1,this.isRCValidFileType=!1,this.errorMessageForRCFile="",this.isRCFileUploaded="",this.rcImageString="",this.FrontImageSpaceContains=!1,this.isFrontImageFileType=!1,this.errorMessageForFrontImageFile="",this.isFrontImageFileUploaded="",this.FrontImageImageString="",this.LeftImageSpaceContains=!1,this.isLeftImageFileType=!1,this.errorMessageForLeftImageFile="",this.isLeftImageFileUploaded="",this.LeftImageImageString="",this.fileUploadReq=new u.bS,this.isImageFile=!1,this.isDocumentModalOpen=!1,this.activeTab="tac",this.deviceDetailsData=new u.BM,this.sortDir=1,this.imageSpaceContains=!0,this.isValidFileType=!1,this.errorMessageForFile="",this.imageFileName="",this.imageExtension="",this.isValidFileTypeRC=!1,this.isValidFileTypeInsurance=!1,this.isValidFileTypeInvoice=!1,this.isValidFileTypeFrontImage=!1,this.isValidFileTypeLeftImage=!1,this.imageSpaceContainsRC=!1,this.imageSpaceContainsInsurance=!1,this.imageSpaceContainsInvoice=!1,this.imageSpaceContainsFrontImage=!1,this.imageSpaceContainsLeftImage=!1,this.certificateNumber="",this.currentDate=new Date,this.technicianName="John Doe",this.viewFileDetails=new u.xI,this.Insurance_path="",this.RC_path=null,this.Invoice_path="",this.Front_Image_path="",this.Left_Image_path="",this.onclickeventmessage="",this.dropdownOpenIndex=null}ngOnInit(){this.vehicleTypeObj="OLD",this.getMFGYearList(),this.getRTOList(),("110"==this.loginRoleId||"100"==this.loginRoleId||"101"==this.loginRoleId)&&this.getDistributorList(),"111"==this.loginRoleId&&this.getDealerList(),"121"==this.loginRoleId&&this.getFreeDeviceList(),this.activatedRoute.queryParams.subscribe(t=>{this.isFromDashboard="true"===t.fromDashboard;const i=t.status,o=t.filter3,s=t.searchby;this.isFromDashboard&&s?(this.detailsparam.searchby=s,this.detailsparam.filter3=o,setTimeout(()=>{this.Details("")},100)):this.isFromDashboard&&"vehicleclasswise"===i&&o?(this.detailsparam.status=i,this.detailsparam.filter3=o,setTimeout(()=>{this.Details("")},100)):this.isFromDashboard&&(i||o||s)?(this.detailsparam.status=i||"",this.detailsparam.filter3=o||"",this.detailsparam.searchby=s||"",setTimeout(()=>{this.Details("")},100)):this.Details("")})}getDistributorList(){this.listService.getDistributorList(new u.nO).then(t=>{this.distributorList=t,1==this.updateFlag&&this.distributorList.forEach(i=>{this.masterFormRequest.distributorid==i.id&&(this.distributorObj=i,setTimeout(()=>{this.getDealerList()},500))})})}getVehicleIcon(t){return this.vehicleIconMap[t]||"car.png"}goBackToDashboard(){switch(sessionStorage.getItem("loginroleid")){case"110":case"100":this.route.navigate(["/dashboard/stateadmindashboard"]);break;case"101":default:this.route.navigate(["/dashboard/vendordashboard"]);break;case"104":this.route.navigate(["/dashboard/rtodashboard"]);break;case"121":this.route.navigate(["/dashboard/dealerdashboard"])}}getRTOList(){var t=this;return(0,I.Z)(function*(){t.rtoList=yield t.listService.getRtoList(new u.nO),t.updateFlag&&t.oldData.rtoid&&(t.rtoObj=t.rtoList.find(i=>String(i.id)===String(t.oldData.rtoid))||null,t.cdr.detectChanges())})()}getDealerList(){var t=this;return(0,I.Z)(function*(){t.dealerList=[],t.dealerObj=null;let i=new u.nO;i.filter1=t.distributorObj?t.distributorObj.id:"",t.listService.getDealerList(i).then(o=>{t.dealerList=o,t.updateFlag&&t.oldData.dealerid&&(t.dealerObj=t.dealerList.find(s=>String(s.id)==String(t.oldData.dealerid))||null,t.cdr.detectChanges())})})()}getMFGYearList(){this.mfgYearList=[];let i=(new Date).getFullYear(),o=i.toString().substr(-2),s=Number(o);var r=i-7;if("OLD"==this.vehicleTypeObj){for(var c=i-s;c<=i;c++)this.mfgYearList.push(c);for(var f=10;f<this.mfgYearList.length;f++)this.mfgYearList.pop();this.mfgYearList.reverse()}else if("NEW"==this.vehicleTypeObj)for(c=i;c>=r;c--)this.mfgYearList.push(c)}getFreeDeviceList(){0==this.updateFlag&&this.es.apiCall({filter1:this.distributorObj?this.distributorObj.id:"",filter2:this.dealerObj?this.dealerObj.id:"",searchBy:"",pageName:"vehicleinstallation",sessionid:"",pageurl:"",status:"vehicledevicemapping"},"list/devicelist").subscribe(i=>{200==i.statusCode?(this.unassignedDeviceList=i.entity.listdetail,this.updateFlag&&this.unassignedDeviceList.forEach(o=>{this.masterFormRequest.deviceid==o.id&&(this.unassignedDeviceListObj=o)})):this.vehicleClassList=[]})}getDeviceList(){let t=new u.nO;1==this.updateFlag&&(t.searchBy=this.imeiNo),this.es.apiCall(t,"list/devicelist").subscribe(i=>{200==i.statusCode?(this.unassignedDeviceList=i.entity.listdetail,(this.updateFlag||this.redirectFlag)&&this.unassignedDeviceList.forEach(o=>{this.updateFlag&&this.masterFormRequest.deviceid==o.deviceid&&(this.deviceObj=o,this.getDeviceDetails())})):this.vehicleClassList=[]})}getVehicleCategoryList(){this.es.apiCall({},"list/vehiclecategorylist").subscribe(t=>{200==t.statusCode?(this.vehicleClassList=t.entity.listdetail,(this.updateFlag||this.redirectFlag)&&this.vehicleClassList.forEach(i=>
1{this.masterFormRequest.classid==i.id&&(this.vehicleClassObj=i)})):this.vehicleClassList=[]})}getVehicleMakeList(){this.es.apiCall({},"list/vehiclemakelist").subscribe(t=>{200==t.statusCode?(this.vehicleMakeList=t.entity.listdetail,this.updateFlag&&this.oldData.makeid&&(this.vehicleMakeObj=this.vehicleMakeList.find(i=>String(i.id)===String(this.oldData.makeid))||null,this.cdr.detectChanges()),(this.updateFlag||this.redirectFlag)&&this.vehicleMakeList.forEach(i=>{this.masterFormRequest.makeid==i.id&&(this.vehicleMakeObj=i,this.getVehicleModelList())})):this.vehicleMakeList=[]})}getVehicleModelList(){this.es.apiCall({vehiclemakeid:this.vehicleMakeObj?this.vehicleMakeObj.id:"",searchBy:""},"list/vehiclemodellist").subscribe(i=>{200==i.statusCode?(this.vehicleModelList=i.entity.listdetail,this.updateFlag&&this.oldData.modelid&&(this.vehicleModelObj=this.vehicleModelList.find(o=>String(o.id)===String(this.oldData.modelid))||null,this.cdr.detectChanges()),(this.updateFlag||this.redirectFlag)&&this.vehicleModelList.forEach(o=>{this.masterFormRequest.modelid==o.id&&(this.vehicleModelObj=o)})):this.vehicleModelList=[]})}getVehicleClassList(){this.es.apiCall({searchBy:""},"list/vehicleclasslist").subscribe(i=>{200==i.statusCode?(this.vehicleClassList=i.entity.listdetail,this.updateFlag&&this.oldData.classid&&(this.vehicleClassObj=this.vehicleClassList.find(o=>String(o.id)===String(this.oldData.classid))||null,this.cdr.detectChanges()),(this.updateFlag||this.redirectFlag)&&this.vehicleClassList.forEach(o=>{this.masterFormRequest.classid==o.id&&(this.vehicleClassObj=o)})):this.vehicleClassList=[]})}showForm(t){if("add"==t){$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(i){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),i.preventDefault()}),setTimeout(()=>{this.masterForm.reset()},700),this.viewfileuploadflag=!1,this.formsection=!0,this.imageFileNameRC="",this.imageFileNameInsurance="",this.imageFileNameInvoice="";try{setTimeout(()=>{this.vehicleTypeObj="OLD"},1e3)}catch(i){}this.updateFlag=!1,this.buttonName="Submit",this.deviceDetails=new K.QU,this.getVehicleMakeList(),this.getVehicleClassList(),this.masterFormRequest=new u.e8,this.masterForm.resetForm()}else this.formsection=!1,this.viewfileuploadflag=!1,$("#form_id")[0].reset(),this.updateFlag=!1,this.Details("")}showDetails(){this.updateFlag=!1,this.formsection=!1,this.pageHeading="Vehicle Master Details"}showConfirmModal(t){this.masterFormRequest.vehicleid=t,this.f.resetForm()}Submit(t){this.masterForm.valid&&(this.apiname="Submit"==t?"master/insertvehicle":"master/updatevehicle",this.masterFormRequest.mfgyear=this.mfgYearObj?this.mfgYearObj:"0",this.masterFormRequest.vehicletype=this.vehicleTypeObj?this.vehicleTypeObj:"0",this.masterFormRequest.classid=this.vehicleClassObj?this.vehicleClassObj.id:"0",this.masterFormRequest.makeid=this.vehicleMakeObj?this.vehicleMakeObj.id:"0",this.masterFormRequest.modelid=this.vehicleModelObj?this.vehicleModelObj.id:"0",this.masterFormRequest.noofpanic=this.panicButtonObj?this.panicButtonObj:"1",this.masterFormRequest.chassisno=""==this.masterFormRequest.chassisno?this.masterFormRequest.vehicleno:this.masterFormRequest.chassisno,this.masterFormRequest.deviceid=this.deviceObj?this.deviceObj.deviceid:"0",this.masterFormRequest.rtoid=this.rtoObj?this.rtoObj.id:"0",this.masterFormRequest.distributorid=this.distributorObj?this.distributorObj.id:"0",this.masterFormRequest.dealerid=this.dealerObj?this.dealerObj.id:"0",this.masterFormRequest.remarks=this.masterFormRequest.remarks?this.masterFormRequest.remarks:"",this.loader.loaderOn(),this.es.apiCall(this.masterFormRequest,this.apiname).subscribe(i=>{this.loader.loaderOff(),this.loader.responseMessage=i.entity,this.es.pageDataInfo(this.oldData,this.masterFormRequest,"Vehicle Master","submit"==t?"Insert Vehicle":"Update Vehicle","Submit Event",i.entity),"200"==i.statusCode?("Update"==this.buttonName&&$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),this.loader.successNotification(),this.masterForm.resetForm(),this.formsection=!1,this.updateFlag=!1,this.pageHeading="Vehicle Master Details",this.deviceDetails=new K.QU,this.buttonName="Submit",this.getFreeDeviceList(),this.Details("")):this.loader.failedNotification()}))}submitUploadFrom(){this.updateFilesRequest.vehicleid=this.masterFormRequest.vehicleid,this.loader.loaderOn(),this.es.apiCall(this.updateFilesRequest,"file/updatevehiclefileid").subscribe(t=>{this.loader.loaderOff(),"200"==t.statusCode?("Update"==this.buttonName&&$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),this.loader.successNotification(),this.masterForm.resetForm(),this.formsection=!1,this.updateFlag=!1,this.pageHeading="Vehicle Master Details",this.deviceDetails=new K.QU,this.buttonName="Submit",this.getFreeDeviceList(),this.Details("")):this.loader.failedNotification()})}Details(t){try{this.loader.loaderOff()}catch(i){}"all"==t&&(this.detailsparam=new u.qm),"showrow"==t&&(this.detailsparam.pageno=1),"search"==t&&(this.detailsparam.pageno=1),"refresh"==t&&(this.detailsparam=new u.qm,this.filterByObj=null,this.cusTypeObj=null,this.customerNameObj=null),this.detailsparam.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(i){}this.es.apiCall(this.detailsparam,`${de.n.vehicleDetails}`).subscribe(i=>{try{this.loader.loaderOff()}catch(o){}200==i.statusCode?(this.detailData=i.entity.vehicledetails,this.totalCount=+i.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):($("#loader").hide(),this.detailData=[],this.recordTo=0,this.recordFrom=0,this.totalCount=0,this.detailsparam.searchby="")},i=>{this.loader.loaderOff()})}setData(t){this.updateFlag=!0,this.viewfileuploadflag=!1,this.oldData=t,$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(i){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),i.preventDefault()}),this.buttonName="Update",this.formsection=!0,this.masterFormRequest.vehicleid=t.vehicleid,this.deviceObj={deviceid:t.deviceid,deviceimeino:t.deviceimeino},this.getDeviceDetails(),this.vehicleTypeObj=t.vehicletype,this.masterFormRequest.vehicleno=t.vehicleno,this.masterFormRequest.chassisno=t.chassisno,this.masterFormRequest.engineno=t.engineno,this.masterFormRequest.customerid=t.customerid,this.masterFormRequest.customername=t.customername,this.masterFormRequest.customermobileno=t.customermobileno,this.masterFormRequest.customeremailid=t.customeremailid,this.masterFormRequest.vehiclefront_fileid=t.vehiclefrontfileid,this.masterFormRequest.vehicleside_fileid=t.vehicleleftfileid,this.masterFormRequest.vehicle_rc_fileid=t.vehiclercfileid,this.masterFormRequest.insurance_fileid=t.insurancecertfileid,this.masterFormRequest.distributorid=t.distributorid,this.masterFormRequest.dealerid=t.dealerid,this.imeiNo=t.deviceimeino,this.masterFormRequest.makeid=t.makeid,this.getVehicleMakeList(),this.masterFormRequest.modelid=t.modelid,this.getVehicleModelList(),this.getMFGYearList(),this.mfgYearObj=this.mfgYearList.find(i=>String(i)==String(t.mfgyear))||null,this.panicButtonObj=this.panicButtonList.find(i=>String(i)===String(t.noofpanic))||null,this.masterFormRequest.classid=t.classid,this.getVehicleClassList(),this.customerType=t.customertypename,setTimeout(()=>{setTimeout(()=>{this.rtoObj=this.rtoList.find(i=>String(i.id)===String(t.rtoid))||null,this.cdr.detectChanges()},300),this.cdr.detectChanges()},300),this.masterFormRequest.deviceid=t.deviceid,setTimeout(()=>{this.getDeviceList()},500),("100"==this.loginRoleId||"101"==this.loginRoleId||"110"==this.loginRoleId)&&this.getDistributorList(),"111"==this.loginRoleId&&this.getDealerList()}ViewDataUpload(t){this.updateFlag=!1,this.viewfileuploadflag=!0,this.oldData=t,$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(i){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),i.preventDefault()}),this.buttonName="Update",this.formsection=!0,this.masterFormRequest.vehicleid=t.vehicleid,this.deviceObj={deviceid:t.deviceid,deviceimeino:t.deviceimeino},this.getDeviceDetails(),this.vehicleTypeObj=t.vehicletype,this.masterFormRequest.vehicleno=t.vehicleno,this.masterFormRequest.chassisno=t.chassisno,this.masterFormRequest.engineno=t.engineno,this.masterFormRequest.customername=t.customername,this.masterFormRequest.customermobileno=t.customermobileno,this.masterFormRequest.makeid=t.makeid,this.getVehicleMakeList(),this.masterFormRequest.modelid=t.modelid,this.getVehicleModelList(),this.mfgYearList.forEach(i=>
1{t.mfgyear==i&&(this.mfgYearObj=i)}),this.panicButtonList.forEach(i=>{t.noofpanic==i&&(this.panicButtonObj=i)}),this.masterFormRequest.classid=t.classid,this.getVehicleClassList(),this.masterFormRequest.modelid=t.modelid,this.getVehicleModelList(),this.customerType=t.customertypename,this.panicButtonList.forEach(i=>{t.noofpanic==i&&(this.panicButtonObj=i)}),this.masterFormRequest.deviceid=t.deviceid,setTimeout(()=>{this.getDeviceList()},500),this.masterFormRequest.vehiclefront_fileid=t.vehiclefrontfileid,this.masterFormRequest.vehicleside_fileid=t.vehicleleftfileid,this.masterFormRequest.vehicle_rc_fileid=t.vehiclercfileid,this.masterFormRequest.insurance_fileid=t.insurancecertfileid}delete(t){let i=this.deleteremark;0==i.length&&(this.deleteremark=""),t.valid&&0!=i.length&&(this.masterFormRequest.remarks=this.deleteremark,this.loader.loaderOn(),this.es.apiCall(this.masterFormRequest,"master/deletevehicle").subscribe(o=>{this.loader.loaderOff(),"200"==o.statusCode?($("#deleteModal").modal("hide"),this.loader.responseMessage=o.entity,this.loader.successNotification(),t.resetForm(),this.showDetail
1s(),this.Details("")):(this.loader.responseMessage=o.entity,this.loader.failedNotification())}))}onFitnessFileSelected(t,i){const o=t.target,s=/\s/;s.test(o.files[0].name),"Fitness"!=i||"application/pdf"!=o.files[0].type&&"image/png"!=o.files[0].type&&"image/jpeg"!=o.files[0].type?(this.fitnessImageSpaceContains=!1,this.isFitnessValidFileType=!0,this.masterFormRequest.saleinvoice_fileid="",this.errorMessageForFitnessFile="File should be in pdf, jpg or jpeg format"):s.test(o.files[0].name)?(this.fitnessImageSpaceContains=!0,this.isFitnessValidFileType=!1,this.errorMessageForFitnessFile="File name should not contain space"):(o.files&&o.files.length>0&&(this.imageFile=o.files[0],this.convertToByteString(i)),this.isFitnessValidFileType=!1,this.fitnessImageSpaceContains=!1,this.errorMessageForFitnessFile=""),setTimeout(()=>{this.errorMessageForFitnessFile=""},2e3)}onInsuranceFileSelected(t,i){const o=t.target,s=/\s/;s.test(o.files[0].name),"Insurance"!=i||"application/pdf"!=o.files[0].type&&"image/png"!=o.files[0].type&&"image/jpeg"!=o.files[0].type?(this.insuranceImageSpaceContains=!1,this.isInsuranceValidFileType=!0,this.masterFormRequest.insurance_fileid="",this.errorMessageForInsuranceFile="File should be in pdf, jpg or jpeg format"):s.test(o.files[0].name)?(this.insuranceImageSpaceContains=!0,this.isInsuranceValidFileType=!1,this.errorMessageForInsuranceFile="File name should not contain space"):(o.files&&o.files.length>0&&(this.imageFile=o.files[0],this.convertToByteString(i)),this.isInsuranceValidFileType=!1,this.insuranceImageSpaceContains=!1,this.errorMessageForInsuranceFile=""),setTimeout(()=>{this.errorMessageForInsuranceFile=""},2e3)}onRCFileSelected(t,i){const o=t.target,s=/\s/;s.test(o.files[0].name),"RC"!=i||"application/pdf"!=o.files[0].type&&"image/png"!=o.files[0].type&&"image/jpeg"!=o.files[0].type?(this.RCImageSpaceContains=!1,this.isRCValidFileType=!0,this.masterFormRequest.insurance_fileid="",this.errorMessageForRCFile="File should be in pdf, jpg or jpeg format"):s.test(o.files[0].name)?(this.RCImageSpaceContains=!0,this.isRCValidFileType=!1,this.errorMessageForRCFile="File name should not contain space"):(o.files&&o.files.length>0&&(this.imageFile=o.files[0],this.convertToByteString(i)),this.isRCValidFileType=!1,this.RCImageSpaceContains=!1,this.errorMessageForRCFile=""),setTimeout(()=>{this.errorMessageForRCFile=""},2e3)}onFrontImageFileSelected(t,i){const o=t.target,s=/\s/;s.test(o.files[0].name),"FrontImage"!=i||"application/pdf"!=o.files[0].type&&"image/png"!=o.files[0].type&&"image/jpeg"!=o.files[0].type?(this.FrontImageSpaceContains=!1,this.isFrontImageFileType=!0,this.masterFormRequest.insurance_fileid="",this.errorMessageForFrontImageFile="File should be in pdf, jpg or jpeg format"):s.test(o.files[0].name)?(this.FrontImageSpaceContains=!0,this.isFrontImageFileType=!1,this.errorMessageForFrontImageFile="File name should not contain space"):(o.files&&o.files.length>0&&(this.imageFile=o.files[0],this.convertToByteString(i)),this.isFrontImageFileType=!1,this.FrontImageSpaceContains=!1,this.errorMessageForFrontImageFile=""),setTimeout(()=>{this.errorMessageForFrontImageFile=""},2e3)}onLeftImageFileSelected(t,i){const o=t.target,s=/\s/;s.test(o.files[0].name),"LeftImage"!=i||"application/pdf"!=o.files[0].type&&"image/png"!=o.files[0].type&&"image/jpeg"!=o.files[0].type?(this.FrontImageSpaceContains=!1,this.isFrontImageFileType=!0,this.masterFormRequest.insurance_fileid="",this.errorMessageForFrontImageFile="File should be in pdf, jpg or jpeg format"):s.test(o.files[0].name)?(this.LeftImageSpaceContains=!0,this.isLeftImageFileType=!1,this.errorMessageForLeftImageFile="File name should not contain space"):(o.files&&o.files.length>0&&(this.imageFile=o.files[0],this.convertToByteString(i)),this.isFrontImageFileType=!1,this.FrontImageSpaceContains=!1,this.errorMessageForFrontImageFile=""),setTimeout(()=>{this.errorMessageForFrontImageFile=""},2e3)}removeSpaceFromFileName(t){return t.replace(/\s+/g,"")}readFileAsBase64(t){return new Promise((i,o)=>{const s=new FileReader;s.onload=()=>i(s.result),s.onerror=r=>o(r),s.readAsDataURL(t)})}uploadFile(t){"Invoice"==t&&(this.isLoadingInvoice=!0,this.fileUploadReq.filename=this.imageFileNameInvoice,this.fileUploadReq.fileextension=this.imageExtensionInvoice,this.fileUploadReq.filetype="Invoice",this.invoiceImageString=this.imageByteStringInvoice,this.imageByteStringInvoice=this.imageByteStringInvoice.substring(this.imageByteStringInvoice.indexOf("64,")+3,this.imageByteStringInvoice.length),this.fileUploadReq.imagestr
1ing=this.imageByteStringInvoice),"Insurance"==t&&(this.isLoadingInsurance=!0,this.fileUploadReq.filename=this.imageFileNameInsurance,this.fileUploadReq.fileextension=this.imageExtensionInsurance,this.fileUploadReq.filetype="Insurance",this.insuranceImageString=this.imageByteStringInsurance,this.imageByteStringInsurance=this.imageByteStringInsurance.substring(this.imageByteStringInsurance.indexOf("64,")+3,this.imageByteStringInsurance.length),this.fileUploadReq.imagestring=this.imageByteStringInsurance),"RC"==t&&(this.isLoadingRC=!0,this.fileUploadReq.filename=this.imageFileNameRC,this.fileUploadReq.fileextension=this.imageExtensionRC,this.fileUploadReq.fileid="0",this.fileUploadReq.filetype="RC",this.rcImageString=this.imageByteStringRC,this.imageByteStringRC=this.imageByteStringRC.substring(this.imageByteStringRC.indexOf("64,")+3,this.imageByteStringRC.length),this.fileUploadReq.imagestring=this.imageByteStringRC),"FrontImage"==t&&(this.isLoadingFrontImage=!0,this.fileUploadReq.filename=this.imageFileNameFrontImage,this.fileUploadReq.fileextension=this.imageExtensionFrontImage,this.fileUploadReq.filetype="FrontImage",this.FrontImageImageString=this.imageByteStringFrontImage,this.imageByteStringFrontImage=this.imageByteStringFrontImage.substring(this.imageByteStringFrontImage.indexOf("64,")+3,this.imageByteStringFrontImage.length),this.fileUploadReq.imagestring=this.imageByteStringFrontImage),"LeftImage"==t&&(this.isLoadingLeftImage=!0,this.fileUploadReq.filename=this.imageFileNameLeftImage,this.fileUploadReq.fileextension=this.imageExtensionLeftImage,this.fileUploadReq.filetype="LeftImage",this.LeftImageImageString=this.imageByteStringLeftImage,this.imageByteStringLeftImage=this.imageByteStringLeftImage.substring(this.imageByteStringLeftImage.indexOf("64,")+3,this.imageByteStringLeftImage.length),this.fileUploadReq.imagestring=this.imageByteStringLeftImage),this.es.apiCall(this.fileUploadReq,"file/fileupload").subscribe(i=>{this.isLoadingRC=!1,this.isLoadingInsurance=!1,this.isLoadingInvoice=!1,this.isLoadingFrontImage=!1,this.isLoadingLeftImage=!1,this.loader.responseMessage=i.entity.response,200==i.statusCode?(this.loader.successNotification(),"Invoice"==t&&(this.masterFormRequest.saleinvoice_fileid=i.entity.fileid,this.updateFilesRequest.saleinvoicefileid=i.entity.fileid,this.isFitnessFileUploaded="yes"),"Insurance"==t&&(this.masterFormRequest.insurance_fileid=i.entity.fileid,this.isInsuranceFileUploaded="yes",this.updateFilesRequest.insurancefileid=i.entity.fileid),"RC"==t&&(this.masterFormRequest.vehicle_rc_fileid=i.entity.fileid,this.isRCFileUploaded="yes",this.updateFilesRequest.rcfileid=i.entity.fileid),"FrontImage"==t&&(this.masterFormRequest.vehiclefront_fileid=i.entity.fileid,this.isFrontImageFileUploaded="yes",this.updateFilesRequest.frontfileid=i.entity.fileid),"LeftImage"==t&&(this.masterFormRequest.vehicleside_fileid=i.entity.fileid,this.isLeftImageFileUploaded="yes",this.updateFilesRequest.sidefileid=i.entity.fileid)):this.loader.failedNotification()})}viewDocuments(t){"Invoice"==t?(this.isLoadingViewInvoice=!0,this.viewUploadedDocument=this.imageByteStringInvoice,this.isLoadingViewInvoice=!1):"Insurance"==t?(this.isLoadingViewInsurance=!0,this.viewUploadedDocument=this.imageByteStringInsurance,this.isLoadingViewInsurance=!1):"RC"==t?(this.isLoadingViewRC=!0,this.viewUploadedDocument=this.imageByteStringRC,this.isLoadingViewRC=!1):"FrontImage"==t?(this.isLoadingViewFrontImage=!0,this.viewUploadedDocument=this.imageByteStringFrontImage,this.isLoadingViewFrontImage=!1):"LeftImage"==t&&(this.isLoadingViewLeftImage=!0,this.viewUploadedDocument=this.imageByteStringLeftImage,this.isLoadingViewLeftImage=!1),this.isImageFile=!!this.viewUploadedDocument.includes("data:image"),$("#viewDocumentModal").modal("show")}addNewDevice(){this.masterFormRequest.mfgyear=this.mfgYearObj?this.vehicleModelObj.id:"0",this.masterFormRequest.vehicletype=this.vehicleTypeObj?this.vehicleTypeObj:"",this.masterFormRequest.classid=this.vehicleClassObj?this.vehicleClassObj.id:"0",this.masterFormRequest.noofpanic=this.panicButtonObj?this.panicButtonObj:1,this.masterFormRequest.makeid=this.vehicleMakeObj?this.vehicleMakeObj.id:"0",this.masterFormRequest.modelid=this.vehicleModelObj?this.vehicleModelObj.id:"0",sessionStorage.setItem("vehicledetails",JSON.stringify(this.masterFormRequest)),sessionStorage.setItem("redirectfrom","fromvehicle"),this.route.navigate(["master/device"])}setFormData(){var t=this;return(0,I.Z)(function*(){$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(o){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),o.preventDefault()}),t.updateFlag=!1,t.buttonName="Submit",t.deviceDetails=new K.QU;let i=sessionStorage.getItem("vehicledetails");i=JSON.parse(i),t.redirectFlag=!0,t.masterFormRequest.makeid=i.makeid,t.masterFormRequest.modelid=i.modelid,t.masterFormRequest.vehicleno=i.vehicleno,t.panicButtonObj=i.noofpanic,t.vehicleTypeObj=i.vehicletype,null!=sessionStorage.getItem("deviceid")&&(yield t.getDeviceList(),yield t.getDeviceDetails()),yield t.getVehicleClassList(),yield t.getVehicleMakeList(),yield t.getVehicleModelList()})()}getDeviceDetails(){let t="";t=1==this.redirectFlag?sessionStorage.getItem("deviceid"):this.deviceObj?this.deviceObj.deviceid:"",this.es.apiCall({deviceid:t,pageurl:"",pageno:"",itemperpage:"",searchby:"",pdfexcel:""},"master/devicedetails").subscribe(o=>{this.deviceDetails="200"==o.statusCode?o.entity.devicedetails[0]:new K.QU})}
1showBulkForm(){this.route.navigate(["master/bulkvehicle"])}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){}}catch(o){}}convertToByteString(t){var i=this;return(0,I.Z)(function*(){try{if("RC"==t&&i.imageFile){const o=i.imageFile.name.lastIndexOf(".");o>=0&&(i.imageFileNameRC=i.removeSpaceFromFileName(i.imageFile.name.substr(0,o)),i.imageExtensionRC=i.imageFile.name.substr(o+1).toLowerCase()),i.imageByteStringRC=yield i.readFileAsBase64(i.imageFile)}if("Insurance"==t&&i.imageFile){const o=i.imageFile.name.lastIndexOf(".");o>=0&&(i.imageFileNameInsurance=i.removeSpaceFromFileName(i.imageFile.name.substr(0,o)),i.imageExtensionInsurance=i.imageFile.name.substr(o+1).toLowerCase()),i.imageByteStringInsurance=yield i.readFileAsBase64(i.imageFile)}if("Invoice"==t&&i.imageFile){const o=i.imageFile.name.lastIndexOf(".");o>=0&&(i.imageFileNameInvoice=i.removeSpaceFromFileName(i.imageFile.name.substr(0,o)),i.imageExtensionInvoice=i.imageFile.name.substr(o+1).toLowerCase()),i.imageByteStringInvoice=yield i.readFileAsBase64(i.imageFile)}if("FrontImage"==t&&i.imageFile){const o=i.imageFile.name.lastIndexOf(".");o>=0&&(i.imageFileNameFrontImage=i.removeSpaceFromFileName(i.imageFile.name.substr(0,o)),i.imageExtensionFrontImage=i.imageFile.name.substr(o+1).toLowerCase()),i.imageByteStringFrontImage=yield i.readFileAsBase64(i.imageFile)}if("LeftImage"==t&&i.imageFile){const o=i.imageFile.name.lastIndexOf(".");o>=0&&(i.imageFileNameLeftImage=i.removeSpaceFromFileName(i.imageFile.name.substr(0,o)),i.imageExtensionLeftImage=i.imageFile.name.substr(o+1).toLowerCase()),i.imageByteStringLeftImage=yield i.readFileAsBase64(i.imageFile)}}catch(o){}})()}onChangeFilterBy(){var t=this;return(0,I.Z)(function*(){t.filterByObj?"customer"==t.filterByObj?t.customerList=yield t.listService.getCustomerList(new u.nO):"customertype"==t.filterByObj&&(t.roleList=yield t.listService.getRoleList(new u.nO),t.roleList=t.roleList.filter(i=>"school"==i.name||"customer"==i.name)):t.Details("refresh")})()}onChangeCusType(){this.cusTypeObj?(this.detailsparam.filter3=this.cusTypeObj.name,this.detailsparam.customerid="",this.Details("")):this.Details("refresh")}onChangeCustomerList(){this.customerNameObj&&(this.detailsparam.filter3="",this.detailsparam.customerid=this.customerNameObj.id,this.Details(""))}onFileSelected(t,i,o){var s;const r=t.target,c=null===(s=null==r?void 0:r.files)||void 0===s?void 0:s[0];this.errorMessageForFile="",c&&["application/pdf","image/png","image/jpeg"].includes(c.type)?(this.imageFile=c,this.convertToByteString(i),this[`isValidFileType${o}`]=!1,this[`imageSpaceContains${o}`]=!1):(this.uploadClass[`${o}upload`]=null,this[`imageSpaceContains${o}`]=!1,this[`isValidFileType${o}`]=!0,this.errorMessageForFile="File should be in pdf, jpg or jpeg format"),setTimeout(()=>{this.errorMessageForFile=""},1e4)}removeFile(t){"RC"==t&&($("#rcFile").val(""),this.imageFileNameRC=null,this.imageExtensionRC=null,this.imageByteStringRC=null,this.isValidFileTypeRC=!1,this.imageSpaceContainsRC=!1,this.masterFormRequest.vehicle_rc_fileid=""),"Insurance"==t&&($("#insuranceFile").val(""),this.imageFileNameInsurance=null,this.imageExtensionInsurance=null,this.imageByteStringInsurance=null,this.isValidFileTypeInsurance=!1,this.imageSpaceContainsInsurance=!1,this.masterFormRequest.insurance_fileid=""),"Invoice"==t&&($("#invoiceFile").val(""),this.imageFileNameInvoice=null,this.imageExtensionInvoice=null,this.imageByteStringInvoice=null,this.isValidFileTypeInvoice=!1,this.imageSpaceContainsInvoice=!1,this.masterFormRequest.saleinvoice_fileid=""),"FrontImage"==t&&($("#FrontImageFile").val(""),this.imageFileNameFrontImage=null,this.imageExtensionFrontImage=null,this.imageByteStringFrontImage=null,this.isValidFileTypeFrontImage=!1,this.imageSpaceContainsFrontImage=!1,this.masterFormRequest.vehiclefront_fileid=""),"LeftImage"==t&&($("#LeftImageFile").val(""),this.imageFileNameLeftImage=null,this.imageExtensionLeftImage=null,this.imageByteStringLeftImage=null,this.isValidFileTypeLeftImage=!1,this.imageSpaceContainsLeftImage=!1,this.masterFormRequest.vehicleside_fileid="")}prepareCertificateData(){var t,i,o,s;this.certificateData={ownerName:this.masterFormRequest.customername,vehicleNo:this.masterFormRequest.vehicleno,chassisNo:this.masterFormRequest.chassisno,engineNo:this.masterFormRequest.engineno,makeModel:`${(null===(t=this.vehicleMakeObj)||void 0===t?void 0:t.name)||""} ${(null===(i=this.vehicleModelObj)||void 0===i?void 0:i.name)||""}`,yearOfMfg:this.mfgYearObj,deviceId:null===(o=this.deviceDetails)||void 0===o?void 0:o.deviceimeino,deviceMake:null===(s=this.deviceDetails)||void 0===s?void 0:s.devicemodelname,mobileNo:this.masterFormRequest.customermobileno,installationDate:new Date,expiryDate:new Date((new Date).setFullYear((new Date).getFullYear()+1)),installerName:sessionStorage.getItem("username")||"Authorized Technician"}}prepareCertificateDataV2(){var t,i,o,s;this.certificateDataV2={cop:"SHL/18/2022-2023/200625072/COP/3074",copValidTill:new Date("2024-09-30"),certificateNo:`MH${Math.floor(1e8+9e8*Math.random())}`,emissionDate:new Date,validFrom:new Date,validTill:new Date((new Date).setFullYear((new Date).getFullYear()+1)),vehicleNo:this.masterFormRequest.vehicleno,productName:"CT",quantity:1,ownerName:this.masterFormRequest.customername,make:null===(t=this.vehicleMakeObj)||void 0===t?void 0:t.name,model:null===(i=this.vehicleModelObj)||void 0===i?void 0:i.name,chassisNo:this.masterFormRequest.chassisno,yearOfMfg:this.mfgYearObj,mobileNo:this.masterFormRequest.customermobileno,deviceId:null===(o=this.deviceDetails)||void 0===o?void 0:o.deviceuniqueno,imei:null===(s=this.deviceDetails)||void 0===s?void 0:s.deviceimeino,server:"https://track.greentech.com",frontLeftImage:"assets/images/auth/placeholder.png",backRightImage:"assets/images/auth/placeholder.png",documentImage:"assets/images/auth/placeholder.png"}}generateCertificate(){this.prepareCertificateData();const t=(new Date).getFullYear(),i=Math.floor(1e4*Math.random()).toString().padStart(4,"0");this.certificateNumber=`VTS-${t}-${i}`,this.technicianName=sessionStorage.getItem("username")||"Authorized Technician",$("#certificateModal").modal("show")}generateCertificateV2(){this.prepareCertificateDataV2(),$("#certificateModalV2").modal("show")}printCertificate(){const t=document.getElementById("certificateModal");if(t){const i=window.open("","_blank");i&&(i.document.write(`\n <html>\n <head>\n <title>Vehicle Installation Certificate</title>\n <style>\n body { font-family: 'Times New Roman', serif; }
1\n .modal-dialog { max-width: 800px; }\n .certificate-content { border: 2px solid #2c3e50; padding: 20px; }\n .certificate-header, .modal-footer { display: none; }\n </style>\n </head>\n <body>\n ${t.innerHTML}\n </body>\n </html>\n `),i.document.close(),i.print())}}printCertificateV2(){var t;const i=null===(t=document.querySelector("#certificateModalV2 .modal-body"))||void 0===t?void 0:t.innerHTML;if(i){const o=window.open("","_blank");o&&(o.document.write(`\n <html>\n <head>\n <title>Installation Certificate</title>\n <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">\n <style>\n /* You can copy the component's CSS here for accurate printing */\n ${this.getCertificateV2PrintStyles()}\n </style>\n </head>\n <body onload="window.print();window.close()">${i}</body>\n </html>\n `),o.document.close())}}getCertificateV2PrintStyles(){return"\n .certificate-container-v2 {\n border: 1px solid #ccc;\n padding: 15px;\n font-family: Arial, sans-serif;\n font-size: 12px;\n background-color: #fff;\n }\n /* ... copy all styles from vehicleinstallationcertificatev2.component.css here ... */\n "}openCertificatePage(t){const i=encodeURIComponent(JSON.stringify(t)),o=this.route.serializeUrl(this.route.createUrlTree(["/operation/fitmentcertificate"],{queryParams:{data:i}})),s=`${window.location.origin}${window.location.pathname}#${o}`;window.open(s,"_blank")}downloadDoc(t){"pdf"===t?this.es.apiCall(this.detailsparam,"download/pdf").subscribe(i=>{var o;200===i.statusCode&&(null===(o=i.entity)||void 0===o?void 0:o.fileUrl)?window.open(i.entity.fileUrl,"_blank"):this.loader.failedNotification()}):"excel"===t&&this.es.apiCall(this.detailsparam,"download/excel").subscribe(i=>{var o;200===i.statusCode&&(null===(o=i.entity)||void 0===o?void 0:o.fileUrl)?window.open(i.entity.fileUrl,"_blank"):this.loader.failedNotification()})}viewDetailsDocument(t){this.activeTab="RC",this.isDocumentModalOpen=!0,this.selectedModel=t,this.viewFileDetails.filter1=t.vehicleid,this.viewFileDetails.status="vehiclefiles",this.Insurance_path="",this.RC_path="",this.Invoice_path="",this.Front_Image_path="",this.Left_Image_path="",this.es.apiCall(this.viewFileDetails,"file/viewfile").subscribe(i=>{this.onclickeventmessage=i.entity;try{this.loader.loaderOff()}catch(s){}if(200==i.statusCode){for(var o=0;o<i.entity.filedetails.length;o++)"Insurance"==i.entity.filedetails[o].filetype?this.Insurance_path=i.entity.filedetails[o].filepath:"RC"==i.entity.filedetails[o].filetype?this.RC_path=i.entity.filedetails[o].filepath:"Invoice"==i.entity.filedetails[o].filetype?this.Invoice_path=i.entity.filedetails[o].filepath:"FrontImage"==i.entity.filedetails[o].filetype?this.Front_Image_path=i.entity.filedetails[o].filepath:"LeftImage"==i.entity.filedetails[o].filetype&&(this.Left_Image_path=i.entity.filedetails[o].filepath);this.cdr.detectChanges(),setTimeout(()=>{$(".nav-link").removeClass("active"),$(".tab-pane").removeClass("show active"),$("#tac-tab").addClass("active").attr("aria-selected","true"),$("#tac").addClass("show active"),this.cdr.detectChanges(),setTimeout(()=>{this.resetTabs()},50)},100)}},i=>{this.loader.loaderOff()})}closeDocModal(){this.isDocumentModalOpen=!1}resetTabs(){const t=document.getElementById("tac-tab"),i=document.getElementById("tac");t&&i&&(document.querySelectorAll("#docTabs .nav-link").forEach(o=>{o.classList.remove("active")}),document.querySelectorAll("#docTabsContent .tab-pane").forEach(o=>{o.classList.remove("show","active")}),t.classList.add("active"),i.classList.add("show","active"))}toggleDropdown(t){this.dropdownOpenIndex=this.dropdownOpenIndex===t?null:t}viewDocument(t){this.activeTab="tac",this.isDocumentModalOpen=!0,this.selectedModel=t,this.viewFileDetails.devmodelid=t.devmodelid,this.protocol_path="",this.tac_cert_path="",this.cop_cert_path="",this.devicephoto_path="",this.es.apiCall(this.viewFileDetails,"f
1ile/viewfile").subscribe(i=>{this.onclickeventmessage=i.entity;try{this.loader.loaderOff()}catch(s){}if(200==i.statusCode){for(var o=0;o<i.entity.filedetails.length;o++)"protocol"==i.entity.filedetails[o].pagevalue?this.protocol_path=i.entity.filedetails[o].filepath:"tacCertificate"==i.entity.filedetails[o].pagevalue?this.tac_cert_path=i.entity.filedetails[o].filepath:"copCertificate"==i.entity.filedetails[o].pagevalue?this.cop_cert_path=i.entity.filedetails[o].filepath:"devicephoto"==i.entity.filedetails[o].pagevalue&&(this.devicephoto_path=i.entity.filedetails[o].filepath);this.cdr.detectChanges(),setTimeout(()=>{$(".nav-link").removeClass("active"),$(".tab-pane").removeClass("show active"),$("#tac-tab").addClass("active").attr("aria-selected","true"),$("#tac").addClass("show active"),this.cdr.detectChanges(),setTimeout(()=>{this.resetTabs()},50)},100)}},i=>{this.loader.loaderOff()})}onChangeVehicleType(t){this.vehicleTypeObj=t,this.getMFGYearList()}deleteFile(t){this.fileUploadReq.fileid=t,this.es.apiCall(this.fileUploadReq,"file/deletefile").subscribe(i=>{})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(_e.X),e.Y36(R.v),e.Y36(J.D),e.Y36(v.gz),e.Y36(v.F0),e.Y36(P.P),e.Y36(z.X),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-vehicle-installation"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Ji,5),e.Gf(Vi,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.masterForm=o.first),e.iGM(o=e.CRH())&&(i.f=o.first)}},decls:161,vars:55,consts:[[1,"page-header","d-flex","justify-content-between","align-items-center"],[1,"page-title"],[1,"mainpageheader","text-white","newtitle"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"page-actions"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard","class","btn-action",3,"click",4,"ngIf"],["id","showFilePanel","class","btn-action",3,"click",4,"ngIf"],["class","btn-action success",3,"click",4,"ngIf"],[1,"card","grid-container",2,"height","100%"],[3,"ngStyle"],[1,"card","entrycard"],[1,"card-body","px-3","pt-1"],["novalidate","","id","form_id","autocomplete","off",1,"needs-validation"],["masterForm","ngForm"],[1,"row"],[1,"col-md-4",2,"float","left"],[1,"card-label-subheading","m-1"],["aria-hidden","true",1,"fa","fa-pencil"],[1,"mendatorynote"],[1,"mendatorystar"],[1,"col-md-4",2,"float","right"],[1,"mendatorynote","text-right"],[1,"row","form-section","entrydiv"],["class","col-md-3",4,"ngIf"],[1,"col-md-9"],["class","d-flex justify-content-between",4,"ngIf"],["class","col-md-4",4,"ngIf"],["class","row",4,"ngIf"],[1,"col-md-12","d-flex","justify-content-end"],["class","btn btn-secondary btn-sm text-white mx-1 responsive-btn","type","reset",3,"click",4,"ngIf"],["class","btn btn-sm submit text-white mx-2 responsive-btn","type","submit","style","background-color: rgb(3, 117, 79);",3,"click",4,"ngIf"],[1,"card-body","p-1",3,"ngStyle"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-toolbar","d-flex","flex-wrap","align-items-center","justify-content-between","mb-1"],[1,"d-flex","flex-wrap","align-items-center","gap-2"],[1,"entries-info"],["placeholder","Show Rows",1,"w-auto",3,"ngModel","clearable","ngModelChange","change"],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],["ngbTooltip","Refresh",1,"btn","btn-sm","btn-outline-success",3,"click"],[1,"fa","fa-refresh"],["type","text","placeholder","Click enter for Search",1,"form-control","form-control-sm",3,"ngModel","ngModelChange","keydown.enter"],["ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","btn-danger",3,"disabled","click"],[1,"fa","fa-file-pdf-o"],["ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","btn-success",3,"disabled","click"],[1,"fa","fa-file-excel-o"],[1,"scroll-tbl"],[1,"table","custom-table",2,"overflow-y","auto","overflow-x","auto"],["rowspan","2",2,"padding","2px 5px!important"],["rowspan","2",4,"ngIf"],["colspan","1",2,"padding","2px 5px!important",3,"click"],["rowspan","2"],["rowspan","2",2,"padding","2px 5px!important",3,"click"],[1,"fa","fa-sort-amount-desc"],[4,"ngIf"],["class","my-0",4,"ngIf"],[1,"my-0","text-white"],[1,"panic-style","text-end"],["rowspan","2",1,"text-center",2,"width","78px","padding","2px 5px!important"],[2,"padding","2px 5px!important"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","deleteModal","tabindex","-1","role","dialog","aria-labelledby","ModalLabel","aria-hidden","true",1,"modal","fade","p-0"],["role","document",1,"modal-dialog","modal
1-sm"],[1,"modal-content"],[1,"modal-header","p-1"],["id","ModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"close"],["aria-hidden","true"],["novalidate","",3,"ngSubmit"],["f","ngForm"],[1,"modal-body","p-3"],[1,"text-small"],[1,"text-danger"],["type","text","minlength","3","maxlength","100","name","delete_remark","placeholder","Remark","required","",1,"form-control",3,"ngModel","ngModelChange","keypress"],["delete_remarkCtrl","ngModel"],["class","text-danger",4,"ngIf"],[1,"modal-footer","text-center","p-0"],["type","submit",1,"btn","btn-primary","p-2"],["type","button","data-bs-dismiss","modal",1,"btn","btn-secondary","p-2"],["id","viewDocumentModal","data-bs-backdrop","static","data-bs-keyboard","false","tabindex","-1","aria-labelledby","confirmationModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-xl","modal-dialog-top"],[1,"modal-header","p-2"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body","confirmation-label","p-1"],["class"," text-center",4,"ngIf"],["class","modal-overlay",4,"ngIf"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard",1,"btn-action",3,"click"],[1,"fa","fa-arrow-left"],["id","showFilePanel",1,"btn-action",3,"click"],[1,"fa","fa-pencil-square"],[1,"btn-action","success",3,"click"],[1,"fa","fa-list-alt"],[1,"col-md-3"],[1,"d-flex","justify-content-between"],[1,"card-label-subheading","m-1","mainlabel","text-dark"],["class","col-md-12",4,"ngIf"],[1,"form-group"],[1,"mb-0","label"],["name","deviceNo","placeholder","Select Device","required","",3,"ngClass","ngModel","multiple","closeOnSelect","disabled","ngModelChange","change"],["deviceCtrl","ngModel"],[3,"value",4,"ngFor","ngForOf"],["class","form-control-feedback text-danger validationmsg",4,"ngIf"],[1,"device-details"],[1,"table",2,"background-color","#FFFFFF"],[1,"table-heading"],["colspan","8"],[1,"table-label"],[1,"table-value"],[1,"table","mt-1",2,"background-color","#FFFFFF"],[1,"mb-3"],[1,"mb-0","form-label","fw-semibold"],["name","distributorObj","placeholder","Select Distributor","required","",3,"ngModel","ngModelChange","change"],["class","text-danger small mt-1",4,"ngIf"],[3,"value"],[1,"text-danger","small","mt-1"],["name","dealerNo","placeholder","Select Dealer",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["dealerCtrl","ngModel"],[1,"form-control-feedback","text-danger","validationmsg"],["class","text-small",4,"ngIf"],["name","rtoNo","placeholder","Select RTO","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange"],["rtoCtrl","ngModel"],[3,"disabled","value",4,"ngFor","ngForOf"],[3,"disabled","value"],["name","vehicleType","placeholder","Select Vehicle Type","required","",3,"ngClass","ngModel","multiple","closeOnSelect","clearable","ngModelChange","change"],["vehicleTypeCtrl","ngModel"],["type","text","minlength","6","maxlength","25","name","vehicleregno","placeholder","Vehicle Number","required","",1,"form-control","form-control-sm","text-uppercase",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["vehicleRegCtrl","ngModel"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],["type","text","minlength","6","maxlength","25","name","vehicleregno","placeholder","Vehicle Number",1,"form-control","form-control-sm","text-uppercase",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["type","text","minlength","5","maxlength","25","name","vehiclechassisno","placeholder","Chassis No.","required","",1,"form-control","form-control-sm",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["vehicleChassisNoCtrl","ngModel"],["type","text","minlength","5","maxlength","25","name","vehicleengineno","placeholder","Engine No.","required","",1,"form-control","form-control-sm",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["vehicleEngineNoCtrl","ngModel"],["name","vehicleMake","placeholder","Select Vehicle Make","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["vehicleMakeCtrl","ngModel"],["name","vehicleModel","placeholder","Select Vehicle Model","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["vehicleModelCtrl","ngModel"],["name","vehicleClass","placeholder","Select Vehicle Class","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["vehicleClassCtrl","ngModel"],["name","mfgYear","placeholder","Select MFG Year","required","",3,"ngClass","ngModel","multiple","closeOnSelect","ngModelChange","change"],["mfgYearCtrl","ngModel"],["name","panicButton","placeholder","Select Number Of Panic",3,"ngClass","ngModel","multiple","closeOnSelect","clearable","ngModelChange","change"],["panicButtonCtrl","ngModel"],[1,"col-md-4"],["type","text","name","customername","placeholder","Owner Name","required","",1,"form-control","form-control-sm",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["customerNameCtrl","ngModel"],["type","text","name","customermobile","placeholder","Mobile Number","maxlength","10","minlength","10","required","",1,"form-control","form-control-sm",3,"ngModel","ngClass","ngModelChange","keypress"],["customerMobileCtrl","ngModel"],[1,"mb-0"],["type","email","name","email","placeholder","Email","required","","email","",1,"form-control","form-control-sm",3,"ngModel","ngClass","ngModelChange"],["emailCtrl","ngModel"],["type","text","minlength","3","maxlength","100","name","remark","placeholder","Remark","required","",1,"form-control","p-2",3,"ngModel","ngClass","ngModelChange","keypress","focusout"],["remarkCtrl","ngModel"],[1,"mb-0","label","fw-bold"],[1,"custom-file","d-flex",2,"width","90%"],["name","rc","type","file","accept",".pdf,.jpg,.jpeg,.png","id","rcFile",1,"form-control","form-control-sm",3,"change"],["type","button","ngbTooltip","Upload RC",1,"btn","btn-dark","btn-sm","ms-2","pt-0",2,"height","24px","padding","0.1rem 0.3rem",3,"disabled","click"],["class","fa fa-upload","style"," font-size: 12px;",4,"ngIf"],["class","fa fa-spinner fa-spin","style"," font-size: 11px;",4,"ngIf"],["class","mt-2 d-flex align-items-center",4,"ngIf"],["type","file","accept",".pdf,.jpg,.jpeg,.png","id","insuranceFile",1,"form-control","form-control-sm",3,"change"],["type","button","ngbTooltip","Upload Insurance Certificate",1,"btn","btn-dark","btn-sm","ms-2","pt-0",2,"height","24px","padding","0.1rem 0.3rem",3,"disabled","click"],["type","file","accept",".pdf,.jpg,.jpeg,.png","id","invoiceFile",1,"form-control","form-control-sm",3,"disabled","change"],["type","button","ngbTooltip","Upload Sales Invoice",1,"btn","btn-dark","btn-sm","ms-2","pt-0",2,"height","24px","padding","0.1rem 0.3rem",3,"click"],["type","file","accept",".pdf,.jpg,.jpeg,.png","id","FrontImageFile",1,"form-control","form-control-sm",3,"disabled","change"],["type","button","ngbTooltip","Upload Sales FrontImage",1,"btn","btn-dark","btn-sm","ms-2","pt-0",2,"height","24px","padding","0.1rem 0.3rem",3,"click"],["type","file","accept",".pdf,.jpg,.jpeg,.png","id","LeftImageFile",1,"form-control","form-control-sm",3,"disabled","change"],["type","button","ngbTooltip","Upload Sales LeftImage",1,"btn","btn-dark","btn-sm","ms-2","pt-0",2,"height","24px","padding","0.1rem 0.3rem",3,"click"],[1,"fa","fa-upload",2,"font-size","12px"],[1,"fa","fa-spinner","fa-spin",2,"font-size","11px"],[1,"mt-2","d-flex","align-items-center"],[1,"text-success","me-2",2,"font-size","12px","cursor","pointer","text-decoration","underline",3,"click"],["class","fa fa-file-text-o me-1",4,"ngIf"],["type","button","title","Remove File",1,"btn","btn-link","btn-sm","text-danger","p-0","ms-2",2,"font-size","12px",3,"click"],[1,"fa","fa-tras
1h"],[1,"fa","fa-file-text-o","me-1"],["type","reset",1,"btn","btn-secondary","btn-sm","text-white","mx-1","responsive-btn",3,"click"],["type","submit",1,"btn","btn-sm","submit","text-white","mx-2","responsive-btn",2,"background-color","rgb(3, 117, 79)",3,"click"],["value","20"],["value","50"],["value","100"],[1,"my-0"],["colspan","13"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"text-uppercase","fw-bolder"],[1,"text-uppercase"],["style","width:25px; height:25px;",3,"src","ngbTooltip",4,"ngIf"],[1,"mt-1"],[1,"fw-bolder","text-uppercase",2,"font-size","9px",3,"ngClass"],[1,"panic-style"],[1,"d-flex","align-items-center"],[1,"action-section"],[1,"btn","btn-primary","btn-sm","p-1","me-2",3,"click"],["aria-hidden","true",1,"fa","fa-file",2,"font-size","12px","color","white"],[1,"position-relative"],["title","Click here..",1,"btn","btn-dark","btn-sm","p-0","me-2","d-flex","align-items-center","justify-content-center",2,"height","21px","min-width","21px",3,"click"],["aria-hidden","true",1,"fa","fa-eye",2,"font-size","12px","color","white"],["class","dropdown-btn-group","style","position:absolute; left:0; top:110%; z-index:10; min-width:120px;",4,"ngIf"],["id","updatesidepanel","type","button","data-toggle","tooltip","data-placement","top","title","View Details",1,"btn","btn-successbtn-sm","p-1","me-2",2,"border","1px solid #06665e",3,"click"],["data-bs-toggle","modal","data-bs-target","#deleteModal",1,"btn","btn-danger","btn-sm","p-1","me-2",3,"click"],["aria-hidden","true",1,"fa","fa-trash-o",2,"font-size","12px","color","white"],[2,"width","25px","height","25px",3,"src","ngbTooltip"],[1,"dropdown-btn-group",2,"position","absolute","left","0","top","110%","z-index","10","min-width","120px"],[1,"card","shadow-sm","p-2",2,"right","36%","background","#fff","border-radius","8px","border","1px solid #e0e0e0","display","flex","flex-direction","column","align-items","center"],[1,"btn","btn-info","btn-xs","mb-2","w-100",2,"font-size","12px","padding","4px 0","border-radius","5px",3,"click"],[1,"btn","btn-warning","btn-xs","w-100",2,"font-size","12px","padding","4px 0","border-radius","5px",3,"click"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[2,"height","100%","width","100%",3,"src"],[2,"height","60vh","width","100%",3,"src"],[1,"modal-overlay"],[1,"modal-box"],[1,"modal-header"],[1,"fa","fa-file"],[1,"close-btnM",3,"click"],[1,"tabs"],[3,"click"],[1,"tab-body"],[4,"ngIf","ngIfElse"],["noTAC",""],["type","application/pdf","width","100%","height","360px",3,"data"],[1,"empty-msg"],["noCOP",""],["noProt",""],["noOther",""]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e._uU(4),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,Ri,3,0,"button",5),e.YNc(7,Qi,3,0,"button",6),e.YNc(8,Ei,3,0,"button",7),e.qZA()(),e.TgZ(9,"div",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"form",12,13)(15,"div",14)(16,"div",15)(17,"h6",16),e._UZ(18,"i",17),e._uU(19,"\xa0\xa0\xa0Vehicle & Device Mapping Form"),e.qZA()(),e.TgZ(20,"div",15)(21,"span",18)(22,"b"),e._uU(23,"Note\xa0:-\xa0\xa0"),e.TgZ(24,"span",19),e._uU(25,'" * "'),e.qZA(),e._uU(26,"\xa0Indicates Mandatory Fields."),e.qZA()()(),e.TgZ(27,"div",20)(28,"span",21),e._uU(29,"Accepted formats: PDF, JPG, JPEG, PNG"),e.qZA()()(),e.TgZ(30,"div",22),e.YNc(31,tn,66,23,"div",23),e.TgZ(32,"div",24),e.YNc(33,nn,3,0,"div",25),e.TgZ(34,"div",14),e.YNc(35,rn,11,9,"div",23),e.YNc(36,pn,10,10,"div",23),e.YNc(37,hn,9,6,"div",23),e.YNc(38,bn,7,6,"div",23),e.YNc(39,yn,9,6,"div",23),e.YNc(40,An,9,6,"div",23),e.YNc(41,qn,10,9,"div",23),e.YNc(42,Nn,10,9,"div",23),e.YNc(43,Jn,10,9,"div",23),e.YNc(44,En,10,9,"div",23),e.YNc(45,jn,7,9,"div",23),e.YNc(46,Bn,9,6,"div",26),e.YNc(47,Kn,9,6,"div",23),e.YNc(48,io,9,6,"div",23),e.YNc(49,ao,9,6,"div",23),e.qZA(),e.YNc(50,Fo,5,2,"div",27),e.TgZ(51,"div",14)(52,"div",28),e.YNc(53,No,2,0,"button",29),e.YNc(54,Uo,2,1,"button",30),e.YNc(55,Lo,2,1,"button",30),e.qZA()()()()()()()(),e.TgZ(56,"div",31)(57,"div",32)(58,"div",33)(59,"div",34)(60,"div",35)(61,"span",36),e._uU(62),e.qZA(),e.TgZ(63,"ng-select",37),e.NdJ("ngModelChange",function(r){return i.detailsparam.itemperpage=r})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam.itemperpage,"Vehicle Master","Select rows","Change Event","")}),e.YNc(64,Po,2,0,"ng-option",38),e.YNc(65,Jo,2,0,"ng-option",39),e.YNc(66,Vo,2,0,"ng-option",40),e.YNc(67,Ro,2,2,"ng-option",41),e.qZA()(),e.TgZ(68,"div",42)(69,"button",43),e.NdJ("click",function(){return i.Details("refresh"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click refresh button","Click Event","")}),e._UZ(70,"i",44),e.qZA(),e.TgZ(71,"input",45),e.NdJ("ngModelChange",function(r){return i.detailsparam.searchby=r})("keydown.enter",function(){return i.Details("search"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click search button","Click Event","")}),e.qZA(),e.TgZ(72,"button",46),e.NdJ("click",function(){return i.downloadDoc("pdf"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click PDF button","Click Event","")}),e._UZ(73,"i",47),e.qZA(),e.TgZ(74,"button",48),e.NdJ("click",function(){return i.downloadDoc("excel"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click Excel button","Click Event","")}),e._UZ(75,"i",49),e.qZA()()(),e.TgZ(76,"div",50)(77,"table",51)(78,"thead")(79,"tr")(80,"th",52),e._uU(81,"#"),e.qZA(),e.YNc(82,Qo,2,0,"th",53),e.TgZ(83,"th",54),e.NdJ("click",function(r){return i.sorting(r,"vehicleno")}),e.TgZ(84,"span"),e._uU(85,"Vehicle No."),e.qZA()(),e.TgZ(86,"th",55),e._uU(87,"RTO"),e.qZA(),e.TgZ(88,"th",56),e.NdJ("click",function(r){return i.sorting(r,"customer")}),e._uU(89,"Vehicle Owner"),e._UZ(90,"i",57),e.qZA(),e.TgZ(91,"th",55),e.YNc(92,Eo,2,0,"span",58),e.YNc(93,Yo,1,0,"hr",59),e.YNc(94,jo,2,0,"span",58),e.qZA(),e.TgZ(95,"th",54),e.NdJ("click",function(r){return i.sorting(r,"makename")}),e.TgZ(96,"span"),e._uU(97,"Vehicle Make"),e.qZA()(),e.TgZ(98,"th",56),e.NdJ("click",function(r){return i.sorting(r,"makename")}),e.TgZ(99,"span"),e._uU(100,"Vehicle Class"),e.qZA()(),e.TgZ(101,"th",52),e._uU(102," M2M Provider "),e._UZ(103,"hr",60),e._uU(104," ICCID No. "),e.qZA(),e.TgZ(105,"th",52),e._uU(106,"Primary Network"),e.qZA(),e.TgZ(107,"th",52),e._uU(108,"Secondary Network"),e.qZA(),e.TgZ(109,"th",56),e.NdJ("click",function(r){return i.sorting(r,"
1status")}),e._uU(110," Status"),e._UZ(111,"i",57),e.qZA(),e.TgZ(112,"th",52)(113,"div",61),e._uU(114,"Panic Button"),e.qZA()(),e.TgZ(115,"th",62),e._uU(116," Action"),e.qZA()(),e.TgZ(117,"tr")(118,"th",63),e._uU(119,"IMEI No."),e.qZA(),e.TgZ(120,"th",63),e._uU(121,"Model"),e.qZA()()(),e.YNc(122,Ho,5,0,"tbody",58),e.YNc(123,ta,2,1,"tbody",58),e.qZA()(),e.TgZ(124,"div",64),e.YNc(125,ia,2,4,"div",65),e.qZA()()()()(),e.TgZ(126,"div",66)(127,"div",67)(128,"div",68)(129,"div",69)(130,"h5",70),e._uU(131,"Delete"),e.qZA(),e.TgZ(132,"button",71)(133,"span",72),e._uU(134,"\xd7"),e.qZA()()(),e.TgZ(135,"form",73,74),e.NdJ("ngSubmit",function(){e.CHM(o);const r=e.MAs(136);return i.delete(r),i.es.pageDataInfo("",i.masterFormRequest.vehicleno,"Vehicle Master","Delete Vehicle","Button Click Event","")}),e.TgZ(137,"div",75)(138,"div",14)(139,"div",33)(140,"label",76),e._uU(141,"Remark"),e.TgZ(142,"span",77),e._uU(143,"*"),e.qZA()(),e.TgZ(144,"textarea",78,79),e.NdJ("ngModelChange",function(r){return i.deleteremark=r})("keypress",function(r){return i.cv.addressValidation(r)}),e.qZA(),e.YNc(146,na,2,0,"span",80),e.qZA()()(),e.TgZ(147,"div",81)(148,"button",82),e._uU(149,"Delete"),e.qZA(),e.TgZ(150,"button",83),e._uU(151,"Close"),e.qZA()()()()()(),e.TgZ(152,"div",84)(153,"div",85)(154,"div",68)(155,"div",86),e._UZ(156,"button",87),e.qZA(),e.TgZ(157,"div",88),e.YNc(158,oa,3,4,"div",89),e.YNc(159,aa,3,4,"div",89),e.qZA()()()(),e.YNc(160,Ca,25,15,"div",90)}if(2&t){const o=e.MAs(136),s=e.MAs(145);e.xp6(4),e.hij(" ",i.pageHeading," "),e.xp6(2),e.Q6J("ngIf",i.isFromDashboard),e.xp6(1),e.Q6J("ngIf",!i.formsection),e.xp6(1),e.Q6J("ngIf",i.formsection),e.xp6(2),e.Q6J("ngStyle",e.VKq(51,ve,i.formsection?"":"none")),e.xp6(21),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(2),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(2),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf","OLD"==i.vehicleTypeObj&&!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf","NEW"==i.vehicleTypeObj&&!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf","Update"==i.buttonName||i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",i.formsection),e.xp6(3),e.Q6J("ngIf","Update"!=i.buttonName),e.xp6(1),e.Q6J("ngIf",i.formsection&&!i.viewfileuploadflag),e.xp6(1),e.Q6J("ngIf",i.formsection&&i.viewfileuploadflag),e.xp6(1),e.Q6J("ngStyle",e.VKq(53,ve,i.formsection?"none":"")),e.xp6(6),e.lnq("Showing ",i.recordFrom," to ",i.recordTo," of ",i.totalCount," entries"),e.xp6(1),e.Q6J("ngModel",i.detailsparam.itemperpage)("clearable",!1),e.xp6(1),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(4),e.Q6J("ngModel",i.detailsparam.searchby),e.xp6(1),e.Q6J("disabled","0"==i.totalCount),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(8),e.Q6J("ngIf","100"==i.loginRoleId),e.xp6(10),e.Q6J("ngIf","100"==i.loginRoleId||"101"==i.loginRoleId||"110"==i.loginRoleId),e.xp6(1),e.Q6J("ngIf","100"==i.loginRoleId||"101"==i.loginRoleId||"110"==i.loginRoleId),e.xp6(1),e.Q6J("ngIf","121"!=i.loginRoleId),e.xp6(28),e.Q6J("ngIf",0==i.totalCount),e.xp6(1),e.Q6J("ngIf",0!=i.totalCount),e.xp6(2),e.Q6J("ngIf",i.totalCount>i.detailsparam.itemperpage),e.xp6(19),e.Q6J("ngModel",i.deleteremark),e.xp6(2),e.Q6J("ngIf",o.submitted&&(null==s.errors?null:s.errors.required)),e.xp6(12),e.Q6J("ngIf",i.isImageFile),e.xp6(1),e.Q6J("ngIf",!i.isImageFile),e.xp6(1),e.Q6J("ngIf",i.isDocumentModalOpen)}},directives:[y.O5,C._L,y.PC,d._Y,d.JL,d.F,Z.w9,d.Q7,d.JJ,d.On,y.sg,Z.xv,y.mk,d.Fj,d.wO,d.nD,d.on,C.N9],pipes:[fe.y],styles:['.grid-section[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.device-details[_ngcontent-%COMP%]{background-color:#d9dadb;height:auto;padding:8px}.device-details[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.table-label[_ngcontent-%COMP%]{font-size:9px;font-weight:600;text-transform:uppercase}.table-value[_ngcontent-%COMP%]{font-size:10px;text-transform:uppercase}.table-heading[_ngcontent-%COMP%]{font-size:12px;text-transform:uppercase;font-weight:600;background-color:#dee3e6}.add-new-device[_ngcontent-%COMP%]{padding:1px 7px;background-color:green;border-radius:3px;color:#fff;font-size:12px}.panic-style[_ngcontent-%COMP%]{color:brown;font-weight:700} .ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.invalid-feedback[_ngcontent-%COMP%]{font-size:10px!important;color:#dc3545!important}input[_ngcontent-%COMP%]{font-size:12px}.notification-container[_ngcontent-%COMP%]{position:absolute;top:-1%!important;right:-6px!important;width:80%;display:none;height:98%!important;overflow:auto;background:#48484887;z-index:999;transform:translate(100%);-webkit-transform:translateX(100%)}.selected[_ngcontent-%COMP%]{animation:slide-in .5s forwards;-webkit-animation:slide-in .5s forwards}.dismiss[_ngcontent-%COMP%]{animation:slide-out .5s forwards;-webkit-animation:slide-out .5s forwards}@keyframes slide-in{0%{-webkit-transform:translateX(100%)}to{-webkit-transform:translateX(0%)}}@keyframes slide-out{0%{transform:translate(0)}to{transform:translate(100%)}}.close[_ngcontent-%COMP%]{box-sizing:border-box;-moz-box-sizing:border-box;display:block;float:right;width:22px;height:22px;background-color:transparent;box-shadow:inset 0 0 0 2px #006e93;border-radius:50%;position:relative;cursor:pointer;transition:background .5s}.close[_ngcontent-%COMP%]:after, .close[_ngcontent-%COMP%]:before{position:absolute;content:"";background-color:#006e93}.close[_ngcontent-%COMP%]:after{width:2px;height:10px;top:6px;left:10px;transform:rotate(45deg)}.close[_ngcontent-%COMP%]:before{width:10px;height:2px;top:10px;left:6px;transform:rotate(45deg)}.close[_ngcontent-%COMP%]:hover{background:#e60500;box-shadow:none}.close[_ngcontent-%COMP%]:hover:after, .close[_ngcontent-%COMP%]:hover:before{background:blue}.text-small[_ngcontent-%COMP%]{font-size:10px}.entrycard[_ngcontent-%COMP%]{background-color:#4965ee1c}.entrydiv[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #9EC6C7;padding:1%!important;animation:fadeInUp .8s ease-out}.mainpageheader[_ngcontent-%COMP%]{color:#cb5800;text-decoration:none;font-family:Tahoma}.btn-outline-primary[_ngcontent-%COMP%]:hover{background:white;color:#06665e}.mendatorynote[_ngcontent-%COMP%]{color:#00008b;font-size:9px;text-align:center}
1.mendatorystar[_ngcontent-%COMP%]{color:#be0215}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.subtable[_ngcontent-%COMP%]{font-size:10px;font-family:tahoma}.subtableborder[_ngcontent-%COMP%]{border:2px solid rgb(128,155,146);overflow:auto;max-height:28vh;min-height:28vh}.subsubtableborder[_ngcontent-%COMP%]{border:2px solid rgb(128,155,146);overflow:auto;max-height:80vh;min-height:79vh}.schoolLocat[_ngcontent-%COMP%]{font-size:10px;padding-left:2%!important;padding-right:2%!important}.mainlabel[_ngcontent-%COMP%]{font-size:13px;font-family:tahoma;text-decoration:underline;color:currentColor}.formaddbtn[_ngcontent-%COMP%]{background-color:#1b71a2;line-height:1%!important}.action-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{color:#000}.certificate-content[_ngcontent-%COMP%]{font-family:Times New Roman,serif;border:3px double #2c3e50;box-shadow:0 0 20px #0000001a}.certificate-header[_ngcontent-%COMP%]{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;border-bottom:2px solid #2c3e50;padding:15px 20px}.certificate-title[_ngcontent-%COMP%]{font-weight:700;font-size:1.5rem;margin:0}.certificate-body[_ngcontent-%COMP%]{padding:30px;background:#f8f9fa}.certificate-header-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:30px;padding:20px;background:white;border-radius:10px;box-shadow:0 2px 10px #0000001a}.company-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}.logo-image[_ngcontent-%COMP%]{width:80px;height:80px;object-fit:contain}.company-name[_ngcontent-%COMP%]{font-size:1.8rem;font-weight:700;color:#2c3e50;margin:0}.company-address[_ngcontent-%COMP%], .company-contact[_ngcontent-%COMP%]{margin:5px 0;color:#6c757d;font-size:.9rem}.certificate-number[_ngcontent-%COMP%]{text-align:right}.cert-badge[_ngcontent-%COMP%], .cert-date[_ngcontent-%COMP%]{display:block;margin-bottom:10px}.cert-label[_ngcontent-%COMP%], .date-label[_ngcontent-%COMP%]{font-weight:700;color:#2c3e50;font-size:.9rem}.cert-value[_ngcontent-%COMP%], .date-value[_ngcontent-%COMP%]{color:#007bff;font-weight:700;font-size:1.1rem}.certificate-main-title[_ngcontent-%COMP%]{text-align:center;margin:30px 0;padding:20px;background:white;border-radius:10px;box-shadow:0 2px 10px #0000001a}.certificate-main-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#2c3e50;font-size:2.2rem;font-weight:700;margin:0;text-transform:uppercase;letter-spacing:2px;border-bottom:3px solid #007bff;padding-bottom:10px}.cert-subtitle[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;margin:10px 0 0;font-size:1rem}.certificate-section[_ngcontent-%COMP%]{background:white;padding:20px;margin-bottom:20px;border-radius:10px;box-shadow:0 2px 10px #0000001a;border-left:5px solid #007bff}.section-title[_ngcontent-%COMP%]{color:#2c3e50;font-size:1.3rem;font-weight:700;margin-bottom:15px;border-bottom:2px solid #e9ecef;padding-bottom:5px}.section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:10px;color:#007bff}.info-grid[_ngcontent-%COMP%]{display:grid;grid-gap:15px;gap:15px}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;gap:20px}.info-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.info-item.full-width[_ngcontent-%COMP%]{grid-column:1 / -1}.info-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;color:#495057;font-size:.9rem;text-transform:uppercase;letter-spacing:.5px}.info-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#2c3e50;font-size:1rem;padding:5px 10px;background:#f8f9fa;border-radius:5px;border:1px solid #dee2e6}.info-item[_ngcontent-%COMP%] span.highlight[_ngcontent-%COMP%]{background:#fff3cd;border-color:#ffc107;color:#856404;font-weight:700}.device-info-grid[_ngcontent-%COMP%]{display:grid;grid-gap:12px;gap:12px}.device-info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;gap:20px}.device-info-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.device-info-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;color:#495057;font-size:.85rem;text-transform:uppercase;letter-spacing:.5px}.device-info-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#2c3e50;font-size:.95rem;padding:4px 8px;background:#e9ecef;border-radius:4px;font-family:Courier New,monospace}.status-active[_ngcontent-%COMP%]{background:#d4edda!important;color:#155724!important;border:1px solid #c3e6cb!important}.installation-checklist[_ngcontent-%COMP%]{display:grid;grid-gap:10px;gap:10px}.checklist-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#f8f9fa;border-radius:5px;border-left:3px solid #28a745}.check-icon[_ngcontent-%COMP%]{color:#28a745;font-size:1.1rem}.checklist-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#2c3e50;font-size:.95rem}.terms-section[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%)}.terms-content[_ngcontent-%COMP%]{background:white;padding:15px;border-radius:8px;border:1px solid #dee2e6}.terms-list[_ngcontent-%COMP%]{margin:0;padding-left:20px}.terms-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:8px;color:#495057;font-size:.9rem;line-height:1.4}.certificate-signatures[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:30px;gap:30px;margin:30px 0;padding:20px;background:white;border-radius:10px;box-shadow:0 2px 10px #0000001a}.signature-block[_ngcontent-%COMP%]{text-align:center;padding:20px;border:2px solid #dee2e6;border-radius:8px;background:#f8f9fa}.signature-line[_ngcontent-%COMP%]{width:100%;height:2px;background:#2c3e50;margin-bottom:10px}.signature-label[_ngcontent-%COMP%]{font-weight:700;color:#495057;font-size:.9rem;margin-bottom:5px;text-transform:uppercase}
1.signature-name[_ngcontent-%COMP%]{color:#2c3e50;font-weight:700;font-size:1rem;margin-bottom:5px}.signature-date[_ngcontent-%COMP%]{color:#6c757d;font-size:.85rem}.certificate-footer[_ngcontent-%COMP%]{text-align:center;margin-top:30px;padding:20px;background:white;border-radius:10px;box-shadow:0 2px 10px #0000001a;border-top:3px solid #007bff}.footer-text[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;margin:0 0 15px;font-size:.9rem}.footer-badges[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:20px}.badge-certified[_ngcontent-%COMP%], .badge-warranty[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 15px;border-radius:20px;font-size:.85rem;font-weight:700}.badge-certified[_ngcontent-%COMP%]{background:linear-gradient(135deg,#28a745 0%,#20c997 100%);color:#fff}.badge-warranty[_ngcontent-%COMP%]{background:linear-gradient(135deg,#007bff 0%,#6610f2 100%);color:#fff}.certificate-footer-actions[_ngcontent-%COMP%]{background:#f8f9fa;border-top:2px solid #dee2e6;padding:15px 20px;display:flex;justify-content:flex-end;gap:10px}.certificate-footer-actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-weight:700;padding:8px 16px}@media print{.certificate-content[_ngcontent-%COMP%]{box-shadow:none;border:2px solid #2c3e50}.certificate-header[_ngcontent-%COMP%]{background:white!important;color:#000!important;-webkit-print-color-adjust:exact}.certificate-body[_ngcontent-%COMP%]{background:white!important;-webkit-print-color-adjust:exact}.certificate-section[_ngcontent-%COMP%], .certificate-signatures[_ngcontent-%COMP%]{page-break-inside:avoid;break-inside:avoid}.certificate-footer-actions[_ngcontent-%COMP%]{display:none}.modal[_ngcontent-%COMP%]{position:static!important}.modal-dialog[_ngcontent-%COMP%]{max-width:none!important;margin:0!important}}.responsive-btn[_ngcontent-%COMP%]{height:28px!important;min-height:24px!important;font-size:13px!important;padding:0rem .5rem!important;line-height:1.2!important;border-radius:4px!important;display:inline-flex;align-items:center;justify-content:center;transition:all .2s}@media (max-width: 768px){.responsive-btn[_ngcontent-%COMP%]{font-size:12px!important;height:24px!important;padding:0rem .3rem!important;width:100%;margin:2px 0!important}}@media (max-width: 768px){.certificate-header-section[_ngcontent-%COMP%]{flex-direction:column;gap:20px}.certificate-number[_ngcontent-%COMP%]{text-align:left}.info-row[_ngcontent-%COMP%], .device-info-row[_ngcontent-%COMP%]{grid-template-columns:1fr}.certificate-signatures[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:20px}.footer-badges[_ngcontent-%COMP%]{flex-direction:column;gap:10px}.certificate-main-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:1.8rem}}.modal-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;justify-content:center;align-items:center;z-index:10000}.modal-box[_ngcontent-%COMP%]{background:#fff;width:85%;border-radius:6px;box-shadow:0 0 20px #0000004d;max-height:90vh;overflow:hidden}.modal-header[_ngcontent-%COMP%]{background:#183055;color:#fff;padding:2px 15px;font-size:18px;display:flex;justify-content:space-between;align-items:center}.close-btn[_ngcontent-%COMP%]{cursor:pointer;font-size:22px;font-weight:700}.tabs[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #ddd}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:1px 18px;background:none;border:none;cursor:pointer;font-size:15px;border-right:1px solid #eee}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#e7f0ff;border-bottom:3px solid #0d6efd;font-weight:700}.tab-body[_ngcontent-%COMP%]{padding:15px;max-height:65vh;overflow:auto}.empty-msg[_ngcontent-%COMP%]{text-align:center;color:#666;padding:40px 0;font-size:16px}.close-btnM[_ngcontent-%COMP%]{font-size:26px;cursor:pointer;font-weight:700;color:#555;transition:.2s}.close-btnM[_ngcontent-%COMP%]:hover{color:#000;transform:scale(1.15)}.modal-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.45);display:flex;justify-content:center;align-items:center;z-index:9999}.modal-box[_ngcontent-%COMP%]{width:55%;background:#fff;border-radius:8px;overflow:hidden;animation:fadeIn .3s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@media (max-width: 576px){.modal-box[_ngcontent-%COMP%]{width:98vw!important;max-width:98vw!important;min-width:0!important;border-radius:4px;padding:0}.modal-header[_ngcontent-%COMP%], .tabs[_ngcontent-%COMP%], .tab-body[_ngcontent-%COMP%]{padding:8px!important;font-size:15px!important}.tabs[_ngcontent-%COMP%]{flex-wrap:wrap;gap:4px}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:13px!important;padding:6px 2px!important;min-width:90px;border-right:none;border-bottom:1px solid #eee}.tab-body[_ngcontent-%COMP%] object[_ngcontent-%COMP%]{height:160px!important}}']}),n})();const Ma=["masterForm"],wa=["f"];function Aa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",88),e.NdJ("click",function(){return e.CHM(t),e.oxw().goBackToDashboard()}),e._UZ(1,"i",89),e._uU(2," Back "),e.qZA()}}function Ia(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",90),e.NdJ("click",function(){return e.CHM(t),e.oxw().showForm("add")}),e._UZ(1,"i",91),e._uU(2," New Entry "),e.qZA()}}function Da(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",92),e.NdJ("click",function(){return e.CHM(t),e.oxw().showForm("details")}),e._UZ(1,"i",93),e._uU(2," Details "),e.qZA()}}function ka(n,a){if(1&n&&(e.TgZ(0,"ng-option",99),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.id),e.xp6(1),e.Oqu(t.name)}}function qa(n,a){1&n&&(e.TgZ(0,"div",100),e._uU(1," Assignment type is required. "),e.qZA())}function Oa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",94)(1,"div",95)(2,"label",96),e._uU(3," Assign To"),e.TgZ(4,"span",20),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",97),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().assignmentType=
1o})("change",function(){return e.CHM(t),e.oxw().onChangeAssignType()}),e.YNc(7,ka,2,2,"ng-option",98),e.qZA(),e.YNc(8,qa,2,0,"div",30),e.qZA()()}if(2&n){const t=e.oxw(),i=e.MAs(14);e.xp6(6),e.Q6J("ngModel",t.assignmentType),e.xp6(1),e.Q6J("ngForOf",t.assignmentToList),e.xp6(1),e.Q6J("ngIf",i.submitted&&!t.assignmentType)}}function Sa(n,a){if(1&n&&(e.TgZ(0,"ng-option",99),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function Fa(n,a){1&n&&(e.TgZ(0,"div",100),e._uU(1," Distributor selection is required. "),e.qZA())}function Na(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",94)(1,"div",95)(2,"label",96),e._uU(3," Select Distributor"),e.TgZ(4,"span",20),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",101),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().distributorObj=o})("change",function(){return e.CHM(t),e.oxw().onDistributorChange()}),e.YNc(7,Sa,2,2,"ng-option",98),e.qZA(),e.YNc(8,Fa,2,0,"div",30),e.qZA()()}if(2&n){const t=e.oxw(),i=e.MAs(14);e.xp6(6),e.Q6J("ngModel",t.distributorObj),e.xp6(1),e.Q6J("ngForOf",t.distributorList),e.xp6(1),e.Q6J("ngIf",i.submitted&&!t.distributorObj)}}function Ua(n,a){if(1&n&&(e.TgZ(0,"ng-option",99),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function La(n,a){if(1&n&&(e.TgZ(0,"div",100),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij(" ",t.assignmentType," selection is required. ")}}function Pa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",94)(1,"div",95)(2,"label",96),e._uU(3),e.TgZ(4,"span",20),e._uU(5,"*"),e.qZA()(),e.TgZ(6,"ng-select",102),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().userObj=o}),e.YNc(7,Ua,2,2,"ng-option",98),e.qZA(),e.YNc(8,La,2,1,"div",30),e.qZA()()}if(2&n){const t=e.oxw(),i=e.MAs(14);e.xp6(3),e.hij(" Select ",t.assignmentType,""),e.xp6(3),e.MGl("placeholder","Select ",t.assignmentType,""),e.Q6J("ngModel",t.userObj),e.xp6(1),e.Q6J("ngForOf",t.userList),e.xp6(1),e.Q6J("ngIf",i.submitted&&!t.userObj)}}function Ja(n,a){1&n&&(e.TgZ(0,"div",103)(1,"div",104)(2,"span",105),e._uU(3,"Loading..."),e.qZA()()())}function Va(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",106)(1,"div",107)(2,"input",108),e.NdJ("ngModelChange",function(o){return e.CHM(t).$implicit.selected=o}),e.qZA(),e.TgZ(3,"label",109),e._uU(4),e.qZA()()()}if(2&n){const t=a.$implicit,i=a.index;e.xp6(2),e.MGl("name","imei",i,"")("id","imei",t.deviceimeino,""),e.Q6J("ngModel",t.selected),e.xp6(1),e.MGl("for","imei",t.deviceimeino,""),e.xp6(1),e.hij(" ",t.deviceimeino," ")}}function Ra(n,a){1&n&&(e.TgZ(0,"div",103)(1,"div",104)(2,"span",105),e._uU(3,"Loading..."),e.qZA()()())}function Qa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",106)(1,"div",107)(2,"input",108),e.NdJ("ngModelChange",function(o){return e.CHM(t).$implicit.selected=o}),e.qZA(),e.TgZ(3,"label",109),e._uU(4),e.qZA()()()}if(2&n){const t=a.$implicit,i=a.index;e.xp6(2),e.MGl("name","imei",i,"")("id","imei",t.deviceimeino,""),e.Q6J("ngModel",t.selected),e.xp6(1),e.MGl("for","imei",t.deviceimeino,""),e.xp6(1),e.hij(" ",t.deviceimeino," ")}}function Ea(n,a){1&n&&(e.TgZ(0,"div",100),e._uU(1," Please select at least one IMEI. "),e.qZA())}function Ya(n,a){if(1&n&&(e.TgZ(0,"button",110)(1,"span"),e._uU(2,"Assign Device"),e.qZA()()),2&n){const t=e.oxw();e.Q6J("disabled",!t.userObj||!t.getSelectedImeis().length)}}function ja(n,a){1&n&&(e.TgZ(0,"button",111)(1,"span"),e._uU(2,"Un-Assign Device"),e.qZA()())}function Ha(n,a){1&n&&(e.TgZ(0,"ng-option",112),e._uU(1,"20"),e.qZA())}function za(n,a){1&n&&(e.TgZ(0,"ng-option",113),e._uU(1,"50"),e.qZA())}function Ba(n,a){1&n&&(e.TgZ(0,"ng-option",114),e._uU(1,"100"),e.qZA())}function $a(n,a){if(1&n&&(e.TgZ(0,"ng-option",99),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}const Ga=function(n,a){return{"sim-tooltip-top":n,"sim-tooltip-bottom":a}};function Wa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",134)(1,"div",135)(2,"span"),e._UZ(3,"i",136),e._uU(4),e.qZA(),e.TgZ(5,"button",137),e.NdJ("click",function(){return e.CHM(t),e.oxw(6).closeSimTooltip()}),e.qZA()(),e.TgZ(6,"div",138)(7,"div",139),e._UZ(8,"i",140),e._uU(9,"\xa0\xa0"),e.TgZ(10,"strong")(11,"span",141),e._uU(12,"Primary SIM
1No.:"),e.qZA()(),e.TgZ(13,"span",142),e._uU(14),e.qZA()(),e.TgZ(15,"div",139),e._UZ(16,"i",140),e._uU(17,"\xa0\xa0"),e.TgZ(18,"strong")(19,"span",141),e._uU(20,"Device Model:"),e.qZA()(),e.TgZ(21,"span",142),e._uU(22),e.qZA()(),e.TgZ(23,"div",139),e._UZ(24,"i",140),e._uU(25,"\xa0\xa0"),e.TgZ(26,"strong")(27,"span",141),e._uU(28,"M2M Provider:"),e.qZA()(),e.TgZ(29,"span",142),e._uU(30),e.qZA()(),e.TgZ(31,"div",139),e._UZ(32,"i",140),e._uU(33,"\xa0\xa0"),e.TgZ(34,"strong")(35,"span",141),e._uU(36,"Primary SIM Network:"),e.qZA()(),e.TgZ(37,"span",142),e._uU(38),e.qZA()(),e.TgZ(39,"div",139),e._UZ(40,"i",140),e._uU(41,"\xa0\xa0"),e.TgZ(42,"strong")(43,"span",141),e._uU(44,"Primary SIM Validity:"),e.qZA()(),e.TgZ(45,"span",142),e._uU(46),e.qZA()(),e.TgZ(47,"div",139),e._UZ(48,"i",140),e._uU(49,"\xa0\xa0"),e.TgZ(50,"strong")(51,"span",141),e._uU(52,"Secondary SIM No.:"),e.qZA()(),e.TgZ(53,"span",142),e._uU(54),e.qZA()(),e.TgZ(55,"div",139),e._UZ(56,"i",140),e._uU(57,"\xa0\xa0"),e.TgZ(58,"strong")(59,"span",141),e._uU(60,"Secondary SIM Network:"),e.qZA()(),e.TgZ(61,"span",142),e._uU(62),e.qZA()(),e.TgZ(63,"div",139),e._UZ(64,"i",140),e._uU(65,"\xa0\xa0"),e.TgZ(66,"strong")(67,"span",141),e._uU(68,"Secondary SIM Validity:"),e.qZA()(),e.TgZ(69,"span",142),e._uU(70),e.qZA()()()()}if(2&n){const t=e.oxw().$implicit,i=e.oxw(5);e.Q6J("ngClass",e.WLB(11,Ga,"top"===i.simTooltipPosition,"bottom"===i.simTooltipPosition))("ngStyle",i.simTooltipStyle),e.xp6(4),e.hij(" ICCID No.\xa0 - \xa0",t.deviceiccidno||"NA",""),e.xp6(10),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.primarysimno)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.devicemodel)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.m2mprovider)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.primarynetwork)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.primarysimvalidity)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.secondrysimno)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.secondrynetwork)||"NA"),e.xp6(8),e.Oqu((null==i.selectedSimInfo?null:i.selectedSimInfo.secondrysimvalidity)||"NA")}}const Ka=function(n){return{"active-iccid":n}};function Xa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA(),e.TgZ(5,"td",128)(6,"button",129,130),e.NdJ("click",function(){const o=e.CHM(t),s=o.$implicit,r=o.index,c=e.MAs(7);return e.oxw(5).showSimInfo(s,r,c)}),e._uU(8),e.qZA(),e.YNc(9,Wa,71,14,"div",131),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA(),e.TgZ(12,"td")(13,"button",132),e.NdJ("click",function(){const s=e.CHM(t).$implicit,r=e.oxw(3).$implicit;return e.oxw(2).setDataForUnassign(r,s)}),e._UZ(14,"i",133),e._uU(15," Unassign"),e.qZA()()()}if(2&n){const t=a.$implicit,i=a.index,o=e.oxw(5);e.ekj("search-match",t.isSearchMatch),e.xp6(2),e.Oqu(t.dealername||"N/A"),e.xp6(2),e.Oqu(t.deviceimeino||"NA"),e.xp6(2),e.Q6J("ngClass",e.VKq(9,Ka,o.simTooltipIndex===i)),e.xp6(2),e.hij(" ",t.deviceiccidno||"NA"," "),e.xp6(1),e.Q6J("ngIf",o.simTooltipIndex===i),e.xp6(2),e.Oqu(t.deviceserialno||"NA"),e.xp6(2),e.Q6J("disabled",""==t.deviceid)}}function es(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Xa,16,11,"tr",127),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngForOf",t.devicejsondetails)}}function ts(n,a){if(1&n&&(e.TgZ(0,"tr",119)(1,"td",120)(2,"div",121)(3,"div",122),e._UZ(4,"div",123)(5,"div",124)(6,"div",125),e.qZA(),e.TgZ(7,"table",126)(8,"thead")(9,"tr")(10,"th"),e._uU(11,"Dealer Name"),e.qZA(),e.TgZ(12,"th",60),e._uU(13,"IMEI NO."),e.qZA(),e.TgZ(14,"th",60),e._uU(15,"ICCID No."),e.qZA(),e.TgZ(16,"th",60),e._uU(17,"Serial No."),e.qZA(),e.TgZ(18,"th"),e._uU(19," Action "),e.qZA()()(),e.YNc(20,es,2,1,"tbody",62),e.qZA()()()()),2&n){const t=e.oxw().$implicit;e.xp6(20),e.Q6J("ngIf",""!=t.devicejsondetails[0].deviceid)}}function is(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"tr",116)(2,"td"),e._uU(3),e.TgZ(4,"i",117),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).toggleRow(s)}),e.qZA()(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td"),e._uU(8),e.qZA()(),e.YNc(9,ts,21,1,"tr",118),e.BQk()}if(2&n){const t=a.$implicit;e.xp6(1),e.ekj("expanded",t.expanded)("search-parent",t.isParentMatch),e.xp6(2),e.hij("",t.rowno,"\xa0\xa0 "),e.xp6(1),e.Gre("fa ",t.expanded?"fa-minus-square":"fa-plus-square"," toggle-icon"),e.xp6(2),e.Oqu(t.distributorname||"N/A"),e.xp6(2),e.Oqu(t.assigndate||"N/A"),e.xp6(1),e.Q6J("ngIf",t.expanded)}}
1function ns(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,is,10,11,"ng-container",115),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.displayDetailData)}}function os(n,a){1&n&&(e.TgZ(0,"tr")(1,"td",143),e._uU(2,"No records found."),e.qZA()())}function as(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",144)(1,"ngb-pagination",145),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Device Master","Click page number button","Change Event","")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}function ss(n,a){1&n&&(e.TgZ(0,"span",74),e._uU(1,"Remark is mandatory"),e.qZA())}function rs(n,a){1&n&&(e.TgZ(0,"div",100),e._uU(1," Unassign type is required. "),e.qZA())}function ls(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",36)(1,"label",96),e._uU(2," Unassign From"),e.TgZ(3,"span",20),e._uU(4,"*"),e.qZA()(),e.TgZ(5,"ng-select",146),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().unassignType=o}),e.TgZ(6,"ng-option",147),e._uU(7,"Dealer"),e.qZA(),e.TgZ(8,"ng-option",148),e._uU(9,"Distributor"),e.qZA()(),e.YNc(10,rs,2,0,"div",30),e.qZA()}if(2&n){const t=e.oxw(),i=e.MAs(116);e.xp6(5),e.Q6J("ngModel",t.unassignType),e.xp6(5),e.Q6J("ngIf",i.submitted&&!t.unassignType)}}function cs(n,a){1&n&&(e.TgZ(0,"span",74),e._uU(1,"Remark is mandatory"),e.qZA())}let ds=(()=>{class n{constructor(t,i,o,s,r,c,f){this.cv=t,this.cs=i,this.loader=o,this.activatedRoute=s,this.es=r,this.route=c,this.listService=f,this.unassignedDeviceLoading=!1,this.deviceListLoading=!1,this.showSimPopup=!1,this.selectedSimInfo=null,this.simTooltipIndex=null,this.simTooltipPosition="bottom",this.simTooltipStyle={},this.assignflag=!1,this.unassignflag=!1,this.assignmentType=null,this.assignmentToList=[{id:"dealer",name:"Dealer"},{id:"distributor",name:"Distributor"}],this.distributorObj=null,this.distributorList=[],this.masterFormRequest=new u.Fy,this.buttonName="Submit",this.apiname="",this.formsection=!1,this.detailsparam=new u.cZ,this.detailData=[],this.pageHeading="Device Assign/ Unassign",this.updateFlag=!1,this.deleteremark="",this.onclickeventmessage="",this.stateList=[],this.cityList=[],this.filePath="",this.deviceList=[],this.unassignedDeviceList=[],this.isFromDashboard=!1,this.loginRoleId=sessionStorage.getItem("loginroleid"),this.diviceListReq=new u.jJ,this.imeiList=[],this.formData={dealerId:""},this.searchQuery="",this.displayDetailData=[],this.allDevices=[],this.filteredDevices=[],this.jsonData=new u.A_,this.oldData=new u.g6,this.unassignremark="",this.unassignType="distributor",this.sortDir=1,this.deviceListBackup=[],this.unassignedDeviceListBackup=[]}showSimInfo(t,i,o){this.selectedSimInfo=t,this.simTooltipIndex=i;let s=0;if(this.detailData){const r=this.detailData.find(c=>c.expanded);r&&r.devicejsondetails&&(s=r.devicejsondetails.length)}if(o){const r=o.getBoundingClientRect(),c=250,D=window.innerHeight-r.bottom,w=r.top>=c+10;this.simTooltipPosition=D>=c+10?"bottom":"top",s>0&&i>=s-2&&w&&(this.simTooltipPosition="top");const k=320,j=Math.max(10,Math.min(r.left+r.width/2-k/2,window.innerWidth-k-10));this.simTooltipStyle={position:"fixed",top:("top"===this.simTooltipPosition?Math.max(r.top-10-c,10):Math.min(r.bottom+10,window.innerHeight-c-10))+"px",left:j+"px",transform:"none",zIndex:99999}}else this.simTooltipStyle={}}closeSimTooltip(){this.simTooltipIndex=null}ngOnInit(){"fromvehicle"==sessionStorage.getItem("redirectfrom")?(this.Details(""),this.showForm("add")):this.Details(""),this.detailData.forEach(i=>{i.devicejsondetails&&this.allDevices.push(...i.devicejsondetails)}),this.filteredDevices=this.allDevices,this.activatedRoute.queryParams.subscribe(i=>{this.isFromDashboard="true"===i.fromDashboard;const o=i.status,s=i.filter3;this.isFromDashboard&&"dealerwise"===o&&s?(this.detailsparam.searchby=o,this.detailsparam.filter1=s,this.Details("search")):this.Details("")})}getDistributorList(){this.listService.getDistributorList(new u.nO).then(t=>{this.distributorList=t})}onChangeAssignType(){this.userObj=null,this.userList=[],this.distributorObj=null,this.distributorList=[],this.deviceList=[],"dealer"==this.assignmentType?this.getDistributorList():"distributor"==this.assignmentType&&this.listService.getDistributorList(new u.nO).then(t=>{this.userList=t,this.getDeviceList("assigndevicetodistributor")})}goBackToDashboard(){switch(sessionStorage.getItem("loginroleid")){case"110":case"100":this.route.navigate(["/dashboard/stateadmindashboard"]);break;case"101":default:this.route.navigate(["/dashboard/vendordashboard"]);break;case"104":this.route.navigate(["/dashboard/rtodashboard"]);break;case"121":this.route.navigate(["/dashboard/dealerdashboard"])}}getDeviceList(t=""){this.deviceListLoading=!0,this.diviceListReq.status=t,this.listService.getDeviceList(this.diviceListReq).then(i=>{this.deviceListBackup=[...i],this.deviceList=i,this.deviceListLoading=!1}
1).catch(()=>{this.deviceListLoading=!1})}getDeviceListForUnassigned(){this.unassignedDeviceLoading=!0;let t=new u.jJ;t.status="unassigndevicetodealer",t.filter2=this.userObj.id,this.listService.getDeviceList(t).then(i=>{this.unassignedDeviceListBackup=[...i],this.unassignedDeviceList=i,this.unassignedDeviceLoading=!1}).catch(()=>{this.unassignedDeviceLoading=!1})}showForm(t){this.deviceList=[],this.unassignedDeviceList=[],this.assignmentType=null,"add"==t?($(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(i){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),i.preventDefault()}),this.updateFlag=!1,this.assignflag=!0,this.unassignflag=!1,$("#assignDiv").show(),$("#unassignDiv").hide(),this.formsection=!0,this.pageHeading="Device Assign To Dealer Form",this.buttonName="Submit",this.userObj=null,this.deviceListBackup.forEach(i=>{i.selected=!1}),this.deviceList.forEach(i=>{i.selected=!1}),setTimeout(()=>{"111"==this.loginRoleId&&(this.assignmentType="Dealer",this.onDistributorChange())},500)):(this.formsection=!1,this.assignflag=!1,this.unassignflag=!0,$("#assignDiv").hide(),$("#unassignDiv").show(),$("#form_id")[0].reset(),this.updateFlag=!1,this.getDeviceListForUnassigned()),this.Details("")}showDetails(){this.updateFlag=!1,this.formsection=!1,this.pageHeading="Device Assign/ Unassign"}showConfirmModal(t){this.masterFormRequest.dealerid=t,this.f.resetForm()}getSelectedImeis(){return this.deviceListBackup.filter(t=>t.selected).map(t=>t.deviceimeino)}onSubmit(t){if(this.loader.loaderOn(),("dealer"==this.assignmentType||"Dealer"==this.assignmentType)&&(this.masterFormRequest.dealerid=this.userObj?this.userObj.id:"",this.masterFormRequest.distributorid=this.distributorObj?this.distributorObj.id:"",this.masterFormRequest.status="2"),"distributor"==this.assignmentType&&(this.masterFormRequest.distributorid=this.userObj?this.userObj.id:"",this.masterFormRequest.dealerid="",this.masterFormRequest.status="1"),this.assignflag){const i=this.deviceListBackup.filter(o=>o.selected);if(0===i.length)return void(this.loader.responseMessage="Please select at least one device IMEI.");this.masterFormRequest.deviceidlist=i.map(o=>o.deviceid),this.es.apiCall(this.masterFormRequest,"master/deviceassign").subscribe(o=>{this.loader.loaderOff(),"200"===o.statusCode?(this.loader.responseMessage=o.entity,this.loader.successNotification(),t.resetForm(),$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),this.deviceListBackup.forEach(s=>s.selected=!1),this.unassignedDeviceListBackup.forEach(s=>s.selected=!1),this.deviceList.forEach(s=>s.selected=!1),this.unassignedDeviceList.forEach(s=>
1s.selected=!1),this.showDetails(),this.Details(""),this.assignflag=!1,this.unassignflag=!1):(this.loader.responseMessage=o.entity,this.loader.failedNotification())},o=>{this.loader.loaderOff()})}}onDistributorChange(){if(this.userObj=null,this.userList=[],("dealer"==this.assignmentType||"Dealer"==this.assignmentType)&&(this.distributorObj||"111"==this.loginRoleId)){let t=new u.nO;t.filter1=this.distributorObj?this.distributorObj.id:"",this.listService.getDealerList(t).then(i=>{this.userList=i,this.diviceListReq.filter1=this.distributorObj?this.distributorObj.id:"",this.getDeviceList("assigndevicetodealer")})}}Details(t){var i=this;return(0,I.Z)(function*(){try{i.loader.loaderOff()}catch(o){}"all"==t&&(i.detailsparam=new u.cZ),"showrow"==t&&(i.detailsparam.pageno=1),"search"==t&&(i.detailsparam.pageno=1),"refresh"==t&&(i.detailsparam=new u.cZ),i.detailsparam.searchby=i.detailsparam.searchby.trim();try{i.loader.loaderOn()}catch(o){}i.es.apiCall(i.detailsparam,`${de.n.assignDeviceToDealer}`).subscribe(o=>{i.onclickeventmessage=o.entity;try{i.loader.loaderOff()}catch(s){}if(200==o.statusCode){i.detailData=o.entity.devicedetails,i.totalCount=+o.entity.totalrecord,i.recordFrom=i.detailData[0].rowno,i.recordTo=i.detailData[i.detailData.length-1].rowno,i.displayDetailData=[...i.detailData];let r=[];o.entity.devicedetails.forEach(c=>{c.devicejsondetails&&(r=r.concat(c.devicejsondetails))}),i.allDevices=r,i.filteredDevices=r,i.searchQuery&&i.applyDetailSearch(i.searchQuery)}else $("#loader").hide(),i.detailData=[],i.recordTo=0,i.recordFrom=0,i.totalCount=0,i.detailsparam.searchby=""},o=>{i.loader.loaderOff()})})()}searchDevices(t){return t?(t=t.toLowerCase(),this.allDevices.filter(i=>i.deviceimeino&&i.deviceimeino.toLowerCase().includes(t)||i.deviceserialno&&i.deviceserialno.toLowerCase().includes(t)||i.deviceiccidno&&i.deviceiccidno.toLowerCase().includes(t)||i.devicemodel&&i.devicemodel.toLowerCase().includes(t)||i.dealername&&i.dealername.toLowerCase().includes(t))):this.allDevices}applyDetailSearch(t){if(this.searchQuery=(t||"").toString().trim(),!this.detailData||0===this.detailData.length)return void(this.displayDetailData=[]);if(!this.searchQuery)return this.detailData.forEach(o=>{o.expanded=!1,o.isParentMatch=!1,o.devicejsondetails&&o.devicejsondetails.length&&o.devicejsondetails.forEach(s=>s.isSearchMatch=!1)}),void(this.displayDetailData=[...this.detailData]);const i=this.searchQuery.toLowerCase();this.displayDetailData=this.detailData.reduce((o,s)=>{var r;const c=null===(r=s.distributorname)||void 0===r?void 0:r.toString().toLowerCase().includes(i);let f=0;return s.devicejsondetails&&s.devicejsondetails.length&&(s.devicejsondetails=s.devicejsondetails.map(D=>{var w,x,k,q;const j=(null===(w=D.deviceimeino)||void 0===w?void 0:w.toString().toLowerCase().includes(i))||(null===(x=D.deviceserialno)||void 0===x?void 0:x.toString().toLowerCase().includes(i))||(null===(k=D.deviceiccidno)||void 0===k?void 0:k.toString().toLowerCase().includes(i))||(null===(q=D.dealername)||void 0===q?void 0:q.toString().toLowerCase().includes(i));return j&&f++,Object.assign(Object.assign({},D),{isSearchMatch:j})})),s.isParentMatch=c,s.expanded=c||f>0,(c||f>0)&&o.push(s),o},[])}onSearch(t){const i=t.target.value;this.searchQuery=i,this.applyDetailSearch(i),this.filteredDevices=this.searchDevices(i)}clearSearch(){this.searchQuery="",this.applyDetailSearch(""),this.filteredDevices=this.searchDevices("")}setData(t){this.oldData=t,$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(i){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),i.preventDefault()}),this.updateFlag=!0,this.assignflag=!1,this.unassignflag=!0,$("#assignDiv").hide(),$("#unassignDiv").show(),this.buttonName="Unassign",this.userObj=this.userList.find(i=>i.id===t.dealerid),this.unassignedDeviceList=t.devicejsondetails.map(i=>({deviceid:i.deviceid,deviceimeino:i.deviceimeino,devicesimno:i.devicesimno,selected:!1})),this.unassignedDeviceListBackup=[...this.unassignedDeviceList]}setDataForUnassign(t,i){this.unassignremark="",this.oldData=t,this.jsonData=i,this.unassignType=""==this.jsonData.dealerid||null==this.jsonData.dealerid?"distributor":"dealer",$("#unassignModal").modal("show")}unassignDevice(t){"dealer"==this.unassignType&&(this.masterFormRequest.dealerid=this.jsonData.dealerid,this.masterFormRequest.distributorid=this.oldData.distributorid,this.masterFormRequest.status="2"),"distributor"==this.unassignType&&(this.masterFormRequest.distributorid=this.oldData.distributorid,this.masterFormRequest.dealerid="",this.masterFormRequest.status="1"),this.masterFormRequest.deviceidlist=[this.jsonData.deviceid],this.masterFormRequest.remarks=this.unassignremark,this.es.apiCall(this.masterFormRequest,"master/deviceunassign").subscribe(i=>{this.loader.loaderOff(),"200"===i.statusCode?($("#unassignModal").modal("hide"),this.unassignremark="",this.loader.responseMessage=i.entity,this.loader.successNotification(),t.resetForm(),$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),this.deviceListBackup.forEach(o=>o.selected=!1),this.deviceList.forEach(o=>o.selected=!1),this.unassignedDeviceListBackup.forEach(o=>o.selected=!1),this.unassignedDeviceList.forEach(o=>
1o.selected=!1),this.showDetails(),this.Details(""),this.assignflag=!1,this.unassignflag=!1):(this.loader.responseMessage=i.entity,this.loader.failedNotification())},i=>{this.loader.loaderOff()})}delete(t){let i=this.deleteremark;if(0==i.length&&(this.deleteremark=""),t.valid&&0!=i.length){let o={remarks:this.deleteremark,dealerid:this.masterFormRequest.dealerid};this.loader.loaderOn(),this.es.apiCall(o,"master/deletedealer").subscribe(s=>{this.loader.loaderOff(),"200"==s.statusCode?($("#deleteModal").modal("hide"),this.loader.responseMessage=s.entity,this.loader.successNotification(),t.resetForm(),this.showDetails(),this.Details("")):(this.loader.responseMessage=s.entity,this.loader.failedNotification())},s=>{this.loader.loaderOff(),this.loader.logout()})}}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}downloadDoc(t){let i=new u.cZ;i.pdfexcel=t,i.itemperpage=0,i.pageno=0,i.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.es.apiCall(i,"master/dealerdetails").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.es.commonFileDownload(this.filePath),this.detailsparam.pdfexcel=""):this.detailsparam.pdfexcel=""})}searchImei(){var t;const i=null===(t=this.imeiFilter)||void 0===t?void 0:t.trim();this.deviceList=i?this.deviceListBackup.filter(o=>{var s;return null===(s=o.deviceimeino)||void 0===s?void 0:s.toString().includes(i)}):[...this.deviceListBackup]}toggleRow(t){this.detailData.forEach(i=>{i!==t&&(i.expanded=!1)}),t.expanded=!t.expanded}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(v.gz),e.Y36(P.P),e.Y36(v.F0),e.Y36(z.X))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-device-assign-to-dealer"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Ma,5),e.Gf(wa,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.masterForm=o.first),e.iGM(o=e.CRH())&&(i.f=o.first)}},decls:154,vars:39,consts:[[1,"page-header","d-flex","justify-content-between","align-items-center"],[1,"page-title"],[1,"mainptable-toolbarageheader","newtitle"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"page-actions"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard","class","btn-action",3,"click",4,"ngIf"],["id","showFilePanel","class","btn-action",3,"click",4,"ngIf"],["class","btn-action success",3,"click",4,"ngIf"],[1,"card","grid-container"],[1,"notification-container","dismiss"],[1,"card","entrycard"],[1,"card-body","p-2"],[3,"ngSubmit"],["assignForm","ngForm"],[1,"row"],[1,"col-md-5"],[1,"card-label-subheading",2,"color","#184365"],["aria-hidden","true",1,"fa","fa-pencil"],[1,"col-md-6"],[1,"mendatorynote"],[1,"mendatorystar"],[1,"col-md-1",2,"float","right"],["id","closeFilePanel",1,"close"],[1,"row","form-section","entrydiv"],["class","col-md-3",4,"ngIf"],[1,"col-md-12","border","rounded-3","p-3","bg-light"],["id","unassignDiv",1,"row","unassigned-imei-scroll"],["class","w-100 text-center my-3",4,"ngIf"],["class","col-md-3 col-sm-6 col-12 mb-2",4,"ngFor","ngForOf"],["id","assignDiv",1,"row","imei-scroll"],["class","text-danger small mt-1",4,"ngIf"],[1,"text-center"],["type","submit","class","btn btn-success shadow-sm","style"," padding: 0.25rem 1rem;",3,"disabled",4,"ngIf"],["type","submit","class","btn btn-success shadow-sm","style"," padding: 0.25rem 1rem;",4,"ngIf"],[1,"card-body","p-3"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-toolbar","d-flex","flex-wrap","align-items-center","justify-content-between","mb-1"],[1,"d-flex","flex-wrap","align-items-center","gap-2"],[1,"entries-info"],["placeholder","Show Rows",1,"w-auto",3,"ngModel","clearable","ngModelChange","change"],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],["ngbTooltip","Refresh",1,"btn","btn-sm","btn-outline-success",3,"click"],[1,"fa","fa-refresh"],[1,"input-group",2,"width","260px"],["type","text","placeholder","Search device...","name","searchQueryInput",1,"form-control","form-control-sm",3,"ngModel","ngModelChange","input"],["type","button","ngbTooltip","Clear search",1,"btn","btn-sm","btn-outline-secondary",3,"disabled","click"],[1,"fa","fa-times"],["ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","btn-danger",3,"disabled","click"],[1,"fa","fa-file-pdf-o"],["ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","btn-success",3,"disabled","click"],[1,"fa","fa-file-excel-o"],[1,"table-responsive"],[1,"custom-table","table","table-hover","table-striped","mb-0"],[1,"table-light"],[2,"width","50px","cursor","pointer"],[2,"cursor","pointer"],[1,"fa","fa-sort-amount-desc","tablesortico"],[4,"ngIf"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","deleteModal","tabindex","-1","role","dialog","aria-labelledby","ModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal
1-sm"],[1,"modal-content"],[1,"modal-header","p-1"],["id","ModalLabel",1,"modal-title"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"close"],["novalidate","",3,"ngSubmit"],["f","ngForm"],[1,"modal-body","p-3"],[1,"text-danger"],["type","text","minlength","3","maxlength","100","name","delete_remark","placeholder","Remark","required","",1,"form-control",3,"ngModel","ngModelChange","keypress"],["delete_remarkCtrl","ngModel"],["class","text-danger",4,"ngIf"],[1,"modal-footer","text-center","p-0"],["type","submit",1,"btn","btn-primary","p-2"],["type","button","data-bs-dismiss","modal",1,"btn","btn-secondary","p-2"],["id","unassignModal","tabindex","-1","role","dialog","aria-labelledby","ModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal-md"],["unassignForm","ngForm"],[1,"col-md-6","mb-2","small"],["class","col-md-12",4,"ngIf"],["type","text","minlength","3","maxlength","100","name","unassign_remark","placeholder","Remark","required","",1,"form-control",3,"ngModel","ngModelChange","keypress"],["unassign_remarkCtrl","ngModel"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard",1,"btn-action",3,"click"],[1,"fa","fa-arrow-left"],["id","showFilePanel",1,"btn-action",3,"click"],[1,"fa","fa-pencil-square"],[1,"btn-action","success",3,"click"],[1,"fa","fa-list-alt"],[1,"col-md-3"],[1,"mb-3"],[1,"form-label","fw-semibold"],["name","assignmentType","placeholder","Select Type","required","",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"text-danger","small","mt-1"],["name","distributorObj","placeholder","Select Distributor","required","",3,"ngModel","ngModelChange","change"],["name","userObj","required","",3,"ngModel","placeholder","ngModelChange"],[1,"w-100","text-center","my-3"],["role","status",1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"col-md-3","col-sm-6","col-12","mb-2"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","name","id","ngModelChange"],[1,"form-check-label","small",3,"for"],["type","submit",1,"btn","btn-success","shadow-sm",2,"padding","0.25rem 1rem",3,"disabled"],["type","submit",1,"btn","btn-success","shadow-sm",2,"padding","0.25rem 1rem"],["value","20"],["value","50"],["value","100"],[4,"ngFor","ngForOf"],[1,"parent-row"],[3,"click"],["class","child-row",4,"ngIf"],[1,"child-row"],["colspan","12"],[1,"child-table-container"],[1,"connection-line"],[1,"vertical-line"],[1,"horizontal-line"],[1,"arrow-head"],[1,"table","table-sm","child-table"],[3,"search-match",4,"ngFor","ngForOf"],[1,"position-relative"],["ngbTooltip","View Device Details",1,"btn","p-0","fw-bolder",2,"color","rgb(0 104 188)","font-size","12px",3,"ngClass","click"],["iccidBtn",""],["class","sim-tooltip-box animate__animated animate__fadeIn",3,"ngClass","ngStyle",4,"ngIf"],["id","updatesidepanel","type","button","data-toggle","tooltip","data-placement","top","title","View Details",1,"btn","btn-success","btn-sm","p-1","me-2",2,"border","1px solid #06665e","font-size","10px",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-pencil",2,"font-size","10px"],[1,"sim-tooltip-box","animate__animated","animate__fadeIn",3,"ngClass","ngStyle"],[1,"sim-tooltip-header","text-dark","fw-bolder","rounded-top","px-2","py-1","d-flex","justify-content-between","align-items-left;"],[1,"fa","fa-sim-card"],["type","button",1,"btn-close","btn","btn-sm","btn-light","ms-2",3,"click"],[1,"sim-tooltip-body","bg-white","rounded-bottom","px-2","py-2"],[1,"mb-2"],["aria-hidden","true",1,"fa","fa-dot-circle-o"],[2,"width","140px","display","inline-block"],[1,"text-primary","fw-bolder"],["colspan","12",1,"text-center"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","jus","margin-bottom:","10px;tify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],["name","unassignType","placeholder","Select Type","required","",3,"ngModel","ngModelChange"],["value","dealer"],["value","distributor"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e._uU(4),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,Aa,3,0,"button",5),e.YNc(7,Ia,3,0,"button",6),e.YNc(8,Da,3,0,"button",7),e.qZA()(),e.TgZ(9,"div",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"form",12,13),e.NdJ("ngSubmit",function(){e.CHM(o);const r=e.MAs(14);return i.onSubmit(r)}),e.TgZ(15,"div",14)(16,"div",15)(17,"h6",16),e._UZ(18,"i",17),e._uU(19,"\xa0\xa0\xa0Device Assign Form "),e.qZA()(),e.TgZ(20,"div",18)(21,"span",19)(22,"b"),e._uU(23," Note\xa0:-\xa0\xa0 "),e.TgZ(24,"span",20),e._uU(25,'" * "'),e.qZA(),e._uU(26,"\xa0Indicates Mandatory Fields. "),e.qZA()()(),e.TgZ(27,"div",21),e._UZ(28,"div",22),e.qZA()(),e.TgZ(29,"div",23),e.YNc(30,Oa,9,3,"div",24),e.YNc(31,Na,9,3,"div",24),e.YNc(32,Pa,9,5,"div",24),e.TgZ(33,"div",25)(34,"div",26),e.YNc(35,Ja,4,0,"div",27),e.YNc(36,Va,5,5,"div",28),e.qZA(),e.TgZ(37,"div",29),e.YNc(38,Ra,4,0,"div",27),e.YNc(39,Qa,5,5,"div",28),e.qZA()(),e.YNc(40,Ea,2,0,"div",30),e.TgZ(41,"div",31),e.YNc(42,Ya,3,1,"button",32),e.YNc(43,ja,3,0,"button",33),e.qZA()()()()()(),e.TgZ(44,"div",34)(45,"div",35)(46,"div",36)(47,"div",37)(48,"div",38)(49,"span",39),e._uU(50),e.qZA(),e.TgZ(51,"ng-select",40),e.NdJ("ngModelChange",function(r){return i.detailsparam.itemperpage=r})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam.itemperpage,"Vehicle Master","Select rows","Change Event","")}),e.YNc(52,Ha,2,0,"ng-option",41),e.YNc(53,za,2,0,"ng-option",42),e.YNc(54,Ba,2,0,"ng-option",43),e.YNc(55,$a,2,2,"ng-option",44),e.qZA()(),e.TgZ(56,"div",45)(57,"button",46),e.NdJ("click",function(){return i.Details("refresh"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click refresh button","Click Event","")}),e._UZ(58,"i",47),e.qZA(),e.TgZ(59,"div",48)(60,"input",49),e.NdJ("ngModelChange",function(r){return i.searchQuery=r})("input",function(){return i.applyDetailSearch(i.searchQuery)}),e.qZA(),e.TgZ(61,"button",50),e.NdJ("click",function(){return i.clearSearch()}),e._UZ(62,"i",51),e.qZA()(),e.TgZ(63,"button",52),e.NdJ("click",function(){return i.downloadDoc("pdf"),i.es.pageDataInfo("",i.detailsparam,"Device Assign To Dealer","Click PDF button","Click Event","")}),e._UZ(64,"i",53),e.qZA(),e.TgZ(65,"button",54),e.NdJ("click",function(){return i.downloadDoc("excel"),i.es.pageDataInfo("",i.detailsparam,"Device Assign To Dealer","Click Excel button","Click Event","")}),e._UZ(66,"i",55),e.qZA()()(),e.TgZ(67,"div",56)(68,"table",57)(69,"thead",58)(70,"tr")(71,"th",59),e._uU(72,"#"),e.qZA(),e.TgZ(73,"th",60),e._uU(74,"Distributor Name "),e._UZ(75,"i",61),e.qZA(),e.TgZ(76,"th",60),e._uU(77,"Last Assignment Date "),e._UZ(78,"i",61),e.qZA()()(),e.YNc(79,ns,2,1,"tbody",62),e.TgZ(80,"tbody"),e.YNc(81,os,3,0,"tr",62),e.qZA()()(),e.TgZ(82,"div",63),e.YNc(83,as,2,4,"div",64),e.qZA()()()()(),e.TgZ(84,"div",65)(85,"div",66)(86,"div",67)(87,"div",68)(88,"h5",69),e._uU(89,"Delete"),e.qZA(),e._UZ(90,"button",70),e.qZA(),e.TgZ(91,"form",71,72),e.NdJ("ngSubmit",function(){e.CHM(o);const r=e.MAs(92);return i.delete(r),i.es.pageDataInfo("",i.masterFormRequest.dealerid,"Dealer Master","Delete Dealer","Click Event","")}),e.TgZ(93,"div",73)(94,"div",14)(95,"div",36)(96,"label"),e._uU(97,"Remark"),e.TgZ(98,"span",74),e._uU(99,"*"),e.qZA()(),e.TgZ(100,"textarea",75,76),e.NdJ("ngModelChange",function(r){return i.deleteremark=r})("keypress",function(r){return i.cv.addressValidation(r)}),e.qZA(),e.YNc(102,ss,2,0,"span",77),e.qZA()()(),e.TgZ(103,"div",78)(104,"button",79),e._uU(105,"Delete"),e.qZA(),e.TgZ(106,"button",8
10),e._uU(107,"Close"),e.qZA()()()()()(),e.TgZ(108,"div",81)(109,"div",82)(110,"div",67)(111,"div",68)(112,"h5",69),e._uU(113,"Unassign Device"),e.qZA(),e._UZ(114,"button",70),e.qZA(),e.TgZ(115,"form",71,83),e.NdJ("ngSubmit",function(){e.CHM(o);const r=e.MAs(116);return i.unassignDevice(r),i.es.pageDataInfo("",i.masterFormRequest.dealerid,"Device Assign To Dealer","Unassign Device","Click Event","")}),e.TgZ(117,"div",73)(118,"div",14)(119,"div",36)(120,"label"),e._uU(121,"Are you sure you want to unassign this device?"),e.qZA()(),e.TgZ(122,"div",14)(123,"div",84)(124,"strong"),e._uU(125,"Distributor Name:"),e.qZA(),e._uU(126),e.qZA(),e.TgZ(127,"div",84)(128,"strong"),e._uU(129,"Dealer Name:"),e.qZA(),e._uU(130),e.qZA(),e.TgZ(131,"div",84)(132,"strong"),e._uU(133,"IMEI No.:"),e.qZA(),e._uU(134),e.qZA(),e.TgZ(135,"div",84)(136,"strong"),e._uU(137,"Serial No.:"),e.qZA(),e._uU(138),e.qZA()()(),e.TgZ(139,"div",14),e.YNc(140,ls,11,2,"div",85),e.TgZ(141,"div",36)(142,"label"),e._uU(143,"Remark"),e.TgZ(144,"span",74),e._uU(145,"*"),e.qZA()(),e.TgZ(146,"textarea",86,87),e.NdJ("ngModelChange",function(r){return i.unassignremark=r})("keypress",function(r){return i.cv.addressValidation(r)}),e.qZA(),e.YNc(148,cs,2,0,"span",77),e.qZA()()(),e.TgZ(149,"div",78)(150,"button",79),e._uU(151,"Unassign"),e.qZA(),e.TgZ(152,"button",80),e._uU(153,"Close"),e.qZA()()()()()()}if(2&t){const o=e.MAs(14),s=e.MAs(92),r=e.MAs(101),c=e.MAs(116),f=e.MAs(147);e.xp6(4),e.hij(" ",i.pageHeading," "),e.xp6(2),e.Q6J("ngIf",i.isFromDashboard),e.xp6(1),e.Q6J("ngIf",!i.formsection),e.xp6(1),e.Q6J("ngIf",i.formsection),e.xp6(22),e.Q6J("ngIf","111"!=i.loginRoleId),e.xp6(1),e.Q6J("ngIf","dealer"==i.assignmentType),e.xp6(1),e.Q6J("ngIf",null!=i.assignmentType),e.xp6(3),e.Q6J("ngIf",i.unassignedDeviceLoading),e.xp6(1),e.Q6J("ngForOf",i.unassignedDeviceList),e.xp6(2),e.Q6J("ngIf",i.deviceListLoading),e.xp6(1),e.Q6J("ngForOf",i.deviceList),e.xp6(1),e.Q6J("ngIf",o.submitted&&!i.getSelectedImeis().length),e.xp6(2),e.Q6J("ngIf",i.assignflag),e.xp6(1),e.Q6J("ngIf",!i.assignflag),e.xp6(7),e.lnq("Showing ",i.recordFrom," to ",i.recordTo," of ",i.totalCount," entries"),e.xp6(1),e.Q6J("ngModel",i.detailsparam.itemperpage)("clearable",!1),e.xp6(1),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(5),e.Q6J("ngModel",i.searchQuery),e.xp6(1),e.Q6J("disabled",!i.searchQuery),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(14),e.Q6J("ngIf",i.displayDetailData.length>0),e.xp6(2),e.Q6J("ngIf",0==i.detailData.length),e.xp6(2),e.Q6J("ngIf",i.totalCount>i.detailsparam.itemperpage),e.xp6(17),e.Q6J("ngModel",i.deleteremark),e.xp6(2),e.Q6J("ngIf",s.submitted&&(null==r.errors?null:r.errors.required)),e.xp6(24),e.hij(" ",i.oldData.distributorname||"N/A"," "),e.xp6(4),e.hij(" ",i.jsonData.dealername||"N/A"," "),e.xp6(4),e.hij(" ",i.jsonData.deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",i.jsonData.deviceserialno||"N/A"," "),e.xp6(2),e.Q6J("ngIf",""!=i.jsonData.dealerid&&null!=i.jsonData.dealerid&&("100"==i.loginRoleId||"101"==i.loginRoleId)),e.xp6(6),e.Q6J("ngModel",i.unassignremark),e.xp6(2),e.Q6J("ngIf",c.submitted&&(null==f.errors?null:f.errors.required))}},directives:[y.O5,C._L,d._Y,d.JL,d.F,Z.w9,d.Q7,d.JJ,d.On,y.sg,Z.xv,d.Wl,d.Fj,y.mk,y.PC,C.N9,d.wO,d.nD],styles:['.ng-dropdown-panel{border-radius:.75rem!important}.form-check[_ngcontent-%COMP%] .form-check-input[_ngcontent-%COMP%]{margin-left:0!important}.imei-scroll[_ngcontent-%COMP%]{height:238px;min-height:238px;overflow-y:auto}.unassigned-imei-scroll[_ngcontent-%COMP%]{height:120px;min-height:120px;overflow-y:auto} .ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize} .ng-select.ng-select-single .ng-select-container{min-height:23px;max-height:23px;height:23px;padding-top:0;padding-bottom:0}.form-control-sm[_ngcontent-%COMP%]{min-height:1.4rem;padding:.1rem .81rem;font-size:.875rem;border-radius:.2rem}.form-check[_ngcontent-%COMP%]{position:relative;display:block;margin-top:0;margin-bottom:0;padding-left:0}.form-check[_ngcontent-%COMP%] .form-check-label[_ngcontent-%COMP%]{min-height:18px;display:block;margin-left:1.75rem;font-size:.65rem;line-height:2.5}.sim-tooltip-box[_ngcontent-%COMP%]{position:absolute;
1left:50%;top:100%;transform:translate(-50%);min-width:320px;z-index:1000;background:#b4c0cb;border-radius:.5rem;box-shadow:0 19px 38px #0000004d,0 15px 12px #00000038;border:1px solid #e0e0e0;margin-top:12px;animation:fadeIn .2s}.sim-tooltip-header[_ngcontent-%COMP%]{font-size:15px;font-weight:500;border-bottom:1px solid #e0e0e0;display:flex;align-items:center;justify-content:space-between}.sim-tooltip-body[_ngcontent-%COMP%]{font-size:11px;text-align:left}.sim-tooltip-box[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-16px;left:50%;transform:translate(-50%);border-width:0 15px 15px 15px;border-style:solid;border-color:transparent transparent #b3bcc3 transparent;filter:drop-shadow(0 -2px 2px rgba(0,0,0,.08))}.sim-tooltip-top.sim-tooltip-box[_ngcontent-%COMP%]:before{border-width:15px 15px 0 15px;border-color:#b3bcc3 transparent transparent transparent;top:auto;bottom:-16px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.08))}.active-iccid[_ngcontent-%COMP%]{color:#0d6efd;font-weight:700}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.toggle-icon[_ngcontent-%COMP%]{cursor:pointer;color:#007bff;font-size:16px;transition:all .3s ease;padding:4px;z-index:9999}.parent-row[_ngcontent-%COMP%]{transition:all .2s ease;border-left:3px solid transparent}.parent-row.expanded[_ngcontent-%COMP%]{background-color:#f0f7ff;border-left-color:#007bff}.parent-row[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.child-row[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.child-table-container[_ngcontent-%COMP%]{position:relative;padding:0 15px 15px 71px;margin:0}.connection-line[_ngcontent-%COMP%]{position:absolute;left:25px;top:0}.vertical-line[_ngcontent-%COMP%]{position:absolute;left:0;top:0;width:2px;height:40px;background-image:linear-gradient(to bottom,#007bff 50%,transparent 50%);background-size:2px 8px;background-repeat:repeat-y}.horizontal-line[_ngcontent-%COMP%]{position:absolute;left:0;top:38px;width:40px;height:2px;background-image:linear-gradient(to right,#007bff 50%,transparent 50%);background-size:8px 2px;background-repeat:repeat-x}.arrow-head[_ngcontent-%COMP%]{position:absolute;left:38px;top:33px;width:0;height:0;border-left:10px solid #007bff;border-top:6px solid transparent;border-bottom:6px solid transparent}.child-table[_ngcontent-%COMP%]{margin:0;border:2px solid #007bff;border-radius:8px;box-shadow:0 4px 12px #007bff26;overflow:hidden;background-color:#fff}.\\..child-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#d8d8d8;color:#002bb8;font-size:11px;font-weight:600;padding:12px 10px;border:none;text-transform:uppercase;letter-spacing:.5px;text-align:center}.search-match[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff3cd!important}.search-parent[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#e2f0d9!important}.search-parent[_ngcontent-%COMP%]{border-left-color:#28a745}.child-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:11px;padding:5px;border:none;border-bottom:1px solid #e9ecef;background-color:#fff;text-align:center}.child-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%]{border-bottom:none}.child-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover td[_ngcontent-%COMP%]{background-color:#007bff0d}.network-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 8px;background-color:#e7f3ff;color:#007bff;border-radius:4px;font-weight:500;min-width:100px}.form-group[_ngcontent-%COMP%]{margin-bottom:.2rem}.entrydiv[_ngcontent-%COMP%]{background-color:#fff;border:2px solid #9EC6C7;padding:1%!important;animation:fadeInUp .8s ease-out}.grid-section[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}']}),n})();var ps=b(63507),be=b(74888),pe=b(95969),gs=b(95348);function ms(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",78),e.NdJ("click",function(){return e.CHM(t),e.oxw().goBackToDashboard()}),e._UZ(1,"i",79),e._uU(2," Back "),e.qZA()}}function us(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function hs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"ng-select",80),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().pollingObject=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select Polling Status","On Change Customer",o.onclickeventmessage)}),e.YNc(2,us,2,2,"ng-option",81),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.pollingObject),e.xp6(1),e.Q6J("ngForOf",t.pollingstatusList)}}function _s(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function fs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"ng-select",83),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().rtoObject=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select RTO","On Change Customer",o.onclickeventmessage)}),e.YNc(2,_s,2,2,"ng-option",81),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.rtoObject),e.xp6(1),e.Q6J("ngForOf",t.rtoList)}}function vs(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function bs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"ng-select",84),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleObject=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select Vehicle","On Change Customer",o.onclickeventmessage)}),e.YNc(2,vs,2,2,"ng-option",81),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.vehicleObject),e.xp6(1),e.Q6J("ngForOf",t.vehicleList)}}function xs(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function Cs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"ng-select",85),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().dealerObject=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select Dealer List","On Change Customer",o.onclickeventmessage)}),e.YNc(2,xs,2,2,"ng-option",81),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.dealerObject),e.xp6(1),e.Q6J("ngForOf",t.dealerList)}}function Ts(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function ys(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12)(1,"ng-select",86),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vendorObject=o})("change",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select Vendor List","On Change Customer",o.onclickeventmessage)}),e.YNc(2,Ts,2,2,"ng-option",81),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.vendorObject),e.xp6(1),e.Q6J("ngForOf",t.vendorList)}}function Zs(n,a){1&n&&(e.TgZ(0,"ng-option",87),e._uU(1,"20"),e.qZA())}function Ms(n,a){1&n&&(e.TgZ(0,"ng-option",88),e._uU(1,"50"),e.qZA())}function ws(n,a){1&n&&(e.TgZ(0,"ng-option",89),e._uU(1,"100"),e.qZA())}function As(n,a){if(1&n&&(e.TgZ(0,"ng-option",82),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Is(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",90)(3,"div",91),e._uU(4,"No Record Found"),e.qZA()()()())}function Ds(n,a){1&n&&(e.TgZ(0,"div",105)(1,"div",106)(2,"span",107),e._uU(3,"\u2193"),e.qZA()()())}function ks(n,a){1&n&&e._UZ(0,"img",108)}function qs(n,a){1&n&&e._UZ(0,"img",109)}const Os=function(n,a){return{color:n,cursor:a}},Ss=function(n){return{transform:n}};function Fs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr")(1,"td",110)(2,"div",111)(3,"table",112)(4,"thead")(5,"tr")(6,"th",113),e._uU(7,"Last SOS"),e.qZA(),e.TgZ(8,"th",114),e._uU(9,"Distance Travelled (km)"),e.qZA(),e.TgZ(10,"th",91),e._UZ(11,"i",115),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Coordinates"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Vehicle Category"),e.qZA(),e.TgZ(16,"th"),e._uU(17,"Current Location"),e.qZA()()(),e.TgZ(18,"tbody")(19,"tr")(20,"td",116),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().plotSOSAlert(o)}),e._uU(21),e.qZA(),e.TgZ(22,"td",114),e._uU(23),e.qZA(),e.TgZ(24,"td",91),e._UZ(25,"i",117),e.qZA(),e.TgZ(26,"td"),e._uU(27),e.qZA(),e.TgZ(28,"td"),e._uU(29),e.qZA(),e.TgZ(30,"td"),e._uU(31),e.qZA()()()()()()()}if(2&n){const t=e.oxw().$implicit;
1e.xp6(20),e.Q6J("ngClass","sos"==t.alertname.toLowerCase()?"fw-bold":"")("ngStyle",e.WLB(10,Os,"sos"==t.alertname.toLowerCase()?"#ff6666":"black","-"==t.alertname?"":"pointer")),e.xp6(1),e.hij(" ",""==t.lastsostime?"-":t.lastsostime," "),e.xp6(2),e.hij("",t.todaydistance?t.todaydistance:0," "),e.xp6(2),e.Q6J("ngbTooltip",t.directionname)("ngStyle",e.VKq(13,Ss,"rotate("+t.vehicledirection+"deg)")),e.xp6(2),e.AsE("",t.latitude," , ",t.longitude,""),e.xp6(2),e.Oqu(""==t.vehiclecategoryname||"0"==t.vehiclecategoryname?"Not Found":t.vehiclecategoryname),e.xp6(2),e.Oqu(""==t.location?"Not Found":t.location)}}const Ns=function(n,a,t,i){return{green:n,stop:a,gray:t,yellow:i}};function Us(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tbody")(1,"tr")(2,"td",92)(3,"span",93),e.NdJ("click",function(){const s=e.CHM(t).index;return e.oxw().toggleChildGrid(s)}),e._UZ(4,"i",94),e.qZA(),e._uU(5),e.YNc(6,Ds,4,0,"div",95),e.qZA(),e.TgZ(7,"td",96)(8,"span",97),e._uU(9),e.qZA(),e._UZ(10,"br"),e._uU(11),e.qZA(),e.TgZ(12,"td"),e._uU(13),e.qZA(),e.TgZ(14,"td"),e._uU(15),e.qZA(),e.TgZ(16,"td"),e._uU(17),e.qZA(),e.TgZ(18,"td"),e._uU(19),e.qZA(),e.TgZ(20,"td"),e._uU(21),e.qZA(),e.TgZ(22,"td"),e._uU(23),e.qZA(),e.TgZ(24,"td"),e._uU(25),e.qZA(),e.TgZ(26,"td",98),e._uU(27),e._UZ(28,"br"),e.TgZ(29,"span",99),e._uU(30),e.qZA()(),e.TgZ(31,"td"),e._uU(32),e.qZA(),e.TgZ(33,"td"),e.YNc(34,ks,1,0,"img",100),e.YNc(35,qs,1,0,"img",101),e.qZA(),e.TgZ(36,"td",91)(37,"div",102)(38,"button",103),e.NdJ("click",function(){const s=e.CHM(t).$implicit,r=e.oxw();return r.trackLiveVehicle(s),r.es.pageDataInfo("",r.oldData,"Live Status","Details Method","On click track live vehicle button","")}),e._UZ(39,"i",104),e.qZA()()()(),e.YNc(40,Fs,32,15,"tr",43),e.qZA()}if(2&n){const t=a.$implicit,i=a.index,o=e.oxw();e.xp6(4),e.Q6J("ngClass",o.expandedIndex===i?"fa-minus-circle text-danger":"fa-plus-circle text-success"),e.xp6(1),e.hij(" ",t.rowno," "),e.xp6(1),e.Q6J("ngIf",o.expandedIndex===i),e.xp6(3),e.hij(" ",""==t.vehicleno?"Not Found":t.vehicleno," "),e.xp6(2),e.hij(" ",""==o.maskIMEI(t.deviceimeino)?"Not Found":o.maskIMEI(t.deviceimeino)," "),e.xp6(2),e.Oqu(t.rtoname||"Not Found"),e.xp6(2),e.Oqu(t.rtoaddress||"Not Found"),e.xp6(2),e.Oqu(t.rtomobileno||"Not Found"),e.xp6(2),e.Oqu(t.alertname||"Not Found"),e.xp6(2),e.Oqu(t.alerttime||"Not Found"),e.xp6(2),e.Oqu(t.alertstatus||"Not Found"),e.xp6(2),e.Oqu(t.vehicleclassname||"Not Found"),e.xp6(2),e.hij("",""==t.pollingdatatime?"Not Found":t.pollingdatatime," "),e.xp6(2),e.Q6J("ngClass",e.l5B(20,Ns,"Running"==t.pollingstatus,"Stop"==t.pollingstatus,"Non Polling"==t.pollingstatus,"Idle"==t.pollingstatus)),e.xp6(1),e.Oqu(t.pollingstatus),e.xp6(2),e.Oqu(""==t.speed?0:t.speed),e.xp6(2),e.Q6J("ngIf","on"==t.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","off"==t.ignitionstatus.toLowerCase()),e.xp6(3),e.Q6J("disabled","never polling"!==t.pollingstatus.toLowerCase()),e.xp6(2),e.Q6J("ngIf",o.expandedIndex===i)}}function Ls(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",118)(1,"span",119),e._uU(2),e.qZA(),e.TgZ(3,"ngb-pagination",120),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){return e.CHM(t),e.oxw().Details("")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(2),e.lnq(" Showing ",t.recordFrom," to ",t.recordTo," of ",t.totalCount," entries "),e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}function Ps(n,a){1&n&&e._UZ(0,"i",121)}function Js(n,a){1&n&&e._UZ(0,"i",122)}function Vs(n,a){1&n&&e._UZ(0,"i",123)}function Rs(n,a){1&n&&e._UZ(0,"i",122)}function Qs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",124)(1,"input",125),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().vehicleSearch=o}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.vehicleSearch)}}function Es(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tr",140)(1,"td",141)(2,"div",142)(3,"div",143)(4,"input",144,145),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).dateValue=o})("change",function(){return e.CHM(t),e.oxw(2).getDate()}),e.qZA()(),e.TgZ(6,"div",146)(7,"button",147),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().trackHistoryVehicle(o)}),e._UZ(8,"i",148),e.qZA()()()()()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.dateValue)}}const ne=function(n){return{display:n}},Ys=function(n,a){return{color:n,opacity:a}};function js(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"tbody",126)(1,"tr",127)(2,"td",128)(3,"div",129)(4,"div",130)(5,"p",131),e._UZ(6,"i",75),e._uU(7),e.ALo(8,"uppercase"),e.qZA(),e.TgZ(9,"small",132),e._uU(10),e.ALo(11,"date"),e.qZA()(),e.TgZ(12,"div",114)(13,"span",133),e._uU(14),e.qZA()()()(),e.TgZ(15,"td",134)(16,"button",135),e.NdJ("click",function(){const s=e.CHM(t).$implicit,r=e.oxw();return r.trackLiveVehicle(s),r.es.pageDataInfo("",r.oldData,"Live Status","Details Method","On click track live vehicle button","")}),e._UZ(17,"i",136),e.qZA(),e.TgZ(18,"button",137),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().selectVehicleForHistory(s)}),e._UZ(19,"i",138),e.qZA()()(),e.YNc(20,Es,9,1,"tr",139),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(12,ne,t.vehicleno.toLowerCase().includes(i.vehicleSearch.toLowerCase())?"":"none")),e.xp6(
15),e.Q6J("ngStyle",e.WLB(14,Ys,"on"==t.ignitionstatus.toLowerCase()?"#00661C":"#B31000","on"==t.ignitionstatus.toLowerCase()?"0.8":"0.7")),e.xp6(2),e.hij(" ",e.lcZ(8,7,t.vehicleno)," "),e.xp6(3),e.hij(" ",t.pollingdatatime?e.xi3(11,9,t.pollingdatatime,"dd-MMM hh:mm a"):"No data"," "),e.xp6(4),e.hij("",t.speed||0," km/h"),e.xp6(2),e.Q6J("disabled","never polling"!==t.pollingstatus.toLowerCase()),e.xp6(4),e.Q6J("ngIf",(null==i.selectedVehicle?null:i.selectedVehicle.vehicleno)==t.vehicleno)}}function Hs(n,a){1&n&&e._UZ(0,"img",153)}function zs(n,a){1&n&&e._UZ(0,"img",154)}const xe=function(n,a){return{"text-success":n,"text-danger":a}};function Bs(n,a){if(1&n&&(e.TgZ(0,"div")(1,"p",149)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",149)(6,"strong"),e._uU(7,"\u{1f550} Last Update:"),e.qZA(),e._uU(8),e.ALo(9,"date"),e.qZA(),e.TgZ(10,"p",149)(11,"strong"),e._uU(12,"\u{1f4cf} Distance:"),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"p",149)(15,"strong"),e._uU(16,"\u26a1 Speed:"),e.qZA(),e.TgZ(17,"span",99),e._uU(18),e.qZA(),e.YNc(19,Hs,1,0,"img",150),e.YNc(20,zs,1,0,"img",151),e.qZA(),e.TgZ(21,"p",152)(22,"strong"),e._uU(23,"\u{1f4cd} Location:"),e.qZA(),e._uU(24),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.liveTrackingService.currentVehicleData.deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",t.liveTrackingService.currentVehicleData.pollingdatatime?e.xi3(9,8,t.liveTrackingService.currentVehicleData.pollingdatatime,"dd-MMM-yyyy hh:mm:ss a"):"N/A"," "),e.xp6(5),e.hij(" ",t.liveTrackingService.currentVehicleData.todaydistance||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(11,xe,+t.liveTrackingService.currentVehicleData.speed<=40,+t.liveTrackingService.currentVehicleData.speed>40)),e.xp6(1),e.hij(" ",t.liveTrackingService.currentVehicleData.speed||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==t.liveTrackingService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(1),e.Q6J("ngIf","on"==t.liveTrackingService.currentVehicleData.ignitionstatus.toLowerCase()),e.xp6(4),e.hij(" ",t.liveTrackingService.currentVehicleData.location||"N/A"," ")}}function $s(n,a){1&n&&e._UZ(0,"img",153)}function Gs(n,a){1&n&&e._UZ(0,"img",154)}function Ws(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"p",149)(2,"strong"),e._uU(3,"\u{1f4f1} IMEI:"),e.qZA(),e._uU(4),e.qZA(),e.TgZ(5,"p",149)(6,"strong"),e._uU(7,"\u{1f550} Time:"),e.qZA(),e._uU(8),e.ALo(9,"date"),e.qZA(),e.TgZ(10,"p",149)(11,"strong"),e._uU(12,"\u{1f4cf} Distance:"),e.qZA(),e._uU(13),e.qZA(),e.TgZ(14,"p",149)(15,"strong"),e._uU(16,"\u26a1 Speed:"),e.qZA(),e.TgZ(17,"span",99),e._uU(18),e.qZA(),e.YNc(19,$s,1,0,"img",150),e.YNc(20,Gs,1,0,"img",151),e.qZA(),e.TgZ(21,"p",155)(22,"strong"),e._uU(23,"\u{1f4cd} Location:"),e.qZA(),e._uU(24),e.qZA(),e.TgZ(25,"div",156)(26,"button",157),e.NdJ("click",function(){return e.CHM(t),e.oxw().playTrack()}),e._UZ(27,"i",158),e.qZA(),e.TgZ(28,"button",159),e.NdJ("click",function(){return e.CHM(t),e.oxw().pauseTrack()}),e._UZ(29,"i",160),e.qZA(),e.TgZ(30,"button",161),e.NdJ("click",function(){return e.CHM(t),e.oxw().stopTrack()}),e._UZ(31,"i",162),e.qZA(),e.TgZ(32,"button",163),e.NdJ("click",function(){return e.CHM(t),e.oxw().refreshTrack()}),e._UZ(33,"i",164),e.qZA(),e.TgZ(34,"div",165)(35,"label",166),e._uU(36,"Speed:"),e.qZA(),e.TgZ(37,"input",167),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().playbackSpeed=o})("change",function(){return e.CHM(t),e.oxw().changeSpeed()}),e.qZA(),e.TgZ(38,"span",168),e._uU(39),e.qZA()()(),e.TgZ(40,"div",169)(41,"input",170),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().saveRouteRequest.geomname=o}),e.qZA(),e.TgZ(42,"button",171),e.NdJ("click",function(){return e.CHM(t),e.oxw().saveRoute()}),e._UZ(43,"i",172),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(4),e.hij(" ",t.liveTrackingService.filteredHistoryData[0].deviceimeino||"N/A"," "),e.xp6(4),e.hij(" ",null!=t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]&&t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].pollingdatatime?e.xi3(9,13,null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].pollingdatatime,"dd-MMM-yyyy hh:mm:ss a"):"N/A"," "),e.xp6(5),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].commutedistance)||"0"," km "),e.xp6(4),e.Q6J("ngClass",e.WLB(16,xe,+((null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||0)<=40,+((null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||0)>40)),e.xp6(1),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].speed)||"0"," km/h "),e.xp6(1),e.Q6J("ngIf","off"==(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]||null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(1),e.Q6J("ngIf","on"==(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]||null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].ignitionstatus.toLowerCase())),e.xp6(4),e.hij(" ",(null==t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex]?null:t.liveTrackingService.filteredHistoryData[t.liveTrackingService.historyCurrentIndex].location)||"N/A"," "),e.xp6(2),e.Q6J("disabled",t.isPlaying&&!t.isPaused),e.xp6(2),e.Q6J("disabled",!t.isPlaying||t.isPaused),e.xp6(9),e.Q6J("ngModel",t.playbackSpeed),e.xp6(2),e.hij("",t.playbackSpeed,"x"),e.xp6(2),e.Q6J("ngModel",t.saveRouteRequest.geomname)}}let Ks=(()=>{class n{constructor(t,i,o,s,r,c,f,D,w){this.api=t,this.apiService=i,this.listService=o,this.liveTrackingService=s,this.loader=r,this.router=c,this.datePipe=f,this.es=D,this.activatedRoute=w,this.dashboardSearchType="",this.valueChange=new e.vpe,this.expandedIndex=null,this.dateValue="",this.intervalTime=1e4,this.historyAnimationSliderValue=1e3,this.detailsparam=new pe.e,this.saveRouteRequest=new u.Ku,this.detailData=[],this.visibleDiv="grid",this.roleId=sessionStorage.getItem("loginroleid"),this.vehicleList=[],this.customerlist=[],this.tableHeight="",this.requestTitle="",this.customerList=[],this.customerObject=null,this.vendorObject=null,this.dealerObject=null,this.vehicleObject=null,this.rtoObject=null,this.pollingObject=null,this.onclickeventmessage="",this.isFromDashboard=!1,this.showLiveTrackingMap=!1,this.selectedVehicleForTracking=null,this.leafletMapMo
1de="",this.showHistoryControls=!1,this.isLoadingCluster=!1,this.isLoadingTable=!1,this.rtoList=[],this.pollingstatusList=[],this.vehicleSearch="",this.Details=x=>{this.tableHeight="/dashboard/companydashboard"==this.router.url||"/dashboard/customerdashboard"==this.router.url?"40vh":"80vh";try{this.livevehicledetailsApi.unsubscribe()}catch(k){}"refresh"==x&&(this.detailsparam.searchby="",this.detailsparam.pageno=1,this.detailsparam.itemperpage=10,this.customerObject=null,this.vendorObject=null,this.dealerObject=null,this.pollingObject=null,this.rtoObject=null,this.vehicleObject=null,$("#refreshbtn").addClass("rotate"),this.valueChange.emit(),this.status=""),this.detailsparam.searchby=this.detailsparam.searchby.trim(),this.detailsparam.searchbytype=this.status?this.status:"",this.detailsparam.customerid=this.customerObject?this.customerObject.id:"",this.detailsparam.vehicleid=this.vehicleObject?this.vehicleObject.id:"",this.detailsparam.dealerid=this.dealerObject?this.dealerObject.id:"",this.detailsparam.vendorid=this.vendorObject?this.vendorObject.id:"",this.detailsparam.rtoid=this.rtoObject?this.rtoObject.id:"",this.livevehicledetailsApi=this.api.apiCall(this.detailsparam,"map/livevehicledetails").subscribe(k=>{$("#refreshbtn").removeClass("rotate"),this.onclickeventmessage=k.entity.message,200==k.statusCode&&k.entity.details.length>0?(this.detailData=k.entity.details,this.detailData.forEach(q=>q.expanded=!1),this.totalCount=k.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):(this.detailData=[],this.totalCount=0,this.recordFrom=0,this.recordFrom=0);try{clearTimeout(this.liveStatusTimeout)}catch(q){}})},this.oldData=new be.Us,this.showControlPanel=!1,this.isPlaying=!1,this.isPaused=!1,this.playbackSpeed=1}toggleChildGrid(t){this.detailData.forEach((i,o)=>i.expanded=!1),this.expandedIndex===t?this.expandedIndex=null:(this.expandedIndex=t,this.detailData[t].expanded=!0)}ngOnInit(){var t=this;return(0,I.Z)(function*(){t.Details(""),t.activatedRoute.queryParams.subscribe(i=>{t.isFromDashboard="true"===i.fromDashboard,i.searchby?(t.detailsparam.searchby=i.searchby,t.Details("search")):t.Details(""),$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show(),$("#closeFilePanel").click(function(o){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),o.preventDefault()})}),t.vehicleList=yield t.listService.getVehicleList(new u.nO),t.rtoList=yield t.listService.getRtoList(new u.nO),t.pollingstatusList=yield t.listService.getPollingStatusList(new u.nO),t.listService.getDealerList(new u.nO).then(i=>{t.dealerList=i}),t.listService.getCompanyList(new u.nO).then(i=>{t.vendorList=i})})()}ngOnChanges(){if(this.status&&(this.detailsparam.searchbytype=this.status,this.Details("")),this.dashboardSearchType){this.status=this.dashboardSearchType;try{clearTimeout(this.liveStatusTimeout)}catch(t){}this.Details("")}}goBackToDashboard(){switch(sessionStorage.getItem("loginroleid")){case"110":case"100":this.router.navigate(["/dashboard/stateadmindashboard"]);break;case"101":default:this.router.navigate(["/dashboard/vendordashboard"]);break;case"104":this.router.navigate(["/dashboard/rtodashboard"]);break;case"121":this.router.navigate(["/dashboard/dealerdashboard"])}}maskIMEI(t){if(!t||t.length<6)return t;const i=t.slice(0,2),o=t.slice(-4);return i+"*".repeat(t.length-6)+o}getDate(){$(()=>{$('input[id="daterangepicker"]').daterangepicker({singleDatePicker:!1,showDropdowns:!0,timePicker:!0,minYear:Number(F().subtract("1","years").format("YYYY")),locale:{format:"DD-MMM-YYYY hh:mm:ss A",cancelLabel:"Clear"},maxSpan:{days:1},maxYear:Number(F().add("2","year").format("YYYY")),maxDate:F(),startDate:F().subtract(1,"day").startOf("day"),endDate:F().subtract(1,"day").endOf("day")},(t,i,o)=>{$("#daterangepicker").html(t.format("DD-MMM-YYYY"))}),$('input[name="daterangepicker"]').on("hide.daterangepicker",(t,i)=>{try{this.dateValue=t.target.value}catch(o){}}),$('input[name="daterangepicker"]').on("cancel.daterangepicker",(t,i)=>{try{this.dateValue=""}catch(o){}});try{this.dateValue=document.getElementById("daterangepicker").value}catch(t){}})}toggleVehiclePanel(){var t=document.getElementById("collapseExample");t&&new bootstrap.Collapse(t,{toggle:!1}).hide()}trackLiveVehicle(t){this.selectedVehicleForTracking=t,this.showLiveTrackingMap=!0,this.isLoadingTable=!0,this.leafletMapMo
1de="live",this.showHistoryControls=!1,this.oldData=t;try{this.livevehicledetailsApi.unsubscribe()}catch(s){}try{this.liveTrackingService.clusterapi.unsubscribe()}catch(s){}try{clearTimeout(this.liveTrackingService.clusterTimeout)}catch(s){}try{clearTimeout(this.liveStatusTimeout)}catch(s){}try{this.liveTrackingService.clearLiveTracking()}catch(s){}setTimeout(()=>{this.liveTrackingService.initMap(),this.liveTrackingService.trackLiveVehicle(t),this.isLoadingTable=!1},100);var i=document.getElementById("collapseExample");i&&new bootstrap.Collapse(i,{toggle:!1}).hide(),this.selectedVehicle=void 0,this.visibleDiv="map"}stopTracking(){this.liveTrackingService.clearLiveTracking(),this.liveTrackingService.clearClusterTracking(),this.liveTrackingService.clearHistoryTracking(),this.Details("")}plotClusterOnMap(){this.plotClusterOnLeafletMap()}plotClusterOnLeafletMap(){var t=this;return(0,I.Z)(function*(){console.log("\u{1f4cd} plotClusterOnLeafletMap called");try{t.livevehicledetailsApi.unsubscribe()}catch(i){}try{t.liveTrackingService.clusterapi.unsubscribe()}catch(i){}try{clearTimeout(t.liveTrackingService.clusterTimeout)}catch(i){}try{clearTimeout(t.liveStatusTimeout)}catch(i){}try{t.liveTrackingService.clearLiveTracking()}catch(i){}try{t.liveTrackingService.clearHistoryTracking()}catch(i){}t.showLiveTrackingMap=!0,t.leafletMapMode="cluster",t.showHistoryControls=!1,t.visibleDiv="map",t.isLoadingCluster=!0,setTimeout((0,I.Z)(function*(){console.log("\u{1f4cd} Initializing map..."),t.liveTrackingService.initMap(),setTimeout((0,I.Z)(function*(){console.log("\u{1f4cd} Map initialized, initializing cluster group..."),t.liveTrackingService.initializeClusterGroup(),setTimeout((0,I.Z)(function*(){console.log("\u{1f4cd} Cluster group initialized, loading cluster data..."),yield t.liveTrackingService.getClusterData(),console.log("\u{1f4cd} Cluster data loaded"),t.isLoadingCluster=!1}),100)}),200)}),100),setTimeout(()=>{var i=document.getElementById("collapseExample");i&&new bootstrap.Collapse(i,{toggle:!1}).show()},600)})()}selectVehicleForHistory(t){try{clearTimeout(this.liveTrackingService.clusterTimeout)}catch(i){}this.selectedVehicle&&this.selectedVehicle==t?this.selectedVehicle=void 0:(this.selectedVehicle=t,setTimeout(()=>{this.getDate()},200))}showGrid(){try{this.liveTrackingService.clearLiveTracking()}catch(t){}try{this.liveTrackingService.clearClusterTracking()}catch(t){}try{this.liveTrackingService.clearHistoryTracking()}catch(t){}try{this.livevehicledetailsApi.unsubscribe()}catch(t){}this.visibleDiv="grid",this.Details("")}trackHistoryVehicle(t){var i=this;return(0,I.Z)(function*(){yield i.trackHistoryVehicleOnLeaflet(t)})()}trackHistoryVehicleOnLeaflet(t){var i=this;return(0,I.Z)(function*(){if(!i.dateValue)return i.loader.responseMessage="Please select date range",void i.loader.failedNotification();try{i.livevehicledetailsApi.unsubscribe()}catch(q){}try{i.liveTrackingService.clusterapi.unsubscribe()}catch(q){}try{clearTimeout(i.liveTrackingService.clusterTimeout)}catch(q){}try{clearTimeout(i.liveStatusTimeout)}catch(q){}let o=i.dateValue.split(" - "),s=o[0],r=o[1];const c=i.datePipe.transform(s,"dd-MMM-yyyy"),f=i.datePipe.transform(s,"hh:mm:ss a"),D=i.datePipe.transform(r,"dd-MMM-yyyy"),w=i.datePipe.transform(r,"hh:mm:ss a");i.showLiveTrackingMap=!0,i.leafletMapMode="history",i.showHistoryControls=!0,i.visibleDiv="map",setTimeout((0,I.Z)(function*(){i.liveTrackingService.initMap(),yield i.liveTrackingService.trackHistoryVehicle(t.deviceimeino,c,f,D,w,t.vehicleid,t),0==i.liveTrackingService.filteredHistoryData.length&&(i.loader.responseMessage="History Not Found",i.loader.failedNotification(),i.closeLiveTrackingMap())}),100);var x=document.getElementById("collapseExample");x&&new bootstrap.Collapse(x,{toggle:!1}).hide(),i.selectedVehicle=void 0})()}ngOnDestroy(){try{this.liveTrackingService.clusterapi.unsubscribe()}catch(t){}try{clearTimeout(this.liveStatusTimeout)}catch(t){}try{this.livevehicledetailsApi.unsubscribe()}catch(t){}try{this.liveTrackingService.destroy()}catch(t){}}closeLiveTrackingMap(){this.showLiveTrackingMap=!1,this.selectedVehicleForTracking=null,this.visibleDiv="grid",this.leafletMapMo
1de="",this.showHistoryControls=!1,this.liveTrackingService.clearLiveTracking(),this.liveTrackingService.clearClusterTracking(),this.liveTrackingService.clearHistoryTracking(),this.Details("")}playHistoryAnimation(){"stopped"===this.liveTrackingService.animationStatus?this.liveTrackingService.startHistoryAnimation():"paused"===this.liveTrackingService.animationStatus&&this.liveTrackingService.resumeHistoryAnimation()}pauseHistoryAnimation(){this.liveTrackingService.pauseHistoryAnimation()}stopHistoryAnimation(){this.liveTrackingService.stopHistoryAnimation()}restartHistoryAnimation(){this.liveTrackingService.restartHistoryAnimation()}changeHistoryAnimationSpeed(t){const i=parseInt(t.target.value);this.liveTrackingService.setAnimationSpeed(i)}refreshLeafletCluster(){var t=this;return(0,I.Z)(function*(){"cluster"===t.leafletMapMode&&(yield t.liveTrackingService.getClusterData())})()}saveRoute(){var t=this;return(0,I.Z)(function*(){let o={type:"Feature",geometry:{type:"LineString",coordinates:t.liveTrackingService.filteredHistoryData.map(r=>[+r.longitude,+r.latitude])}};t.saveRouteRequest.geomtypeid="222",t.saveRouteRequest.routecolor="#000000",t.saveRouteRequest.geomjson=JSON.stringify(o),t.loader.loaderOn();let s=yield t.apiService.insertgeom(t.saveRouteRequest);t.loader.loaderOff(),t.loader.responseMessage=s.entity,"200"==s.statusCode?(t.loader.successNotification(),t.saveRouteRequest=new u.Ku):t.loader.failedNotification()})()}downloadDoc(t){let i=new pe.e;i.pdfexcel=t,i.pageno="",i.itemperpage="",i.searchby=this.detailsparam.searchby.trim(),i.searchbytype=this.detailsparam.searchbytype;try{this.loader.loaderOn()}catch(o){}this.api.apiCall(i,"map/livevehicledetails").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.api.commonFileDownload(this.filePath),this.detailsparam.pdfexcel=""):this.detailsparam.pdfexcel="",this.es.pageDataInfo("",this.detailsparam,"Live Status Page","Download Excel/PDF method","Called Function",o.message)})}plotSOSAlert(t){var i=this;return(0,I.Z)(function*(){if("-"!=t.alertname){i.visibleDiv="map",i.showLiveTrackingMap=!0,i.leafletMapMode="history",i.showHistoryControls=!1;let o=new be.rn;o.vehicleid=t.vehicleid,o.imeino=t.deviceimeino,o.fromdate=F(t.lastsostime).subtract(15,"minutes").format("DD-MMM-yyyy"),o.fromtime=F(t.lastsostime).subtract(15,"minutes").format("hh:mm:ss A"),o.todate=F(t.lastsostime).add(15,"minutes").format("DD-MMM-yyyy"),o.totime=F(t.lastsostime).add(15,"minutes").format("hh:mm:ss A"),setTimeout((0,I.Z)(function*(){i.liveTrackingService.initMap(),yield i.liveTrackingService.trackHistoryVehicle(o.imeino,o.fromdate,o.fromtime,o.todate,o.totime,o.vehicleid,t);let s=i.liveTrackingService.filteredHistoryData.find(r=>r.pollingdatatime==t.lastsostime);s&&(L.marker([+s.latitude,+s.longitude],{icon:L.icon({iconUrl:"assets/images/alert-icon.png",iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]})}).addTo(i.liveTrackingService.map).bindPopup(`\n <div class="sos-alert-popup">\n <h6>${t.alertname}</h6>\n <p><b>Vehicle:</b> ${t.vehicleno}</p>\n <p><b>Time:</b> ${t.lastsostime}</p>\n <p><b>Speed:</b> ${s.speed} km/h</p>\n <p><b>Driver:</b> ${t.drivername}</p>\n <p><b>Mobile:</b> ${t.drivermobileno}</p>\n </div>\n `).openPopup(),i.liveTrackingService.map.setView([+s.latitude,+s.longitude],16))}),100)}})()}playTrack(){this.isPlaying=!0,this.isPaused=!1,this.liveTrackingService.setSpeed(this.playbackSpeed),this.liveTrackingService.playAnimation()}pauseTrack(){this.isPaused=!0,this.liveTrackingService.pauseAnimation()}stopTrack(){this.isPlaying=!1,this.isPaused=!1,this.liveTrackingService.stopAnimation()}refreshTrack(){this.liveTrackingService.refreshAnimation()}changeSpeed(){this.liveTrackingService.setSpeed(this.playbackSpeed)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(P.P),e.Y36(ie.s),e.Y36(z.X),e.Y36(gs.Z),e.Y36(J.D),e.Y36(v.F0),e.Y36(y.uU),e.Y36(P.P),e.Y36(v.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-live-vehicle-status"]],inputs:{dashboardSearchType:"dashboardSearchType",status:"status"},outputs:{valueChange:"valueChange"},features:[e.TTD],decls:130,vars:42,consts:[[1,"page-header","d-flex","justify-content-between","align-items-center"],[1,"page-title"],[1,"mainpageheader","text-white","newtitle","m-2"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"page-actions"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard","class","btn-action",3,"click",4,"ngIf"],[1,"card",3,"ngStyle"],[1,"card-body","p-1"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-toolbar","d-flex","align-items-center","justify-content-between","mb-1"],["class","col-auto",4,"ngIf"],[1,"col-auto"],["name","table_length","aria-controls","table","name","intervaltime",2,"font-size","11px",3,"ngModel","ngModelChange","change"],["value","10000","selected",""],["value","20000"],["value","30000"],["value","60000"],[1,"d-flex","align-items-center","gap-2"],["ngbTooltip","Refresh",1,"btn","btn-sm","btn-outline-success",3,"click"],[1,"fa","fa-refresh"],["type","text","placeholder","Click enter for Search",1,"form-control","form-control-sm",3,"ngModel","ngModelChange","keydown.enter"],["placeholder","Show Rows",1,"w-auto",3,"ngModel","clearable","ngModelChange","change"],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],["ngbTooltip","Show All Vehicles on Map",1,"btn","btn-sm","btn-primary",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-map"],["ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","btn-danger",3,"disabled","click"],[1,"fa","fa-file-pdf-o"],["ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","btn-success",3,"disabled","click"],[1,"fa","fa-file-excel-o"],[1,"scroll-tbl"],[1,"table","table-striped","custom-table"],["rowspan","2"],["colspan","3",1,"details-header"],[1,"header-title"],["rowspan","2",2,"width","150px"],["src","assets/school-management/images/poweron.png","width","18px"],["rowspan","2",1,"text-center"],[1,"details-header"],[1,"header-subtitle"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row","mt-2"],["class","d-flex align-items-center justify-content-between w-100",4,"ngIf"],[1,"card","ani",3,"ngStyle"],[1,"card-body","p-0"],["id","liveTrackingMap",2,"height","85vh","width","100%","position","relative"],[1,"btn","btn-sm","text-white","border","border-1","border-dark",2,"background","#00478d","position","absolute","top","10px","left","50px","z-index","1000","font-size","11px",3,"disabled","click"],["class","fa fa-th","style"," font-size: 11px;",4,"ngIf"],["class","fa fa-spinner fa-spin","style"," font-size: 11px;",4,"ngIf"],[1,"btn","btn-sm","text-white","border","border-1","border-dark",2,"background","#00478d","position","absolute","top","10px","left","210px","z-index","1000","font-size","11px",3,"click"],["class","fa fa-table","style"," font-size: 11px; ",4,"ngIf"],[1,"map-section"],["id","collapseExample",1,"collapse","show"],[1,"card","card-body","p-0","vehicle-panel"],[1,"nav","nav-pills","nav-justified","pb-0",2,"background-color","#184365"],[1,"nav-item","me-0"],["id","nav-home-tab","data-bs-toggle","tab","data-bs-target","#nav-vehicle","type","button","role","tab","aria-controls","nav-home","aria-selected","true",1,"nav-link","active","py-1","small"],[1,"fa","fa-car"],["type","button","ngbTooltip","Hide Panel",1,"btn","btn-sm","rounded-circle","d-flex","align-items-center","justify-content-center",2,"width","28px","height","28px",3,"click"],["aria-hidden","true",1,"fa","fa-times",2,"font-size","13px"],["id","nav-tabContent",1,"tab-content","p-1","small"],["id","nav-vehicle","role","tabpanel","aria-labelledby","nav-vehicle-tab",1,"tab-pane","fade","show","active"],[2,"max-height","350px","overflow-y","auto"],["class","form-group sticky-top mb-1",4,"ngIf"],[1,"table","table-sm","table-hover","vehicle-list-table","mb-0"],[3,"ngStyle",4,"ngFor","ngForOf"],[1,"current-vehicle-section"],["id","accordionExample",1,"accordion",3,"ngStyle"],[1,"accordion-item"],["id","headingOne",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#collapseOne","aria-expanded","true","aria-controls","collapseOne",1,"accordion-button","p-1","fw-bold","text-white","small",2,"background","#00366b","font-size","12px"],[1,"fa","fa-car","me-1"],["id","collapseOne","aria-labelledby","headingOne","data-bs-parent","#accordionExample",1,"accordion-collapse","collapse","show"],[1,"accordion-body","p-2","small"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard",1,"btn-action",3,"click"],[1,"fa","fa-arrow-left"],["placeholder","Select Polling Status",1,"small",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["placeholder","Select RTO",1,"small",3,"ngModel","ngModelChange","change"],["placeholder","Select Vehicle",1,"small",3,"ngModel","ngModelChange","change"],["placeholder","Select Dealer",1,"small",3,"ngModel","ngModelChange","change"],["placeholder","Select Vendor",1,"small",3,"ngModel","ngModelChange","change"],["value","20"],["value","50"],["value","100"],["colspan","20"],[1,"text-center"],[1,"position-relative"],[1,"curs
1or-pointer",3,"click"],[1,"fa",2,"font-size","16px","margin-right","4px",3,"ngClass"],["class","child-arrow-container",4,"ngIf"],[1,"text-uppercase"],[1,"fw-bolder"],[1,"text-capitalize"],[3,"ngClass"],["src","assets/school-management/images/poweron.png","style","width: 18px;height: 18px;","ngbTooltip","Ignition On",4,"ngIf"],["src","assets/school-management/images/poweroff.png","style","width: 18px;height: 18px;","ngbTooltip","Ignition Off",4,"ngIf"],["role","group",1,"btn-group"],["ngbTooltip","Live Track",1,"btn","btn-sm","btn-dark","p-1",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-map-marker",2,"font-size","11px"],[1,"child-arrow-container"],[1,"child-arrow-vertical-with-arrow"],[1,"child-arrow-down"],["src","assets/school-management/images/poweron.png","ngbTooltip","Ignition On",2,"width","18px","height","18px"],["src","assets/school-management/images/poweroff.png","ngbTooltip","Ignition Off",2,"width","18px","height","18px"],["colspan","13",1,"child-grid-row","position-relative"],[1,"child-grid-table","card","card-body","p-2","mt-0","mb-2"],[1,"table","table-bordered","table-sm","mb-0"],[1,"text-center","bg-danger","text-white"],[1,"text-end"],[1,"fa","fa-arrow-circle-o-up",2,"font-size","18px"],[1,"text-center",3,"ngClass","ngStyle","click"],["aria-hidden","true",1,"fa","fa-arrow-circle-o-up",2,"font-size","18px",3,"ngbTooltip","ngStyle"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,"entries-info"],["size","sm",1,"pagination-rounded","pagination-info","mb-0",3,"collectionSize","page","maxSize","pageSize","pageChange"],[1,"fa","fa-th",2,"font-size","11px"],[1,"fa","fa-spinner","fa-spin",2,"font-size","11px"],[1,"fa","fa-table",2,"font-size","11px"],[1,"form-group","sticky-top","mb-1"],["type","text","placeholder","Search Vehicle...",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],[3,"ngStyle"],[1,"vehicle-row"],[1,"p-1","fw-bold","vehicle-name"],[1,"d-flex","justify-content-between","align-items-center"],[1,"flex-grow-1"],[1,"mb-0",2,"font-size","0.75rem",3,"ngStyle"],[1,"text-dark-50","d-block",2,"font-size","9px"],[1,"badge","bg-light","text-dark","small"],[1,"p-1","text-center","action-buttons"],["ngbTooltip","Live Track",1,"btn","btn-success","btn-sm","p-1","px-2","rounded-1","me-1",3,"disabled","click"],[1,"fa","fa-map-marker",2,"font-size","0.8rem"],["ngbTooltip","History Track",1,"btn","btn-primary","btn-sm","p-1","px-2","rounded-1",3,"click"],[1,"fa","fa-history",2,"font-size","0.8rem"],["class","history-selector-row",4,"ngIf"],[1,"history-selector-row"],["colspan","2",1,"p-2"],[1,"row","g-1"],[1,"col-11"],["type","text","name","daterangepicker","id","daterangepicker","placeholder","Select Date Range","required","",1,"form-control","form-control-sm",2,"font-size","10px",3,"ngModel","ngModelChange","change"],["dateValueDateCtrl","ngModel"],[1,"col-1"],["title","Show History",1,"btn","btn-sm","btn-dark",2,"padding","0.2rem 0.51rem",3,"click"],[1,"fa","fa-arrow-right",2,"font-size","10px"],[1,"small","m-0","mb-1"],["src","assets/school-management/images/poweroff.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],["src","assets/school-management/images/poweron.png","style","width: 16px;height: 16px; margin-left: 5px;",4,"ngIf"],[1,"small","m-0"],["src","assets/school-management/images/poweroff.png",2,"width","16px","height","16px","margin-left","5px"],["src","assets/school-management/images/poweron.png",2,"width","16px","height","16px","margin-left","5px"],[1,"small","m-0","mb-2"],[1,"control-panel",2,"position","absolute","bottom","auto","right","41%","transform","translateX(-50%)","background","white","padding","5px 8px","border-radius","8px","box-shadow","0 4px 12px rgba(0, 0, 0, 0.3)","z-index","1000","display","flex","align-items","center","gap","11px"],[1,"btn","btn-sm","btn-success",2,"padding","0.3rem 0.3rem",3,"disabled","click"],[1,"fa","fa-play",2,"font-size","12px"],[1,"btn","btn-sm","btn-warning",2,"padding","0.3rem 0.3rem",3,"disabled","click"],[1,"fa","fa-pause",2,"font-size","12px"],[1,"btn","btn-sm","btn-danger",2,"padding","0.3rem 0.3rem",3,"click"],[1,"fa","fa-stop",2,"font-size","12px"],[1,"btn","btn-sm","btn-info",2,"padding","0.3rem 0.3rem",3,"click"],[1,"fa","fa-refresh",2,"font-size","12px"],[1,"speed-control",2,"display","flex","align-items","center","gap","10px","margin-left","15px"],[2,"margin","0","font-size","12px","font-weight","600"],["type","range","min","0.5","max","20","step","0.5",2,"width","100px",3,"ngModel","ngModelChange","change"],[2,"font-size","12px","min-width","30px"],[1,"input-group","input-group-sm"],["type","text","placeholder","Route Name",1,"form-control","form-control-sm",3,"ngModel","ngModelChange"],["type","button","ngbTooltip","Save Route",1,"btn","btn-sm","btn-success",3,"click"],[1,"fa","fa-save"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e._uU(4," Live Tracking & Monitoring Vehicle "),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,ms,3,0,"button",5),e.qZA()(),e.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),e.YNc(12,hs,3,2,"div",11),e.YNc(13,fs,3,2,"div",11),e.YNc(14,bs,3,2,"div",11),e.YNc(15,Cs,3,2,"div",11),e.YNc(16,ys,3,2,"div",11),e.TgZ(17,"div",12)(18,"div")(19,"select",13),e.NdJ("ngModelChange",function(s){return i.intervalTime=s})("change",function(){return i.Details("")}),e.TgZ(20,"option",14),e._uU(21," 10 sec"),e.qZA(),e.TgZ(22,"option",15),e._uU(23,"20 sec"),e.qZA(),e.TgZ(24,"option",16),e._uU(25,"30 sec"),e.qZA(),e.TgZ(26,"option",17),e._uU(27,"1 min"),e.qZA()()()(),e.TgZ(28,"div",18)(29,"button",19),e.NdJ("click",function(){return i.Details("refresh"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click refresh button","Click Event","")}),e._UZ(30,"i",20),e.qZA(),e.TgZ(31,"input",21),e.NdJ("ngModelChange",function(s){return i.detailsparam.searchby=s})("keydown.enter",function(){return i.Details("search"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click search button","Click Event","")}),e.qZA(),e.TgZ(32,"ng-select",22),e.NdJ("ngModelChange",function(s){return i.detailsparam.itemperpage=s})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam.itemperpage,"Vehicle Master","Select rows","Change Event","")}),e.YNc(33,Zs,2,0,"ng-option",23),e.YNc(34,Ms,2,0,"ng-option",24),e.YNc(35,ws,2,0,"ng-option",25),e.YNc(36,As,2,2,"ng-option",26),e.qZA(),e.TgZ(37,"button",27),e.NdJ("click",function(){return i.plotClusterOnMap()}),e._UZ(38,"i",28),e.qZA(),e.TgZ(39,"button",29),e.NdJ("click",function(){return i.downloadDoc("pdf"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click PDF button","Click Event","")}),e._UZ(40,"i",30),e.qZA(),e.TgZ(41,"button",31),e.NdJ("click",function(){return i.downloadDoc("excel"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click Excel button","Click Event","")}),e._UZ(42,"i",32),e.qZA()()(),e.TgZ(43,"div",33)(44,"table",34)(45,"thead")(46,"tr")(47,"th",35),e._uU(48,"#"),e.qZA(),e.TgZ(49,"th",35),e._uU(50,"Vehicle No./ IMEI No"),e.qZA(),e.TgZ(51,"th",36)(52,"div",37),e._uU(53,"RTO Details"),e.qZA()(),e.TgZ(54,"th",36)(55,"div",37),e._uU(56,"Alert Details"),e.qZA()(),e.TgZ(57,"th",35),e._uU(58,"Vehicle Class"),e.qZA(),e.TgZ(59,"th",38),e._uU(60,"Last Polling Time"),e.qZA(),e.TgZ(61,"th",35),e._uU(62,"Speed (Km/hr)"),e.qZA(),e.TgZ(63,"th",35),e._UZ(64,"img",39),e.qZA(),e.TgZ(65,"th",40),e._uU(66,"Actions"),e.qZA()(),e.TgZ(67,"tr")(68,"th",41)(69,"div",42),e._uU(70,"Name"),e.qZA()(),e.TgZ(71,"th",41)(72,"div",42),e._uU(73,"Address"),e.qZA()(),e.TgZ(74,"th",41)(75,"div",42),e._uU(76,"Mobile No"),e.qZA()(),e.TgZ(77,"th",41)(78,"div",42),e._uU(79,"Name"),e.qZA()(),e.TgZ(80,"th",41)(81,"div",42),e._uU(82,"Time"),e.qZA()(),e.TgZ(83,"th",41)(84,"div",42),e._uU(85,"Status"),e.qZA()()()(),e.YNc(86,Is,5,0,"tbody",43),e.YNc(87,Us,41,25,"tbody",44),e.qZA()(),e.TgZ(88,"div",45),e.YNc(89,Ls,4,7,"div",46),e.qZA()()()()(),e.TgZ(90,"div",47)(91,"div",48),e._UZ(92,"div",49),e.TgZ(93,"button",50),e.NdJ("click",function(){return i.plotClusterOnMap()}),e.YNc(94,Ps,1,0,"i",51),e.YNc(95,Js,1,0,"i",52),e._uU(96," Show All Vehicles "),e.qZA(),e.TgZ(97,"button",53),e.NdJ("click",function(){return i.showGrid()}),e.YNc(98,Vs,1,0,"i",54),e.YNc(99,Rs,1,0,"i",52),e._uU(100," Table View "),e.qZA(),e.TgZ(101,"div",55)(102,"div",56)(103,"div",57)(104,"ul",58)(105,"li",59)(106,"button",60),e._UZ(107,"i",61),e._uU(108),e.qZA()(),e.TgZ(109,"li")(110,"button",62),e.NdJ("click",function(){return i.toggleVehiclePanel()}),e._UZ(111,"i",63),e.qZA()()(),e.TgZ(112,"div",64)(113,"div",65)(114,"div",66),e.YNc(115,Qs,2,1,"div",67),e.TgZ(116,"table",68),e.YNc(117,js,21,17,"tbody",69),e.qZA()()()()()()(),e.TgZ(118,"div",70)(119,"div",71)(120,"div",72)(121,"h2",73)(122,"button",74),e._UZ(123,"i",75),e._uU(124),e.ALo(125,"uppercase"),e.qZA()(),e.TgZ(126,"div",76)(127,"div",77),e.YNc(128,Bs,25,14,"div",43),e.YNc(129,Ws,44,19,"div",43),e.qZA()()()()()()()),2&t&&(e.xp6(6),e.Q6J("ngIf",i.isFromDashboard),e.xp6(1),e.Q6J("ngStyle",e.VKq(36,ne,"grid"==i.visibleDiv?"":"none")),e.xp6(
15),e.Q6J("ngIf","800"!=i.roleId),e.xp6(1),e.Q6J("ngIf","800"!=i.roleId),e.xp6(1),e.Q6J("ngIf","800"!=i.roleId),e.xp6(1),e.Q6J("ngIf","800"!=i.roleId),e.xp6(1),e.Q6J("ngIf","800"!=i.roleId),e.xp6(3),e.Q6J("ngModel",i.intervalTime),e.xp6(12),e.Q6J("ngModel",i.detailsparam.searchby),e.xp6(1),e.Q6J("ngModel",i.detailsparam.itemperpage)("clearable",!1),e.xp6(1),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(1),e.Q6J("disabled","0"==i.totalCount),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(45),e.Q6J("ngIf",0==i.totalCount),e.xp6(1),e.Q6J("ngForOf",i.detailData),e.xp6(2),e.Q6J("ngIf",i.totalCount>i.detailsparam.itemperpage),e.xp6(1),e.Q6J("ngStyle",e.VKq(38,ne,"grid"==i.visibleDiv?"none":"")),e.xp6(3),e.Q6J("disabled",i.isLoadingCluster),e.xp6(1),e.Q6J("ngIf",!i.isLoadingCluster),e.xp6(1),e.Q6J("ngIf",i.isLoadingCluster),e.xp6(3),e.Q6J("ngIf",!i.isLoadingTable),e.xp6(1),e.Q6J("ngIf",i.isLoadingTable),e.xp6(9),e.hij(" All Vehicles (",i.liveTrackingService.clusterVehicleData.length,") "),e.xp6(7),e.Q6J("ngIf",i.liveTrackingService.clusterVehicleData.length>1),e.xp6(2),e.Q6J("ngForOf",i.liveTrackingService.clusterVehicleData),e.xp6(2),e.Q6J("ngStyle",e.VKq(40,ne,i.liveTrackingService.currentVehicleData.vehicleno||i.liveTrackingService.filteredHistoryData.length>0?"":"none")),e.xp6(5),e.hij(" ",e.lcZ(125,34,i.liveTrackingService.currentVehicleData.vehicleno||(i.liveTrackingService.filteredHistoryData.length>0?i.liveTrackingService.filteredHistoryData[0].vehicleno:""))," "),e.xp6(4),e.Q6J("ngIf",i.liveTrackingService.currentVehicleData.vehicleno&&0==i.liveTrackingService.filteredHistoryData.length),e.xp6(1),e.Q6J("ngIf",i.liveTrackingService.filteredHistoryData.length>0))},directives:[y.O5,C._L,y.PC,Z.w9,d.JJ,d.On,y.sg,Z.xv,d.EJ,d.YN,d.Kr,d.Fj,y.mk,C.N9,d.Q7,d.eT],pipes:[y.gd,y.uU],styles:[".mapdiv[_ngcontent-%COMP%]{height:calc(100dvh - 150px);width:100%;min-height:300px;position:relative}.map-section[_ngcontent-%COMP%]{position:absolute;top:9%;left:10px;z-index:999;width:85%}.vehicle-panel[_ngcontent-%COMP%]{background:rgba(255,255,255,.98)!important;box-shadow:0 4px 12px #0003;border-radius:6px;max-width:400px}.toggle-panel-btn[_ngcontent-%COMP%]{box-shadow:0 2px 6px #00000026;font-weight:600}.liveheader[_ngcontent-%COMP%]{color:#0100ca}.srnotd[_ngcontent-%COMP%]{background-color:#809b92}.current-vehicle-section[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;width:280px;z-index:998}.current-vehicle-section[_ngcontent-%COMP%] .accordion-item[_ngcontent-%COMP%]{background:rgba(255,255,255,.98);box-shadow:0 4px 12px #0003;border-radius:6px 6px 0 0}.map-icon[_ngcontent-%COMP%]{animation:rotate-animation 10s infinite linear}@keyframes rotate-animation{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.direction-arrow[_ngcontent-%COMP%]{animation:pulse-arrow 2s ease-in-out infinite;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}@keyframes pulse-arrow{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.1)}}.history-arrow[_ngcontent-%COMP%]{animation:slide-arrow 3s ease-in-out infinite}@keyframes slide-arrow{0%,to{opacity:.8}50%{opacity:1}}.leaflet-marker-icon[_ngcontent-%COMP%]{transition:all .5s cubic-bezier(.4,0,.2,1)!important}.vehicle-row[_ngcontent-%COMP%]:hover{background-color:#f8f9fa!important;cursor:pointer;transform:translate(2px);transition:all .2s ease}.vehicle-row[_ngcontent-%COMP%] .vehicle-name[_ngcontent-%COMP%]{transition:all .3s ease}.vehicle-row[_ngcontent-%COMP%]:hover .vehicle-name[_ngcontent-%COMP%]{box-shadow:0 2px 8px #00000026}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:scale(1.05)}.history-selector-row[_ngcontent-%COMP%]{background-color:#f0f8ff!important;animation:slideDown .3s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.history-row[_ngcontent-%COMP%]{background-color:#f0f8ff!important;animation:slideDown .3s ease-out}.table_title[_ngcontent-%COMP%]{border-bottom:2px solid #ff701d} .ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.form-control[_ngcontent-%COMP%]{height:calc(1.45rem + 2px)}.invalid-feedback[_ngcontent-%COMP%]{font-size:11px;color:#dc3545}input[_ngcontent-%COMP%]{font-size:12px}.starvalid[_ngcontent-%COMP%]{color:#ff0040!important}.validationmsg[_ngcontent-%COMP%]{--bs-text-opacity: 1;color:#ff0040!important;font-weight:600}.rotate[_ngcontent-%COMP%]{animation:rotation 2s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.green[_ngcontent-%COMP%]{color:green;font-weight:700}.stop[_ngcontent-%COMP%]{color:#00f;font-weight:700}.gray[_ngcontent-%COMP%]{color:gray;font-weight:700}.yellow[_ngcontent-%COMP%]{color:#ffae00;font-weight:700}.vehicle-list-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], .vehicle-list-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:12px}.vehicle-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{border:none!important}.vehicle-list-table[_ngcontent-%COMP%] .vehicle-row[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.vehicle-popup[_ngcontent-%COMP%]{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;padding:8px;min-width:250px}.vehicle-popup[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin:0 0 8px;padding:4px 0;border-bottom:2px solid #007bff;color:#333;font-weight:600}.vehicle-popup[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0;font-size:12px;line-height:1.4}.vehicle-popup[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#555;font-weight:600}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;text-transform:uppercase}.status-running[_ngcontent-%COMP%]{background-color:#28a745;color:#fff}.status-stop[_ngcontent-%COMP%]{background-color:#007bff;color:#fff}.status-idle[_ngcontent-%COMP%]{background-color:#ffc107;color:#333}.status-non-polling[_ngcontent-%COMP%]{background-color:#dc3545;color:#fff}#liveTrackingMap[_ngcontent-%COMP%]{z-index:1}.leaflet-marker-icon[_ngcontent-%COMP%]{transition:transform .3s ease-out!important}.leaflet-marker-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{transition:all 1s ease-in-out!important}.leaflet-container[_ngcontent-%COMP%]{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}.leaflet-popup-content-wrapper[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 4px 12px #00000026}.leaflet-popup-content[_ngcontent-%COMP%]{margin:0;padding:0}.leaflet-popup-tip[_ngcontent-%COMP%]{box-shadow:0 2px 4px #0000001a}.small-popup[_ngcontent-%COMP%]{font-size:11px;width:220px;padding:4px!important}.popup-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:11px}.popup-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:center;font-size:12px;padding:4px;background:#f1f1f1;border-bottom:1px solid #ccc}.popup-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:3px 4px;vertical-align:top;border-bottom:1px solid #eee}.status-badge[_ngcontent-%COMP%]{padding:1px 4px;border-radius:4px;font-size:10px;font-weight:600;color:#fff}.status-running[_ngcontent-%COMP%]{background:#28a745}.status-stop[_ngcontent-%COMP%]{background:#dc3545}.status-idle[_ngcontent-%COMP%]{background:#ffc107;color:#000}.leaflet-popup-content-wrapper[_ngcontent-%COMP%]{border-radius:6px!important;padding:4px!important}.leaflet-popup-content[_ngcontent-%COMP%]{margin:0!important}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#888;border-radius:3px}.vehicle-panel[_ngcontent-%COMP%] [_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#555}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes pulse-marker{0%,to{opacity:.3;transform:scale(1)}50%{opacity:.1;transform:scale(1.3)}}.leaflet-pulsing-icon[_ngcontent-%COMP%]{border-radius:50%;animation:pulse-marker 2s ease-out infinite} .leaflet-touch .leaflet-control-layers-toggle{width:30px;height:30px}.nav-pills[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%], .nav-pills[_ngcontent-%COMP%] .show[_ngcontent-%COMP%] > .nav-link[_ngcontent-%COMP%]{color:#fff}.nav-fill[_ngcontent-%COMP%] .nav-item[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], .nav-justified[_ngcontent-%COMP%] .nav-item[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{width:100%}.nav-pills[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%], .nav-pills[_ngcontent-%COMP%] .show[_ngcontent-%COMP%] > .nav-link[_ngcontent-%COMP%]{color:#fff}.nav-pills[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{border:none!important;padding:.5rem 1.75rem}.child-arrow-container[_ngcontent-%COMP%]{position:absolute;
1left:22px;top:28px;width:0;height:40px;z-index:2}.child-arrow-vertical[_ngcontent-%COMP%]{border-left:2px dotted #888;height:32px;margin-left:-1px}.child-arrow-horizontal[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin-top:-2px}.child-arrow-head[_ngcontent-%COMP%]{font-size:18px;color:#888;margin-top:-2px}.child-grid-row[_ngcontent-%COMP%]{background:#f8f9fa;border-top:none}.child-grid-table[_ngcontent-%COMP%]{box-shadow:0 2px 8px #00000012;border-radius:6px}.child-arrow-vertical-with-arrow[_ngcontent-%COMP%]{position:relative;border-left:2px dotted #888;height:10px;margin-left:-1px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;overflow:visible}.child-arrow-down[_ngcontent-%COMP%]{position:absolute;bottom:-24px;left:50%;transform:translate(-50%);font-size:28px;font-weight:700;color:#222;background:transparent;z-index:100;line-height:1}.details-header[_ngcontent-%COMP%]{vertical-align:middle!important;text-align:center!important;background:#bdcee7;border-bottom:2px solid #e0e0e0;padding:8px 4px!important}.details-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#184365;margin-bottom:2px;letter-spacing:.5px}.details-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:11px;color:#000;font-weight:700;margin-top:0;line-height:1.2}@media (max-width: 768px){.details-header[_ngcontent-%COMP%] .header-title[_ngcontent-%COMP%]{font-size:12px}.details-header[_ngcontent-%COMP%] .header-subtitle[_ngcontent-%COMP%]{font-size:10px}}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"]}),n})();function Xs(n,a){return{type:7,name:n,definitions:a,options:{}}}function er(n,a=null){return{type:4,styles:a,timings:n}}function Ce(n){return{type:6,styles:n,offset:null}}function Te(n,a,t){return{type:0,name:n,styles:a,options:t}}function tr(n,a,t=null){return{type:1,expr:n,animation:a,options:t}}var ee=b(98407);let ir=(()=>{class n{constructor(){this.map=null,this.marker=null,this.liveMarker=null,this.historyPolyline=null}initMap(t,i,o){this.map&&this.map.remove(),this.map=ee.map(t).setView([i,o],13),ee.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{}).addTo(this.map),this.marker=ee.marker([i,o]).addTo(this.map)}plotVehicle(t,i){this.map&&this.marker&&(this.marker.setLatLng([t,i]),this.map.setView([t,i],13))}startLiveTracking(t){var i=this;!this.map||(this.liveTrackingInterval&&clearInterval(this.liveTrackingInterval),this.liveTrackingInterval=setInterval((0,I.Z)(function*(){const o=yield t();!(null==o?void 0:o.lat)||!(null==o?void 0:o.lng)||!i.map||(i.liveMarker?i.liveMarker.setLatLng([o.lat,o.lng]):(i.liveMarker=ee.marker([o.lat,o.lng]).addTo(i.map),i.map.setVie
1w([o.lat,o.lng],15)))}),5e3))}stopLiveTracking(){this.liveTrackingInterval&&clearInterval(this.liveTrackingInterval)}plotHistoryRoute(t){var i=this;return(0,I.Z)(function*(){if(!i.map)return;i.historyPolyline&&i.map.removeLayer(i.historyPolyline);const o=t.map(s=>[s.lat,s.lng]);i.historyPolyline=ee.polyline(o,{color:"blue",weight:4}).addTo(i.map),i.map.fitBounds(i.historyPolyline.getBounds())})()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function nr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){return e.CHM(t),e.oxw().goBack()}),e._UZ(1,"i",10),e._uU(2," Back "),e.qZA()}}function or(n,a){1&n&&(e.TgZ(0,"div",11)(1,"div",12),e._UZ(2,"div",13),e.qZA()())}function ar(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.lnq("Showing ",t.recordFrom," To ",t.recordTo," ( Out Of ",t.totalCount," ) Entries")}}function sr(n,a){if(1&n&&(e.TgZ(0,"ng-option",50),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function rr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",21)(1,"ng-select",48),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).customerObject=o})("change",function(){e.CHM(t);const o=e.oxw(2);return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Live Status","Select Customer","On Change Customer",o.onclickeventmessage)}),e.YNc(2,sr,2,2,"ng-option",49),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.customerObject),e.xp6(1),e.Q6J("ngForOf",t.customerList)}}function lr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"span",75)(1,"i",76),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().index;return e.oxw(2).toggleRow(o)}),e.qZA()()}}function cr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"span",77)(1,"i",78),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().index;return e.oxw(2).toggleRow(o)}),e.qZA()()}}function dr(n,a){1&n&&e._UZ(0,"i",79)}function pr(n,a){1&n&&e._UZ(0,"i",80)}function gr(n,a){1&n&&e._UZ(0,"i",81)}function mr(n,a){1&n&&e._UZ(0,"i",82)}function ur(n,a){1&n&&e._UZ(0,"i",83)}function hr(n,a){1&n&&e._UZ(0,"i",84)}function _r(n,a){1&n&&e._UZ(0,"i",85)}function fr(n,a){1&n&&e._UZ(0,"i",86)}function vr(n,a){1&n&&e._UZ(0,"i",87)}function br(n,a){1&n&&e._UZ(0,"i",88)}const xr=function(n,a,t){return{"badge bgconditionsuccess":n,"badge bg-secondary":a,"badge bgconditionerror":t}};function Cr(n,a){if(1&n&&(e.TgZ(0,"tr",89)(1,"td",90)(2,"div",91)(3,"div",92),e.O4$(),e.TgZ(4,"svg",93),e._UZ(5,"line",94)(6,"polygon",95),e.qZA()(),e.kcU(),e.TgZ(7,"div",96)(8,"table",97)(9,"thead")(10,"tr")(11,"th"),e._uU(12,"LAST UPDATED TIMESTAMP"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"LAST HEALTH CHECK TIMESTAMP"),e.qZA(),e.TgZ(15,"th"),e._uU(16,"LOCATION UPDATE FREQUENCY"),e.qZA(),e.TgZ(17,"th"),e._uU(18,"DEVICE FIRMWARE VERSION"),e.qZA(),e.TgZ(19,"th"),e._uU(20,"DATA TRANSMISSION STATUS"),e.qZA(),e.TgZ(21,"th"),e._uU(22,"REMARKS/COMMENTS"),e.qZA()()(),e.TgZ(23,"tbody")(24,"tr")(25,"td"),e._uU(26),e.qZA(),e.TgZ(27,"td"),e._uU(28),e.qZA(),e.TgZ(29,"td"),e._uU(30),e.qZA(),e.TgZ(31,"td"),e._uU(32),e.qZA(),e.TgZ(33,"td")(34,"span",56)(35,"b"),e._uU(36),e.qZA()()(),e.TgZ(37,"td"),e._uU(38),e.qZA()()()()()()()()),2&n){const t=e.oxw(),i=t.index,o=t.$implicit,s=e.oxw(2);e.xp6(2),e.Q6J("@childRowAnimation",null!=s.expandedRows&&s.expandedRows.includes(i)?"open":"closed"),e.xp6(24),e.Oqu(o.lastUpdateTimestamp),e.xp6(2),e.Oqu(o.lastHealthCheckTimestamp),e.xp6(2),e.Oqu(o.locationUpdateFrequency),e.xp6(2),e.Oqu(o.deviceFirmwareVersion),e.xp6(2),e.Q6J("ngClass",e.kEZ(8,xr,"Normal"===o.dataTransmissionStatus,"Delayed"===o.dataTransmissionStatus,"Failed"===o.dataTransmissionStatus)),e.xp6(2),e.Oqu(o.dataTransmissionStatus),e.xp6(2),e.Oqu(o.remarks)}}const ge=function(n,a){return{"badge bgconditionsuccess":n,"badge bgconditionerror":a}},Tr=function(n,a){return{"badge bgconditionsuccess":n,"badge bg-secondary":a}},yr=function(n,a,t){return{"badge bgconditionsuccess":n,"badge bgconditionerror":a,"badge bg-secondary":t}},Zr=function(n,a){return{"badge bgconditionerror":n,"badge bgconditionsuccess":a}};function Mr(n,a){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"tr")(2,"td",51)(3,"div",52),e.NdJ("click",function(){const s=e.CHM(t).index;return e.oxw(2).toggleRow(s)}),e.TgZ(4,"strong"),e._uU(5),e.qZA(),e.YNc(6,lr,2,0,"span",53),e.YNc(7,cr,2,0,"span",54),e.qZA()(),e.TgZ(8,"td",55),e._uU(9),e._UZ(10,"hr",44),e._uU(11),e.qZA(),e.TgZ(12,"td")(13,"span",56),e.YNc(14,dr,1,0,"i",57),e.YNc(15,pr,1,0,"i",58),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"span",59),e.YNc(19,gr,1,0,"i",60),e.YNc(20,mr,1,0,"i",61),e._uU(21),e.qZA()(),e.TgZ(22,"td",55),e._uU(23),e.qZA(),e.TgZ(24,"td")(25,"span",56),e.YNc(26,ur,1,0,"i",62),e.YNc(27,hr,1,0,"i",63),e._uU(28),e.qZA()(),e.TgZ(29,"td")(30,"span",56)(31,"b"),e._uU(32),e.qZA()()(),e.TgZ(33,"td")(34,"span",56),e.YNc(35,_r,1,0,"i",64),e.YNc(36,fr,1,0,"i",65),e.TgZ(37,"b"),e._uU(38),e.qZA()()(),e.TgZ(39,"td")(40,"span",56),e.YNc(41,vr,1,0,"i",66),e.YNc(42,br,1,0,"i",67),e.TgZ(43,"b"),e._uU(44),e.qZA()()(),e.TgZ(45,"td")(46,"div",68)(47,"div",69),e._UZ(48,"div",70),e.qZA(),e.TgZ(49,"span",71),e._uU(50),e.qZA()()(),e.TgZ(51,"td")(52,"button",72),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).trackSingleVehicle(s)}),e._UZ(53,"i",73),e.qZA()()(),e.YNc(54,Cr,39,12,"tr",74),e.BQk()}if(2&n){const t=a.$implicit,i=a.index,o=e.oxw(2);e.xp6(5),e.Oqu(t.vehicleRegistrationNo),e.xp6(1),e.Q6J("ngIf",!(null!=o.expandedRows&&o.expandedRows.includes(i))),e.xp6(1),e.Q6J("ngIf",null==o.expandedRows?null:o.expandedRows.includes(i)),e.xp6(2),e.hij("",t.imeiNo," "),e.xp6(2),e.hij("",t.iccidNo," "),e.xp6(2),e.Q6J("ngClass",e.WLB(34,ge,"Connected"===t.gpsSignalStatus,"Disconnected"===t.gpsSignalStatus)),e.xp6(1),e.Q6J("ngIf","Connected"===t.gpsSignalStatus),e.xp6(1),e.Q6J("ngIf","Disconnected"===t.gpsSignalStatus),e.xp6(1),e.hij(" ",t.gpsSignalStatus," "),e.xp6(2),e.Q6J("ngClass",e.WLB(37,Tr,"Activated"===t.activationStatus,"Not Activated"===t.activationStatus)),e.xp6(1),e.Q6J("ngIf","Activated"===t.activationStatus),e.xp6(1),e.Q6J("ngIf","Not Activated"===t.activationStatus),e.xp6(1),e.hij(" ",t.activationStatus," "),e.xp6(2),e.Oqu(t.activationDateTime),e.xp6(2),e.Q6J("ngClass",e.WLB(40,ge,"Compliant"===t.complianceStatus,"Non-compliant"===t.complianceStatus)),e.xp6(1),e.Q6J("ngIf","Compliant"===t.complianceStatus),e.xp6(1),e.Q6J("ngIf","Non-compliant"===t.complianceStatus),e.xp6(1),e.hij(" ",t.complianceStatus," "),e.xp6(2),e.Q6J("ngClass",e.kEZ(43,yr,"Success"===t.healthCheckStatus,"Failure"===t.healthCheckStatus,"Missed"===t.healthCheckStatus)),e.xp6(2),e.Oqu(t.healthCheckStatus),e.xp6(2),e.Q6J("ngClass",e.WLB(47,ge,"Pressed"===t.panicButtonStatus,"Not Pressed"===t.panicButtonStatus)),e.xp6(1),e.Q6J("ngIf","Pressed"===t.panicButtonStatus),e.xp6(1),e.Q6J("ngIf","Not Pressed"===t.panicButtonStatus),e.xp6(2),e.hij("\xa0",t.panicButtonStatus,""),e.xp6(2),e.Q6J("ngClass",e.WLB(50,Zr,"Active"===t.emergencyAlertStatus,"Resolved"===t.emergencyAlertStatus)),e.xp6(1),e.Q6J("ngIf","Active"===t.emergencyAlertStatus),e.xp6(1),e.Q6J("ngIf","Resolved"===t.emergencyAlertStatus),e.xp6(2),e.Oqu(t.emergencyAlertStatus),e.xp6(4),e.Udp("width",o.getBatteryPercentage(t.batteryPercentage),"%"),e.Q6J("ngClass",o.getBatteryProgressClass(t.batteryPercentage)),e.xp6(1),e.Q6J("ngClass",o.getBatteryBadgeClass(t.batteryPercentage)),e.xp6(1),e.Oqu(t.batteryPercentage),e.xp6(4),e.Q6J("ngIf",null==o.expandedRows?null:o.expandedRows.includes(i))}}function wr(n,a){1&n&&e._UZ(0,"div",98)}const Ar=function(n){return{"max-height":n}};function Ir(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",17),e.YNc(4,ar,2,3,"span",18),e.TgZ(5,"span",19),e._uU(6),e.qZA()(),e.YNc(7,rr,3,2,"div",20),e.TgZ(8,"div",21)(9,"div")(10,"select",22),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().intervalTime=o})("change",function(){return e.CHM(t),e.oxw().Details("")}
1),e.TgZ(11,"option",23),e._uU(12," 10 sec"),e.qZA(),e.TgZ(13,"option",24),e._uU(14,"20 sec"),e.qZA(),e.TgZ(15,"option",25),e._uU(16,"30 sec"),e.qZA(),e.TgZ(17,"option",26),e._uU(18,"1 min"),e.qZA()()()(),e.TgZ(19,"div",27)(20,"span",28)(21,"label",29),e._uU(22,"Show "),e.TgZ(23,"select",30),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().detailsparam.itemperpage=o}),e.qZA(),e._uU(24," entries"),e.qZA()(),e.TgZ(25,"span")(26,"button",31),e._UZ(27,"i",32),e.qZA()(),e.TgZ(28,"span")(29,"button",33),e._UZ(30,"i",34),e.qZA(),e.TgZ(31,"button",35),e._UZ(32,"i",36),e.qZA()(),e.TgZ(33,"label")(34,"input",37),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().detailsparam.searchby=o}),e.qZA()(),e.TgZ(35,"button",38),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.Details("search"),o.es.pageDataInfo("",o.detailsparam,"Live Status","Details Method","On click search button",o.onclickeventmessage)}),e._UZ(36,"span",39),e.qZA(),e.TgZ(37,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().showMapView()}),e._UZ(38,"i",41),e.qZA()()(),e.TgZ(39,"div",42)(40,"table",43)(41,"thead")(42,"tr")(43,"th"),e._uU(44,"VEHICLE NO."),e.qZA(),e.TgZ(45,"th"),e._uU(46,"IMEI NO. "),e._UZ(47,"hr",44),e._uU(48,"ICCID NO. "),e.qZA(),e.TgZ(49,"th"),e._uU(50,"GPS SIGNAL STATUS"),e.qZA(),e.TgZ(51,"th"),e._uU(52,"ACTIVATION STATUS"),e.qZA(),e.TgZ(53,"th"),e._uU(54,"DATETIME OF ACTIVATION"),e.qZA(),e.TgZ(55,"th"),e._uU(56,"COMPLIANCE STATUS"),e.qZA(),e.TgZ(57,"th"),e._uU(58,"HEALTH CHECK STATUS"),e.qZA(),e.TgZ(59,"th"),e._uU(60,"PANIC BUTTON STATUS"),e.qZA(),e.TgZ(61,"th"),e._uU(62,"EMERGENCY ALERT STATUS"),e.qZA(),e.TgZ(63,"th"),e._uU(64,"BATTERY PERCENTAGE"),e.qZA(),e.TgZ(65,"th"),e._uU(66,"TRACK"),e.qZA()()(),e.TgZ(67,"tbody"),e.YNc(68,Mr,55,53,"ng-container",45),e.qZA()()(),e.TgZ(69,"div",46),e.YNc(70,wr,1,0,"div",47),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngIf",0!=t.totalCount),e.xp6(2),e.hij(" ",t.status?"("+t.status+")":"",""),e.xp6(1),e.Q6J("ngIf","800"!=t.roleId),e.xp6(3),e.Q6J("ngModel",t.intervalTime),e.xp6(13),e.Q6J("ngModel",t.detailsparam.itemperpage),e.xp6(6),e.Q6J("disabled","0"==t.totalCount),e.xp6(2),e.Q6J("disabled","0"==t.totalCount),e.xp6(3),e.Q6J("ngModel",t.detailsparam.searchby),e.xp6(5),e.Q6J("ngStyle",e.VKq(11,Ar,t.tableHeight)),e.xp6(29),e.Q6J("ngForOf",t.complianceList),e.xp6(2),e.Q6J("ngIf",t.totalCount>t.detailsparam.itemperpage)}}let Dr=(()=>{class n{constructor(t,i,o,s,r,c,f,D){this.api=t,this.apiService=i,this.listService=o,this.loader=s,this.router=r,this.datePipe=c,this.es=f,this.mapService=D,this.detailData=[],this.visibleDiv="grid",this.roleId=sessionStorage.getItem("loginroleid"),this.vehicleList=[],this.customerlist=[],this.tableHeight="",this.requestTitle="",this.customerList=[],this.onclickeventmessage="",this.showLiveTrackingMap=!1,this.selectedVehicleForTracking=null,this.leafletMapMode="",this.showHistoryControls=!1,this.valueChange=new e.vpe,this.intervalTime=1e4,this.isFromDashboard=!1,this.leafletMap=null,this.leafletMarkers=[],this.markerClusterGroup=null,this.showModal=!1,this.selectedItem=null,this.dateObj="",this.complianceList=[{deviceSrNo:"ACON4A1422100254864",imeiNo:"863192503046513",iccidNo:"8991102105467708516F",vehicleChassisNo:"MP20F MAT78405",companyClass:"ATLANTA SYSTEMS PVT LTD",companyLongform:"ATLANTA SYSTEMS PVT LTD is a leading provider of vehicle tracking solutions...",modelCode:"4I",certifiedAuthority:"AUTOMOTIVE RESEARCH ASSOCIATION OF INDIA",kycStatus:"VALID",deviceHealth:"29-Nov-2025 12:36:31 PM",overspeed:"NA",track:!0,lat:28.6139,lng:77.209,longform:"Full details for ACON4A1422100254864...",lastHealthCheckTimestamp:"2025-11-29 12:36:31",healthCheckStatus:"Success",gpsSignalStatus:"Connected",locationUpdateFrequency:"10 sec",panicButtonStatus:"Not Pressed",emergencyAlertStatus:"Resolved",deviceFirmwareVersion:"v1.2.3",batteryPercentage:"85%",dataTransmissionStatus:"Normal",vehicleRegistrationNo:"MH12AB1234",activationStatus:"Activated",activationDateTime:"2025-11-15 09:30:00",complianceStatus:"Compliant",lastUpdateTimestamp:"2025-11-29 12:36:31",remarks:"All systems operational, regular maintenance completed"},{deviceSrNo:"ASP1I1042400004566",imeiNo:"868136052052021",iccidNo:"8991102305852039611",vehicleChassisNo:"MP66T2726 MA1K2XKXL5G40126",companyClass:"ASP1 - Motor Cab",companyLongform:"ASP1 - Motor Cab is certified for public transport...",modelCode:"3L",certifiedAuthority:"INTERNATIONAL CENTRE FOR AUTOMOTIVE TECHNOLOGY",kycStatus:"VALID",deviceHealth:"29-Nov-2025 12:29:56 PM",overspeed:"NA",track:!0,lat:19.076,lng:72.8777,longform:"Full details for ASP1I1042400004566...",lastHealthCheckTimestamp:"2025-11-29 12:29:56",healthCheckStatus:"Failure",gpsSignalStatus:"Disconnected",locationUpdateFrequency:"20 sec",panicButtonStatus:"Pressed",emergencyAlertStatus:"Active",deviceFirmwareVersion:"v1.1.0",batteryPercentage:"25%",dataTransmissionStatus:"Delayed",vehicleRegistrationNo:"DL01CD5678",activationStatus:"Activated",activationDateTime:"2025-11-10 14:45:00",complianceStatus:"Non-compliant",lastUpdateTimestamp:"2025-11-29 12:29:56",remarks:"Low battery, emergency alert triggered, requires immediate attention"},{deviceSrNo:"BTRK7890123456789",imeiNo:"869876543210987",iccidNo:"8991103456789012345",vehicleChassisNo:"KA05EF9012XYZ789",companyClass:"TRACKSOL - GPS Solutions",companyLongform:"TRACKSOL provides advanced GPS tracking solutions for fleet management...",modelCode:"5G",certifiedAuthority:"CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING",kycStatus:"VALID",deviceHealth:"29-Nov-2025 11:15:22 AM",overspeed:"NA",track:!0,lat:12.9716,lng:77.5946,longform:"Full details for BTRK7890123456789...",lastHealthCheckTimestamp:"2025-11-29 11:15:22",healthCheckStatus:"Success",gpsSignalStatus:"Connected",locationUpdateFrequency:"15 sec",panicButtonStatus:"Not Pressed",emergencyAlertStatus:"Resolved",deviceFirmwareVersion:"v1.3.1",batteryPercentage:"72%",dataTransmissionStatus:"Normal",vehicleRegistrationNo:"KA05EF9012",activationStatus:"Activated",activationDateTime:"2025-11-20 11:00:00",complianceStatus:"Compliant",lastUpdateTimestamp:"2025-11-29 11:15:22",remarks:"Routine maintenance due in 2 weeks, all parameters normal"}],this.showCompanyTooltip=!1,this.selectedCompanyItem=null,this.showDateTimePickers=!1,this.detailsparam=new pe.e,this.expandedRows=[],this.Details=w=>{try{this.livevehicledetailsApi.unsubscribe()}catch(x){}"refresh"==w&&(this.detailsparam.searchby="",this.detailsparam.pageno=1,$("#refreshbtn").addClass("rotate"),this.valueChange.emit(),this.status=""),this.livevehicledetailsApi=this.api.apiCall(this.detailsparam,"map/livevehicledetails").subscribe(x=>{$("#refreshbtn").removeClass("rotate"),this.onclickeventmessage=x.entity.message,200==x.statusCode&&x.entity.details.length>0?(this.detailData=x.entity.details,this.detailData.forEach(k=>k.expanded=!1),this.totalCount=x.entity.totalrecord):(this.detailData=[],this.totalCount=0,this.recordFrom=0,this.recordFrom=0);try{clearTimeout(this.liveStatusTimeout)}catch(k){}}),this.detailsparam.searchby=this.detailsparam.searchby.trim(),this.showModal&&this.selectedItem&&this.mapService.plotVehicle(this.selectedItem.lat||28.6139,this.selectedItem.lng||77.209)}}ngOnInit(){try{"map"===this.visibleDiv&&this.initLeafletMap(),this.Details(""),this.getDate()}catch(t){}}getDate(){$(()=>{$('input[name="date"]').daterangepicker({showDropdowns:!0,startDate:F().startOf("day").format("DD-MMM-YYYY"),endDate:F().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},singleDatePicker:!0,maxDate:new Date,minYear:2022,maxYear:parseInt(F().format("YYYY"),10),function(t,i){$("#datepicker").html(t.format("DD-MMM-YYYY")+" : "+i.format("DD-MMM-YYYY"))}}),$('input[name="date"]').on("hide.daterangepicker",(t,i)=>{try{this.dateObj=t.target.value}catch(o){}}),this.dateObj=document.getElementById("datepicker").value,$("#fromtime").wickedpicker({title:"From Time",now:"00:00"}),$("#totime").wickedpicker({title:"To Time",now:"23:59"})})}showCompanyDetails(t,i){i.preventDefault(),this.selectedCompanyItem===t&&this.showCompanyTooltip?(this.showCompanyTooltip=!1,this.selectedCompanyItem=null,this.tooltipTimeout&&clearTimeout(this.tooltipTimeout)):(this.selectedCompanyItem=t,this.showCompanyTooltip=!0,this.tooltipTimeout&&clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(()=>{this.showCompanyTooltip=!1,this.selectedCompanyItem=null},6e3))}getCompanyCode(t){if(!t)return"";const i=t.match(/^([A-Za-z0-9]+)/);return i?i[1]:t}getCompanyClassRest(t){if(!t)return"";const i=this.getCompanyCode(t);return t.replace(i,"")}trackSingleVehicle(t){this.visibleDiv="map",$("#showFilePanel").show(),setTimeout(()=>{this.leafletMap&&(this.leafletMap.remove(),this.leafletMap=null),this.markerClusterGroup&&(this.markerClusterGroup=null),this.initLeafletMap(),this.leafletMarkers=[];let i=(t.pollingstatus||t.pollingStatus||"unknown").toLowerCase(),o="assets/map/red.png";"running"===i?o="assets/map/green.png":"idle"===i?o="assets/map/yellow.png":"stop"===i&&(o="assets/map/blue.png");const s=L.icon({iconUrl:o,iconSize:[15,24],iconAnchor:[12,12],popupAnchor:[0,-12]}),r=L.marker([t.lat,t.lng],{icon:s}).addTo(this.leafletMap);r.bindPopup(`\n <div style='min-width: 180px; font-family: Arial, sans-serif; padding: 0px;'>\n \n \x3c!-- Vehicle Header --\x3e\n <div style='background: linear-gradient(135deg, #c4c8dd 0%, #c9c7cc 100%);\n color: #000000;\n padding: 6px;\n border-radius: 6px;\n margin-bottom: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);'>\n <div style='font-size: 16px; font-weight: bold; margin-bottom: 6px;'>\n <i class='fa fa-truck' style='margin-right: 6px;'></i>\n ${t.vehicleRegistrationNo||"N/A"}\n </div>\n <div style='font-size: 12px; opacity: 0.95;'>\n <i class='fa fa-microchip' style='margin-right: 4px;'></i> IMEI: ${t.imeiNo}\n </div>\n <div style='font-size: 12px; opacity: 0.95; margin-top: 4px;'>
1\n <span style='background: rgb(255 255 255 / 52%); \n padding: 3px 8px; \n border-radius: 12px;\n display: inline-block;'>\n <i class='fa fa-info-circle' style='margin-right: 4px;'></i>\n ${t.complianceStatus}\n </span>\n </div>\n </div>\n\n \x3c!-- Date & Time Section --\x3e\n <div style='background: #f8f9fa; \n padding: 3px; \n border-radius: 6px; \n margin-bottom: 0px;\n border: 1px solid #e9ecef;'>\n \n \x3c!-- Date Input --\x3e\n <div style='margin-bottom: 12px;'>\n <label style='font-size: 12px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-calendar' style='margin-right: 4px; color: #667eea;'></i>\n Date\n </label>\n <input style='padding: 8px 10px; \n width: 100%; \n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n type='text' \n name='date' \n id='datepicker' \n required \n placeholder='Select Date'\n onfocus='this.style.borderColor="#667eea"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n \n \x3c!-- Time Inputs --\x3e\n <div style='display: flex; gap: 10px;'>\n <div style='flex: 1;'>\n <label style='font-size: 11px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-clock-o' style='margin-right: 4px; color: #28a745;'></i>\n From Time\n </label>\n <input type='text' \n name='timepicker' \n id='fromtime'\n style='padding: 4px 6px; \n width: 100%; \n text-align: center;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n onfocus='this.style.borderColor="#28a745"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n \n <div style='flex: 1;'>\n <label style='font-size: 11px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-clock-o' style='margin-right: 4px; color: #dc3545;'></i>\n To Time\n </label>\n <input type='text' \n name='timepicker'\n id='totime'\n style='padding: 4px 6px; \n width: 100%; \n text-align: center;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n onfocus='this.style.borderColor="#dc3545"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n </div>\n </div>\n\n \x3c!-- Action Buttons --\x3e\n <div style='display: flex; \n flex-direction: column; \n gap: 8px;'>\n <button id='liveTrackBtn' \n style='background: linear-gradient(135deg, #28a745 0%, #20c997 100%);\n color: white;\n border: none;\n padding: 4px 16px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s;\n box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);\n width: 100%;'\n onmouseover='this.style.transform="translateY(-2px)"; this.style.boxShadow="0 4px 8px rgba(40, 167, 69, 0.4)";'\n onmouseout='this.style.transform="translateY(0)"; this.style.boxShadow="0 2px 4px rgba(40, 167, 69, 0.3)";'>\n <i class='fa fa-location-arrow' style='margin-right: 6px;'></i>\n Live Track\n </button>\n\n <button id='historyTrackBtn' \n style='background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);\n color: white;\n border: none;\n padding: 4px 16px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s;\n box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);\n width: 100%;'\n onmouseover='this.style.transform="translateY(-2px)"; this.style.boxShadow="0 4px 8px rgba(0, 123, 255, 0.4)";'\n onmouseout='this.style.transform="translateY(0)"; this.style.boxShadow="0 2px 4px rgba(0, 123, 255, 0.3)";'>\n <i class='fa fa-history' style='margin-right: 6px;'></i>\n History Track\n </button>\n </div>\n\n </div>`),r.on("click",()=>r.openPopup()),this.leafletMarkers.push(r),this.leafletMap.setVie
1w([t.lat,t.lng],16),this.leafletMap.invalidateSize()},0)}showDetails(t){this.selectedItem=t,this.showModal=!0,this.livevehicledetailsApi=this.api.apiCall(this.detailsparam,"map/livevehicledetails").subscribe(i=>{$("#refreshbtn").removeClass("rotate"),this.onclickeventmessage=i.entity.message,200==i.statusCode&&i.entity.details.length>0?(this.detailData=i.entity.details,this.detailData.forEach(o=>o.expanded=!1),this.totalCount=i.entity.totalrecord,this.recordFrom=this.detailData[0].rowno,this.recordTo=this.detailData[this.detailData.length-1].rowno):(this.detailData=[],this.totalCount=0,this.recordFrom=0,this.recordFrom=0);try{clearTimeout(this.liveStatusTimeout)}catch(o){}})}closeModal(){this.showModal=!1,this.selectedItem=null}ngAfterViewChecked(){}getBatteryBadgeClass(t){const i="string"==typeof t?parseInt(t,10):t;return isNaN(i)?"badge bg-secondary":i>50?"badge bg-success":i>20?"badge bg-warning text-dark":"badge bg-danger"}getBatteryProgressClass(t){const i="string"==typeof t?parseInt(t,10):t;return isNaN(i)?"bg-secondary":i>50?"bg-success":i>20?"bg-warning":"bg-danger"}getBatteryPercentage(t){const i="string"==typeof t?parseInt(t.replace("%",""),10):t;return isNaN(i)?0:i}toggleRow(t){this.expandedRows=1===this.expandedRows.length&&this.expandedRows[0]===t?[]:[t]}showMapView(){this.visibleDiv="map",$("#showFilePanel").show(),setTimeout(()=>{this.initLeafletMap(),this.plotVehiclesOnMap()},0)}initLeafletMap(){this.leafletMap&&(this.leafletMap.remove(),this.leafletMap=null),this.leafletMap=L.map("compliance-leaflet-map",{center:[22.9734,78.6569],zoom:5}),L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"\xa9 OpenStreetMap contributors"}).addTo(this.leafletMap)}plotVehiclesOnMap(){if(this.leafletMap&&(this.markerClusterGroup&&(this.leafletMap.removeLayer(this.markerClusterGroup),this.markerClusterGroup=null),this.leafletMarkers.forEach(t=>this.leafletMap.removeLayer(t)),this.leafletMarkers=[],this.markerClusterGroup=L.markerClusterGroup({showCoverageOnHover:!1,zoomToBoundsOnClick:!0,spiderfyOnMaxZoom:!0,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!0,maxClusterRadius:80,iconCreateFunction:t=>{const i=t.getAllChildMarkers(),o={running:0,idle:0,stop:0,unknown:0};i.forEach(w=>{o[w.options.pollingStatus||"unknown"]++});const s=i.length;let r="unknown",c=0;Object.entries(o).forEach(([w,x])=>{x>c&&(c=x,r=w)});let f="cluster-red";"running"===r?f="cluster-green":"idle"===r?f="cluster-yellow":"stop"===r&&(f="cluster-blue");let D="marker-cluster-small";return s>=100?D="marker-cluster-large":s>=10&&(D="marker-cluster-medium"),new L.DivIcon({html:"<div><span>"+s+"</span></div>",className:"marker-cluster "+D+" "+f,iconSize:new L.Point(40,40)})}}),this.complianceList.forEach(t=>{if(!t.lat||!t.lng)return;let i=(t.pollingstatus||t.pollingStatus||"unknown").toLowerCase(),o="assets/map/red.png";"running"===i?o="assets/map/green.png":"idle"===i?o="assets/map/yellow.png":"stop"===i&&(o="assets/map/blue.png");const s=L.icon({iconUrl:o,iconSize:[15,24],iconAnchor:[12,12],popupAnchor:[0,-12]}),r=L.marker([t.lat,t.lng],{icon:s,pollingStatus:i});r.on("click",()=>this.onVehicleMarkerClick(t,r)),this.markerClusterGroup.addLayer(r),this.leafletMarkers.push(r)}),this.leafletMap.addLayer(this.markerClusterGroup),this.leafletMarkers.length>0&&setTimeout(()=>{const t=L.featureGroup(this.leafletMarkers);this.leafletMap.fitBounds(t.getBounds(),{padding:[50,50],maxZoom:16,animate:!0,duration:1.5})},100),!document.getElementById("cluster-color-style"))){const t=document.createElement("style");t.id="cluster-color-style",t.innerHTML="\n /* Green clusters for running vehicles */\n .marker-cluster.cluster-green div {\n background-color: rgba(40, 167, 69, 0.6);\n }\n .marker-cluster.cluster-green div span {\n background-color: #28a745;\n }\n \n /* Yellow clusters for idle vehicles */\n .marker-cluster.cluster-yellow div {\n background-color: rgba(255, 193, 7, 0.6);\n }\n .marker-cluster.cluster-yellow div span {\n background-color: #ffc107;\n color: #000;\n }
1\n \n /* Blue clusters for stopped vehicles */\n .marker-cluster.cluster-blue div {\n background-color: rgba(0, 123, 255, 0.6);\n }\n .marker-cluster.cluster-blue div span {\n background-color: #007bff;\n }\n \n /* Red clusters for unknown status */\n .marker-cluster.cluster-red div {\n background-color: rgba(231, 76, 60, 0.6);\n }\n .marker-cluster.cluster-red div span {\n background-color: #e74c3c;\n }\n ",document.head.appendChild(t)}}onVehicleMarkerClick(t,i){i.bindPopup(`\n <div style='min-width: 180px; font-family: Arial, sans-serif; padding: 0px;'>\n \n \x3c!-- Vehicle Header --\x3e\n <div style='background: linear-gradient(135deg, #c4c8dd 0%, #c9c7cc 100%);\n color: #000000;\n padding: 6px;\n border-radius: 6px;\n margin-bottom: 2px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);'>\n <div style='font-size: 16px; font-weight: bold; margin-bottom: 6px;'>\n <i class='fa fa-truck' style='margin-right: 6px;'></i>\n ${t.vehicleRegistrationNo||"N/A"}\n </div>\n <div style='font-size: 12px; opacity: 0.95;'>\n <i class='fa fa-microchip' style='margin-right: 4px;'></i> IMEI: ${t.imeiNo}\n </div>\n <div style='font-size: 12px; opacity: 0.95; margin-top: 4px;'>\n <span style='background: rgb(255 255 255 / 52%); \n padding: 3px 8px; \n border-radius: 12px;\n display: inline-block;'>\n <i class='fa fa-info-circle' style='margin-right: 4px;'></i>\n ${t.complianceStatus}\n </span>\n </div>\n </div>\n\n \x3c!-- Date & Time Section --\x3e\n <div style='background: #f8f9fa; \n padding: 3px; \n border-radius: 6px; \n margin-bottom: 0px;\n border: 1px solid #e9ecef;'>\n \n \x3c!-- Date Input --\x3e\n <div style='margin-bottom: 12px;'>\n <label style='font-size: 12px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-calendar' style='margin-right: 4px; color: #667eea;'></i>\n Date\n </label>\n <input style='padding: 8px 10px; \n width: 100%; \n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n type='text' \n name='date' \n id='datepicker' \n required \n placeholder='Select Date'\n onfocus='this.style.borderColor="#667eea"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n \n \x3c!-- Time Inputs --\x3e\n <div style='display: flex; gap: 10px;'>\n <div style='flex: 1;'>\n <label style='font-size: 11px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-clock-o' style='margin-right: 4px; color: #28a745;'></i>\n From Time\n </label>\n <input type='text' \n name='timepicker' \n id='fromtime'\n style='padding: 4px 6px; \n width: 100%; \n text-align: center;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n onfocus='this.style.borderColor="#28a745"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n \n <div style='flex: 1;'>\n <label style='font-size: 11px; \n font-weight: 600; \n color: #495057; \n margin-bottom: 4px; \n display: block;'>\n <i class='fa fa-clock-o' style='margin-right: 4px; color: #dc3545;'></i>\n To Time\n </label>\n <input type='text' \n name='timepicker'\n id='totime'\n style='padding: 4px 6px; \n width: 100%; \n text-align: center;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 12px;\n box-sizing: border-box;\n transition: border-color 0.15s;'\n class='form-control form-control-sm'\n onfocus='this.style.borderColor="#dc3545"'\n onblur='this.style.borderColor="#ced4da"' />\n </div>\n </div>\n </div>\n\n \x3c!-- Action Buttons --\x3e\n <div style='display: flex; \n flex-direction: column; \n gap: 8px;'>\n <button id='liveTrackBtn' \n style='background: linear-gradient(135deg, #28a745 0%, #20c997 100%);\n color: white;\n border: none;\n padding: 4px 16px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s;\n box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);\n width: 100%;'\n onmouseover='this.style.transform="translateY(-2px)"; this.style.boxShadow="0 4px 8px rgba(40, 167, 69, 0.4)";'\n onmouseout='this.style.transform="translateY(0)"; this.style.boxShadow="0 2px 4px rgba(40, 167, 69, 0.3)";'>\n <i class='fa fa-location-arrow' style='margin-right: 6px;'></i>\n Live Track\n </button>\n\n <button id='historyTrackBtn' \n style='background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);\n color: white;\n border: none;\n padding: 4px 16px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.3s;\n box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);\n width: 100%;'\n onmouseover='this.style.transform="translateY(-2px)"; this.style.boxShadow="0 4px 8px rgba(0, 123, 255, 0.4)";'\n onmouseout='this.style.transform="translateY(0)"; this.style.boxShadow="0 2px 4px rgba(0, 123, 255, 0.3)";'>\n <i class='fa fa-history' style='margin-right: 6px;'></i>\n History Track\n </button>\n </div>\n\n </div>\n `).openPopup(),setTimeout(()=>{var s,r;$("#datepicker").daterangepicker({showDropdowns:!0,startDate:F().startOf("day").format("DD-MMM-YYYY"),endDate:F().endOf("day").format("DD-MMM-YYYY"),opens:"center",drops:"down",maxSpan:{days:30},locale:{format:"DD-MMM-YYYY"},singleDatePicker:!0,maxDate:new Date,minYear:2022,maxYear:parseInt(F().format("YYYY"),10)}),$("#fromtime").wickedpicker({title:"From Time",now:"00:00"}),$("#totime").wickedpicker({title:"To Time",now:"23:59"}),null===(s=document.getElementById("liveTrackBtn"))||void 0===s||s.addEventListener("click",()=>{this.startLiveTracking(t.deviceSrNo)}),null===(r=document.getElementById("historyTrackBtn"))||void 0===r||r.addEventListener("click",()=>{const c=document.getElementById("datepicker").value,f=document.getElementById("fromtime").value,D=document.getElementById("totime").value;this.startHistoryTracking(t.deviceSrNo,c,f,D)})},200)}startLiveTracking(t){}startHistoryTracking(t,i,o,s){i&&o&&s||alert("Please select date & time")}goBack(){this.visibleDiv="grid",$("#showFilePanel").hide()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(P.P),e.Y36(ie.s),e.Y36(z.X),e.Y36(J.D),e.Y36(v.F0),e.Y36(y.uU),e.Y36(P.P),e.Y36(ir))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-compliancestatus"]],inputs:{status:"status"},outputs:{valueChange:"valueChange"},decls:10,vars:3,consts:[[1,"page-header","d-flex","justify-content-between","align-items-center"],[1,"page-title"],[1,"mainpageheader","text-white","newtitle","m-2"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"page-actions"],["id","showFilePanel","ngbTooltip","Go Back To Status","class","btn-action",3,"click",4,"ngIf"],[1,"compliance-status-container"],["class","row",4,"ngIf"],["class","row grid-section",4,"ngIf"],["id","showFilePanel","ngbTooltip","Go Back To Status",1,"btn-action",3,"click"],[1,"fa","fa-arrow-left"],[1,"row"],[1,"col-12"],["id","compliance-leaflet-map",2,"height","500px","width","100%","border","1p
1x solid #ccc","border-radius","8px"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-head","d-flex","justify-content-between","flex-wrap"],["id","tickets-table_info","role","status","aria-live","polite",1,"col-auto","mt-2","text-center","fw-bold","total-record-label"],[4,"ngIf"],[1,"text-capitalize","text-danger"],["class","col-auto",4,"ngIf"],[1,"col-auto"],["name","table_length","aria-controls","table","name","intervaltime",2,"font-size","11px",3,"ngModel","ngModelChange","change"],["value","10000","selected",""],["value","20000"],["value","30000"],["value","60000"],[1,"mt-1"],[1,"itemsperpage-style",2,"margin-right","10px"],[1,"d-inline-flex","align-items-center"],["name","table_length","aria-controls","table","name","pageSize",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","mx-1",2,"padding","2px"],["id","refreshbtn","aria-hidden","true",1,"fa","fa-refresh"],["type","button","ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled"],["aria-hidden","true",1,"fa","fa-file-pdf-o","pdf-btn"],["type","button","ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","mx-1",2,"padding","2px",3,"disabled"],["aria-hidden","true",1,"fa","fa-file-excel-o","excel-btn"],["type","text","name","searchTerm","autocomplete","off","aria-controls","tickets-table","placeholder","Search here....","autocomplete","off",1,"form-control","form-control-sm","ms-2","searchinput",2,"width","165px",3,"ngModel","ngModelChange"],["type","button",1,"btn","search-btn",3,"click"],[1,"fa","fa-search"],["title","Show All Vehicles on Leaflet Map","ngbTooltip","Cluster View (Leaflet)",1,"btn","btn-sm","btn-transparent","float-end","p-1",3,"click"],[1,"fa","fa-globe","fa-3x","map-icon"],[1,"tbl-height","table-responsive",3,"ngStyle"],[1,"compliance-table"],[2,"margin","0.2rem 0"],[4,"ngFor","ngForOf"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["placeholder","Select Customer",1,"small",3,"ngModel","ngModelChange","change"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"cursor","pointer"],[1,"d-flex",2,"font-size","10px",3,"click"],["ngbTooltip","Show More Details",4,"ngIf"],["ngbTooltip","Show Less Details",4,"ngIf"],[2,"font-size","10px"],[3,"ngClass"],["class","fa fa-link","aria-hidden","true",4,"ngIf"],["class","fa fa-chain-broken","aria-hidden","true",4,"ngIf"],[1,"d-flex",3,"ngClass"],["class","fa fa-check-circle text-success",4,"ngIf"],["class","fa fa-times-circle text-danger",4,"ngIf"],["class","fa fa-twitch",4,"ngIf"],["class","fa fa-exclamation-triangle",4,"ngIf"],["class","fa fa-toggle-on","aria-hidden","true",4,"ngIf"],["class","fa fa-toggle-off","aria-hidden","true",4,"ngIf"],["class","fa fa-bell text-danger","aria-hidden","true",4,"ngIf"],["class","fa fa-bell-slash text-success","aria-hidden","true",4,"ngIf"],[1,"d-flex","align-items-center"],[1,"progress","flex-grow-1","me-2"],[1,"progress-bar",3,"ngClass"],[1,"badge",3,"ngClass"],["ngbTooltip","Track Live Vehicle",1,"track-btn",3,"click"],[1,"fa","fa-map-marker"],["class","child-row",4,"ngIf"],["ngbTooltip","Show More Details"],[1,"fa","fa-chevron-up","expand-icon",3,"click"],["ngbTooltip","Show Less Details"],[1,"fa","fa-chevron-down","expand-icon",3,"click"],["aria-hidden","true",1,"fa","fa-link"],["aria-hidden","true",1,"fa","fa-chain-broken"],[1,"fa","fa-check-circle","text-success"],[1,"fa","fa-times-circle","text-danger"],[1,"fa","fa-twitch"],[1,"fa","fa-exclamation-triangle"],["aria-hidden","true",1,"fa","fa-toggle-on"],["aria-hidden","true",1,"fa","fa-toggle-off"],["aria-hidden","true",1,"fa","fa-bell","text-danger"],["aria-hidden","true",1,"fa","fa-bell-slash","text-success"],[1,"child-row"],["colspan","10",2,"padding","0"],[2,"display","flex","align-items","flex-start","overflow","hidden"],[2,"width","30px","display","flex","flex-direction","column","align-items","center"],["width","20","height","45",2,"margin-left","14px"],["x1","10","y1","0","x2","10","y2","30","stroke","#484848","stroke-width","3","stroke-dasharray","6,6"],["points","10,38 4,30 16,30","fill","#484848"],[2,"flex","1","border","1p
1x solid #e3e6ec","border-radius","0 0 8px 8px","background","#f8fafc"],[1,"table","table-bordered","table-sm","mb-0","child-table"],[1,"float-end","text-start"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e._uU(4," Compliance Status "),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,nr,3,0,"button",5),e.qZA()(),e.TgZ(7,"div",6),e.YNc(8,or,3,0,"div",7),e.YNc(9,Ir,71,13,"div",8),e.qZA()),2&t&&(e.xp6(6),e.Q6J("ngIf",i.visibleDiv),e.xp6(2),e.Q6J("ngIf","map"===i.visibleDiv),e.xp6(1),e.Q6J("ngIf","map"!==i.visibleDiv))},directives:[y.O5,C._L,Z.w9,d.JJ,d.On,y.sg,Z.xv,d.EJ,d.YN,d.Kr,d.Fj,y.PC,y.mk],styles:[".child-row-anim[_ngcontent-%COMP%]{max-height:600px;opacity:1;visibility:visible;transition:max-height .5s cubic-bezier(.4,0,.2,1),opacity .4s,visibility .4s}.company-tooltip[_ngcontent-%COMP%]{position:absolute;left:0;top:100%;background:#fff;border:1px solid #ccc;box-shadow:0 2px 8px #00000014;padding:9px 8px;font-size:12px;z-index:10;min-width:251px;max-width:278px;white-space:normal}.company-link[_ngcontent-%COMP%]{color:#007bff;text-decoration:underline;cursor:pointer}.table[_ngcontent-%COMP%]{font-size:13px}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:4px 8px;vertical-align:middle}.modal-content[_ngcontent-%COMP%]{font-size:13px}#leafletMap[_ngcontent-%COMP%]{border:1px solid #ccc;margin-top:8px}.bgconditionsuccess[_ngcontent-%COMP%]{background-color:#bfded0!important}.bgconditionerror[_ngcontent-%COMP%]{background-color:#f8cf99!important}.compliance-table[_ngcontent-%COMP%]{width:100%;border-collapse:separate;border-spacing:0;background:#fff;box-shadow:0 2px 8px #0000000d;font-size:13px;border-radius:8px;overflow:hidden}.compliance-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .compliance-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;text-align:center;vertical-align:middle;border-bottom:1px solid #e3e6ec}.compliance-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#b2c0d1;color:#222;font-weight:600;font-size:10px;letter-spacing:.5px;border-bottom:2px solid #b2c0d1;padding:4px}.compliance-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{transition:background .2s}.compliance-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#f5f8fa}.compliance-table[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{font-size:11px;padding:5px 8px;border-radius:12px;font-weight:500;letter-spacing:.2px;box-shadow:0 1px 2px #0000000a}.compliance-table[_ngcontent-%COMP%] .bgconditionsuccess[_ngcontent-%COMP%]{background:#e6f7ee!important;color:#1a7f37!important;border:1px solid #b7e4c7;font-size:11px;padding:5px 8px;border-radius:12px;font-weight:500;letter-spacing:.2px;box-shadow:0 1px 2px #0000000a}.compliance-table[_ngcontent-%COMP%] .bgconditionerror[_ngcontent-%COMP%]{background:#ffeaea!important;color:#d90429!important;border:1px solid #fbb1b1;font-size:11px;padding:5px 8px;border-radius:12px;font-weight:500;letter-spacing:.2px;box-shadow:0 1px 2px #0000000a}.compliance-table[_ngcontent-%COMP%] .bg-secondary[_ngcontent-%COMP%]{background:#f0f0f0!important;color:#555!important;border:1px solid #d1d1d1}.compliance-table[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{background:#e3e6ec;border-radius:4px;height:6px}.compliance-table[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{border-radius:4px;transition:width .3s}.compliance-table[_ngcontent-%COMP%] .child-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#75869a;color:#fff;font-size:10px;font-weight:500;border-bottom:1px solid #b2c0d1;padding:7px}.compliance-table[_ngcontent-%COMP%] .child-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background:#f8fafc;font-size:12px;border-bottom:1px solid #e3e6ec}.compliance-table[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{vertical-align:middle}.compliance-table[_ngcontent-%COMP%] .expand-icon[_ngcontent-%COMP%]{cursor:pointer;color:#035dca;font-size:11px;transition:color .2s}.compliance-table[_ngcontent-%COMP%] .expand-icon[_ngcontent-%COMP%]:hover{color:#036}.compliance-table[_ngcontent-%COMP%] .track-btn[_ngcontent-%COMP%]{color:#007bff;font-size:18px;background:none;border:none;padding:0;cursor:pointer;transition:color .2s}.compliance-table[_ngcontent-%COMP%] .track-btn[_ngcontent-%COMP%]:hover{color:#0056b3}.compliance-table[_ngcontent-%COMP%] .child-row[_ngcontent-%COMP%]{background:#f5f8fa;box-shadow:0 2px 8px #0000000a;border-radius:0 0 8px 8px;margin-bottom:2px}.grid-section[_ngcontent-%COMP%], .ani[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}"],data:{animation:[Xs("childRowAnimation",[Te("closed",Ce({height:"0px",opacity:0,visibility:"hidden",padding:"0"})),Te("open",Ce({height:"*",opacity:1,visibility:"visible",padding:"*"})),tr("closed <=> open",[er("400ms cubic-bezier(0.4,0,0.2,1)")])])]}}),n})();var kr=b(60455);function qr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){return e.CHM(t),e.oxw().goBackToDashboard()}),e._UZ(1,"i",44),e._uU(2," Back "),e.qZA()}}function Or(n,a){1&n&&(e.TgZ(0,"ng-option",45),e._uU(1,"20"),e.qZA())}function Sr(n,a){1&n&&(e.TgZ(0,"ng-option",46),e._uU(1,"50"),e.qZA())}function Fr(n,a){1&n&&(e.TgZ(0,"ng-option",47),e._uU(1,"100"),e.qZA())}function Nr(n,a){if(1&n&&(e.TgZ(0,"ng-option",48),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("value",t.totalCount),e.xp6(1),e.hij(" ",t.totalCount," ")}}function Ur(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",28),e.NdJ("click",function(o){return e.CHM(t),e.oxw().sorting(o,"vendorname")}
1),e._uU(1,"Vendor "),e._UZ(2,"i",29),e.qZA()}}function Lr(n,a){1&n&&(e.TgZ(0,"tbody")(1,"tr")(2,"td",49)(3,"div",50),e._uU(4,"No Record Found"),e.qZA()()()())}function Pr(n,a){if(1&n&&(e.TgZ(0,"div",63),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit,i=e.oxw(2);e.xp6(1),e.hij(" ",""==i.maskICCID(t.deviceiccidno)?"Not Found":i.maskICCID(t.deviceiccidno),"")}}function Jr(n,a){if(1&n&&(e.TgZ(0,"div",64),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",""==t.m2mprovidername?"Not Found":t.m2mprovidername,"")}}function Vr(n,a){if(1&n&&(e.TgZ(0,"td",53),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(""==t.vendorname?"Not Found":t.vendorname)}}const Ze=function(n){return{color:n}};function Rr(n,a){if(1&n&&(e.TgZ(0,"span",61),e._uU(1),e.qZA()),2&n){const t=e.oxw().$implicit;e.Q6J("ngStyle",e.VKq(2,Ze,""==t.vehicleno?"red":"black")),e.xp6(1),e.Oqu(""==t.vehicleno?"Not Assign":t.vehicleno)}}function Qr(n,a){if(1&n&&(e.TgZ(0,"tr")(1,"td",52),e._uU(2),e.qZA(),e.TgZ(3,"td",53)(4,"div",54),e._uU(5),e.qZA(),e.YNc(6,Pr,2,1,"div",55),e.YNc(7,Jr,2,1,"div",56),e.qZA(),e.YNc(8,Vr,2,1,"td",57),e.TgZ(9,"td",53),e._uU(10),e.qZA(),e.TgZ(11,"td"),e._uU(12),e.qZA(),e.TgZ(13,"td"),e._uU(14),e.qZA(),e.TgZ(15,"td",50),e._uU(16),e.qZA(),e.TgZ(17,"td",50),e._uU(18),e.qZA(),e.TgZ(19,"td")(20,"div")(21,"span",58),e._UZ(22,"i",59),e._uU(23),e.qZA()()(),e.TgZ(24,"td")(25,"div")(26,"span",60),e._UZ(27,"i",59),e._uU(28),e.qZA()()(),e.TgZ(29,"td",53)(30,"span",61),e._uU(31),e.qZA(),e._UZ(32,"br"),e.YNc(33,Rr,2,4,"span",62),e.qZA()()),2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(2),e.Oqu(t.rowno),e.xp6(3),e.Oqu(""==t.devicetype?"Not Found":t.devicetype),e.xp6(1),e.Q6J("ngIf","AIS-140"==t.devicetype),e.xp6(1),e.Q6J("ngIf","AIS-140"==t.devicetype),e.xp6(1),e.Q6J("ngIf","101"!=i.loginRoleId),e.xp6(2),e.Oqu(""==t.devicemodelname?"Not Found":t.devicemodelname),e.xp6(2),e.Oqu(""==t.deviceuniqueno?"Not Found":t.deviceuniqueno),e.xp6(2),e.hij(" ",""==i.maskIMEI(t.deviceimeino)?"Not Found":i.maskICCID(t.deviceimeino)," "),e.xp6(2),e.hij(" ",""==i.maskICCID(t.deviceiccidno)?"Not Found":i.maskICCID(t.deviceiccidno)," "),e.xp6(2),e.hij("",""==t.m2mprovidername?"Not Found":t.m2mprovidername," "),e.xp6(5),e.hij(" ",""==t.networkname1?"-":t.networkname1,""),e.xp6(5),e.hij(" ",""==t.networkname2?"-":t.networkname2,""),e.xp6(2),e.Q6J("ngStyle",e.VKq(15,Ze,""==t.vehicleno?"red":"green")),e.xp6(1),e.Oqu(""==t.vehicleno?"Not Assign":"Assigned"),e.xp6(2),e.Q6J("ngIf",""!=t.vehicleno)}}function Er(n,a){if(1&n&&(e.TgZ(0,"tbody"),e.YNc(1,Qr,34,17,"tr",51),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.detailData)}}function Yr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",65)(1,"ngb-pagination",66),e.NdJ("pageChange",function(o){return e.CHM(t),e.oxw().detailsparam.pageno=o})("pageChange",function(){e.CHM(t);const o=e.oxw();return o.Details(""),o.es.pageDataInfo("",o.detailsparam,"Device Master","Click page number button","Change Event","")}),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("collectionSize",t.totalCount)("page",t.detailsparam.pageno)("maxSize",3)("pageSize",t.detailsparam.itemperpage)}}function jr(n,a){if(1&n&&(e.TgZ(0,"div",50),e._UZ(1,"img",67),e.ALo(2,"safe"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("src",e.xi3(2,1,t.viewUploadedDocument,"resourceUrl"),e.LSH)}}function Hr(n,a){if(1&n&&(e.TgZ(0,"div",50),e._UZ(1,"embed",68),e.ALo(2,"safe"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("src",e.xi3(2,1,t.viewUploadedDocument,"resourceUrl"),e.uOi)}}let zr=(()=>{class n{constructor(t,i,o,s,r,c,f){this.cv=t,this.cs=i,this.loader=o,this.es=s,this.route=r,this.activatedRoute=c,this.cdr=f,this.apiname="",this.detailsparam=new u.Mx,this.pageHeading="Device Details",this.onclickeventmessage="",this.isFromDashboard=!1,this.loginRoleId="",this.isLoadingDevice=!1,this.sortDir=1,this.DeviceImageSpaceContains=!1,this.isFrontImageFileType=!1,this.errorMessageForFrontImageFile="",this.imageFileNameDeviceImage="",this.isDeviceImageFileUploaded="",this.DeviceImageString="",this.errorMessageForFile="",this.isValidFileTypeDeviceImage=!1,this.imageSpaceContainsDeviceImage=!1,this.uploadClass={},this.isImageFile=!1,this.fileUploadReq=new u.bS,this.isDocumentMod
1alOpen=!1,this.activeTab="tac",this.viewFileDetails=new u.xI,this.loginRoleId=sessionStorage.getItem("loginroleid")||""}ngOnInit(){this.activatedRoute.queryParams.subscribe(t=>{const i=t.searchby;this.isFromDashboard="true"==t.fromDashboard,t.searchby?(this.detailsparam.searchby=t.searchby,this.Details("search")):this.Details(""),"assigned"==i||"installed"==i||"notassigned"==i||"pendinginstallation"==i?$("#closeFilePanel").click(function(o){$(".notification-container").hasClass("selected")&&$(".notification-container").removeClass("selected").addClass("dismiss"),o.preventDefault()}):$(".notification-container").hasClass("dismiss")&&$(".notification-container").removeClass("dismiss").addClass("selected").show()}),sessionStorage.getItem("redirectfrom"),this.Details("")}goBackToDashboard(){switch(sessionStorage.getItem("loginroleid")){case"110":case"100":this.route.navigate(["/dashboard/stateadmindashboard"]);break;case"101":default:this.route.navigate(["/dashboard/vendordashboard"]);break;case"104":this.route.navigate(["/dashboard/rtodashboard"]);break;case"121":this.route.navigate(["/dashboard/dealerdashboard"])}}maskIMEI(t){if(!t||t.length<6)return t;const i=t.slice(0,2),o=t.slice(-4);return i+"*".repeat(t.length-6)+o}maskICCID(t){if(!t||t.length<6)return t;const i=t.slice(0,2),o=t.slice(-4);return i+"*".repeat(t.length-6)+o}maskMobile(t){return!t||t.length<4?t:"****"+t.slice(-4)}Details(t){var i=this;return(0,I.Z)(function*(){try{i.loader.loaderOff()}catch(o){}"all"==t&&(i.detailsparam=new u.Mx),"showrow"==t&&(i.detailsparam.pageno=1),"search"==t&&(i.detailsparam.pageno=1,i.detailsparam.searchby=i.detailsparam.searchby.trim()),"refresh"==t&&(i.detailsparam=new u.Mx),i.detailsparam.searchby=i.detailsparam.searchby.trim();try{i.loader.loaderOn()}catch(o){}i.es.apiCall(i.detailsparam,`${de.n.deviceDetails}`).subscribe(o=>{i.onclickeventmessage=o.entity;try{i.loader.loaderOff()}catch(s){}200==o.statusCode?(i.detailData=o.entity.devicedetails,i.totalCount=+o.entity.totalrecord,i.recordFrom=i.detailData[0].rowno,i.recordTo=i.detailData[i.detailData.length-1].rowno):(i.loader.responseMessage=o.entity,i.loader.failedNotification(),$("#loader").hide(),i.detailData=[],i.recordTo=0,i.recordFrom=0,i.totalCount=0,i.detailsparam.searchby="")},o=>{i.loader.loaderOff()})})()}sorting(t,i){try{let s=t.currentTarget.childNodes[1].classList;try{s.contains("fa-sort-amount-desc")?(s.remove("fa-sort-amount-desc"),s.add("fa-sort-amount-asc")):(s.remove("fa-sort-amount-asc"),s.add("fa-sort-amount-desc"))}catch(r){console.log("e "+r)}this.sortDir=1==this.sortDir?-1:1;try{this.detailData.length>0&&this.detailData.sort((r,c)=>(r=r[i].toLowerCase(),c=c[i].toLowerCase(),r.localeCompare(c)*this.sortDir))}catch(r){console.log("e "+r)}}catch(o){}}downloadDoc(t){let i=new u.Mx;i.pdfexcel=t,i.itemperpage="",i.pageno="",i.searchby=this.detailsparam.searchby.trim();try{this.loader.loaderOn()}catch(o){}this.es.apiCall(i,"devicedetails").subscribe(o=>{try{this.loader.loaderOff()}catch(s){}"200"==o.statusCode?(this.filePath=o.message,this.es.commonFileDownload(this.filePath),this.detailsparam.pdfexcel=""):this.detailsparam.pdfexcel=""})}removeSpaceFromFileName(t){return t.replace(/\s+/g,"")}viewDocuments(t,i){var o;console.log(t,"DeviceImage",i),"DeviceImage"===t&&i?(this.loader.loaderOn(),this.es.apiCall({fileid:i},"file/getfile").subscribe(s=>{this.loader.loaderOff(),200===s.statusCode?(this.viewUploadedDocument=s.entity.filedata,this.isImageFile=this.viewUploadedDocument.includes("data:image"),$("#viewDocumentModal").modal("show")):(this.isImageFile=!1,this.viewUploadedDocument=null,this.loader.failedNotification())},s=>{this.loader.loaderOff(),this.isImageFile=!1,this.viewUploadedDocument=null,this.loader.failedNotification()})):(this.viewUploadedDocument=this.imageByteStringDeviceImage,this.isImageFile=null===(o=this.viewUploadedDocument)||void 0===o?void 0:o.includes("data:image"),$("#viewDocumentModal").modal("show"))}viewDocument(t){this.activeTab="other",this.isDocumentModalOpen=!0,this.selectedModel=t,this.viewFileDetails.fileid=t.devicefileid,this.devicephoto_path="",this.es.apiCall(this.viewFileDetails,"f
1ile/viewfile").subscribe(i=>{this.onclickeventmessage=i.entity;try{this.loader.loaderOff()}catch(s){}if(200==i.statusCode){for(var o=0;o<i.entity.filedetails.length;o++)this.devicephoto_path=i.entity.filedetails[o].filepath;this.cdr.detectChanges(),setTimeout(()=>{$(".nav-link").removeClass("active"),$(".tab-pane").removeClass("show active"),$("#tac-tab").addClass("active").attr("aria-selected","true"),$("#tac").addClass("show active"),this.cdr.detectChanges(),setTimeout(()=>{this.resetTabs()},50)},100)}},i=>{this.loader.loaderOff()})}resetTabs(){const t=document.getElementById("tac-tab"),i=document.getElementById("tac");t&&i&&(document.querySelectorAll("#docTabs .nav-link").forEach(o=>{o.classList.remove("active")}),document.querySelectorAll("#docTabsContent .tab-pane").forEach(o=>{o.classList.remove("show","active")}),t.classList.add("active"),i.classList.add("show","active"))}closeDocModal(){this.isDocumentModalOpen=!1}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(P.P),e.Y36(v.F0),e.Y36(v.gz),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-device-details"]],decls:74,vars:20,consts:[[1,"page-header","d-flex","justify-content-between","align-items-center"],[1,"page-title"],[1,"mainptable-toolbarageheader","newtitle"],["aria-hidden","true",1,"fa","fa-th-list"],[1,"page-actions"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard","class","btn-action",3,"click",4,"ngIf"],[1,"card","grid-container"],[1,"card-body","p-3"],[1,"row","grid-section"],[1,"col-md-12"],[1,"table-toolbar","d-flex","flex-wrap","align-items-center","justify-content-between","mb-1"],[1,"d-flex","flex-wrap","align-items-center","gap-2"],[1,"entries-info"],["placeholder","Show Rows",1,"w-auto",3,"ngModel","clearable","ngModelChange","change"],["value","20",4,"ngIf"],["value","50",4,"ngIf"],["value","100",4,"ngIf"],[3,"value",4,"ngIf"],[1,"d-flex","align-items-center","gap-2"],[3,"refreshEvent","click"],["type","text","placeholder","Click enter for Search",1,"form-control","form-control-sm",3,"ngModel","ngModelChange","keydown.enter"],["ngbTooltip","Download Pdf","placement","bottom",1,"btn","btn-sm","btn-danger",3,"disabled","click"],[1,"fa","fa-file-pdf-o"],["ngbTooltip","Download Excel","placement","bottom",1,"btn","btn-sm","btn-success",3,"disabled","click"],[1,"fa","fa-file-excel-o"],[1,"table-responsive","fixed-header-table",2,"height","395px","overflow-y","auto!important"],[1,"table","custom-table"],["rowspan","2",2,"padding","2px 5px!important"],["rowspan","2",2,"padding","2px 5px!important",3,"click"],[1,"fa","fa-sort-amount-desc","tablesortico"],["rowspan","2","style"," padding: 2px 5px!important;",3,"click",4,"ngIf"],["colspan","2",1,"text-center","tablesortico",2,"padding","2px 5px!important",3,"click"],[2,"padding","2px 5px!important"],[4,"ngIf"],[1,"row","justify-content-md-between","align-items-md-center","mt-2"],["class","float-end text-start",4,"ngIf"],["id","viewDocumentModal","data-bs-backdrop","static","data-bs-keyboard","false","tabindex","-1","aria-labelledby","confirmationModalLabel","aria-hidden","true",1,"modal","fade"],["role","document",1,"modal-dialog","modal
1-xl","modal-dialog-top"],[1,"modal-content"],[1,"modal-header","p-2"],["type","button","data-bs-dismiss","modal","aria-label","Close",1,"btn-close"],[1,"modal-body","confirmation-label","p-1"],["class"," text-center",4,"ngIf"],["id","showFilePanel","ngbTooltip","Go Back To Dashboard",1,"btn-action",3,"click"],[1,"fa","fa-arrow-left"],["value","20"],["value","50"],["value","100"],[3,"value"],["colspan","12"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"srnotd"],[1,"text-uppercase"],[1,"fw-bolder"],["class","py-1","ngbTooltip","ICCID Number",4,"ngIf"],["ngbTooltip","M2M Provider",4,"ngIf"],["class","text-uppercase",4,"ngIf"],["ngbTooltip","Network 1",1,"me-2"],["aria-hidden","true",1,"fa","fa-sim-card-o"],["ngbTooltip","Network 2",1,"me-2"],[3,"ngStyle"],[3,"ngStyle",4,"ngIf"],["ngbTooltip","ICCID Number",1,"py-1"],["ngbTooltip","M2M Provider"],[1,"float-end","text-start"],["size","sm",1,"d-flex","mt-2","justify-content-end","pagination-rounded","pagination","pagination-info",3,"collectionSize","page","maxSize","pageSize","pageChange"],[2,"height","410px","width","100%",3,"src"],[2,"height","60vh","width","100%",3,"src"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h5",2),e._UZ(3,"i",3),e._uU(4),e.qZA()(),e.TgZ(5,"div",4),e.YNc(6,qr,3,0,"button",5),e.qZA()(),e.TgZ(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"span",12),e._uU(14),e.qZA(),e.TgZ(15,"ng-select",13),e.NdJ("ngModelChange",function(s){return i.detailsparam.itemperpage=s})("change",function(){return i.Details(""),i.es.pageDataInfo("",i.detailsparam.itemperpage,"Vehicle Master","Select rows","Change Event","")}),e.YNc(16,Or,2,0,"ng-option",14),e.YNc(17,Sr,2,0,"ng-option",15),e.YNc(18,Fr,2,0,"ng-option",16),e.YNc(19,Nr,2,2,"ng-option",17),e.qZA()(),e.TgZ(20,"div",18)(21,"app-refresh-btn",19),e.NdJ("refreshEvent",function(){return i.Details("refresh")})("click",function(){return i.es.pageDataInfo("",i.detailsparam,"Device Master","Click refresh button","Click Event","")}),e.qZA(),e.TgZ(22,"input",20),e.NdJ("ngModelChange",function(s){return i.detailsparam.searchby=s})("keydown.enter",function(){return i.Details("search"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click search button","Click Event","")}),e.qZA(),e.TgZ(23,"button",21),e.NdJ("click",function(){return i.downloadDoc("pdf"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click PDF button","Click Event","")}),e._UZ(24,"i",22),e.qZA(),e.TgZ(25,"button",23),e.NdJ("click",function(){return i.downloadDoc("excel"),i.es.pageDataInfo("",i.detailsparam,"Device Master","Click Excel button","Click Event","")}),e._UZ(26,"i",24),e.qZA()()(),e.TgZ(27,"div",25)(28,"table",26)(29,"thead")(30,"tr")(31,"th",27),e._uU(32,"# "),e.qZA(),e.TgZ(33,"th",28),e.NdJ("click",function(s){return i.sorting(s,"devicetype")}),e._uU(34," Device Type "),e._UZ(35,"i",29),e.qZA(),e.YNc(36,Ur,3,0,"th",30),e.TgZ(37,"th",28),e.NdJ("click",function(s){return i.sorting(s,"devicemodelname")}),e._uU(38,"Model "),e._UZ(39,"i",29),e.qZA(),e.TgZ(40,"th",28),e.NdJ("click",function(s){return i.sorting(s,"deviceuniqueno")}),e._uU(41,"Serial No. "),e._UZ(42,"i",29),e.qZA(),e.TgZ(43,"th",28),e.NdJ("click",function(s){return i.sorting(s,"deviceimeino")}),e._uU(44,"IMEI No. "),e._UZ(45,"i",29),e.qZA(),e.TgZ(46,"th",28),e.NdJ("click",function(s){return i.sorting(s,"deviceiccidno")}),e._uU(47,"ICCID No. "),e._UZ(48,"i",29),e.qZA(),e.TgZ(49,"th",28),e.NdJ("click",function(s){return i.sorting(s,"m2mprovidername")}),e._uU(50,"M2M Provider "),e._UZ(51,"i",29),e.qZA(),e.TgZ(52,"th",31),e.NdJ("click",function(s){return i.sorting(s,"devicesimvalidity")}),e._uU(53,"Sim Details "),e.qZA(),e.TgZ(54,"th",28),e.NdJ("click",function(s){return i.sorting(s,"vehicleno")}),e._uU(55," Status "),e._UZ(56,"i",29),e.qZA()(),e.TgZ(57,"tr")(58,"th",32),e._uU(59,"Primary SIM"),e.qZA(),e.TgZ(60,"th",32),e._uU(61,"Secondary SIM"),e.qZA()()(),e.YNc(62,Lr,5,0,"tbody",33),e.YNc(63,Er,2,1,"tbody",33),e.qZA()(),e.TgZ(64,"div",34),e.YNc(65,Yr,2,4,"div",35),e.qZA()()()()(),e.TgZ(66,"div",36)(67,"div",37)(68,"div",38)(69,"div",39),e._UZ(70,"button",40),e.qZA(),e.TgZ(71,"div",41),e.YNc(72,jr,3,4,"div",42),e.YNc(73,Hr,3,4,"div",42),e.qZA()()()()),2&t&&(e.xp6(4),e.hij(" ",i.pageHeading," "),e.xp6(2),e.Q6J("ngIf",i.isFromDashboard),e.xp6(8),e.lnq("Showing ",i.recordFrom," to ",i.recordTo," of ",i.totalCount," entries"),e.xp6(1),e.Q6J("ngModel",i.detailsparam.itemperpage)("clearable",!1),e.xp6(1),e.Q6J("ngIf",i.totalCount>20),e.xp6(1),e.Q6J("ngIf",i.totalCount>50),e.xp6(1),e.Q6J("ngIf",i.totalCount>100),e.xp6(1),e.Q6J("ngIf",i.totalCount<100&&i.totalCount>10),e.xp6(3),e.Q6J("ngModel",i.detailsparam.searchby),e.xp6(1),e.Q6J("disabled","0"==i.totalCount),e.xp6(2),e.Q6J("disabled","0"==i.totalCount),e.xp6(11),e.Q6J("ngIf","101"!=i.loginRoleId),e.xp6(26),e.Q6J("ngIf",0==i.totalCount),e.xp6(1),e.Q6J("ngIf",0!=i.totalCount),e.xp6(2),e.Q6J("ngIf",i.totalCount>i.detailsparam.itemperpage),e.xp6(7),e.Q6J("ngIf",i.isImageFile),e.xp6(1),e.Q6J("ngIf",!i.isImageFile))},directives:[y.O5,C._L,Z.w9,d.JJ,d.On,Z.xv,kr.I,d.Fj,y.sg,y.PC,C.N9],pipes:[fe.y],styles:[".ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize}ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container{min-height:26px;max-height:26px;height:26px}.status-active[_ngcontent-%COMP%]{color:green;font-weight:700}.status-inactive[_ngcontent-%COMP%]{color:red;font-weight:700}.status-blocked[_ngcontent-%COMP%]{color:orange;font-weight:700}.form-group[_ngcontent-%COMP%]{margin-bottom:.3rem}.legend-style[_ngcontent-%COMP%]{font-size:12px}fieldset[_ngcontent-%COMP%]{border:1px groove #635d5d!important;box-shadow:0 0 #000}.notification-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto;height:82vh}.approve-btn[_ngcontent-%COMP%]{text-align:center}.approve-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.approve-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:9px;padding:2px;font-weight:700} .ng-select.ng-select-single .ng-select-container .ng-value-container{font-size:12px!important} .ng-dropdown-panel .ng-dropdown-panel-items .ng-option{font-size:12px!important;text-transform:capitalize} .ng-select.ng-select-single .ng-select-container{min-height:23px;max-height:23px;height:23px;padding-top:0;padding-bottom:0}.btn-group[_ngcontent-%COMP%] .btn-check[_ngcontent-%COMP%]:checked + .btn-outline-success[_ngcontent-%COMP%]{background-color:#d4edda!important;border-color:#28a745!important;color:#000!important}.btn-group[_ngcontent-%COMP%] .btn-check[_ngcontent-%COMP%]:checked + .btn-outline-danger[_ngcontent-%COMP%]{background-color:#f8d7da!important;border-color:#dc3545!important;color:#000!important}.btn-group[_ngcontent-%COMP%] .btn-check[_ngcontent-%COMP%]:not(:checked) + .btn[_ngcontent-%COMP%]:hover{background-color:#6c757d1a!important;border-color:#6c757d!important;color:#6c757d!important}.btn-group[_ngcontent-%COMP%] .btn-outline-success[_ngcontent-%COMP%]{border-color:#28a745!important;color:#28a745!important}.btn-group[_ngcontent-%COMP%] .btn-outline-success[_ngcontent-%COMP%]:hover{background-color:#d4edda!important;border-color:#28a745!important;color:#000!important}.btn-group[_ngcontent-%COMP%] .btn-outline-danger[_ngcontent-%COMP%]{border-color:#dc3545!important;color:#dc3545!important}.btn-group[_ngcontent-%COMP%] .btn-outline-danger[_ngcontent-%COMP%]:hover{background-color:#f8d7da!important;border-color:#dc3545!important;color:#000!important}.form-control-sm[_ngcontent-%COMP%]{min-height:1.4rem;padding:.1rem .81rem;border-radius:.2rem}.form-group[_ngcontent-%COMP%]{margin-bottom:.3rem}.modal-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;justify-content:center;align-items:center;z-index:10000}.modal-box[_ngcontent-%COMP%]{background:#fff;width:85%;border-radius:6px;box-shadow:0 0 20px #0000004d;max-height:90vh;overflow:hidden}.modal-header[_ngcontent-%COMP%]{background:#183055;color:#fff;padding:2px 15px;font-size:18px;display:flex;justify-content:space-between;align-items:center}.close-btn[_ngcontent-%COMP%]{cursor:pointer;font-size:22px;font-weight:700}.tabs[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #ddd}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:1px 18px;background:none;border:none;cursor:pointer;font-size:15px;border-right:1px solid #eee}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#e7f0ff;border-bottom:3px solid #0d6efd;font-weight:700}.tab-body[_ngcontent-%COMP%]{padding:15px;max-height:65vh;overflow:auto}.empty-msg[_ngcontent-%COMP%]{text-align:center;color:#666;padding:40px 0;font-size:16px}.close-btnM[_ngcontent-%COMP%]{font-size:26px;cursor:pointer;font-weight:700;color:#555;transition:.2s}.close-btnM[_ngcontent-%COMP%]:hover{color:#000;transform:scale(1.15)}.modal-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.45);display:flex;justify-content:center;align-items:center;z-index:9999}.modal-box[_ngcontent-%COMP%]{width:55%;background:#fff;border-radius:8px;overflow:hidden;animation:fadeIn .3s ease-in-out}@keyframes fadeIn{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@media (max-width: 576px){.modal-box[_ngcontent-%COMP%]{width:98vw!important;max-width:98vw!important;min-width:0!important;border-radius:4px;padding:0}.modal-header[_ngcontent-%COMP%], .tabs[_ngcontent-%COMP%], .tab-body[_ngcontent-%COMP%]{padding:8px!important;font-size:15px!important}.tabs[_ngcontent-%COMP%]{flex-wrap:wrap;gap:4px}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:13px!important;padding:6px 2px!important;min-width:90px;border-right:none;border-bottom:1px solid #eee}.tab-body[_ngcontent-%COMP%] object[_ngcontent-%COMP%]{height:160px!important}}.grid-section[_ngcontent-%COMP%], .entrydiv[_ngcontent-%COMP%]{animation:fadeInUp .8s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.dropdown-btn-group[_ngcontent-%COMP%]{position:absolute!important;z-index:9999!important;min-width:120px!important;left:0!important;top:110%!important;display:block!important}.table-responsive[_ngcontent-%COMP%], .custom-table[_ngcontent-%COMP%], .grid-container[_ngcontent-%COMP%], .card-body[_ngcontent-%COMP%], .row[_ngcontent-%COMP%], .position-relative[_ngcontent-%COMP%]{overflow:visible!important}"]}),n})();var Me=b(70745),Br=b(4159),$r=b.n(Br),Gr=b(40520);function Wr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",3)(1,"button",4),e.NdJ("click",function(){return e.CHM(t),e.oxw().downloadCertificateAsPDF()}),e._UZ(2,"i",5),e.qZA(),e.TgZ(3,"button",6),e.NdJ("click",function(){return e.CHM(t),e.oxw().emailCertificate()}),e._UZ(4,"i",7),e.qZA(),e.TgZ(5,"button",8),e.NdJ("click",function(){return e.CHM(t),e.oxw().shareWithVTS()}),e._UZ(6,"i",9),e.qZA()()}}function Kr(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("\xa0|\xa0 GST: ",t.certificateData.vendorgst,"")}}function Xr(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("\xa0|\xa0 ",t.certificateData.vendoraddress,"")}}function el(n,a){if(1&n&&(e.TgZ(0,"div",10)(1,"div",11)(2,"div",12)(3,"div",13)(4,"div",14),e._UZ(5,"img",15),e.qZA(),e.TgZ(6,"div",16)(7,"div",17),e._uU(8,"VEHICLE LOCATION TRACKING DEVICE"),e.qZA(),e.TgZ(9,"div",18),e._uU(10,"(VLTD) FITMENT CERTIFICATE"),e.qZA(),e.TgZ(11,"div",19),e._uU(12,"Customer Copy"),e.qZA()(),e.TgZ(13,"div",14)(14,"span",20),e._uU(15,"Issue Date: "),e.qZA(),e.TgZ(16,"span",21),e._uU(17),e.ALo(18,"date"),e.qZA()()()(),e.TgZ(19,"div",22)(20,"strong"),e._uU(21,"Fitment Certificate No.: "),e.qZA(),e.TgZ(22,"span",23),e._uU(23),e.qZA()(),e.TgZ(24,"div",24)(25,"div",25)(26,"span"),e._uU(27,"Vehicle Details"),e.qZA()(),e.TgZ(28,"div",26)(29,"div",27)(30,"div",28)(31,"div",27)(32,"div",29)(33,"div",30)(34,"span",31),e._uU(35,"Vehicle No.:"),e.qZA(),e.TgZ(36,"span",32),e._uU(37),e.qZA()(),e.TgZ(38,"div",30)(39,"
1span",31),e._uU(40,"Chassis No.:"),e.qZA(),e.TgZ(41,"span",33),e._uU(42),e.qZA()(),e.TgZ(43,"div",30)(44,"span",31),e._uU(45,"Vehicle Make:"),e.qZA(),e.TgZ(46,"span",33),e._uU(47),e.qZA()(),e.TgZ(48,"div",30)(49,"span",31),e._uU(50,"Vehicle Model:"),e.qZA(),e.TgZ(51,"span",33),e._uU(52),e.qZA()()(),e.TgZ(53,"div",29)(54,"div",30)(55,"span",31),e._uU(56,"Manufacture Year:"),e.qZA(),e.TgZ(57,"span",33),e._uU(58),e.qZA()(),e.TgZ(59,"div",30)(60,"span",31),e._uU(61,"Engine No.:"),e.qZA(),e.TgZ(62,"span",33),e._uU(63),e.qZA()(),e.TgZ(64,"div",30)(65,"span",31),e._uU(66,"State:"),e.qZA(),e.TgZ(67,"span",33),e._uU(68),e.qZA()(),e.TgZ(69,"div",30)(70,"span",31),e._uU(71,"RTO Code:"),e.qZA(),e.TgZ(72,"span",33),e._uU(73),e.qZA()()()()(),e.TgZ(74,"div",34),e._UZ(75,"img",35),e.TgZ(76,"div",36),e._uU(77,"Scan to Verify"),e.qZA()()()()(),e.TgZ(78,"div",24)(79,"div",25)(80,"span"),e._uU(81),e.qZA()(),e.TgZ(82,"div",26)(83,"div",37)(84,"div",38)(85,"span",31),e._uU(86,"Model:"),e.qZA(),e.TgZ(87,"span",33),e._uU(88),e.qZA()(),e.TgZ(89,"div",38)(90,"span",31),e._uU(91,"Type / Tac No.:"),e.qZA(),e.TgZ(92,"span",33),e._uU(93),e.qZA()(),e.TgZ(94,"div",38)(95,"span",31),e._uU(96,"IMEI No.:"),e.qZA(),e.TgZ(97,"span",39),e._uU(98),e.qZA()()(),e.TgZ(99,"div",37)(100,"div",38)(101,"span",31),e._uU(102,"Installation Date:"),e.qZA(),e.TgZ(103,"span",33),e._uU(104),e.qZA()(),e.TgZ(105,"div",38)(106,"span",31),e._uU(107,"ICCID No.:"),e.qZA(),e.TgZ(108,"span",33),e._uU(109),e.qZA()(),e.TgZ(110,"div",40)(111,"span",31),e._uU(112,"Primary SIM
1No (Network):"),e.qZA(),e.TgZ(113,"span",33),e._uU(114),e.qZA()()(),e.TgZ(115,"div",41)(116,"div",38)(117,"span",31),e._uU(118,"Secondary SIM No (Network):"),e.qZA(),e.TgZ(119,"span",33),e._uU(120),e.qZA()(),e.TgZ(121,"div",38)(122,"span",31),e._uU(123,"UID No.:"),e.qZA(),e.TgZ(124,"span",33),e._uU(125),e.qZA()(),e._UZ(126,"div",40),e.qZA()()(),e.TgZ(127,"div",24)(128,"div",25),e._uU(129,"Vehicle Owner Details"),e.qZA(),e.TgZ(130,"div",26)(131,"div",27)(132,"div",29)(133,"div",30)(134,"span",31),e._uU(135,"Owner Name:"),e.qZA(),e.TgZ(136,"span",33),e._uU(137),e.qZA()(),e.TgZ(138,"div",30)(139,"span",31),e._uU(140,"Mobile No.:"),e.qZA(),e.TgZ(141,"span",33),e._uU(142),e.qZA()()(),e.TgZ(143,"div",29)(144,"div",30)(145,"span",31),e._uU(146,"Email Id:"),e.qZA(),e.TgZ(147,"span",33),e._uU(148),e.qZA()(),e.TgZ(149,"div",30)(150,"span",31),e._uU(151,"Address:"),e.qZA(),e.TgZ(152,"span",33),e._uU(153),e.qZA()()()()()(),e.TgZ(154,"div",24)(155,"div",25),e._uU(156,"Installer Details"),e.qZA(),e.TgZ(157,"div",26)(158,"div",27)(159,"div",42)(160,"div",30)(161,"span",31),e._uU(162,"Installed By:"),e.qZA(),e.TgZ(163,"span",33),e._uU(164),e.qZA()()(),e.TgZ(165,"div",42)(166,"div",30)(167,"span",31),e._uU(168,"Mobile No.:"),e.qZA(),e.TgZ(169,"span",33),e._uU(170),e.qZA()()(),e.TgZ(171,"div",42)(172,"div",30)(173,"span",31),e._uU(174,"Address:"),e.qZA(),e.TgZ(175,"span",33),e._uU(176),e.qZA()()()()()(),e.TgZ(177,"div",24)(178,"div",43)(179,"div",44),e._uU(180,"VIII.\xa0 DECLARATION"),e.qZA(),e.TgZ(181,"div",45)(182,"p",46),e._uU(183),e.qZA()()()(),e.TgZ(184,"div",24)(185,"div",43)(186,"div",44),e._uU(187,"VII.\xa0VLTD INSTALLATION PHOTOS"),e.qZA(),e.TgZ(188,"div",47)(189,"div",48),e._UZ(190,"img",49),e.TgZ(191,"div",50),e._uU(192,"Vehicle Image"),e.qZA()(),e.TgZ(193,"div",48),e._UZ(194,"img",51),e.TgZ(195,"div",50),e._uU(196,"RC Image"),e.qZA()(),e.TgZ(197,"div",48),e._UZ(198,"img",52),e.TgZ(199,"div",50),e._uU(200,"Device Image"),e.qZA()()()()(),e.TgZ(201,"div",53)(202,"div",13)(203,"div",54)(204,"span",55),e._uU(205),e.qZA(),e.YNc(206,Kr,2,1,"span",56),e.YNc(207,Xr,2,1,"span",56),e.qZA(),e.TgZ(208,"div",57)(209,"span",58),e._uU(210,"Computer Generated Certificate \u2013 Valid for Registration Period"),e.qZA()()()()()()),2&n){const t=e.oxw();e.xp6(5),e.Q6J("src",t.certificateData.vendorlogofilepath,e.LSH),e.xp6(12),e.Oqu(""==t.certificateData.issuedate?"\u2014":e.xi3(18,39,t.certificateData.issuedate,"dd/MM/yyyy")),e.xp6(6),e.Oqu("0"==t.certificateData.certificateno||""==t.certificateData.certificateno?"\u2014":t.certificateData.certificateno),e.xp6(14),e.Oqu(t.certificateData.vehicleno||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.chassisno||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.makename||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.modelname||"\u2014"),e.xp6(6),e.Oqu(t.certificateData.vehiclemfgyear||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.engineno||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.statename||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.rtocode||"\u2014"),e.xp6(8),e.hij("VLTD Details: Manufactured by : ",t.certificateData.vendorname||"\u2014",""),e.xp6(7),e.Oqu(t.certificateData.vendor_code||"AIS 140"),e.xp6(5),e.Oqu(t.certificateData.tacno||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.deviceimeino||"\u2014"),e.xp6(6),e.Oqu(t.certificateData.installeddate||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.deviceiccidno||"\u2014"),e.xp6(5),e.AsE(" ",t.certificateData.primary_sim_no||"\u2014"," ",t.certificateData.primary_network?"("+t.certificateData.primary_network+")":""," "),e.xp6(6),e.AsE("",t.certificateData.secondry_sim_no||"\u2014"," ",t.certificateData.secondry_network?"("+t.certificateData.secondry_network+")":"",""),e.xp6(5),e.Oqu(t.certificateData.deviceserialno||"\u2014"),e.xp6(12),e.Oqu(t.certificateData.customername||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.customermobileno||"\u2014"),e.xp6(6),e.Oqu(t.certificateData.customeremailid||"\u2014"),e.xp6(5),e.Oqu(t.certificateData.customeraddress||"\u2014"),e.xp6(11),e.Oqu(t.certificateData.dealername||"\u2014"),e.xp6(6),e.Oqu(t.certificateData.installer_mobileno||"\u2014"),e.xp6(6),e.Oqu(t.certificateData.installer_address||"\u2014"),e.xp6(7),e.HOy(" This is to acknowledge that we have got our vehicle bearing registration no. ",t.certificateData.vehicleno," fitted with VLTD manufactured by ",t.certificateData.vendorname," bearing IMEI No. ",t.certificateData.deviceimeino,". We have checked the performance of the vehicle after fitment of the said VLTD Device and we confirm that device functioning as per the norms laid out in AIS 140 by ICAT. We are satisfied with the performance of the unit in all respects. We undertake not to raise any dispute or any legal claims against ",t.certificateData.vendorname," in the event that the above mentioned seals/device and harness are found broken/tampered till expiry of warranty period of 12 months from the date of installation All disputes are subject to Hyderabad Jurisdiction only. "),e.xp6(7),e.Q6J("src",t.certificateData.vehicleleftfilepath,e.LSH),e.xp6(4),e.Q6J("src",t.certificateData.vehiclefrontfilepath,e.LSH),e.xp6(4),e.Q6J("src",t.certificateData.devicefilepath,e.LSH),e.xp6(7),e.Oqu(t.certificateData.vendorname),e.xp6(1),e.Q6J("ngIf",t.certificateData.vendorgst),e.xp6(1),e.Q6J("ngIf",t.certificateData.vendoraddress)}}function tl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",59)(1,"div",60),e._UZ(2,"i",61),e.TgZ(3,"h5",62),e._uU(4,"Certificate Data Not Found"),e.qZA(),e.TgZ(5,"p",63),e._uU(6,"Please try again or refresh the page."),e.qZA(),e.TgZ(7,"button",64),e.NdJ("click",function(){return e.CHM(t),e.oxw().refreshCertificateData()}),e._UZ(8,"i",65),e._uU(9," Refresh "),e.qZA()()()}}const nl=[{path:"vi",component:Za},{path:"deviceassign",component:ds},{path:"rawdata",component:Gt,canActivate:[X.j]},{path:"logincreation",component:Wt.N,canActivate:[X.j]},{path:"vehicleinstallationcertificate",component:ps.l},{path:"fitmentcertificate",component:(()=>{class n{constructor(t,i,o,s,r,c,f,D,w){this.cv=t,this.cs=i,this.loader=o,this.es=s,this.api=r,this.http=c,this.router=f,this.route=D,this.service=w,this.certificateData=new u.Tx,this.agencename="ASDF",this.qrstring_conductor="",this.QRCodeReq=new u.tl,this.certficateDetailsReq=new u.Q$,this.exportDataRequest={},this.nodataFound=!1,this.isCertificateAvailable=!1,this.foremailbase64=""}ngOnInit(){this.route.queryParams.subscribe({next:t=>{if(t&&t.data){let o,i=t.data;"string"==typeof i&&(i.includes("%7B")||i.includes("%22"))&&(i=decodeURIComponent(i));try{o=JSON.parse(i)}catch(r){o={vehicleid:i}}let s=o.vehicleid;"string"==typeof s&&(s=s.replace(/^"|"$/g,"")),this.mapDataToCertificateFormat({vehicleid:s}
1),this.generateQRModal(o)}else this.certificateData=new u.Tx},error:t=>{this.certificateData=new u.Tx},complete:()=>{}})}mapDataToCertificateFormat(t){this.isCertificateAvailable=!1;try{this.loader.loaderOn()}catch(i){}this.certficateDetailsReq.vehicleid=t.vehicleid,this.certficateDetailsReq.pdfexcel="",this.es.apiCall(this.certficateDetailsReq,"master/vehiclecertificatedetails").subscribe({next:i=>{try{this.loader.loaderOff()}catch(o){}200==i.statusCode?(this.isCertificateAvailable=!0,this.certificateData=i.entity.vehiclecertificatedetails[0],this.nodataFound=!1):(this.isCertificateAvailable=!1,this.nodataFound=!0)},error:i=>{this.isCertificateAvailable=!1,this.certificateData=new u.Tx},complete:()=>{}})}refreshCertificateData(){this.mapDataToCertificateFormat({vehicleid:this.certficateDetailsReq.vehicleid}),this.generateQRModal({vehicleid:this.certficateDetailsReq.vehicleid})}printCertificate(){var t;const i=null===(t=document.querySelector(".certificate-container"))||void 0===t?void 0:t.innerHTML,o=document.body.innerHTML;i&&(document.body.innerHTML=i,window.print(),document.body.innerHTML=o,window.location.reload())}downloadCertificateAsPDF(){this.certficateDetailsReq.pdfexcel="pdf",this.certficateDetailsReq.vehicleid=this.certificateData.vehicleid,this.es.apiCall(this.certficateDetailsReq,"master/vehiclecertificatedetails").subscribe({next:t=>{try{this.loader.loaderOff()}catch(i){}200==t.statusCode?window.open(t.message,"_blank"):(console.error("API call did not return statusCode 200:",t),alert("Failed to download certificate PDF."))},error:t=>{console.error("API call error:",t),alert("Error downloading certificate PDF.")}})}getCertificatePdf(){var t=this;return(0,I.Z)(function*(i="blob"){try{const o=new Me.ZP("p","mm","a4"),s=210;let c="",f="";try{t.certificateData.vendorlogofilepath&&(c=yield t.getBase64Image(t.certificateData.vendorlogofilepath))}catch(x){console.error("Failed to load logo:",x)}try{t.ActualQRCode="https://truegnss.com/uploaddata/truegnss/Images/genweb/WB974966_InlineQR25022026190540.jpg",t.ActualQRCode&&(console.log("Fetching QR code:",t.ActualQRCode),f=yield t.getBase64Image(t.ActualQRCode))}catch(x){console.error("Failed to load QR code:",x)}if(c)try{o.addImage(c,"PNG",15,10,40,20)}catch(x){console.error("Failed to add logo to PDF:",x)}if(f)try{o.addImage(f,"PNG",155,10,30,30)}catch(x){console.error("Failed to add QR code to PDF:",x)}o.setFontSize(16),o.setFont("helvetica","bold"),o.text("",s/2,25,{align:"center"});const D=(yield Promise.resolve().then(b.t.bind(b,4159,23))).default,w=document.querySelector(".certificate-container");if(w){const x=w.querySelector(".tracker-logo"),k=w.querySelector(".qr-code img"),q=w.querySelector(".certificate-header");x&&(x.style.visibility="hidden"),k&&(k.style.visibility="hidden"),q&&(q.style.marginTop="20px");const j=yield D(w,{scale:2,useCORS:!0,allowTaint:!0,logging:!1,backgroundColor:"#ffffff"});x&&(x.style.visibility="visible"),k&&(k.style.visibility="visible"),q&&(q.style.marginTop="");const ll=j.toDataURL("image/png"),we=s-20;o.addImage(ll,"PNG",10,45,we,j.height*we/j.width)}return o.output("blob"===i?"blob":"datauristring")}catch(o){throw console.error("Error generating PDF:",o),o}}).apply(this,arguments)}getBase64Image(t){var i=this;return new Promise(function(){var o=(0,I.Z)(function*(s,r){try{console.log("Attempting to fetch image via HttpClient:",t),i.http.get(t,{responseType:"blob"}).toPromise().then(c=>{const f=new FileReader;f.onloadend=()=>{console.log("Successfully converted image to base64 via HttpClient"),s(f.result)},f.onerror=()=>{console.error("FileReader error"),r(new Error("Failed to read blob"))},f.readAsDataURL(c)}).catch(function(){var c=(0,I.Z)(function*(f){console.warn("HttpClient failed, trying fetch:",f);try{const D=yield fetch(t,{mode:"cors",cache:"no-cache"});if(!D.ok)throw new Error(`HTTP error! status: ${D.status}`);const w=yield D.blob(),x=new FileReader;x.onloadend=()=>{console.log("Successfully converted image to base64 via fetch"),s(x.result)},x.onerror=()=>{r(new Error("Failed to read blob"))},x.readAsDataURL(w)}catch(D){console.warn("Fetch also failed, trying Image element:",D);const w=new Image;w.crossOrigin="anonymous",w.onload=()=>{try{const x=document.createElement("canvas");x.width=w.width,x.height=w.height;
1const k=x.getContext("2d");if(k){k.drawImage(w,0,0);const q=x.toDataURL("image/png");console.log("Successfully converted image to base64 via Image element"),s(q)}else r(new Error("Could not get canvas context"))}catch(x){console.error("Canvas error:",x),r(x)}},w.onerror=x=>{console.error("Image element error:",x),r(new Error(`Failed to load image from: ${t}`))},w.src=t}});return function(f){return c.apply(this,arguments)}}())}catch(c){console.error("Unexpected error in getBase64Image:",c),r(c)}});return function(s,r){return o.apply(this,arguments)}}())}downloadCertificate(){var t=this;return(0,I.Z)(function*(){var i;try{const o=yield t.getCertificatePdf("blob"),s=document.createElement("a");s.href=URL.createObjectURL(o);const r=(null===(i=t.certificateData)||void 0===i?void 0:i.vehicleno)||"vehicle";s.download=`Vehicle-Installation-Certificate-${r}.pdf`,s.click(),URL.revokeObjectURL(s.href)}catch(o){console.error("PDF Download Error:",o)}})()}emailCertificate(){var t=this;return(0,I.Z)(function*(){try{yield t.generateAndSendBase64();const i={sendon:"email",wappno:"",emailid:t.certificateData.customeremailid,filename:`VehicleInstallationCertificate-${t.certificateData.vehicleno}.pdf`,chassisno:"1234",pageurl:window.location.pathname,pagename:window.location.pathname.substring(1),bytestream:t.foremailbase64};t.es.apiCall(i,"file/sendmailwappbytestring").subscribe({next:o=>{console.log("\u2705 Email API SUCCESS!"),t.loader.responseMessage="Email API SUCCESS!",t.loader.successNotification()},error:o=>{console.error("\u274c Email API Error:",o),t.loader.responseMessage="Failed to send email.",t.loader.failedNotification()}})}catch(i){console.error("Failed to process email:",i),t.loader.responseMessage="Failed to process the certificate. Please try downloading it manually.",t.loader.failedNotification()}})()}shareOnWhatsApp(){var t=this;return(0,I.Z)(function*(){yield t.generateAndSendBase64();const i={sendon:"wapp",wappno:t.certificateData.customermobileno,emailid:"",filename:`VehicleInstallationCertificate-${t.certificateData.vehicleno}.pdf`,chassisno:"1234",pageurl:window.location.pathname,pagename:window.location.pathname.substring(1),bytestream:t.foremailbase64};t.es.apiCall(i,"file/sendmailwappbytestring").subscribe({next:o=>{console.log("\u2705 Email API SUCCESS!"),console.log("\u{1f4e5} Full Response:",JSON.stringify(o,null,2))},error:o=>{console.error("\u274c Email API Error:",o),alert("Failed to send email.")}})})()}generateAndSendBase64(){var t=this;return(0,I.Z)(function*(){console.log("Generating Base64 PDF...");const i=document.getElementById("certificate")||document.querySelector(".certificate-container");if(!i)return void console.error("Certificate element not found!");const o=yield $r()(i,{scale:2}),s=o.toDataURL("image/png"),r=new Me.ZP("p","mm","a4");r.addImage(s,"PNG",0,0,210,210*o.height/o.width),console.log("PDF generated");const w=r.output("datauristring").split(",")[1];t.foremailbase64=w,console.log("Base64 PDF:",w)})()}sendPDFBase64(t){}generateQRModal(t){var i=this;return(0,I.Z)(function*(){const o={vehicleno:t.vehicleno||"",chassisno:t.chassisno||"",deviceimeino:t.deviceimeino||"",pagename:window.location.pathname.substring(1),pageurl:window.location.pathname};sessionStorage.getItem("token"),i.es.apiCall(o,"qr/qrcode").subscribe({next:r=>{r&&r.entity&&(i.ActualQRCode=r.entity.filepath||r.entity,i.displayQRCode(i.ActualQRCode))},error:r=>{let c="\u274c QR Code Generation Failed\n\n";c+="Status: "+r.status+" - "+r.statusText+"\n\n",500===r.status?(c+="INTERNAL SERVER ERROR\n\n",r.error&&("string"==typeof r.error?c+="Backend says: "+r.error+"\n\n":r.error.message?c+="Backend says: "+r.error.message+"\n\n":r.error.error&&(c+="Backend says: "+r.error.error+"\n\n")),c+="Check browser console for full error details."):404===r.status?c+="Endpoint not found: "+r.url:400===r.status&&(c+="Bad Request - Invalid data sent to server",r.error&&r.error.message&&(c+="\n\n"+r.error.message)),alert(c)}})})()}displayQRCode(t){try{const i=document.getElementById("qr-code-container"),o=document.getElementById("qr-loader");if(o&&(o.style.display="block"),!i)return o&&(o.style.display="none"),void console.warn("\u26a0\ufe0f QR Code container 'qr-code-container' not found in DOM");if("string"==typeof t&&t.startsWith("data:image")){i.innerHTML=`<img id='qr-img' src="${t}" alt="QR Code" style="width: 100%; height: 100%; object-fit: contain;">`;const s=document.getElementById("qr-img");s?s.onload=()=>{o&&(o.style.display="none")}:o&&(o.style.display="none")}else if("string"==typeof t&&(t.startsWith("/")||t.startsWith("http"))){let s=t;t.startsWith("/")&&(s=window.location.origin+t),i.innerHTML=`<img id='qr-img' src="${s}" alt="QR Code" style="width: 100%; height: 100%; object-fit: contain;">`;const r=document.getElementById("qr-img");r?r.onload=()=>{o&&(o.style.display="none")}:o&&(o.style.display="none")}else"string"==typeof t&&t.length>0?"undefined"!=typeof QRCode?(i.innerHTML="",new QRCode(i,{text:t,width:120,height:120}),setTimeout(()=>{o&&(o.style.display="none")},500)):(i.innerHTML=`<div style="padding: 10px; border: 1px solid #ccc; font-size: 10px; word-break: break-all;">${t}</div>`,o&&(o.style.display="none")):(i.innerHTML='<div style="padding: 10px; border: 1px solid red; color: red;">Invalid QR Code Data</div>',o&&(o.style.display="none"))}catch(i){const o=document.getElementById("qr-loader");o&&(o.style.display="none"),console.error("\u274c Error displaying QR Code:",i)}}shareWithVTS(){this.exportDataRequest.imei_no=this.certificateData.deviceimeino||"",this.exportDataRequest.iccid_no=this.certificateData.deviceiccidno||"",this.exportDataRequest.device_seri
1al_no=this.certificateData.deviceserialno||"",this.exportDataRequest.primary_network=this.certificateData.primary_network||"",this.exportDataRequest.primary_sim_no=this.certificateData.primary_sim_no||"",this.exportDataRequest.secondry_network=this.certificateData.secondry_network||"",this.exportDataRequest.secondry_sim_no=this.certificateData.secondry_sim_no||"",this.exportDataRequest.m2mprovider=this.certificateData.m2mprovider||"",this.exportDataRequest.vendor_name=this.certificateData.vendorname||"",this.exportDataRequest.vendor_code=this.certificateData.vendor_code||"",this.exportDataRequest.vehicle_no=this.certificateData.vehicleno||"",this.exportDataRequest.chassis_no=this.certificateData.chassisno||"",this.exportDataRequest.engine_no=this.certificateData.engineno||"",this.exportDataRequest.mfg_year=this.certificateData.vehiclemfgyear||"",this.exportDataRequest.installation_date=this.certificateData.installeddate||"",this.exportDataRequest.status=this.certificateData.vahan_status||"",this.exportDataRequest.permit_holder_name=this.certificateData.customername||"",this.exportDataRequest.permit_holder_number=this.certificateData.customermobileno||"",this.exportDataRequest.access_token=this.certificateData.auth_key,this.exportDataRequest.model_name=this.certificateData.modelname||"",this.exportDataRequest.pageurl=window.location.pathname,this.exportDataRequest.pagename=window.location.pathname.substring(1),this.es.exportApiCall(this.exportDataRequest,"psv_importdata").subscribe({next:t=>{200==t.statusCode?(this.loader.responseMessage=t.entity,this.loader.successNotification()):(this.loader.responseMessage=t.entity,this.loader.failedNotification())},error:t=>{console.error("API call error:",t),this.loader.responseMessage="Error fetching certificate data for sharing.",this.loader.failedNotification()},complete:()=>{}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.R),e.Y36(R.v),e.Y36(J.D),e.Y36(P.P),e.Y36(ie.s),e.Y36(Gr.eN),e.Y36(v.F0),e.Y36(v.gz),e.Y36(_e.X))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-fitment-certificate"]],decls:3,vars:3,consts:[["class","cert-action-buttons no-print",4,"ngIf"],["class","cert-page",4,"ngIf"],["class","container mt-5",4,"ngIf"],[1,"cert-action-buttons","no-print"],["title","Download PDF",1,"cert-action-btn","download-btn",3,"click"],[1,"fa","fa-download"],["title","Email",1,"cert-action-btn","email-btn",3,"click"],[1,"fa","fa-envelope"],["title","Push to VTS",1,"cert-action-btn","vts-btn",3,"click"],["aria-hidden","true",1,"fa","fa-exchange"],[1,"cert-page"],[1,"certificate-container","cert-doc"],[1,"cert-header"],[1,"row","no-gutters","align-items-center"],[1,"col-3"],["alt","Vendor Logo",1,"cert-logo",3,"src"],[1,"col-6","text-center","px-2"],[1,"cert-title"],[1,"cert-subtitle"],[1,"cert-std-badge"],[1,"cert-meta-label-inline"],[1,"cert-meta-value-inline"],[1,"cert-number-strip"],[1,"cert-number-value"],[1,"cert-card"],[1,"cert-card-header"],[1,"cert-card-body"],[1,"row","no-gutters"],[1,"col-9"],[1,"col-6"],[1,"cert-field-row"],[1,"cert-field-lbl"],[1,"cert-field-val","font-weight-bold","text-uppercase"],[1,"cert-field-val"],[1,"col-3","d-flex","flex-column","align-items-center","justify-content-center","cert-qr-col"],["src","https://truegnss.com/uploaddata/truegnss/Images/genweb/WB974966_InlineQR25022026190540.jpg","alt","QR Code",1,"cert-qr"],[1,"cert-qr-label"],[1,"row","no-gutters","cert-grid-row"],[1,"col-4","cert-grid-cell"],[1,"cert-field-val","font-weight-bold"],[1,"col-4","cert-grid-cell","cert-grid-cell-last"],[1,"row","no-gutters","cert-grid-row","cert-grid-row-last"],[1,"col-4"],[1,"cert-section"],[1,"cert-section-hdr"],[1,"cert-declaration-box"],[1,"cert-declaration-text"],[1,"row","no-gutters","p-2"],[1,"col-4","px-1","text-center"],["alt","Vehicle Image",1,"cert-photo","img-fluid",2,"width","180px","height","120px","object-fit","cover",3,"src"],[1,"cert-photo-label"],["alt","RC Image",1,"cert-photo","img-fluid",2,"width","180px","height","120px","object-fit","cover",3,"src"],["alt","Device Image",1,"cert-photo","img-fluid",2,"width","180px","height","120px","object-fit","cover",3,"src"],[1,"cert-footer"],[1,"col-8"],[1,"font-weight-bold"],[4,"ngIf"],[1,"col-4","text-right"],[1,"cert-footer-note"],[1,"container","mt-5"],[1,"alert","alert-warning","text-center","shadow-sm"],[1,"fa","fa-exclamation-triangle","fa-2x","mb-2",2,"color","#856404"],[1,"mt-1"],[1,"mb-2"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"fa","fa-refresh","mr-1"]],template:function(t,i){1&t&&(e.YNc(0,Wr,7,0,"div",0),e.YNc(1,el,211,42,"div",1),e.YNc(2,tl,10,0,"div",2)),2&t&&(e.Q6J("ngIf",i.isCertificateAvailable),e.xp6(1),e.Q6J("ngIf",i.isCertificateAvailable),e.xp6(1),e.Q6J("ngIf",i.nodataFound))},directives:[y.O5],pipes:[y.uU],styles:[".cert-action-buttons[_ngcontent-%COMP%]{position:fixed;right:20px;top:80px;z-index:1050;display:flex;flex-direction:column;gap:8px}.cert-action-btn[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:50%;border:none;cursor:pointer;color:#fff;font-size:16px;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 8px #00000040;transition:transform .15s,box-shadow .15s}.cert-action-btn[_ngcontent-%COMP%]:hover{transform:scale(1.1);box-shadow:0 5px 14px #0000004d}.print-btn[_ngcontent-%COMP%]{background:#17a2b8}.download-btn[_ngcontent-%COMP%]{background:#28a745}.email-btn[_ngcontent-%COMP%]{background:#6c757d}.vts-btn[_ngcontent-%COMP%]{background:#0069d9}.cert-page[_ngcontent-%COMP%]{background:#e8ecf0;min-height:100vh;padding:28px 16px;display:flex;justify-content:center;align-items:flex-start}.cert-doc[_ngcontent-%COMP%]{background:#fff;width:210mm;max-width:100%;box-shadow:0 4px 24px #00000026;font-size:11.5px;font-family:Arial,sans-serif;color:#222;padding:0;border-radius:4px;overflow:hidden;border:1px solid #c8d0d8}.cert-header[_ngcontent-%COMP%]{border-bottom:2px solid #1a3a5c;padding:12px 14px 10px;background:#fff}.cert-logo[_ngcontent-%COMP%]{max-height:60px;max-width:150px;object-fit:contain}.cert-title[_ngcontent-%COMP%]{font-size:13px;font-weight:800;
1color:#1a3a5c;letter-spacing:.4px;line-height:1.3;text-transform:uppercase}.cert-subtitle[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;color:#1a3a5c;line-height:1.3}.cert-std-badge[_ngcontent-%COMP%]{display:inline-block;margin-top:4px;background:#1a3a5c;color:#fff;font-size:9px;font-weight:600;padding:2px 8px;border-radius:10px;letter-spacing:.5px;text-transform:uppercase}.cert-meta-label-inline[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#555}.cert-meta-value-inline[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:#1a3a5c}.cert-number-strip[_ngcontent-%COMP%]{background:#f0f4f8;border-bottom:1px solid #c8d0d8;padding:7px 14px;font-size:12.5px;color:#1a3a5c}.cert-number-value[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#1a3a5c;letter-spacing:.3px}.cert-card[_ngcontent-%COMP%]{border:1px solid #c8d0d8;margin:10px 10px 0;border-radius:3px;overflow:hidden}.cert-card[_ngcontent-%COMP%]:last-of-type{margin-bottom:10px}.cert-card-header[_ngcontent-%COMP%]{background:#1a3a5c;color:#fff;font-size:11px;font-weight:700;padding:5px 10px;letter-spacing:.2px}.cert-card-body[_ngcontent-%COMP%]{padding:0}.cert-field-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;padding:4px 10px;border-bottom:1px solid #eef0f3;gap:6px;min-height:26px}.cert-field-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.cert-field-lbl[_ngcontent-%COMP%]{font-size:10.5px;font-weight:600;color:#444;white-space:nowrap;min-width:110px;flex-shrink:0}.cert-field-val[_ngcontent-%COMP%]{font-size:11px;color:#111;word-break:break-word}.cert-qr-col[_ngcontent-%COMP%]{border-left:1px solid #e0e5ec;padding:8px 4px;background:#fafbfc}.cert-qr[_ngcontent-%COMP%]{width:80px;height:80px;object-fit:contain;border:1px solid #ddd;padding:2px;border-radius:3px}.cert-qr-label[_ngcontent-%COMP%]{font-size:8.5px;color:#888;text-align:center;margin-top:3px}.cert-grid-row[_ngcontent-%COMP%]{border-bottom:1px solid #eef0f3}.cert-grid-row-last[_ngcontent-%COMP%]{border-bottom:none}.cert-grid-cell[_ngcontent-%COMP%]{padding:5px 18px;border-right:1px solid #e0e5ec;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;overflow:hidden}.cert-grid-cell[_ngcontent-%COMP%] .cert-field-lbl[_ngcontent-%COMP%]{font-size:10px;white-space:nowrap;min-width:unset;color:#666;font-weight:600}.cert-grid-cell[_ngcontent-%COMP%] .cert-field-val[_ngcontent-%COMP%]{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block;color:#111}.cert-grid-cell-last[_ngcontent-%COMP%]{border-right:none}.cert-photo[_ngcontent-%COMP%]{min-height:130px;max-height:130px;width:100%;object-fit:cover;border:1px solid #ccc;border-radius:3px}.cert-photo-label[_ngcontent-%COMP%]{font-size:9.5px;color:#666;margin-top:3px;text-align:center}.cert-declaration-box[_ngcontent-%COMP%]{padding:8px 10px}.cert-declaration-text[_ngcontent-%COMP%]{font-size:10px;color:#555;font-style:italic;margin-bottom:4px;border-left:3px solid #1a3a5c;padding:5px 8px;background:#f8f9fa;border-radius:0 3px 3px 0}.cert-section-hdr[_ngcontent-%COMP%]{background:#1a3a5c;color:#fff;padding:4px 10px;font-size:10.5px;font-weight:700;letter-spacing:.2px}.cert-footer[_ngcontent-%COMP%]{border-top:2px solid #1a3a5c;background:#f4f6f9;padding:6px 14px;font-size:10px;color:#444;margin-top:10px}.cert-footer-note[_ngcontent-%COMP%]{font-size:9px;color:#888}.cert-sig-col[_ngcontent-%COMP%]{padding:4px 12px}.cert-sig-space[_ngcontent-%COMP%]{height:56px;border-bottom:1px solid #333;margin:0 12px 6px}.cert-sig-lbl[_ngcontent-%COMP%]{font-size:10px;margin-top:3px;line-height:1.5}.cert-sig-line[_ngcontent-%COMP%]{border-bottom:1px solid #555;display:inline-block;min-width:90px}@media print{.no-print[_ngcontent-%COMP%], .cert-action-buttons[_ngcontent-%COMP%]{display:none!important}.cert-page[_ngcontent-%COMP%]{background:#fff!important;padding:0!important;display:block!important}.cert-doc[_ngcontent-%COMP%]{box-shadow:none!important;width:100%!important;border:none!important}.cert-card-header[_ngcontent-%COMP%], .cert-number-strip[_ngcontent-%COMP%], .cert-section-hdr[_ngcontent-%COMP%]{print-color-adjust:exact}}"]}),n})()},{path:"assignment",component:yt,canActivate:[X.j]},{path:"vehicledetails",component:ui,canActivate:[X.j]},{path:"grievancedetails",component:Pi,canActivate:[X.j]},{path:"livestatus",component:Ks},{path:"compliancestatus",component:Dr},{path:"devicedetails",component:zr}];let ol=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[[v.Bz.forChild(nl)],v.Bz]}),n})();var al=b(44466),sl=b(64813);let rl=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}
1),n.\u0275inj=e.cJS({imports:[[ol,y.ez,al.m,sl.MapModule]]}),n})()},95348:(Ae,te,b)=>{b.d(te,{Z:()=>le});var y=b(49671),v=b(98407),oe=(b(69529),b(17845),b(17445)),ae=b(63900),B=b(74888),se=b(95969),H=b(5e3),me=b(82849),ue=b(94761),re=b(57087),he=b(69808);let le=(()=>{class E{constructor(l,p,g,m){this.eventService=l,this.apiService=p,this.loader=g,this.datePipe=m,this.liveVehicleTrailCoords=[],this.liveDirectionMarkers=[],this.clusterVehicleData=[],this.clusterIntervalFlag=!1,this.historyDirectionMarkers=[],this.filteredHistoryData=[],this.historyCurrentIndex=0,this.animationStatus="stopped",this.animationSpeed=2e3,this.currentVehicleData={},this.refreshInterval=1e4,this.currentVehicleId="",this.currentDeviceImei="",this.view={center:[20.5937,78.9629],maxBounds:[[6.5,67],[37.1,97.5]],zoom:5,minZoom:4.4,maxZoom:25,zoomControl:!1,attributionControl:!1,scrollWheelZoom:!0,preferCanvas:!0,zoomAnimation:!0,fadeAnimation:!0,markerZoomAnimation:!0},this.isPlaying=!1,this.isPaused=!1,this.currentSpeed=1,this.currentIndex=0}updateHistoryVehicleMarker(){const l=this.filteredHistoryData[this.historyCurrentIndex];if(!l)return;const p=parseFloat(l.latitude),g=parseFloat(l.longitude),m=parseFloat(l.vehicledirection||l.heading||"0"),h=v.divIcon({className:"history-vehicle-marker",html:`<img src='assets/map/green.png' style='width: 32px; height: 32px; transform: rotate(${m}deg); transition: all 0.5s ease-in-out;'>`,iconSize:[32,32],iconAnchor:[16,16],popupAnchor:[0,-16]});if(this.historyVehicleMarker){const T=this.historyVehicleMarker.getLatLng();this.animateHistoryMarkerSmoothly(this.historyVehicleMarker,T,[p,g],m,this.animationSpeed),this.historyVehicleMarker.setIcon(h)}else this.historyVehicleMarker=v.marker([p,g],{icon:h}).addTo(this.map);this.historyVehicleMarker.bindPopup(this.createPopupContent(l)),this.updateCurrentHistoryArrow()}animateMarkerToPosition(l,p,g,m){const h=p,T=Array.isArray(g)?v.latLng(g[0],g[1]):g,_=m/30;let e=0;const A=(T.lat-h.lat)/30,d=(T.lng-h.lng)/30,Z=()=>{e++;const C=h.lat+A*e,V=h.lng+d*e;l.setLatLng([C,V]);const O=this.calculateLeafletBearing(v.latLng(h.lat,h.lng),v.latLng(C,V));l.setRotationAngle&&(l.setRotationAngle(O),l.setRotationOrigin("center")),e<30?setTimeout(Z,_):l.setLatLng([T.lat,T.lng])};Z()}animateHistoryMarkerSmoothly(l,p,g,m,h){const T=p,M=Array.isArray(g)?v.latLng(g[0],g[1]):g,e=h/60;let A=0;const d=(M.lat-T.lat)/60,Z=(M.lng-T.lng)/60,C=()=>{A++,l.setLatLng([T.lat+d*A,T.lng+Z*A]),A<60?setTimeout(C,e):l.setLatLng([M.lat,M.lng])};C()}updateCurrentHistoryArrow(){if(this.historyDirectionMarkers.forEach(l=>{this.map.removeLayer(l)}),this.historyDirectionMarkers=[],this.filteredHistoryData.length>1){const l=this.filteredHistoryData.map(g=>v.latLng(parseFloat(g.latitude),parseFloat(g.longitude))),p=Math.max(1,Math.floor(l.length/15));for(let g=p;g<l.length;g+=p){const m=l[g-1],h=l[g],T=this.calculateLeafletBearing(m,h),M=v.divIcon({html:`\n <div style="\n transform: rotate(${T}deg); \n color: #33cc33; \n font-size: 26px;\n text-shadow: 0 0 4px rgba(0,0,0,0.6);\n animation: historyPulse 2s ease-in-out infinite;\n filter: drop-shadow(0 2px 4px rgba(51, 204, 51, 0.4));\n ">\u{1f816}</div>\n `,className:"history-direction-arrow animated-arrow",iconSize:[26,26],iconAnchor:[13,13]}),A=v.marker([(m.lat+h.lat)/2,(m.lng+h.lng)/2],{icon:M,interactive:!1}).addTo(this.map);this.historyDirectionMarkers.push(A)}}}startHistoryAnimation(){0!==this.filteredHistoryData.length&&(this.animationStatus="playing",this.clearHistoryInterval(),this.updateCurrentHistoryArrow(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}resumeHistoryAnimation(){0!==this.filteredHistoryData.length&&(this.animationStatus="playing",this.clearHistoryInterval(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}pauseHistoryAnimation(){this.animationStatus="paused",this.clearHistoryInterval()}stopHistoryAnimation(){this.animationStatus="stopped",this.clearHistoryInterval(),this.historyCurrentIndex=0}restartHistoryAnimation(){this.stopHistoryAnimation(),this.historyCurrentIndex=0,this.updateHistoryVehicleMarker(),setTimeout(()=>{this.startHistoryAnimation()},50)}setAnimationSpeed(l){this.animationSpeed=l,"playing"===this.animationStatus&&(this.clearHistoryInterval(),this.historyAnimationInterval=setInterval(()=>{this.animateHistoryStep()},this.animationSpeed))}clearHistoryInterval(){this.historyAnimationInterval&&(clearInterval(this.historyAnimationInterval),this.historyAnimationInterval=void 0)}animateHistoryStep(){0!==this.filteredHistoryData.length&&(this.historyCurrentIndex<this.filteredHistoryData.length-1?(this.historyCurrentIndex++,this.updateHistoryVehicleMarker()):(this.updateHistoryVehicleMarker(),this.stopHistoryAnimation()))}clearAllLayers(){this.map&&this.map.eachLayer&&this.map.eachLayer(l=>{(l instanceof v.Marker||l instanceof v.Circle||l instanceof v.Polyline||l instanceof v.LayerGroup)&&this.map.removeLayer(l)})}trackOverspeedHistory(l,p,g,m,h,T,M){var _=this;return(0,y.Z)(function*(){var e,A,d,Z,C,V;try{_.clearHistoryTracking(),null===(A=null===(e=_.loader)||void 0===e?void 0:e.loaderOn)||void 0===A||A.call(e);const O=new B.rn;O.imeino=l,O.vehicleid=T,O.fromdate=p,O.fromtime=g,O.todate=m,O.totime=h,O.searchbytype="overspeed";const G=yield _.apiService.historytrack(O);if(null===(Z=null===(d=_.loader)||void 0===d?void 0:d.loaderOff)||void 0===Z||Z.
1call(d),"200"==G.statusCode&&1==G.status&&G.entity.historytrackdetails.length>0){_.filteredHistoryData=[];const U=G.entity.historytrackdetails;for(let N=0;N<U.length;N++){let S=new B.Us;S.pollingdatatime=U[N].datatimestamp,S.ignitionstatus=U[N].ignitionstatus,S.speed=U[N].speed,S.latitude=U[N].latitude,S.longitude=U[N].longitude,S.heading=U[N].heading,S.vehicledirection=U[N].heading,S.rowno=U[N].row_number,S.location=U[N].location,S.gpsstatus=U[N].status,S.commutedistance=U[N].commutedistance,S.vehicleno=(null==M?void 0:M.vehicleno)||"",S.deviceimeino=l,S.trackingtype="overspeed",_.filteredHistoryData.push(S)}_.plotHistoryRoute()}else _.filteredHistoryData=[],_.loader&&(_.loader.responseMessage="Overspeed History Not Found",_.loader.failedNotification&&_.loader.failedNotification())}catch(O){console.error("[OverspeedTrack] Error:",O),null===(V=null===(C=_.loader)||void 0===C?void 0:C.loaderOff)||void 0===V||V.call(C),_.loader&&(_.loader.responseMessage="Error fetching overspeed history",_.loader.failedNotification&&_.loader.failedNotification())}})()}configureBaseLayers(){this.baselayer={OpenStreetMap:v.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{id:"OpenStreetMap"}),satelliteLayer:v.tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles © Esri",id:"satelliteLayer"})}}initMap(){try{if(!document.getElementById("liveTrackingMap"))return void console.error('Map container with id "liveTrackingMap" not found');this.map&&this.map.remove(),this.map=v.map("liveTrackingMap",this.view),v.control.zoom({position:"topright"}).addTo(this.map),this.configureBaseLayers(),this.baselayer.OpenStreetMap.addTo(this.map),v.control.layers(this.baselayer,{},{position:"topright"}).addTo(this.map),console.log("Live tracking map initialized successfully")}catch(l){console.error("Error initializing live tracking map:",l)}}trackLiveVehicle(l){try{this.currentVehicleData=l,this.currentVehicleId=l.vehicleid||"",this.currentDeviceImei=l.deviceimeino||"",this.clearLiveTracking();const p=parseFloat(l.latitude),g=parseFloat(l.longitude);if(isNaN(p)||isNaN(g))return void console.error("Invalid coordinates");const m=[p,g],h=this.getVehicleIcon(l),T=parseFloat(l.vehicledirection||"0"),M=v.divIcon({className:"live-vehicle-marker",html:`<img src='${h}' style='width: 32px; height: 32px; transform: rotate(${T}deg); transition: all 0.5s ease-in-out;'>`,iconSize:[32,32],iconAnchor:[16,16],popupAnchor:[0,-16]});this.liveVehicleMarker=v.marker(m,{icon:M,rotationAngle:T,rotationOrigin:"center center"});const _=this.createPopupContent(l);this.liveVehicleMarker.bindPopup(_).openPopup(),this.liveVehicleMarker.addTo(this.map),this.liveVehicleTrailCoords=[m],this.liveVehicleTrail=v.polyline(this.liveVehicleTrailCoords,{color:"#FF5733",weight:4,opacity:.8,smoothFactor:1}).addTo(this.map),this.addLiveDirectionArrows(this.liveVehicleTrail),this.map.flyTo(m,16,{animate:!0,duration:1.5}),this.startAutoRefreshWithAPI()}catch(p){console.error("Error tracking live vehicle:",p)}}addArrowDecorator(l){try{this.addLiveDirectionArrows(l)}catch(p){console.log("Arrow decorator error:",p)}}addLiveDirectionArrows(l){this.liveDirectionMarkers.forEach(m=>{this.map.removeLayer(m)}),this.liveDirectionMarkers=[];const p=l.getLatLngs();if(p.length<2)return;const g=Math.max(1,Math.floor(p.length/10));for(let m=g;m<p.length;m+=g){const h=p[m-1],T=p[m],M=this.calculateBearing(h,T),_=v.divIcon({html:`\n <div style="\n transform: rotate(${M}deg); \n color: #FF5733; \n font-size: 24px;\n text-shadow: 0 0 3px rgba(0,0,0,0.5);\n animation: pulse 1.5s ease-in-out infinite;\n ">\u25b6</div>\n `,className:"live-direction-arrow",iconSize:[24,24],iconAnchor:[12,12]}),d=v.marker([(h.lat+T.lat)/2,(h.lng+T.lng)/2],{icon:_,interactive:!1}).addTo(this.map);this.liveDirectionMarkers.push(d)}}calculateBearing(l,p){const g=l.lat*Math.PI/180,m=l.lng*Math.PI/180,h=p.lat*Math.PI/180,M=p.lng*Math.PI/180-m,_=Math.sin(M)*Math.cos(h),e=Math.cos(g)*Math.sin(h)-Math.sin(g)*Math.cos(h)*Math.cos(M);return(180*Math.atan2(_,e)/Math.PI+360)%360}getVehicleIcon(l){var p,g;null===(p=l.ignitionstatus)||void 0===p||p.toLowerCase();const h=null===(g=l.pollingstatus)||void 0===g?void 0:g.toLowerCase();return"running"===h?"assets/map/green.png":"idle"===h?"assets/map/yellow.png":"stop"===h?"assets/map/blue.png":"assets/map/red.png"}createPopupContent(l){var p,g;const m=(null===(p=l.pollingstatus)||void 0===p?void 0:p.toLowerCase())||"";let h="status-badge ";return"running"===m?h+="status-running":"stop"===m?h+="status-stop":"idle"===m&&(h+="status-idle"),`\n <div class="vehicle-popup small-popup">\n <table class="popup-table">\n <tr>\n <th colspan="3" class="popup-title" style="background-color: #283d55;\n color: white; text-align: center;" >\u{1f690} ${l.vehicleno||"N/A"}</th>\n </tr>\n <tr>\n <td>\u{1f4f1} IMEI</td>\n <td>${l.deviceimeino||"N/A"}</td>\n </tr>\n <tr>\n <td>\u26a1 Speed</td>\n <td style="font-weight: 700; color: ${parseFloat(l.speed||"0")>40?"#dc3545":"#28a745"};">\n ${l.speed||0} km/h\n </td>\n </tr>\n <tr>\n <td>\u{1f4ca} Status</td>\n <td><span class="${h}">${l.pollingstatus||"N/A"}</span></td>\n </tr>\n <tr>\n <td>\u{1f511} Ignition</td>\n <td style="font-weight: 600; color: ${"on"===(null===(g=l.ignitionstatus)||void 0===g?void 0:g.toLowerCase())?"#28a745":"#6c757d"};">\n ${l.ignitionstatus||"N/A"}\n </td>\n </tr>\n <tr>\n <td>\u{1f550} Time</td>\n <td>${l.pollingdatatime||"N/A"}</td>\n </tr>\n <tr>\n <td>\u{1f4cd} Location</td>\n <td>${l.location||"N/A"}</td>\n </tr>\n </table>\n </div>\n `}updateVehiclePosition(l){try{const p=parseFloat(l.latitude),g=parseFloat(l.longitude);if(isNaN(p)||isNaN(g))return;const m=[p,g],h=parseFloat(l.vehicledirection||"0");if(this.liveVehicleMarker){const T=this.liveVehicleMarker.getLatLng();this.animateLiveMarkerToPosition(this.liveVehicleMarker,T,m,h,1e3);const M=this.getVehicleIcon(l),_=v.divIcon({className:"live-vehicle-marker",html:`<img src='${M}' style='width: 32px; height: 32px; transform: rotate(${h}deg); transition: all 0.5s ease-in-out;'>`,iconSize:[32,32],iconAnchor:[16,16],popupAnchor:[0,-16]});this.liveVehicleMarker.setIcon(_);const e=this.createPopupContent(l);this.liveVehicleMarker.setPopupContent(e)}this.liveVehicleCircle&&this.liveVehicleCircle.setLatLng(m),this.liveVehicleTrailCo
1ords.push(m),this.liveVehicleTrail&&(this.liveVehicleTrail.setLatLngs(this.liveVehicleTrailCoords),this.addLiveDirectionArrows(this.liveVehicleTrail)),this.currentVehicleData=l,this.map.flyTo(m,this.map.getZoom(),{animate:!0,duration:1,easeLinearity:.25})}catch(p){console.error("Error updating vehicle position:",p)}}animateLiveMarkerToPosition(l,p,g,m,h){const T=p,M=Array.isArray(g)?v.latLng(g[0],g[1]):g,e=h/60;let A=0;const d=(M.lat-T.lat)/60,Z=(M.lng-T.lng)/60,C=()=>{A++,l.setLatLng([T.lat+d*A,T.lng+Z*A]),A<60?setTimeout(C,e):l.setLatLng([M.lat,M.lng])};C()}startAutoRefreshWithAPI(){this.stopAutoRefresh(),this.refreshSubscription=(0,oe.F)(this.refreshInterval).pipe((0,ae.w)(()=>this.eventService.apiCall({vehicleid:this.currentVehicleId,deviceimeino:this.currentDeviceImei},"map/getliveposition"))).subscribe({next:l=>{200===l.statusCode&&l.entity&&this.updateVehiclePosition(l.entity)},error:l=>{console.error("Error fetching live vehicle data:",l)}})}startAutoRefresh(){this.stopAutoRefresh(),this.refreshSubscription=(0,oe.F)(this.refreshInterval).subscribe(()=>{console.log("Auto-refresh triggered at",(new Date).toLocaleTimeString())})}stopAutoRefresh(){this.refreshSubscription&&(this.refreshSubscription.unsubscribe(),this.refreshSubscription=void 0)}clearLiveTracking(){this.liveVehicleMarker&&(this.map.removeLayer(this.liveVehicleMarker),this.liveVehicleMarker=void 0),this.liveVehicleTrail&&(this.map.removeLayer(this.liveVehicleTrail),this.liveVehicleTrail=void 0),this.liveVehicleCircle&&(this.map.removeLayer(this.liveVehicleCircle),this.liveVehicleCircle=void 0),this.liveDirectionMarkers.forEach(l=>{this.map.removeLayer(l)}),this.liveDirectionMarkers=[],this.liveVehicleTrailCoords=[],this.stopAutoRefresh()}destroy(){this.clearLiveTracking(),this.clearClusterTracking(),this.clearHistoryTracking(),this.map&&this.map.remove()}initializeClusterGroup(){console.log("\u{1f4cd} Initializing cluster group"),this.map?(this.clusterMarkerGroup=v.markerClusterGroup({spiderfyOnMaxZoom:!0,showCoverageOnHover:!1,zoomToBoundsOnClick:!0,maxClusterRadius:80,animate:!0,animateAddingMarkers:!0,disableClusteringAtZoom:18,spiderfyDistanceMultiplier:1.5,chunkedLoading:!0,removeOutsideVisibleBounds:!0,iconCreateFunction:function(l){var p=l.getChildCount(),g=" marker-cluster-";return v.divIcon({html:"<div><span>"+p+"</span></div>",className:"marker-cluster"+(g+=p<10?"small":p<100?"medium":"large"),iconSize:v.point(40,40)})}}),this.map&&(this.map.addLayer(this.clusterMarkerGroup),console.log("\u{1f4cd} Cluster group added to map successfully with animations enabled"))):console.error("\u{1f4cd} Cannot initialize cluster group - map not found!")}getClusterData(){var l=this;return(0,y.Z)(function*(){console.log("\u{1f4cd} getClusterData called");let p=new se.e;p.pageno="",p.itemperpage="",l.clusterapi&&l.clusterapi.unsubscribe();try{const g=yield l.apiService.clusteronmap(p).toPromise();if(console.log("\u{1f4cd} Cluster API Response:",g),200==g.statusCode&&g.entity&&g.entity.details){if(l.clusterVehicleData=g.entity.details,console.log("\u{1f4cd} Cluster Vehicle Data:",l.clusterVehicleData.length,"vehicles"),l.clusterMarkerGroup?(l.clusterMarkerGroup.clearLayers(),console.log("\u{1f4cd} Cleared existing cluster markers")):l.initializeClusterGroup(),console.log("\u{1f4cd} About to plot",l.clusterVehicleData.length,"vehicles"),l.plotClusterMarkers(l.clusterVehicleData),!l.clusterIntervalFlag&&l.clusterVehicleData.length>0){const m=v.latLngBounds(l.clusterVehicleData.map(h=>[parseFloat(h.latitude),parseFloat(h.longitude)]));l.map.fitBounds(m,{padding:[50,50]})}}else console.error("\u{1f4cd} No vehicles found or invalid response"),l.loader.responseMessage="Vehicles Not Found",l.loader.failedNotification();l.clusterTimeout=setTimeout(()=>{l.clusterIntervalFlag=!0,l.getClusterData()},3e4)}catch(g){console.error("\u{1f4cd} Error fetching cluster data:",g)}})()}plotClusterMarkers(l){console.log("\u{1f4cd} plotClusterMarkers called with",l.length,"vehicles");try{if(!this.clusterMarkerGroup)return void console.error("\u{1f4cd} Cluster marker group not initialized!");this.clusterMarkerGroup.clearLayers(),console.log("\u{1f4cd} Cleared existing cluster markers");const p={"Non Polling":"./assets/map/redcar.png",Running:"./assets/map/greencar.png",Idle:"./assets/map/bluecar.png",Stop:"./assets/map/bluecar.png",Polling:"./assets/map/yellowcar.png"},g=[];for(const m of l){const h=parseFloat(m.latitude),T=parseFloat(m.longitude);if(isNaN(h)||isNaN(T))continue;const _=p[m.pollingstatus||""]||p["Non Polling"],e=v.point(16,28),A=v.icon({iconUrl:_,iconSize:e,iconAnchor:[e.x/2,e.y-7],popupAnchor:[0,7-e.y]}),d=parseFloat(m.vehicledirection)||0,Z=this.createClusterPopupContent(m),C=v.marker([h,T],{title:m.vehicleno||"",icon:A,rotationAngle:d,rotationOrigin:"center center"});C.bindPopup(Z),g.push(C)}this.clusterMarkerGroup.addLayers(g),console.log(`\u{1f4cd} Added ${g.length} markers to cluster group (bulk)`),console.log("\u{1f4cd} Cluster group layer count:",this.clusterMarkerGroup.getLayers().length)}catch(p){console.error("\u{1f4cd} Error plotting cluster markers:",p)}}createClusterPopupContent(l){var p,g;const m=(null===(p=l.pollingstatus)||void 0===p?void 0:p.toLowerCase())||"";let h="status-badge ";return"running"===m?h+="status-running":"stop"===m?h+="status-stop":"idle"===m&&(h+="status-idle"),`\n<div class="vehicle-popup small-popup">\n <table class="popup-table">\n <tr>\n <th colspan="3" class="popup-title" style="background-color: #283d55;\n color: white; text-align: center;" >\u{1f690} ${l.vehicleno||"N/A"}</th>\n </tr>\n <tr>\n <td>\u{1f4f1} IMEI</td>\n <td>${l.deviceimeino||"N/A"}</td>\n </tr>\n <tr>\n <td>\u26a1 Speed</td>\n <td style="font-weight: 700; color: ${parseFloat(l.speed||"0")>40?"#dc3545":"#28a745"};">\n ${l.speed||0} km/h\n </td>\n </tr>\n <tr>\n <td>\u{1f4ca} Status</td>\n <td><span class="${h}">${l.pollingstatus||"N/A"}</span></td>\n </tr>\n <tr>\n <td>\u{1f511} Ignition</td>\n <td style="font-weight: 600; color: ${"on"===(null===(g=l.ignitionstatus)||void 0===g?void 0:g.toLowerCase())?"#28a745":"#6c757d"};">\n ${l.ignitionstatus||"N/A"}\n </td>\n </tr>\n <tr>\n <td>\u{1f550} Time</td>\n <td>${l.pollingdatatime||"N/A"}</td>\n </tr>\n <tr>\n <td>\u{1f4cd} Location</td>\n <td>${l.location||"N/A"}</td>\n </tr>\n </table>\n </div>\n\n\n\n\n\n \n `}clearClusterTracking(){if(console.log("\u{1f4cd} Clearing cluster tracking"),this.clusterMarkerGroup&&this.map){try{this.map.removeLayer(this.clusterMarkerGroup),console.log("\u{1f4cd} Removed cluster marker group from map")}catch(l){console.log("\u{1f4cd} Error removing cluster group:",l)}this.clusterMarkerGroup=void 0}this.clusterTimeout&&(clearTimeout(this.clusterTimeout),this.clusterTimeout=void 0),this.clusterapi&&this.clusterapi.unsubscribe(),this.clusterIntervalFlag=!1}trackHistoryVehicle(l,p,g,m,h,T,M){var _=this;return(0,y.Z)(function*(){try{_.clearHistoryTracking(),_.loader.loaderOn();const e=new B.rn;e.imeino=l,e.vehicleid=T,e.fromdate=p,e.fromtime=g,e.todate=m,e.totime=h,e.searchbytype="";const A=yield _.apiService.historytrack(e);if(_.loader.loaderOff(),"200"==A.statusCode&&1==A.status&&A.entity.historytrackdetails.length>0){_.filteredHistoryData=[];const d=A.entity.historytrackdetails;console.log("[HistoryTrack] Received",d.length,"points from API");for(let Z=0;Z<d.length;Z++){let C=new B.Us;C.pollingdatatime=d[Z].datatimestamp,C.ignitionstatus=d[Z].ignitionstatus,C.speed=d[Z].speed,C.latitude=d[Z
1].latitude,C.longitude=d[Z].longitude,C.heading=d[Z].heading,C.vehicledirection=d[Z].heading,C.rowno=d[Z].row_number,C.location=d[Z].location,C.gpsstatus=d[Z].status,C.commutedistance=d[Z].commutedistance,C.vehicleno=(null==M?void 0:M.vehicleno)||"",C.deviceimeino=l,C.trackingtype="history",_.filteredHistoryData.push(C)}console.log("[HistoryTrack] Populated filteredHistoryData:",_.filteredHistoryData),_.plotHistoryRoute()}else _.filteredHistoryData=[],_.loader.responseMessage="History Not Found",_.loader.failedNotification()}catch(e){console.error("Error tracking history vehicle:",e),_.loader.loaderOff(),_.loader.responseMessage="Error fetching history data",_.loader.failedNotification()}})()}plotHistoryRoute(){try{if(0===this.filteredHistoryData.length)return void console.warn("[HistoryTrack] No history data to plot.");const l=this.filteredHistoryData.map(e=>[parseFloat(e.latitude),parseFloat(e.longitude)]);console.log("[HistoryTrack] Plotting polyline with coords:",l),this.historyTrail=v.polyline(l,{color:"#33cc33",weight:4,opacity:.8}).addTo(this.map),this.addHistoryDirectionArrows(this.historyTrail);const p=this.filteredHistoryData[0],g=v.icon({iconUrl:"assets/school-management/images/start.png",iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]});this.historyStartMarker=v.marker([parseFloat(p.latitude),parseFloat(p.longitude)],{icon:g}).addTo(this.map);const m=this.createPopupContent(p);this.historyStartMarker.bindPopup(m);const h=this.filteredHistoryData[this.filteredHistoryData.length-1],T=v.icon({iconUrl:"assets/school-management/images/end.png",iconSize:[32,32],iconAnchor:[16,32],popupAnchor:[0,-32]});this.historyEndMarker=v.marker([parseFloat(h.latitude),parseFloat(h.longitude)],{icon:T}).addTo(this.map);const M=this.createPopupContent(h);this.historyEndMarker.bindPopup(M);const _=v.latLngBounds(l);this.map.fitBounds(_,{padding:[50,50]}),console.log("[HistoryTrack] Finished plotting route and markers.")}catch(l){console.error("[HistoryTrack] Error plotting history route:",l)}}addHistoryDirectionArrows(l){this.historyDirectionMarkers.forEach(m=>{this.map.removeLayer(m)}),this.historyDirectionMarkers=[];const p=l.getLatLngs();if(p.length<2)return;const g=Math.max(1,Math.floor(p.length/15));for(let m=g;m<p.length;m+=g){const h=p[m-1],T=p[m],M=this.calculateLeafletBearing(h,T),_=v.divIcon({html:`\n <div style="\n transform: rotate(${M}deg); \n color: #33cc33; \n font-size: 26px;\n text-shadow: 0 0 4px rgba(0,0,0,0.6);\n animation: historyPulse 2s ease-in-out infinite;\n filter: drop-shadow(0 2px 4px rgba(51, 204, 51, 0.4));\n ">\u{1f816}</div>\n `,className:"history-direction-arrow animated-arrow",iconSize:[26,26],iconAnchor:[13,13]}),d=v.marker([(h.lat+T.lat)/2,(h.lng+T.lng)/2],{icon:_,interactive:!1}).addTo(this.map);this.historyDirectionMarkers.push(d)}}clearHistoryTracking(){this.historyTrail&&(this.map.removeLayer(this.historyTrail),this.historyTrail=void 0),this.historyStartMarker&&(this.map.removeLayer(this.historyStartMarker),this.historyStartMarker=void 0),this.historyEndMarker&&(this.map.removeLayer(this.historyEndMarker),this.historyEndMarker=void 0),this.historyDirectionMarkers.forEach(l=>{this.map.removeLayer(l)}),this.historyDirectionMarkers=[],this.filteredHistoryData=[],this.historyCurrentIndex=0}calculateLeafletBearing(l,p){const g=l.lat*Math.PI/180,m=p.lat*Math.PI/180,h=(p.lng-l.lng)*Math.PI/180,T=Math.sin(h)*Math.cos(m),M=Math.cos(g)*Math.sin(m)-Math.sin(g)*Math.cos(m)*Math.cos(h);let _=180*Math.atan2(T,M)/Math.PI;return _=(_+360)%360,_}playAnimation(){this.isPlaying&&!this.isPaused||(this.isPlaying=!0,this.isPaused=!1,this.animationInterval=setInterval(()=>{!this.isPaused&&this.currentIndex<this.filteredHistoryData.length&&(this.updateMarkerPosition(this.currentIndex),this.updateCurrentHistoryArrow(),this.currentIndex++)},1e3/this.currentSpeed))}updateMarkerPosition(l){if(!this.filteredHistoryData||!this.map)return;const p=this.filteredHistoryData[l];if(!p)return;const g=parseFloat(p.vehicledirection||p.heading||"0"),m=v.divIcon({className:"history-vehicle-marker",html:`<img src='assets/map/green.png' style='width: 32px; height: 32px; transform: rotate(${g}deg); transition: all 0.3s ease-in-out;'>`,iconSize:[32,32],iconAnchor:[16,16],popupAnchor:[0,-16]});this.historyVehicleMarker?(this.historyVehicleMarker.setLatLng([parseFloat(p.latitude),parseFloat(p.longitude)]),this.historyVehicleMarker.setIcon(m)):this.historyVehicleMarker=v.marker([parseFloat(p.latitude),parseFloat(p.longitude)],{icon:m}).addTo(this.map);const h=this.createPopupContent(p);this.historyVehicleMarker.bindPopup(h)}pauseAnimation(){this.isPaused=!0}resumeAnimation(){this.isPaused=!1}stopAnimation(){this.isPlaying=!1,this.isPaused=!1,this.currentIndex=0,this.animationInterval&&(clearInterval(this.animationInterval),this.animationInterval=null)}refreshAnimation(){this.stopAnimation(),this.currentIndex=0}setSpeed(l){this.currentSpeed=l,this.isPlaying&&(this.stopAnimation(),this.playAnimation())}}return E.\u0275fac=function(l){return new(l||E)(H.LFG(me.P),H.LFG(ue.s),H.LFG(re.D),H.LFG(he.uU))},E.\u0275prov=H.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.