(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["users"],{"0338":function(e,t,s){"use strict";s("f08a")},"04f0":function(e,t,s){"use strict";s("06d2")},"05f5":function(e,t,s){"use strict";var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"wrap_address"},[t._m(0),i("div",{staticClass:"e-card-separator"}),i("div",[t._m(1),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-dropdownlist",{ref:"ddlSecurityQuestionOne",attrs:{"float-label-type":"Always",id:"ddlSecurityQuestionOne",change:t.dataBindOnQuestionOne,fields:t.fields,dataSource:t.dataSource,placeholder:"Security Question1"},model:{value:t.ddlSecurityQuestionOne,callback:function(e){t.ddlSecurityQuestionOne=e},expression:"ddlSecurityQuestionOne"}}),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionOne,expression:"isddlSecurityQuestionOne"}],staticClass:"e-error"},[t._v("This field is required")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionOneUnique,expression:"isddlSecurityQuestionOneUnique"}],staticClass:"e-error"},[t._v("Every selected questions should unique.")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.securityAnswerOne},on:{validate:function(t){return e.isSecurityAnswerOne=t}}},[i("input-password",{ref:"refSecurityAnswerOne",attrs:{placeholder:"Security Answer"},model:{value:t.securityAnswerOne,callback:function(e){t.securityAnswerOne=e},expression:"securityAnswerOne"}})],1)],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}}),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.confirmAnswerOne},on:{validate:function(t){return e.isConfirmAnswerOne=t}}},[i("input-password",{ref:"refConfirmAnswerOne",attrs:{placeholder:"Confirm Answer"},model:{value:t.confirmAnswerOne,callback:function(e){t.confirmAnswerOne=e},expression:"confirmAnswerOne"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmAnswerOne,expression:"showConfirmAnswerOne"}],staticClass:"e-error"},[t._v("Answer does not match")])],1)])]),i("div",[i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-dropdownlist",{ref:"ddlSecurityQuestionTwo",attrs:{"float-label-type":"Always",id:"ddlSecurityQuestionTwo",change:t.dataBindOnQuestionTwo,dataSource:t.dataSource,fields:t.fields,placeholder:"Security Question2"},model:{value:t.ddlSecurityQuestionTwo,callback:function(e){t.ddlSecurityQuestionTwo=e},expression:"ddlSecurityQuestionTwo"}}),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionTwo,expression:"isddlSecurityQuestionTwo"}],staticClass:"e-error"},[t._v("This field is required")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionTwoUnique,expression:"isddlSecurityQuestionTwoUnique"}],staticClass:"e-error"},[t._v("Every selected questions should unique.")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.securityAnswerTwo},on:{validate:function(t){return e.isSecurityAnswerTwo=t}}},[i("input-password",{ref:"refSecurityAnswerTwo",attrs:{placeholder:"Security Answer2"},model:{value:t.securityAnswerTwo,callback:function(e){t.securityAnswerTwo=e},expression:"securityAnswerTwo"}})],1)],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}}),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.confirmAnswerTwo},on:{validate:function(t){return e.isConfirmAnswerTwo=t}}},[i("input-password",{ref:"refConfirmAnswerTwo",attrs:{placeholder:"Confirm Answer2"},model:{value:t.confirmAnswerTwo,callback:function(e){t.confirmAnswerTwo=e},expression:"confirmAnswerTwo"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmAnswerTwo,expression:"showConfirmAnswerTwo"}],staticClass:"e-error"},[t._v("Answer does not match")])],1)])]),i("div",[i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-dropdownlist",{ref:"ddlSecurityQuestionThree",attrs:{"float-label-type":"Always",id:"ddlSecurityQuestionThree",change:t.dataBindOnQuestionThree,dataSource:t.dataSource,fields:t.fields,placeholder:"Security Question3"},model:{value:t.ddlSecurityQuestionThree,callback:function(e){t.ddlSecurityQuestionThree=e},expression:"ddlSecurityQuestionThree"}}),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionThree,expression:"isddlSecurityQuestionThree"}],staticClass:"e-error"},[t._v("This field is required")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.isddlSecurityQuestionThreeUnique,expression:"isddlSecurityQuestionThreeUnique"}],staticClass:"e-error"},[t._v("Every selected questions should unique.")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.securityAnswerThree},on:{validate:function(t){return e.isSecurityAnswerThree=t}}},[i("input-password",{ref:"refSecurityAnswerThree",attrs:{placeholder:"Security Answer3"},model:{value:t.securityAnswerThree,callback:function(e){t.securityAnswerThree=e},expression:"securityAnswerThree"}})],1)],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}}),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.confirmAnswerThree},on:{validate:function(t){return e.isConfirmAnswerThree=t}}},[i("input-password",{ref:"refConfirmAnswerThree",attrs:{placeholder:"Confirm Answer3"},model:{value:t.confirmAnswerThree,callback:function(e){t.confirmAnswerThree=e},expression:"confirmAnswerThree"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmAnswerThree,expression:"showConfirmAnswerThree"}],staticClass:"e-error"},[t._v("Answer does not match")])],1)])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Security Questions")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{"font-size":"10px","font-weight":"500",color:"red","font-style":"italic"}},[s("div",[e._v("\n            ** Note: You must configure your Security Questions while creating\n            your account. These questions and answers are important as they\n            will be used to identify you should you need to contact us for\n            help.\n          ")]),s("div",{staticStyle:{"padding-top":"5px"}},[e._v("\n            It is also important to keep your email address up to date as it\n            is the only way a new password will be communicated.**\n          ")])])])])}],n=s("c7eb"),a=s("1da1"),o=(s("d3b7"),s("159b"),s("a026")),l=s("eda0"),c=s("21cb"),u=s("940e"),d=s("aa96"),h=s("b37f"),p=s("dff1");o["default"].use(l["a"]),o["default"].use(c["a"]);var m={name:"SecurityQuestions",props:{userProfileId:String,userProfilesData:Object},components:{SccInputValidator:u["a"],inputPassword:d["a"]},mounted:function(){var e=this;this.getSecurityQuestions().then((function(){null!==e.$store.getters.loggedUser&&e.getUserSequrityQuestions()}))},data:function(){return{username:null,userId:null,showPassword:!1,passwordType:"password",requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},securityAnswerOne:null,confirmAnswerOne:null,dataSource:[],fields:{text:"question",value:"id"},ddlSecurityQuestionOne:null,ddlSecurityQuestionTwo:null,ddlSecurityQuestionThree:null,securityAnswerTwo:null,confirmAnswerTwo:null,securityAnswerThree:null,confirmAnswerThree:null,idUserSecurityQuestionOne:null,idUserSecurityQuestionTwo:null,idUserSecurityQuestionThree:null,isConfirmAnswerOne:!1,showConfirmAnswerOne:!1,isConfirmAnswerTwo:!1,showConfirmAnswerTwo:!1,isConfirmAnswerThree:!1,showConfirmAnswerThree:!1,isSecurityAnswerThree:!1,isSecurityAnswerTwo:!1,isSecurityAnswerOne:!1,isddlSecurityQuestionOne:!1,isddlSecurityQuestionTwo:!1,isddlSecurityQuestionThree:!1,isddlSecurityQuestionTwoUnique:!1,isddlSecurityQuestionThreeUnique:!1,isddlSecurityQuestionOneUnique:!1}},watch:{ddlSecurityQuestionOne:function(e){var t=this.$refs.ddlSecurityQuestionTwo.ej2Instances.value,s=this.$refs.ddlSecurityQuestionThree.ej2Instances.value;null===e?this.isddlSecurityQuestionOne=!0:null===e||e!==t&&e!==s?(this.isddlSecurityQuestionOneUnique=!1,this.isddlSecurityQuestionOne=!1):this.isddlSecurityQuestionOneUnique=!0},ddlSecurityQuestionTwo:function(e){var t=this.$refs.ddlSecurityQuestionOne.ej2Instances.value,s=this.$refs.ddlSecurityQuestionThree.ej2Instances.value;null===e?this.isddlSecurityQuestionTwo=!0:null===e||e!==t&&e!==s?(this.isddlSecurityQuestionTwoUnique=!1,this.isddlSecurityQuestionTwo=!1):this.isddlSecurityQuestionTwoUnique=!0},ddlSecurityQuestionThree:function(e){var t=this.$refs.ddlSecurityQuestionOne.ej2Instances.value,s=this.$refs.ddlSecurityQuestionTwo.ej2Instances.value;null===e?this.isddlSecurityQuestionThree=!0:null===e||e!==s&&e!==t?(this.isddlSecurityQuestionThree=!1,this.isddlSecurityQuestionThreeUnique=!1):this.isddlSecurityQuestionThreeUnique=!0},confirmAnswerOne:function(e){e===this.securityAnswerOne||null===this.securityAnswerOne&&""===this.securityAnswerOne?(this.isConfirmAnswerOne=!0,this.showConfirmAnswerOne=!1,this.isSecurityAnswerOne=!0):(this.isConfirmAnswerOne=!1,this.showConfirmAnswerOne=!0,this.isSecurityAnswerOne=!1)},securityAnswerOne:function(e){e!==this.confirmAnswerOne?(this.isConfirmAnswerOne=!1,this.showConfirmAnswerOne=!0,this.isSecurityAnswerOne=!1):(this.isConfirmAnswerOne=!0,this.showConfirmAnswerOne=!1,this.isSecurityAnswerOne=!0)},confirmAnswerTwo:function(e){e===this.securityAnswerTwo||null===this.securityAnswerTwo&&""===this.securityAnswerTwo?(this.isConfirmAnswerTwo=!0,this.showConfirmAnswerTwo=!1,this.isSecurityAnswerTwo=!0):(this.isConfirmAnswerTwo=!1,this.showConfirmAnswerTwo=!0,this.isSecurityAnswerTwo=!1)},securityAnswerTwo:function(e){e!==this.confirmAnswerTwo?(this.isConfirmAnswerTwo=!1,this.showConfirmAnswerTwo=!0,this.isSecurityAnswerTwo=!1):(this.isConfirmAnswerTwo=!0,this.showConfirmAnswerTwo=!1,this.isSecurityAnswerTwo=!0)},confirmAnswerThree:function(e){e===this.securityAnswerThree||null===this.securityAnswerThree&&""===this.securityAnswerThree?(this.isConfirmAnswerThree=!0,this.showConfirmAnswerThree=!1,this.isSecurityAnswerthree=!0):(this.isConfirmAnswerThree=!1,this.showConfirmAnswerThree=!0,this.isSecurityAnswerthree=!1)}},securityAnswerThree:function(e){e!==this.confirmAnswerThree?(this.isConfirmAnswerThree=!1,this.showConfirmAnswerThree=!0,this.isSecurityAnswerthree=!1):(this.isConfirmAnswerThree=!0,this.showConfirmAnswerThree=!1,this.isSecurityAnswerthree=!0)},methods:{getSecurityQuestions:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(h["x"]);case 3:e.$store.getters.securityQuestions&&(e.dataSource=e.$store.getters.securityQuestions),t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},getUserSequrityQuestions:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.userId=e.userProfileId,null===e.userId||""===e.userId){t.next=8;break}return s=e.userId,t.next=6,e.$store.dispatch(p["m"],{userId:s});case 6:i=e.$store.getters.userserSecurityQuestionsAnswer,i.forEach((function(t){1===t.answerOrderId?(e.ddlSecurityQuestionOne=t.securityQuestionId,e.securityAnswerOne=t.answer,e.confirmAnswerOne=t.answer,e.idUserSecurityQuestionOne=t.id):2===t.answerOrderId?(e.ddlSecurityQuestionTwo=t.securityQuestionId,e.securityAnswerTwo=t.answer,e.confirmAnswerTwo=t.answer,e.idUserSecurityQuestionTwo=t.id):3===t.answerOrderId&&(e.ddlSecurityQuestionThree=t.securityQuestionId,e.securityAnswerThree=t.answer,e.confirmAnswerThree=t.answer,e.idUserSecurityQuestionThree=t.id)}));case 8:t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error("getUserSequrityQuestions ERROR",t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},validateSecurityQuestions:function(){this.securityAnswerOne=null===this.securityAnswerOne?"":this.securityAnswerOne,this.securityAnswerTwo=null===this.securityAnswerTwo?"":this.securityAnswerTwo,this.securityAnswerThree=null===this.securityAnswerThree?"":this.securityAnswerThree,this.confirmAnswerOne=null===this.confirmAnswerOne?"":this.confirmAnswerOne,this.confirmAnswerTwo=null===this.confirmAnswerTwo?"":this.confirmAnswerTwo,this.confirmAnswerThree=null===this.confirmAnswerThree?"":this.confirmAnswerThree,this.isddlSecurityQuestionOne=null===this.ddlSecurityQuestionOne?1:0,this.isddlSecurityQuestionTwo=null===this.ddlSecurityQuestionTwo?1:0,this.isddlSecurityQuestionThree=null===this.ddlSecurityQuestionThree?1:0},securityQuestions:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a,o,l,c,u,d,p;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,s=[],e.userId=e.userProfileId,0!==e.$refs.ddlSecurityQuestionOne.ej2Instances.value&&""!==e.securityAnswerOne&&(i={},r=e.$refs.ddlSecurityQuestionOne.ej2Instances.value,a=e.$refs.ddlSecurityQuestionOne.ej2Instances.previousItemData?e.$refs.ddlSecurityQuestionOne.ej2Instances.previousItemData.id:r,null!==e.idUserSecurityQuestionOne&&a===r&&(i.id=e.idUserSecurityQuestionOne),i.userId=e.userId,i.securityQuestionId=e.$refs.ddlSecurityQuestionOne.ej2Instances.value,i.answer=e.securityAnswerOne,i.answerOrderId=1,s.push(i)),0!==e.$refs.ddlSecurityQuestionTwo.ej2Instances.value&&""!==e.securityAnswerTwo&&(o={},l=e.$refs.ddlSecurityQuestionTwo.ej2Instances.value,c=e.$refs.ddlSecurityQuestionTwo.ej2Instances.previousItemData?e.$refs.ddlSecurityQuestionTwo.ej2Instances.previousItemData.id:l,null!==e.idUserSecurityQuestionTwo&&c===l&&(o.id=e.idUserSecurityQuestionTwo),o.userId=e.userId,o.securityQuestionId=e.$refs.ddlSecurityQuestionTwo.ej2Instances.value,o.answer=e.securityAnswerTwo,o.answerOrderId=2,s.push(o)),0!==e.$refs.ddlSecurityQuestionThree.ej2Instances.value&&""!==e.securityAnswerThree&&(u={},d=e.$refs.ddlSecurityQuestionThree.ej2Instances.value,p=e.$refs.ddlSecurityQuestionThree.ej2Instances.previousItemData?e.$refs.ddlSecurityQuestionThree.ej2Instances.previousItemData.id:d,null!==e.idUserSecurityQuestionThree&&p===d&&(u.id=e.idUserSecurityQuestionThree),u.userId=e.userId,u.securityQuestionId=e.$refs.ddlSecurityQuestionThree.ej2Instances.value,u.answer=e.securityAnswerThree,u.answerOrderId=3,s.push(u)),null===e.idUserSecurityQuestionOne||null===e.idUserSecurityQuestionTwo||null===e.idUserSecurityQuestionThree){t.next=11;break}return t.next=9,e.$store.dispatch(h["C"],{data:s});case 9:t.next=13;break;case 11:return t.next=13,e.$store.dispatch(h["G"],{data:s});case 13:t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](0),console.error(t.t0);case 18:case"end":return t.stop()}}),t,null,[[0,15]])})))()},dataBindOnQuestionOne:function(){var e=this.$refs.ddlSecurityQuestionOne.ej2Instances,t=e.index,s=e.previousItemData;if(null!==s){for(var i=this.$refs.ddlSecurityQuestionTwo.getItems(),r=this.$refs.ddlSecurityQuestionThree.getItems(),n=0;n<=i.length;n+=1){var a=i[n],o=r[n];if(a.id===s.id){a.hidden=!1,o.hidden=!1;break}}this.securityAnswerOne=null,this.confirmAnswerOne=null}this.$refs.ddlSecurityQuestionTwo.getItems()[t].hidden=!0,this.$refs.ddlSecurityQuestionThree.getItems()[t].hidden=!0},dataBindOnQuestionTwo:function(){var e=this.$refs.ddlSecurityQuestionTwo.ej2Instances,t=e.index,s=e.previousItemData;if(null!==s){for(var i=this.$refs.ddlSecurityQuestionOne.getItems(),r=this.$refs.ddlSecurityQuestionThree.getItems(),n=0;n<=i.length;n+=1){var a=i[n],o=r[n];if(a.id===s.id){a.hidden=!1,o.hidden=!1;break}}this.securityAnswerTwo=null,this.confirmAnswerTwo=null}this.$refs.ddlSecurityQuestionOne.getItems()[t].hidden=!0,this.$refs.ddlSecurityQuestionThree.getItems()[t].hidden=!0},dataBindOnQuestionThree:function(){var e=this.$refs.ddlSecurityQuestionThree.ej2Instances,t=e.index,s=e.previousItemData;if(null!==s){for(var i=this.$refs.ddlSecurityQuestionTwo.getItems(),r=this.$refs.ddlSecurityQuestionOne.getItems(),n=0;n<=i.length;n+=1){var a=i[n],o=r[n];if(a.id===s.id){a.hidden=!1,o.hidden=!1;break}}this.securityAnswerThree=null,this.confirmAnswerThree=null}this.$refs.ddlSecurityQuestionOne.getItems()[t].hidden=!0,this.$refs.ddlSecurityQuestionTwo.getItems()[t].hidden=!0}}},f=m,v=s("2877"),g=Object(v["a"])(f,i,r,!1,null,null,null);t["a"]=g.exports},"06d2":function(e,t,s){},"07ba":function(e,t,s){},"083e":function(e,t,s){"use strict";s.r(t);var i,r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h2",[e._v("My Permits & Records")]),e.isAdmin?s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-content",staticStyle:{display:"flex",width:"50%"}},[s("ejs-autocomplete",{ref:"userProfileRef",attrs:{dataSource:e.permitContacts,placeholder:"Site Owner",fields:{value:"ownerFullInfo"},minLength:3,sortOrder:"Ascending",filterType:"Contains","float-label-type":"Always",change:e.onUserSelection,cssClass:"e-static-clear"}})],1)]):e._e(),s("my-records-grid",{attrs:{dataSource:e.openRecords,gridTitle:"Open Permits & Records",isAdmin:e.isAdmin,onQueryCell:e.onOpenRecordsQuery}}),s("my-records-grid",{attrs:{dataSource:e.historicalRecords,gridTitle:"Historical Permits & Records",isAdmin:e.isAdmin,onQueryCell:e.onHistoricalRecordsQuery}})],1)},n=[],a=s("c7eb"),o=s("1da1"),l=s("5530"),c=(s("d81d"),s("4de4"),s("d3b7"),s("caad"),s("2532"),s("d36a")),u=s("a026"),d=s("2f62"),h=s("64c3"),p=s("a39b"),m=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"},attrs:{id:"target"}},[s("div",{staticClass:"e-card-title"},[e._v(e._s(e.gridTitle))]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("ejs-grid",{ref:"grid",attrs:{created:e.created,dataSource:e.dataSource,allowPaging:!0,allowSorting:!0,pageSettings:e.pageSettings,allowResizing:!0,allowTextWrap:!0,toolbar:e.toolbarOptions,queryCellInfo:e.customiseCell,commandClick:e.commandClick}},[s("e-columns",[s("e-column",{attrs:{headerText:"Documents",width:"120",textAlign:"Left",commands:e.commands}}),s("e-column",{attrs:{field:"applicationType",headerText:"Application Type",width:"200",textAlign:"Left"}}),s("e-column",{attrs:{field:"permitNo",headerText:"Permit #/Year",textAlign:"Left",width:"150"}}),s("e-column",{attrs:{field:"issueDate",headerText:"Permit Issue Date",textAlign:"Left",type:"date",format:"MMM dd,yyyy"}}),s("e-column",{attrs:{field:"expiryDate",headerText:"Expiry Date",textAlign:"Left",type:"date",format:"MMM dd,yyyy"}}),s("e-column",{attrs:{field:"siteNo",headerText:"Site #",textAlign:"Left",width:"100"}}),s("e-column",{attrs:{field:"location",headerText:"Location",textAlign:"Left",width:"400"}})],1)],1)],1)])},f=[],v=(s("99af"),s("c041")),g=s("af93"),b=s("e09d"),y=s("e29d"),w=s("b0e8"),C=s("4f03"),x=s("d61a"),S=s("9318");u["default"].use(v["a"]);var O={name:"MyRecords",props:{dataSource:Array,gridTitle:String,isAdmin:{type:Boolean,default:!1},onQueryCell:{type:Function}},provide:{grid:[g["a"],b["a"],y["a"],w["a"],C["a"]]},data:function(){return{pageSettings:{pageSize:15},toolbarOptions:["Search"],commands:[{type:"View PDF",buttonOption:{cssClass:"e-flat viewpdfbtn",iconCss:"e-export-pdf e-icons"}},{type:"Update Certificate",buttonOption:{cssClass:"e-flat gotobtn",iconCss:"certificate-icon e-icons"}}],documentId:null}},computed:Object(l["a"])({},Object(d["c"])({loggedUser:"loggedUser"})),methods:{created:function(){var e=this;this.$refs.grid&&document.getElementById("".concat(this.$refs.grid.$el.id,"_searchbar")).addEventListener("keyup",(function(t){var s=document.getElementById("".concat(e.$refs.grid.$el.id,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(e.$refs.grid.$el.id,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){t.target.value="",document.getElementById("".concat(e.$refs.grid.$el.id,"_clearbutton")).remove()})),t.target.value&&2===s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):t.target.value&&""!==t.target.value||document.getElementById("".concat(e.$refs.grid.$el.id,"_clearbutton")).remove()}))},commandClick:function(e){var t=this;return Object(o["a"])(Object(a["a"])().mark((function s(){var r,n;return Object(a["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:r=S["b"].getAccessToken(),n=t.loggedUser.id,t.documentId=e.rowData.documentId,s.t0=e.commandColumn.type,s.next="View PDF"===s.t0?6:"Update Certificate"===s.t0?10:12;break;case 6:if(!t.documentId){s.next=9;break}return s.next=9,Object(h["c"])(n,r,t.documentId).then((function(e){window.location.href="".concat(e.config.baseURL).concat(e.config.url)}));case 9:return s.abrupt("break",12);case 10:return t.isAdmin&&t.documentId.includes("R")&&(i=x["b"].confirm({title:"Update Certificate",content:"Are you sure you want to Update selectd Certificate?",okButton:{text:"OK",click:t.updteCertificate},cancelButton:{text:"Cancel",click:t.hideDeleteDialog},showCloseIcon:!0,closeOnEscape:!0,animationSettings:{effect:"Zoom"}})),s.abrupt("break",12);case 12:case"end":return s.stop()}}),s)})))()},updteCertificate:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(h["d"])(e.documentId).then((function(){e.notify("success","Certification Updated."),e.hideDialog()})).catch((function(){e.notify("Error","Certification Error."),e.hideDialog()}));case 2:case"end":return t.stop()}}),t)})))()},hideDialog:function(){i.hide()},customiseCell:function(e){this.onQueryCell(e)},notify:function(e,t){this.$parent.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$parent.$refs.notifierRef.show()}}},j=O,I=(s("726a"),s("2877")),k=Object(I["a"])(j,m,f,!1,null,null,null),A=k.exports;u["default"].use(c["a"]);var E={components:{myRecordsGrid:A},name:"Records",data:function(){return{historicalRecords:[],openRecords:[],isAdmin:!1}},computed:Object(l["a"])({},Object(d["c"])({loggedUser:"loggedUser",selectedUser:"selectedUser",permitContacts:"permitContacts"})),watch:{loggedUser:function(e){this.checkUserRole(e.roles.map((function(e){return e.roleName})))}},methods:Object(l["a"])(Object(l["a"])({},Object(d["b"])({getInvoiceOwners:p["c"]})),{},{getMyRecords:function(e,t,s){var i=this;return Object(o["a"])(Object(a["a"])().mark((function r(){var n,o;return Object(a["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n=t||0,o=s||0,r.next=4,Object(h["b"])(e,n,o).then((function(e){var t=e.data;i.openRecords=t.filter((function(e){return new Date(e.expiryDate)>=new Date})),i.historicalRecords=t.filter((function(e){return new Date(e.expiryDate)<new Date}))}));case 4:case"end":return r.stop()}}),r)})))()},onOpenRecordsQuery:function(e){if(e.column.commands)try{var t;e.data.documentId||e.cell.querySelector(".viewpdfbtn").classList.add("hidebtn"),this.isAdmin&&null!==(t=e.data.documentId)&&void 0!==t&&t.includes("R")&&new Date(e.data.expiryDate).getYear()>=(new Date).getYear()||e.cell.querySelector(".gotobtn").classList.add("hidebtn")}catch(s){console.error(s)}},onHistoricalRecordsQuery:function(e){if(e.column.commands)try{var t;e.data.documentId||e.cell.querySelector(".viewpdfbtn").classList.add("hidebtn"),this.isAdmin&&null!==(t=e.data.documentId)&&void 0!==t&&t.includes("R")&&new Date(e.data.expiryDate).getYear()>=(new Date).getYear()||e.cell.querySelector(".gotobtn").classList.add("hidebtn")}catch(s){console.error(s)}},onUserSelection:function(e){var t=this;return Object(o["a"])(Object(a["a"])().mark((function s(){var i,r,n;return Object(a["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:e.e&&(e.value?(i=e.itemData.emailAddress,r=e.itemData.ownerID,n=e.itemData.ownerContactID,t.getMyRecords(i,r,n)):(t.openRecords=null,t.historicalRecords=null));case 1:case"end":return s.stop()}}),s)})))()},checkUserRole:function(e){this.isAdmin=e.includes("Admin")||e.includes("SuperAdmin"),this.isAdmin||this.getMyRecords(this.loggedUser.email,0,0)}}),created:function(){this.getInvoiceOwners(),this.loggedUser&&this.checkUserRole(this.loggedUser.roles.map((function(e){return e.roleName})))}},T=E,L=Object(I["a"])(T,r,n,!1,null,null,null);t["default"]=L.exports},"0a4a":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{margin:"50px"}},[s("div",{staticClass:"e-card",attrs:{tabindex:"0",id:"basic"}},[s("div",{staticClass:"e-card-title"},[e._v("FOIP Disclosure")]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content margin-color-verify-section"},[s("form",{staticClass:"login",on:{submit:function(t){return t.preventDefault(),e.submitFOIP.apply(null,arguments)}}},[s("div",[s("p",{staticStyle:{"text-align":"justify"}},[e._v("\n            "+e._s(this.foipStaticMessage)+"\n          ")])]),s("div",{staticClass:"align-right"},[s("ejs-checkbox",{attrs:{label:"I agree",checked:e.isIAgree},model:{value:e.isIAgree,callback:function(t){e.isIAgree=t},expression:"isIAgree"}}),s("span",{staticStyle:{color:"red",display:"block","margin-bottom":"2%"}},[e._v("\n            "+e._s(e.loginErorrMessage)+"\n          ")])],1),s("div",{staticClass:"align-right"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-danger margin-button"},nativeOn:{click:function(t){return e.onCancelClick.apply(null,arguments)}}},[e._v("\n            Cancel\n          ")]),s("ejs-button",{attrs:{type:"submit",cssClass:"e-info margin-button"}},[e._v("Continue")])],1)]),s("div",{ref:"spinnerEle",attrs:{id:"spinner"}})])])])},r=[],n=s("c7eb"),a=s("1da1"),o=s("12b8"),l=s("b37f"),c={name:"FoipStatement",props:{},mounted:function(){Object(o["a"])({target:this.$refs.spinnerEle}),Object(o["c"])(this.$refs.spinnerEle),this.getFOIPStaticMessage()},data:function(){return{isIAgree:!1,loginErorrMessage:null,foipStaticMessage:null}},methods:{getFOIPStaticMessage:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s="foip",t.next=4,e.$store.dispatch(l["z"],{messageType:s});case 4:e.foipStaticMessage=e.$store.getters.staticMessage,e.$refs.spinnerEle.style.display="none",t.next=12;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$parent.$parent.notificationToasts.push({title:"Error!",content:"Oops, Something went wrong. We are working on getting this fixed as soon as we can. You may be able to try again shortly. If you continue to experience this issue, you can contact ASCA Tanks at ascatanks@safetycodes.ab.ca or by calling 1-888-413-0099",cssClass:"e-toast-danger",timeOut:5e3}),e.$parent.$parent.notificationToasts.length>0&&e.$parent.$parent.$refs.notifierRef.show();case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))()},submitFOIP:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.isIAgree?e.$emit("FOIPVisible",e.isIAgree):(e.loginErorrMessage='Please check "I Agree" box if you want to proceed.',e.$parent.$parent.notificationToasts.push({title:"Error!",content:'Please check "I Agree" box if you want to proceed.',cssClass:"e-toast-danger",timeOut:5e3})),e.$parent.$parent.notificationToasts.length>0&&e.$parent.$parent.$refs.notifierRef.show();case 2:case"end":return t.stop()}}),t)})))()},onCancelClick:function(){this.$router.push("/")}}},u=c,d=(s("bec5"),s("2877")),h=Object(d["a"])(u,i,r,!1,null,null,null);t["a"]=h.exports},1099:function(e,t,s){},"10b2":function(e,t,s){},1231:function(e,t,s){},"1dbb":function(e,t,s){},"1e80":function(e,t,s){},"1fb6":function(e,t,s){"use strict";s("07ba")},"1fea":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",[s("div",{staticClass:"e-card",attrs:{tabindex:"0"}},[s("div",{staticClass:"e-card-title"},[e._v("Change Password")]),s("div",{staticClass:"e-card-content margin-color-verify-section"},[e._m(0),s("div",{staticClass:"e-card-separator"}),s("span",{staticStyle:{color:"red",display:"block","margin-bottom":"2%"}},[e._v("\n          "+e._s(e.notifyErrorMessage))]),s("span",{staticStyle:{color:"green",display:"block","margin-bottom":"2%"}},[e._v("\n          "+e._s(e.notifySuccessMessage))]),s("web-login-info",{ref:"refwebLoginInfo",attrs:{userProfileId:e.userId,userProfilesData:e.currentUser}}),s("div",{staticClass:"align-center-bottom"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.btnComplete.apply(null,arguments)}}},[e._v("Submit")]),s("ejs-button",{attrs:{type:"button",cssClass:"e-danger margin-button"},nativeOn:{click:function(t){return e.onCancelButtonClick.apply(null,arguments)}}},[e._v("Cancel")])],1)],1)])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Password update Information")])])}],n=s("c7eb"),a=s("1da1"),o=s("5530"),l=s("2f62"),c=s("7722"),u=s("dff1"),d={name:"UpdatePassword",components:{WebLoginInfo:c["a"]},computed:Object(o["a"])(Object(o["a"])({},Object(l["c"])({loggedUser:"loggedUser",currentUser:"userById"})),{},{userId:function(){var e;return null===(e=this.loggedUser)||void 0===e?void 0:e.id}}),watch:{userId:function(e){this.$store.dispatch(u["e"],{userId:e})}},data:function(){return{notifyErrorMessage:"",notifySuccessMessage:"",response:null}},created:function(){this.userId&&this.$store.dispatch(u["e"],{userId:this.userId})},methods:{onCancelButtonClick:function(){this.$router.push("/")},btnComplete:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.$refs.refwebLoginInfo,!(s.isOldPasswordValid&&s.isPasswordValid&&s.isConfirmPassword)){t.next=14;break}return t.prev=2,t.next=5,s.changePassword().then((function(){e.response=e.$store.getters.chnagePasswordResponse,"SUCCESS"===e.response?(e.notifyErrorMessage="",e.notifySuccessMessage="Your password has successfully changed.",e.$parent.notificationToasts.push({title:"Success!",content:e.notifySuccessMessage,cssClass:"e-toast-success",timeOut:5e3}),e.$router.push("/email-sent")):(e.notifySuccessMessage="",e.notifyErrorMessage="".concat(e.response),e.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3}))}));case 5:t.next=12;break;case 7:t.prev=7,t.t0=t["catch"](2),e.notifySuccessMessage="",e.notifyErrorMessage="Please enter value in required fields.",e.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3});case 12:t.next=21;break;case 14:e.notifySuccessMessage="",e.notifyErrorMessage="",s.isOldPasswordValid||(e.notifyErrorMessage="Existing Password is required field."),s.isPasswordValid||(e.notifyErrorMessage+=" New password is not valid."),s.isConfirmPassword||(e.notifyErrorMessage+=" Please confirm password."),s.validatePassword(),e.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3});case 21:e.$parent.notificationToasts.length>0&&e.$parent.$refs.notifierRef.show();case 22:case"end":return t.stop()}}),t,null,[[2,7]])})))()}}},h=d,p=(s("f6dd"),s("2877")),m=Object(p["a"])(h,i,r,!1,null,null,null);t["default"]=m.exports},"243a":function(e,t,s){},"27ce":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"profile-page",attrs:{id:"app"}},[s("foip-statement",{directives:[{name:"show",rawName:"v-show",value:!e.isFOIPChecked&&e.isValid,expression:"!isFOIPChecked && isValid"}],attrs:{isFOIPChecked:e.isFOIPChecked},on:{FOIPVisible:function(t){return e.isFOIP(t)}}}),s("div",{directives:[{name:"show",rawName:"v-show",value:e.isFOIPChecked,expression:"isFOIPChecked"}]},[s("div",{staticStyle:{margin:"10px"}},[s("div",{staticClass:"e-card",attrs:{tabindex:"0",id:"basic"}},[s("div",{staticClass:"e-card-title"},[e._v("New User Account Creation")]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("user-address-info",{ref:"refUserProfileInfo",attrs:{userProfileId:e.userId,userProfilesData:e.userData}}),s("company-info",{ref:"refCompanyInfo",attrs:{"user-profile-id":e.userId,"user-profiles-data":e.userData}}),s("contact-info",{ref:"refContactInfo",attrs:{"user-profile-id":e.userId,"user-profiles-data":e.userData}}),s("security-questions",{ref:"refSecurityQuestions",attrs:{"user-profile-id":e.userId,"user-profiles-data":e.userData}}),e._m(0),s("web-login-info",{ref:"refwebLoginInfo",attrs:{"user-profile-id":e.userId,"user-profiles-data":e.userData,enableForcePasswordChange:!1}}),e._v("\n           \n          "),s("div",{staticClass:"align-center-bottom"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.btnComplete.apply(null,arguments)}}},[e._v("Complete")]),s("ejs-button",{attrs:{cssClass:"e-danger margin-button"},nativeOn:{click:function(t){return e.onCancelButtonClick.apply(null,arguments)}}},[e._v("Cancel")])],1)],1)])])])],1)},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"wrap_address"},[s("h4",{staticClass:"title-color"},[e._v("Web Login Information")])])}],n=s("a026"),a=s("9a0f"),o=s("21cb"),l=s("0a4a"),c=s("a4af"),u=s("f56d"),d=s("561f"),h=s("05f5"),p=s("7722");n["default"].use(a["a"]),n["default"].use(o["a"]);var m={name:"NewUser",components:{FoipStatement:l["a"],ContactInfo:u["a"],CompanyInfo:d["a"],SecurityQuestions:h["a"],UserAddressInfo:c["a"],WebLoginInfo:p["a"]},mounted:function(){},computed:{isValid:function(){return!!this.$store.getters.confirmedUser},userData:function(){return this.$store.getters.confirmedUser},userId:function(){return this.$store.getters.confirmedUser?this.$store.getters.confirmedUser.userId:null}},data:function(){return{isFOIPChecked:!1}},methods:{isFOIP:function(e){this.isFOIPChecked=e},onCancelButtonClick:function(){this.$router.push("/")},btnComplete:function(){var e=this.$refs.refUserProfileInfo,t=this.$refs.refContactInfo,s=this.$refs.refSecurityQuestions,i=this.$refs.refCompanyInfo,r=this.$refs.refwebLoginInfo;e.isFirstNameValid&&e.isLastNameValid&&e.isAddressValid&&e.isCityNameValid&&e.isPostalCodeValid&&t.contactDetails[0].isPhoneNumberValid&&s.isSecurityAnswerOne&&s.isSecurityAnswerTwo&&r.isPasswordValid&&r.isConfirmPassword&&s.isSecurityAnswerThree&&null!==s.ddlSecurityQuestionOne&&s.isConfirmAnswerOne&&s.isConfirmAnswerTwo&&s.isConfirmAnswerThree&&null!==s.ddlSecurityQuestionTwo&&null!==s.ddlSecurityQuestionThree?(r.register(),e.userProfile(t.contactDetails[0].phoneNumber),t.userContactInfo(),s.securityQuestions(),i.companyData(),this.$parent.notificationToasts.push({title:"Success!",content:"You have registered successfully. Please login using username and password.",cssClass:"e-toast-success",timeOut:5e3}),this.$router.push("/login")):(e.validateUserInfo(),t.validateContact(),s.validateSecurityQuestions(),r.validatePassword(),this.$parent.notificationToasts.push({title:"Error!",content:"Please enter value in required fields.",cssClass:"e-toast-danger",timeOut:5e3})),this.$parent.notificationToasts.length>0&&this.$parent.$refs.notifierRef.show()}}},f=m,v=(s("6cc3"),s("2877")),g=Object(v["a"])(f,i,r,!1,null,null,null);t["default"]=g.exports},2821:function(e,t,s){"use strict";s.d(t,"a",(function(){return b}));var i=s("7de8"),r=s("db21"),n=s("39bc"),a=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),o=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},l=["isLazyUpdate","checked","cssClass","disabled","enableHtmlSanitizer","enablePersistence","enableRtl","htmlAttributes","label","labelPosition","locale","name","value","change","created"],c=["value"],u=Object(r["d"])({props:l}),d=(u[0],u[1]),h=Object.keys(d);h.push("modelchanged");for(var p=0,m=c;p<m.length;p++){var f=m[p];h.push("update:"+f)}var v=!r["e"],g=function(e){function t(){var t=e.call(this,arguments)||this;return t.propKeys=l,t.models=c,t.hasChildDirective=!1,t.hasInjectedModules=!1,t.tagMapper={},t.tagNameMapper={},t.isVue3=!v,t.ej2Instances=new n["a"]({}),t.ej2Instances._trigger=t.ej2Instances.trigger,t.ej2Instances.trigger=t.trigger,t.bindProperties(),t.ej2Instances._setProperties=t.ej2Instances.setProperties,t.ej2Instances.setProperties=t.setProperties,t.ej2Instances.clearTemplate=t.clearTemplate,t}return a(t,e),t.prototype.clearTemplate=function(e){if(e||(e=Object.keys(this.templateCollection||{})),e.length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var r=s[t],n=this.templateCollection[r];if(n&&n.length){for(var a=0,o=n;a<o.length;a++){var l=o[a],c=Object(i["S"])("__vue__.$destroy",l);c&&l.__vue__.$destroy(),l.innerHTML&&(l.innerHTML="")}delete this.templateCollection[r]}}},t.prototype.setProperties=function(e,t){var s=this;this.isVue3&&(this.models=this.models?this.models:this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(e,t),e&&this.models&&this.models.length&&Object.keys(e).map((function(t){s.models.map((function(i){t!==i||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,e[t]):(s.$emit("update:"+t,e[t]),s.$emit("modelchanged",e[t])))}))}))},t.prototype.trigger=function(e,t,s){if(v||(this.models=this.models?this.models:this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length){if("actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length){r=this.models.toString().match(/currentView|selectedDate/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(v?(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}}else{var r=this.models.toString().match(/checked|value/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(v?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,s)},t.prototype.render=function(e){var t=r["e"]||e,s=null;return Object(i["U"])(this.$slots.default)||(s=r["e"]?this.$slots.default():this.$slots.default),t("input",s)},t.prototype.click=function(){return this.ej2Instances.click()},t.prototype.focusIn=function(){return this.ej2Instances.focusIn()},t.prototype.getSelectedValue=function(){return this.ej2Instances.getSelectedValue()},t=o([Object(r["b"])({props:l,model:{event:"modelchanged"}},v)],t),t}(r["a"]),b={name:"ejs-radiobutton",install:function(e){e.component(b.name,g)}}},"2b53":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{margin:"7%"}},[e.isRightUser?s("scc-user-details",{ref:"refUserDetails",attrs:{userProfileId:e.userId,"is-user-profile":!0}}):s("div",[e._v("\n    Please contact SCC Admin, to confirm you permissions. The user Id does not\n    match.\n  ")])],1)},r=[],n=s("5530"),a=s("a026"),o=s("9a0f"),l=s("21cb"),c=s("2f62"),u=s("58d5");a["default"].use(o["a"]),a["default"].use(l["a"]);var d={name:"SccUserProfile",components:{SccUserDetails:u["a"]},computed:Object(n["a"])(Object(n["a"])({},Object(c["c"])({loggedUser:"loggedUser"})),{},{userId:function(){return this.$route.params.id},isRightUser:function(){var e;return this.userId===(null===(e=this.loggedUser)||void 0===e?void 0:e.id)}})},h=d,p=s("2877"),m=Object(p["a"])(h,i,r,!1,null,null,null);t["default"]=m.exports},3700:function(e,t,s){},"39bc":function(e,t,s){"use strict";s.d(t,"a",(function(){return h}));var i=s("7de8"),r=s("9b89"),n=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),a=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},o="e-label",l="e-ripple-container",c="e-rtl",u="e-radio-wrapper",d=["title","class","style","disabled","readonly","name","value"],h=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i}var s;return n(t,e),s=t,t.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t=this.element.getAttribute("value");t=this.isVue&&t?this.element.value:this.value,this.trigger("change",{value:t,event:e}),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},t.prototype.updateChange=function(){for(var e,t,r=this.getRadioGroup(),n=0;n<r.length;n++)e=r[n],e!==this.element&&(t=Object(i["N"])(e,s),t.checked=!1,"EJS-RADIOBUTTON"===this.tagName&&(t.angularValue=this.value))},t.prototype.destroy=function(){var t=this,s=this.wrapper;e.prototype.destroy.call(this),s&&(this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(s.parentNode&&s.parentNode.insertBefore(this.element,s),Object(i["F"])(s),this.element.checked=!1,["name","value","disabled"].forEach((function(e){t.element.removeAttribute(e)}))):(["role","aria-checked","class"].forEach((function(e){s.removeAttribute(e)})),s.innerHTML=""))},t.prototype.focusHandler=function(){this.isFocused=!0},t.prototype.focusOutHandler=function(){var e=this.getLabel();e&&e.classList.remove("e-focus")},t.prototype.getModuleName=function(){return"radio"},t.prototype.getSelectedValue=function(){for(var e,t=this.getRadioGroup(),s=0,i=t.length;s<i;s++)if(e=t[s],e.checked)return e.value;return""},t.prototype.getRadioGroup=function(){return document.querySelectorAll('input.e-radio[name="'+this.element.getAttribute("name")+'"]')},t.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},t.prototype.getWrapper=function(){return this.element?this.element.parentElement:null},t.prototype.getLabel=function(){return this.element?this.element.nextElementSibling:null},t.prototype.initialize=function(){Object(i["U"])(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.updateHtmlAttribute(),this.name&&this.element.setAttribute("name",this.name);var e=this.element.getAttribute("value");this.isVue&&e&&e===this.value&&(this.checked=!0),(this.isVue?this.value&&!e:this.value)&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},t.prototype.initWrapper=function(){var e,t=this.element.parentElement;t.classList.contains(u)||(t=this.createElement("div",{className:u}),this.element.parentNode.insertBefore(t,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}});t.appendChild(this.element),t.appendChild(s),i["W"]&&(e=this.createElement("span",{className:l}),s.appendChild(e),Object(i["hb"])(e,{duration:400,isCenterRipple:!0})),t.classList.add("e-wrapper"),this.enableRtl&&s.classList.add(c),this.cssClass&&Object(i["u"])([t],this.cssClass.split(" ")),this.label&&this.setText(this.label)},t.prototype.keyUpHandler=function(){this.isFocused&&this.getLabel().classList.add("e-focus")},t.prototype.labelRippleHandler=function(e){var t=this.getLabel().getElementsByClassName(l)[0];Object(r["e"])(e,t)},t.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&Object(i["w"])(this.element,{checked:"true"})},t.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),r=this.getLabel(),n=0,a=Object.keys(e);n<a.length;n++){var o=a[n];switch(o){case"checked":e.checked&&this.updateChange(),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":t.cssClass&&Object(i["fb"])([s],t.cssClass.split(" ")),e.cssClass&&Object(i["u"])([s],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?r.classList.add(c):r.classList.remove(c);break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?r.classList.add("e-right"):r.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":if(!Object(i["U"])(this.htmlAttributes)&&this.htmlAttributes.value)break;this.element.setAttribute("value",e.value);break;case"htmlAttributes":this.updateHtmlAttribute();break}}},t.prototype.preRender=function(){var e=this.element;if(this.formElement=Object(i["A"])(this.element,"form"),this.tagName=this.element.tagName,e=Object(r["g"])(this.createElement,"EJS-RADIOBUTTON","radio",e,u,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=Object(i["R"])("e-"+this.getModuleName())),"EJS-RADIOBUTTON"===this.tagName){var t=this.element.getAttribute("formcontrolname");t&&(this.setProperties({name:t},!0),this.element.setAttribute("name",t))}},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete(),this.wrapper=this.getWrapper()},t.prototype.setDisabled=function(){this.element.disabled=!0},t.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(o)[0];s?s.textContent=e:(e=this.enableHtmlSanitizer?i["s"].sanitize(e):e,s=this.createElement("span",{className:o,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},t.prototype.updateHtmlAttribute=function(){if(!Object(i["U"])(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var s=t[e];if(d.indexOf(s)>-1){var r=this.element.parentElement;"class"===s?Object(i["u"])([r],this.htmlAttributes[s].split(" ")):"title"===s||"style"===s?r.setAttribute(s,this.htmlAttributes[s]):this.element.setAttribute(s,this.htmlAttributes[s])}}},t.prototype.unWireEvents=function(){var e=this.wrapper;i["l"].remove(this.element,"change",this.changeHandler),i["l"].remove(this.element,"focus",this.focusHandler),i["l"].remove(this.element,"focusout",this.focusOutHandler),i["l"].remove(this.element,"keyup",this.keyUpHandler);var t=e.getElementsByTagName("label")[0];t&&(i["l"].remove(t,"mousedown",this.labelRippleHandler),i["l"].remove(t,"mouseup",this.labelRippleHandler)),this.formElement&&i["l"].remove(this.formElement,"reset",this.formResetHandler)},t.prototype.wireEvents=function(){var e=this.getLabel();i["l"].add(this.element,"change",this.changeHandler,this),i["l"].add(this.element,"keyup",this.keyUpHandler,this),i["l"].add(this.element,"focus",this.focusHandler,this),i["l"].add(this.element,"focusout",this.focusOutHandler,this);var t=e.getElementsByClassName(o)[0];t&&(i["l"].add(t,"mousedown",this.labelRippleHandler,this),i["l"].add(t,"mouseup",this.labelRippleHandler,this)),this.formElement&&i["l"].add(this.formElement,"reset",this.formResetHandler,this)},t.prototype.click=function(){this.element.click()},t.prototype.focusIn=function(){this.element.focus()},a([Object(i["k"])()],t.prototype,"change",void 0),a([Object(i["k"])()],t.prototype,"created",void 0),a([Object(i["r"])(!1)],t.prototype,"checked",void 0),a([Object(i["r"])("")],t.prototype,"cssClass",void 0),a([Object(i["r"])(!1)],t.prototype,"disabled",void 0),a([Object(i["r"])("")],t.prototype,"label",void 0),a([Object(i["r"])("After")],t.prototype,"labelPosition",void 0),a([Object(i["r"])("")],t.prototype,"name",void 0),a([Object(i["r"])("")],t.prototype,"value",void 0),a([Object(i["r"])(!1)],t.prototype,"enableHtmlSanitizer",void 0),a([Object(i["r"])({})],t.prototype,"htmlAttributes",void 0),t=s=a([i["p"]],t),t}(i["h"])},"3dd2":function(e,t,s){"use strict";s("9b00")},"3ea6":function(e,t,s){"use strict";s("ab22")},"3f02":function(e,t,s){"use strict";s("3700")},"52f1":function(e,t,s){},5375:function(e,t,s){"use strict";s("a721")},"561f":function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"wrap_address"},[e._m(0),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"1310px"}},[s("ejs-autocomplete",{ref:"searchCompanyName",attrs:{id:"searchCompanyName",dataSource:e.companies,placeholder:"Search Company",fields:e.companyFields,sortOrder:"Ascending",filterType:"Contains","float-label-type":"Always",width:"100%"},on:{change:e.onCompanySelection},model:{value:e.companyDetailsInfo,callback:function(t){e.companyDetailsInfo=t},expression:"companyDetailsInfo"}})],1)]),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{name:"companyName","float-label-type":"Always",placeholder:"Company Name"},model:{value:e.data.legalName,callback:function(t){e.$set(e.data,"legalName",t)},expression:"data.legalName"}})],1)]),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-autocomplete",{ref:"comAdressAutocomplete",attrs:{name:"companyAddress",dataSource:e.comAdressAutocompleteData,placeholder:"Company Address",fields:e.comAdressAutocompleteFields,minLength:e.comAdressAutocompleteMinLength,filtering:e.onComAddressAutocompleteFiltering,change:e.onComAddressSelection,"float-label-type":"Always"},model:{value:e.data.address,callback:function(t){e.$set(e.data,"address",t)},expression:"data.address"}})],1),s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{name:"companyAddressLine2","float-label-type":"Always",multiline:!1,placeholder:"Company Address Line2"},model:{value:e.data.addressLine2,callback:function(t){e.$set(e.data,"addressLine2",t)},expression:"data.addressLine2"}})],1)]),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{name:"companyCityName","float-label-type":"Always",placeholder:"City"},model:{value:e.data.cityName,callback:function(t){e.$set(e.data,"cityName",t)},expression:"data.cityName"}})],1),s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-dropdownlist",{ref:"companyProvince",attrs:{id:"companyProvince",placeholder:"Province/State",sortOrder:"Ascending",allowFiltering:e.allowFiltering,filtering:e.filtering,dataSource:e.province,"float-label-type":"Always",fields:e.companyProvinceFields},model:{value:e.companyProvince,callback:function(t){e.companyProvince=t},expression:"companyProvince"}})],1)]),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{name:"default","float-label-type":"Always",placeholder:"Postal/Zip Code",maxlength:10},model:{value:e.data.postalCode,callback:function(t){e.$set(e.data,"postalCode",t)},expression:"data.postalCode"}})],1),s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-dropdownlist",{ref:"companyCountry",attrs:{"float-label-type":"Always",id:"companyCountry",dataSource:e.companyCountries,fields:e.companyCountriesFields,placeholder:"Country"},model:{value:e.data.countryName,callback:function(t){e.$set(e.data,"countryName",t)},expression:"data.countryName"}})],1)])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Company Information")])])}],n=s("c7eb"),a=s("1da1"),o=(s("99af"),s("d81d"),s("ac1f"),s("5319"),s("d3b7"),s("a026")),l=s("eda0"),c=s("d36a"),u=s("21cb"),d=s("2d85"),h=s("b37f");o["default"].use(l["a"]),o["default"].use(u["a"]),o["default"].use(c["a"]);var p={name:"CompanyInfo",props:{userProfileId:String,userProfilesData:Object},components:{},mounted:function(){this.getCountries(),this.getCompanies(),this.getComAddresses(),this.companyCountries=this.$store.getters.countries,this.province=this.$store.getters.provinces,null===this.province&&this.getProvinces(),null!==this.$store.getters.loggedUser&&this.getUserComapyDatabyId()},data:function(){return{companyCountries:[],companyCountriesFields:{text:"countryName",value:"countryName"},province:[],companyProvinceFields:{text:"provinceName",value:"provinceName",groupBy:"countryName"},companies:[],companyFields:{value:"text"},allowFiltering:!0,companyProvince:"",companyId:null,data:{legalName:"",phoneNumber:null,faxNumber:null,address:"",addressLine2:"",cityName:"",postalCode:"",provinceName:"",countryName:"",username:null,source:null,sourceCompanyId:null,userId:null},companyDetailsInfo:null,comAdressAutocompleteData:[],comAdressAutocompleteMinLength:3,comAdressAutocompleteFields:{value:"Address.Address"},comMelissaAddress1:"",comMelissaLocality:"Edmonton",comMelissaAdministrativearea:"Alberta",comMelissaCountry:"CA",comMelissaCountryName:"Canada",userProfileData:null,isCompanyValid:!0}},methods:{getCountries:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(h["m"]);case 3:e.companyCountries=e.$store.getters.countries,t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},getProvinces:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(h["p"]);case 3:e.province=e.$store.getters.provinces,t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},getCompanies:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(h["l"]);case 3:e.companies=e.$store.getters.companies,s=[].concat(e.companies.map((function(e){return{id:e.companyId,text:e.text,companyId:e.companyId,legalName:e.legalName,phoneNumber:e.phoneNumber,faxNumber:e.faxNumber,address:e.address,addressLine2:e.addressLine2,cityName:e.cityName,postalCode:e.postalCode,provinceName:e.provinceName,countryName:e.countryName,source:e.source,sourceCompanyId:e.sourceCompanyId}}))),e.companies=s,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},getUserComapyDatabyId:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userProfileId,t.next=4,e.$store.dispatch(h["r"],{userId:s});case 4:null!==e.$store.getters.userCompanyDatabyID&&(e.data=e.$store.getters.userCompanyDatabyID,e.companyProvince=e.data.provinceName,e.companyDetailsInfo=e.data.text),t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},companyNameFiltering:function(e){var t=this.companies,s=new d["b"];s=""!==e.text?s.where("text","startswith",e.text,!0):s,e.updateData(t,s)},filtering:function(e){var t=this.province,s=new d["b"];s=""!==e.text?s.where("provinceName","startswith",e.text,!0):s,e.updateData(t,s)},onCompanySelection:function(e){if(e.e){var t=e.itemData;null!==t?(this.data.address=t.address?t.address:"",this.data.addressLine2=t.addressLine2?t.addressLine2:"",this.data.cityName=t.cityName||"",this.companyProvince=t.provinceName||0,this.data.countryName=t.countryName||0,this.data.source=t.source||0,this.data.sourceCompanyId=t.sourceCompanyId||0,this.data.phoneNumber=t.phoneNumber||0,this.data.faxNumber=t.faxNumber||0,this.data.postalCode=t.postalCode||"",this.data.legalName=t.legalName||t.text||""):(this.data.cityName="",this.data.address="",this.data.addressLine2="",this.data.legalName="",this.data.postalCode="")}},companyData:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a,o,l,c,u,d,p,m,f,v,g;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,null===e.data.address||""===e.data.address||null!==e.data.legalName&&""!==e.data.legalName||(e.isCompanyValid=!1),!e.isCompanyValid){t.next=12;break}return e.data.provinceName=e.$refs.companyProvince.ej2Instances.text,e.data.countryName=e.$refs.companyCountry.ej2Instances.text,e.data.username=e.$store.getters.loggedUser?e.$store.getters.loggedUser.email:e.userProfilesData.userName,e.data.userId=e.userProfileId,s=e.data,i=s.legalName,r=s.phoneNumber,a=s.faxNumber,o=s.address,l=s.addressLine2,c=s.cityName,u=s.postalCode,d=s.provinceName,p=s.countryName,m=s.username,f=s.source,v=s.sourceCompanyId,g=s.userId,t.next=10,e.$store.dispatch(h["c"],{legalName:i,phoneNumber:r,faxNumber:a,address:o,addressLine2:l,cityName:c,postalCode:u,provinceName:d,countryName:p,username:m,source:f,sourceCompanyId:v,userId:g});case 10:t.next=13;break;case 12:e.$parent.$parent.notificationToasts.push({title:"Error!",content:"If company address existing, then Company Name is required.",cssClass:"e-toast-danger",timeOut:5e3});case 13:t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](0),console.error(t.t0);case 18:case"end":return t.stop()}}),t,null,[[0,15]])})))()},getComAddresses:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.comMelissaAddress1,i=e.comMelissaCountry,t.next=5,e.$store.dispatch(h["n"],{melissaAddress1:s,melissaCountry:i});case 5:e.comAdressAutocompleteData=e.$store.getters.melissaAddresses,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},onComAddressAutocompleteFiltering:function(e){var t=this;if(e.preventDefaultAction=!0,e.text.length>=this.$refs.comAdressAutocomplete.ej2Instances.minLength){this.$refs.comAdressAutocomplete.ej2Instances.showSpinner(),this.comMelissaAddress1=e.text,null!==this.$refs.companyCountry.ej2Instances.value&&""!==this.$refs.companyCountry.ej2Instances.value&&(this.comMelissaCountry=this.$refs.companyCountry.ej2Instances.value),this.comMelissaLocality=null,this.comMelissaAdministrativearea=null;var s=this.comMelissaAddress1,i=this.comMelissaCountry;this.$store.dispatch(h["n"],{melissaAddress1:s,melissaCountry:i}).then((function(){e.updateData(t.$store.getters.melissaAddresses)}))}},onComAddressSelection:function(e){var t=this,s=e.itemData;if(s.Address){this.data.address=s.Address.Address||"",this.data.cityName=s.Address.SubAdministrativeArea||s.Address.Locality||"",this.data.provinceName=s.Address.AdministrativeArea||"","CA"===s.Address.ISO3166_2?this.data.countryName=this.comMelissaCountryName:"US"===s.Address.ISO3166_2?this.data.countryName="United States":this.data.countryName=this.comMelissaCountryName,this.data.postalCode=s.Address.PostalCode||"";var i=(this.data.cityName+this.data.provinceName+this.data.postalCode).replace(/ /g,""),r=s.Address.Address2.replace(/ /g,"");r.toLowerCase()===i.toLowerCase()?this.data.addressLine2="":this.data.addressLine2=s.Address.Address2||"",""!==this.data.provinceName&&this.province.every((function(e){return e.provinceCode!==t.data.provinceName||(t.companyProvince=e.provinceName,!0)}))}else this.data.address=s["Address.Address"]}}},m=p,f=s("2877"),v=Object(f["a"])(m,i,r,!1,null,null,null);t["a"]=v.exports},"58d5":function(e,t,s){"use strict";var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",[i("div",{staticClass:"e-card",attrs:{tabindex:"0",id:"basic"}},[i("div",{staticClass:"e-card-title"},[t._v("SCC User Account")]),i("div",{staticClass:"e-card-content"},[t._m(0),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.firstName},on:{validate:function(t){return e.isFirstNameValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"First Name"},model:{value:t.data.firstName,callback:function(e){t.$set(t.data,"firstName",e)},expression:"data.firstName"}})],1)],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.lastName},on:{validate:function(t){return e.isLastNameValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Last Name"},model:{value:t.data.lastName,callback:function(e){t.$set(t.data,"lastName",e)},expression:"data.lastName"}})],1)],1)]),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.isLoggedUser,expression:"!isLoggedUser"}]},[t._m(1),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{password:t.password},on:{validate:function(t){return e.isPasswordValid=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"New Password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:this.isPasswordValid,expression:"this.isPasswordValid"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v(" Password is\n              strong")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{value:t.confirmPassword},on:{validate:function(t){return e.isConfirmPassword=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"Confirm Password"},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPassword,expression:"showConfirmPassword"}],staticClass:"e-error"},[i("span",{staticClass:"e-icons close"}),t._v(" Confirm password does not\n              match with Password")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPasswordMatch,expression:"showConfirmPasswordMatch"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v(" Password matched")])],1)]),i("div",{staticClass:"form-row",staticStyle:{padding:"0px 0px 15px 0px",margin:"-5px"}},[i("ejs-checkbox",{attrs:{label:"Force User to Reset Password",labelPosition:"Before"},model:{value:t.isForcePasswordChange,callback:function(e){t.isForcePasswordChange=e},expression:"isForcePasswordChange"}})],1),i("div",{staticClass:"form-row"},[i("span",{staticClass:"e-error"},[t._v("\n            "+t._s(t.passwordValidationMessage)+"\n          ")])])]),i("div",{directives:[{name:"show",rawName:"v-show",value:!t.isUserProfile,expression:"!isUserProfile"}]},[t._m(2),i("div",{staticClass:"e-card-separator"}),i("ul",{staticStyle:{"list-style-type":"none","padding-inline-start":"0px"}},t._l(t.roles,(function(e){return i("li",{key:e.roleId},[i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"150px"}},[i("label",[t._v(t._s(e.roleName)+":")])]),i("div",{staticStyle:{"font-size":"8px","font-style":"italic"}},[t._v("Inactive")]),i("div",{staticClass:"form-row-input",staticStyle:{width:"50px"}},[i("ejs-switch",{attrs:{id:e.roleId,checked:e.isRollChecked},model:{value:e.isRollChecked,callback:function(s){t.$set(e,"isRollChecked",s)},expression:"role.isRollChecked"}})],1),i("span",{staticStyle:{"font-size":"8px","font-style":"italic"}},[t._v("Active")])])])})),0),i("span",{directives:[{name:"show",rawName:"v-show",value:t.errorSelecteRole,expression:"errorSelecteRole"}],staticClass:"e-success"},[t._v("Please, select at least one role.")]),t._m(3),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"form-row"},[t._m(4),i("div",{staticStyle:{"font-size":"8px","font-style":"italic"}},[t._v("Inactive")]),i("div",{staticClass:"form-row-input",staticStyle:{width:"50px"}},[i("ejs-switch",{ref:"refStatus",attrs:{id:"status",checked:t.isActive},model:{value:t.isActive,callback:function(e){t.isActive=e},expression:"isActive"}})],1),i("span",{staticStyle:{"font-size":"8px","font-style":"italic"}},[t._v("Active")])]),i("div",{staticClass:"form-row"},[t._m(5),i("div",{staticClass:"form-row-input",staticStyle:{width:"250px"}},[i("ejs-textbox",{ref:"refEmail",attrs:{id:"email",readonly:"true"},model:{value:t.data.email,callback:function(e){t.$set(t.data,"email",e)},expression:"data.email"}})],1)])]),i("div",{staticClass:"align-center-bottom"},[i("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(e){return t.btnSaveUserInfo.apply(null,arguments)}}},[t._v("Save Contact Information")]),i("ejs-button",{directives:[{name:"show",rawName:"v-show",value:t.isLogedUserAdmin,expression:"isLogedUserAdmin"}],attrs:{cssClass:"e-danger margin-button"},nativeOn:{click:function(e){return t.onCancelButtonClick.apply(null,arguments)}}},[t._v("Cancel and Back to List")])],1)])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Personal Information")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Web Login Information")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Permissions")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Status")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row-input",staticStyle:{width:"150px"}},[s("label",[e._v("Authorized:")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row-input",staticStyle:{width:"150px"}},[s("label",[e._v("Email:")])])}],n=s("5530"),a=s("c7eb"),o=s("1da1"),l=(s("c740"),s("99af"),s("a026")),c=s("9a0f"),u=s("79ed"),d=s("b544"),h=s("21cb"),p=s("4023"),m=s("940e"),f=s("aa96"),v=s("b37f"),g=s("dff1");l["default"].use(c["a"]),l["default"].use(u["a"]),l["default"].use(d["a"]),l["default"].use(h["a"]);var b={name:"SccUserDetails",components:{SccInputValidator:m["a"],inputPassword:f["a"]},props:{userProfileId:String,isUserProfile:Boolean},mounted:function(){var e=this;this.getRoles(),""!==this.userProfileId&&this.getUserById().then((function(){e.getUserDetail()}))},computed:{isLoggedUser:function(){return!!this.$store.getters.loggedUser&&this.$store.getters.loggedUser.id===this.userProfileId},isLogedSccUser:function(){return this.$store.getters.loggedUser?this.$store.getters.loggedUser.isSCCUser:""},isLogedUserAdmin:function(){return this.isCurrentUserInRole("admin")||this.isCurrentUserInRole("superadmin")}},data:function(){return{userProfilesData:null,isConfirmPassword:!1,showConfirmPassword:!1,showConfirmPasswordMatch:!1,isPasswordValid:!1,isFirstNameValid:!1,isLastNameValid:!1,confirmPassword:null,password:null,profileId:null,isForcePasswordChange:!0,isUpdate:!1,isRoleSelected:!1,errorSelecteRole:!1,isActive:!0,roles:[{roleId:null,roleName:null,isRollChecked:!1}],requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},passwordValidationMessage:p["b"].passwordValidationMessage,data:{firstName:null,lastName:null,email:""},isRegisterSuccess:!1,isUserProfileSuccess:!0,isRoleSuccess:!0,isUserDeactiveSuccess:!0,userRole:[{id:null,userId:null,roleId:null,isChecked:!1}],passwordLogs:[]}},created:function(){},watch:{confirmPassword:function(e){e===this.password||null===this.password&&""===this.password?""===e?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1,this.isConfirmPassword=!1):(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0):(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1)},password:function(e){null===this.confirmPassword||""===this.confirmPassword?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1):""!==e&&e!==this.confirmPassword?(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1):null===e||""===e?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1,this.isConfirmPassword=!1):(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0)}},methods:{getUserById:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,s=e.userProfileId,null===s||"null"===s){t.next=6;break}return t.next=5,e.$store.dispatch(g["e"],{userId:s});case 5:e.userProfilesData=e.$store.getters.userById;case 6:t.next=12;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error("user accounts err",t.t0),"Network Error"===t.t0.message?e.$router.push({name:"NotFound"}):e.$router.push({name:"UnAuthorized"});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))()},isCurrentUserInRole:function(e){var t=-1,s=this.$store.getters.loggedUser;return s&&s.roles&&(t=s.roles.findIndex((function(t){return t.roleName.toLowerCase()===e}))),t>=0},getPasswordLogsByUserId:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.userProfileId,!s){t.next=5;break}return t.next=4,e.$store.dispatch(v["o"],{userId:s});case 4:e.passwordLogs=e.$store.getters.passwordLogs;case 5:case"end":return t.stop()}}),t)})))()},permissionValidation:function(){for(var e=0;e<this.roles.length;e+=1){if(this.roles[e].isRollChecked){this.isRoleSelected=!0;break}this.isRoleSelected=!1}return this.isRoleSelected?this.errorSelecteRole=!1:this.errorSelecteRole=!0,this.isRoleSelected},validation:function(){this.password=null===this.password?"":this.password,this.data.firstName=null===this.data.firstName?"":this.data.firstName,this.data.lastName=null===this.data.lastName?"":this.data.lastName,this.confirmPassword=null===this.confirmPassword?"":this.confirmPassword},onCancelButtonClick:function(){this.$router.push({name:"SCCUserList"})},btnSaveUserInfo:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.isUserDeactiveSuccess=!1,e.isRoleSuccess=!1,e.isUserDeactiveSuccess=!1,!(e.isUpdate&&e.isFirstNameValid&&e.isLastNameValid&&e.permissionValidation())){t.next=33;break}if(e.password||e.confirmPassword){t.next=19;break}return t.next=8,e.userProfile().then((function(){e.isUserProfileSuccess=!0}));case 8:return t.next=10,e.userInRoles().then((function(){e.isRoleSuccess=!0}));case 10:if(e.isActive){t.next=15;break}return t.next=13,e.deactivateUser().then((function(){e.isUserDeactiveSuccess=!0}));case 13:t.next=16;break;case 15:e.isUserDeactiveSuccess=!0;case 16:e.isUserProfileSuccess&&e.isRoleSuccess&&e.isUserDeactiveSuccess&&(e.$parent.$parent.$parent.notificationToasts.push({title:"Success!",content:"User details save successfully.",cssClass:"e-toast-success",timeOut:5e3}),e.$router.push({name:"SCCUserList"})),t.next=31;break;case 19:if(!e.isConfirmPassword||!e.isPasswordValid){t.next=29;break}return t.next=22,e.register();case 22:return t.next=24,e.userProfile().then((function(){e.isUserProfileSuccess=!0}));case 24:return t.next=26,e.userInRoles().then((function(){e.isRoleSuccess=!0}));case 26:e.isRegisterSuccess&&e.isUserProfileSuccess&&e.isRoleSuccess&&(e.$parent.$parent.$parent.notificationToasts.push({title:"Success!",content:"User details save successfully.",cssClass:"e-toast-success",timeOut:5e3}),e.$router.push("/scc-user-list")),t.next=31;break;case 29:e.validation(),e.$parent.$parent.$parent.notificationToasts.push({title:"Error!",content:"Please enter required field.",cssClass:"e-toast-danger",timeOut:5e3});case 31:t.next=45;break;case 33:if(!(e.isConfirmPassword&&e.isPasswordValid&&e.isFirstNameValid&&e.isLastNameValid&&e.permissionValidation())){t.next=43;break}return t.next=36,e.register();case 36:return t.next=38,e.userProfile().then((function(){e.isUserProfileSuccess=!0}));case 38:return t.next=40,e.userInRoles().then((function(){e.isRoleSuccess=!0}));case 40:e.isRegisterSuccess&&e.isUserProfileSuccess&&e.isRoleSuccess&&(e.$parent.$parent.$parent.notificationToasts.push({title:"Success!",content:"User details save successfully.",cssClass:"e-toast-success",timeOut:5e3}),e.$router.push("/scc-user-list")),t.next=45;break;case 43:e.validation(),e.$parent.$parent.$parent.notificationToasts.push({title:"Error!",content:"Please enter required field.",cssClass:"e-toast-danger",timeOut:5e3});case 45:t.next=50;break;case 47:t.prev=47,t.t0=t["catch"](0),e.$parent.$parent.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong during saving information. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 50:e.$parent.$parent.$parent.notificationToasts.length>0&&e.$parent.$parent.$parent.$refs.notifierRef.show();case 51:case"end":return t.stop()}}),t,null,[[0,47]])})))()},getRoles:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(v["q"]).then((function(t){if(200===t.status){e.roles=[];for(var s=0;s<t.data.length;s+=1)e.roles.push({roleId:t.data[s].roleId,roleName:t.data[s].roleName,isRollChecked:!1})}}));case 3:t.next=8;break;case 5:t.prev=5,t.t0=t["catch"](0),console.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))()},getUserDetail:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,null===e.userProfilesData||""===e.userProfilesData){t.next=5;break}return s=e.userProfilesData.userName,t.next=5,e.$store.dispatch(v["t"],{userName:s}).then((function(t){if(200===t.status){e.isUpdate=!0,null!==t.data[0].userProfile&&(e.data.firstName=t.data[0].userProfile.firstName,e.data.lastName=t.data[0].userProfile.lastName),e.data.email=t.data[0].userName,e.isActive=t.data[0].memberShip.isApproved,null!==t.data[0].userProfile?e.profileId=t.data[0].userProfile.id:e.profileId=null;for(var s=t.data[0].usersInRoles,i=0;i<e.roles.length;i+=1)for(var r=0;r<s.length;r+=1)e.roles[i].roleId===s[r].roleId&&(e.roles[i].isRollChecked=!0)}}));case 5:t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getUserProfilesById:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userProfileId,t.next=4,e.$store.dispatch(v["u"],{userId:s});case 4:e.data=Object(n["a"])(Object(n["a"])({},e.data),e.$store.getters.userProfilesbyID),null!==e.$store.getters.userProfilesbyID?e.profileId=e.$store.getters.userProfilesbyID.id:e.profileId=null,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},deactivateUser:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.userName=e.userProfilesData.userName,s=e.userName,t.next=5,e.$store.dispatch(v["d"],{userName:s}).then((function(t){200===t.status&&e.$parent.$parent.$parent.notificationToasts.push({title:"Success!",content:"User successfully deactivated. Please check inactive user tab.",cssClass:"e-toast-success",timeOut:5e3})}));case 5:t.next=11;break;case 7:t.prev=7,t.t0=t["catch"](0),e.isUserDeactiveSuccess=!1,e.$parent.$parent.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 11:e.$parent.$parent.$parent.notificationToasts.length>0&&e.$parent.$parent.$parent.$refs.notifierRef.show();case 12:case"end":return t.stop()}}),t,null,[[0,7]])})))()},register:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s,i,r,n,o;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.username=e.userProfilesData.userName,e.email=e.userProfilesData.userName,null===e.profileId){t.next=11;break}return s=e.userProfileId,i=e.password,t.next=8,e.$store.dispatch(v["w"],{userId:s,password:i,forcePasswordChange:e.isForcePasswordChange});case 8:e.isRegisterSuccess=!0,t.next=15;break;case 11:return r=e.username,n=e.email,o=e.password,t.next=14,e.$store.dispatch(v["v"],{username:r,email:n,password:o,forcePasswordChange:e.isForcePasswordChange,isSCCUser:!0});case 14:e.isRegisterSuccess=!0;case 15:t.next=20;break;case 17:t.prev=17,t.t0=t["catch"](0),console.error(t.t0);case 20:case"end":return t.stop()}}),t,null,[[0,17]])})))()},userProfile:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s,i;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,null===e.profileId){t.next=7;break}return s=Object.assign(e.data,{id:e.profileId,userFullName:"".concat(e.data.firstName," ").concat(e.data.lastName)}),t.next=5,e.$store.dispatch(v["F"],s);case 5:t.next=10;break;case 7:return i=Object.assign(e.data,{userId:e.userProfileId,userFullName:"".concat(e.data.firstName," ").concat(e.data.lastName)}),t.next=10,e.$store.dispatch(v["F"],i);case 10:t.next=16;break;case 12:t.prev=12,t.t0=t["catch"](0),console.error(t.t0),e.isUserProfileSuccess=!1;case 16:case"end":return t.stop()}}),t,null,[[0,12]])})))()},userInRoles:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s,i;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:for(t.prev=0,e.userRole=[],s=0;s<e.roles.length;s+=1)i={},e.roles[s].isRollChecked&&(i.userId=e.userProfileId,i.roleId=e.roles[s].roleId,e.userRole.push(i));return t.next=5,e.$store.dispatch(v["D"],e.userRole);case 5:t.next=11;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0.message),e.isRoleSuccess=!1;case 11:case"end":return t.stop()}}),t,null,[[0,7]])})))()}}},y=b,w=(s("1fb6"),s("2877")),C=Object(w["a"])(y,i,r,!1,null,null,null);t["a"]=C.exports},6781:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e._m(0),s("div",{staticClass:"e-card"},[s("div",{staticStyle:{display:"none"},attrs:{id:"activeWebUsers"}},[s("ejs-grid",{ref:"refWebActiveUserList",attrs:{dataSource:e.activityUsers(),created:e.created,enablePersistence:"true","selection-settings":e.selectionOptions,commandClick:e.commandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.activePageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"10%",textAlign:"Left",commands:e.commands}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"15%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"22%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.address",width:"25%",headerText:"Address",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.cityName",width:"10%",headerText:"City",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.provinceName",width:"15%",headerText:"Province Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.postalCode",width:"14%",headerText:"Postal Code",textAlign:"Left"}}),s("e-column",{attrs:{field:"memberShip.isApproved",width:"0",headerText:"Active",textAlign:"Left"}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"inactiveWebUsers"}},[s("ejs-grid",{ref:"refWebInactiveUserList",attrs:{dataSource:e.inActivityUsers(),created:e.created,"selection-settings":e.selectionOptions,commandClick:e.inactiveWebUsercommandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.inactiveWebUserpageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"12%",commands:e.inactiveWebUserCommands,textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"13%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"22%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.address",width:"27%",headerText:"Address",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.cityName",width:"10%",headerText:"City",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.provinceName",width:"15%",headerText:"Province Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.postalCode",width:"14%",headerText:"Postal Code",textAlign:"Left"}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"lockedWebUsers"}},[s("ejs-grid",{ref:"refWebLockedUserList",attrs:{dataSource:e.lockedUsers(),created:e.created,"selection-settings":e.selectionOptions,commandClick:e.unlockWebUsercommandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.inactiveWebUserpageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"12%",commands:e.lockedWebUserCommands,textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"13%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"22%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.address",width:"27%",headerText:"Address",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.cityName",width:"10%",headerText:"City",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.provinceName",width:"15%",headerText:"Province Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.postalCode",width:"14%",headerText:"Postal Code",textAlign:"Left"}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"webHistoricalInformation"}},[s("ejs-grid",{ref:"refWebHistoricalInfoList",attrs:{dataSource:e.userEvenLogs(),created:e.created,"selection-settings":e.selectionOptions,allowSorting:!0,allowPaging:!0,pageSettings:e.webHistoricalInfoPageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{field:"userFullName",width:"12%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"20%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"eventType",headerText:"Action Updated",textAlign:"Left"}}),s("e-column",{attrs:{field:"",headerText:"Permission Changed",textAlign:"Left"}}),s("e-column",{attrs:{field:"logDate",headerText:"Date Action Updated",textAlign:"Left",type:"date",format:"MMM dd, yyyy"}}),s("e-column",{attrs:{headerText:"Updated User",textAlign:"Left",field:"updateUserName"}})],1)],1)],1),s("div",{staticStyle:{margin:"0px"}},[s("div",{attrs:{tabindex:"0",id:"basic"}},[s("div",{staticClass:"form-row"},[s("ejs-tab",{ref:"refWebUserTabInstance",staticClass:"e-background",attrs:{id:"webUser_tab",selecting:e.tabSelect,selected:e.tabSelected,created:e.tabCreated}},[s("e-tabitems",[s("e-tabitem",{attrs:{header:e.headerText0,content:e.content0}}),s("e-tabitem",{attrs:{header:e.headerText1,content:e.content1}}),s("e-tabitem",{attrs:{header:e.headerText2,content:e.content2}}),s("e-tabitem",{attrs:{header:e.headerText3,content:e.content3}})],1)],1)],1)])])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row"},[s("h3",[e._v("Manage Web Login User List")])])}],n=s("c7eb"),a=s("1da1"),o=s("a026"),l=s("c041"),c=s("af93"),u=s("aa15"),d=s("e09d"),h=s("4f03"),p=s("e29d"),m=s("b0e8"),f=s("5e13"),v=s("b37f");o["default"].use(l["a"]),o["default"].use(f["a"]);var g={name:"Users",created:function(){},computed:{},data:function(){return{headerText0:{text:"Active Users"},headerText1:{text:"Inactive Users"},headerText2:{text:"Locked Users"},headerText3:{text:"Historical Information"},content0:"#activeWebUsers",content1:"#inactiveWebUsers",content2:"#lockedWebUsers",content3:"#webHistoricalInformation",selectionOptions:{type:"Single",enableSimpleMultiRowSelection:!1,enableToggle:!0,persistSelection:!0},toolbarOptions:["Search"],activePageSettings:{pageSize:10},inactiveWebUserpageSettings:{pageSize:10},webHistoricalInfoPageSettings:{pageSize:10},commands:[{type:"Edit",buttonOption:{cssClass:"e-flat",iconCss:"e-edit e-icons"}}],inactiveWebUserCommands:[{buttonOption:{content:"Active",cssClass:"e-info"}}],lockedWebUserCommands:[{buttonOption:{content:"Unlock",cssClass:"e-info"}}],refreshTime:null}},mounted:function(){this.$refs.refWebActiveUserList.ej2Instances.searchSettings.key="",this.$refs.refWebUserTabInstance.ej2Instances.animation.previous.effect="FadeIn",this.$refs.refWebUserTabInstance.ej2Instances.animation.next.effect="FadeIn"},methods:{created:function(){var e=this;if(this.$refs.refWebActiveUserList){var t=document.getElementById("".concat(this.$refs.refWebActiveUserList.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refWebActiveUserList.$el.id)}))}if(this.$refs.refWebInactiveUserList){var s=document.getElementById("".concat(this.$refs.refWebInactiveUserList.$el.id,"_searchbar"));s&&s.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refWebInactiveUserList.$el.id)}))}if(this.$refs.refWebLockedUserList){var i=document.getElementById("".concat(this.$refs.refWebLockedUserList.$el.id,"_searchbar"));i&&i.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refWebLockedUserList.$el.id)}))}if(this.$refs.refWebHistoricalInfoList){var r=document.getElementById("".concat(this.$refs.refWebHistoricalInfoList.$el.id,"_searchbar"));r&&r.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refWebHistoricalInfoList.$el.id)}))}},clearSearchEventListener:function(e,t){var s=document.getElementById("".concat(t,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(t,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){e.target.value="",document.getElementById("".concat(t,"_clearbutton")).remove()})),e.target.value&&2==s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):e.target.value&&""!=e.target.value||document.getElementById("".concat(t,"_clearbutton")).remove()},tabCreated:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.$refs.refWebUserTabInstance.ej2Instances,i=s.selectedID,"0"!==i){t.next=7;break}return t.next=5,e.$store.dispatch(v["f"]);case 5:t.next=15;break;case 7:if("1"!==i){t.next=12;break}return t.next=10,e.$store.dispatch(v["f"]);case 10:t.next=15;break;case 12:if("2"!==i){t.next=15;break}return t.next=15,e.$store.dispatch(v["k"]);case 15:case"end":return t.stop()}}),t)})))()},tabSelect:function(e){return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.isSwiped&&(e.cancel=!0);case 1:case"end":return t.stop()}}),t)})))()},tabSelected:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(i=e.selectedIndex,0!==i){s.next=6;break}return s.next=4,t.$store.dispatch(v["f"]);case 4:s.next=14;break;case 6:if(1!==i){s.next=11;break}return s.next=9,t.$store.dispatch(v["f"]);case 9:s.next=14;break;case 11:if(2!==i){s.next=14;break}return s.next=14,t.$store.dispatch(v["k"]);case 14:case"end":return s.stop()}}),s)})))()},activityUsers:function(){return this.$store.getters.activeUsers},inActivityUsers:function(){return this.$store.getters.inactiveUsers},lockedUsers:function(){return this.$store.getters.lockedUsers},userEvenLogs:function(){return this.$store.getters.webUserEventLogList},inactiveWebUsercommandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i=e.rowData.userName,s.prev=1,s.next=4,t.$store.dispatch(v["a"],{userName:i}).then((function(e){200===e.status&&(t.$store.dispatch(v["f"]),t.$parent.notificationToasts.push({title:"Success!",content:"User activate successfully. Please, check active user tab.",cssClass:"e-toast-success",timeOut:5e3}))}));case 4:s.next=9;break;case 6:s.prev=6,s.t0=s["catch"](1),t.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 9:t.$parent.notificationToasts.length>0&&t.$parent.$refs.notifierRef.show();case 10:case"end":return s.stop()}}),s,null,[[1,6]])})))()},commandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:"Edit"===e.commandColumn.type&&(i=e.rowData.userId,t.$router.push({name:"ManageWebLoginInfo",params:{id:i}}));case 1:case"end":return s.stop()}}),s)})))()},unlockWebUsercommandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i=e.rowData.userName,s.prev=1,s.next=4,t.$store.dispatch(v["A"],{userName:i}).then((function(e){200===e.status&&(t.$store.dispatch(v["f"]),t.$parent.notificationToasts.push({title:"Success!",content:"User unlock successfully. Please, check active user tab.",cssClass:"e-toast-success",timeOut:5e3}))}));case 4:s.next=9;break;case 6:s.prev=6,s.t0=s["catch"](1),t.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 9:t.$parent.notificationToasts.length>0&&t.$parent.$refs.notifierRef.show();case 10:case"end":return s.stop()}}),s,null,[[1,6]])})))()}},provide:{grid:[c["a"],u["a"],d["a"],h["a"],p["a"],m["a"]]}},b=g,y=(s("5375"),s("2877")),w=Object(y["a"])(b,i,r,!1,null,null,null);t["default"]=w.exports},"68d6":function(e,t,s){},"6cc3":function(e,t,s){"use strict";s("10b2")},"726a":function(e,t,s){"use strict";s("c1b3")},"74d1":function(e,t,s){"use strict";s("243a")},7598:function(e,t,s){"use strict";s("8cea")},7722:function(e,t,s){"use strict";var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"wrap_address"},[t.userEmail?i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"50%"}},[i("ejs-textbox",{attrs:{floatLabelType:"Always",placeholder:"Email",readonly:!0},model:{value:t.userEmail,callback:function(e){t.userEmail=e},expression:"userEmail"}})],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"50%"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.oldPassword},on:{validate:function(t){return e.isOldPasswordValid=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"Existing Password"},model:{value:t.oldPassword,callback:function(e){t.oldPassword=e},expression:"oldPassword"}})],1)],1)]):t._e(),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"50%"}},[i("scc-input-validator",{attrs:{password:t.password,rules:[t.requiredRule],usedPasswords:[t.passwordLogs],currentPassword:t.oldPassword},on:{validate:function(t){return e.isPasswordValid=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"New Password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:this.isPasswordValid,expression:"this.isPasswordValid"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v(" Password is strong")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"50%"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.confirmPassword},on:{validate:function(t){return e.isConfirmPassword=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"Confirm Password"},on:{"handle-enter-key":function(e){return t.handleSubmit()}},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPassword,expression:"showConfirmPassword"}],staticClass:"e-error"},[i("span",{staticClass:"e-icons close"}),t._v(" Confirm password does not match with Password")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPasswordMatch,expression:"showConfirmPasswordMatch"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v(" Password matched")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"50%"}},[i("span",{staticClass:"e-error"},[t._v("\n        "+t._s(t.passwordValidationMessage)+"\n      ")])])]),i("div",{staticClass:"form-row",staticStyle:{padding:"0px 0px 15px 0px",margin:"-5px"}},[t.showForcePasswordChange?i("ejs-checkbox",{attrs:{label:"Force User to Reset Password",checked:t.isForcePasswordChange,labelPosition:"Before"},on:{change:t.onForceUsertoResetPasswordChange}}):t._e()],1)])},r=[],n=s("c7eb"),a=s("1da1"),o=s("a026"),l=s("21cb"),c=s("4023"),u=s("940e"),d=s("aa96"),h=s("b37f");o["default"].use(l["a"]);var p={name:"WebLoginInfo",components:{SccInputValidator:u["a"],inputPassword:d["a"]},props:{userProfileId:String,userProfilesData:Object,enableForcePasswordChange:Boolean,handleSubmit:Function},created:function(){this.getPasswordLogsByUserId()},mounted:function(){},computed:{userEmail:function(){return null!==this.userProfilesData&&!1===this.userProfilesData.isAnonymous?this.userProfilesData.userName:null}},data:function(){var e;return{username:null,email:null,userId:null,isConfirmPassword:!1,showConfirmPassword:!1,isPasswordValid:!1,isOldPasswordValid:!1,requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},passwordValidationMessage:c["b"].passwordValidationMessage,password:null,confirmPassword:null,oldPassword:null,showConfirmPasswordMatch:!1,passwordLogs:[],isForcePasswordChange:null===(e=this.enableForcePasswordChange)||void 0===e||e,showForcePasswordChange:this.enableForcePasswordChange}},watch:{confirmPassword:function(e){e===this.password||null===this.password&&""===this.password?""===e?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1,this.isConfirmPassword=!1):(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0):(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1),this.checkSubmitButton()},password:function(e){null===this.confirmPassword||""===this.confirmPassword?this.showConfirmPasswordMatch=!1:""!==e&&e!==this.confirmPassword?(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1):null===e||""===e?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1,this.isConfirmPassword=!1):(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0),this.checkSubmitButton()}},methods:{checkSubmitButton:function(){this.isPasswordValid&&this.isConfirmPassword&&this.showConfirmPasswordMatch?(console.log(55),this.$emit("enable-submit",!0)):this.$emit("enable-submit",!1)},onForceUsertoResetPasswordChange:function(e){this.isForcePasswordChange=e.checked},getPasswordLogsByUserId:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.userProfileId,!s){t.next=5;break}return t.next=4,e.$store.dispatch(h["o"],{userId:s});case 4:e.passwordLogs=e.$store.getters.passwordLogs;case 5:case"end":return t.stop()}}),t)})))()},validatePassword:function(){this.password=null===this.password?"":this.password,this.confirmPassword=null===this.confirmPassword?"":this.confirmPassword,this.userEmail&&(this.oldPassword=null===this.oldPassword?"":this.oldPassword)},register:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.userId=e.userProfileId,e.username=e.userProfilesData.userName,e.email=e.userProfilesData.userName,s=e.username,i=e.email,r=e.password,t.next=7,e.$store.dispatch(h["v"],{username:s,email:i,password:r,forcePasswordChange:e.isForcePasswordChange,isSCCUser:!1});case 7:t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},resetPassword:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.userId=e.userProfileId,s=e.userId,i=e.password,t.next=5,e.$store.dispatch(h["w"],{userId:s,password:i,forcePasswordChange:!1});case 5:t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},changePassword:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.username=e.userEmail,s=e.username,i=e.oldPassword,r=e.password,t.next=5,e.$store.dispatch(h["b"],{username:s,oldPassword:i,password:r});case 5:t.next=11;break;case 7:throw t.prev=7,t.t0=t["catch"](0),console.error(t.t0),t.t0;case 11:case"end":return t.stop()}}),t,null,[[0,7]])})))()}}},m=p,f=(s("04f0"),s("2877")),v=Object(f["a"])(m,i,r,!1,null,null,null);t["a"]=v.exports},"793e":function(e,t,s){"use strict";s("1099")},"7bca":function(e,t,s){"use strict";s("1dbb")},"8cea":function(e,t,s){},9797:function(e,t,s){"use strict";s("1231")},9997:function(e,t,s){"use strict";s("c504")},"9b00":function(e,t,s){},"9b95":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{margin:"7%"}},[e.isRightUser?s("div",[e.isEmailSubmitted?e._e():s("div",{staticClass:"container"},[s("email-verification",{ref:"refEmailVerification",attrs:{"page-title":e.title,"erorr-message":e.emailSubmitErorrMessage,"is-submitted":e.isEmailSubmitted},on:{submit:e.onSubmitEmail}})],1),e.isEmailSubmitted?s("div",[s("scc-user-details",{ref:"refUserDetails",attrs:{userProfileId:e.userId,isUserProfile:e.userProfile}})],1):e._e()]):s("div",[e._v("\n    Please contact SCC Admin, to confirm you permissions. The user Id does not\n    match.\n  ")])])},r=[],n=s("c7eb"),a=s("1da1"),o=(s("c740"),s("a026")),l=s("9a0f"),c=s("21cb"),u=s("b59e"),d=s("58d5"),h=s("dff1");o["default"].use(l["a"]),o["default"].use(c["a"]);var p={name:"ManageSCCUser",components:{EmailVerification:u["a"],SccUserDetails:d["a"]},created:function(){this.userId=this.$route.params.id,this.loggedUserId=this.$store.getters.loggedUser.id,null!==this.userId&&"null"!==this.userId&&(this.isEmailSubmitted=!0)},mounted:function(){},computed:{isLogedUserAdmin:function(){return this.isCurrentUserInRole("admin")||this.isCurrentUserInRole("superadmin")},isRightUser:function(){return this.isLogedUserAdmin||this.userId===this.loggedUserId}},data:function(){return{title:"Add New SCC User Account",isEmailSubmitted:!1,userId:null,currentUser:null,userProfile:!1,emailSubmitErorrMessage:null,loggedUserId:null}},methods:{isCurrentUserInRole:function(e){var t=-1,s=this.$store.getters.loggedUser;return s&&s.roles&&(t=s.roles.findIndex((function(t){return t.roleName.toLowerCase()===e}))),t>=0},onCancelButtonClick:function(){this.$router.push("/")},btnComplete:function(){},onSubmitEmail:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i,r,a;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(i=t.$refs.refEmailVerification,r=e,a=window.location.host,!i.isEmailValid){s.next=36;break}return s.prev=4,s.next=7,t.$store.dispatch(h["c"],{userName:r,rootURL:a,confirmType:"admin-registration"});case 7:if(200!==t.$store.getters.userDetails.status){s.next=15;break}t.currentUser=t.$store.getters.userDetails.data,t.userId=t.currentUser.userId,t.$parent.$parent.notificationToasts.push({title:"Thank you for your request!",content:"",cssClass:"e-toast-success",timeOut:5e3}),t.userEmail=e,t.isEmailSubmitted=!0,s.next=28;break;case 15:if(!t.$store.getters.userDetails){s.next=28;break}s.t0=t.$store.getters.userDetails,s.next=409===s.t0?19:403===s.t0?21:404===s.t0?23:25;break;case 19:return t.erorrMessage="Account exist with given email id.",s.abrupt("break",26);case 21:return t.erorrMessage="Account exist with given email id.",s.abrupt("break",26);case 23:return t.$router.push("/NotFound"),s.abrupt("break",26);case 25:t.erorrMessage="Oops, Something went wrong. We are working on getting this fixed as soon as we can. You may be able to try again shortly. If you continue to experience this issue, you can contact ASCA Tanks at ascatanks@safetycodes.ab.ca or by calling 1-888-413-0099";case 26:t.erorrMessage&&t.$parent.$parent.notificationToasts.push({title:"Error!",content:t.erorrMessage,cssClass:"e-toast-danger",timeOut:5e3}),t.emailSubmitErorrMessage=t.erorrMessage;case 28:s.next=34;break;case 30:s.prev=30,s.t1=s["catch"](4),408===s.t1.Status&&t.$parent.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong! Please try again later.",cssClass:"e-toast-danger",timeOut:5e3}),404===s.t1.Status&&t.$router.push("/NotFound");case 34:s.next=38;break;case 36:i.validateEmail(),t.$parent.$parent.notificationToasts.push({title:"Error!",content:"Please provide valid email id.",cssClass:"e-toast-danger",timeOut:5e3});case 38:t.$parent.$parent.notificationToasts.length>0&&t.$parent.$parent.$refs.notifierRef.show();case 39:case"end":return s.stop()}}),s,null,[[4,30]])})))()}}},m=p,f=(s("9997"),s("2877")),v=Object(f["a"])(m,i,r,!1,null,null,null);t["default"]=v.exports},"9d7f":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h2",[e._v("My Site Information")]),s("div",[e.isAdmin||e.isWithMultipleOwners?s("div",{staticClass:"e-card-content",staticStyle:{display:"flex",width:"50%","padding-left":"10px"}},[e.isAdmin?s("ejs-autocomplete",{ref:"userProfileRef",attrs:{dataSource:e.owners,placeholder:"Site Owner",fields:{value:"ownerFullInfo"},minLength:3,sortOrder:"Ascending",filterType:"Contains","float-label-type":"Always",change:e.onUserSelection,cssClass:"e-static-clear",value:e.defaultOwnerString}}):e._e(),e.isWithMultipleOwners?s("ejs-dropdownlist",{ref:"userDropdownProfileRef",attrs:{dataSource:e.myOwners,placeholder:"Site Owner",fields:{value:"ownerFullInfo"},minLength:3,sortOrder:"Ascending",filterType:"Contains","float-label-type":"Always",change:e.onUserSelection,cssClass:"e-static-clear",value:e.defaultOwnerString}}):e._e(),e.siteReviewStatus?s("button",{staticClass:"e-control e-btn e-lib e-info",staticStyle:{margin:"10px"},on:{click:e.reOpenButtonClick}},[e._v("\n        Reopen\n      ")]):e._e()],1):e._e(),e.ownerInfo.ownerId||e.ownerInfo.ownerContact||e.ownerInfo.ownerFullAddress||e.ownerInfo.ownerDetail?s("fieldset",[e._m(0),e.ownerInfo.ownerId?s("div",{staticStyle:{padding:"5px"}},[s("b",[e._v("Owner #: ")]),e._v("\n        "+e._s(e.ownerInfo.ownerId)+"\n      ")]):e._e(),e.ownerInfo.ownerContact?s("div",{staticStyle:{padding:"5px"}},[s("b",[e._v("Owner Name: ")]),e._v("\n        "+e._s(e.ownerInfo.ownerName)+"\n      ")]):e._e(),e.ownerInfo.ownerContact?s("div",{staticStyle:{padding:"5px"}},[s("b",[e._v("Contact: ")]),e._v("\n        "+e._s(e.ownerInfo.ownerContact)+"\n      ")]):e._e(),e.ownerInfo.ownerFullAddress?s("div",{staticStyle:{padding:"5px"}},[s("b",[e._v("Owner Address: ")]),e._v("\n        "+e._s(e.ownerInfo.ownerFullAddress)+"\n      ")]):e._e(),e.ownerInfo.ownerDetail?s("div",{staticStyle:{padding:"5px"}},[s("b",[e._v("Owner Details: ")]),e._v("\n        "+e._s(e.ownerInfo.ownerDetail)+"\n      ")]):e._e()]):e._e()]),s("div",{staticClass:"e-card",attrs:{id:"basic"}},[s("div",{staticClass:"e-card-content"},[s("ejs-tab",{ref:"refTabInstance",staticClass:"e-background",attrs:{id:"collapsible_tab",created:e.tabCreated,selecting:e.tabSelect}},[s("e-tabitems",[s("e-tabitem",{attrs:{header:e.headerText0,content:e.content0}}),s("e-tabitem",{attrs:{header:e.headerText1,content:e.content1}}),s("e-tabitem",{attrs:{header:e.headerText2,content:e.content2}}),s("e-tabitem",{attrs:{header:e.headerText3,content:e.content3}})],1)],1)],1)]),s("div",{attrs:{id:"operationalPermitList"}},[s("operational-permit-list",{attrs:{isSiteReviewReadyData:e.isSiteReviewReadyData,documentsDS:e.documentsDS,showReview:e.showReview,comments:e.comments,ownerInfo:e.ownerInfo,mySitesDS:e.mySitesDS}})],1),s("div",{staticStyle:{display:"none"},attrs:{id:"siteList"}},[s("operational-permit-list",{ref:"refOperationalPermitList",attrs:{showAllSites:!0,mySitesDS:e.mySites,ownerInfo:e.ownerInfo,isSiteReviewReadyData:e.isSiteReviewReadyData}})],1),s("div",{staticStyle:{display:"none"},attrs:{id:"siteDetails"}},[s("site-details",{ref:"refSiteDetails",attrs:{comments:e.comments,siteId:e.siteId,isSiteReviewReadyData:e.isSiteReviewReadyData,showReview:e.showReview,ownerInfo:e.ownerInfo}})],1),s("div",{staticStyle:{display:"none"},attrs:{id:"review"}},[s("site-review",{ref:"reviewRef",attrs:{comments:e.comments,documentsDS:e.documentsDS,ownerInfo:e.ownerInfo}})],1)])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("span",{staticStyle:{color:"#0f4b90","font-weight":"800"}},[e._v("Owner Details")])])}],n=s("c7eb"),a=s("1da1"),o=s("2909"),l=s("5530"),c=(s("4de4"),s("d3b7"),s("159b"),s("d81d"),s("caad"),s("2532"),s("498a"),s("ac1f"),s("1276"),s("5319"),s("7db0"),s("a434"),s("a026")),u=s("5e13"),d=s("d61a"),h=s("2f62"),p=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.emptySiteDetail?s("div",[s("br"),s("h3",[e._v("Please select site id first...")]),s("ejs-button",{attrs:{cssClass:"e-primary margin-button"},nativeOn:{click:function(t){return e.onBackButtonClick.apply(null,arguments)}}},[e._v("Back")])],1):s("div",[s("div",{staticStyle:{display:"flex","justify-content":"end"}},[s("ejs-button",{staticStyle:{margin:"10px"},attrs:{type:"Button",cssClass:"e-success"},nativeOn:{click:function(t){return e.onExportToExcel.apply(null,arguments)}}},[e._v("\n      Export to Excel\n    ")]),s("ejs-button",{attrs:{cssClass:"e-info"},nativeOn:{click:function(t){return e.onBackButtonClick.apply(null,arguments)}}},[e._v("Back")])],1),s("div",[s("fieldset",[e._m(0),s("div",{staticClass:"grid-container-site-details"},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Site #",readonly:"true",value:e.siteId}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Facility Status",readonly:"true"},model:{value:e.currentSiteDetails.facility_Status,callback:function(t){e.$set(e.currentSiteDetails,"facility_Status",t)},expression:"currentSiteDetails.facility_Status"}}),s("div",{staticStyle:{"grid-column":"span 2"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Site Name",readonly:"true"},model:{value:e.currentSiteDetails.site_Name,callback:function(t){e.$set(e.currentSiteDetails,"site_Name",t)},expression:"currentSiteDetails.site_Name"}})],1),s("div",{staticStyle:{"grid-column":"span 3"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Site Address",readonly:"true"},model:{value:e.currentSiteDetails.site_Address,callback:function(t){e.$set(e.currentSiteDetails,"site_Address",t)},expression:"currentSiteDetails.site_Address"}})],1),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Hold Certificate",readonly:"true"},model:{value:e.currentSiteDetails.hold_Certificates,callback:function(t){e.$set(e.currentSiteDetails,"hold_Certificates",t)},expression:"currentSiteDetails.hold_Certificates"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Facility Type",readonly:"true"},model:{value:e.currentSiteDetails.facility_Type,callback:function(t){e.$set(e.currentSiteDetails,"facility_Type",t)},expression:"currentSiteDetails.facility_Type"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Owner #",readonly:"true"},model:{value:e.currentSiteDetails.owner_Id,callback:function(t){e.$set(e.currentSiteDetails,"owner_Id",t)},expression:"currentSiteDetails.owner_Id"}}),s("div",{staticStyle:{"grid-column":"span 2"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Owner Name",readonly:"true"},model:{value:e.currentSiteDetails.owner_Name,callback:function(t){e.$set(e.currentSiteDetails,"owner_Name",t)},expression:"currentSiteDetails.owner_Name"}})],1),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Owner Contact",readonly:"true"},model:{value:e.currentSiteDetails.owner_Contact,callback:function(t){e.$set(e.currentSiteDetails,"owner_Contact",t)},expression:"currentSiteDetails.owner_Contact"}}),s("div",{staticStyle:{"grid-column":"span 3"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Owner Details",readonly:"true"},model:{value:e.currentSiteDetails.owner_Detail,callback:function(t){e.$set(e.currentSiteDetails,"owner_Detail",t)},expression:"currentSiteDetails.owner_Detail"}})],1),s("div",{staticStyle:{"grid-column":"span 3"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Owner Address",readonly:"true"},model:{value:e.currentSiteDetails.owner_Address,callback:function(t){e.$set(e.currentSiteDetails,"owner_Address",t)},expression:"currentSiteDetails.owner_Address"}})],1)],1)]),s("fieldset",[e._m(1),s("div",{staticClass:"grid-container-site-details"},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Name",readonly:"true"},model:{value:e.currentSiteDetails.owner_Contact,callback:function(t){e.$set(e.currentSiteDetails,"owner_Contact",t)},expression:"currentSiteDetails.owner_Contact"}}),s("div",{staticStyle:{"grid-column":"span 2"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Details",readonly:"true"},model:{value:e.currentSiteDetails.owner_Detail,callback:function(t){e.$set(e.currentSiteDetails,"owner_Detail",t)},expression:"currentSiteDetails.owner_Detail"}})],1),s("div",{staticStyle:{"grid-column":"span 3"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Address",readonly:"true"},model:{value:e.currentSiteDetails.owner_Address,callback:function(t){e.$set(e.currentSiteDetails,"owner_Address",t)},expression:"currentSiteDetails.owner_Address"}})],1)],1)]),s("fieldset",[e._m(2),s("div",{staticClass:"grid-container-site-details"},[s("fieldset",{staticStyle:{"grid-column":"span 2"}},[e._m(3),s("div",{staticClass:"grid-container-location-details"},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Lot",readonly:"true"},model:{value:e.currentSiteDetails.lot,callback:function(t){e.$set(e.currentSiteDetails,"lot",t)},expression:"currentSiteDetails.lot"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Block",readonly:"true"},model:{value:e.currentSiteDetails.block,callback:function(t){e.$set(e.currentSiteDetails,"block",t)},expression:"currentSiteDetails.block"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Plan",readonly:"true"},model:{value:e.currentSiteDetails.plan,callback:function(t){e.$set(e.currentSiteDetails,"plan",t)},expression:"currentSiteDetails.plan"}})],1)]),s("fieldset",{staticStyle:{"grid-column":"span 2"}},[e._m(4),s("div",[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Address",readonly:"true"},model:{value:e.currentSiteDetails.address_Line_1,callback:function(t){e.$set(e.currentSiteDetails,"address_Line_1",t)},expression:"currentSiteDetails.address_Line_1"}})],1)])]),s("div",{staticClass:"gird-container-site-details"},[s("fieldset",[e._m(5),s("div",{staticClass:"grid-container-location-details grid-template-col-6"},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"LSD",readonly:"true"},model:{value:e.currentSiteDetails.standard_LSD,callback:function(t){e.$set(e.currentSiteDetails,"standard_LSD",t)},expression:"currentSiteDetails.standard_LSD"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"QTR",readonly:"true"},model:{value:e.currentSiteDetails.standard_QTR,callback:function(t){e.$set(e.currentSiteDetails,"standard_QTR",t)},expression:"currentSiteDetails.standard_QTR"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"SEC",readonly:"true"},model:{value:e.currentSiteDetails.standard_SEC,callback:function(t){e.$set(e.currentSiteDetails,"standard_SEC",t)},expression:"currentSiteDetails.standard_SEC"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"TWP",readonly:"true"},model:{value:e.currentSiteDetails.common_TWP,callback:function(t){e.$set(e.currentSiteDetails,"common_TWP",t)},expression:"currentSiteDetails.common_TWP"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"RGE",readonly:"true"},model:{value:e.currentSiteDetails.common_REG,callback:function(t){e.$set(e.currentSiteDetails,"common_REG",t)},expression:"currentSiteDetails.common_REG"}}),s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"MER",readonly:"true"},model:{value:e.currentSiteDetails.common_MER,callback:function(t){e.$set(e.currentSiteDetails,"common_MER",t)},expression:"currentSiteDetails.common_MER"}})],1)])])]),s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-title"},[e._v("Tank Information")]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("ejs-grid",{ref:"refTankInfo",attrs:{dataSource:e.currentSiteTanks,created:e.created,allowSorting:!0,allowPaging:!0,pageSettings:e.pageSettings,toolbar:e.toolbarOptions,allowTextWrap:!0,height:"100%",width:"100%"}},[s("e-columns",[s("e-column",{attrs:{field:"tank_Type",headerText:"Tank Type",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"tank_Serial_No",headerText:"Tank Serial#",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"split_Tank",headerText:"Split Tank",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"cust_Tank_No",headerText:"Cust. Tank No.",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"tank_Status",headerText:"Tank Status",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"installation_Year_Month",headerText:"Installation Year/Month",textAlign:"Left",width:"140"}}),s("e-column",{attrs:{field:"tank_Material",headerText:"Tank Material",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"contents",headerText:"Contents",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"contents_Desc",headerText:"Contents Desc",textAlign:"Left",width:"120"}}),s("e-column",{attrs:{field:"tank_Construction_Spec",headerText:"Tank Construction Spec",textAlign:"Left",width:"140"}}),s("e-column",{attrs:{field:"specfiction_Description",headerText:"Specification Description",textAlign:"Left",width:"140"}})],1)],1)],1)]),e._v("\n     \n    "),e.isSiteReviewReadyData&&e.isSiteReviewReadyData.editPermission&&!this.currentSiteDetails.isInvoiced&&"Active"===this.currentSiteDetails.facility_Status?s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[e._m(6),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("ejs-textbox",{ref:"siteComments",attrs:{"float-label-type":"Always",placeholder:"Comments: ",maxlength:250,multiline:!0,row:5,created:e.onCommentsBoxCreation},on:{input:e.onInputChange}})],1)]):e._e(),e._v("\n     \n    "),s("div",{staticClass:"align-center-bottom"},[s("ejs-button",{attrs:{cssClass:"e-primary margin-button"},nativeOn:{click:function(t){return e.onBackButtonClick.apply(null,arguments)}}},[e._v("Back")]),e.showReview&&!this.currentSiteDetails.isInvoiced?s("ejs-button",{staticStyle:{margin:"10px"},attrs:{cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.goToReview.apply(null,arguments)}}},[e._v("Review")]):e._e()],1)])])},m=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticClass:"site-details-title-color"},[e._v("Site Details")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticClass:"site-details-title-color"},[e._v("Contact Details")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticClass:"site-details-title-color"},[e._v("Location Information")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h5",[e._v("Lot/Block/Plan")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h5",[e._v("Address")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h5",[e._v("ATS Description (Standard)")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"e-card-title"},[e._v("\n        Comments\n        "),s("span",{staticClass:"sub-text"},[e._v("\n          - Complete ONLY if submitting to ASCA Tanks for review and updates are required to your site(s)\n        ")])])}],f=(s("a9e3"),s("99af"),s("c041")),v=s("af93"),g=s("aa15"),b=s("e09d"),y=s("4f03"),w=s("e29d"),C=s("b0e8"),x=s("9318"),S=s("4023");c["default"].use(f["a"]);var O,j={name:"SiteDetails",props:{siteId:Number,showReview:Boolean,isSiteReviewReadyData:Object,comments:Array,ownerInfo:{type:Object,default:function(){return{}}}},computed:Object(l["a"])(Object(l["a"])({},Object(h["c"])({loggedUser:"loggedUser",mySites:"mySites"})),{},{emptySiteDetail:function(){return!this.siteId}}),data:function(){return{currentSiteDetails:{},currentSiteTanks:[],toolbarOptions:["Search"],pageSettings:{pageSize:15}}},watch:{siteId:function(e){var t;e&&(this.currentSiteDetails=this.mySites.find((function(t){return t.site_Id===e})),this.currentSiteTanks=this.currentSiteDetails.tanks,null!==(t=this.$refs)&&void 0!==t&&t.siteComments&&this.setCommentBoxValue(e))}},methods:{goToReview:function(){document.getElementById("collapsible_tab").ej2_instances[0].select(3)},created:function(){var e=this;if(this.$refs.refTankInfo){var t=document.getElementById("".concat(this.$refs.refTankInfo.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refTankInfo.$el.id)}))}},clearSearchEventListener:function(e,t){var s=document.getElementById("".concat(t,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(t,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){e.target.value="",document.getElementById("".concat(t,"_clearbutton")).remove()})),e.target.value&&2===s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):e.target.value&&""!==e.target.value||document.getElementById("".concat(t,"_clearbutton")).remove()},cmdTankDetailsClick:function(e){"View"===e.commandColumn.type&&(null===e.rowData.TankId||this.$router.push("tanks/".concat(e.rowData.TankId)))},onCommentsBoxCreation:function(){this.setCommentBoxValue(this.siteId)},setCommentBoxValue:function(e){var t,s,i,r=null!==(t=null===(s=this.comments)||void 0===s||null===(i=s.find((function(t){return t.siteId===e})))||void 0===i?void 0:i.comments)&&void 0!==t?t:"";this.$refs.siteComments.ej2Instances.value=r,this.$parent.changedComments=r},onBackButtonClick:function(){var e=document.getElementById("collapsible_tab");e.ej2_instances[0].select(0)},onInputChange:function(e){this.$parent.checkIfCommentsChange(e.value,this.siteId)},onExportToExcel:function(){var e=x["b"].getAccessToken(),t=this.$store.getters.loggedUser?this.$store.getters.loggedUser.id:"",s=this.ownerInfo.ownerId,i=this.ownerInfo.ownerContactId,r=this.ownerInfo.ownerEmail,n=S["b"].tmsApiRootUrl,a="".concat(n,"/eServicesSite/excel_detail?securitytoken=").concat(e,"&userid=").concat(t,"&siteid=").concat(this.siteId,"&emailAddress=").concat(r,"&ownerId=").concat(s,"&ownerContactId=").concat(i);window.location.href=a}},provide:{grid:[v["a"],g["a"],b["a"],y["a"],w["a"],C["a"]]}},I=j,k=(s("3dd2"),s("2877")),A=Object(k["a"])(I,p,m,!1,null,null,null),E=A.exports,T=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.ownerInfo.ownerId||e.ownerInfo.ownerContact||e.ownerInfo.ownerFullAddress||e.ownerInfo.ownerDetail?s("fieldset",[e._m(0),e.ownerInfo.ownerId?s("div",{staticStyle:{padding:"10px"}},[s("b",[e._v("Owner #: ")]),e._v("\n      "+e._s(e.ownerInfo.ownerId)+"\n    ")]):e._e(),e.ownerInfo.ownerContact?s("div",{staticStyle:{padding:"10px"}},[s("b",[e._v("Owner Name: ")]),e._v("\n      "+e._s(e.ownerInfo.ownerContact)+"\n    ")]):e._e(),e.ownerInfo.ownerFullAddress?s("div",{staticStyle:{padding:"10px"}},[s("b",[e._v("Owner Address: ")]),e._v("\n      "+e._s(e.ownerInfo.ownerFullAddress)+"\n    ")]):e._e(),e.ownerInfo.ownerDetail?s("div",{staticStyle:{padding:"10px"}},[s("b",[e._v("Owner Details: ")]),e._v("\n      "+e._s(e.ownerInfo.ownerDetail)+"\n    ")]):e._e()]):e._e(),e.activeSites?s("fieldset",[e._m(1),e._l(e.activeSites,(function(t,i){return s("div",{key:i,staticStyle:{margin:"10px"}},[s("div",{staticStyle:{padding:"10px"}},[s("div",{staticStyle:{display:"flex","justify-content":"space-between",background:"#0f4b90"}},[s("div",{staticStyle:{padding:"10px","padding-bottom":"10px",color:"white"}},[s("span",{staticStyle:{margin:"0px 3px 0px 0px"}},[e._v("Site Id: ")]),e._v("\n            "+e._s(t.site_Id)+"\n          ")]),e.ownerInfo.ownerContact?s("div",{staticStyle:{padding:"10px",color:"white"}},[s("span",{staticStyle:{margin:"0px 3px 0px 0px"}},[e._v("Site Name: ")]),e._v("\n            "+e._s(t.site_Name)+"\n          ")]):e._e(),e.ownerInfo.ownerFullAddress?s("div",{staticStyle:{padding:"10px","padding-bottom":"10px",color:"white"}},[s("span",{staticStyle:{margin:"0px 3px 0px 0px"}},[e._v("Site Address: ")]),e._v("\n            "+e._s(t.site_Address)+"\n          ")]):e._e()]),s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-content"},[s("ejs-grid",{ref:"refTankInfo",refInFor:!0,attrs:{dataSource:t.tanks,allowSorting:!0,allowPaging:!0,pageSettings:e.pageSettings,toolbar:e.toolbarOptions,allowTextWrap:!0,height:"100%",width:"100%"}},[s("e-columns",[s("e-column",{attrs:{field:"tank_Id",headerText:"Tank Id",textAlign:"Left"}}),s("e-column",{attrs:{field:"tank_Type",headerText:"Tank Type",textAlign:"Left"}}),s("e-column",{attrs:{field:"tank_Serial_No",headerText:"Tank Serial#",textAlign:"Left"}})],1)],1)],1)]),e.getSiteComments(t.site_Id)?s("fieldset",[e._m(2,!0),s("b",[e._v(e._s(e.getSiteComments(t.site_Id)))])]):e._e()])])}))],2):e._e(),e.getSiteComments(null)?s("fieldset",[e._m(3),s("b",[e._v(e._s(e.getSiteComments(null)))])]):e._e(),s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-title"},[e._v("Uploaded Documents")]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("div",{staticStyle:{display:"flex","justify-content":"end"}}),s("ejs-grid",{ref:"documentsGrid",attrs:{dataSource:e.documentsDS,toolbar:e.toolbarOptions,height:"50%",allowSorting:!0,allowExcelExport:!1,allowPaging:!0,pageSettings:e.pageSettings,allowTextWrap:!0}},[s("e-columns",[s("e-column",{attrs:{field:"documentName",width:"400",headerText:"Document Name"}}),s("e-column",{attrs:{headerText:"Date Uploaded",type:"date",format:"dd/MM/yyyy",field:"createDate"}}),s("e-column",{attrs:{headerText:"Uploaded By",field:"createUser"}})],1)],1)],1)]),s("div",{staticStyle:{"margin-left":"50%","margin-top":"10px"}},[s("button",{staticClass:"e-control e-btn e-lib e-primary",on:{click:e.onBackButtonClick}},[e._v("\n      Back\n    ")]),s("button",{staticClass:"e-control e-btn e-lib e-info",on:{click:e.submitButtonClick}},[e._v("\n      Submit For review\n    ")])])])},L=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticStyle:{color:"#0f4b90"}},[e._v("Owner Details")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticStyle:{color:"#0f4b90"}},[e._v("Sites")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticStyle:{color:"#0f4b90"}},[e._v("Site Comments")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("legend",[s("h3",{staticStyle:{color:"#0f4b90"}},[e._v("Summary of Comments")])])}],D=s("895c"),P=function(e,t,s,i){return D["a"].get("/SiteReviews/IsSiteReviewReady?emailAddress=".concat(e,"&ownerId=").concat(t,"&ownerContactId=").concat(s,"&requestId=").concat(i))},N=function(e){return D["a"].post("/SiteReviews/UploadDocument",e)},$=function(e){return D["a"].delete("/SiteReviews/".concat(e))},M=function(e){return D["a"].post("/SiteReviews",e)},_=function(e,t,s,i){return D["a"].post("/SiteReviews/approve?emailAddress=".concat(e,"&ownerId=").concat(t,"&ownerContactId=").concat(s,"&requestId=").concat(i),null)},U=function(e,t,s,i){return D["a"].post("/SiteReviews/reopen?emailAddress=".concat(e,"&ownerId=").concat(t,"&ownerContactId=").concat(s,"&requestId=").concat(i),null)},R=function(e,t,s,i){return D["a"].post("/SiteReviews/submit?emailAddress=".concat(e,"&ownerId=").concat(t,"&ownerContactId=").concat(s,"&requestId=").concat(i),null)},F={name:"SiteReview",props:{comments:Array,documentsDS:{type:Array,default:function(){return null}},ownerInfo:Object},data:function(){return{toolbarOptions:["Search"],pageSettings:{pageSize:10}}},watch:{documentsDS:function(){this.$refs.documentsGrid.refresh()}},computed:Object(l["a"])(Object(l["a"])({},Object(h["c"])({mySites:"mySites",loggedUser:"loggedUser"})),{},{activeSites:function(){return this.mySites?this.mySites.filter((function(e){return"Active"===e.facility_Status})):null}}),methods:{getSiteComments:function(e){var t;return null===(t=this.comments.find((function(t){return t.siteId===e})))||void 0===t?void 0:t.comments},onBackButtonClick:function(){var e=document.getElementById("collapsible_tab");e.ej2_instances[0].select(0)},submitButtonClick:function(){O=d["b"].confirm({title:"Submit Review",content:"Are you sure you want to submit for review?",okButton:{text:"OK",click:this.submit},cancelButton:{text:"Cancel",click:this.hideDeleteDialog},showCloseIcon:!0,closeOnEscape:!0,animationSettings:{effect:"Zoom"}})},hideDeleteDialog:function(){O.hide()},notify:function(e,t){this.$parent.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error !"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$parent.$refs.notifierRef.show()},submit:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.hideDeleteDialog(),t.prev=1,s=e.ownerInfo.ownerId,i=e.ownerInfo.ownerContactId,r=e.$parent.defaultOwner.requestId,r||(r=e.$parent.isSiteReviewReadyData.applicationRequestId),t.next=8,R(e.loggedUser.email,s,i,r).then((function(t){e.$parent.isSiteReviewReadyData=t.data,e.notify("Success !","Review submitted Successfully")}));case 8:a=document.getElementById("collapsible_tab"),a.ej2_instances[0].enableTab(3,!1),a.ej2_instances[0].select(0),t.next=17;break;case 13:t.prev=13,t.t0=t["catch"](1),e.hideDeleteDialog(),e.notify("Error !","Error occurred while submitting review");case 17:case"end":return t.stop()}}),t,null,[[1,13]])})))()}}},B=F,q=Object(k["a"])(B,T,L,!1,null,null,null),H=q.exports,V=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.loading?s("div",[s("h3",[e._v("Loading...")])]):s("div",[s("div",[e.showAllSites?e._e():s("div",[e._v("Operating Review Year: "+e._s(this.reviewYear)+"\n      Registration: "+e._s(this.tmsRegistrationId)+"\n\n      "),e.showFooter&&e.editPermission?s("div",{staticStyle:{"margin-left":"250px","margin-top":"-19px"}},[e.showReview?s("button",{staticClass:"e-control e-btn e-lib e-info",on:{click:function(t){return e.goToReview()}}},[e._v("Review")]):s("button",{staticClass:"e-control e-btn e-lib e-success",on:{click:e.approveButtonClick}},[e._v("\n          Approve\n        ")])]):e._e()]),e.mySitesDS&&e.mySitesDS.length>0?s("div",{staticStyle:{display:"flex","justify-content":"end","margin-top":"-5px"}},[s("ejs-button",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"Button",cssClass:"e-success"},nativeOn:{click:function(t){return e.onExportToExcel.apply(null,arguments)}}},[e._v("\n          Export to Excel\n        ")])],1):e._e(),s("ejs-grid",{ref:"mySitesDSGrid",attrs:{id:"mySitesDSGridId",dataSource:e.mySitesDS,toolbar:e.toolbarOptions,created:e.mySitesCreated,height:"50%",allowSorting:!0,allowExcelExport:!1,allowPaging:!0,pageSettings:e.pageSettings,allowTextWrap:!0,textWrapSettings:e.wrapSettings,commandClick:e.cmdEditClick,rowDataBound:e.rowInvoiceDataBound}},[s("e-columns",[s("e-column",{attrs:{headerText:"Details",textAlign:"Left",width:"95",commands:e.commands}}),s("e-column",{attrs:{headerText:"Approved",textAlign:"Center",width:"110",commands:e.checkIcon}}),s("e-column",{attrs:{field:"site_Id",headerText:"Site #",textAlign:"Center",width:"100"}}),s("e-column",{attrs:{field:"owner_Ref_Num",headerText:"Customer Ref#",textAlign:"center",width:"110"}}),s("e-column",{attrs:{field:"municipality",headerText:"Municipality",textAlign:"Right",width:"180"}}),s("e-column",{attrs:{field:"site_Name",headerText:"Site Name",width:"300"}}),s("e-column",{attrs:{field:"site_Address",headerText:"Site Address",width:"350"}}),e.showAllSites?s("e-column",{attrs:{field:"registration_Status",headerText:"Operating Permit Status",width:"200"}}):e._e(),s("e-column",{attrs:{field:"facility_Status",headerText:"Facility Status",width:"135"}}),s("e-column",{attrs:{field:"hold_Certificates",headerText:"Hold Certificate",width:"120"}}),s("e-column",{attrs:{field:"owner_Id",headerText:"Owner #",textAlign:"center",width:"110"}}),s("e-column",{attrs:{field:"owner_Name",headerText:"Owner Name",textAlign:"center",width:"250"}})],1)],1)],1),e.showAllSites?e._e():s("div",[e.showFooter&&e.editPermission?s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[e._m(0),s("div",{staticStyle:{padding:"10px",height:"95px"}},[s("ejs-textbox",{ref:"ownerComments",attrs:{"float-label-type":"Always",placeholder:"Please add your review comments here:",value:e.ownerComments,maxlength:250,multiline:!0,row:"8"},on:{input:e.onInputChange}})],1)]):e._e(),e.showFooter&&e.editPermission?s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-title"},[e._v("Uploaded Documents")]),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"e-card-content"},[s("div",{staticStyle:{display:"flex","justify-content":"end"}}),s("ejs-grid",{ref:"documentsGrid",attrs:{id:"documentsGridId",created:e.documentsCreated,dataSource:e.documentsDS,toolbar:e.toolbarOptions,height:"50%",allowSorting:!0,allowExcelExport:!1,allowPaging:!0,pageSettings:e.pageSettings,allowTextWrap:!0,commandClick:e.deleteButtonClick}},[s("e-columns",[s("e-column",{attrs:{field:"documentName",width:"400",headerText:"Document Name"}}),s("e-column",{attrs:{headerText:"Date Uploaded",type:"date",format:"dd/MM/yyyy",field:"createDate"}}),s("e-column",{attrs:{headerText:"Uploaded By",field:"createUser"}}),s("e-column",{attrs:{headerText:"Delete Document",commands:e.deleteButton}})],1)],1),s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px",padding:"10px",display:"grid","grid-template-columns":"1fr 1fr"}},[s("div",[s("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[s("ejs-textbox",{ref:"documentNameTextbox",attrs:{"float-label-type":"Always",placeholder:"Enter File Name...",maxlength:250,width:"70%"},on:{input:e.onEnteringDocumentName}}),s("input",{ref:"documentFileUploader",staticStyle:{display:"none"},attrs:{type:"file",id:"document"},on:{change:e.onFileSelection}}),e._m(1),s("button",{ref:"uploadButton",staticClass:"uploadButton e-control e-btn e-lib e-success",attrs:{disabled:e.disableUploadButton},on:{click:e.uploadFile}},[e._v("\n                  Upload File\n                ")])],1),e._m(2)])])],1)]):e._e(),s("div",{staticClass:"e-card",staticStyle:{"margin-top":"5px"}},[s("div",{staticClass:"e-card-title"},[e._v("History")]),s("ejs-grid",{ref:"siteReviewSubmittedHistoriesGrid",attrs:{id:"siteReviewSubmittedHistoriesGridId",created:e.reviewSubmittedHistoryCreated,dataSource:e.siteReviewSubmittedHistories,toolbar:e.toolbarOptions,allowSorting:!0,allowExcelExport:!1,allowPaging:!0,pageSettings:e.pageSettings,allowTextWrap:!0,textWrapSettings:e.wrapSettings,queryCellInfo:e.customiseCell,commandClick:e.openPDF}},[s("e-columns",[s("e-column",{attrs:{field:"submitDate",headerText:"Submit Date",textAlign:"Center",type:"date",format:"MMM dd,yyyy"}}),s("e-column",{attrs:{field:"eventTitle",headerText:"Event Title",textAlign:"Center"}}),s("e-column",{attrs:{field:"reviewYear",headerText:"Year",textAlign:"Center"}}),s("e-column",{attrs:{headerText:"Open Document",textAlign:"Center",width:"200",commands:e.pdfButton}})],1)],1)],1),e.showFooter&&e.editPermission?s("div",{staticStyle:{"margin-left":"50%","margin-top":"10px"}},[e.showReview?s("button",{staticClass:"e-control e-btn e-lib e-info",on:{click:function(t){return e.goToReview()}}},[e._v("Review")]):s("button",{staticClass:"e-control e-btn e-lib e-success",on:{click:e.approveButtonClick}},[e._v("\n          Approve\n        ")])]):e._e()])])])},W=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"e-card-title"},[e._v("Comments\n        "),s("span",{staticClass:"sub-text"},[e._v("- Complete ONLY if submitting to ASCA\n          Tanks for review and updates are required to your site(s)\n        ")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"uploadButton e-control e-btn e-lib e-primary"},[s("label",{attrs:{for:"document"}},[e._v(" Select File ")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{color:"grey","font-size":"12px"}},[s("b",[e._v("Note:")]),e._v(' Do not use special characters: \\\\/:*?"<>|\n              ')])}],Q=(s("b0c0"),s("fb6a"),s("c740"),s("00b4"),s("7de8")),z=s("d769"),K=s("d77f"),Y=s("4f3e"),G=s("2d85"),X=s("ccf4"),Z=s("949c"),J=s("8708"),ee=s("ef97"),te=s("e9ec"),se=s("a956"),ie=s("45a9"),re=s("4f9e"),ne=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),ae=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-filterbarcell"}),t}return ne(t,e),t.prototype.getGui=function(){return this.parent.createElement("div")},t.prototype.render=function(e,t){var s,i=this.parent.element.querySelector(".e-filterbar"),r=this.element.cloneNode(),n=this.getGui(),a=e.column;if(i.appendChild(r),r.setAttribute("e-mappinguid",a.uid),a.filterTemplate){var o={};t&&(o[a.field]=t[a.field]);var l="column";if(o[l]=a,a.visible){var c=this.parent.isReact&&"string"!==typeof a.filterTemplate,u=this.parent.element.id+a.uid+"filterTemplate";if(c)a.getFilterTemplate()(o,this.parent,"filterTemplate",u,null,null,r),this.parent.renderTemplates();else{var d=a.getFilterTemplate()(o,this.parent,"filterTemplate",u);Object(z["f"])(r,d)}}else r.classList.add("e-hide")}else if("checkbox"!==a.type){if(!Object(Q["U"])(a.allowFiltering)&&!a.allowFiltering||Object(Q["U"])(a.filterBarTemplate)){Object(Q["w"])(n,{class:"e-filterdiv e-fltrinputdiv"}),s=this.parent.createElement("input",{id:a.field+"_filterBarcell",className:"e-filtertext",attrs:{type:"search",title:a.headerText+e.attributes.title,value:t[e.column.field]?t[e.column.field]:"",role:"search"}}),n.appendChild(s);h={element:s,floatLabelType:"Never",properties:{enableRtl:this.parent.enableRtl,showClearButton:!0}};ie["a"].createInput(h,this.parent.createElement)}else if(r.classList.add("e-fltrtemp"),Object(Q["w"])(n,{class:"e-fltrtempdiv"}),Object(Q["U"])(a.filterBarTemplate.create))s=this.parent.createElement("input",{id:a.field+"_filterBarcell",className:"e-filterUi_input e-filtertext e-fltrTemp",attrs:{type:"search",title:a.headerText}}),n.appendChild(s);else{var h={column:a,node:Element},p=a.filterBarTemplate.create;if("string"===typeof p&&(p=Object(Q["S"])(p,window)),s=p(h),"string"===typeof s){var m=this.parent.createElement("div");m.innerHTML=s,s=m.firstChild}Object(Q["w"])(n,{class:"e-filterUi_input e-filtertext e-fltrTemp",title:a.headerText,id:a.field+"_filterBarcell"}),n.appendChild(s)}if((!1===a.allowFiltering||""===a.field||Object(Q["U"])(a.field))&&(s.setAttribute("disabled","true"),s.classList.add("e-disable")),a.visible||r.classList.add("e-hide"),this.appendHtml(r,n),this.parent.filterSettings.showFilterBarOperator&&"FilterBar"===this.parent.filterSettings.type&&!this.parent.isPrinting&&Object(Q["U"])(a.filterTemplate)&&Object(Q["U"])(a.filterBarTemplate)&&this.operatorIconRender(n,a,e),(Object(Q["U"])(a.allowFiltering)||a.allowFiltering)&&!Object(Q["U"])(a.filterBarTemplate)){var f=a.filterBarTemplate.write;h={element:s,column:a};"string"===typeof f&&(f=Object(Q["S"])(f,window)),f.call(this,h)}}return r},t.prototype.appendHtml=function(e,t){return e.appendChild(t),e},t.prototype.operatorIconRender=function(e,t,s){var i=this.parent,r=this.parent.createElement("input",{className:" e-filterbaroperator e-icons e-icon-filter",id:s.column.uid});e.querySelector("span").appendChild(r);var n=t.filter&&t.filter.operator?t.filter.operator:"equal";Object(Q["U"])(i.filterModule.operators[t.field])||(n=i.filterModule.operators[t.field]),this.dropOptr=new re["a"]({fields:{text:"text",value:"value"},popupHeight:"auto",value:n,width:"0px",enabled:t.allowFiltering,popupWidth:"auto",enableRtl:this.parent.enableRtl,change:this.internalEvent.bind(this),beforeOpen:function(){var e=i.filterModule.customOperators;this.dataSource=e[i.getColumnByUid(this.element.id).type+"Operator"];for(var s=0;s<this.dataSource.length;s++)t.filter&&t.filter.operator&&Object(Q["U"])(i.filterModule.operators[t.field])&&this.dataSource[s].value===t.filter.operator&&(this.value=t.filter.operator)}}),this.dropOptr.appendTo(r);var a=Object(Q["A"])(this.dropOptr.element,"span");a.classList.add("e-filterbardropdown"),a.removeAttribute("tabindex")},t.prototype.internalEvent=function(e){var t=this.parent,s=t.getColumnByUid(e.element.getAttribute("id"));e.column=s,t.filterModule.operators[s.field]=e.value,t.notify(X["jc"],e)},t}(se["a"]),oe=s("3530"),le=function(){function e(e,t,s,i){this.ddOpen=this.dropDownOpen.bind(this),this.parent=e,this.serviceLocator=s,this.filterSettings=i,this.customFilterOperators=t,this.parent&&(this.parent.on(X["bc"],this.destroyDropDownList,this),this.parent.on(X["zb"],this.destroyDropDownList,this))}return e.prototype.renderOperatorUI=function(e,t,s,i,r){this.dialogObj=i;var n=s.type+"Operator";this.optrData=this.customOptr=Object(Q["U"])(r)?Object(Q["U"])(this.parent.filterSettings.operators)||Object(Q["U"])(this.parent.filterSettings.operators[n])?this.customFilterOperators[n]:this.parent.filterSettings.operators[n]:r;var a=this.customOptr,o=this.dropSelectedVal(s,n),l=this.parent.createElement("div",{className:"e-flm_optrdiv"});e.appendChild(l);var c=this.parent.createElement("input",{id:s.uid+"-floptr"});l.appendChild(c),this.dropOptr=new re["a"]({dataSource:a,fields:{text:"text",value:"value"},cssClass:"e-popup-flmenu",enableRtl:this.parent.enableRtl,text:o}),this.dropOptr.addEventListener(oe["z"],this.ddOpen),this.dropOptr.appendTo("#"+s.uid+"-floptr")},e.prototype.renderResponsiveDropDownList=function(e){e.popup.element.style.width="100%"},e.prototype.dropDownOpen=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString(),this.parent.enableAdaptiveUI&&this.renderResponsiveDropDownList(e)},e.prototype.dropSelectedVal=function(e,t){for(var s="",i=this.parent.filterSettings.columns,r=0,n=i;r<n.length;r++){var a=n[r];if(e.field===a.field||e.isForeignColumn()&&e.foreignKeyValue===a.field){var o=new Y["a"](this.optrData).executeLocal((new G["b"]).where("value","equal",a.operator));s=Object(Q["U"])(o[0])?"":o[0].text}}if(""===s)if(e.filter.operator)for(var l=Object.keys(this.optrData).length,c=0;c<l;c++)this.optrData[c].value===e.filter.operator&&(s=this.optrData[c].text);else s=this.optrData[0].text;return s},e.prototype.getFlOperator=function(){return this.dropOptr.value},e.prototype.destroyDropDownList=function(){this.dropOptr.isDestroyed||(this.dropOptr.removeEventListener(oe["z"],this.ddOpen),this.dropOptr.destroy(),this.parent.off(X["bc"],this.destroyDropDownList),this.parent.off(X["zb"],this.destroyDropDownList))},e}(),ce=s("3294"),ue=function(){function e(e,t,s){this.parent=e,this.serLocator=t,this.filterSettings=s,this.parent&&(this.parent.on(X["bc"],this.destroy,this),this.parent.on(X["zb"],this.destroy,this))}return e.prototype.create=function(e){this.instance=this.parent.createElement("input",{className:"e-flmenu-input",id:"strui-"+e.column.uid}),e.target.appendChild(this.instance),this.dialogObj=e.dialogObj,this.actObj=this.getAutoCompleteOptions(e),this.actObj.appendTo(this.instance)},e.prototype.getAutoCompleteOptions=function(e){var t,s=e.column.isForeignColumn();s&&(t=new G["b"],t.params=this.parent.query.params);var i=s?e.column.dataSource:this.parent.dataSource,r={value:s?e.column.foreignKeyValue:e.column.field},n=new ce["a"](Object(Q["H"])({dataSource:i instanceof Y["a"]?i:new Y["a"](i),fields:r,locale:this.parent.locale,enableRtl:this.parent.enableRtl,query:s?t:this.parent.query.clone(),sortOrder:"Ascending",cssClass:"e-popup-flmenu",autofill:!0,placeholder:e.localizeText.getConstant("EnterValue")},e.column.filter.params));if(this.acFocus=this.focus(n,e),this.acComplete=this.actionComplete(n),this.acOpen=this.openPopup.bind(this),n.addEventListener(oe["m"],this.acFocus),n.addEventListener(oe["z"],this.acOpen),n.addEventListener(X["b"],this.acComplete),i&&"result"in i){var a=this.parent.getQuery?this.parent.getQuery().clone():new G["b"],o=Object(z["o"])({requestType:"stringfilterrequest"},a);this.parent.trigger(X["wb"],o.state);var l=o.deffered;l.promise.then((function(e){n.dataSource=new Y["a"](e)}))}return n},e.prototype.write=function(e){if(""!==e.filteredValue&&!Object(Q["U"])(e.filteredValue)){var t=document.querySelector("#strui-"+e.column.uid).ej2_instances[0];t.value=e.filteredValue}},e.prototype.read=function(e,t,s,i){var r=document.querySelector("#strui-"+t.uid).ej2_instances[0];Q["d"].isDevice&&(r.hidePopup(),r.focusOut());var n=r.value;(Object(Q["U"])(n)||""===n)&&(n=null),i.filterByColumn(t.field,s,n,"and",this.parent.filterSettings.enableCaseSensitivity)},e.prototype.openPopup=function(e){Object(z["O"])(e,this.dialogObj)},e.prototype.focus=function(e,t){return function(){e.filterType=t.getOptrInstance.getFlOperator()}},e.prototype.actionComplete=function(e){return function(t){t.result=t.result.filter((function(t,s,i){return i.map((function(t){return Object(Q["S"])(e.fields.value,t)})).indexOf(Object(Q["S"])(e.fields.value,t))===s}))}},e.prototype.destroy=function(){this.actObj&&!this.actObj.isDestroyed&&(this.actObj.removeEventListener(oe["m"],this.acFocus),this.actObj.removeEventListener(oe["z"],this.acOpen),this.actObj.removeEventListener(X["b"],this.acComplete),this.actObj.destroy(),this.parent.off(X["bc"],this.destroy),this.parent.off(X["zb"],this.destroy))},e}(),de=s("a613"),he=function(){function e(e,t,s){this.filterSettings=s,this.parent=e,this.serviceLocator=t,this.parent&&(this.parent.on(X["bc"],this.destroy,this),this.parent.on(X["zb"],this.destroy,this))}return e.prototype.keyEventHandler=function(e){if(13===e.keyCode||9===e.keyCode){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.dispatchEvent(t)}},e.prototype.create=function(e){this.instance=this.parent.createElement("input",{className:"e-flmenu-input",id:"numberui-"+e.column.uid}),e.target.appendChild(this.instance),this.numericTxtObj=new de["a"](Object(Q["H"])({format:"string"===typeof e.column.format||Object(Q["X"])(e.column.format)?e.column.format:e.column.format.format,locale:this.parent.locale,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("EnterValue"),enableRtl:this.parent.enableRtl},e.column.filter.params)),this.numericTxtObj.appendTo(this.instance)},e.prototype.write=function(e){var t=document.querySelector("#numberui-"+e.column.uid).ej2_instances[0];t.element.addEventListener("keydown",this.keyEventHandler),t.value=e.filteredValue},e.prototype.read=function(e,t,s,i){var r=document.querySelector("#numberui-"+t.uid).ej2_instances[0],n=r.value;i.filterByColumn(t.field,s,n,"and",!0)},e.prototype.destroy=function(){this.numericTxtObj&&!this.numericTxtObj.isDestroyed&&(this.numericTxtObj.destroy(),this.parent.off(X["bc"],this.destroy),this.parent.off(X["zb"],this.destroy))},e}(),pe=function(){function e(e,t,s){this.parent=e,this.serviceLocator=t,this.filterSettings=s,this.parent&&(this.parent.on(X["bc"],this.destroy,this),this.parent.on(X["zb"],this.destroy,this))}return e.prototype.create=function(e){var t=e.column.isForeignColumn(),s=t?e.column.dataSource:this.parent.dataSource,i=t?e.column.foreignKeyValue:e.column.field;this.elem=this.parent.createElement("input",{className:"e-flmenu-input",id:"bool-ui-"+e.column.uid}),e.target.appendChild(this.elem),this.dialogObj=e.dialogObj,this.dropInstance=new re["a"](Object(Q["H"])({dataSource:s instanceof Y["a"]?s:new Y["a"](s),query:(new G["b"]).select(i),fields:{text:i,value:i},placeholder:e.localizeText.getConstant("SelectValue"),cssClass:"e-popup-flmenu",locale:this.parent.locale,enableRtl:this.parent.enableRtl},e.column.filter.params)),this.ddOpen=this.openPopup.bind(this),this.ddComplete=this.actionComplete(i),this.dropInstance.addEventListener(oe["z"],this.ddOpen),this.dropInstance.addEventListener(X["b"],this.ddComplete),this.dropInstance.appendTo(this.elem)},e.prototype.write=function(e){var t=document.querySelector("#bool-ui-"+e.column.uid).ej2_instances[0];Object(Q["U"])(e.filteredValue)||(t.text=e.filteredValue)},e.prototype.read=function(e,t,s,i){var r=document.querySelector("#bool-ui-"+t.uid).ej2_instances[0],n=r.value;i.filterByColumn(t.field,s,n,"and",!1)},e.prototype.openPopup=function(e){Object(z["O"])(e,this.dialogObj)},e.prototype.actionComplete=function(e){return function(t){t.result=K["a"].distinct(t.result,e,!0)}},e.prototype.destroy=function(){this.dropInstance&&!this.dropInstance.isDestroyed&&(this.dropInstance.removeEventListener(oe["z"],this.ddOpen),this.dropInstance.removeEventListener(X["b"],this.ddComplete),this.dropInstance.destroy(),this.parent.off(X["bc"],this.destroy),this.parent.off(X["zb"],this.destroy))},e}(),me=s("0a06"),fe=s("7338"),ve=function(){function e(e,t,s){this.dpOpen=this.openPopup.bind(this),this.parent=e,this.locator=t,this.fltrSettings=s,this.parent&&(this.parent.on(X["bc"],this.destroy,this),this.parent.on(X["zb"],this.destroy,this))}return e.prototype.create=function(e){var t=Object(z["y"])(e.column.format,e.column.type);this.dialogObj=e.dialogObj,this.inputElem=this.parent.createElement("input",{className:"e-flmenu-input",id:"dateui-"+e.column.uid}),e.target.appendChild(this.inputElem),"date"===e.column.type?this.datePickerObj=new me["a"](Object(Q["H"])({format:t,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("ChooseDate"),width:"100%",locale:this.parent.locale,enableRtl:this.parent.enableRtl},e.column.filter.params)):"datetime"===e.column.type&&(this.datePickerObj=new fe["a"](Object(Q["H"])({format:t,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("ChooseDate"),width:"100%",locale:this.parent.locale,enableRtl:this.parent.enableRtl},e.column.filter.params))),this.datePickerObj.addEventListener(oe["z"],this.dpOpen),this.datePickerObj.appendTo(this.inputElem)},e.prototype.write=function(e){var t=document.querySelector("#dateui-"+e.column.uid).ej2_instances[0];t.value=Object(Q["U"])(e.filteredValue)?null:new Date(e.filteredValue)},e.prototype.read=function(e,t,s,i){var r=document.querySelector("#dateui-"+t.uid).ej2_instances[0],n=r.value;n=Object(Q["U"])(n)?null:n,i.filterByColumn(t.field,s,n,"and",!0)},e.prototype.openPopup=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString()},e.prototype.destroy=function(){this.parent.off(X["bc"],this.destroy),this.parent.off(X["zb"],this.destroy),Object(Q["U"])(this.datePickerObj)||this.datePickerObj.isDestroyed||(this.datePickerObj.removeEventListener(oe["z"],this.dpOpen),this.datePickerObj.destroy())},e}(),ge=s("a76a"),be=function(){function e(e,t,s,i,r){this.isDialogOpen=!1,this.maxHeight="350px",this.isMenuCheck=!1,this.colTypes={string:ue,number:he,date:ve,boolean:pe,datetime:ve},this.parent=e,this.filterSettings=t,this.serviceLocator=s,this.customFilterOperators=i,this.filterObj=r,this.flMuiObj=new le(this.parent,this.customFilterOperators,this.serviceLocator),this.l10n=this.serviceLocator.getService("localization"),this.menuFilterBase=new ge["a"](e)}return e.prototype.clearCustomFilter=function(e){this.clearBtnClick(e)},e.prototype.applyCustomFilter=function(e){this.filterBtnClick(e.col)},e.prototype.openDialog=function(e){this.options=e,this.col=this.parent.getColumnByField(e.field),(Object(Q["U"])(this.col.filter)||Object(Q["U"])(this.col.filter.type)||"Menu"===this.col.filter.type)&&this.renderDlgContent(e.target,this.col)},e.prototype.closeDialog=function(e){if(this.dlgObj){(this.parent.isReact||this.parent.isVue)&&Object(z["i"])(this.parent,["filterTemplate"]);var t=document.getElementById(this.dlgObj.element.id);if(this.dlgObj&&!this.dlgObj.isDestroyed&&t){var s={cancel:!1,column:this.col,target:e,element:t};if(this.parent.notify(X["bc"],s),s.cancel)return;this.isDialogOpen=!1,this.isMenuCheck&&(this.menuFilterBase.unWireEvents(),this.parent.off(X["I"],this.actionComplete),this.isMenuCheck=!1),this.dlgObj.destroy(),Object(Q["eb"])(t)}this.parent.notify(X["Zb"],{})}},e.prototype.renderDlgContent=function(e,t){var s={requestType:X["Ub"],columnName:t.field,columnType:t.type},i="filterModel";s[i]=this,this.parent.trigger(X["a"],s);var r=this.parent.createElement("div",{className:"e-flmenu-maindiv",id:t.uid+"-flmenu"});if(this.dlgDiv=this.parent.createElement("div",{className:"e-flmenu",id:t.uid+"-flmdlg"}),this.dlgDiv.setAttribute("aria-label",this.l10n.getConstant("FilterMenuDialogARIA")),this.parent.enableAdaptiveUI){var n=document.querySelector(".e-resfilter > .e-dlg-content > .e-mainfilterdiv");n.appendChild(this.dlgDiv)}else this.parent.element.appendChild(this.dlgDiv);this.dlgObj=new d["a"]({showCloseIcon:!1,closeOnEscape:!1,locale:this.parent.locale,visible:!1,enableRtl:this.parent.enableRtl,created:this.dialogCreated.bind(this,e,t),position:this.parent.element.classList.contains("e-device")?{X:"center",Y:"center"}:{X:"",Y:""},target:this.parent.element.classList.contains("e-device")?document.body:this.parent.element,buttons:[{click:this.filterBtnClick.bind(this,t),buttonModel:{content:this.l10n.getConstant("FilterButton"),isPrimary:!0,cssClass:"e-flmenu-okbtn"}},{click:this.clearBtnClick.bind(this,t),buttonModel:{content:this.l10n.getConstant("ClearButton"),cssClass:"e-flmenu-cancelbtn"}}],content:r,width:!Object(Q["U"])(Object(z["bb"])(e,"e-bigger"))||this.parent.element.classList.contains("e-device")?260:250,animationSettings:{effect:"None"},cssClass:"e-filter-popup"});var a="isStringTemplate";this.dlgObj[a]=!0,this.renderResponsiveDialog(),this.dlgObj.appendTo(this.dlgDiv)},e.prototype.renderResponsiveDialog=function(){var e=this.parent;e.enableAdaptiveUI&&(this.dlgObj.position={X:"",Y:""},this.dlgObj.target=document.querySelector(".e-resfilter > .e-dlg-content > .e-mainfilterdiv"),this.dlgObj.width="100%",this.dlgObj.isModal=!1,this.dlgObj.buttons=[{}])},e.prototype.dialogCreated=function(e,t){!Q["d"].isDevice&&e&&Object(z["A"])(e,this.dlgObj),this.renderFilterUI(e,t),t.showColumnMenu&&this.parent.notify(X["ac"],{}),this.parent.enableAdaptiveUI?(this.dlgObj.element.style.left="0px",this.dlgObj.element.style.maxHeight="none"):this.dlgObj.element.style.maxHeight=this.maxHeight,this.dlgObj.show(),t.filterTemplate||this.writeMethod(t,this.dlgObj.element.querySelector("#"+t.uid+"-flmenu"));var s={requestType:X["Tb"],columnName:t.field,columnType:t.type},i="filterModel";s[i]=this,this.isDialogOpen=!0,this.isMenuCheck||this.parent.trigger(X["b"],s)},e.prototype.renderFilterUI=function(e,t){var s=this.dlgObj.element.querySelector(".e-flmenu-maindiv");this.parent.log("column_type_missing",{column:t}),this.renderOperatorUI(s,e,t),this.renderFlValueUI(s,e,t)},e.prototype.renderOperatorUI=function(e,t,s){this.flMuiObj.renderOperatorUI(e,t,s,this.dlgObj,this.filterObj.menuOperator)},e.prototype.renderFlValueUI=function(e,t,s){var i=this.parent.createElement("div",{className:"e-flmenu-valuediv"}),r=this.filterObj;e.appendChild(i);var n=new this.colTypes[s.type](this.parent,this.serviceLocator,this.parent.filterSettings);if(s.filterTemplate){var a={},o="value";a[s.field]=a[o]=r.values[s.field],s.foreignKeyValue&&(a[s.foreignKeyValue]=r.values[s.field],a[s.field]=void 0);var l="column";a[l]=s;var c=this.parent.isReact&&"string"!==typeof s.filterTemplate,u=this.parent.element.id+s.uid+"filterTemplate";if(c)s.getFilterTemplate()(a,this.parent,"filterTemplate",u,null,null,i),this.parent.renderTemplates();else{var d=s.getFilterTemplate()(a,this.parent,"filterTemplate",u);Object(z["f"])(i,d)}this.isMenuCheck&&(this.menuFilterBase.cBox=this.dlgObj.element.querySelector(".e-checkboxlist.e-fields"),this.menuFilterBase.wireEvents(),this.parent.on(X["I"],this.actionComplete,this),this.menuFilterBase.getAllData())}else if(Object(Q["U"])(s.filter)||Object(Q["U"])(s.filter.ui)||Object(Q["U"])(s.filter.ui.create))n.create({column:s,target:i,getOptrInstance:this.flMuiObj,localizeText:this.l10n,dialogObj:this.dlgObj});else{var h=s.filter.ui.create;"string"===typeof h&&(h=Object(Q["S"])(h,window)),h({column:s,target:i,getOptrInstance:this.flMuiObj,dialogObj:this.dlgObj})}},e.prototype.writeMethod=function(e,t){for(var s,i=t.querySelector(".e-flmenu-valinput"),r=new this.colTypes[e.type](this.parent,this.serviceLocator,this.parent.filterSettings),n=this.filterSettings.columns,a=0,o=n;a<o.length;a++){var l=o[a];e.uid===l.uid&&(s=l.value)}if(Object(Q["U"])(e.filter)||Object(Q["U"])(e.filter.ui)||Object(Q["U"])(e.filter.ui.write))r.write({column:e,target:i,parent:this.parent,filteredValue:s});else{var c=e.filter.ui.write;"string"===typeof c&&(c=Object(Q["S"])(c,window)),c({column:e,target:i,parent:this.parent,filteredValue:s})}},e.prototype.filterBtnClick=function(e){var t=this.dlgObj.element.querySelector(".e-flmenu-valuediv input"),s=this.flMuiObj.getFlOperator(),i=new this.colTypes[e.type](this.parent,this.serviceLocator,this.parent.filterSettings);if(e.filterTemplate){var r=this.dlgDiv.querySelector(".e-flmenu-valuediv"),n=void 0;if(r.children[0].value)n=r.children[0].value;else if(Object(Q["U"])(r.children[0].ej2_instances)){var a=r.querySelector(".e-control");n="boolean"===e.type?a.checked:Object(Q["U"])(a.ej2_instances)?a.value:a.ej2_instances[0].value}else n=(this.parent.isAngular?r.children[0]:r.querySelector("input")).ej2_instances[0].value;this.filterObj.filterByColumn(e.field,s,n)}else if(Object(Q["U"])(e.filter)||Object(Q["U"])(e.filter.ui)||Object(Q["U"])(e.filter.ui.read))i.read(t,e,s,this.filterObj);else{var o=e.filter.ui.read;"string"===typeof o&&(o=Object(Q["S"])(o,window)),o({element:t,column:e,operator:s,fltrObj:this.filterObj})}this.closeDialog(),this.parent.showColumnMenu&&this.parent.notify(X["e"],{})},e.prototype.closeResponsiveDialog=function(){this.closeDialog()},e.prototype.clearBtnClick=function(e){this.filterObj.removeFilteredColsByField(e.field),this.closeDialog();var t=this.parent.showColumnMenu&&e.showColumnMenu?".e-columnmenu":".e-icon-filter",s=this.parent.element.querySelector('[e-mappinguid="'+e.uid+'"]').parentElement,i=s.querySelector(t);i&&i.classList.remove("e-filtered")},e.prototype.destroy=function(){this.closeDialog()},e.prototype.getFilterUIInfo=function(){return{field:this.col.field,operator:this.flMuiObj.getFlOperator()}},e.prototype.renderCheckBoxMenu=function(){return this.isMenuCheck=!0,this.menuFilterBase.updateModel(this.options),this.menuFilterBase.getAndSetChkElem(this.options),this.dlgObj.buttons=[{click:this.menuFilterBase.btnClick.bind(this.menuFilterBase),buttonModel:{content:this.menuFilterBase.getLocalizedLabel("FilterButton"),cssClass:"e-primary",isPrimary:!0}},{click:this.menuFilterBase.btnClick.bind(this.menuFilterBase),buttonModel:{cssClass:"e-flat",content:this.menuFilterBase.getLocalizedLabel("ClearButton")}}],this.menuFilterBase.dialogObj=this.dlgObj,this.menuFilterBase.dlg=this.dlgObj.element,this.menuFilterBase.dlg.classList.add("e-menucheckbox"),this.menuFilterBase.dlg.classList.remove("e-checkboxfilter"),this.maxHeight="800px",this.menuFilterBase.sBox.innerHTML},e.prototype.actionComplete=function(e){this.isMenuCheck&&this.parent.trigger(X["b"],e)},e}(),ye=function(){function e(e,t,s){this.parent=e,this.isresetFocus=!0,this.checkBoxBase=new ge["a"](e),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.checkBoxBase.closeDialog()},e.prototype.openDialog=function(e){this.checkBoxBase.openDialog(e),this.parent.log("column_type_missing",{column:e.column})},e.prototype.closeDialog=function(){this.destroy(),this.isresetFocus&&this.parent.notify(X["kd"],{})},e.prototype.closeResponsiveDialog=function(){this.checkBoxBase.closeDialog()},e.prototype.getModuleName=function(){return"checkboxFilter"},e.prototype.actionBegin=function(e){this.parent.trigger(X["a"],e)},e.prototype.actionComplete=function(e){this.parent.trigger(X["b"],e)},e.prototype.actionPrevent=function(e){Object(z["R"])(this.parent)&&(this.parent.notify(X["Lc"],e),e.cancel=!0)},e.prototype.clearCustomFilter=function(e){this.checkBoxBase.clearFilter(e)},e.prototype.applyCustomFilter=function(){this.checkBoxBase.fltrBtnHandler(),this.checkBoxBase.closeDialog()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(X["H"],this.actionBegin,this),this.parent.on(X["I"],this.actionComplete,this),this.parent.on(X["ec"],this.actionPrevent,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(X["H"],this.actionBegin),this.parent.off(X["I"],this.actionComplete),this.parent.off(X["ec"],this.actionPrevent))},e}(),we=s("39bc"),Ce=s("9db8"),xe=s("cb3f"),Se=s("8d6a"),Oe=s("61be"),je=s("6bba"),Ie=s("462d"),ke=s("9793");function Ae(e,t,s,i,r,n){var a,o,l=t.parentElement;if("vscroll"===i?(a=n||t.getBoundingClientRect().height,o=s.getBoundingClientRect().height):(a=t.getBoundingClientRect().width,o=s.getBoundingClientRect().width),a<o)return Ee(e,t,s,i,r,n);if(l){var c=l.getBoundingClientRect().width;return c<a&&"hscroll"===i?(o=c,t.style.maxWidth=c+"px",Ee(e,t,s,i,r,n)):s}return s}function Ee(e,t,s,i,r,n){var a,o=e("div",{className:"e-menu-"+i});return t.appendChild(o),o.appendChild(s),n?(o.style.overflow="hidden",o.style.height=n+"px"):(o.style.maxHeight=t.style.maxHeight,t.style.overflow="hidden"),"vscroll"===i?(a=new ke["a"]({enableRtl:r},o),a.scrollStep=Object(Q["ib"])(".e-"+i+"-bar",t).offsetHeight/2):(a=new Ie["a"]({enableRtl:r},o),a.scrollStep=Object(Q["ib"])(".e-"+i+"-bar",t).offsetWidth),o}function Te(e,t,s){if(e){var i=Object(Q["ib"])(".e-menu-parent",t);i?s&&s!==i||(e.destroy(),t.parentElement.appendChild(i),Object(Q["F"])(t)):(e.destroy(),Object(Q["F"])(t))}}var Le,De=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),Pe=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},Ne="enter",$e="escape",Me="e-focused",_e="e-menu-header",Ue="e-selected",Re="e-separator",Fe="uparrow",Be="downarrow",qe="leftarrow",He="rightarrow",Ve="home",We="end",Qe="e-caret",ze="e-menu-item",Ke="e-disabled",Ye="e-menu-hide",Ge="e-icons",Xe="e-rtl",Ze="e-menu-popup",Je="Template",et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),Pe([Object(Q["r"])("id")],t.prototype,"itemId",void 0),Pe([Object(Q["r"])("parentId")],t.prototype,"parentId",void 0),Pe([Object(Q["r"])("text")],t.prototype,"text",void 0),Pe([Object(Q["r"])("iconCss")],t.prototype,"iconCss",void 0),Pe([Object(Q["r"])("url")],t.prototype,"url",void 0),Pe([Object(Q["r"])("separator")],t.prototype,"separator",void 0),Pe([Object(Q["r"])("items")],t.prototype,"children",void 0),t}(Q["e"]),tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),Pe([Object(Q["r"])(null)],t.prototype,"iconCss",void 0),Pe([Object(Q["r"])("")],t.prototype,"id",void 0),Pe([Object(Q["r"])(!1)],t.prototype,"separator",void 0),Pe([Object(Q["f"])([],t)],t.prototype,"items",void 0),Pe([Object(Q["r"])("")],t.prototype,"text",void 0),Pe([Object(Q["r"])("")],t.prototype,"url",void 0),t}(Q["e"]),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),Pe([Object(Q["r"])("SlideDown")],t.prototype,"effect",void 0),Pe([Object(Q["r"])(400)],t.prototype,"duration",void 0),Pe([Object(Q["r"])("ease")],t.prototype,"easing",void 0),t}(Q["e"]),it=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.navIdx=[],i.animation=new Q["b"]({}),i.isTapHold=!1,i.tempItem=[],i.showSubMenuOn="Auto",i}return De(t,e),t.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:Object(Q["R"])(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var t=Object(Q["S"])("ej2_instances",this.element);Object(Q["fb"])([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,Object(Q["nb"])("ej2_instances",t,this.element)}else{e=this.createElement("ul",{id:Object(Q["R"])(this.getModuleName())}),Object(Q["v"])([].slice.call(this.element.cloneNode(!0).children),e);var s=this.element.nextElementSibling;s?this.element.parentElement.insertBefore(e,s):this.element.parentElement.appendChild(e),this.clonedElement=e}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var i=this.element,r=Object(Q["S"])("ej2_instances",i),n=(e=this.createElement("ul"),this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"})),a=0,o=i.attributes.length;a<o;a++)e.setAttribute(i.attributes[a].nodeName,i.attributes[a].nodeValue);i.parentNode.insertBefore(n,i),Object(Q["F"])(i),i=e,n.appendChild(i),Object(Q["nb"])("ej2_instances",r,i),this.clonedElement=n,this.element=i,this.element.id||(this.element.id=Object(Q["R"])(this.getModuleName()))}},t.prototype.render=function(){var e=this;this.initialize(),this.renderItems(),this.wireEvents(),this.renderComplete();var t=this.getWrapper();this.template&&this.enableScrolling&&(this.isReact||this.isAngular)&&requestAnimationFrame((function(){Ae(e.createElement,t,e.element,"hscroll",e.enableRtl)}))},t.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&Object(Q["u"])([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add(Xe),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e)),this.defaultOption=this.showItemOnClick},t.prototype.renderItems=function(){if(!this.items.length){var e=Se["a"].createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),Object(Q["T"])()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var t=this.createItems(this.items);if(Object(Q["v"])(Array.prototype.slice.call(t.children),this.element),this.element.classList.add("e-menu-parent"),this.isMenu&&(!this.hamburgerMode&&this.element.classList.contains("e-vertical")&&this.setBlankIconStyle(this.element),this.enableScrolling)){var s=this.getWrapper();this.element.classList.contains("e-vertical")?Ae(this.createElement,s,this.element,"vscroll",this.enableRtl):Ae(this.createElement,s,this.element,"hscroll",this.enableRtl)}},t.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var t=void 0,s=Object(Q["jb"])(this.target),i=0,r=s.length;i<r;i++)t=s[i],this.isMenu?Q["l"].add(t,"click",this.menuHeaderClickHandler,this):Q["d"].isIos?new Q["t"](t,{tapHold:this.touchHandler.bind(this)}):Q["l"].add(t,"contextmenu",this.cmenuHandler,this);if(this.targetElement=t,!this.isMenu){Q["l"].add(this.targetElement,"scroll",this.scrollHandler,this);for(var n=0,a=Object(xe["c"])(this.targetElement);n<a.length;n++){var o=a[n];Q["l"].add(o,"scroll",this.scrollHandler,this)}}}Q["d"].isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),Q["l"].add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),Q["l"].add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),Q["l"].add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=Object(Q["hb"])(e,{selector:"."+ze})},t.prototype.wireKeyboardEvent=function(e){var t={downarrow:Be,uparrow:Fe,enter:Ne,leftarrow:qe,rightarrow:He,escape:$e};this.isMenu&&(t.home=Ve,t.end=We),new Q["n"](e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:t})},t.prototype.mouseDownHandler=function(e){Object(Q["A"])(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||Object(Q["A"])(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},t.prototype.keyBoardHandler=function(e){var t="",s=e.target,i=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([Me,Ue],[Object(Q["A"])(s,".e-"+this.getModuleName()+"-wrapper")]),i)switch(e.action){case He:t=He,e.action=Be;break;case qe:t=qe,e.action=Fe;break;case Be:t=Be,e.action=He;break;case Fe:t=Fe,e.action="";break}else if(this.enableRtl)switch(e.action){case qe:i=!0,t=qe,e.action=He;break;case He:i=!0,t=He,e.action=qe;break}switch(e.action){case Be:case Fe:case We:case Ve:this.upDownKeyHandler(e);break;case He:this.rightEnterKeyHandler(e);break;case qe:this.leftEscKeyHandler(e);break;case Ne:this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case $e:this.leftEscKeyHandler(e);break}i&&(e.action=t)},t.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),s=e.action===Be||e.action===Ve?0:t.childElementCount-1,i=s,r=this.getLIByClass(t,Me);r&&(e.action!==We&&e.action!==Ve&&(i=this.getIdx(t,r)),r.classList.remove(Me),e.action!==We&&e.action!==Ve&&(e.action===Be?i++:i--,i===(e.action===Be?t.childElementCount:-1)&&(i=s)));var n=t.children[i];i=this.isValidLI(n,i,e.action),t.children[i].classList.add(Me),t.children[i].focus()},t.prototype.isValidLI=function(e,t,s){var i=this.getUlByNavIdx();return(e.classList.contains(Re)||e.classList.contains(Ke)||e.classList.contains(Ye))&&(s===Be||s===He?t++:t--),e=i.children[t],(e.classList.contains(Re)||e.classList.contains(Ke)||e.classList.contains(Ye))&&(t=this.isValidLI(e,t,s)),t},t.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var t=[this.getWrapper()].concat([].slice.call(Object(Q["jb"])("."+Ze)))[e];return Object(Q["U"])(t)?null:Object(Q["ib"])(".e-menu-parent",t)}return this.getWrapper().children[e]},t.prototype.rightEnterKeyHandler=function(e){var t,s=this.getUlByNavIdx(),i=this.getLIByClass(s,Me);if(i){var r=this.getIdx(s,i),n=this.navIdx.concat(r),a=this.getItem(n);a.items.length?(this.navIdx.push(r),this.keyType="right",this.action=e.action,this.openMenu(i,a,-1,-1,e)):e.action===Ne&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([Ue],[this.getWrapper()]):i.classList.remove(Me),i.classList.add(Ue),t={element:i,item:a,event:e},this.trigger("select",t),this.closeMenu(null,e))}},t.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):e.action===$e&&this.closeMenu(null,e)},t.prototype.scrollHandler=function(e){this.closeMenu(null,e)},t.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},t.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},t.prototype.closeMenu=function(e,t,s){var i=this;if(void 0===e&&(e=0),void 0===t&&(t=null),this.isMenuVisible()){var r,n,a=void 0,o=this.getWrapper(),l=void 0,c=this.getPopups(),u=!1,d=this.isMenu?c.length+1:o.childElementCount,h=this.isMenu&&1!==d?Object(Q["ib"])(".e-ul",c[d-2]):Object(Q["jb"])(".e-menu-parent",o)[d-1];if(this.isMenu&&h.classList.contains("e-menu")&&(a=this.getLIByClass(h,Ue),a&&a.classList.remove(Ue),u=!0),!u){var p=t&&t.target&&this.getLI(t.target);r=this.navIdx.length?this.getItem(this.navIdx):null,n=r?r.items:this.items,l={element:h,parentItem:r,items:n,event:t,cancel:!1,isFocused:!0},this.trigger("beforeClose",l,(function(a){var o,l,c,u,d,m,f="",v=!a.cancel;(v||i.isCMenu)&&(i.isMenu?(o=Object(Q["A"])(h,"."+Ze),i.hamburgerMode&&(o.parentElement.style.minHeight="",Object(Q["A"])(h,".e-menu-item").setAttribute("aria-expanded","false")),i.unWireKeyboardEvent(o),Te(Object(Q["N"])(o.children[0],ke["a"]),o.children[0]),c=Object(Q["N"])(o,xe["a"]),c.hide(),f=o.id,c.destroy(),Object(Q["F"])(o)):i.toggleAnimation(h,!1),l={element:h,parentItem:r,items:n},i.trigger("onClose",l),i.navIdx.pop()),i.updateReactTemplate();var g=i.getWrapper()&&i.getUlByNavIdx();i.isCMenu&&(i.canOpen(t.target)&&i.openMenu(null,null,i.pageY,i.pageX,t),i.isCMenu=!1),i.isMenu&&g&&f.length&&(u=new RegExp("(.*)-ej2menu-"+i.element.id+"-popup").exec(f)[1],d=g.querySelector('[id="'+u+'"]'),m=p&&g.querySelector('[id="'+p.id+'"]'));var b=p&&p.querySelectorAll(".e-menu-item");if(v&&i.hamburgerMode&&e&&!b.length)i.afterCloseMenu(t);else if(v&&!i.hamburgerMode&&i.navIdx.length&&d&&!m&&"left"!==i.keyType){var y=t&&t.target.classList.contains("e-vscroll")?Object(Q["A"])(t.target,".e-menu-wrapper"):null;y?(y=y.querySelector(".e-menu-item"),(i.showItemOnClick||y&&i.getIndex(y.id,!0).length<=i.navIdx.length)&&i.closeMenu(i.navIdx[i.navIdx.length-1],t,!0)):i.closeMenu(i.navIdx[i.navIdx.length-1],t)}else if(v&&!s&&!e&&(i.hamburgerMode&&i.navIdx.length||1===i.navIdx.length))i.closeMenu(null,t);else if(v&&Object(Q["U"])(e)&&i.navIdx.length)i.closeMenu(null,t);else if(!v||i.isMenu||e||0!==i.navIdx.length||i.isMenusClosed)if(v&&i.isMenu&&t&&t.target&&0!==i.navIdx.length&&Object(Q["A"])(t.target,".e-menu-parent.e-control"))i.closeMenu(0,t);else{if(!v||"right"!==i.keyType&&"click"!==i.keyType){var w=i.getUlByNavIdx(),C=i.getLIByClass(w,Ue);if(C&&(C.setAttribute("aria-expanded","false"),C.classList.remove(Ue),(a.isFocused&&p||"left"===i.keyType)&&(C.classList.add(Me),C.focus())),!v&&i.hamburgerMode&&p&&"false"===p.getAttribute("aria-expanded")&&"true"===p.getAttribute("aria-haspopup")){Object(Q["A"])(p,".e-menu-parent.e-control")?i.navIdx=[]:i.navIdx.pop(),i.navIdx.push(i.cliIdx);var x=i.getItem(i.navIdx);p.setAttribute("aria-expanded","true"),i.openMenu(p,x,-1,-1,t)}}else i.afterCloseMenu(t);i.navIdx.length<1&&("Hover"!==i.showSubMenuOn&&"Click"!==i.showSubMenuOn||(i.showItemOnClick=i.defaultOption,i.showSubMenuOn="Auto"))}else i.isMenusClosed=!0,i.closeMenu(0,t);i.removeStateWrapper()}))}}},t.prototype.updateReactTemplate=function(){if(this.isReact&&this.template&&0===this.navIdx.length){var e=this.portals.splice(0,this.items.length);this.clearTemplate(["template"]),this.portals=e,this.renderReactTemplates()}},t.prototype.getMenuItemModel=function(e,t){if(Object(Q["U"])(e))return null;Object(Q["U"])(t)&&(t=0);var s=this.getFields(t);return{text:e[s.text],id:e[s.id],items:e[s.child],separator:e[s.separator],iconCss:e[s.iconCss],url:e[s.url]}},t.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+Ze)).forEach((function(s){!Object(Q["U"])(s.querySelector("."+ze))&&e.getIndex(s.querySelector("."+ze).id,!0).length&&t.push(s)})),t},t.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&Object(Q["Y"])(this.element).valueOf()},t.prototype.canOpen=function(e){var t=!0;if(this.filter){t=!1;for(var s=this.filter.split(" "),i=0,r=s.length;i<r;i++)if(Object(Q["A"])(e,"."+s[i])){t=!0;break}}return t},t.prototype.openMenu=function(e,t,s,i,r,n){var a=this;void 0===s&&(s=0),void 0===i&&(i=0),void 0===r&&(r=null),void 0===n&&(n=this.targetElement);var o=this.getWrapper();this.lItem=e;var l=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,Object(Q["U"])(s)&&(s=-1),Object(Q["U"])(i)&&(i=-1),e){if(this.uList=this.createItems(t[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&Q["d"].isDevice){o.lastChild.style.display="none";var c={text:t[this.getField("text")].toString(),iconCss:Ge+" e-previous"},u=new tt(this.items[0],"items",c,!0),d=this.createItems([u]).children[0];d.classList.add(_e),this.uList.insertBefore(d,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+Ze,id:e.id+"-ej2menu-"+l+"-popup"}),this.hamburgerMode?(s=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.template&&this.renderReactTemplates(),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&Object(Q["u"])([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.hamburgerMode||this.showItemOnClick||!this.hoverDelay?this.triggerBeforeOpen(e,this.uList,t,r,0,0,"menu"):(window.clearInterval(this.timer),this.timer=window.setTimeout((function(){a.triggerBeforeOpen(e,a.uList,t,r,0,0,"menu")}),this.hoverDelay))):(this.uList.style.zIndex=this.element.style.zIndex,o.appendChild(this.uList),!this.showItemOnClick&&this.hoverDelay?(window.clearInterval(this.timer),this.timer=window.setTimeout((function(){a.triggerBeforeOpen(e,a.uList,t,r,s,i,"none")}),this.hoverDelay)):this.triggerBeforeOpen(e,this.uList,t,r,s,i,"none"))}else this.uList=this.element,this.uList.style.zIndex=Object(xe["d"])(n||this.element).toString(),this.triggerBeforeOpen(e,this.uList,t,r,s,i,"none")},t.prototype.calculateIndentSize=function(e,t){var s=getComputedStyle(t),i=parseInt(s.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?i*=2:i+=i/4,e.style.textIndent=i+"px";var r=e.querySelectorAll(".e-blankicon");if(r&&r.length)for(var n=e.querySelector(".e-menu-icon"),a=getComputedStyle(n),o=parseInt(a.marginRight,10)+n.offsetWidth+i,l=0;l<r.length;l++)r[l].style.textIndent=o+"px"},t.prototype.generatePopup=function(e,t,s,i){var r=this,n=new xe["a"](e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:s,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:i||this.enableRtl?"none":"flip",Y:"fit"},position:i&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:t,open:function(){var e=Object(Q["ib"])(".e-menu-vscroll",n.element);e&&(e.style.height="inherit",e.style.maxHeight="");var t=Object(Q["ib"])(".e-ul",n.element);n.element.style.maxHeight="",t.focus(),r.triggerOpen(t)}});return n},t.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),s=this.enableHtmlSanitizer?Q["s"].sanitize(this.title):this.title,i=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:s}),r=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(i),t.appendChild(r),e.insertBefore(t,this.element)},t.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},t.prototype.closeHamburgerMenu=function(e){var t=this,s={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1};this.trigger("beforeClose",s,(function(s){s.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))}))},t.prototype.callFit=function(e,t,s,i,r){return Object(Oe["a"])(e,null,{X:t,Y:s},{top:i,left:r})},t.prototype.triggerBeforeOpen=function(e,t,s,i,r,n,a){var o=this,l=e?s[this.getField("children",this.navIdx.length-1)]:this.items,c={element:t,items:l,parentItem:s,event:i,cancel:!1,top:r,left:n,showSubMenuOn:"Auto"},u=a;this.trigger("beforeOpen",c,(function(r){switch(u){case"menu":o.hamburgerMode||("Auto"!==r.showSubMenuOn&&(o.showItemOnClick=!o.defaultOption,o.showSubMenuOn=r.showSubMenuOn),o.top=r.top,o.left=r.left),o.popupWrapper.style.display="block",o.hamburgerMode||(o.popupWrapper.style.maxHeight=o.popupWrapper.getBoundingClientRect().height+"px",o.enableScrolling&&Ae(o.createElement,o.popupWrapper,o.uList,"vscroll",o.enableRtl),o.checkScrollOffset(i)),o.hamburgerMode||o.left||o.top?(o.popupObj.collision={X:"none",Y:"none"},o.popupWrapper.style.display=""):(o.popupObj.refreshPosition(o.lItem,!0),o.left=parseInt(o.popupWrapper.style.left,10),o.top=parseInt(o.popupWrapper.style.top,10),o.enableRtl&&(o.left=o.isNestedOrVertical?o.left-o.popupWrapper.offsetWidth-o.lItem.parentElement.offsetWidth+2:o.left-o.popupWrapper.offsetWidth+o.lItem.offsetWidth),o.template&&(o.isReact||o.isAngular)?requestAnimationFrame((function(){o.collision(),o.popupWrapper.style.display=""})):(o.collision(),o.popupWrapper.style.display=""));break;case"none":o.top=r.top,o.left=r.left;break;case"hamburger":r.cancel||(o.element.classList.remove("e-hide-menu"),o.triggerOpen(o.element));break}if("hamburger"!==u)if(r.cancel)o.isMenu?(o.popupObj.destroy(),Object(Q["F"])(o.popupWrapper)):t.className.indexOf("e-ul")>-1&&Object(Q["F"])(t),o.navIdx.pop();else if(o.isMenu)if(o.hamburgerMode)o.popupWrapper.style.top=o.top+"px",o.popupWrapper.style.left="0px",o.toggleAnimation(o.popupWrapper);else{o.setBlankIconStyle(o.popupWrapper),o.wireKeyboardEvent(o.popupWrapper),Object(Q["hb"])(o.popupWrapper,{selector:"."+ze}),"fixed"===o.popupWrapper.style.position&&o.top>0?(o.popupWrapper.style.left=o.left+"px",o.popupWrapper.style.top=o.top+scrollY+"px"):(o.popupWrapper.style.left=o.left+"px",o.popupWrapper.style.top=o.top+"px");var n="None"!==o.animationSettings.effect?{name:o.animationSettings.effect,duration:o.animationSettings.duration,timingFunction:o.animationSettings.easing}:null;o.popupObj.show(n,o.lItem)}else o.setBlankIconStyle(o.uList),o.setPosition(o.lItem,o.uList,o.top,o.left),o.toggleAnimation(o.uList);if("right"===o.keyType){var a=o.getUlByNavIdx();if(e.classList.remove(Me),o.isMenu&&1===o.navIdx.length&&o.removeLIStateByClass([Ue],[o.getWrapper()]),e.classList.add(Ue),o.action===Ne){var l={element:e,item:s,event:i};o.trigger("select",l)}e.focus(),a=o.getUlByNavIdx();var c=o.isValidLI(a.children[0],0,o.action);a.children[c].classList.add(Me),a.children[c].focus()}}))},t.prototype.collision=function(){var e;if(e=Object(Oe["c"])(this.popupWrapper,null,this.left,this.top),(this.isNestedOrVertical||this.enableRtl)&&(e.indexOf("right")>-1||e.indexOf("left")>-1)){this.popupObj.collision.X="none";var t=Object(Q["A"])(this.lItem,".e-"+this.getModuleName()+"-wrapper").offsetWidth;this.left=this.enableRtl?Object(je["a"])(this.lItem,this.isNestedOrVertical?"right":"left","top").left:this.left-this.popupWrapper.offsetWidth-t+2}e=Object(Oe["c"])(this.popupWrapper,null,this.left,this.top),(e.indexOf("left")>-1||e.indexOf("right")>-1)&&(this.left=this.callFit(this.popupWrapper,!0,!1,this.top,this.left).left),this.popupWrapper.style.left=this.left+"px"},t.prototype.setBlankIconStyle=function(e){var t=[].slice.call(e.getElementsByClassName("e-blankicon"));if(t.length){var s=e.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)"),i=s.querySelector(".e-menu-icon");if(i){var r=this.enableRtl?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},n=getComputedStyle(i),a=parseInt(n.fontSize,10);parseInt(n.width,10)&&parseInt(n.width,10)>a&&(a=parseInt(n.width,10));var o=a+parseInt(n[r.margin],10)+parseInt(getComputedStyle(s)[r.padding],10)+"px";t.forEach((function(e){e.style[r.padding]=o}))}}},t.prototype.checkScrollOffset=function(e){var t=this.getWrapper();if(t.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=Object(Q["U"])(e)?this.element:Object(Q["A"])(e.target,"."+ze),i=Object(Q["ib"])(".e-hscroll-bar",t);i.scrollLeft>s.offsetLeft&&(i.scrollLeft-=i.scrollLeft-s.offsetLeft);var r=i.scrollLeft+i.offsetWidth,n=s.offsetLeft+s.offsetWidth;r<n&&(i.scrollLeft+=n-r)}},t.prototype.setPosition=function(e,t,s,i){var r="px";if(this.toggleVisiblity(t),t===this.element||i>-1&&s>-1){var n=Object(Oe["c"])(t,null,i,s);if(n.indexOf("right")>-1&&(i-=t.offsetWidth),n.indexOf("bottom")>-1){var a=this.callFit(t,!1,!0,s,i);if(s=a.top-20,s<0){var o=pageYOffset+document.documentElement.clientHeight-t.getBoundingClientRect().height;o>-1&&(s=o)}}if(n=Object(Oe["c"])(t,null,i,s),n.indexOf("left")>-1){a=this.callFit(t,!0,!1,s,i);i=a.left}}else if(Q["d"].isDevice)s=Number(this.element.style.top.replace(r,"")),i=Number(this.element.style.left.replace(r,""));else{var l=this.enableRtl?"left":"right";a=Object(je["a"])(e,l,"top");s=a.top,i=a.left;n=Object(Oe["c"])(t,null,this.enableRtl?i-t.offsetWidth:i,s);var c=n.indexOf("left")>-1||n.indexOf("right")>-1;c&&(a=Object(je["a"])(e,this.enableRtl?"right":"left","top"),i=a.left),(this.enableRtl||c)&&(i=this.enableRtl&&c?i:i-t.offsetWidth),n.indexOf("bottom")>-1&&(a=this.callFit(t,!1,!0,s,i),s=a.top)}this.toggleVisiblity(t,!1),t.style.top=s+r,t.style.left=i+r},t.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},t.prototype.createItems=function(e){var t=this,s=this.navIdx?this.navIdx.length:0,i=this.getFields(s),r=this.hasField(e,this.getField("iconCss",s)),n={showIcon:r,moduleName:"menu",fields:i,template:this.template,itemNavigable:!0,itemCreating:function(e){e.curData[e.fields[i.id]]||(e.curData[e.fields[i.id]]=Object(Q["R"])("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},t.isMenu&&!e.curData[t.getField("separator",s)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields[i.iconCss]]&&(e.curData[e.fields[i.iconCss]]=null)},itemCreated:function(e){if(e.curData[t.getField("separator",s)]&&(e.item.classList.add(Re),e.item.removeAttribute("role")),!r||e.curData[e.fields.iconCss]||e.curData[t.getField("separator",s)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var i=t.createElement("span",{className:Ge+" "+Qe});e.item.appendChild(i),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),t.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}t.isMenu&&t.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"),e.item.classList.contains("e-level-1")&&e.item.classList.remove("e-level-1"),e.item.classList.contains("e-has-child")&&e.item.classList.remove("e-has-child"));var n={item:e.curData,element:e.item};t.trigger("beforeItemRender",n)}};this.setProperties({items:this.items},!0),this.isMenu&&(n.templateID=this.element.id+Je);var a=Se["a"].createList(this.createElement,e,n,!this.template,this);return a.setAttribute("tabindex","0"),this.isMenu&&a.setAttribute("role","menu"),a},t.prototype.moverHandler=function(e){var t=e.target;this.liTrgt=t;var s,i=this.getLI(t),r=i?Object(Q["A"])(i,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),n=this.getWrapper(),a=new RegExp("-ej2menu-(.*)-popup"),o=!1;if(r){if(s=""!==r.id?a.exec(r.id)[1]:r.querySelector("ul").id,s!==this.element.id){if(this.removeLIStateByClass([Me,Ue],[this.getWrapper()]),!this.navIdx.length)return;o=!0}i&&Object(Q["A"])(i,".e-"+this.getModuleName()+"-wrapper")&&!o?(this.removeLIStateByClass([Me],this.isMenu?[r].concat(this.getPopups()):[r]),this.removeLIStateByClass([Me],this.isMenu?[n].concat(this.getPopups()):[n]),i.classList.add(Me),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&!o&&this.removeLIStateByClass([Me],[r].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||t.parentElement===r||Object(Q["A"])(t,".e-"+this.getModuleName()+"-popup")||i&&(!i||this.getIndex(i.id,!0).length)||"Hover"===this.showSubMenuOn?o&&!this.showItemOnClick&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([Me],[r]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},t.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=Object(Q["A"])(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([Me,Ue],[e])}},t.prototype.removeLIStateByClass=function(e,t){for(var s,i=function(i){e.forEach((function(e){s=Object(Q["ib"])("."+e,t[i]),s&&s.classList.remove(e)}))},r=0;r<t.length;r++)i(r)},t.prototype.getField=function(e,t){void 0===t&&(t=0);var s=this.fields[e];return"string"===typeof s?s:s[t]?s[t].toString():s[s.length-1].toString()},t.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},t.prototype.hasField=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][t])return!0;return!1},t.prototype.menuHeaderClickHandler=function(e){Object(Q["A"])(e.target,".e-menu-wrapper").querySelector("ul.e-menu-parent").id===this.element.id&&(this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},t.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var t=this.getWrapper(),s=e.target,i=this.cli=this.getLI(s),r=new RegExp("-ej2menu-(.*)-popup"),n=i?Object(Q["A"])(i,".e-"+this.getModuleName()+"-wrapper"):null,a=i&&n&&(this.isMenu?this.getIndex(i.id,!0).length>0:t.firstElementChild.id===n.firstElementChild.id);if(Q["d"].isDevice&&this.isMenu&&(this.removeLIStateByClass([Me],[t].concat(this.getPopups())),this.mouseDownHandler(e)),i&&n&&this.isMenu){var o=n.id?r.exec(n.id)[1]:n.querySelector(".e-menu-parent").id;if(this.element.id!==o)return}if(a&&"click"===e.type&&!i.classList.contains(_e)){this.setLISelected(i);var l=this.getIndex(i.id,!0),c=this.getItem(l),u={element:i,item:c,event:e};this.trigger("select",u)}if(a&&("mouseover"===e.type||Q["d"].isDevice||this.showItemOnClick)){var d=void 0;if(i.classList.contains(_e)){d=t.children[this.navIdx.length-1],this.toggleAnimation(d);var h=this.getLIByClass(d,Ue);h&&h.classList.remove(Ue),Object(Q["F"])(i.parentNode),this.navIdx.pop()}else if(!i.classList.contains(Re)){this.showSubMenu=!0;var p=i.parentNode;if(this.cliIdx=this.getIdx(p,i),this.isMenu||!Q["d"].isDevice){var m=this.isMenu?Array.prototype.indexOf.call([t].concat(this.getPopups()),Object(Q["A"])(p,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(t,p);if(this.navIdx[m]===this.cliIdx&&(this.showSubMenu=!1),m!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){h=this.getLIByClass(p,Ue);h&&h.classList.remove(Ue),this.isClosed=!0,this.keyType="click",this.showItemOnClick&&this.setLISelected(i),this.closeMenu(m+1,e),this.showItemOnClick&&this.setLISelected(i)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&Object(Q["A"])(s,".e-menu-vscroll")){var f=Object(Q["A"])(s,"."+Ze),v=Array.prototype.indexOf.call(this.getPopups(),f)+1;v<this.navIdx.length&&(this.closeMenu(v+1,e),f&&this.removeLIStateByClass([Me,Ue],[f]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&(this.isMenu?!s.parentElement.classList.contains("e-menu-wrapper")||this.getIndex(s.querySelector("."+ze).id,!0).length:s.parentElement===t)||(i||this.removeLIStateByClass([Ue],[t]),i&&i.querySelector("."+Qe)||this.closeMenu(null,e))}},t.prototype.afterCloseMenu=function(e){var t;if(this.showSubMenu){t=this.showItemOnClick&&0===this.navIdx.length?Object(Q["A"])(e.target,".e-menu-parent.e-control"):Object(Q["A"])(this.element,".e-menu-parent.e-control");var s=this.navIdx.concat(this.cliIdx),i=this.getItem(s);if(i&&i[this.getField("children",s.length-1)]&&i[this.getField("children",s.length-1)].length?(("mouseover"===e.type||Q["d"].isDevice&&this.isMenu)&&this.setLISelected(this.cli),(!this.hamburgerMode&&t||this.hamburgerMode&&"false"===this.cli.getAttribute("aria-expanded"))&&(this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,i,null,null,e))):"mouseover"!==e.type&&this.closeMenu(null,e),!t){var r=this.getUlByNavIdx(),n=this.getLIByClass(r,Ue);n&&(n.setAttribute("aria-expanded","false"),n.classList.remove(Ue))}}this.keyType=""},t.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,Ue);t&&t.classList.remove(Ue),this.isMenu||e.classList.remove(Me),e.classList.add(Ue)},t.prototype.getLIByClass=function(e,t){for(var s=0,i=e.children.length;s<i;s++)if(e.children[s].classList.contains(t))return e.children[s];return null},t.prototype.getItemIndex=function(e,t){var s;s="string"===typeof e?e:e.id;var i=!1!==t,r=this.getIndex(s,i);return r},t.prototype.setItem=function(e,t,s){var i;i=s?t||e.id:t||e.text;var r=this.getIndex(i,s),n=this.getItem(r);n.iconCss=e.iconCss||n.iconCss,n.text=e.text||n.text,n.url=e.url||n.url,n.separator=e.separator||n.separator},t.prototype.getItem=function(e){e=e.slice();var t=e.pop(),s=this.getItems(e);return s[t]},t.prototype.getItems=function(e){for(var t=this.items,s=0;s<e.length;s++)t=t[e[s]][this.getField("children",s)];return t},t.prototype.setItems=function(e,t){var s=this.getItems(t);s.splice(0,s.length);for(var i=0;i<e.length;i++)s.splice(i,0,e[i])},t.prototype.getIdx=function(e,t,s){void 0===s&&(s=!0);var i=Array.prototype.indexOf.call(e.children,t);return s&&e.children[0].classList.contains(_e)&&i--,i},t.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:Object(Q["A"])(e,"li.e-menu-item")},t.prototype.updateItemsByNavIdx=function(){for(var e=this.items,t=0,s=0;s<this.navIdx.length;s++){if(e=e[s].items,!e)break;t++;var i=this.getUlByNavIdx(t);if(!i)break;this.updateItem(i,e)}},t.prototype.removeChildElement=function(e){while(e.firstElementChild)e.removeChild(e.firstElementChild);return e},t.prototype.onPropertyChanged=function(e,t){for(var s=this,i=this.getWrapper(),r=function(r){switch(r){case"cssClass":t.cssClass&&Object(Q["fb"])([i],t.cssClass.split(" ")),e.cssClass&&Object(Q["u"])([i],e.cssClass.split(" "));break;case"enableRtl":i.classList.toggle(Xe);break;case"showItemOnClick":n.unWireEvents(),n.showItemOnClick=e.showItemOnClick,n.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var a;n.element.classList.contains("e-vertical")?Ae(n.createElement,i,n.element,"vscroll",n.enableRtl):Ae(n.createElement,i,n.element,"hscroll",n.enableRtl),n.getPopups().forEach((function(e){a=Object(Q["ib"])(".e-ul",e),Ae(s.createElement,e,a,"vscroll",s.enableRtl)}))}else{var o=i.children[0];n.element.classList.contains("e-vertical")?Te(Object(Q["N"])(o,ke["a"]),o):Te(Object(Q["N"])(o,Ie["a"]),o),i.style.overflow="",i.appendChild(n.element),n.getPopups().forEach((function(e){o=e.children[0],Te(Object(Q["N"])(o,ke["a"]),o),e.style.overflow=""}))}break;case"items":var l=void 0,c=void 0,u=void 0;if(Object.keys(t.items).length){var d=Object.keys(e.items);for(h=0;h<d.length;h++)c=n.getChangedItemIndex(e,[],Number(d[h])),c.length<=n.getWrapper().children.length&&(l=c.pop(),u=n.getItems(c),n.insertAfter([u[l]],u[l].text),n.removeItem(u,c,l),n.setItems(u,c)),c.length=0}else{if(n.updateItem(n.element,n.items),!n.hamburgerMode)for(var h=1,p=i.childElementCount;h<p;h++)Object(Q["F"])(i.lastElementChild);n.navIdx=[]}break}},n=this,a=0,o=Object.keys(e);a<o.length;a++){var l=o[a];r(l)}},t.prototype.updateItem=function(e,t){Object(Q["T"])()&&!this.isMenu?e=this.removeChildElement(e):e.innerHTML="";var s=[].slice.call(this.createItems(t).children);s.forEach((function(t){e.appendChild(t)}))},t.prototype.getChangedItemIndex=function(e,t,s){t.push(s);var i=Object.keys(e.items[s]).pop();if("items"===i){var r=e.items[s],n=Object.keys(r.items).pop();n&&this.getChangedItemIndex(r,t,Number(n))}else"isParentArray"===i&&t.length>1&&t.pop();return t},t.prototype.removeItem=function(e,t,s){e.splice(s,1);var i=this.getWrapper().children;t.length<i.length&&Object(Q["F"])(i[t.length].children[s])},t.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var t=this.getWrapper();if(e){for(var s=void 0,i=void 0,r=Object(Q["jb"])(e),n=0,a=r.length;n<a;n++)s=r[n],this.isMenu?Q["l"].remove(s,"click",this.menuHeaderClickHandler):Q["d"].isIos?(i=Object(Q["N"])(s,Q["t"]),i&&i.destroy()):Q["l"].remove(s,"contextmenu",this.cmenuHandler);if(!this.isMenu){Q["l"].remove(this.targetElement,"scroll",this.scrollHandler);for(var o=0,l=Object(xe["c"])(this.targetElement);o<l.length;o++){var c=l[o];Q["l"].remove(c,"scroll",this.scrollHandler)}}}Q["d"].isDevice||(Q["l"].remove(this.isMenu?document:t,"mouseover",this.delegateMoverHandler),Q["l"].remove(document,"mousedown",this.delegateMouseDownHandler)),Q["l"].remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(t),this.rippleFn()},t.prototype.unWireKeyboardEvent=function(e){var t=Object(Q["N"])(e,Q["n"]);t&&t.destroy()},t.prototype.toggleAnimation=function(e,t){var s,i,r=this;void 0===t&&(t=!0),"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){r.hamburgerMode?(i=e.element.parentElement,e.element.style.position="absolute",s=i.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",i.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){r.hamburgerMode&&(i.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){r.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",i.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),r.triggerOpen(e.element.children[0])):r.end(e.element,t)}}):this.end(e,t)},t.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,s={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",s)},t.prototype.end=function(e,t){if(t)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+Me))e.querySelector("."+Me).focus();else{var s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1];s?s.querySelector("."+Ue).focus():this.element.focus()}else if(e===this.element){var i=this.getLIByClass(this.element,Me);i&&i.classList.remove(Me);var r=this.getLIByClass(this.element,Ue);r&&r.classList.remove(Ue),e.style.display="none"}else Object(Q["F"])(e)},t.prototype.getPersistData=function(){return""},t.prototype.getWrapper=function(){return Object(Q["A"])(this.element,".e-"+this.getModuleName()+"-wrapper")},t.prototype.getIndex=function(e,t,s,i,r,n){var a;void 0===s&&(s=this.items),void 0===i&&(i=[]),void 0===r&&(r=!1),void 0===n&&(n=0),n=r?n+1:0;for(var o=0,l=s.length;o<l;o++){if(a=s[o],(t?a[this.getField("itemId",n)]:a[this.getField("text",n)])===e){i.push(o);break}if(a[this.getField("children",n)]&&a[this.getField("children",n)].length){if(i=this.getIndex(e,t,a[this.getField("children",n)],i,!0,n),-1!==i[i.length-1]){i.unshift(o);break}o!==l-1&&i.pop()}else o===l-1&&i.push(-1)}return r||-1!==i[0]?i:[]},t.prototype.enableItems=function(e,t,s){var i,r,n;void 0===t&&(t=!0);for(var a,o=Ke,l=0;l<e.length;l++){if(n=this.getIndex(e[l],s),this.navIdx.length){if(1!==n.length){a=!1;for(var c=0,u=n.length-1;c<u;c++)if(n[c]!==this.navIdx[c]){a=!0;break}if(a)continue}}else if(1!==n.length)continue;r=n.pop(),i=this.getUlByNavIdx(n.length),i&&(t?this.isMenu?(i.children[r].classList.remove(o),i.children[r].removeAttribute("aria-disabled")):Q["d"].isDevice&&!i.classList.contains("e-contextmenu")?i.children[r+1].classList.remove(o):i.children[r].classList.remove(o):this.isMenu?(i.children[r].classList.add(o),i.children[r].setAttribute("aria-disabled","true")):Q["d"].isDevice&&!i.classList.contains("e-contextmenu")?i.children[r+1].classList.add(o):i.children[r].classList.add(o))}},t.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},t.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},t.prototype.showHideItems=function(e,t,s){for(var i,r,n,a=0;a<e.length;a++)n=this.getIndex(e[a],s),r=n.pop(),i=this.getUlByNavIdx(n.length),i&&(t?Q["d"].isDevice&&!i.classList.contains("e-contextmenu")?i.children[r+1].classList.add(Ye):i.children[r].classList.add(Ye):Q["d"].isDevice&&!i.classList.contains("e-contextmenu")?i.children[r+1].classList.remove(Ye):i.children[r].classList.remove(Ye))},t.prototype.removeItems=function(e,t){for(var s,i,r,n=0;n<e.length;n++)i=this.getIndex(e[n],t),s=i.pop(),r=this.getItems(i),this.removeItem(r,i,s)},t.prototype.insertAfter=function(e,t,s){this.insertItems(e,t,s)},t.prototype.insertBefore=function(e,t,s){this.insertItems(e,t,s,!1)},t.prototype.insertItems=function(e,t,s,i){var r,n,a,o,l;void 0===i&&(i=!0);for(var c=0;c<e.length;c++){a=this.getIndex(t,s),n=a.pop(),o=this.getItems(a),l=new tt(o[0],"items",e[c],!0),o.splice(i?n+1:n,0,l);var u=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(a.length<u.length){n=i?n+1:n,r=this.createItems(o).children[n];var d=this.isMenu?Object(Q["ib"])(".e-menu-parent",u[a.length]):u[a.length];d.insertBefore(r,d.children[n])}}},t.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach((function(t){e.element.style.removeProperty(t)})),["role","tabindex","class","style"].forEach((function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")}))},t.prototype.destroy=function(){var t=this.getWrapper();if(t){if(this.unWireEvents(),this.isMenu)this.closeMenu(),Object(Q["T"])()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),t.parentNode.insertBefore(this.element,t),this.clonedElement=null;else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)Object(Q["u"])([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==t?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),Object(Q["T"])()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",Object(Q["v"])([].slice.call(this.clonedElement.children),this.element),Object(Q["F"])(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(Object(Q["F"])(this.element),t.style.display="",t.classList.remove("e-"+this.getModuleName()+"-wrapper"),t.removeAttribute("data-ripple")):Object(Q["F"])(t),e.prototype.destroy.call(this),this.template&&this.clearTemplate(["template"])}},Pe([Object(Q["k"])()],t.prototype,"beforeItemRender",void 0),Pe([Object(Q["k"])()],t.prototype,"beforeOpen",void 0),Pe([Object(Q["k"])()],t.prototype,"onOpen",void 0),Pe([Object(Q["k"])()],t.prototype,"beforeClose",void 0),Pe([Object(Q["k"])()],t.prototype,"onClose",void 0),Pe([Object(Q["k"])()],t.prototype,"select",void 0),Pe([Object(Q["k"])()],t.prototype,"created",void 0),Pe([Object(Q["r"])("")],t.prototype,"cssClass",void 0),Pe([Object(Q["r"])(0)],t.prototype,"hoverDelay",void 0),Pe([Object(Q["r"])(!1)],t.prototype,"showItemOnClick",void 0),Pe([Object(Q["r"])("")],t.prototype,"target",void 0),Pe([Object(Q["r"])("")],t.prototype,"filter",void 0),Pe([Object(Q["r"])(null)],t.prototype,"template",void 0),Pe([Object(Q["r"])(!1)],t.prototype,"enableScrolling",void 0),Pe([Object(Q["r"])(!1)],t.prototype,"enableHtmlSanitizer",void 0),Pe([Object(Q["g"])({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},et)],t.prototype,"fields",void 0),Pe([Object(Q["f"])([],tt)],t.prototype,"items",void 0),Pe([Object(Q["g"])({duration:400,easing:"ease",effect:"SlideDown"},st)],t.prototype,"animationSettings",void 0),t=Pe([Q["p"]],t),t}(Q["h"]),rt=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),nt=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},at=function(e){function t(t,s){return e.call(this,t,s)||this}return rt(t,e),t.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||Object(Q["R"])("ej2-contextmenu"),e.prototype.preRender.call(this)},t.prototype.initialize=function(){e.prototype.initialize.call(this),Object(Q["w"])(this.element,{role:"menubar",tabindex:"0"}),this.element.style.zIndex=Object(xe["d"])(this.element).toString()},t.prototype.open=function(t,s,i){e.prototype.openMenu.call(this,null,null,t,s,null,i)},t.prototype.close=function(){e.prototype.closeMenu.call(this)},t.prototype.onPropertyChanged=function(t,s){e.prototype.onPropertyChanged.call(this,t,s);for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];switch(n){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(s.target),this.wireEvents();break}}},t.prototype.getModuleName=function(){return"contextmenu"},nt([Object(Q["r"])("")],t.prototype,"target",void 0),nt([Object(Q["r"])("")],t.prototype,"filter",void 0),nt([Object(Q["f"])([],tt)],t.prototype,"items",void 0),t=nt([Q["p"]],t),t}(it),ot=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),lt=function(e){function t(t,s){var i=e.call(this,t)||this;return i.childRefs=[],i.eventHandlers={},i.isDevice=!1,i.customFilterOperators=s,i.isExcel=!0,i}return ot(t,e),t.prototype.getCMenuDS=function(e,t){var s={number:["Equal","NotEqual","","LessThan","LessThanOrEqual","GreaterThan","GreaterThanOrEqual","Between","","CustomFilter"],string:["Equal","NotEqual","","StartsWith","EndsWith","","Contains","","CustomFilter"]};s.date=s.number,s.datetime=s.number;for(var i=[],r=0;r<s[e].length;r++)s[e][r].length?t?i.push({text:this.getLocalizedLabel(s[e][r])+"...",iconCss:"e-icons e-icon-check "+(t===s[e][r].toLowerCase()?"":"e-emptyicon")}):i.push({text:this.getLocalizedLabel(s[e][r])+"..."}):i.push({separator:!0});return i},t.prototype.destroy=function(){if(this.dlg&&(this.unwireExEvents(),e.prototype.closeDialog.call(this)),!this.isDevice&&this.menuObj){var t=this.menuObj.element.querySelector("li.e-focused");t&&Object(z["bb"])(t,"e-excel-menu")||this.destroyCMenu()}this.dlgObj&&!this.dlgObj.isDestroyed&&this.removeDialog()},t.prototype.createMenu=function(e,t,s,i){var r={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"};this.menu=this.parent.createElement("div",{className:"e-contextmenu-wrapper"}),this.parent.enableRtl?this.menu.classList.add("e-rtl"):this.menu.classList.remove("e-rtl");var n=this.parent.createElement("ul"),a=t?"e-excl-filter-icon e-filtered":"e-excl-filter-icon";if(this.parent.allowSorting&&"grid"===this.parent.getModuleName()&&!this.options.isResponsiveFilter){var o=this.parent.getColumnHeaderByUid(i.uid).getAttribute("aria-sort"),l=this.parent.getColumnByField(i.field).allowSorting,c=l&&"ascending"!==o?"e-excel-ascending":"e-disabled e-excel-ascending",u=l&&"descending"!==o?"e-excel-descending":"e-disabled e-excel-descending",d="string"===e?this.getLocalizedLabel("SortAtoZ"):"datetime"===e||"date"===e?this.getLocalizedLabel("SortByOldest"):this.getLocalizedLabel("SortSmallestToLargest"),h="string"===e?this.getLocalizedLabel("SortZtoA"):"datetime"===e||"date"===e?this.getLocalizedLabel("SortByNewest"):this.getLocalizedLabel("SortLargestToSmallest");n.appendChild(this.createMenuElem(d,c,"e-sortascending")),n.appendChild(this.createMenuElem(h,u,"e-sortdescending"));var p=this.parent.createElement("li",{className:"e-separator e-menu-item e-excel-separator"});n.appendChild(p)}this.options.isResponsiveFilter||n.appendChild(this.createMenuElem(this.getLocalizedLabel("ClearFilter"),t?"":"e-disabled",a)),"boolean"!==e&&n.appendChild(this.createMenuElem(this.getLocalizedLabel(r[e]),"e-submenu",s&&this.ensureTextFilter()?"e-icon-check":a+" e-emptyicon",!0)),this.menu.appendChild(n),this.parent.notify(X["y"],{element:this.menu}),this.parent.notify(X["Uc"],{isFiltered:t})},t.prototype.createMenuElem=function(e,t,s,i){var r=this.parent.createElement("li",{className:t+" e-menu-item"});return r.innerHTML=e,r.insertBefore(this.parent.createElement("span",{className:"e-menu-icon e-icons "+s}),r.firstChild),i&&r.appendChild(this.parent.createElement("span",{className:"e-icons e-caret"})),r},t.prototype.wireExEvents=function(){Q["l"].add(this.dlg,"mouseover",this.hoverHandler,this),Q["l"].add(this.dlg,"click",this.clickExHandler,this)},t.prototype.unwireExEvents=function(){Q["l"].remove(this.dlg,"mouseover",this.hoverHandler),Q["l"].remove(this.dlg,"click",this.clickExHandler)},t.prototype.clickExHandler=function(e){var t={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"},s=Object(z["bb"])(e.target,"e-menu-item");s&&(this.getLocalizedLabel("ClearFilter")===s.innerText.trim()?(this.clearFilter(),this.closeDialog()):this.options.isResponsiveFilter&&this.getLocalizedLabel(t[this.options.type])===s.innerText.trim()&&this.hoverHandler(e))},t.prototype.destroyCMenu=function(){this.isCMenuOpen=!1,this.menuObj&&!this.menuObj.isDestroyed&&(this.menuObj.destroy(),Object(Q["eb"])(this.cmenu),this.parent.notify(X["fd"],{target:null,header:"",isOpen:!1,col:this.options.column}))},t.prototype.hoverHandler=function(e){if(!this.options.isResponsiveFilter||"mouseover"!==e.type){var t,s=e.target.querySelector(".e-contextmenu"),i=Object(z["bb"])(e.target,"e-menu-item"),r=this.menu.querySelector(".e-focused");if(r&&r.classList.remove("e-focused"),i&&(i.classList.add("e-focused"),t=i.classList.contains("e-submenu")),!s){if(!t){var n=this.menu.querySelector(".e-submenu");Object(Q["U"])(n)||n.classList.remove("e-selected"),this.destroyCMenu()}var a=this.ensureTextFilter();if(!this.isCMenuOpen&&t){i.classList.add("e-selected"),this.isCMenuOpen=!0;var o={items:this.getCMenuDS(this.options.type,a?a.replace(/\s/g,""):void 0),select:this.selectHandler.bind(this),onClose:this.destroyCMenu.bind(this),enableRtl:this.parent.enableRtl,beforeClose:this.preventClose.bind(this),cssClass:this.options.isResponsiveFilter?"e-res-contextmenu-wrapper":""};this.parent.element.appendChild(this.cmenu),this.menuObj=new at(o,this.cmenu);var l=this.menu.querySelector(".e-submenu").getBoundingClientRect(),c={top:0,left:0};if(this.options.isResponsiveFilter){var u={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"},d=document.querySelector(".e-responsive-dialog > .e-dlg-header-content"),h=d.offsetHeight+4;this.menuObj.element.style.height="calc(100% - "+h+"px)",this.menuObj.open(h,0,document.body);var p=this.getLocalizedLabel(u[this.options.type]);this.parent.notify(X["fd"],{target:this.menuObj.element.parentElement,header:p,isOpen:!0})}else{if(Q["d"].isDevice){this.isDevice=!0;var m=this.getContextBounds();c.top=(window.innerHeight-m.height)/2,c.left=(window.innerWidth-m.width)/2,this.closeDialog(),this.isDevice=!1}else c.top=Q["d"].isIE?window.pageYOffset+l.top:window.scrollY+l.top,c.left=this.getCMenuYPosition(this.dlg);this.menuObj.open(c.top,c.left,e.target)}Object(z["g"])(this.parent.element,this.menuObj.element.parentElement)}}}},t.prototype.ensureTextFilter=function(){var e,t=this.existingPredicate[this.options.field];return t&&2===t.length?e="greaterthanorequal"===t[0].operator&&"lessthanorequal"===t[1].operator?"between":"customfilter":t&&1===t.length&&(this.optrData=this.customFilterOperators[this.options.type+"Operator"],e=t[0].operator),e},t.prototype.preventClose=function(e){if(this.options&&this.options.isResponsiveFilter&&e.event){var t=e.event.target,s=t.classList.contains("e-resfilterback")||t.classList.contains("e-res-back-btn")||t.classList.contains("e-menu-item");e.cancel=!s}else e.event instanceof MouseEvent&&e.event.target.classList.contains("e-submenu")&&(e.cancel=!0)},t.prototype.getContextBounds=function(){return this.menuObj.element.style.display="block",this.menuObj.element.getBoundingClientRect()},t.prototype.getCMenuYPosition=function(e){var t=this.getContextBounds().width,s=e.getBoundingClientRect(),i=s.right+t-this.parent.element.clientWidth,r=e.offsetWidth-e.clientWidth;return r=r?r+1:0,i<1?s.right+1-r:s.left-t-1+r},t.prototype.openDialog=function(e){var t=this;if(this.updateModel(e),this.getAndSetChkElem(e),this.showDialog(e),!e.cancel){this.dialogObj.dataBind();var s=this.existingPredicate[e.field]&&this.existingPredicate[e.field].length||this.options.filteredColumns.filter((function(e){return t.options.field===e.field})).length;this.createMenu(e.type,s>0,1===s||2===s,e),this.dlg.insertBefore(this.menu,this.dlg.firstChild),this.dlg.classList.add("e-excelfilter"),this.parent.enableRtl&&this.dlg.classList.add("e-rtl"),this.dlg.classList.remove("e-checkboxfilter"),this.cmenu=this.parent.createElement("ul",{className:"e-excel-menu"}),e.column.showColumnMenu&&this.parent.notify(X["ac"],{}),this.wireExEvents()}},t.prototype.closeDialog=function(){this.destroy()},t.prototype.selectHandler=function(e){e.item&&(this.parent.notify(X["Xb"],{}),this.menuItem=e.item,this.renderDialogue(e))},t.prototype.renderDialogue=function(e){var t=this,s=e?e.element:void 0,i=this.options.field,r=!Object(Q["U"])(i)&&Object(z["S"])(i),n=!Object(Q["U"])(i)&&Object(z["x"])(i),a=this.parent.createElement("div",{className:"e-xlfl-maindiv",id:r?n+"-xlflmenu":i+"-xlflmenu"});if(this.dlgDiv=this.parent.createElement("div",{className:"e-xlflmenu",id:r?n+"-xlfldlg":i+"-xlfldlg"}),this.options.isResponsiveFilter){var o=document.querySelector(".e-resfilter > .e-dlg-content > .e-xl-customfilterdiv");o.appendChild(this.dlgDiv)}else this.parent.element.appendChild(this.dlgDiv);this.dlgObj=new d["a"]({header:this.getLocalizedLabel("CustomFilter"),isModal:!0,overlayClick:this.removeDialog.bind(this),showCloseIcon:!0,closeOnEscape:!1,target:document.body,visible:!1,enableRtl:this.parent.enableRtl,open:function(){var e=t.dlgObj.element.querySelector("table.e-xlfl-table>tr");t.options.column.filterTemplate&&e.querySelector("#"+t.options.column.field+"-xlfl-frstvalue").focus()},close:this.removeDialog.bind(this),created:this.createdDialog.bind(this,s,i),buttons:[{click:this.filterBtnClick.bind(this,i),buttonModel:{content:this.getLocalizedLabel("OKButton"),isPrimary:!0,cssClass:"e-xlfl-okbtn"}},{click:this.removeDialog.bind(this),buttonModel:{content:this.getLocalizedLabel("CancelButton"),cssClass:"e-xlfl-cancelbtn"}}],content:a,width:430,animationSettings:{effect:"None"}});var l="isStringTemplate";this.dlgObj[l]=!0,this.renderResponsiveDialog(),this.dlgDiv.setAttribute("aria-label",this.getLocalizedLabel("CustomFilterDialogARIA")),this.childRefs.push(this.dlgObj),this.dlgObj.appendTo(this.dlgDiv)},t.prototype.renderResponsiveDialog=function(){if(this.options.isResponsiveFilter){var e=document.querySelector(".e-row-responsive-filter");e&&e.classList.remove("e-row-responsive-filter"),this.dlgObj.buttons=[{}],this.dlgObj.header=void 0,this.dlgObj.position={X:"",Y:""},this.dlgObj.target=document.querySelector(".e-resfilter > .e-dlg-content > .e-xl-customfilterdiv"),this.dlgObj.width="100%",this.dlgObj.isModal=!1,this.dlgObj.showCloseIcon=!1}},t.prototype.removeDialog=function(){this.parent.notify(X["rb"],{}),(this.parent.isReact||this.parent.isVue)&&void 0!==this.parent.destroyTemplate&&Object(z["i"])(this.parent,["filterTemplate"]),this.removeObjects(this.childRefs),Object(Q["eb"])(this.dlgDiv),this.parent.notify(X["Zb"],{})},t.prototype.createdDialog=function(e,t){if(this.renderCustomFilter(e,t),this.dlgObj.element.style.left="0px",this.options.isResponsiveFilter){var s=document.querySelector(".e-responsive-dialog > .e-dlg-header-content"),i=s.offsetHeight+4;this.dlgObj.element.style.top=i+"px"}else this.dlgObj.element.style.top="0px";!this.options.isResponsiveFilter&&Q["d"].isDevice&&window.innerWidth<440&&(this.dlgObj.element.style.width="90%"),this.parent.notify(X["v"],{column:t,dialog:this.dialogObj}),this.dlgObj.show(),Object(z["g"])(this.parent.element,this.dlgObj.element.parentElement)},t.prototype.renderCustomFilter=function(e,t){var s=this.dlgObj.element.querySelector(".e-xlfl-maindiv"),i=this.parent.createElement("div",{innerHTML:this.getLocalizedLabel("ShowRowsWhere"),className:"e-xlfl-dlgfields"});s.appendChild(i);var r=this.parent.createElement("div",{innerHTML:this.options.displayName,className:"e-xlfl-fieldset"});s.appendChild(r),this.renderFilterUI(t,s)},t.prototype.filterBtnClick=function(e){var t,s=!Object(Q["U"])(e)&&Object(z["S"])(e),i=!Object(Q["U"])(e)&&Object(z["x"])(e),r=s?i:e,n=this.dlgDiv.querySelector("#"+r+"-xlfl-frstvalue").ej2_instances[0],a=this.dlgDiv.querySelector("#"+r+"-xlfl-frstoptr").ej2_instances[0],o=this.dlgDiv.querySelector("#"+r+"-xlfl-secndvalue").ej2_instances[0],l=this.dlgDiv.querySelector("#"+r+"-xlfl-secndoptr").ej2_instances[0];if("string"===this.options.type){var c=this.dlgDiv.querySelector("#"+r+"-xlflmtcase").ej2_instances[0];t=c.checked}var u=this.dlgDiv.querySelector("#"+r+"e-xlfl-frstpredicate").ej2_instances[0],d=u.checked?"and":"or";null===o.value&&(d="or"),this.filterByColumn(this.options.field,a.value,n.value,d,t,this.options.ignoreAccent,l.value,o.value),this.removeDialog()},t.prototype.filterByColumn=function(e,t,s,i,r,n,a,o){var l,c=this.parent.getColumnByField?this.parent.getColumnByField(e):this.options.column,u=this.isForeignColumn(c)?c.foreignKeyValue:e,d=[];d.push({field:u,predicate:i,matchCase:r,ignoreAccent:n,operator:t,value:s,type:this.options.type});var h={instance:this,handler:this.filterByColumn,arg1:e,arg2:t,arg3:s,arg4:i,arg5:r,arg6:n,arg7:a,arg8:o,cancel:!1};if(this.parent.notify(X["ec"],h),!h.cancel){l=new G["a"](u,t.toLowerCase(),s,!r,n),Object(Q["U"])(o)||Object(Q["U"])(a)||(d.push({field:u,predicate:i,matchCase:r,ignoreAccent:n,operator:a,value:o,type:this.options.type}),l=l[i](u,a.toLowerCase(),o,!r,n));var p={action:"filtering",filterCollection:d,field:this.options.field,ejpredicate:l,actualPredicate:d};this.isForeignColumn(c)?this.foreignKeyFilter(p,d,l):this.options.handler(p)}},t.prototype.renderOperatorUI=function(e,t,s,i,r){var n=this.parent.createElement("tr",{className:"e-xlfl-fields"});t.appendChild(n);var a=this.parent.createElement("td",{className:"e-xlfl-optr"});n.appendChild(a);var o=this.parent.createElement("div",{className:"e-xlfl-optrdiv"}),l=!Object(Q["U"])(e)&&Object(z["S"])(e),c=!Object(Q["U"])(e)&&Object(z["x"])(e),u=this.parent.createElement("input",{id:l?c+s:e+s});o.appendChild(u),a.appendChild(o);var d=this.options.type+"Operator",h=this.customFilterOperators[d];this.optrData=h;var p=this.dropSelectedVal(this.options.column,i,r),m="";this.menuItem&&(m=this.menuItem.text.slice(0,-3),m!==this.getLocalizedLabel("CustomFilter")&&(p=r?m:void 0),m===this.getLocalizedLabel("Between")&&(p=this.getLocalizedLabel(r?"GreaterThanOrEqual":"LessThanOrEqual")));var f=this.options.column,v=new re["a"](Object(z["p"])({dataSource:h,fields:{text:"text",value:"value"},text:p,enableRtl:this.parent.enableRtl},f.filter.params));this.childRefs.push(v);var g={open:this.dropDownOpen.bind(this),change:this.dropDownValueChange.bind(this)};Object(z["gb"])(u.id,[oe["z"],oe["f"]],g,this),v.addEventListener(oe["z"],this.eventHandlers[u.id][oe["z"]]),v.addEventListener(oe["f"],this.eventHandlers[u.id][oe["f"]]),v.appendTo(u);var b=this.getSelectedValue(p);return{fieldElement:n,operator:b}},t.prototype.removeHandlersFromComponent=function(e){e.element.classList.contains("e-dropdownlist")?Object(z["ib"])(e,[oe["z"],oe["f"]],this):e.element.classList.contains("e-autocomplete")&&Object(z["ib"])(e,[X["b"],oe["m"]],this)},t.prototype.dropDownOpen=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString()},t.prototype.dropDownValueChange=function(e){e.element.id.includes("-xlfl-frstoptr")?this.firstOperator=e.value.toString():this.secondOperator=e.value.toString()},t.prototype.getFilterUIInfo=function(){return{firstOperator:this.firstOperator,secondOperator:this.secondOperator,field:this.options.field}},t.prototype.getSelectedValue=function(e){var t=new Y["a"](this.optrData).executeLocal((new G["b"]).where("text","equal",e));return Object(Q["U"])(t[0])?"":t[0].value},t.prototype.dropSelectedVal=function(e,t,s){var i;return i=t&&t.length>0?2===t.length?s?t[0].operator:t[1].operator:s?t[0].operator:void 0:s&&"string"===e.type&&!e.filter.operator?"startswith":s?e.filter.operator||"equal":void 0,this.getSelectedText(i)},t.prototype.getSelectedText=function(e){var t=new Y["a"](this.optrData).executeLocal((new G["b"]).where("value","equal",e));return Object(Q["U"])(t[0])?"":t[0].text},t.prototype.renderFilterUI=function(e,t){var s=this.existingPredicate[e],i=this.parent.createElement("table",{className:"e-xlfl-table"});t.appendChild(i);var r=this.parent.createElement(oe["h"]);r.innerHTML='<col style="width: 50%"></col><col style="width: 50%"></col>',i.appendChild(r);var n=this.renderOperatorUI(e,i,"-xlfl-frstoptr",s,!0);this.firstOperator=n.operator,this.renderFlValueUI(e,n,"-xlfl-frstvalue",s,!0);var a=this.parent.createElement("tr",{className:"e-xlfl-predicate"});i.appendChild(a),this.renderRadioButton(e,a,s),n=this.renderOperatorUI(e,i,"-xlfl-secndoptr",s,!1),this.secondOperator=n.operator,this.renderFlValueUI(e,n,"-xlfl-secndvalue",s,!1)},t.prototype.renderRadioButton=function(e,t,s){var i=this.parent.createElement("td",{className:"e-xlfl-radio",attrs:{colSpan:"2"}});t.appendChild(i);var r=this.parent.createElement("div",{className:"e-xlfl-radiodiv",attrs:{style:"display: inline-block"}}),n=!Object(Q["U"])(e)&&Object(z["S"])(e),a=!Object(Q["U"])(e)&&Object(z["x"])(e),o=this.parent.createElement("input",{id:n?a+"e-xlfl-frstpredicate":e+"e-xlfl-frstpredicate",attrs:{type:"radio"}}),l=this.parent.createElement("input",{id:n?a+"e-xlfl-secndpredicate":e+"e-xlfl-secndpredicate",attrs:{type:"radio"}});r.appendChild(o),r.appendChild(l),i.appendChild(r),"string"===this.options.type&&this.renderMatchCase(e,t,i,"-xlflmtcase",s);var c=new we["a"]({label:this.getLocalizedLabel("AND"),name:"default",checked:!0,enableRtl:this.parent.enableRtl});this.childRefs.push(c);var u=new we["a"]({label:this.getLocalizedLabel("OR"),name:"default",enableRtl:this.parent.enableRtl});this.childRefs.push(u);var d=s&&2===s.length?s[1].predicate:"and";"and"===d?(c.checked=!0,u.checked=!1):(u.checked=!0,c.checked=!1),c.appendTo(o),u.appendTo(l),c.element.nextElementSibling.classList.add("e-xlfl-radio-and"),u.element.nextElementSibling.classList.add("e-xlfl-radio-or")},t.prototype.removeObjects=function(e){for(var t=0,s=e;t<s.length;t++){var i=s[t];i&&!i.isDestroyed&&(this.removeHandlersFromComponent(i),i.destroy())}},t.prototype.renderFlValueUI=function(e,t,s,i,r){var n=this.parent.createElement("td",{className:"e-xlfl-value"});t.fieldElement.appendChild(n);var a=!Object(Q["U"])(e)&&Object(z["S"])(e),o=!Object(Q["U"])(e)&&Object(z["x"])(e),l=this.parent.createElement("div",{className:"e-xlfl-valuediv"}),c=this.options.filteredColumns.some((function(t){return e===t.field})),u=this.options.filteredColumns.filter((function(t){return t.field===e}));if(this.options.column.filterTemplate){var d={},h=this.options.column;c&&s&&(d=this.getExcelFilterData(s,d,h,i,u));var p=this.parent.isReact&&"string"!==typeof this.options.column.filterTemplate,m=this.parent.element.id+h.uid+"filterTemplate";if(p)this.options.column.getFilterTemplate()(d,this.parent,"filterTemplate",m,null,null,l),this.parent.renderTemplates();else{var f=this.options.column.getFilterTemplate()(d,this.parent,"filterTemplate",m);Object(z["f"])(l,f)}(this.parent.isAngular?l.children[0]:l.querySelector("input")).id=a?o+s:e+s,n.appendChild(l)}else{var v=this.parent.createElement("input",{id:a?o+s:e+s});l.appendChild(v),n.appendChild(l);var g=void 0,b=void 0;i&&i.length>0&&(b=2===i.length?r?i[0]:i[1]:r?i[0]:void 0,g=b&&b.operator===t.operator?b.value:void 0,Object(Q["U"])(g)&&(g=void 0));var y={string:this.renderAutoComplete.bind(this),number:this.renderNumericTextBox.bind(this),date:this.renderDate.bind(this),datetime:this.renderDateTime.bind(this)};y[this.options.type](this.options,e,v,g,this.parent.enableRtl)}},t.prototype.getExcelFilterData=function(e,t,s,i,r){var n="-xlfl-frstvalue"===e?0:1;if("-xlfl-frstvalue"===e||r.length>1){t={column:i instanceof Array?i[n]:i};var a=this.options.column.columnData&&r.length>1?1===this.options.column.columnData.length?0:1:n;t[this.options.field]=s.foreignKeyValue?this.options.column.columnData[a][s.foreignKeyValue]:r[a].value,this.options.foreignKeyValue&&(t[this.options.foreignKeyValue]=this.options.column.columnData[a][s.foreignKeyValue])}return t},t.prototype.renderMatchCase=function(e,t,s,i,r){var n=this.parent.createElement("div",{className:"e-xlfl-matchcasediv",attrs:{style:"display: inline-block"}}),a=!Object(Q["U"])(e)&&Object(z["S"])(e),o=!Object(Q["U"])(e)&&Object(z["x"])(e),l=this.parent.createElement("input",{id:a?o+i:e+i,attrs:{type:"checkbox"}});n.appendChild(l),s.appendChild(n);var c=!!(r&&r.length>0)&&(r&&2===r.length?r[1].matchCase:r[0].matchCase),u=new Ce["a"]({label:this.getLocalizedLabel("MatchCase"),enableRtl:this.parent.enableRtl,checked:c});this.childRefs.push(u),u.appendTo(l)},t.prototype.renderDate=function(e,t,s,i,r){var n=Object(z["y"])(e.format,e.type)||e.format,a=new me["a"](Object(z["p"])({format:n,cssClass:"e-popup-flmenu",placeholder:this.getLocalizedLabel("CustomFilterDatePlaceHolder"),width:"100%",enableRtl:r,value:new Date(i),locale:this.parent.locale},e.column.filter.params));this.childRefs.push(a),a.appendTo(s)},t.prototype.renderDateTime=function(e,t,s,i,r){var n=Object(z["y"])(e.format,e.type),a=new fe["a"](Object(z["p"])({format:n,cssClass:"e-popup-flmenu",placeholder:this.getLocalizedLabel("CustomFilterDatePlaceHolder"),width:"100%",enableRtl:r,value:new Date(i),locale:this.parent.locale},e.column.filter.params));this.childRefs.push(a),a.appendTo(s)},t.prototype.completeAction=function(e){e.result=Object(z["m"])(e.result)},t.prototype.renderNumericTextBox=function(e,t,s,i,r){var n=new de["a"](Object(z["p"])({format:e.format,placeholder:this.getLocalizedLabel("CustomFilterPlaceHolder"),enableRtl:r,value:i,locale:this.parent.locale},e.column.filter.params));this.childRefs.push(n),n.appendTo(s)},t.prototype.renderAutoComplete=function(e,t,s,i,r){var n=this.options.column,a=this.isForeignColumn(n),o=a?n.dataSource:e.dataSource,l={value:a?n.foreignKeyValue:t},c=new ce["a"](Object(z["p"])({dataSource:o instanceof Y["a"]?o:new Y["a"](o),fields:l,query:this.getQuery(),sortOrder:"Ascending",locale:this.parent.locale,cssClass:"e-popup-flmenu",autofill:!0,placeholder:this.getLocalizedLabel("CustomFilterPlaceHolder"),enableRtl:r,text:i},n.filter.params));if(o&&"result"in o){var u=Object(z["o"])({requestType:"stringfilterrequest"},this.getQuery());this.parent.trigger(X["wb"],u.state);var d=u.deffered;d.promise.then((function(e){c.dataSource=new Y["a"](e)}))}this.childRefs.push(c);var h={actionComplete:this.acActionComplete(c,t),focus:this.acFocus(c,t,e,s)};Object(z["gb"])(s.id,[X["b"],oe["m"]],h,this),c.addEventListener(oe["m"],this.eventHandlers[s.id][oe["m"]]),c.addEventListener(X["b"],this.eventHandlers[s.id][X["b"]]),c.appendTo(s)},t.prototype.acActionComplete=function(e,t){return function(s){var i=!Object(Q["U"])(t)&&Object(z["S"])(t);s.result=s.result.filter((function(t,s,r){return r.map((function(t){return i?Object(z["cb"])(e.fields.value,t):t[e.fields.value]})).indexOf(i?Object(z["cb"])(e.fields.value,t):t[e.fields.value])===s}))}},t.prototype.acFocus=function(e,t,s,i){var r=this;return function(){var n=!Object(Q["U"])(t)&&Object(z["S"])(t),a=!Object(Q["U"])(t)&&Object(z["x"])(t),o=n?a:t;e.filterType=r.dlgDiv.querySelector("#"+o+(i.id===o+"-xlfl-frstvalue"?"-xlfl-frstoptr":"-xlfl-secndoptr")).ej2_instances[0].value,e.ignoreCase="string"!==s.type||!r.dlgDiv.querySelector("#"+o+"-xlflmtcase").ej2_instances[0].checked,e.filterType=Object(Q["U"])(e.filterType)?"equal":e.filterType}},t}(ge["a"]),ct=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),ut=function(e){function t(t,s,i,r){var n=e.call(this,t,s,i)||this;return n.parent=t,n.isresetFocus=!0,n.excelFilterBase=new lt(t,r),n}return ct(t,e),t.prototype.destroy=function(){this.excelFilterBase.closeDialog()},t.prototype.openDialog=function(e){this.excelFilterBase.openDialog(e)},t.prototype.closeDialog=function(){this.excelFilterBase.closeDialog(),this.isresetFocus&&this.parent.notify(X["kd"],{})},t.prototype.clearCustomFilter=function(e){this.excelFilterBase.clearFilter(e)},t.prototype.closeResponsiveDialog=function(e){e?this.excelFilterBase.removeDialog():this.closeDialog()},t.prototype.applyCustomFilter=function(e){e.isCustomFilter?this.excelFilterBase.filterBtnClick(e.col.field):(this.excelFilterBase.fltrBtnHandler(),this.excelFilterBase.closeDialog())},t.prototype.filterByColumn=function(e,t,s,i,r,n,a,o){this.excelFilterBase.filterByColumn(e,t,s,i,r,n,a,o)},t.prototype.getFilterUIInfo=function(){return this.excelFilterBase.getFilterUIInfo()},t.prototype.getModuleName=function(){return"excelFilter"},t}(ye),dt=function(){function e(e,t,s){this.predicate="and",this.contentRefresh=!0,this.filterByMethod=!0,this.refresh=!0,this.values={},this.operators={},this.cellText={},this.nextFlMenuOpen="",this.type={Menu:be,CheckBox:ye,Excel:ut},this.filterOperators={contains:"contains",endsWith:"endswith",equal:"equal",greaterThan:"greaterthan",greaterThanOrEqual:"greaterthanorequal",lessThan:"lessthan",lessThanOrEqual:"lessthanorequal",notEqual:"notequal",startsWith:"startswith"},this.fltrDlgDetails={field:"",isOpen:!1},this.skipNumberInput=["="," ","!"],this.skipStringInput=[">","<","="],this.actualPredicate={},this.parent=e,this.filterSettings=t,this.serviceLocator=s,this.addEventListener(),this.setFullScreenDialog()}return e.prototype.render=function(e){if(!(K["a"].getObject("args.isFrozen",e)||this.parent.getFrozenMode()===oe["w"]&&K["a"].getObject("args.renderFrozenRightContent",e))){var t=this.parent;if(this.l10n=this.serviceLocator.getService("localization"),this.getLocalizedCustomOperators(),"FilterBar"===this.parent.filterSettings.type&&t.columns.length){var s=this.parent.element.querySelector(".e-filterbar");s&&Object(Q["eb"])(s);var i=new J["a"](this.serviceLocator,Z["a"].Filter,t),r=this.serviceLocator.getService("cellRendererFactory");r.addCellRenderer(Z["a"].Filter,new ae(this.parent,this.serviceLocator)),this.valueFormatter=this.serviceLocator.getService("valueFormatter"),i.element=this.parent.createElement("tr",{className:"e-filterbar"});var n=this.generateRow();if(n.data=this.values,"Right"===t.getFrozenMode()){var a=t.getFrozenRightHeader().querySelector("thead");a.appendChild(i.element)}else this.parent.getHeaderContent().querySelector("thead").appendChild(i.element);var o=this.parent.element.querySelector(".e-rowdragheader");this.element=i.render(n,t.getColumns(),null,null,i.element);var l=this.element.querySelector(".e-detailheadercell");l&&(l.className="e-filterbarcell e-mastercell"),o&&(o.className="e-dragheadercell e-mastercell");var c=[].slice.call(this.element.getElementsByClassName("e-grouptopleftcell"));c.length&&c[c.length-1].classList.add("e-lastgrouptopleftcell"),this.wireEvents(),this.parent.notify(X["gc"],{case:"filter"})}}},e.prototype.showCustomFilter=function(e){this.responsiveDialogRenderer.isCustomDialog=e,this.responsiveDialogRenderer.showResponsiveDialog(this.column)},e.prototype.setFilterModel=function(e){var t=e.filter.type||this.parent.filterSettings.type;this.filterModule=new this.type[t](this.parent,this.parent.filterSettings,this.serviceLocator,this.customOperators,this)},e.prototype.destroy=function(){var e=this.parent.element;if(e&&(e.querySelector("."+oe["u"])||e.querySelector("."+oe["s"]))){if(this.filterModule&&this.filterModule.destroy(),this.parent.refreshing||!this.parent.isDestroyed&&this.parent.allowFiltering||(this.filterSettings.columns=[]),this.updateFilterMsg(),this.removeEventListener(),this.unWireEvents(),"FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator)for(var t=[].slice.call(this.element.getElementsByClassName("e-filterbaroperator")),s=0;s<t.length;s++)t[s].ej2_instances[0]&&t[s].ej2_instances[0].destroy();if(this.element){this.element.parentElement&&Object(Q["eb"])(this.element);var i=this.parent.getHeaderContent().querySelector(".e-filterbar");this.parent.isFrozenGrid()&&i&&Object(Q["eb"])(i)}}},e.prototype.setFullScreenDialog=function(){this.serviceLocator&&this.serviceLocator.registerAdaptiveService(this,this.parent.enableAdaptiveUI,Z["c"].isFilter)},e.prototype.generateRow=function(){var e={},t=new te["a"](e);return t.cells=this.generateCells(),t},e.prototype.generateCells=function(){var e=[];if(this.parent.allowGrouping)for(var t=0,s=this.parent.groupSettings.columns.length;t<s;t++)e.push(this.generateCell({},Z["a"].HeaderIndent));(this.parent.detailTemplate||this.parent.childGrid)&&e.push(this.generateCell({},Z["a"].DetailHeader)),this.parent.isRowDragable()&&"Right"!==this.parent.getFrozenMode()&&e.push(this.generateCell({},Z["a"].RowDragHIcon));for(var i=0,r=this.parent.getColumns();i<r.length;i++){var n=r[i];e.push(this.generateCell(n))}return"Right"===this.parent.getFrozenMode()&&e.push(this.generateCell({},Z["a"].RowDragHIcon)),e},e.prototype.generateCell=function(e,t){var s={visible:e.visible,isDataCell:!1,rowId:"",column:e,cellType:t||Z["a"].Filter,attributes:{title:this.l10n.getConstant("FilterbarTitle")}};return new ee["a"](s)},e.prototype.updateModel=function(){var e=this.parent.getColumnByField(this.fieldName);this.filterObjIndex=this.getFilteredColsIndexByField(e),this.prevFilterObject=this.filterSettings.columns[this.filterObjIndex];for(var t=Array.isArray(this.value)?this.value:[this.value],s=this.parent.dataSource.adaptor&&this.parent.dataSource.adaptor.getModuleName?this.parent.dataSource.adaptor.getModuleName():void 0,i=0,r=t.length;i<r;i++){var n=e.isForeignColumn()?e.foreignKeyValue:this.fieldName,a="notequal"===this.operator;this.currentFilterObject={field:n,uid:e.uid,isForeignKey:e.isForeignColumn(),operator:this.operator,value:t[i],predicate:this.predicate,matchCase:this.matchCase,ignoreAccent:this.ignoreAccent,actualFilterValue:{},actualOperator:{}};var o=this.getFilteredColsIndexByField(e);o>-1&&!Array.isArray(this.value)?this.filterSettings.columns[o]=this.currentFilterObject:this.filterSettings.columns.push(this.currentFilterObject),!Object(Q["U"])(this.value)||"equal"!==this.operator&&"notequal"!==this.operator||"ODataAdaptor"===s||"ODataV4Adaptor"===s||(this.filterSettings.columns=[],"string"===e.type&&this.filterSettings.columns.push({field:n,ignoreAccent:this.ignoreAccent,matchCase:this.matchCase,operator:this.operator,predicate:a?"and":"or",value:""}),this.filterSettings.columns.push({field:n,ignoreAccent:this.ignoreAccent,matchCase:this.matchCase,operator:this.operator,predicate:a?"and":"or",value:void 0}),this.filterSettings.columns.push({field:n,ignoreAccent:this.ignoreAccent,matchCase:this.matchCase,operator:this.operator,predicate:a?"and":"or",value:null}))}this.filterSettings.columns=this.filterSettings.columns,this.parent.dataBind()},e.prototype.getFilteredColsIndexByField=function(e){for(var t=this.filterSettings.columns,s=0,i=t.length;s<i;s++)if(t[s].uid===e.uid||e.isForeignColumn()&&this.parent.getColumnByUid(e.uid).field===e.foreignKeyValue)return s;return-1},e.prototype.onActionComplete=function(e){var t=this.isRemove?{requestType:"filtering",type:X["b"]}:{currentFilterObject:this.currentFilterObject,currentFilteringColumn:Object(Q["U"])(this.column)?void 0:this.column.field,columns:this.filterSettings.columns,requestType:"filtering",type:X["b"]};this.parent.trigger(X["b"],Object(Q["H"])(e,t)),this.isRemove=!1},e.prototype.wireEvents=function(){Q["l"].add(this.parent.getHeaderContent(),"keyup",this.keyUpHandlerImmediate,this)},e.prototype.unWireEvents=function(){Q["l"].remove(this.parent.getHeaderContent(),"keyup",this.keyUpHandlerImmediate)},e.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&(this.parent.getHeaderTable().classList.add("e-sortfilter"),this.render())},e.prototype.refreshFilterValue=function(){"FilterBar"===this.filterSettings.type&&this.filterSettings.columns.length&&!this.parent.getCurrentViewRecords().length&&this.parent.enablePersistence&&(this.initialEnd(),this.parent.removeEventListener(X["w"],this.refreshFilterValueFn))},e.prototype.initialEnd=function(){if(this.parent.off(X["ob"],this.initialEnd),this.parent.getColumns().length&&this.filterSettings.columns.length){var e=this.parent;this.contentRefresh=!1,this.initialLoad=!0;for(var t=0,s=e.filterSettings.columns;t<s.length;t++){var i=s[t];this.filterByColumn(i.field,i.operator,i.value,i.predicate,i.matchCase,i.ignoreAccent,i.actualFilterValue,i.actualOperator)}this.initialLoad=!1,this.updateFilterMsg(),this.contentRefresh=!0}},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(X["Bd"],this.setFullScreenDialog,this),this.parent.on(X["Md"],this.enableAfterRender,this),this.parent.on(X["Yb"],this.onActionComplete,this),this.parent.on(X["uc"],this.onPropertyChanged,this),this.parent.on(X["Cc"],this.keyUpHandler,this),this.parent.on(X["hb"],this.columnPositionChanged,this),this.parent.on(X["rc"],this.render,this),this.parent.on(X["ob"],this.initialEnd,this),this.parent.on(X["bc"],this.filterMenuClose,this),this.docClickHandler=this.clickHandler.bind(this),Q["l"].add(document,"click",this.docClickHandler,this),Q["l"].add(this.parent.element,"mousedown",this.refreshClearIcon,this),this.parent.on(X["cc"],this.columnMenuFilter,this),this.parent.on(X["V"],this.filterIconClickHandler,this),this.parent.on("persist-data-changed",this.initialEnd,this),this.parent.on(X["Y"],this.clickHandler,this),this.parent.on(X["zb"],this.destroy,this),this.refreshFilterValueFn=this.refreshFilterValue.bind(this),this.parent.addEventListener(X["w"],this.refreshFilterValueFn))},e.prototype.removeEventListener=function(){Q["l"].remove(document,"click",this.docClickHandler),Q["l"].remove(this.parent.element,"mousedown",this.refreshClearIcon),this.parent.isDestroyed||(this.parent.off(X["Bd"],this.setFullScreenDialog),this.parent.off(X["Md"],this.enableAfterRender),this.parent.off(X["Yb"],this.onActionComplete),this.parent.off(X["uc"],this.onPropertyChanged),this.parent.off(X["Cc"],this.keyUpHandler),this.parent.off(X["hb"],this.columnPositionChanged),this.parent.off(X["rc"],this.render),this.parent.off(X["cc"],this.columnMenuFilter),this.parent.off(X["bc"],this.filterMenuClose),this.parent.off(X["V"],this.filterIconClickHandler),this.parent.off(X["Y"],this.clickHandler),this.parent.off(X["zb"],this.destroy))},e.prototype.refreshClearIcon=function(e){if(this.parent.allowFiltering&&"FilterBar"===this.parent.filterSettings.type&&e.target.classList.contains("e-clear-icon")){var t=e.target.previousElementSibling;ie["a"].setValue(null,t,"Never",!0),"Immediate"===this.filterSettings.mode&&this.removeFilteredColsByField(t.id.slice(0,-14))}},e.prototype.filterMenuClose=function(){this.fltrDlgDetails.isOpen=!1},e.prototype.filterByColumn=function(e,t,s,i,r,n,a,o){var l,c=this,u=this.parent;if(this.column=u.grabColumnByFieldFromAllCols(e),"FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator&&Object(Q["U"])(this.column.filterBarTemplate)&&(t=this.getOperatorName(e)),this.column)if("FilterBar"===this.filterSettings.type&&(l=u.getHeaderContent().querySelector("[id='"+this.column.field+"_filterBarcell']")),Object(Q["U"])(this.column.allowFiltering)||this.column.allowFiltering)if(Object(z["R"])(u))u.notify(X["Lc"],{instance:this,handler:this.filterByColumn,arg1:e,arg2:t,arg3:s,arg4:i,arg5:r,arg6:n,arg7:a,arg8:o});else{if(this.predicate=i||(Array.isArray(s)?"or":"and"),this.value=s,this.matchCase=r||!1,this.ignoreAccent=this.ignoreAccent=Object(Q["U"])(n)?this.parent.filterSettings.ignoreAccent:n,this.fieldName=e,this.operator=t,s=Object(Q["U"])(s)?s:s.toString(),"number"!==this.column.type&&"date"!==this.column.type||(this.matchCase=!0),u.getColumnHeaderByField(e).setAttribute("aria-filtered","true"),l&&"FilterBar"===this.filterSettings.type){if(s&&s.length<1||!this.filterByMethod&&this.checkForSkipInput(this.column,s))return this.filterStatusMsg=s&&s.length<1?"":this.l10n.getConstant("InvalidFilterMessage"),void this.updateFilterMsg();l.value!==s&&(l.value=s)}Object(Q["U"])(this.column.format)?this.values[this.column.field]=s:(this.applyColumnFormat(s),this.initialLoad&&"FilterBar"===this.filterSettings.type&&(l.value=this.values[this.column.field]));var d={field:this.fieldName,predicate:i,matchCase:r,ignoreAccent:n,operator:this.operator,value:this.value,type:this.column.type},h=this.parent.filterSettings.columns.filter((function(e){return e.field===c.fieldName}));h.length>1&&!Object(Q["U"])(this.actualPredicate[this.fieldName])?this.actualPredicate[this.fieldName].push(d):this.actualPredicate[this.fieldName]=[d],this.checkAlreadyColFiltered(this.column.field)||this.updateModel()}else this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),columnName:this.column.headerText})},e.prototype.applyColumnFormat=function(e){var t=this,s="date"===this.column.type||"datetime"===this.column.type?new Date(e):parseFloat(e);("date"===this.column.type||"datetime"===this.column.type)&&e&&e.split(",").length>1?this.values[this.column.field]=e.split(",").map((function(e){return t.setFormatForFlColumn(new Date(e),t.column)})):this.values[this.column.field]=this.setFormatForFlColumn(s,this.column)},e.prototype.skipUid=function(e){for(var t=!0,s=Object.keys(e),i=0;i<s.length;i++){var r=Object.keys(e[s[i]]);1===r.length&&"uid"===r[0]&&(t=!1)}return t},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName())for(var t=0,s=Object.keys(e.properties);t<s.length;t++){var i=s[t];switch(i){case"columns":var r="columns",n={currentFilterObject:this.currentFilterObject,currentFilteringColumn:this.column?this.column.field:void 0,action:"filter",columns:this.filterSettings.columns,requestType:"filtering",type:X["a"],cancel:!1};if(this.contentRefresh&&this.skipUid(e.properties[r])){if(this.parent.notify(X["Fc"],n),n.cancel)return void(Object(Q["U"])(this.prevFilterObject)?this.filterSettings.columns.splice(this.filterSettings.columns.length-1,1):this.filterSettings.columns[this.filterObjIndex]=this.prevFilterObject);this.updateFilterIcon(),this.refreshFilterSettings(),this.updateFilterMsg(),this.updateFilter()}break;case"showFilterBarStatus":e.properties[i]?this.updateFilterMsg():this.parent.allowPaging&&this.parent.updateExternalMessage("");break;case"showFilterBarOperator":case"type":this.parent.refreshHeader(),this.refreshFilterSettings();break}}},e.prototype.refreshFilterSettings=function(){if("FilterBar"===this.filterSettings.type){for(var e=0;e<this.filterSettings.columns.length;e++){this.column=this.parent.grabColumnByUidFromAllCols(this.filterSettings.columns[e].uid);var t=this.filterSettings.columns[e].value;if(t=!Object(Q["U"])(t)&&t.toString(),Object(Q["U"])(this.column.format)){var s=this.filterSettings.columns[e].field;this.values[s]=this.filterSettings.columns[e].value}else this.applyColumnFormat(t);var i=this.getFilterBarElement(this.column.field);i&&(""===this.cellText[this.filterSettings.columns[e].field]||Object(Q["U"])(this.cellText[this.filterSettings.columns[e].field])?i.value=this.filterSettings.columns[e].value:i.value=this.cellText[this.column.field])}if(0===this.filterSettings.columns.length){var r=this.parent.getColumns();for(e=0;e<r.length;e++){i=this.getFilterBarElement(r[e].field);i&&""!==i.value&&(i.value="",delete this.values[r[e].field])}}}},e.prototype.updateFilterIcon=function(){if(0===this.filterSettings.columns.length&&this.parent.element.querySelector(".e-filtered"))for(var e=[].slice.call(this.parent.element.getElementsByClassName("e-filtered")),t=0,s=e.length;t<s;t++)e[t].removeAttribute("aria-filtered"),e[t].classList.remove("e-filtered")},e.prototype.getFilterBarElement=function(e){var t,s="[id='"+e+"_filterBarcell']";return s&&!Object(Q["U"])(this.element)&&(t=this.element.querySelector(s)),t},e.prototype.refreshFilter=function(){this.refreshFilterSettings(),this.updateFilterMsg()},e.prototype.clearFiltering=function(e){var t=this,s=Object(z["r"])(this.filterSettings.columns);if(!Object(Q["U"])(e))return this.refresh=!1,e.forEach((function(e){t.removeFilteredColsByField(e,!1)})),this.parent.setProperties({filterSettings:{columns:this.filterSettings.columns}},!0),this.parent.renderModule.refresh(),void(this.refresh=!0);if(Object(z["R"])(this.parent))this.parent.notify(X["Lc"],{instance:this,handler:this.clearFiltering});else{for(var i=0;i<s.length;i++)s[i].uid=s[i].uid||this.parent.getColumnByField(s[i].field).uid;var r=s.map((function(e){return e.uid})),n=r.filter((function(e,t){return r.indexOf(e)===t}));this.refresh=!1;i=0;for(var a=n.length;i<a;i++)this.removeFilteredColsByField(this.parent.getColumnByUid(n[i]).field,!1);if(this.refresh=!0,n.length&&this.parent.renderModule.refresh(),0===this.parent.filterSettings.columns.length&&this.parent.element.querySelector(".e-filtered")){var o=[].slice.call(this.parent.element.getElementsByClassName("e-filtered"));for(i=0,a=o.length;i<a;i++)o[0].removeAttribute("aria-filtered"),o[0].classList.remove("e-filtered")}this.isRemove=!0,this.filterStatusMsg="",this.updateFilterMsg()}},e.prototype.checkAlreadyColFiltered=function(e){for(var t=this.filterSettings.columns,s=0,i=t;s<i.length;s++){var r=i[s];if(r.field===e&&r.value===this.value&&r.operator===this.operator&&r.predicate===this.predicate)return!0}return!1},e.prototype.columnMenuFilter=function(e){this.column=e.col;var t=Object(Q["A"])(e.target,"#"+e.id);e.isClose&&!t?this.filterModule.closeDialog():t&&this.filterDialogOpen(this.column,e.target)},e.prototype.filterDialogOpen=function(e,t,s,i){this.filterModule&&this.filterModule.closeDialog(),this.setFilterModel(e),this.filterModule.openDialog(this.createOptions(e,t,s,i))},e.prototype.createOptions=function(e,t,s,i){var r=this.parent,n=e.filter.dataSource||r.dataSource&&"result"in r.dataSource?r.dataSource:r.getDataModule().dataManager,a=e.filter.type||this.parent.filterSettings.type,o={type:e.type,field:e.field,displayName:e.headerText,dataSource:n,format:e.format,height:800,columns:r.getColumns(),filteredColumns:r.filterSettings.columns,target:t,dataManager:r.getDataModule().dataManager,formatFn:e.getFormatter(),ignoreAccent:r.filterSettings.ignoreAccent,parserFn:e.getParser(),query:r.query,template:e.getFilterItemTemplate(),hideSearchbox:!Object(Q["U"])(e.filter.hideSearchbox)&&e.filter.hideSearchbox,handler:this.filterHandler.bind(this),localizedStrings:r.getLocaleConstants(),position:{X:s,Y:i},column:e,foreignKeyValue:e.foreignKeyValue,actualPredicate:this.actualPredicate,localeObj:r.localeObj,isRemote:r.getDataModule().isRemote(),allowCaseSensitive:this.filterSettings.enableCaseSensitivity,isResponsiveFilter:this.parent.enableAdaptiveUI,operator:this.actualPredicate[e.field]&&"Menu"===a?this.actualPredicate[e.field][0].operator:"equal"};return o},e.prototype.removeFilteredColsByField=function(e,t){var s,i=this.filterSettings.columns;if(Object(z["R"])(this.parent)){var r={instance:this,handler:this.removeFilteredColsByField,arg1:e,arg2:t};this.parent.notify(X["Lc"],r)}else{for(var n=i.map((function(e){return e.uid})),a=n.filter((function(e,t){return n.indexOf(e)===t})),o=function(r,n){i[r].uid=i[r].uid||l.parent.getColumnByField(i[r].field).uid;var o=i.length,c=l.parent.grabColumnByUidFromAllCols(a[r]);if(c.field===e||c.field===c.foreignKeyValue&&c.isForeignColumn()){var u=l.filterSettings.columns.filter((function(e){return e.uid===c.uid}))[0];if("FilterBar"===l.filterSettings.type&&!t){var d="[id='"+c.field+"_filterBarcell']";s=l.parent.getHeaderContent().querySelector(d),s&&(s.value="",delete l.values[e])}while(o--)i[o].uid===c.uid&&i.splice(o,1);var h=l.parent.getColumnHeaderByField(c.field);if(h.removeAttribute("aria-filtered"),"FilterBar"!==l.filterSettings.type){var p=l.parent.showColumnMenu&&c.showColumnMenu?".e-columnmenu":".e-icon-filter";h.querySelector(p).classList.remove("e-filtered")}return l.isRemove=!0,l.actualPredicate[e]&&delete l.actualPredicate[e],l.values[e]&&delete l.values[e],l.refresh&&l.parent.notify(X["Fc"],{requestType:"filtering",type:X["a"],currentFilterObject:u,currentFilterColumn:c,action:"clearFilter"}),"break"}},l=this,c=0,u=a.length;c<u;c++){var d=o(c,u);if("break"===d)break}this.updateFilterMsg()}},e.prototype.getModuleName=function(){return"filter"},e.prototype.keyUpHandlerImmediate=function(e){13!==e.keyCode&&this.keyUpHandler(e)},e.prototype.keyUpHandler=function(e){var t=this.parent,s=e.target;if(s&&Object(Q["Z"])(s,".e-filterbar input")){var i=Object(Q["A"])(s,"th.e-filterbarcell");if(this.column=t.getColumnByUid(i.getAttribute("e-mappinguid")),!this.column)return;if("altDownArrow"===e.action&&this.parent.filterSettings.showFilterBarOperator){var r=Object(Q["A"])(s,"span").querySelector(".e-filterbaroperator");r.ej2_instances[0].showPopup(),r.focus()}"Immediate"!==this.filterSettings.mode&&(13!==e.keyCode||e.target.classList.contains("e-filterbaroperator"))||9===e.keyCode||this.column.filterTemplate||(this.value=s.value.trim(),this.processFilter(e))}if("altDownArrow"===e.action&&"FilterBar"!==this.filterSettings.type){var n=t.focusModule.currentInfo.element;if(n&&n.classList.contains("e-headercell")){var a=t.getColumnByUid(n.firstElementChild.getAttribute("e-mappinguid"));this.openMenuByField(a.field),this.parent.focusModule.clearIndicator()}}"escape"===e.action&&"Menu"===this.filterSettings.type&&this.filterModule&&(this.filterModule.closeDialog(),t.notify(X["kd"],{}))},e.prototype.updateCrossIcon=function(e){e.value.length&&e.nextElementSibling.classList.remove("e-hide")},e.prototype.updateFilterMsg=function(){if("FilterBar"===this.filterSettings.type){var e=this.parent,t=void 0,s=this.filterSettings.columns,i=void 0;if(!this.filterSettings.showFilterBarStatus)return;if(s.length>0&&this.filterStatusMsg!==this.l10n.getConstant("InvalidFilterMessage")){this.filterStatusMsg="";for(var r=0;r<s.length;r++)if(i=e.grabColumnByUidFromAllCols(s[r].uid)||e.grabColumnByFieldFromAllCols(s[r].field),r&&(this.filterStatusMsg+=" && "),Object(Q["U"])(i.format))this.filterStatusMsg+=i.headerText+": "+this.values[i.field];else{var n="date"===i.type||"datetime"===i.type?this.valueFormatter.fromView(this.values[i.field],i.getParser(),i.type):this.values[i.field];if("date"!==i.type&&"datetime"!==i.type){var a=this.serviceLocator.getService("valueFormatter");t=a.toView(n,i.getParser()).toString()}else t=this.setFormatForFlColumn(n,i);this.filterStatusMsg+=i.headerText+": "+t}}e.allowPaging&&e.updateExternalMessage(this.filterStatusMsg),this.filterStatusMsg=""}},e.prototype.setFormatForFlColumn=function(e,t){var s=this.serviceLocator.getService("valueFormatter");return s.toView(e,t.getFormatter()).toString()},e.prototype.checkForSkipInput=function(e,t){var s;if("number"===e.type)(K["a"].operatorSymbols[t]||this.skipNumberInput.indexOf(t)>-1)&&(s=!0);else if("string"===e.type)for(var i=0,r=t;i<r.length;i++){var n=r[i];this.skipStringInput.indexOf(n)>-1&&(s=!0)}return s},e.prototype.processFilter=function(e){this.stopTimer(),this.startTimer(e)},e.prototype.startTimer=function(e){var t=this;this.timer=window.setInterval((function(){t.onTimerTick()}),13===e.keyCode?0:this.filterSettings.immediateModeDelay)},e.prototype.stopTimer=function(){window.clearInterval(this.timer)},e.prototype.onTimerTick=function(){var e,t="[id='"+this.column.field+"_filterBarcell']",s=this.element.querySelector(t);if(!s&&this.parent.isFrozenGrid()&&(s=this.parent.getHeaderContent().querySelector(t)),this.cellText[this.column.field]=s.value,this.stopTimer(),Object(Q["U"])(this.column.filterBarTemplate))e=JSON.parse(JSON.stringify(s.value));else{var i=this.column.filterBarTemplate.read;"string"===typeof i&&(i=Object(Q["S"])(i,window)),Object(Q["U"])(i)||(this.value=i.call(this,s))}Object(Q["U"])(this.value)||""===this.value?this.removeFilteredColsByField(this.column.field):(this.validateFilterValue(this.value),this.filterByMethod=!1,this.filterByColumn(this.column.field,this.operator,this.value,this.predicate,this.filterSettings.enableCaseSensitivity,this.ignoreAccent),this.filterByMethod=!0,s.value=e,this.updateFilterMsg())},e.prototype.validateFilterValue=function(e){var t,s;switch(this.matchCase=this.filterSettings.enableCaseSensitivity,this.column.type){case"number":this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.equal,t=[">","<","=","!"];for(var i=0;i<e.length;i++)if(t.indexOf(e[i])>-1){s=i;break}this.getOperator(e.substring(s)),0!==s&&(this.value=e.substring(0,s)),""!==this.value&&e.length>=1&&(this.value=this.valueFormatter.fromView(this.value,this.column.getParser(),this.column.type)),isNaN(this.value)&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage"));break;case"date":case"datetime":this.operator=this.filterOperators.equal,""===this.value||this.value instanceof Date||(this.getOperator(e),this.value=this.valueFormatter.fromView(this.value,this.column.getParser(),this.column.type),Object(Q["U"])(this.value)&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage")));break;case"string":this.matchCase=!1,"*"===e.charAt(0)?(this.value=this.value.slice(1),this.operator=this.filterOperators.startsWith):"%"===e.charAt(e.length-1)?(this.value=this.value.slice(0,-1),this.operator=this.filterOperators.startsWith):"%"===e.charAt(0)?(this.value=this.value.slice(1),this.operator=this.filterOperators.endsWith):this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.startsWith;break;case"boolean":"true"===e.toLowerCase()||"1"===e?this.value=!0:"false"===e.toLowerCase()||"0"===e?this.value=!1:e.length&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage")),this.operator=this.filterOperators.equal;break;default:this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.equal}},e.prototype.getOperator=function(e){var t=e.charAt(0),s=e.slice(0,2),i=Object(Q["H"])({"=":this.filterOperators.equal,"!":this.filterOperators.notEqual},K["a"].operatorSymbols);(i.hasOwnProperty(t)||i.hasOwnProperty(s))&&(this.operator=i[t],this.value=e.substring(1),this.operator||(this.operator=i[s],this.value=e.substring(2))),this.operator!==this.filterOperators.lessThan&&this.operator!==this.filterOperators.greaterThan||"="===this.value.charAt(0)&&(this.operator=this.operator+"orequal",this.value=this.value.substring(1))},e.prototype.columnPositionChanged=function(){this.parent.filterSettings.type},e.prototype.getLocalizedCustomOperators=function(){var e=[{value:"equal",text:this.l10n.getConstant("Equal")},{value:"greaterthan",text:this.l10n.getConstant("GreaterThan")},{value:"greaterthanorequal",text:this.l10n.getConstant("GreaterThanOrEqual")},{value:"lessthan",text:this.l10n.getConstant("LessThan")},{value:"lessthanorequal",text:this.l10n.getConstant("LessThanOrEqual")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}];this.customOperators={stringOperator:[{value:"startswith",text:this.l10n.getConstant("StartsWith")},{value:"endswith",text:this.l10n.getConstant("EndsWith")},{value:"contains",text:this.l10n.getConstant("Contains")},{value:"equal",text:this.l10n.getConstant("Equal")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}],numberOperator:e,dateOperator:e,datetimeOperator:e,booleanOperator:[{value:"equal",text:this.l10n.getConstant("Equal")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}]}},e.prototype.openMenuByField=function(e){var t=this.parent;if(t.enableAdaptiveUI)this.showCustomFilter(!1);else{var s=t.getColumnByField(e),i=t.getColumnHeaderByField(e),r=i.querySelector(".e-filtermenudiv");if(r){var n=t.element.getBoundingClientRect(),a=r.getBoundingClientRect();this.filterDialogOpen(s,r,a.right-n.left,a.bottom-n.top)}}},e.prototype.filterIconClickHandler=function(e){var t=e.target;if(t.classList.contains("e-filtermenudiv")&&("Menu"===this.parent.filterSettings.type||"CheckBox"===this.parent.filterSettings.type||"Excel"===this.parent.filterSettings.type)){var s=this.parent,i=s.getColumnByUid(Object(z["bb"])(t,"e-headercell").firstElementChild.getAttribute("e-mappinguid"));if(this.column=i,this.fltrDlgDetails.field===i.field&&this.fltrDlgDetails.isOpen)return;this.filterModule&&this.filterModule.closeDialog(),this.fltrDlgDetails={field:i.field,isOpen:!0},this.openMenuByField(i.field)}},e.prototype.clickHandler=function(e){if("FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator&&(Object(z["bb"])(e.target,"e-filterbarcell")&&e.target.classList.contains("e-input-group-icon")&&Object(Q["A"])(e.target,"div").querySelector(".e-filterbaroperator").focus(),e.target.classList.contains("e-list-item"))){var t=document.querySelector(".e-popup-open").getAttribute("id").replace("_popup","");-1!==t.indexOf("grid-column")&&Object(Q["A"])(document.getElementById(t),"div").querySelector(".e-filtertext").focus()}if("Immediate"===this.filterSettings.mode||"Menu"===this.parent.filterSettings.type||"CheckBox"===this.parent.filterSettings.type||"Excel"===this.parent.filterSettings.type){var s=e.target,i=s.classList.contains("e-day"),r=Object(z["bb"])(this.parent.element,"e-dialog"),n=!1,a=Object(z["bb"])(s,"e-popup"),o=this.parent.element.querySelector(".e-filter-popup");if(r&&a&&(n=r.id===a.id),o&&(Object(z["bb"])(s,"e-excel-ascending")||Object(z["bb"])(s,"e-excel-descending"))&&this.filterModule.closeDialog(s),Object(z["bb"])(s,"e-filter-popup")||s.classList.contains("e-filtermenudiv"))return;!this.filterModule||Object(z["bb"])(s,"e-popup-wrapper")||Object(Q["A"])(s,".e-filter-item.e-menu-item")||i||(n&&!Object(z["bb"])(s,"e-filter-popup")&&!Object(z["bb"])(s,"e-popup-flmenu")||!a&&o)&&(this.filterModule.isresetFocus=Object(z["bb"])(s,"e-grid")&&Object(z["bb"])(s,"e-grid").id===this.parent.element.id,this.filterModule.closeDialog(s))}},e.prototype.filterHandler=function(e){this.actualPredicate[e.field]=e.actualPredicate;for(var t=new Y["a"](this.filterSettings.columns),s=(new G["b"]).where("field",this.filterOperators.equal,e.field),i=t.executeLocal(s),r=0;r<i.length;r++){for(var n=-1,a=0;a<this.filterSettings.columns.length;a++)if(i[r].field===this.filterSettings.columns[a].field){n=a;break}-1!==n&&this.filterSettings.columns.splice(n,1)}this.values[e.field]&&delete this.values[e.field];var o=this.parent.getColumnByField(e.field),l=this.parent.showColumnMenu&&o.showColumnMenu?".e-columnmenu":".e-icon-filter",c=this.parent.getColumnHeaderByField(e.field).querySelector(l);"filtering"===e.action?(this.filterSettings.columns=this.filterSettings.columns.concat(e.filterCollection),this.filterSettings.columns.length&&c&&c.classList.add("e-filtered")):(c&&c.classList.remove("e-filtered"),e.requestType="filtering",this.parent.renderModule.refresh(e)),this.parent.dataBind()},e.prototype.updateFilter=function(){var e=this.filterSettings.columns;this.actualPredicate={};for(var t=0;t<e.length;t++){this.column=this.parent.getColumnByField(e[t].field)||Object(z["v"])(e[t].field,this.parent.getForeignKeyColumns());var s=e[t].field;this.parent.getColumnByField(e[t].field)||(s=Object(z["v"])(e[t].field,this.parent.getForeignKeyColumns()).field),this.refreshFilterIcon(s,e[t].operator,e[t].value,e[t].type,e[t].predicate,e[t].matchCase,e[t].ignoreAccent,e[t].uid)}},e.prototype.refreshFilterIcon=function(e,t,s,i,r,n,a,o){var l={field:e,predicate:r,matchCase:n,ignoreAccent:a,operator:t,value:s,type:i};this.actualPredicate[e]?this.actualPredicate[e].push(l):this.actualPredicate[e]=[l];var c=o?this.parent.grabColumnByUidFromAllCols(o).field:e;this.addFilteredClass(c)},e.prototype.addFilteredClass=function(e){var t,s=this.parent.getColumnByField(e);this.parent.showColumnMenu&&s.showColumnMenu?t=this.parent.getColumnHeaderByField(e).querySelector(".e-columnmenu"):s&&(t=this.parent.getColumnHeaderByField(e).querySelector(".e-icon-filter")),t&&t.classList.add("e-filtered")},e.prototype.getFilterUIInfo=function(){return this.filterModule?this.filterModule.getFilterUIInfo():{}},e.prototype.getOperatorName=function(e){return document.getElementById(this.parent.getColumnByField(e).uid).ej2_instances[0].value},e.prototype.renderCheckboxOnFilterMenu=function(){return this.filterModule.renderCheckBoxMenu()},e}(),ht=s("d36a"),pt=s("0aa6");c["default"].use(f["a"]),c["default"].use(ht["a"]);var mt,ft={name:"SiteList",props:{documentsDS:{type:Array,default:function(){return null}},showReview:{type:Boolean,default:!1},isSiteReviewReadyData:{type:Object,default:function(){return{}}},ownerInfo:{type:Object,default:function(){return{}}},comments:{type:Array,default:function(){return null}},showAllSites:{type:Boolean,default:!1},mySitesDS:Array},data:function(){return{toolbarOptions:["Search"],pageSettings:{pageSize:10},loading:!1,wrapSettings:{wrapMode:"Both"},showFooter:!1,previousValue:null,dataToSubmit:{ownerId:null,ownerContactId:null,siteId:null,applicationRequestId:null,document:{documentType:null,documentContent:null,documentName:null}},showReopenButton:!0,documentIdToDelete:null,commands:[{type:"Edit",buttonOption:{cssClass:"e-flat",iconCss:"e-open-link e-icons"}}],pdfButton:[{type:"Open PDF",buttonOption:{cssClass:"e-flat pdfBtn",iconCss:"e-export-pdf e-icons"}}],deleteButton:[{type:"Delete Document",buttonOption:{cssClass:"e-flat deletebtn",iconCss:"e-delete e-icons"}}],checkIcon:[{type:"Reviewed",buttonOption:{cssClass:"e-flat check",iconCss:"e-check e-icons"}}]}},watch:{isSiteReviewReadyData:function(e){this.showFooter=null!==e}},created:function(){return Object(a["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},computed:Object(l["a"])(Object(l["a"])({},Object(h["c"])({loggedUser:"loggedUser"})),{},{reviewYear:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.reviewYear},requestId:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.applicationRequestId},tmsRegistrationId:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.tmsRegistrationId},ownerComments:function(){var e,t;return this.$parent.changedComments=null===(e=this.comments)||void 0===e||null===(t=e.find((function(e){return null==e.siteId})))||void 0===t?void 0:t.comments,this.$parent.changedComments?this.$parent.changedComments:""},editPermission:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.editPermission},siteReviewSubmittedHistories:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.siteReviewSubmittedHistories},withSubmitedSiteReview:function(){var e;return null===(e=this.isSiteReviewReadyData)||void 0===e?void 0:e.withSubmitedSiteReview},disableUploadButton:function(){var e,t,s=this.dataToSubmit.document;return!((null===(e=s.documentName)||void 0===e?void 0:e.length)>0&&(null===(t=s.documentContent)||void 0===t?void 0:t.length)>0)}}),methods:{customiseCell:function(e){e.column.commands&&null==e.data.documentId&&e.cell.querySelector(".pdfBtn").classList.add("hidebtn")},mySitesCreated:function(){var e=this;if(this.$refs.mySitesDSGrid){var t=document.getElementById("".concat(this.$refs.mySitesDSGrid.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.mySitesDSGrid.$el.id)}))}},documentsCreated:function(){var e=this;if(this.$refs.documentsGrid){var t=document.getElementById("".concat(this.$refs.documentsGrid.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.documentsGrid.$el.id)}))}},reviewSubmittedHistoryCreated:function(){var e=this;if(this.$refs.siteReviewSubmittedHistoriesGrid){var t=document.getElementById("".concat(this.$refs.siteReviewSubmittedHistoriesGrid.$el.id,"_searchbar"));t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.siteReviewSubmittedHistoriesGrid.$el.id)}))}},clearSearchEventListener:function(e,t){var s=document.getElementById("".concat(t,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(t,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){e.target.value="",document.getElementById("".concat(t,"_clearbutton")).remove()})),e.target.value&&2===s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):e.target.value&&""!==e.target.value||document.getElementById("".concat(t,"_clearbutton")).remove()},cmdEditClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:"Edit"===e.commandColumn.type&&t.$parent.parentSiteClicked(e.rowData.site_Id);case 1:case"end":return s.stop()}}),s)})))()},goToReview:function(){document.getElementById("collapsible_tab").ej2_instances[0].select(3)},onFileSelection:function(e){var t,s=null===(t=e.target)||void 0===t?void 0:t.files[0];if(s){var i=this.dataToSubmit;i.ownerId=this.mySitesDS[0].owner_Id,i.ownerContactId=this.mySitesDS[0].ownerContactID,i.applicationRequestId=this.requestId;var r=i.document,n=s.name,a=n.split(".");r.documentType=r.fileType=a[a.length-1],r.documentName=n.slice(0,n.length-(r.fileType.length+1)),this.$refs.documentNameTextbox.$el.value=r.documentName;var o=new FileReader;o.readAsDataURL(s),o.onload=function(e){var t=e.target.result;t&&(r.documentContent=t.substring(t.indexOf(",")+1))}}},openPDF:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i,r;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i=x["b"].getAccessToken(),r=t.loggedUser.id,s.next=4,Object(pt["c"])(r,i,e.rowData.documentId).then((function(e){window.location.href="".concat(e.config.baseURL).concat(e.config.url)}));case 4:case"end":return s.stop()}}),s)})))()},hideDeleteDialog:function(){Le.hide()},approve:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.hideDeleteDialog(),t.prev=1,s=e.ownerInfo.ownerId,i=e.ownerInfo.ownerContactId,r=e.requestId,t.next=7,_(e.loggedUser.email,s,i,r).then((function(t){e.$parent.isSiteReviewReadyData=t.data,r=t.data.applicationRequestId,e.notify("Success !","Review approved Successfully"),r?e.$router.push({name:"PayByRequest",params:{requestId:r}}):e.$router.push("/reports/transactions")}));case 7:t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),e.notify("Error !","Error occurred while approving review");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})))()},deleteButtonClick:function(e){this.documentIdToDelete=e.rowData.documentId,this.showpopup("deleteDocument","Are you sure you want to delete document?","Delete Document")},approveButtonClick:function(){this.showpopup("approve","Are you sure you want to approve site review?","Approve Site Review")},showpopup:function(e,t,s){Le=d["b"].confirm({title:s,content:t,okButton:{text:"OK",click:this[e]},cancelButton:{text:"Cancel",click:this.hideDeleteDialog},showCloseIcon:!0,closeOnEscape:!0,animationSettings:{effect:"Zoom"}})},deleteDocument:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.hideDeleteDialog(),t.next=3,$(e.documentIdToDelete).then((function(t){var s,i,r=e.$parent.documentsDS.findIndex((function(e){return e.documentId===t.data})),n=e.$parent;n.documentsDS.splice(r,1),n.showReview=(null===(s=n.documentsDS)||void 0===s?void 0:s.length)>0||(null===(i=n.commentChanges)||void 0===i?void 0:i.length)>0,n.controlNavigationToReview(n.showReview),e.$refs.documentsGrid.refresh(),e.notify("Success !","Document deleted Successfully")})).catch((function(t){e.notify("Error !",t.response.data.message)}));case 3:case"end":return t.stop()}}),t)})))()},onInputChange:function(e){this.$parent.checkIfCommentsChange(e.value,null)},onEnteringDocumentName:function(e){var t=/[\/:*?"<>|]/;t.test(e.event.data)?e.container.querySelector("input").value=this.previousValue:e.container.querySelector("input").value=this.previousValue=e.value,this.dataToSubmit.document.documentName=e.container.querySelector("input").value},uploadFile:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return s=e.dataToSubmit.document,i=s.documentName,r=s.fileType,a=i.split("."),a=a[a.length-1],a.toLowerCase()!==r.toLowerCase()&&(s.documentName="".concat(i,".").concat(r)),t.next=8,N(e.dataToSubmit).then((function(t){var i=e.$parent;i.documentsDS.push(t.data.document),e.$refs.documentNameTextbox.$el.value=null,e.$refs.documentsGrid.refresh(),e.$refs.documentFileUploader.value="",s.documentName=null,i.showReview=i.documentsDS.length>0||i.commentChanges.length>0,i.controlNavigationToReview(i.showReview),e.notify("Success !","Document uploaded Successfully")})).catch((function(t){e.notify("Error !",t.response.data.message)}));case 8:case"end":return t.stop()}}),t)})))()},notify:function(e,t){this.$parent.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error !"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$parent.$refs.notifierRef.show()},onExportToExcel:function(){var e=x["b"].getAccessToken(),t=this.$store.getters.loggedUser?this.$store.getters.loggedUser.id:"",s=this.ownerInfo.ownerId,i=this.ownerInfo.ownerContactId,r=this.ownerInfo.ownerEmail,n=S["b"].tmsApiRootUrl,a="";a=this.showAllSites?"".concat(n,"/eServicesSite/excel?userid=").concat(t,"&securitytoken=").concat(e,"&emailAddress=").concat(r,"&ownerId=").concat(s,"&ownerContactId=").concat(i):"".concat(n,"/eServicesSite/excel?userid=").concat(t,"&securitytoken=").concat(e,"&emailAddress=").concat(r,"&ownerId=").concat(s,"&ownerContactId=").concat(i,"&showIsReadyForCertifyOnly=true"),window.location.href=a},rowInvoiceDataBound:function(e){e.data.isInvoiced||(e.row.querySelectorAll(".e-unboundcelldiv")[1].querySelectorAll("button")[0].style.display="none")}},provide:{grid:[b["a"],dt,y["a"],w["a"],C["a"],v["a"]]}},vt=ft,gt=(s("793e"),Object(k["a"])(vt,V,W,!1,null,"6ffd557d",null)),bt=gt.exports,yt=s("c3e1"),wt=s("a39b");c["default"].use(u["a"]);var Ct={components:{SiteDetails:E,SiteReview:H,OperationalPermitList:bt},data:function(){return{headerText0:{text:" Operating Permit List "},headerText1:{text:" Site List "},headerText2:{text:" Site Details "},headerText3:{text:" Review "},content0:"#operationalPermitList",content1:"#siteList",content2:"#siteDetails",content3:"#review",siteId:null,documentsDS:[],showReview:!1,comments:[],isSiteReviewReadyData:null,ownerInfo:{},changedComments:null,loading:!0,isWithMultipleOwners:!1,myOwners:[]}},watch:{loggedUser:function(){if(this.checkUserRole(),!this.isAdmin){var e=this.loggedUser.email,t=0,s=0,i="";this.defaultOwner&&(s=this.defaultOwner.ownerID,e=this.defaultOwner.emailAddress,i=this.defaultOwner.requestId,s&&(t=this.defaultOwner.ownerContactID)),this.checkIfSiteReviewReady(e,s,t,i)}},showReview:function(e){this.controlNavigationToReview(e)}},computed:Object(l["a"])(Object(l["a"])({},Object(h["c"])({mySites:"mySites",loggedUser:"loggedUser",selectedOwner:"selectedOwner",owners:"owners"})),{},{defaultOwner:function(){return this.selectedOwner},defaultOwnerString:function(){return this.selectedOwner?this.selectedOwner.ownerFullInfo:""},siteReviewStatus:function(){var e,t;return"submit for review"===(null===(e=this.isSiteReviewReadyData)||void 0===e||null===(t=e.siteReviewStatus)||void 0===t?void 0:t.toLowerCase())&&this.isAdmin},mySitesDS:function(){if(this.mySites){var e=Object(o["a"])(this.mySites.filter((function(e){return!0===e.isReadyForCertify})));return e.forEach((function(e){(e.registration_Status="Exempt"!==e.registration_Status)&&(e.registration_Status="NotRegistered"===e.registration_Status?"Invalid":"valid")})),e}return null},isAdmin:function(){if(this.loggedUser){var e=this.loggedUser.roles.map((function(e){return e.roleName}));return e.includes("Admin")||e.includes("SuperAdmin")}return!1}}),created:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.loggedUser){t.next=16;break}return t.next=3,e.fetchSiteOwners();case 3:if(s=e.loggedUser.email,!e.isAdmin){t.next=7;break}t.next=14;break;case 7:if(!s||!e.owners){t.next=14;break}if(e.myOwners=e.owners.filter((function(e){return e.firstEmail===s.toLowerCase()})),!(e.myOwners.length>1)){t.next=14;break}if(e.isWithMultipleOwners=!0,e.defaultOwner){t.next=14;break}return t.next=14,e.$store.commit(yt["c"],e.myOwners[0]);case 14:return t.next=16,e.checkUserRole();case 16:case"end":return t.stop()}}),t)})))()},methods:Object(l["a"])(Object(l["a"])({},Object(h["b"])({fetchSites:yt["a"],fetchSiteOwners:wt["d"]})),{},{reOpenButtonClick:function(){this.showpopup("reopen","Are you sure you want to reopen site review?","Reopen Site Review")},showpopup:function(e,t,s){mt=d["b"].confirm({title:s,content:t,okButton:{text:"OK",click:this[e]},cancelButton:{text:"Cancel",click:this.hideDeleteDialog},showCloseIcon:!0,closeOnEscape:!0,animationSettings:{effect:"Zoom"}})},hideDeleteDialog:function(){mt.hide()},reopen:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a,o,l;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.hideDeleteDialog(),t.prev=1,s=e.$refs.userProfileRef.$el.value.split(",")[2].trim(),i=e.$refs.userProfileRef.$el.value.split(",")[0].trim(),r=e.$refs.userProfileRef.$el.value.split(",")[1].trim(),a=e.defaultOwner.requestId,a||(a=e.isSiteReviewReadyData.applicationRequestId),o=0,r&&(l=r.split("(")[1].trim(),l&&(o=l.replace(")",""))),t.next=11,U(s,i,o,a).then((function(t){e.isSiteReviewReadyData=t.data,e.notify("Success !","Review Opened Successfully"),e.showReopenButton=!1}));case 11:t.next=16;break;case 13:t.prev=13,t.t0=t["catch"](1),e.notify("Error !","Error occurred while reopening review");case 16:case"end":return t.stop()}}),t,null,[[1,13]])})))()},onUserSelection:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i,r,a;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(void 0===e.e){s.next=19;break}if(e.itemData){s.next=11;break}return t.showReopenButton=!1,t.ownerInfo={},t.isSiteReviewReadyData={},s.next=7,t.$store.commit(yt["c"],null);case 7:return s.next=9,t.$store.commit(yt["b"],{mysites:null});case 9:s.next=19;break;case 11:return s.next=13,t.$store.commit(yt["c"],e.itemData);case 13:t.$refs.refTabInstance.select(0),t.$refs.refTabInstance.enableTab(2,!1),i=e.itemData.ownerID,r=e.itemData.emailAddress,i?(a=e.itemData.ownerContactID,t.mySiteDSData(r,i,a)):r&&"null"!==r&&t.mySiteDSData(r,0,0),t.showReopenButton=!0;case 19:case"end":return s.stop()}}),s)})))()},checkUserRole:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.loggedUser){t.next=16;break}if(!(e.isAdmin&&e.defaultOwner||e.defaultOwner)){t.next=8;break}s=e.defaultOwner.ownerID,i=e.defaultOwner.emailAddress,r=e.defaultOwner.requestId,s?(a=e.defaultOwner.ownerContactID,e.mySiteDSData(i,s,a,r)):i&&"null"!==i&&e.mySiteDSData(i,0,0,r),t.next=16;break;case 8:if(e.isAdmin){t.next=12;break}e.mySiteDSData(e.loggedUser.email,0,0),t.next=16;break;case 12:return t.next=14,e.$store.commit(yt["b"],{mysites:null});case 14:return t.next=16,e.fetchSiteOwners();case 16:case"end":return t.stop()}}),t)})))()},mySiteDSData:function(e,t,s){var i=arguments,r=this;return Object(a["a"])(Object(n["a"])().mark((function a(){var o,l,c,u,d,h,p,m,f,v;return Object(n["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=i.length>3&&void 0!==i[3]?i[3]:null,r.ownerInfo={},r.isSiteReviewReadyData={},r.loading=!0,!(e||t&&s)){n.next=10;break}return n.next=7,r.checkIfSiteReviewReady(e,t,s,o,null===(l=r.$refs)||void 0===l?void 0:l.documentsGrid);case 7:return c=r.isSiteReviewReadyData.tmsRegistrationId?r.isSiteReviewReadyData.tmsRegistrationId:0,n.next=10,r.fetchSites({userEmail:e,ownerId:t,ownerContactId:s,regId:c});case 10:null!==r.mySites&&r.mySites.length>0?(u=r.mySites[0].owner_Contact,d=r.mySites[0].owner_Address,h=r.mySites[0].owner_Id,p=r.mySites[0].owner_Detail,m=r.mySites[0].owner_Name,f=null,r.defaultOwner?(r.showReopenButton=!0,f=r.defaultOwner.emailAddress):r.isAdmin||(f=r.loggedUser.email),v=r.mySites[0].ownerContactID,r.ownerInfo={ownerContact:u,ownerFullAddress:d,ownerId:h,ownerDetail:p,ownerEmail:f,ownerContactId:v,ownerName:m},r.showFooter=null!==r.isSiteReviewReadyData):r.showFooter=!1,r.loading=!1;case 12:case"end":return n.stop()}}),a)})))()},checkIfCommentsChange:function(e,t){var s=this.comments.find((function(e){return e.siteId===t}));this.changedComments=e,this.siteId=t,s?e?(s.comments=this.changedComments,s.isEdited=!0):this.comments.splice(s):e&&this.comments.push({siteId:this.siteId,comments:this.changedComments,isEdited:!0}),this.showReview=this.comments.length>0||this.documentsDS.length>0,this.controlNavigationToReview(this.showReview)},tabCreated:function(){this.controlNavigationToReview(this.showReview),this.controlNavigationToDetail(!1)},tabSelect:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:e.isSwiped?e.cancel=!0:t.onIndexChange();case 1:case"end":return s.stop()}}),s)})))()},checkIfSiteReviewReady:function(e,t,s,i){var r=arguments,o=this;return Object(a["a"])(Object(n["a"])().mark((function a(){var l,c;return Object(n["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return l=r.length>4&&void 0!==r[4]?r[4]:null,c=i,i||(c="00000000-0000-0000-0000-000000000000"),n.next=5,P(e,t,s,c).then((function(e){var t,s,i;(o.isSiteReviewReadyData=e.data,null!==(t=o.isSiteReviewReadyData)&&void 0!==t&&t.siteReviewDocuments)&&(o.documentsDS=null===(i=o.isSiteReviewReadyData)||void 0===i?void 0:i.siteReviewDocuments.map((function(e){return e.document})));null!==(s=o.isSiteReviewReadyData)&&void 0!==s&&s.siteReviews&&o.isSiteReviewReadyData.siteReviews.forEach((function(e){var t;(null===(t=e.comments)||void 0===t?void 0:t.length)>0&&o.comments.push({comments:e.comments,siteId:e.siteId,isEdited:!1})})),o.showReview=o.comments.length>0||o.documentsDS.length>0,null===l||void 0===l||l.refresh(),o.loading=!1,o.$refs.refTabInstance.ej2Instances.items[0].visible=!0,o.$refs.refTabInstance.ej2Instances.items[3].visible=!0,o.$refs.refTabInstance.select(0)})).catch((function(){o.$refs.refTabInstance.ej2Instances.items[0].visible=!1,o.$refs.refTabInstance.ej2Instances.items[3].visible=!1,o.$refs.refTabInstance.select(1)}));case 5:case"end":return n.stop()}}),a)})))()},onIndexChange:function(){var e=this.comments.find((function(e){return!0===e.isEdited}));if(null!==e&&void 0!==e&&e.isEdited){var t=this.defaultOwner.requestId;t||(t=this.isSiteReviewReadyData.applicationRequestId),this.saveComments({ownerId:this.mySites[0].owner_Id,ownerContactId:this.mySites[0].ownerContactID,comments:e.comments,siteId:e.siteId,requestId:t})}},saveComments:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.next=2,M(e).then((function(s){t.comments.find((function(t){return t.siteId===e.siteId})).isEdited=!1,s.data&&s.data.siteReviews&&s.data.siteReviewDocuments?t.showReview=s.data.siteReviews.length>0||s.data.siteReviewDocuments.length>0:t.showReview=!1}));case 2:case"end":return s.stop()}}),s)})))()},controlNavigationToReview:function(e){this.$refs.refTabInstance.enableTab(3,e)},controlNavigationToListView:function(e){this.$refs.refTabInstance.enableTab(0,e)},controlNavigationToDetail:function(e){this.$refs.refTabInstance.enableTab(2,e)},parentSiteClicked:function(e){this.siteId=e,this.controlNavigationToDetail(!0),document.getElementById("collapsible_tab").ej2_instances[0].select(2)}})},xt=Ct,St=(s("7bca"),Object(k["a"])(xt,i,r,!1,null,null,null));t["default"]=St.exports},a4af:function(e,t,s){"use strict";var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"wrap_address"},[t._m(0),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"310px"}},[i("ejs-dropdownlist",{attrs:{"float-label-type":"Always",id:"prefix",dataSource:t.prefix,placeholder:"Prefix"},model:{value:t.data.prefix,callback:function(e){t.$set(t.data,"prefix",e)},expression:"data.prefix"}})],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"310px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.firstName},on:{validate:function(t){return e.isFirstNameValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"First Name"},model:{value:t.data.firstName,callback:function(e){t.$set(t.data,"firstName",e)},expression:"data.firstName"}})],1)],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"310px"}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Middle Name"},model:{value:t.data.middleName,callback:function(e){t.$set(t.data,"middleName",e)},expression:"data.middleName"}})],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"310px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.lastName},on:{validate:function(t){return e.isLastNameValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Last Name"},model:{value:t.data.lastName,callback:function(e){t.$set(t.data,"lastName",e)},expression:"data.lastName"}})],1)],1)]),t._m(1),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.address},on:{validate:function(t){return e.isAddressValid=t}}},[i("ejs-autocomplete",{ref:"addressAutocomplete",attrs:{dataSource:t.addressAutocompleteData,placeholder:"Address Line1",fields:t.addressAutocompleteFields,minLength:t.addressAutocompleteMinLength,filtering:t.onAddressAutocompleteFiltering,"float-label-type":"Always"},on:{change:t.onAddressSelection},model:{value:t.data.address,callback:function(e){t.$set(t.data,"address",e)},expression:"data.address"}})],1)],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-textbox",{attrs:{name:"default","float-label-type":"Always",multiline:!1,placeholder:"Address Line2"},model:{value:t.data.addressLine2,callback:function(e){t.$set(t.data,"addressLine2",e)},expression:"data.addressLine2"}})],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.cityName},on:{validate:function(t){return e.isCityNameValid=t}}},[i("ejs-textbox",{attrs:{name:"default","float-label-type":"Always",placeholder:"City"},model:{value:t.data.cityName,callback:function(e){t.$set(t.data,"cityName",e)},expression:"data.cityName"}})],1)],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-dropdownlist",{ref:"province",attrs:{id:"province",placeholder:"Province/State",sortOrder:"Ascending",allowFiltering:t.allowFiltering,"float-label-type":"Always",filtering:t.filtering,dataSource:t.province,fields:t.provinceFields},model:{value:t.data.provinceName,callback:function(e){t.$set(t.data,"provinceName",e)},expression:"data.provinceName"}})],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.postalCode},on:{validate:function(t){return e.isPostalCodeValid=t}}},[i("ejs-textbox",{attrs:{name:"default","float-label-type":"Always",placeholder:"Postal/Zip Code",maxlength:10},model:{value:t.data.postalCode,callback:function(e){t.$set(t.data,"postalCode",e)},expression:"data.postalCode"}})],1)],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("ejs-dropdownlist",{ref:"country",attrs:{"float-label-type":"Always",id:"country",dataSource:t.countries,placeholder:"Country",fields:t.countryFields,index:t.countryIndex},model:{value:t.data.countryName,callback:function(e){t.$set(t.data,"countryName",e)},expression:"data.countryName"}})],1)])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Personal Information")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Address Information")])])}],n=s("5530"),a=s("c7eb"),o=s("1da1"),l=(s("99af"),s("ac1f"),s("1276"),s("5319"),s("d3b7"),s("a026")),c=s("eda0"),u=s("d36a"),d=s("21cb"),h=s("2d85"),p=s("940e"),m=s("b37f");l["default"].use(c["a"]),l["default"].use(d["a"]),l["default"].use(u["a"]);var f={name:"UserAddressInfo",props:{userProfilesData:Object,userProfileId:String},components:{SccInputValidator:p["a"]},mounted:function(){this.getAddresses(),this.province=this.$store.getters.provinces,null===this.province&&this.getProvinces(),null!==this.$store.getters.loggedUser&&this.getUserProfilesById()},data:function(){return{prefix:["Dr.","Mr.","Mrs.","Ms.","Miss."],username:null,id:null,data:{userId:null,userFullName:null,email:null,prefix:null,firstName:null,middleName:null,lastName:null,phoneNumber:null,address:null,addressLine2:"",cityName:null,postalCode:null,provinceName:null,countryName:null},countries:[{id:"CA",countryName:"Canada"},{id:"US",countryName:"United States"}],countryIndex:0,addressAutocompleteData:[],addressAutocompleteMinLength:3,addressAutocompleteFields:{value:"Address.Address"},province:[],provinceFields:{text:"provinceName",value:"provinceName",groupBy:"countryName"},countryFields:{text:"countryName",value:"countryName"},allowFiltering:!1,requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},isFirstNameValid:!1,isLastNameValid:!1,isAddressValid:!1,isCityNameValid:!1,isPostalCodeValid:!1,melissaAddress1:"",melissaCountry:"CA",userProfileData:null,melissaCountryName:"Canada"}},methods:{getProvinces:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(m["p"]);case 3:e.province=e.$store.getters.provinces,t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},getAddresses:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s,i;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.melissaAddress1,i=e.melissaCountry,t.next=4,e.$store.dispatch(m["n"],{melissaAddress1:s,melissaCountry:i});case 4:e.addressAutocompleteData=e.$store.getters.melissaAddresses,t.next=10;break;case 7:t.prev=7,t.t0=t["catch"](0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))()},getUserProfilesById:function(){var e=this;return Object(o["a"])(Object(a["a"])().mark((function t(){var s;return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userProfileId,t.next=4,e.$store.dispatch(m["u"],{userId:s});case 4:e.data=Object(n["a"])(Object(n["a"])({},e.data),e.$store.getters.userProfilesbyID),null!==e.$store.getters.userProfilesbyID?e.id=e.$store.getters.userProfilesbyID.id:e.id=null,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},onCancelButtonClick:function(){this.$router.push("/")},filtering:function(e){var t=this.province,s=new h["b"];s=""!==e.text?s.where("provinceName","startswith",e.text,!0):s,e.updateData(t,s)},validateUserInfo:function(){this.data.firstName=null===this.data.firstName?"":this.data.firstName,this.data.lastName=null===this.data.lastName?"":this.data.lastName,this.data.address=null===this.data.address?"":this.data.address,this.data.cityName=null===this.data.cityName?"":this.data.cityName,this.data.postalCode=null===this.data.postalCode?"":this.data.postalCode},userProfile:function(e){var t=this;return Object(o["a"])(Object(a["a"])().mark((function s(){var i;return Object(a["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(s.prev=0,t.data.provinceName=t.$refs.province.ej2Instances.value,t.data.userFullName="".concat(t.data.firstName," ").concat(t.data.lastName),t.data.phoneNumber=e,t.data.userId=t.userProfileId,t.username=t.userProfilesData.userName,t.data.email=t.userProfilesData.userName,null===t.id){s.next=13;break}return i=Object.assign(t.data,{id:t.id}),s.next=11,t.$store.dispatch(m["F"],i);case 11:s.next=15;break;case 13:return s.next=15,t.$store.dispatch(m["F"],t.data);case 15:s.next=20;break;case 17:s.prev=17,s.t0=s["catch"](0),console.error(s.t0);case 20:case"end":return s.stop()}}),s,null,[[0,17]])})))()},onAddressAutocompleteFiltering:function(e){var t=this;if(e.preventDefaultAction=!0,e.text.length>=this.$refs.addressAutocomplete.ej2Instances.minLength){this.$refs.addressAutocomplete.ej2Instances.showSpinner(),this.melissaAddress1=e.text,this.melissaCountry=this.$refs.country.ej2Instances.value;var s=this.melissaAddress1,i=this.melissaCountry;this.$store.dispatch(m["n"],{melissaAddress1:s,melissaCountry:i}).then((function(){e.updateData(t.$store.getters.melissaAddresses)}))}},onAddressSelection:function(e){var t=this;if(null!==e&&void 0!==e&&e.value){this.$refs.addressAutocomplete.$el.value=e.value.split(",")[0];var s=e.itemData;if(s.Address){var i;if(this.data.address=s.Address.Address||"",this.data.address===this.$refs.addressAutocomplete.$el.value)return;this.data.cityName=s.Address.SubAdministrativeArea||s.Address.Locality||"",this.data.provinceName=s.Address.AdministrativeArea||"",this.data.countryName=s.Address.ISO3166_2||"","CA"===s.Address.ISO3166_2?this.data.countryName=this.melissaCountryName:"US"===s.Address.ISO3166_2?this.data.countryName="United States":this.data.countryName=this.melissaCountryName,this.data.postalCode=s.Address.PostalCode||"";var r=(this.data.cityName+this.data.provinceName+this.data.postalCode).replace(/ /g,""),n=null===(i=s.Address.Address2)||void 0===i?void 0:i.replace(/ /g,"");(null===n||void 0===n?void 0:n.toLowerCase())===(null===r||void 0===r?void 0:r.toLowerCase())?this.data.addressLine2="":this.data.addressLine2=s.Address.Address2||"",""!==this.data.provinceName&&this.province.every((function(e){return e.provinceCode!==t.data.provinceName||(t.data.provinceName=e.provinceName,!0)}))}else this.data.address=s["Address.Address"]}}}},v=f,g=(s("ce98"),s("2877")),b=Object(g["a"])(v,i,r,!1,null,null,null);t["a"]=b.exports},a721:function(e,t,s){},aa96:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{staticClass:"e-float-input e-input-group"},[e._t("default"),s("input",{staticClass:"inputElement",attrs:{"data-test-input":"pswd",type:e.passwordType},domProps:{value:e.value},on:{input:function(t){return e.handleKeyEvent(t)},keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$emit("handle-enter-key")}}}),s("span",{staticClass:"e-float-line"}),s("label",{staticClass:"e-float-text e-label-top"},[e._v(" "+e._s(e.placeholder)+" ")]),s("span",{staticClass:"e-input-group-icon"},[s("font-awesome-icon",{directives:[{name:"show",rawName:"v-show",value:e.showPassword,expression:"showPassword"}],attrs:{icon:["fas","eye-slash"]},on:{click:e.toggleShow}}),s("font-awesome-icon",{directives:[{name:"show",rawName:"v-show",value:!e.showPassword,expression:"!showPassword"}],attrs:{icon:["fas","eye"]},on:{click:e.toggleShow}})],1)],2)])},r=[],n={name:"InputPassword",props:{value:{type:String},placeholder:{type:String}},model:{prop:"value",event:"update"},data:function(){return{showPassword:!1,passwordType:"password"}},watch:{},mounted:function(){},methods:{toggleShow:function(){this.showPassword=!this.showPassword,this.showPassword?this.passwordType="text":this.passwordType="password"},handleKeyEvent:function(e){this.$emit("update",e.target.value)}}},a=n,o=(s("3f02"),s("2877")),l=Object(o["a"])(a,i,r,!1,null,null,null);t["a"]=l.exports},ab22:function(e,t,s){},abe0:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e._m(0),s("div",{staticStyle:{"text-align":"left","padding-bottom":"1px"}},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info"},nativeOn:{click:function(t){return e.onAddNewUserClick.apply(null,arguments)}}},[s("font-awesome-icon",{staticStyle:{display:"inline"},attrs:{icon:["fas","plus"]}}),e._v(" Add New Customer\n    ")],1)],1),s("ejs-grid",{ref:"refUserList",attrs:{dataSource:e.users,created:e.created,enablePersistence:"true","selection-settings":e.selectionOptions,commandClick:e.commandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.pageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"8%",commands:e.commands,textAlign:"Lift"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"12%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"25%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.address",headerText:"Address",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.cityName",headerText:"City",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.provinceName",headerText:"Province",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.postalCode",headerText:"Postal Code",textAlign:"Left"}})],1)],1)],1)},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row"},[s("h3",[e._v("Manage Customer Details List")])])}],n=s("c7eb"),a=s("1da1"),o=s("a026"),l=s("c041"),c=s("af93"),u=s("aa15"),d=s("e09d"),h=s("4f03"),p=s("e29d"),m=s("b0e8"),f=s("b37f");o["default"].use(l["a"]);var v={name:"Users",created:function(){this.userList()},computed:{},mounted:function(){this.$refs.refUserList.ej2Instances.searchSettings.key=""},data:function(){return{selectionOptions:{type:"Single",enableSimpleMultiRowSelection:!1,enableToggle:!0,persistSelection:!0},users:[],toolbarOptions:["Search"],pageSettings:{pageSize:10},commands:[{type:"Edit",buttonOption:{cssClass:"e-flat",iconCss:"e-edit e-icons"}}]}},methods:{created:function(){var e=this;if(this.$refs.refUserList){var t=document.getElementById("".concat(this.$refs.refUserList.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refUserList.$el.id)}))}},clearSearchEventListener:function(e,t){var s=document.getElementById("".concat(t,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(t,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){e.target.value="",document.getElementById("".concat(t,"_clearbutton")).remove()})),e.target.value&&2==s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):e.target.value&&""!=e.target.value||document.getElementById("".concat(t,"_clearbutton")).remove()},commandClick:function(e){"Edit"===e.commandColumn.type&&this.$router.push("/manage-customer/".concat(e.rowData.userId))},onAddNewUserClick:function(){var e=null;this.$router.push("/manage-customer/".concat(e))},userList:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(f["f"]).then((function(){e.users=e.$store.getters.activeUsers}));case 3:t.next=8;break;case 5:t.prev=5,t.t0=t["catch"](0),console.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))()}},provide:{grid:[c["a"],u["a"],d["a"],h["a"],p["a"],m["a"]]}},g=v,b=(s("ae05"),s("2877")),y=Object(b["a"])(g,i,r,!1,null,null,null);t["default"]=y.exports},ae05:function(e,t,s){"use strict";s("1e80")},b544:function(e,t,s){"use strict";s.d(t,"a",(function(){return k}));var i=s("7de8"),r=s("db21"),n=s("9b89"),a=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),o=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},l="e-switch-disabled",c="e-ripple-container",u="e-ripple-check",d="e-rtl",h="e-switch-wrapper",p="e-switch-active",m=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i.isDrag=!1,i}return a(t,e),t.prototype.changeState=function(e){var t,s,r=this.getWrapper(),n=r.querySelector(".e-switch-inner"),a=r.querySelector(".e-switch-handle");i["W"]&&(s=r.getElementsByClassName(c)[0]),e?(Object(i["u"])([n,a],p),t="true",this.element.checked=!0,this.checked=!0,s&&Object(i["u"])([s],[u])):(Object(i["fb"])([n,a],p),t="false",this.element.checked=!1,this.checked=!1,s&&Object(i["fb"])([s],[u])),r.setAttribute("aria-checked",t)},t.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),Object(n["b"])(this,this.getWrapper(),this.tagName)},t.prototype.focusHandler=function(){this.isFocused=!0},t.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},t.prototype.getModuleName=function(){return"switch"},t.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},t.prototype.getWrapper=function(){return this.element.parentElement},t.prototype.initialize=function(){Object(i["U"])(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},t.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(h)||(e=this.createElement("div",{className:h,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var t=this.createElement("span",{className:"e-switch-inner"}),s=this.createElement("span",{className:"e-switch-on"}),r=this.createElement("span",{className:"e-switch-off"}),a=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),Object(n["f"])(this,e),t.appendChild(s),t.appendChild(r),e.appendChild(t),e.appendChild(a),i["W"]){var o=this.createElement("span",{className:c});a.appendChild(o),Object(i["hb"])(o,{duration:400,isCenterRipple:!0})}e.classList.add("e-wrapper"),this.enableRtl&&e.classList.add(d),this.cssClass&&Object(i["u"])([e],this.cssClass.split(" "))},t.prototype.onPropertyChanged=function(e,t){for(var s=this.getWrapper(),r=0,n=Object.keys(e);r<n.length;r++){var a=n[r];switch(a){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove(l),s.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?s.classList.add(d):s.classList.remove(d);break;case"cssClass":t.cssClass&&Object(i["fb"])([s],t.cssClass.split(" ")),e.cssClass&&Object(i["u"])([s],e.cssClass.split(" "));break}}},t.prototype.preRender=function(){var e=this.element;this.formElement=Object(i["A"])(this.element,"form"),this.tagName=this.element.tagName,Object(n["d"])(this,"EJS-SWITCH",h,e,this.getModuleName())},t.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},t.prototype.rippleHandler=function(e){var t=this.getWrapper().getElementsByClassName(c)[0];Object(n["e"])(e,t),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isFocused=!1)},t.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(c)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},t.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(l),e.setAttribute("aria-disabled","true")},t.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},t.prototype.switchFocusHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},t.prototype.switchMouseUp=function(e){var t=e.target;"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},t.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,this.element.checked=this.initialSwitchCheckedValue},t.prototype.toggle=function(){this.clickHandler()},t.prototype.wireEvents=function(){var e=this.getWrapper();this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyUpHandler=this.switchFocusHandler.bind(this),i["l"].add(e,"click",this.clickHandler,this),i["l"].add(this.element,"focus",this.focusHandler,this),i["l"].add(this.element,"focusout",this.focusOutHandler,this),i["l"].add(this.element,"mouseup",this.delegateMouseUpHandler,this),i["l"].add(this.element,"keyup",this.delegateKeyUpHandler,this),i["l"].add(e,"mousedown mouseup",this.rippleHandler,this),i["l"].add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&i["l"].add(this.formElement,"reset",this.formResetHandler,this)},t.prototype.unWireEvents=function(){var e=this.getWrapper();i["l"].remove(e,"click",this.clickHandler),i["l"].remove(this.element,"focus",this.focusHandler),i["l"].remove(this.element,"focusout",this.focusOutHandler),i["l"].remove(this.element,"mouseup",this.delegateMouseUpHandler),i["l"].remove(this.element,"keyup",this.delegateKeyUpHandler),i["l"].remove(e,"mousedown mouseup",this.rippleHandler),i["l"].remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&i["l"].remove(this.formElement,"reset",this.formResetHandler)},t.prototype.click=function(){this.element.click()},t.prototype.focusIn=function(){this.element.focus()},o([Object(i["k"])()],t.prototype,"change",void 0),o([Object(i["k"])()],t.prototype,"created",void 0),o([Object(i["r"])(!1)],t.prototype,"checked",void 0),o([Object(i["r"])("")],t.prototype,"cssClass",void 0),o([Object(i["r"])(!1)],t.prototype,"disabled",void 0),o([Object(i["r"])("")],t.prototype,"name",void 0),o([Object(i["r"])("")],t.prototype,"onLabel",void 0),o([Object(i["r"])("")],t.prototype,"offLabel",void 0),o([Object(i["r"])("")],t.prototype,"value",void 0),t=o([i["p"]],t),t}(i["h"]),f=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),v=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},g=["isLazyUpdate","checked","cssClass","disabled","enablePersistence","enableRtl","locale","name","offLabel","onLabel","value","change","created"],b=["checked"],y=Object(r["d"])({props:g}),w=(y[0],y[1]),C=Object.keys(w);C.push("modelchanged");for(var x=0,S=b;x<S.length;x++){var O=S[x];C.push("update:"+O)}var j=!r["e"],I=function(e){function t(){var t=e.call(this,arguments)||this;return t.propKeys=g,t.models=b,t.hasChildDirective=!1,t.hasInjectedModules=!1,t.tagMapper={},t.tagNameMapper={},t.isVue3=!j,t.ej2Instances=new m({}),t.ej2Instances._trigger=t.ej2Instances.trigger,t.ej2Instances.trigger=t.trigger,t.bindProperties(),t.ej2Instances._setProperties=t.ej2Instances.setProperties,t.ej2Instances.setProperties=t.setProperties,t.ej2Instances.clearTemplate=t.clearTemplate,t}return f(t,e),t.prototype.clearTemplate=function(e){if(e||(e=Object.keys(this.templateCollection||{})),e.length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var r=s[t],n=this.templateCollection[r];if(n&&n.length){for(var a=0,o=n;a<o.length;a++){var l=o[a],c=Object(i["S"])("__vue__.$destroy",l);c&&l.__vue__.$destroy(),l.innerHTML&&(l.innerHTML="")}delete this.templateCollection[r]}}},t.prototype.setProperties=function(e,t){var s=this;this.isVue3&&(this.models=this.models?this.models:this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(e,t),e&&this.models&&this.models.length&&Object.keys(e).map((function(t){s.models.map((function(i){t!==i||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,e[t]):(s.$emit("update:"+t,e[t]),s.$emit("modelchanged",e[t])))}))}))},t.prototype.trigger=function(e,t,s){if(j||(this.models=this.models?this.models:this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length){if("actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length){r=this.models.toString().match(/currentView|selectedDate/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(j?(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}}else{var r=this.models.toString().match(/checked|value/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(j?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,s)},t.prototype.render=function(e){var t=r["e"]||e,s=null;return Object(i["U"])(this.$slots.default)||(s=r["e"]?this.$slots.default():this.$slots.default),t("input",s)},t.prototype.click=function(){return this.ej2Instances.click()},t.prototype.focusIn=function(){return this.ej2Instances.focusIn()},t.prototype.toggle=function(){return this.ej2Instances.toggle()},t=v([Object(r["b"])({props:g,model:{event:"modelchanged"}},j)],t),t}(r["a"]),k={name:"ejs-switch",install:function(e){e.component(k.name,I)}}},b59e:function(e,t,s){"use strict";var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",[t.isSubmitted?t._e():i("div",{staticClass:"e-card"},[i("div",{staticClass:"e-card-title"},[t._v(t._s(t.pageTitle))]),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"e-card-content"},[i("div",[i("span",{staticClass:"error-container"},[t._v("\n          "+t._s(t.erorrMessage)+"\n        ")])]),i("form",{staticClass:"login",on:{submit:function(e){return e.preventDefault(),t.verifyEmail.apply(null,arguments)}}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule,t.emailRule],value:this.email},on:{validate:function(t){return e.isEmailValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Enter Email"},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})],1),i("re-captcha",[i("div",{staticClass:"align-bottom"},[i("ejs-button",{attrs:{type:"submit",cssClass:"e-info margin-button"}},[t._v("\n              Verify Email\n            ")])],1)])],1)])])])},r=[],n=s("940e"),a=s("4efe"),o=s("6df8"),l={name:"EmailValidation",components:{SccInputValidator:n["a"],ReCaptcha:a["a"]},props:{pageTitle:{type:String,required:!0},erorrMessage:{type:String,default:""},isSubmitted:{type:Boolean,default:!1}},data:function(){return{email:null,requiredRule:o["g"],emailRule:o["c"],isEmailValid:!1}},methods:{validateEmail:function(){this.email=null===this.email?"":this.email},verifyEmail:function(){this.$emit("submit",this.email)}}},c=l,u=(s("74d1"),s("2877")),d=Object(u["a"])(c,i,r,!1,null,null,null);t["a"]=d.exports},bec5:function(e,t,s){"use strict";s("68d6")},c1b3:function(e,t,s){},c504:function(e,t,s){},ce58:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",[t.isRightUser?i("div",[t.addNewUser?i("div",[i("email-verification",{ref:"refEmailVerification",attrs:{"page-title":t.title,"erorr-message":t.emailSubmitErorrMessage,"is-submitted":t.isEmailSubmitted},on:{submit:t.onSubmitEmail}})],1):i("div",[i("div",{attrs:{id:"userProfileInfo"}},[i("profile-info-edit",{ref:"refCompanyInfo",attrs:{"user-profile-id":t.userId,"user-profiles-data":t.currentUser}})],1),i("div",{staticStyle:{display:"none"},attrs:{id:"contactInfo"}},[i("contact-info-edit",{ref:"refContactInfo",attrs:{"user-profile-id":t.userId,"user-profiles-data":t.currentUser}})],1),i("div",{staticStyle:{display:"none"},attrs:{id:"securityQuestions"}},[i("security-questions-edit",{ref:"refSecurityQuestions",attrs:{"user-profile-id":t.userId,"user-profiles-data":t.currentUser}})],1),i("div",{staticStyle:{display:"none"},attrs:{id:"userName"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.isUserProfile,expression:"isUserProfile"}]},[i("update-email",{ref:"refUpdateEmail",attrs:{"user-profile-id":t.userId,"user-profiles-data":t.currentUser}})],1)]),i("div",{staticStyle:{display:"none"},attrs:{id:"password"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!t.isUserProfile,expression:"!isUserProfile"}]},[i("web-login-info",{ref:"refwebLoginInfo",attrs:{"user-profile-id":t.userId,"user-profiles-data":t.currentUser,enableForcePasswordChange:!0,handleSubmit:t.onSubmitPassword},on:{"enable-submit":function(t){return e.isSubmitDisabled=!t}}})],1),i("div",{staticClass:"align-center-bottom"},[i("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button",disabled:t.isSubmitDisabled},nativeOn:{click:function(e){return t.onSubmitPassword.apply(null,arguments)}}},[t._v("Submit")])],1)]),i("div",{staticStyle:{display:"none"},attrs:{id:"notes"}},[i("div",[t._m(0),i("div",{staticClass:"e-card-separator"}),i("div",[i("user-notes-list",{attrs:{"user-profile-id":t.userId}})],1)])])]),t.isNewUser?t._e():i("div",[t.isLogedUserAdmin&&!t.isNewUserProcess?i("div",{staticClass:"back-header"},[i("ejs-button",{attrs:{cssClass:"e-danger margin-button"},nativeOn:{click:function(e){return t.onCancelButtonClick.apply(null,arguments)}}},[t._v("Back to Customer Details List")])],1):t._e(),i("div",{attrs:{tabindex:"0",id:"basic"}},[i("div",[i("ejs-tab",{ref:"refTabInstance",staticClass:"e-background",attrs:{id:"collapsible_tab",created:t.tabCreated,selected:t.tabSelected,selecting:t.tabSelect}},[i("e-tabitems",[i("e-tabitem",{attrs:{header:t.headerText0,content:t.content0}}),i("e-tabitem",{attrs:{header:t.headerText1,content:t.content1}}),i("e-tabitem",{attrs:{header:t.headerText2,content:t.content2}}),i("e-tabitem",{attrs:{header:t.headerText3,content:t.content3}}),i("e-tabitem",{attrs:{header:t.headerText4,content:t.content4}}),i("e-tabitem",{attrs:{header:t.headerText5,content:t.content5}})],1)],1)],1)])])]):i("div",[t._v("\n    Please contact SCC Admin, to confirm you permissions. The user Id does not match.\n  ")])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("h4",{staticClass:"title-color"},[e._v("Notes")])])}],n=s("c7eb"),a=s("1da1"),o=s("5530"),l=(s("c740"),s("a026")),c=s("9a0f"),u=s("21cb"),d=s("5e13"),h=s("2f62"),p=s("dff1"),m=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("user-address-info",{ref:"refUserProfileInfo",attrs:{"user-profile-id":e.userProfileId,"user-profiles-data":e.userProfilesData}}),s("company-info",{ref:"refCompanyInfo",attrs:{"user-profile-id":e.userProfileId,"user-profiles-data":e.userProfilesData}}),s("div",{staticClass:"align-center-bottom"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.onSubmitUserProfileClick(!1)}}},[e._v("Save Personal Details")])],1)],1)},f=[],v=(s("a15b"),s("561f")),g=s("a4af");l["default"].use(c["a"]);var b={name:"ProfileInfoEdit",components:{CompanyInfo:v["a"],UserAddressInfo:g["a"]},props:{userProfileId:String,userProfilesData:Object},data:function(){return{}},methods:{onSubmitUserProfileClick:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$refs.refUserProfileInfo,s=this.$refs.refCompanyInfo,i="1234455676",r=[],n="",a=t.isFirstNameValid,o=t.isLastNameValid,l=t.isAddressValid,c=t.isCityNameValid,u=t.isPostalCodeValid,d=s.isCompanyValid,h=a&&o&&l&&c&&u&&d;return a||r.push("First Name"),o||r.push("Last Name"),l||r.push("Address"),c||r.push("City Name"),u||r.push("Postal Code"),s.companyData(),h?(t.userProfile(i),e||(n="User profile updated successfully.")):(t.validateUserInfo(),n="Please enter value in required fields.<br><ul><li>".concat(r.join("</li><li>"),"</li></ul>")),n&&this.showNotification(r,n),h},showNotification:function(e,t){var s=this.$parent.$parent,i={content:t,timeOut:5e3};0===e.length?(i.cssClass="e-toast-success",i.title="Success!"):(i.cssClass="e-toast-danger",i.title="Error!"),s.notificationToasts.push(i),s.$refs.notifierRef.show()}}},y=b,w=s("2877"),C=Object(w["a"])(y,m,f,!1,null,null,null),x=C.exports,S=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("contact-info",{ref:"refContactInfo",attrs:{"user-profile-id":e.userProfileId,"user-profiles-data":e.userProfilesData}}),s("div",{staticClass:"align-center-bottom btn-save-contact-info-container"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.onSubmitContactClick(!1)}}},[e._v("Save Contact Information")])],1)],1)},O=[],j=s("f56d");l["default"].use(c["a"]);var I={name:"ManageCustomer",components:{ContactInfo:j["a"]},props:{userProfileId:String,userProfilesData:Object},data:function(){return{}},methods:{onSubmitContactClick:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!0,s=this.$refs.refContactInfo;return t=s.validateContact(),t?s.updateUserContacts(e):s.notify("Error","Opss! Something went wrong."),t}}},k=I,A=Object(w["a"])(k,S,O,!1,null,null,null),E=A.exports,T=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("security-questions",{ref:"refSecurityQuestions",attrs:{"user-profile-id":e.userProfileId,"user-profiles-data":e.userProfilesData}}),s("div",{staticClass:"align-center-bottom"},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(t){return e.onSubmitSecurityQuestionClick(!1)}}},[e._v("Save Security Questions\n        ")])],1)],1)},L=[],D=s("05f5");l["default"].use(c["a"]);var P={name:"ManageCustomer",components:{SecurityQuestions:D["a"]},props:{userProfileId:String,userProfilesData:Object},data:function(){return{}},methods:{onSubmitSecurityQuestionClick:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$refs.refSecurityQuestions,s=[],i=null,r=t.isSecurityAnswerOne,n=t.isSecurityAnswerTwo,a=t.isSecurityAnswerThree,o=t.isConfirmAnswerOne,l=t.isConfirmAnswerTwo,c=t.isConfirmAnswerThree,u=r&&n&&a&&o&&l&&c;return r&&o||s.push("Answer 1"),n&&l||s.push("Answer 2"),a&&c||s.push("Answer 3"),u?(t.securityQuestions(),e||(i="Security questions updated successfully.")):(t.validateSecurityQuestions(),i="Please enter value in required fields.<br><ul><li>".concat(s.join("</li><li>"),"</li></ul>")),i&&this.showNotification(s,i),u},showNotification:function(e,t){var s=this.$parent.$parent,i={content:t,timeOut:5e3};0===e.length?(i.cssClass="e-toast-success",i.title="Success!"):(i.cssClass="e-toast-danger",i.title="Error!"),s.notificationToasts.push(i),s.$refs.notifierRef.show()}}},N=P,$=Object(w["a"])(N,T,L,!1,null,null,null),M=$.exports,_=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",[i("div",[i("h4",{staticClass:"title-color"},[t._v("Update Email")]),i("div",{staticStyle:{width:"70%"},attrs:{id:"input-container"}},[i("ejs-textbox",{attrs:{id:"textbox",floatLabelType:"Always",placeholder:"Email",readonly:!0},model:{value:t.userEmail,callback:function(e){t.userEmail=e},expression:"userEmail"}})],1)]),t.isOwner?i("div",[i("span",{staticStyle:{"font-size":"12px","font-weight":"500",color:"red","font-style":"italic"}},[t._v("\n      You are currently listed as a Site Owner. Please contact ASCA at\n      1-888-413-0099 to update our email address.\n    ")])]):i("div",[i("div",[i("div",{staticStyle:{width:"70%"},attrs:{id:"input-container"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule,t.emailRule],value:this.newUserName},on:{validate:function(t){return e.isEmailValid=t}}},[i("ejs-textbox",{attrs:{floatLabelType:"Always",placeholder:"New Email"},model:{value:t.newUserName,callback:function(e){t.newUserName=e},expression:"newUserName"}})],1)],1)]),i("div",{staticClass:"align-center-bottom"},[i("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(e){return t.onSubmitButtonClick.apply(null,arguments)}}},[t._v("Update")])],1)])])},U=[],R=(s("7db0"),s("d3b7"),s("6df8")),F=s("940e"),B=s("5b6f");l["default"].use(u["a"]),l["default"].use(c["a"]);var q={name:"UpdateEmail",components:{SccInputValidator:F["a"]},props:{userProfileId:String,userProfilesData:Object},mounted:function(){this.loggedUserId=this.$store.getters.loggedUser?this.$store.getters.loggedUser.id:"",this.checkSiteOwner()},computed:{isLogedUserAdmin:function(){return this.isLogedUserInRole("admin")||this.isLogedUserInRole("superadmin")},userEmail:{get:function(){return this.userProfilesData?this.userProfilesData.userName:""},set:function(e){return e}}},data:function(){return{loggedUserId:null,isOwner:!1,email:null,userId:null,requiredRule:R["g"],emailRule:R["c"],isEmailValid:!1,newUserName:null}},watch:{},methods:{notify:function(e,t){this.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$refs.notifierRef.show()},isLogedUserInRole:function(e){var t=-1,s=this.$store.getters.loggedUser;return s&&s.roles&&(t=s.roles.findIndex((function(t){return t.roleName.toLowerCase()===e}))),t>=0},checkSiteOwner:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return s="Site Owner",e.userId=e.userProfileId,t.next=4,Object(B["b"])(e.userId);case 4:i=t.sent,null!==i.data&&i.data.length>0&&(e.isOwner=!!i.data.find((function(e){return e.contactType===s})));case 6:case"end":return t.stop()}}),t)})))()},validateForm:function(){return!!this.isEmailValid||(this.newUserName=null===this.newUserName?"":this.newUserName,this.notify("Error","Please enter required field<br>New Email"),!1)},onSubmitButtonClick:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a,o;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!e.isEmailValid){t.next=12;break}return e.userId=e.userProfileId,s=window.location.host,i=e.userId,r=e.newUserName,a=!1,t.next=8,e.$store.dispatch(p["b"],{userId:i,newUserName:r,rootURL:s});case 8:a=!!t.sent,a?e.loggedUserId===e.userId?(e.notify("Success","A active link has been sent to user email account."),e.$router.push("/email-sent")):(e.notify("Success","A active link has been sent to user email account."),e.$router.push("/users")):(o="Updating your email process has an error.  Please confirm email does not already exist. Please review email sent to your inbox for details. ",e.isLogedUserAdmin&&(o="Updating user's email has an error.  Please confirm email does not already exist."),e.notify("Error",o)),t.next=14;break;case 12:e.newUserName=null===e.newUserName?"":e.newUserName,e.notify("Error","Please enter required field<br>New Email");case 14:t.next=20;break;case 16:t.prev=16,t.t0=t["catch"](0),e.notify("Error","Oops, Something went wrong. We are working on getting this fixed as soon as we can. You may be able to try again shortly. If you continue to experience this issue, you can contact ASCA Tanks at ascatanks@safetycodes.ab.ca or by calling 1-888-413-0099"),e.$router.push("/login");case 20:case"end":return t.stop()}}),t,null,[[0,16]])})))()}}},H=q,V=Object(w["a"])(H,_,U,!1,null,null,null),W=V.exports,Q=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e.isNewNote?s("div",[s("save-user-notes",{ref:"refUserNotes",attrs:{"user-profile-id":e.userProfileId,"user-note":e.userNoteData},on:{IsNewNoteVal:function(t){return e.setNewNote(t)},RebindGrid:function(t){return e.refreshGrid(t)}}})],1):s("div",[s("div",{staticClass:"form-row"},[s("div",{staticStyle:{"text-align":"left","padding-bottom":"1px"}},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info"},nativeOn:{click:function(t){return e.onAddNoteClick.apply(null,arguments)}}},[s("font-awesome-icon",{staticStyle:{display:"inline"},attrs:{icon:["fas","plus"]}}),e._v(" Add Notes\n        ")],1)],1)]),s("ejs-grid",{ref:"refNotesList",attrs:{dataSource:e.userNotes,created:e.created,enablePersistence:!1,"selection-settings":e.selectionOptions,commandClick:e.commandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.pageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{headerText:"Action",width:"10%",commands:e.editCommand,textAlign:"Left"}}),s("e-column",{attrs:{field:"lastModifiedDate",type:"date",format:e.gridDateFormat,width:"10%",headerText:"Date",textAlign:"Left"}}),s("e-column",{attrs:{field:"summary",width:"35%",headerText:"Summary",textAlign:"Left"}}),s("e-column",{attrs:{field:"lastModifiedBy",width:"35%",headerText:"Last Update User",textAlign:"Left"}}),s("e-column",{attrs:{headerText:"Delete",width:"10%",commands:e.deleteCommand,textAlign:"Left"}})],1)],1)],1)])},z=[],K=(s("a4d3"),s("e01a"),s("c041")),Y=s("af93"),G=s("aa15"),X=s("e09d"),Z=s("4f03"),J=s("e29d"),ee=s("b0e8"),te=s("d61a"),se=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",[i("div",[i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.summary},on:{validate:function(t){return e.isSummaryValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Summary"},model:{value:t.data.summary,callback:function(e){t.$set(t.data,"summary",e)},expression:"data.summary"}})],1)],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[i("scc-input-validator",{attrs:{rules:[t.requiredRule],value:t.data.description},on:{validate:function(t){return e.isDescriptionValid=t}}},[i("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"Description",multiline:"true",rows:"3"},model:{value:t.data.description,callback:function(e){t.$set(t.data,"description",e)},expression:"data.description"}})],1)],1)])]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"align-right",staticStyle:{width:"650px"}},[i("ejs-button",{attrs:{type:"submit",cssClass:"e-info margin-button"},nativeOn:{click:function(e){return t.onSubmitNotesClick()}}},[t._v("Save")]),i("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(e){return t.onCancelClick()}}},[t._v("Cancel")])],1)])])},ie=[],re=s("b37f");l["default"].use(u["a"]);var ne={name:"SaveUserNotes",components:{SccInputValidator:F["a"]},props:{userProfileId:String,userNote:Object},data:function(){return{data:{summary:null,description:null},requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},isSummaryValid:!1,isDescriptionValid:!1}},mounted:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:null!==e.userNote.id&&(e.data.summary=e.userNote.summary,e.data.description=e.userNote.description);case 1:case"end":return t.stop()}}),t)})))()},methods:{notify:function(e,t){this.$parent.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$parent.$refs.notifierRef.show()},validateNotesInfo:function(){this.data.summary=this.data.summary?this.data.summary:"",this.data.description=this.data.description?this.data.description:""},onSubmitNotesClick:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.validateNotesInfo(),s=e.isSummaryValid&&e.isDescriptionValid,!s){t.next=18;break}return t.prev=3,e.userNote.id||(e.userNote.id="00000000-0000-0000-0000-000000000000"),i=Object(o["a"])(Object(o["a"])({},e.userNote),e.data),t.next=8,e.$store.dispatch(re["y"],{data:i});case 8:e.notify("Success!","Notes saved successfully."),e.$emit("IsNewNoteVal",!1),e.$emit("RebindGrid",!0),t.next=16;break;case 13:t.prev=13,t.t0=t["catch"](3),e.notify("Error","Oops! Something went wrong.");case 16:t.next=19;break;case 18:e.notify("Error","Please fill out required fields and try again.");case 19:return t.abrupt("return",s);case 20:case"end":return t.stop()}}),t,null,[[3,13]])})))()},onCancelClick:function(){this.$emit("IsNewNoteVal",!1)}}},ae=ne,oe=Object(w["a"])(ae,se,ie,!1,null,null,null),le=oe.exports,ce=s("dd09");l["default"].use(c["a"]),l["default"].use(K["a"]),l["default"].use(te["b"]);var ue={name:"UserNotesList",created:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getNotesList();case 2:case"end":return t.stop()}}),t)})))()},components:{SaveUserNotes:le},props:{userProfileId:String},data:function(){return{isNewNote:!1,selectionOptions:{type:"Single",enableSimpleMultiRowSelection:!1,enableToggle:!0,persistSelection:!0},userNoteData:{userID:this.userProfileId,summary:null,description:null,lastModifiedBy:null,lastModifiedDate:null},DialogObj:null,toolbarOptions:["Search"],pageSettings:{pageSize:10},editCommand:[{type:"Action",buttonOption:{cssClass:"e-flat",iconCss:"e-edit e-icons"}}],deleteCommand:[{type:"Delete",buttonOption:{cssClass:"e-flat deletebtn",iconCss:"e-delete e-icons"}}],gridDateFormat:Object(ce["a"])()}},computed:Object(o["a"])({},Object(h["c"])({userNotes:"userNotes"})),methods:{notify:function(e,t){this.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$refs.notifierRef.show()},onAddNoteClick:function(){this.isNewNote=!0,this.userNoteData.id=null,this.userNoteData.userID=this.userProfileId,this.userNoteData.summary=null,this.userNoteData.description=null,this.userNoteData.lastModifiedBy=null,this.userNoteData.lastModifiedDate=null},commandClick:function(e){switch(this.userNoteData={id:e.rowData.id,userID:this.userProfileId,summary:e.rowData.summary,description:e.rowData.description,lastModifiedBy:e.rowData.lastModifiedBy,lastModifiedDate:e.rowData.lastModifiedDate},e.commandColumn.type){case"Delete":this.DialogObj=te["b"].confirm({title:"Delete Notes",content:"Are you sure you want to delete this notes?",okButton:{text:"OK",click:this.deleteNotes},cancelButton:{text:"Cancel",click:this.hideDeleteDialog},showCloseIcon:!0,closeOnEscape:!0,animationSettings:{effect:"Zoom"}});break;case"Action":this.isNewNote=!0;break;default:break}},deleteNotes:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=null===(s=e.userNoteData)||void 0===s?void 0:s.id,t.next=3,e.$store.dispatch(re["e"],i).then((function(){e.refreshGrid(!0),e.notify("Success!","Notes deleted successfully."),e.hideDeleteDialog()})).catch((function(t){console.error("postdelete_err:".concat(t.Status)),e.hideDeleteDialog(),te["b"].alert(t.message)}));case 3:case"end":return t.stop()}}),t)})))()},hideDeleteDialog:function(){this.DialogObj.hide()},created:function(){this.isNewNote=!1},setNewNote:function(e){this.isNewNote=e},refreshGrid:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(!e){s.next=3;break}return s.next=3,t.getNotesList();case 3:case"end":return s.stop()}}),s)})))()},getNotesList:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userProfileId,t.next=4,e.$store.dispatch(re["i"],{userId:s});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()}},provide:{grid:[Y["a"],G["a"],X["a"],Z["a"],J["a"],ee["a"]]}},de=ue,he=Object(w["a"])(de,Q,z,!1,null,null,null),pe=he.exports,me=s("b59e"),fe=s("7722");l["default"].use(c["a"]),l["default"].use(u["a"]),l["default"].use(d["a"]);var ve={name:"ManageCustomer",components:{ProfileInfoEdit:x,SecurityQuestionsEdit:M,ContactInfoEdit:E,UpdateEmail:W,UserNotesList:pe,EmailVerification:me["a"],WebLoginInfo:fe["a"]},created:function(){var e=this;this.userId=this.$route.params.id,this.paramId=this.$route.params.id,this.getUserById().then((function(){e.currentUser=e.$store.getters.userById}))},data:function(){return{title:"Add Web User",isEmailSubmitted:!1,emailSubmitErorrMessage:null,userId:null,currentUser:null,headerText0:{text:"Personal Details"},headerText1:{text:"Contact Information"},headerText2:{text:"Security Question"},headerText3:{text:"Update Email"},headerText4:{text:"Password"},headerText5:{text:"Notes"},content0:"#userProfileInfo",content1:"#contactInfo",content2:"#securityQuestions",content3:"#userName",content4:"#password",content5:"#notes",userProfileData:null,userNewEmail:"",erorrMessageOnSubmit:null,isUserProfile:!0,phoneNumberValid:[],paramId:null,isSubmitDisabled:!0}},computed:Object(o["a"])(Object(o["a"])({},Object(h["c"])({loggedUser:"loggedUser"})),{},{isLogedUserAdmin:function(){return this.isLogedUserInRole("admin")||this.isLogedUserInRole("superadmin")},addNewUser:function(){return"null"===this.userId&&(this.isLogedUserAdmin||this.isLogedUserSuperAdmin)},isNewUser:function(){return"null"===this.userId},isNewUserProcess:function(){return"null"===this.paramId},isRightUser:function(){var e;return this.isLogedUserAdmin||this.userId===(null===(e=this.loggedUser)||void 0===e?void 0:e.id)}}),methods:{enableSubmit:function(e){this.isSubmitDisabled=!e},showNotification:function(e,t){var s=this.$parent,i={content:t,timeOut:5e3};0===e.length?(i.cssClass="e-toast-success",i.title="Success!"):(i.cssClass="e-toast-danger",i.title="Error!"),s.notificationToasts.push(i),s.$refs.notifierRef.show()},isLogedUserInRole:function(e){var t=-1,s=this.loggedUser;return s&&s.roles&&(t=s.roles.findIndex((function(t){return t.roleName.toLowerCase()===e}))),t>=0},getUserById:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,null===e.userId||"null"===e.userId){t.next=7;break}return s=e.userId,t.next=5,e.$store.dispatch(p["e"],{userId:s});case 5:t.next=8;break;case 7:e.currentUser=null;case 8:t.next=14;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error("user accounts err",t.t0),"Network Error"===t.t0.message?e.$router.push({name:"NotFound"}):e.$router.push({name:"UnAuthorized"});case 14:case"end":return t.stop()}}),t,null,[[0,10]])})))()},onCancelButtonClick:function(){this.$router.push("/users")},tabCreated:function(){var e;this.isUserProfile?(this.$refs.refTabInstance.ej2Instances.items[3].visible=!0,this.$refs.refTabInstance.ej2Instances.items[4].visible=!1):(this.$refs.refTabInstance.ej2Instances.items[3].visible=!1,this.$refs.refTabInstance.ej2Instances.items[4].visible=!0),this.$refs.refTabInstance.ej2Instances.items[5].visible=null===this||void 0===this||null===(e=this.loggedUser)||void 0===e?void 0:e.isSCCUser},tabSelect:function(e){var t=!0;switch(e.selectedIndex){case 0:t=this.$refs.refCompanyInfo.onSubmitUserProfileClick(!0);break;case 1:t=this.$refs.refContactInfo.onSubmitContactClick(!0);break;case 2:t=!!this.isLogedUserAdmin||this.$refs.refSecurityQuestions.onSubmitSecurityQuestionClick(!0);break;case 3:t=!0,this.$refs.refUpdateEmail.newUserName&&(t=this.$refs.refUpdateEmail.validateForm());break;case 4:t=this.validateForm();break}t||(e.cancel=!0)},tabSelected:function(e){for(var t=this,s=document.querySelectorAll("#collapsible_tab.e-tab > .e-content > .e-item"),i=0;i<s.length;i+=1)s[i].classList.remove("collapse");void 0!==this.actLine&&this.actLine.classList.remove("collapse"),this.trgIndex=e.selectedIndex,e.selectedItem.addEventListener("click",(function(){t.updateCollapseClass(t.trgIndex)}))},updateCollapseClass:function(e){var t=document.getElementById("e-content_".concat(e));t&&(t.classList.contains("collapse")?(t.classList.remove("collapse"),this.actLine.classList.remove("collapse")):(t.classList.add("collapse"),this.actLine.classList.add("collapse")))},onSubmitEmail:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i,r,a;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(i=t.$refs.refEmailVerification,r=e,a=window.location.host,!i.isEmailValid){s.next=40;break}return s.prev=4,s.next=7,t.$store.dispatch(p["c"],{userName:r,rootURL:a,confirmType:"admin-registration"});case 7:if(200!==t.$store.getters.userDetails.status){s.next=16;break}t.currentUser=t.$store.getters.userDetails.data,null===t.$store.getters.userDetails.data.userProfile&&(t.isUserProfile=!1),t.userId=t.currentUser.userId,t.$parent.notificationToasts.push({title:"Success!",content:"Username verified successfully.",cssClass:"e-toast-success",timeOut:5e3}),t.isEmailSubmitted=!0,t.emailSubmitErorrMessage=null,s.next=31;break;case 16:if(!t.$store.getters.userDetails){s.next=31;break}s.t0=t.$store.getters.userDetails,s.next=403===s.t0?20:409===s.t0?22:423===s.t0?24:404===s.t0?26:28;break;case 20:return t.erorrMessageOnSubmit="Account exist with given email id.",s.abrupt("break",29);case 22:return t.erorrMessageOnSubmit="Account exist with given email id.",s.abrupt("break",29);case 24:return t.erorrMessageOnSubmit="Given email id is locked.",s.abrupt("break",29);case 26:return t.$router.push("/NotFound"),s.abrupt("break",29);case 28:t.erorrMessageOnSubmit="Oops, Something went wrong. We are working on getting this fixed as soon as we can. You may be able to try again shortly. If you continue to experience this issue, you can contact ASCA Tanks at ascatanks@safetycodes.ab.ca or by calling 1-888-413-0099 ";case 29:t.erorrMessageOnSubmit&&t.$parent.notificationToasts.push({title:"Error!",content:t.erorrMessageOnSubmit,cssClass:"e-toast-danger",timeOut:5e3}),t.emailSubmitErorrMessage=t.erorrMessageOnSubmit;case 31:s.next=38;break;case 33:s.prev=33,s.t1=s["catch"](4),t.erorrMessageOnSubmit="Oops, Something went wrong. We are working on getting this fixed as soon as we can. You may be able to try again shortly. If you continue to experience this issue, you can contact ASCA Tanks at ascatanks@safetycodes.ab.ca or by calling 1-888-413-0099 ",t.erorrMessageOnSubmit&&t.$parent.notificationToasts.push({title:"Error!",content:t.erorrMessageOnSubmit,cssClass:"e-toast-danger",timeOut:5e3}),t.emailSubmitErorrMessage=t.erorrMessageOnSubmit;case 38:s.next=42;break;case 40:i.validateEmail(),t.$parent.notificationToasts.push({title:"Error!",content:"Please provide valid email id.",cssClass:"e-toast-danger",timeOut:5e3});case 42:t.$parent.notificationToasts.length>0&&t.$parent.$refs.notifierRef.show();case 43:case"end":return s.stop()}}),s,null,[[4,33]])})))()},validateForm:function(){var e=this.$refs.refwebLoginInfo;return!!(e.isPasswordValid&&e.isConfirmPassword&&e.showConfirmPasswordMatch)||(e.validatePassword(),this.notifySuccessMessage="",this.notifyErrorMessage="Please enter value in required fields.",this.$parent.notificationToasts.push({title:"Error!",content:this.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3}),this.$parent.notificationToasts.length>0&&this.$parent.$refs.notifierRef.show(),!1)},onSubmitPassword:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=!0,i=e.$refs.refwebLoginInfo,!(i.isPasswordValid&&i.isConfirmPassword&&i.showConfirmPasswordMatch)){t.next=12;break}return t.next=5,i.register();case 5:e.notifyErrorMessage="",e.notifySuccessMessage="Password has successfully added.",e.$parent.notificationToasts.push({title:"Success!",content:e.notifySuccessMessage,cssClass:"e-toast-success",timeOut:5e3}),e.$parent.notificationToasts.length>0&&e.$parent.$refs.notifierRef.show(),e.isNewUserProcess&&e.isLogedUserAdmin&&e.$router.push("/users"),t.next=18;break;case 12:i.validatePassword(),e.notifySuccessMessage="",e.notifyErrorMessage="Please enter value in required fields.",e.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3}),e.$parent.notificationToasts.length>0&&e.$parent.$refs.notifierRef.show(),s=!1;case 18:return t.abrupt("return",s);case 19:case"end":return t.stop()}}),t)})))()}}},ge=ve,be=(s("0338"),Object(w["a"])(ge,i,r,!1,null,null,null));t["default"]=be.exports},ce98:function(e,t,s){"use strict";s("52f1")},d896:function(e,t,s){"use strict";s.d(t,"a",(function(){return ge}));var i=s("7de8"),r=s("db21"),n=s("45a9"),a="e-error",o="e-input-group",l="e-float-input",c="e-label-top",u="e-label-bottom",d={0:"[0-9]",9:"[0-9 ]","#":"[0-9 +-]",L:"[A-Za-z]","?":"[A-Za-z ]","&":"[^ ]+",C:"[^]+",A:"[A-Za-z0-9]",a:"[A-Za-z0-9 ]"};function h(){if(Object(i["w"])(this.element,{role:"textbox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive","aria-valuenow":""}),this.mask){for(var e=this.mask.split("]"),t=0;t<e.length;t++)if("\\"===e[t][e[t].length-1]){e[t]=e[t]+"]";for(var s=e[t].split("["),r=0;r<s.length;r++)"\\"===s[r][s[r].length-1]&&(s[r]=s[r]+"["),x.call(this,s[r])}else{s=e[t].split("[");if(s.length>1){var n=!1;for(r=0;r<s.length;r++)"\\"===s[r]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[r]+"["):""===s[r]?n=!0:""!==s[r]&&n||r===s.length-1?(this.customRegExpCollec.push("["+s[r]+"]"),this.hiddenMask+=this.promptChar,n=!1):x.call(this,s[r])}else x.call(this,s[0])}if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!Object(i["U"])(this.customCharacters))for(t=0;t<this.promptMask.length;t++)Object(i["U"])(this.customCharacters[this.promptMask[t]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[t],"g"),this.promptChar));var a=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(t=0;t<this.hiddenMask.length;t++){r=0;t>=1&&(r=t),a=this.hiddenMask.length-this.promptMask.length,r-=a,t>0&&"\\"!==this.hiddenMask[t-1]&&(">"===this.hiddenMask[t]||"<"===this.hiddenMask[t]||"|"===this.hiddenMask[t])&&(this.promptMask=this.promptMask.substring(0,r)+this.promptMask.substring(t+1-a,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,r)+this.escapeMaskValue.substring(t+1-a,this.escapeMaskValue.length)),"\\"===this.hiddenMask[t]&&(this.promptMask=this.promptMask.substring(0,r)+this.hiddenMask[t+1]+this.promptMask.substring(t+2-a,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,r)+this.escapeMaskValue[t+1]+this.escapeMaskValue.substring(t+2-a,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");Object(i["w"])(this.element,{"aria-invalid":"false"})}}function p(){K.call(this,this.promptMask),z.call(this,this.value)}function m(){i["l"].add(this.element,"keydown",D,this),i["l"].add(this.element,"keypress",M,this),i["l"].add(this.element,"keyup",U,this),i["l"].add(this.element,"input",L,this),i["l"].add(this.element,"focus",j,this),i["l"].add(this.element,"blur",k,this),i["l"].add(this.element,"paste",A,this),i["l"].add(this.element,"cut",E,this),i["l"].add(this.element,"drop",T,this),i["l"].add(this.element,"mousedown",S,this),i["l"].add(this.element,"mouseup",O,this),this.enabled&&(v.call(this),this.formElement&&i["l"].add(this.formElement,"reset",y,this))}function f(){i["l"].remove(this.element,"keydown",D),i["l"].remove(this.element,"keypress",M),i["l"].remove(this.element,"keyup",U),i["l"].remove(this.element,"input",L),i["l"].remove(this.element,"focus",j),i["l"].remove(this.element,"blur",k),i["l"].remove(this.element,"paste",A),i["l"].remove(this.element,"cut",E),i["l"].remove(this.element,"mousedown",S),i["l"].remove(this.element,"mouseup",O),this.formElement&&i["l"].remove(this.formElement,"reset",y)}function v(){this.showClearButton&&i["l"].add(this.inputObj.clearButton,"mousedown touchstart",g,this)}function g(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(b.call(this,e),this.value="")}function b(e){var t=this.element.value;K.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),_.call(this,e,t),this.element.setSelectionRange(0,0)}function y(){"EJS-MASKEDTEXTBOX"===this.element.tagName?K.call(this,this.promptMask):this.value=this.initInputValue}function w(e){return e.value}function C(e,t){var s="",r=0,n=!1,a=Object(i["U"])(t)?Object(i["U"])(e)||Object(i["U"])(this)?t:e.value:t;if(a!==this.promptMask)for(var o=0;o<this.customRegExpCollec.length;o++)n&&(n=!1),">"!==this.customRegExpCollec[r]&&"<"!==this.customRegExpCollec[r]&&"|"!==this.customRegExpCollec[r]&&"\\"!==this.customRegExpCollec[r]||(--o,n=!0),n||a[o]!==this.promptChar&&!Object(i["U"])(this.customRegExpCollec[r])&&(this._callPasteHandler||!Object(i["U"])(this.regExpCollec[this.customRegExpCollec[r]])||this.customRegExpCollec[r].length>2&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||!Object(i["U"])(this.customCharacters)&&!Object(i["U"])(this.customCharacters[this.customRegExpCollec[r]]))&&""!==a&&(s+=a[o]),++r;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=a),s}function x(e){for(var t=0;t<e.length;t++)this.hiddenMask+=e[t],"\\"!==e[t]&&this.customRegExpCollec.push(e[t])}function S(){this.isClicked=!0}function O(){this.isClicked=!1}function j(e){var t=this,s=this.element,r=0,n=C.call(this,s),a=!1,o=!1,l={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||I.call(this,l,s),this.mask&&(null!==n&&""!==n||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout((function(){if(s.selectionStart===t.promptMask.length||s.value[s.selectionStart]===t.promptChar)a=!0;else for(var e=s.selectionStart;e<t.promptMask.length;e++){if(s.value[e]===t.promptChar){a=!0;break}if(s.value[e]!==t.promptMask[e]){a=!1;break}}})),setTimeout((function(){var e=s.selectionStart-1;if(e===t.promptMask.length-1||s.value[e]===t.promptChar)o=!0;else for(var i=e;i>=0;i--){if(s.value[i]===t.promptChar){o=!0;break}if(s.value[i]!==t.promptMask[i]){o=!1;break}}})),this.isClicked||"Always"!==this.floatLabelType&&(null===n||""===n)&&null!==this.placeholder&&""!==this.placeholder)){for(r=0;r<this.promptMask.length;r++)if(s.value[r]===this.promptChar){setTimeout((function(){(a||o)&&(s.selectionEnd=r,s.selectionStart=r),l={selectionStart:s.selectionStart,event:e,value:t.value,maskedValue:s.value,container:t.inputObj.container,selectionEnd:s.selectionEnd},I.call(t,l,s)}));break}Object(i["U"])(s.value.match(this.promptChar))&&(l={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:this.inputObj.container,selectionEnd:s.selectionEnd},I.call(this,l,s)),this.isClicked=!1}}function I(e,t){this.trigger("focus",e,(function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd}))}function k(e){if(this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){K.call(this,"");var t=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!Object(i["U"])(t)&&t.classList.contains(c)&&Object(i["fb"])([t],c)}}function A(e){var t=this;if(this.mask&&!this.readonly){var s=this.element.selectionStart,i=this.element.selectionEnd,r=this.element.value;K.call(this,""),this._callPasteHandler=!0,setTimeout((function(){var n=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(n=C.call(t,t.element)),K.call(t,r),t.element.selectionStart=s,t.element.selectionEnd=i;var a=0;t.maskKeyPress=!0;do{B.call(t,n[a],!1,null),++a}while(a<n.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===r){var o=0;t.maskKeyPress=!0;do{B.call(t,n[o],!1,null),++o}while(o<n.length);t.maskKeyPress=!1}else _.call(t,e,r)}),1)}}function E(e){var t=this;if(this.mask&&!this.readonly){var s=this.element.value,i=this.element.selectionStart,r=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var n=this.element.value.substring(0,i)+this.promptMask.substring(i,r)+this.element.value.substring(r);setTimeout((function(){K.call(t,n),t.element.selectionStart=t.element.selectionEnd=i,t.element.value!==s&&_.call(t,e,null)}),0)}}function T(e){e.preventDefault()}function L(e){if(!0!==i["d"].isIE||""!==this.element.value||"Never"!==this.floatLabelType){var t={ctrlKey:!1,keyCode:229};if(Object(i["H"])(e,t),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||$.call(this,e),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,r=this.element.value.length-this.promptMask.length,n=this.element.value.substring(s-r,s);this.maskKeyPress=!1;var a=0;do{B.call(this,n[a],e.ctrlKey,e),++a}while(a<n.length);this.element.value!==this.preEleVal&&_.call(this,e,null)}var o=C.call(this,this.element);this.prevValue=o,this.value=o,""===o&&(K.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function D(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),$.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var s=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==this.undoCollec[this.undoCollec.length-1].value?(s=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),K.call(this,s.value),this.element.selectionStart=s.startIndex,this.element.selectionEnd=s.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(s=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),K.call(this,s.value),this.element.selectionStart=s.startIndex,this.element.selectionEnd=s.endIndex,this.redoCollec.splice(0,1))}}}function P(){var e,t=this.element.selectionStart,s=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],K.call(this,e.value),e.startIndex-t===1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=s+1)):(K.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function N(e,t,s){return"input"===s.type&&(e=!1,t=this.element.value,K.call(this,this.promptMask),z.call(this,t)),e}function $(e){var t,s=!1,r=!1;this.element.value.length<this.promptMask.length&&(s=!0,t=this.element.value,s=N.call(this,s,t,e),P.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=N.call(this,s,t,e));var n=this.element.selectionStart,a=this.element.selectionEnd,o=this.element.selectionStart,l=this.element.selectionEnd,c=this.hiddenMask.replace(/[>|\\<]/g,""),u=c[o-1],d=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:l});var h=!1,p=this.element.value;if(o>0||(8===e.keyCode||46===e.keyCode)&&o<this.element.value.length&&this.element.selectionEnd-o!==this.element.value.length){var m=o;o!==l?(o=l,46===e.keyCode&&(h=!0)):46===e.keyCode?++m:--m;for(var f=o;8===e.keyCode||s||h?f>m:f<m;8===e.keyCode||s||h?f--:f++)for(var v=o;8===e.keyCode||s||h?v>0:v<this.element.value.length;8===e.keyCode||s||h?v--:v++){var g=void 0;(8===e.keyCode||h)&&(n!==a&&n!==o||n===a)||s?(u=c[v-1],g=o-1):(u=c[v],g=o,++o);var b=this.element.value[g];if(Object(i["U"])(this.regExpCollec[u])&&!Object(i["U"])(this.customCharacters)&&Object(i["U"])(this.customCharacters[u])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&Object(i["U"])(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||h||++this.element.selectionStart;else{var y=this.element.value,w=this.promptChar,C=y.substring(0,g)+w+y.substring(o,y.length);K.call(this,C),e.preventDefault(),46!==e.keyCode||h||g++,this.element.selectionStart=this.element.selectionEnd=g,r=!0}if(o=this.element.selectionStart,!r&&8===e.keyCode||h||!r&&46!==e.keyCode?g=o-1:(g=o,r=!1),b=this.element.value[g],n!==a&&this.element.selectionStart===n||this.promptMask[g]===this.promptChar||b!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!Object(i["U"])(this.customCharacters))break}}46===e.keyCode&&h&&r&&(this.element.selectionStart=this.element.selectionEnd=d),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(K.call(this,this.promptMask),e.preventDefault(),this.element.selectionStart=this.element.selectionEnd=o),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==p&&_.call(this,e,t)}}function M(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey||e.ctrlKey&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var s=e.key;"Spacebar"===s&&(s=String.fromCharCode(e.keyCode)),s?s&&1===s.length&&(B.call(this,s,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,B.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===s&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-s.length)}this.element.value!==t&&_.call(this,e,t)}}function _(e,t){var s=this.isProtectedOnChange;if(!Object(i["U"])(this.changeEventArgs)&&!this.isInitial){var r={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=C.call(this,this.element)),Object(i["U"])(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,Object(i["ab"])(r,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",r)}this.preEleVal=this.element.value,this.prevValue=C.call(this,this.element),Object(i["w"])(this.element,{"aria-valuenow":this.element.value})}function U(e){if(this.mask&&!this.readonly){var t=void 0;if(this.maskKeyPress||229!==e.keyCode)W.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var r=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(r-n,r);if(this.undoCollec.length>0){t=this.undoCollec[this.undoCollec.length-1];var o=this.element.selectionStart;s=t.value;var l=t.value.substring(o-n,o);t=this.redoCollec[0],a=a.trim();var c=i["d"].isAndroid&&""===a;c||l===a||t.value.substring(o-n,o)===a?c&&H.call(this,e,o-1,this.element.selectionEnd-1,a,e.ctrlKey,!1):B.call(this,a,e.ctrlKey,e)}else s=this.promptMask,B.call(this,a,e.ctrlKey,e);this.maskKeyPress=!1,_.call(this,e,s)}}var u=C.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==u||""===u&&this.value!==u)&&(this.prevValue=u,this.value=u)}else _.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var d=this.element;setTimeout((function(){d.setSelectionRange(0,0)}),0)}}function R(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);K.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function F(e){this.maskKeyPress||R.call(this,e)}function B(e,t,s){if(F.call(this,e),!Object(i["U"])(this)&&!Object(i["U"])(e))for(var r,n,a=this.element.selectionStart,o=a,l=!1,c=this.element.value,u=!1,d=!1,h=0;h<e.length;h++){var p=e[h];if(a=this.element.selectionStart,this.maskKeyPress||o!==a||(a+=h),!this.maskKeyPress||a<this.promptMask.length){for(var m=a;m<this.promptMask.length;m++){var f=this.escapeMaskValue;r=f[a],"\\"===this.hiddenMask[a]&&this.hiddenMask[a+1]===e&&(d=!0),(Object(i["U"])(this.regExpCollec[r])&&(Object(i["U"])(this.customCharacters)||!Object(i["U"])(this.customCharacters)&&Object(i["U"])(this.customCharacters[r]))&&this.hiddenMask[a]!==this.promptChar&&"["!==this.customRegExpCollec[a][0]&&"]"!==this.customRegExpCollec[a][this.customRegExpCollec[a].length-1]||this.promptMask[a]!==this.promptChar&&Object(i["U"])(this.customCharacters)||this.promptChar===r&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=a+1,a=this.element.selectionStart,r=this.hiddenMask[a])}if(Object(i["U"])(this.customCharacters)||Object(i["U"])(this.customCharacters[r]))(!Object(i["U"])(this.regExpCollec[r])&&p.match(new RegExp(this.regExpCollec[r]))&&this.promptMask[a]===this.promptChar||this.promptMask[a]===this.promptChar&&"["===this.customRegExpCollec[a][0]&&"]"===this.customRegExpCollec[a][this.customRegExpCollec[a].length-1]&&p.match(new RegExp(this.customRegExpCollec[a])))&&(l=!0);else{var v=this.customCharacters[r],g=v.split(",");for(m=0;m<g.length;m++)if(p.match(new RegExp("["+g[m]+"]"))){l=!0;break}}if((!this.maskKeyPress||a<this.hiddenMask.length)&&l){if(0===h)if(this.maskKeyPress)this.undoCollec.push({value:c,startIndex:a,endIndex:a});else{var b=this.element.selectionStart,y=this.element.selectionEnd;this.redoCollec.length>0?(n=this.redoCollec[0].value,K.call(this,n),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:a,endIndex:a}),n=this.promptMask,K.call(this,n)),this.element.selectionStart=b,this.element.selectionEnd=y}a=this.element.selectionStart,q.call(this,s,a,p,n,d),u=!0,h===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),l=!1}else a=this.element.selectionStart,H.call(this,s,a,o,e,t,u);h!==e.length-1||l||(!i["d"].isAndroid||i["d"].isAndroid&&a<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||t||Object(i["U"])(s)||V.call(this)}}function q(e,t,s,i,r){if(this.hiddenMask.length>this.promptMask.length&&(s=Q.call(this,s,this.element.value)),!r){var n=this.element.value,a=n.substring(0,t)+s+n.substring(t+1,n.length);K.call(this,a),this.element.selectionStart=this.element.selectionEnd=t+1}}function H(e,t,s,r,n,a){if(!this.maskKeyPress){var o=this.element.value;t>=this.promptMask.length?K.call(this,o.substring(0,t)):(s===t?K.call(this,o.substring(0,t)+o.substring(t+1,o.length)):this.promptMask.length===this.element.value.length?K.call(this,o.substring(0,t)+o.substring(t,o.length)):K.call(this,o.substring(0,s)+o.substring(s+1,o.length)),this.element.selectionStart=this.element.selectionEnd=a||this.element.value[s]!==this.promptChar?t:s),V.call(this)}1!==r.length||n||Object(i["U"])(e)||V.call(this)}function V(){var e=this,t=this.element.parentNode,s=200;t.classList.contains(o)||t.classList.contains(l)?Object(i["u"])([t],a):Object(i["u"])([this.element],a),!0===this.isIosInvalid&&(s=400),Object(i["w"])(this.element,{"aria-invalid":"true"}),setTimeout((function(){e.maskKeyPress||W.call(e)}),s)}function W(){var e=this.element.parentNode;Object(i["U"])(e)||Object(i["fb"])([e],a),Object(i["fb"])([this.element],a),Object(i["w"])(this.element,{"aria-invalid":"false"})}function Q(e,t){var s,i,r=t,n=0;for(i=0;i<this.hiddenMask.length;i++)if("\\"===this.hiddenMask[i]&&(s=r.substring(0,i)+"\\"+r.substring(i,r.length)),">"!==this.hiddenMask[i]&&"<"!==this.hiddenMask[i]&&"|"!==this.hiddenMask[i]||(this.hiddenMask[i]!==r[i]&&(s=r.substring(0,i)+this.hiddenMask[i]+r.substring(i,r.length)),++n),s){if(s[i]===this.promptChar&&i>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+n===i){n=0;break}r=s}while(i>=0&&s){if(0===i||"\\"!==s[i-1]){if(">"===s[i]){e=e.toUpperCase();break}if("<"===s[i]){e=e.toLowerCase();break}if("|"===s[i])break}--i}return e}function z(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,K.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var t=0;t<e.length;t++)B.call(this,e[t],!1,null);var s=C.call(this,this.element);this.prevValue=s,this.value=s,_.call(this,null,null),this.maskKeyPress=!1;var r=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!Object(i["U"])(r)&&r.classList.contains(c)&&!this.isFocus&&(Object(i["fb"])([r],c),Object(i["u"])([r],u),K.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&K.call(this,this.value)}function K(e,t){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&Object(i["U"])(this.value)&&(e="");var s=C.call(this,t||this.element,e);null===s||""===s?(n["a"].setValue(e,t||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):n["a"].setValue(e,t||this.element,this.floatLabelType,this.showClearButton)}var Y=function(){function e(){}return e}(),G=(new Y,function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}()),X=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},Z="e-control-wrapper e-mask",J="e-input",ee="e-maskedtextbox",te="e-control",se="e-input-focus",ie=["title","style","class"],re=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.initInputValue="",i.isAngular=!1,i.preventChange=!1,i.isClicked=!1,i.maskOptions=t,i}return G(t,e),t.prototype.getModuleName=function(){return"maskedtextbox"},t.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=d,this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var e=Object(i["S"])("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),Object(i["fb"])([this.cloneElement],[te,ee,"e-lib"]),this.angularTagName=null,this.formElement=Object(i["A"])(this.element,"form"),"EJS-MASKEDTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var t=this.createElement("input"),s=0;s<this.element.attributes.length;s++)t.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),t.innerHTML=this.element.innerHTML;this.element.hasAttribute("id")&&this.element.removeAttribute("id"),this.element.classList.remove("e-control","e-maskedtextbox"),this.element.classList.add("e-mask-container"),this.element.appendChild(t),this.element=t,Object(i["nb"])("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&("Never"===this.floatLabelType&&Object(i["u"])([this.element],J),this.createWrapper(),this.updateHTMLAttrToWrapper(),""===this.element.name&&this.element.setAttribute("name",this.element.id),this.isInitial=!0,this.resetMaskedTextBox(),this.isInitial=!1,this.setMaskPlaceholder(!0,!1),this.setWidth(this.width),this.preEleVal=this.element.value,i["d"].isDevice||"11.0"!==i["d"].info.version&&"edge"!==i["d"].info.name||this.element.blur(),i["d"].isDevice&&i["d"].isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),this.renderComplete())},t.prototype.updateHTMLAttrToElement=function(){if(!Object(i["U"])(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var s=t[e];ie.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[s])}},t.prototype.updateCssClass=function(e,t){n["a"].setCssClass(this.getValidClassList(e),[this.inputObj.container],this.getValidClassList(t))},t.prototype.getValidClassList=function(e){var t=e;return Object(i["U"])(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t},t.prototype.updateHTMLAttrToWrapper=function(){if(!Object(i["U"])(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var s=t[e];if(ie.indexOf(s)>-1)if("class"===s){var r=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==r&&Object(i["u"])([this.inputObj.container],r.split(" "))}else if("style"===s){var n=this.inputObj.container.getAttribute(s);n=Object(i["U"])(n)?this.htmlAttributes[s]:n+this.htmlAttributes[s],this.inputObj.container.setAttribute(s,n)}else this.inputObj.container.setAttribute(s,this.htmlAttributes[s])}},t.prototype.resetMaskedTextBox=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.promptChar.length>1&&(this.promptChar=this.promptChar[0]),h.call(this),p.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&K.call(this,this.value);var e=C.call(this,this.element);this.prevValue=e,this.value=e,this.isInitial||f.call(this),m.call(this)},t.prototype.setMaskPlaceholder=function(e,t){(t||this.placeholder)&&(n["a"].setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&e&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&K.call(this,""))},t.prototype.setWidth=function(e){if(!Object(i["U"])(e))if("number"===typeof e)this.inputObj.container.style.width=Object(i["I"])(e),this.element.style.width=Object(i["I"])(e);else if("string"===typeof e){var t=e.match(/px|%|em/)?e:Object(i["I"])(e);this.inputObj.container.style.width=t,this.element.style.width=t}},t.prototype.checkHtmlAttributes=function(e){for(var t=e?Object(i["U"])(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"],s=0,r=t;s<r.length;s++){var n=r[s];if(!Object(i["U"])(this.element.getAttribute(n)))switch(n){case"placeholder":(Object(i["U"])(this.maskOptions)||void 0===this.maskOptions["placeholder"]||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"disabled":if(Object(i["U"])(this.maskOptions)||void 0===this.maskOptions["enabled"]||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"value":(Object(i["U"])(this.maskOptions)||void 0===this.maskOptions["value"]||e)&&this.setProperties({value:this.element.value},!e);break;case"readonly":if(Object(i["U"])(this.maskOptions)||void 0===this.maskOptions["readonly"]||e){var o="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:o},!e)}break}}},t.prototype.createWrapper=function(){var e=this.cssClass;Object(i["U"])(this.cssClass)||""===this.cssClass||(e=this.getValidClassList(this.cssClass)),this.inputObj=n["a"].createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enableRtl:this.enableRtl,cssClass:e,enabled:this.enabled,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}},this.createElement),this.inputObj.container.setAttribute("class",Z+" "+this.inputObj.container.getAttribute("class"))},t.prototype.onPropertyChanged=function(e,t){for(var s=0,i=Object.keys(e);s<i.length;s++){var r=i[s];switch(r){case"value":z.call(this,this.value),this.placeholder&&this.setMaskPlaceholder(!1,!1);break;case"placeholder":this.setMaskPlaceholder(!0,!0);break;case"width":this.setWidth(e.width);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"enabled":n["a"].setEnabled(e.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":n["a"].setReadonly(e.readonly,this.element);break;case"enableRtl":n["a"].setEnableRtl(e.enableRtl,[this.inputObj.container]);break;case"customCharacters":this.customCharacters=e.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":n["a"].setClearButton(e.showClearButton,this.element,this.inputObj,void 0,this.createElement),v.call(this);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,n["a"].removeFloating(this.inputObj),n["a"].addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"mask":var a=this.value;this.mask=e.mask,this.updateValue(a);break;case"promptChar":e.promptChar.length>1&&(e.promptChar=e.promptChar[0]),e.promptChar?this.promptChar=e.promptChar:this.promptChar="_";var o=this.element.value.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar);this.promptMask===this.element.value&&(o=this.promptMask.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar)),this.promptMask=this.promptMask.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar),this.undoCollec=this.redoCollec=[],K.call(this,o);break}}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},t.prototype.updateValue=function(e){this.resetMaskedTextBox(),z.call(this,e)},t.prototype.getMaskedValue=function(){return w.call(this,this.element)},t.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),Object(i["u"])([this.inputObj.container],[se]))},t.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),Object(i["fb"])([this.inputObj.container],[se]))},t.prototype.destroy=function(){f.call(this);for(var t=["aria-labelledby","role","autocomplete","aria-readonly","autocorrect","aria-disabled","aria-placeholder","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-valuenow","aria-invalid"],s=0;s<t.length;s++)this.element.removeAttribute(t[s]);this.element.classList.remove("e-input"),this.inputObj.container.insertAdjacentElement("afterend",this.element),Object(i["F"])(this.inputObj.container),e.prototype.destroy.call(this)},X([Object(i["r"])(null)],t.prototype,"cssClass",void 0),X([Object(i["r"])(null)],t.prototype,"width",void 0),X([Object(i["r"])(null)],t.prototype,"placeholder",void 0),X([Object(i["r"])("Never")],t.prototype,"floatLabelType",void 0),X([Object(i["r"])({})],t.prototype,"htmlAttributes",void 0),X([Object(i["r"])(!0)],t.prototype,"enabled",void 0),X([Object(i["r"])(!1)],t.prototype,"readonly",void 0),X([Object(i["r"])(!1)],t.prototype,"showClearButton",void 0),X([Object(i["r"])(!1)],t.prototype,"enablePersistence",void 0),X([Object(i["r"])(null)],t.prototype,"mask",void 0),X([Object(i["r"])("_")],t.prototype,"promptChar",void 0),X([Object(i["r"])(null)],t.prototype,"value",void 0),X([Object(i["r"])(null)],t.prototype,"customCharacters",void 0),X([Object(i["k"])()],t.prototype,"created",void 0),X([Object(i["k"])()],t.prototype,"destroyed",void 0),X([Object(i["k"])()],t.prototype,"change",void 0),X([Object(i["k"])()],t.prototype,"focus",void 0),X([Object(i["k"])()],t.prototype,"blur",void 0),t=X([i["p"]],t),t}(i["h"]),ne=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),ae=function(e,t,s,i){var r,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,s,a):r(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a},oe=["isLazyUpdate","cssClass","customCharacters","enablePersistence","enableRtl","enabled","floatLabelType","htmlAttributes","locale","mask","placeholder","promptChar","readonly","showClearButton","value","width","blur","change","created","destroyed","focus"],le=["value"],ce=Object(r["d"])({props:oe}),ue=(ce[0],ce[1]),de=Object.keys(ue);de.push("modelchanged");for(var he=0,pe=le;he<pe.length;he++){var me=pe[he];de.push("update:"+me)}var fe=!r["e"],ve=function(e){function t(){var t=e.call(this,arguments)||this;return t.propKeys=oe,t.models=le,t.hasChildDirective=!1,t.hasInjectedModules=!1,t.tagMapper={},t.tagNameMapper={},t.isVue3=!fe,t.ej2Instances=new re({}),t.ej2Instances._trigger=t.ej2Instances.trigger,t.ej2Instances.trigger=t.trigger,t.bindProperties(),t.ej2Instances._setProperties=t.ej2Instances.setProperties,t.ej2Instances.setProperties=t.setProperties,t.ej2Instances.clearTemplate=t.clearTemplate,t}return ne(t,e),t.prototype.clearTemplate=function(e){if(e||(e=Object.keys(this.templateCollection||{})),e.length&&this.templateCollection)for(var t=0,s=e;t<s.length;t++){var r=s[t],n=this.templateCollection[r];if(n&&n.length){for(var a=0,o=n;a<o.length;a++){var l=o[a],c=Object(i["S"])("__vue__.$destroy",l);c&&l.__vue__.$destroy(),l.innerHTML&&(l.innerHTML="")}delete this.templateCollection[r]}}},t.prototype.setProperties=function(e,t){var s=this;this.isVue3&&(this.models=this.models?this.models:this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(e,t),e&&this.models&&this.models.length&&Object.keys(e).map((function(t){s.models.map((function(i){t!==i||/datasource/i.test(t)||(s.isVue3?s.ej2Instances.vueInstance.$emit("update:"+t,e[t]):(s.$emit("update:"+t,e[t]),s.$emit("modelchanged",e[t])))}))}))},t.prototype.trigger=function(e,t,s){if(fe||(this.models=this.models?this.models:this.ej2Instances.referModels),"change"!==e&&"input"!==e||!this.models||0===this.models.length){if("actionBegin"===e&&"dateNavigate"===t.requestType&&this.models&&0!==this.models.length){r=this.models.toString().match(/currentView|selectedDate/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(fe?(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}}else{var r=this.models.toString().match(/checked|value/)||[],n=r[0];t&&r&&!Object(i["X"])(t[n])&&(fe?("change"===e||this.$props&&!this.$props.isLazyUpdate)&&(this.$emit("update:"+n,t[n]),this.$emit("modelchanged",t[n])):(this.ej2Instances.vueInstance.$emit("update:"+n,t[n]),this.ej2Instances.vueInstance.$emit("modelchanged",t[n])))}this.ej2Instances&&this.ej2Instances._trigger&&this.ej2Instances._trigger(e,t,s)},t.prototype.render=function(e){var t=r["e"]||e,s=null;return Object(i["U"])(this.$slots.default)||(s=r["e"]?this.$slots.default():this.$slots.default),t("input",s)},t.prototype.focusIn=function(){return this.ej2Instances.focusIn()},t.prototype.focusOut=function(){return this.ej2Instances.focusOut()},t.prototype.getMaskedValue=function(){return this.ej2Instances.getMaskedValue()},t=ae([Object(r["b"])({props:oe,model:{event:"modelchanged"}},fe)],t),t}(r["a"]),ge={name:"ejs-maskedtextbox",install:function(e){e.component(ge.name,ve)}}},dd09:function(e,t,s){"use strict";s.d(t,"d",(function(){return i})),s.d(t,"a",(function(){return a})),s.d(t,"b",(function(){return r})),s.d(t,"c",(function(){return n}));s("99af"),s("fb6a");var i=function(e){return o(e)},r=function(e){if(e){var t=new Date(e);return"".concat("0".concat(t.getMonth()+1).slice(-2),"/").concat("0".concat(t.getDate()).slice(-2),"/")+"".concat(t.getFullYear())}return e},n=function(){return"MM/DD/YYYY"},a=function(){return{type:"date",format:"MM/dd/yy"}},o=function(e){if(e){var t=new Date(e);return"".concat("0".concat(t.getMonth()+1).slice(-2),"/").concat("0".concat(t.getDate()).slice(-2),"/").concat("0".concat(t.getFullYear()).slice(-2))}return e}},e187:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[e._m(0),s("div",{staticClass:"e-card"},[s("div",{attrs:{id:"sccActiveUsers"}},[s("div",{staticStyle:{"text-align":"left","padding-bottom":"1px"}},[s("ejs-button",{attrs:{type:"button",cssClass:"e-info"},nativeOn:{click:function(t){return e.onAddNewSCCUserClick.apply(null,arguments)}}},[s("font-awesome-icon",{staticStyle:{display:"inline"},attrs:{icon:["fas","plus"]}}),e._v(" Add New User\n        ")],1)],1),s("ejs-grid",{ref:"refSCCActiveUserList",attrs:{dataSource:e.sccUserList,created:e.created,enablePersistence:"true","selection-settings":e.selectionOptions,commandClick:e.activeUserCommandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.activeUserpageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",commands:e.commands,width:"7%",textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"17%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"25%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"memberShip.approvedDate",width:"12%",headerText:"Approved Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{field:"lastActivityDate",width:"12%",headerText:"Last Activity Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{headerText:"Permissions",textAlign:"Left",field:"usersInRoles",width:"15%",valueAccessor:e.userPermission}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"sccInactiveUsers"}},[s("ejs-grid",{ref:"refSCCInactiveUserList",attrs:{dataSource:e.sccInActiveUserList,created:e.created,"selection-settings":e.selectionOptions,commandClick:e.inactiveUserCommandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.inactiveUserpageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"13%",commands:e.inactiveUserCommands,textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"12%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"22%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"memberShip.approvedDate",width:"12%",headerText:"Inactive Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{headerText:"Permissions",textAlign:"Left",field:"usersInRoles",width:"14%",valueAccessor:e.inactiveUserPermission}}),s("e-column",{attrs:{field:"lastActivityDate",width:"12%",headerText:"Last Activity Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{field:"userProfile.lastUpdateUser",headerText:"Created By",textAlign:"Left"}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"sccHistoricalInformation"}},[s("ejs-grid",{ref:"refSCCHistoricalInfoList",attrs:{dataSource:e.sccUserEvenLogs(),created:e.created,enablePersistence:"true","selection-settings":e.selectionOptions,allowSorting:!0,allowPaging:!0,pageSettings:e.historicalInfoPageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{field:"userFullName",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"eventType",headerText:"Action Updated",textAlign:"Left"}}),s("e-column",{attrs:{field:"",headerText:"Permission Changed",textAlign:"Left"}}),s("e-column",{attrs:{field:"logDate",headerText:"Date Action Updated",textAlign:"Left",type:"date",format:"MMM dd, yyyy"}}),s("e-column",{attrs:{headerText:"Updated User",textAlign:"Left",field:"updateUserName"}})],1)],1)],1),s("div",{staticStyle:{display:"none"},attrs:{id:"sccLockedUsers"}},[s("ejs-grid",{ref:"refSCCLockedUserList",attrs:{dataSource:e.sccLockedUserList,created:e.created,"selection-settings":e.selectionOptions,commandClick:e.lockedUserCommandClick,allowSorting:!0,allowPaging:!0,pageSettings:e.inactiveUserpageSettings,toolbar:e.toolbarOptions}},[s("e-columns",[s("e-column",{attrs:{field:"userId",headerText:"User ID",textAlign:"Left",isPrimaryKey:!0,width:"0"}}),s("e-column",{attrs:{headerText:"Edit",width:"13%",commands:e.lockedUserCommands,textAlign:"Left"}}),s("e-column",{attrs:{field:"userProfile.userFullName",width:"12%",headerText:"Name",textAlign:"Left"}}),s("e-column",{attrs:{field:"userName",width:"22%",headerText:"Email",textAlign:"Left"}}),s("e-column",{attrs:{field:"memberShip.approvedDate",width:"12%",headerText:"Inactive Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{headerText:"Permissions",textAlign:"Left",field:"usersInRoles",width:"14%",valueAccessor:e.inactiveUserPermission}}),s("e-column",{attrs:{field:"lastActivityDate",width:"12%",headerText:"Last Activity Date",textAlign:"Left",format:"MMM dd, yyyy",type:"date"}}),s("e-column",{attrs:{field:"userProfile.lastUpdateUser",headerText:"Created By",textAlign:"Left"}})],1)],1)],1),s("div",{staticStyle:{margin:"-12px"}},[s("div",{attrs:{tabindex:"0",id:"basic"}},[s("div",{staticClass:"e-card-content"},[s("ejs-tab",{ref:"refSCCUserTabInstance",staticClass:"e-background",attrs:{id:"sccUser_tab",selecting:e.tabSelect,selected:e.tabSelected,created:e.tabCreated}},[s("e-tabitems",[s("e-tabitem",{attrs:{header:e.headerText0,content:e.content0}}),s("e-tabitem",{attrs:{header:e.headerText1,content:e.content1}}),s("e-tabitem",{attrs:{header:e.headerText2,content:e.content2}}),s("e-tabitem",{attrs:{header:e.headerText3,content:e.content3}})],1)],1)],1)])])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row"},[s("h3",[e._v("Manage SCC User Account List")])])}],n=s("c7eb"),a=s("1da1"),o=(s("a15b"),s("d81d"),s("a026")),l=s("c041"),c=s("af93"),u=s("aa15"),d=s("e09d"),h=s("4f03"),p=s("e29d"),m=s("b0e8"),f=s("5e13"),v=s("b37f");o["default"].use(l["a"]),o["default"].use(f["a"]);var g={name:"Users",created:function(){},data:function(){return{headerText0:{text:"Active Users"},headerText1:{text:"Inactive Users"},headerText2:{text:"Locked Users"},headerText3:{text:"Historical Information"},content0:"#sccActiveUsers",content1:"#sccInactiveUsers",content2:"#sccLockedUsers",content3:"#sccHistoricalInformation",sccUserList:[],sccInActiveUserList:[],sccUserHistories:[],sccLockedUserList:[],selectionOptions:{type:"Single",enableSimpleMultiRowSelection:!1,enableToggle:!0,persistSelection:!0},toolbarOptions:["Search"],activeUserpageSettings:{pageSize:10},inactiveUserpageSettings:{pageSize:10},historicalInfoPageSettings:{pageSize:10},commands:[{type:"Edit",buttonOption:{cssClass:"e-flat",iconCss:"e-edit e-icons"}}],inactiveUserCommands:[{buttonOption:{content:"Activate",cssClass:"e-info"}}],lockedUserCommands:[{buttonOption:{content:"Unlock",cssClass:"e-info"}}]}},unmount:function(){},beforeDestroy:function(){this.$refs.refSCCActiveUserList.ej2Instances.searchSettings.key=""},mounted:function(){},computed:{},methods:{created:function(){var e=this;if(this.$refs.refSCCActiveUserList){var t=document.getElementById("".concat(this.$refs.refSCCActiveUserList.$el.id,"_searchbar"));t&&t.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refSCCActiveUserList.$el.id)}))}if(this.$refs.refSCCInactiveUserList){var s=document.getElementById("".concat(this.$refs.refSCCInactiveUserList.$el.id,"_searchbar"));s&&s.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refSCCInactiveUserList.$el.id)}))}if(this.$refs.refSCCHistoricalInfoList){var i=document.getElementById("".concat(this.$refs.refSCCHistoricalInfoList.$el.id,"_searchbar"));i&&i.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refSCCHistoricalInfoList.$el.id)}))}if(this.$refs.refSCCLockedUserList){var r=document.getElementById("".concat(this.$refs.refSCCLockedUserList.$el.id,"_searchbar"));r&&r.addEventListener("keyup",(function(t){e.clearSearchEventListener(t,e.$refs.refSCCLockedUserList.$el.id)}))}},clearSearchEventListener:function(e,t){var s=document.getElementById("".concat(t,"_searchbutton")),i=s.cloneNode(!0);i.id="".concat(t,"_clearbutton"),i.classList.remove("e-search-icon"),i.classList.add("e-clear-icon"),i.addEventListener("click",(function(){e.target.value="",document.getElementById("".concat(t,"_clearbutton")).remove()})),e.target.value&&2==s.parentNode.childElementCount?s.parentNode.insertBefore(i,s.parentNode.children[1]):e.target.value&&""!=e.target.value||document.getElementById("".concat(t,"_clearbutton")).remove()},tabCreated:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.$refs.refSCCUserTabInstance.ej2Instances,i=s.selectedID,"0"!==i){t.next=7;break}return t.next=5,e.sccUsers();case 5:t.next=20;break;case 7:if("1"!==i){t.next=12;break}return t.next=10,e.sccUsers();case 10:t.next=20;break;case 12:if("2"!==i){t.next=17;break}return t.next=15,e.sccUsers();case 15:t.next=20;break;case 17:if("3"!==i){t.next=20;break}return t.next=20,e.$store.dispatch(v["h"]);case 20:case"end":return t.stop()}}),t)})))()},tabSelect:function(e){return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.isSwiped&&(e.cancel=!0);case 1:case"end":return t.stop()}}),t)})))()},tabSelected:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(i=e.selectedIndex,0!==i){s.next=6;break}return s.next=4,t.sccUsers();case 4:s.next=19;break;case 6:if(1!==i){s.next=11;break}return s.next=9,t.sccUsers();case 9:s.next=19;break;case 11:if(2!==i){s.next=16;break}return s.next=14,t.sccUsers();case 14:s.next=19;break;case 16:if(3!==i){s.next=19;break}return s.next=19,t.$store.dispatch(v["h"]);case 19:case"end":return s.stop()}}),s)})))()},sccUsers:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.$store.dispatch(v["g"]).then((function(t){if(200===t.status){for(var s=t.data,i=[],r=[],n=[],a=0;a<s.length;a+=1)s[a].memberShip.isLockedOut?n.push(s[a]):s[a].memberShip.isApproved?i.push(s[a]):r.push(s[a]);e.sccUserList=i,e.sccInActiveUserList=r,e.sccLockedUserList=n}}));case 3:t.next=8;break;case 5:t.prev=5,t.t0=t["catch"](0),e.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 8:e.$parent.notificationToasts.length>0&&e.$parent.$refs.notifierRef.show();case 9:case"end":return t.stop()}}),t,null,[[0,5]])})))()},sccUserEvenLogs:function(){return this.$store.getters.sccUserEventLogList},userPermission:function(e,t){return t[e].map((function(e){return e.role.roleName})).join(",")},inactiveUserPermission:function(e,t){return t[e].map((function(e){return e.role.roleName})).join(",")},activeUserCommandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:"Edit"===e.commandColumn.type&&t.$router.push("/manage-scc-user/".concat(e.rowData.userId));case 1:case"end":return s.stop()}}),s)})))()},inactiveUserCommandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i=e.rowData.userName,s.prev=1,s.next=4,t.$store.dispatch(v["a"],{userName:i}).then((function(e){200===e.status&&(t.sccUsers(),t.$parent.notificationToasts.push({title:"Success!",content:"User activate successfully. Please check active user tab.",cssClass:"e-toast-success",timeOut:5e3}))}));case 4:s.next=9;break;case 6:s.prev=6,s.t0=s["catch"](1),t.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 9:t.$parent.notificationToasts.length>0&&t.$parent.$refs.notifierRef.show();case 10:case"end":return s.stop()}}),s,null,[[1,6]])})))()},lockedUserCommandClick:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return i=e.rowData.userName,s.prev=1,s.next=4,t.$store.dispatch(v["A"],{userName:i}).then((function(e){200===e.status&&(t.sccUsers(),t.$parent.notificationToasts.push({title:"Success!",content:"User unlocked successfully. Please check active user tab.",cssClass:"e-toast-success",timeOut:5e3}))}));case 4:s.next=9;break;case 6:s.prev=6,s.t0=s["catch"](1),t.$parent.notificationToasts.push({title:"Error!",content:"Sorry, Something went wrong. Please try again later.",cssClass:"e-toast-danger",timeOut:5e3});case 9:t.$parent.notificationToasts.length>0&&t.$parent.$refs.notifierRef.show();case 10:case"end":return s.stop()}}),s,null,[[1,6]])})))()},onAddNewSCCUserClick:function(){var e=null;this.$router.push("/manage-scc-user/".concat(e))}},provide:{grid:[c["a"],u["a"],d["a"],h["a"],p["a"],m["a"]]}},b=g,y=(s("7598"),s("2877")),w=Object(y["a"])(b,i,r,!1,null,null,null);t["default"]=w.exports},efb6:function(e,t,s){},f08a:function(e,t,s){},f1ca:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"container"},[i("div",{staticClass:"e-card"},[i("div",{staticClass:"e-card-title"},[t._v(" Manage Web Login User Account ")]),i("div",{staticClass:"e-card-separator"}),i("div",{staticClass:"e-card-content"},[i("div",[i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"80%"}},[this.notifyErrorMessage?i("span",{staticStyle:{color:"red",display:"block","margin-bottom":"2%"}},[t._v("\n                "+t._s(t.notifyErrorMessage))]):t._e(),this.notifySuccessMessage?i("span",{staticStyle:{color:"green",display:"block","margin-bottom":"2%"}},[t._v("\n                "+t._s(t.notifySuccessMessage))]):t._e(),i("ejs-textbox",{attrs:{floatLabelType:"Auto",placeholder:"Email",readonly:!0},model:{value:t.userName,callback:function(e){t.userName=e},expression:"userName"}})],1)]),i("div",{staticClass:"form-row"},[i("div",{staticClass:"form-row-input",staticStyle:{width:"80%"}},[i("scc-input-validator",{attrs:{password:t.password},on:{validate:function(t){return e.isPasswordValid=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"New Password"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:this.isPasswordValid,expression:"this.isPasswordValid"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v("\n                         Password is strong")])],1),i("div",{staticClass:"form-row-input",staticStyle:{width:"80%"}},[i("scc-input-validator",{attrs:{value:t.confirmPassword},on:{validate:function(t){return e.isConfirmPassword=t}}},[i("input-password",{ref:"refPassword",attrs:{placeholder:"Confirm Password"},model:{value:t.confirmPassword,callback:function(e){t.confirmPassword=e},expression:"confirmPassword"}})],1),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPassword,expression:"showConfirmPassword"}],staticClass:"e-error"},[i("span",{staticClass:"e-icons close"}),t._v("\n                         Confirm password does not match with Password")]),i("span",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmPasswordMatch,expression:"showConfirmPasswordMatch"}],staticClass:"e-success"},[i("span",{staticClass:"e-icons Selection"}),t._v("\n                         Password matched")])],1)]),i("div",{staticClass:"form-row",staticStyle:{padding:"0px 0px 15px 0px",margin:"-5px"}},[i("ejs-checkbox",{attrs:{label:"Force User to Reset Password",labelPosition:"Before"},model:{value:t.isForcePasswordChange,callback:function(e){t.isForcePasswordChange=e},expression:"isForcePasswordChange"}})],1),i("div",{staticClass:"form-row",staticStyle:{width:"95%",padding:"0px 0px 15px 0px"}},[i("span",{staticClass:"e-error"},[t._v("\n                         "+t._s(t.passwordValidationMessage)+"\n                      ")])]),i("div",{staticClass:"form-row"},[t._m(0),i("div",{staticClass:"form-row-input",staticStyle:{width:"150px"}},[i("ejs-switch",{ref:"refStatus",attrs:{id:"status",checked:t.isActive},model:{value:t.isActive,callback:function(e){t.isActive=e},expression:"isActive"}})],1)])]),i("div",{staticClass:"align-center-bottom"},[i("ejs-button",{attrs:{type:"button",cssClass:"e-info margin-button"},nativeOn:{click:function(e){return t.btnSaveUserInfo.apply(null,arguments)}}},[t._v("Save")]),i("ejs-button",{attrs:{cssClass:"e-danger margin-button"},nativeOn:{click:function(e){return t.onCancelButtonClick.apply(null,arguments)}}},[t._v("Cancel")])],1)])])])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"form-row-input",staticStyle:{width:"150px"}},[s("label",[e._v("Active/InActive:")])])}],n=s("c7eb"),a=s("1da1"),o=s("a026"),l=s("21cb"),c=s("9a0f"),u=s("79ed"),d=s("b544"),h=s("4023"),p=s("940e"),m=s("aa96"),f=s("b37f"),v=s("dff1");o["default"].use(l["a"]),o["default"].use(c["a"]),o["default"].use(u["a"]),o["default"].use(d["a"]);var g={name:"ManageWebLoginInfo",components:{SccInputValidator:p["a"],inputPassword:m["a"]},props:{userProfileId:String,userProfilesData:Object},mounted:function(){},created:function(){this.userId=this.$route.params.id,this.getUserById()},computed:{},data:function(){return{userName:null,email:null,userId:null,isConfirmPassword:!1,showConfirmPassword:!1,isPasswordValid:!1,isOldPasswordValid:!1,requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},passwordValidationMessage:h["b"].passwordValidationMessage,password:null,confirmPassword:null,oldPassword:null,showConfirmPasswordMatch:!1,isActive:!0,isForcePasswordChange:!0,isResetPasswordSuccess:!1,isDeactiveUserSuccess:!1,notifyErrorMessage:"",notifySuccessMessage:"",passwordLogs:[]}},watch:{confirmPassword:function(e){e===this.password||null===this.password&&""===this.password?""===e?this.showConfirmPasswordMatch=!1:(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0):(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1)},password:function(e){null===this.confirmPassword||""===this.confirmPassword?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1):""!==e&&e!==this.confirmPassword?(this.isConfirmPassword=!1,this.showConfirmPassword=!0,this.showConfirmPasswordMatch=!1):null===e||""===e?(this.showConfirmPasswordMatch=!1,this.showConfirmPassword=!1,this.isConfirmPassword=!1):(this.isConfirmPassword=!0,this.showConfirmPassword=!1,this.showConfirmPasswordMatch=!0)}},methods:{getUserById:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,"null"===e.userId||""===e.userId){t.next=7;break}return s=e.userId,t.next=5,e.$store.dispatch(v["e"],{userId:s});case 5:e.currentUser=e.$store.getters.userById,e.userName=e.currentUser.userName;case 7:t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](0),console.error("user accounts err",t.t0),"Network Error"===t.t0.message?e.$router.push({name:"NotFound"}):e.$router.push({name:"UnAuthorized"});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))()},getPasswordLogsByUserId:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s=e.userProfileId,!s){t.next=5;break}return t.next=4,e.$store.dispatch(f["o"],{userId:s});case 4:e.passwordLogs=e.$store.getters.passwordLogs;case 5:case"end":return t.stop()}}),t)})))()},validatePassword:function(){this.password=null===this.password?"":this.password,this.confirmPassword=null===this.confirmPassword?"":this.confirmPassword,this.userEmail&&(this.oldPassword=null===this.oldPassword?"":this.oldPassword)},onCancelButtonClick:function(){this.$router.push("/web-user-list")},btnSaveUserInfo:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,null!==e.password||null!==e.confirmPassword){t.next=7;break}if(e.isActive){t.next=5;break}return t.next=5,e.deactivateUser().then((function(){e.notifySuccessMessage="User User Status save successfully.",e.notifyErrorMessage="",e.$parent.$parent.notificationToasts.push({title:"Success!",content:e.notifySuccessMessage,cssClass:"e-toast-success",timeOut:5e3}),e.$router.push("/web-user-list")}));case 5:t.next=23;break;case 7:if(!e.isConfirmPassword||!e.isPasswordValid){t.next=19;break}return t.next=10,e.resetPassword().then((function(){e.isResetPasswordSuccess=!0}));case 10:if(e.isActive){t.next=15;break}return t.next=13,e.deactivateUser().then((function(){e.isDeactiveUserSuccess=!0}));case 13:t.next=16;break;case 15:e.isDeactiveUserSuccess=!0;case 16:e.isResetPasswordSuccess&&e.isDeactiveUserSuccess?(e.notifySuccessMessage="User password / User Status save successfully.",e.notifyErrorMessage="",e.$parent.$parent.notificationToasts.push({title:"Success!",content:e.notifySuccessMessage,cssClass:"e-toast-success",timeOut:5e3}),e.$router.push("/web-user-list")):(e.notifySuccessMessage="",e.notifyErrorMessage="Please double check required field.",e.$parent.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3})),t.next=23;break;case 19:e.validatePassword(),e.notifySuccessMessage="",e.notifyErrorMessage="Please enter required field.",e.$parent.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3});case 23:t.next=30;break;case 25:t.prev=25,t.t0=t["catch"](0),e.notifySuccessMessage="",e.notifyErrorMessage="Sorry, Something went wrong during saving information. Please try again later.",e.$parent.$parent.notificationToasts.push({title:"Error!",content:e.notifyErrorMessage,cssClass:"e-toast-danger",timeOut:5e3});case 30:e.$parent.$parent.notificationToasts.length>0&&e.$parent.$parent.$refs.notifierRef.show();case 31:case"end":return t.stop()}}),t,null,[[0,25]])})))()},resetPassword:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userId,i=e.password,t.next=4,e.$store.dispatch(f["w"],{userId:s,password:i,forcePasswordChange:e.isForcePasswordChange});case 4:t.next=10;break;case 6:t.prev=6,t.t0=t["catch"](0),e.isResetPasswordSuccess=!1,console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))()},deactivateUser:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userName,t.next=4,e.$store.dispatch(f["d"],{userName:s});case 4:t.next=10;break;case 6:t.prev=6,t.t0=t["catch"](0),console.error(t.t0),e.isDeactiveUserSuccess=!1;case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))()}}},b=g,y=(s("9797"),s("2877")),w=Object(y["a"])(b,i,r,!1,null,null,null);t["default"]=w.exports},f56d:function(e,t,s){"use strict";var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"wrap_address"},[e._m(0),s("div",{staticClass:"e-card-separator"}),s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{"float-label-type":"Always",placeholder:"User Name",readonly:!0},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}})],1)]),s("div",{staticClass:"contacts"},[e._l(e.contactDetails,(function(t,i){return s("div",{key:i,staticClass:"contact-card"},[s("div",{staticClass:"form-row"},[s("div",{staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-dropdownlist",{ref:"phoneType",refInFor:!0,attrs:{"float-label-type":"Always",id:"phoneType",dataSource:e.phoneTypeData,change:e.onPhoneTypeChange(t.phoneType,i),placeholder:"Phone Type"},model:{value:t.phoneType,callback:function(s){e.$set(t,"phoneType",s)},expression:"contact.phoneType"}})],1)]),s("div",{staticStyle:{display:"flex"}},[s("div",{staticClass:"form-row"},[s("div",{directives:[{name:"show",rawName:"v-show",value:!t.isFax,expression:"!contact.isFax"}],staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("scc-input-validator",{attrs:{rules:[e.requiredRule],value:t.phoneNumber},on:{validate:function(e){return t.isPhoneNumberValid=e}}},[s("ejs-textbox",{ref:"phone",refInFor:!0,attrs:{"float-label-type":"Always",placeholder:"Phone",value:t.phoneNumber,maxlength:12},on:{input:function(s){return e.formatPhoneNumber(s.value,t)}}})],1)],1),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isFax,expression:"contact.isFax"}],staticClass:"form-row-input",staticStyle:{width:"650px"}},[s("ejs-textbox",{attrs:{name:"default","float-label-type":"Always",placeholder:"Fax"},model:{value:t.phoneNumber,callback:function(s){e.$set(t,"phoneNumber",s)},expression:"contact.phoneNumber"}})],1),s("div",{directives:[{name:"show",rawName:"v-show",value:!t.isFax&&t.isWork,expression:"!contact.isFax && contact.isWork"}],staticClass:"form-row-input",staticStyle:{width:"325px"}},[s("ejs-numerictextbox",{attrs:{name:"phone",format:"###",showSpinButton:!1,"float-label-type":"Always",placeholder:"Phone Ext"},model:{value:t.ext,callback:function(s){e.$set(t,"ext",s)},expression:"contact.ext"}})],1)])]),e.isUserLogged?s("div",{staticClass:"form-row"},[s("div",{staticStyle:{float:"left"}},[s("ejs-radiobutton",{directives:[{name:"show",rawName:"v-show",value:!t.isFax,expression:"!contact.isFax"}],attrs:{label:"Default",name:"default",checked:!0===t.isDefault,value:t.isDefault},on:{change:function(t){return e.defaultPhone(i)}}})],1)]):e._e(),s("div",{staticClass:"row-action-buttons"},[s("font-awesome-icon",{directives:[{name:"show",rawName:"v-show",value:!t.isDefault,expression:"(!contact.isDefault)"}],staticStyle:{color:"red","font-size":"26px","padding-right":"5px"},attrs:{icon:["fas","trash-alt"]},on:{click:function(t){return e.remove(i)}}})],1)])})),s("div",{staticClass:"common-action-buttons"},[s("font-awesome-icon",{staticStyle:{color:"green","font-size":"26px"},attrs:{icon:["fas","plus-circle"]},on:{click:function(t){return e.add()}}})],1)],2)])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"contacts"},[s("h4",{staticClass:"title-color"},[e._v("Contact Information")])])}],n=s("c7eb"),a=s("1da1"),o=(s("ac1f"),s("5319"),s("99af"),s("fb6a"),s("a434"),s("d3b7"),s("159b"),s("a026")),l=s("eda0"),c=s("21cb"),u=s("0c8a"),d=s("d896"),h=s("9a0f"),p=s("2821"),m=s("940e"),f=s("b37f");o["default"].use(l["a"]),o["default"].use(c["a"]),o["default"].use(u["a"]),o["default"].use(d["a"]),o["default"].use(h["a"]),o["default"].use(p["a"]);var v={name:"ContactInfo",components:{SccInputValidator:m["a"]},props:{userProfileId:String,userProfilesData:Object},created:function(){},mounted:function(){null!==this.$store.getters.loggedUser&&this.getUserContacts()},computed:{username:{get:function(){return this.userProfilesData?this.userProfilesData.userName:""},set:function(e){return e}},isUserLogged:function(){return this.$store.getters.loggedUser}},data:function(){return{phoneTypeData:["Home","Cell","Work","Fax"],isUpdateContact:!1,contactDetails:[{id:null,phoneType:null,phoneNumber:null,ext:"",userId:null,isDefault:!1,deleteFlag:!1,isPhoneNumberValid:!1,isFax:!1,isWork:!1}],requiredRule:{regEx:"^(?!\\s*$).+",message:"This field is required"},numericRule:{regEx:"^\\d+$",message:"This field is required numeric value"},phoneNumberRule:{regEx:"^.{1,10}$",message:"Phone number shold have 10 digits."}}},methods:{notify:function(e,t){this.$parent.$parent.$parent.notificationToasts.push({title:e,content:t,cssClass:"Error"===e?"e-toast-danger":"e-toast-success",timeOut:5e3}),this.$parent.$parent.$parent.notificationToasts.length>0&&this.$parent.$parent.$parent.$refs.notifierRef.show()},add:function(){var e=this.userProfileId;this.contactDetails.push({phoneType:null,phoneNumber:null,ext:"",userId:e,isDefault:!1,isPhoneNumberValid:!1,isFax:!1,isWork:!1})},formatPhoneNumber:function(e,t){e=e.replace(/\D/g,"");var s=e.length;s>3&&(e="".concat(e.slice(0,3),"-").concat(e.slice(3,11))),s>6&&(e="".concat(e.slice(0,7),"-").concat(e.slice(7))),t.phoneNumber=e},remove:function(e){null!==this.contactDetails[e].id&&(this.contactDetails[e].deleteFlag=!0),this.contactDetails.splice(e,1)},onPhoneTypeChange:function(e,t){this.contactDetails[t].isFax="Fax"===e,this.contactDetails[t].isWork="Work"===e},defaultPhone:function(e){this.contactDetails.forEach((function(t,s){var i=t;i.isDefault=s===e}))},phoneNumberFocus:function(e){var t=e;t.selectionEnd=0,t.selectionStart=0},validateContact:function(){for(var e=0;e<this.contactDetails.length;e+=1)this.contactDetails[e].phoneNumber=null===this.contactDetails[e].phoneNumber?"":this.contactDetails[e].phoneNumber;return!(this.contactDetails&&this.contactDetails.length>0)||!this.contactDetails.some((function(e){return null==e.phoneNumber||""===e.phoneNumber}))},getUserContacts:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,s=e.userProfileId,t.next=4,e.$store.dispatch(f["s"],{userId:s});case 4:for(i=e.$store.getters.userContactsbyUserID,e.contactDetails=[],r=0;r<i.length;r+=1)e.contactDetails.push({id:i[r].id,phoneType:i[r].phoneType,phoneNumber:i[r].phoneNumber,ext:i[r].ext,userId:s,isDefault:i[r].isDefault,deleteFlag:!1,isPhoneNumberValid:!1,isFax:"Fax"===i[r].phoneType,isWork:"Work"===i[r].phoneType});0===e.contactDetails.length?e.contactDetails.push({phoneType:null,phoneNumber:null,ext:"",userId:s,isDefault:!0,deleteFlag:!1,isPhoneNumberValid:!1,isFax:!1,isWork:!1}):e.contactDetails.length>0&&(e.isUpdateContact=!0),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),console.error(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})))()},updateUserContacts:function(e){var t=this;return Object(a["a"])(Object(n["a"])().mark((function s(){var i;return Object(n["a"])().wrap((function(s){while(1)switch(s.prev=s.next){case 0:return s.prev=0,i=t.contactDetails,s.next=4,t.$store.dispatch(f["B"],{data:i});case 4:e||t.notify("Success!","Updated contact information."),s.next=10;break;case 7:s.prev=7,s.t0=s["catch"](0),t.notify("Error","Opss! Something went wrong.");case 10:case"end":return s.stop()}}),s,null,[[0,7]])})))()},userContactInfo:function(){var e=this;return Object(a["a"])(Object(n["a"])().mark((function t(){var s,i,r,a,o,l,c;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,e.contactDetails[0].userId=e.userProfileId,e.contactDetails[0].isDefault=!0,s=e.contactDetails[0],i=s.id,r=s.phoneType,a=s.phoneNumber,o=s.ext,l=s.userId,c=s.isDefault,t.next=6,e.$store.dispatch(f["E"],{id:i,phoneType:r,phoneNumber:a,ext:o,userId:l,isDefault:c});case 6:t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}}},g=v,b=(s("3ea6"),s("2877")),y=Object(b["a"])(g,i,r,!1,null,null,null);t["a"]=y.exports},f6dd:function(e,t,s){"use strict";s("efb6")}}]);
//# sourceMappingURL=users.53488f93.js.map