import{f as ne,g as M,h as V,m as ie,n as R,p as re,u as oe}from"./chunk-QH4RFG3O.js";import{a as ve,b as Ae}from"./chunk-H5QYPIZO.js";import{d as Pe,e as Oe}from"./chunk-ETUF75R2.js";import{a as ae,b as se}from"./chunk-WI467KSJ.js";import{a as Ne}from"./chunk-UT47WTCB.js";import{a as xe,i as be,k as ye,l as Ee,m as we,n as Me,o as Ie,p as De,s as Te,v as ke}from"./chunk-IYTSPG5W.js";import{C as ue,E as ge,G as fe,J as _e,P as he,T as Ce,V as Se,c as ee,d as A,e as te,f as F,m as le,p as j,r as me,s as ce,u as I,w as pe,x as de}from"./chunk-T7Z6AFPK.js";import"./chunk-RGNDWIHZ.js";import{Da as f,Ea as _,Fb as d,Hb as m,Ic as K,Rb as o,Sb as a,Tb as u,Ua as E,Ub as C,Vb as S,Xb as v,_b as h,ac as g,ga as B,ja as T,ka as b,kb as l,kd as N,lb as w,lc as Z,mb as G,mc as s,nc as X,oa as k,ob as J,oc as Q,pa as W,qb as P,sb as Y,ta as H,tb as O,td as $,ua as y,xa as z}from"./chunk-AZHGOC5Y.js";import{h as D}from"./chunk-S666O4B7.js";var qe=(()=>{let i=class i extends R{constructor(r,n,c){super(r,n,c)}ngOnDestroy(){this.flush()}};i.\u0275fac=function(n){return new(n||i)(k(N),k(M),k(V))},i.\u0275prov=T({token:i,factory:i.\u0275fac});let e=i;return e})();function Be(){return new ie}function We(e,i,t){return new oe(e,i,t)}var Ve=[{provide:V,useFactory:Be},{provide:R,useClass:qe},{provide:P,useFactory:We,deps:[A,R,O]}],Fe=[{provide:M,useFactory:()=>new re},{provide:E,useValue:"BrowserAnimations"},...Ve],He=[{provide:M,useClass:ne},{provide:E,useValue:"NoopAnimations"},...Ve],Re=(()=>{let i=class i{static withConfig(r){return{ngModule:i,providers:r.disableAnimations?He:Fe}}};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=y({type:i}),i.\u0275inj=b({providers:Fe,imports:[F]});let e=i;return e})();var U=class{MYSQL_HOST;MYSQL_USER;MYSQL_PASSWORD;MYSQL_DATABASE;username;password;version;isCreateDatabaseUser};function ze(e,i){e&1&&s(0," MYSQL Configuration ")}function Ge(e,i){e&1&&(o(0,"mat-error"),s(1," HostName is required "),a())}function Je(e,i){e&1&&(o(0,"mat-error"),s(1," Port is required "),a())}function Ze(e,i){e&1&&(o(0,"mat-error"),s(1," UserName is required "),a())}function Xe(e,i){if(e&1){let t=v();o(0,"div",46),h("click",function(){f(t);let n=g();return _(n.showPassword())}),u(1,"span",47),a()}}function Ke(e,i){if(e&1){let t=v();o(0,"div",46),h("click",function(){f(t);let n=g();return _(n.showPassword())}),u(1,"span",48),a()}}function $e(e,i){e&1&&(o(0,"mat-error"),s(1," Password is required "),a())}function et(e,i){e&1&&(o(0,"h4",49),s(1," Connection Established "),o(2,"div",50),u(3,"img",51),a()())}function tt(e,i){e&1&&(o(0,"h4",52),s(1," Error While Connecting"),o(2,"div",53),u(3,"i",54),a()())}function nt(e,i){e&1&&s(0," Setup Database ")}function it(e,i){e&1&&(o(0,"mat-error"),s(1," Version is required "),a())}function rt(e,i){e&1&&(o(0,"mat-error"),s(1," Database is required "),a())}function ot(e,i){if(e&1&&(C(0),o(1,"div",55)(2,"div",19),s(3,"Select Version Installed "),o(4,"span",14),s(5,"*"),a()(),u(6,"ng-select",56),d(7,it,2,0,"mat-error",16),a(),o(8,"h4",52),s(9,"Note: Please first take backup of your database "),a(),o(10,"div",12)(11,"div",19),s(12,"Select Databse "),o(13,"span",14),s(14,"*"),a()(),u(15,"ng-select",57),d(16,rt,2,0,"mat-error",16),a(),S()),e&2){let t,r,n=g();l(6),m("items",n.versions)("required",((t=n.setUpForm.get("previousVersionInstalled"))==null?null:t.value)==!0),l(),m("ngIf",n.setUpForm.get("version")&&!n.setUpForm.get("version").valid&&n.setUpForm.get("version").touched),l(8),m("items",n.databases)("required",((r=n.setUpForm.get("previousVersionNotInstalled"))==null?null:r.value)==!0),l(),m("ngIf",n.setUpForm.get("database")&&!n.setUpForm.get("database").valid&&n.setUpForm.get("database").touched)}}function at(e,i){e&1&&(o(0,"mat-error"),s(1," Database Name is required "),a())}function st(e,i){e&1&&(o(0,"mat-error"),s(1," Database Name is required "),a())}function lt(e,i){if(e&1){let t=v();o(0,"div",46),h("click",function(){f(t);let n=g(3);return _(n.showPassword())}),u(1,"span",47),a()}}function mt(e,i){if(e&1){let t=v();o(0,"div",46),h("click",function(){f(t);let n=g(3);return _(n.showPassword())}),u(1,"span",48),a()}}function ct(e,i){e&1&&(o(0,"mat-error"),s(1," Password is required "),a())}function pt(e,i){if(e&1){let t=v();C(0),o(1,"div",12)(2,"label",13),s(3,"Database UserName"),o(4,"span",14),s(5,"*"),a()(),u(6,"input",61),d(7,st,2,0,"mat-error",16),a(),o(8,"div",12)(9,"label",19),s(10,"Password"),o(11,"span",14),s(12,"*"),a()(),u(13,"input",62),d(14,lt,2,0,"div",21)(15,mt,2,0,"div",21)(16,ct,2,0,"mat-error",16),a(),o(17,"button",63),h("click",function(){f(t);let n=g(2);return _(n.generateRandomPassword())}),s(18,"Generate Random Password "),a(),S()}if(e&2){let t=g(2);l(7),m("ngIf",t.setUpForm.get("username")&&!t.setUpForm.get("username").valid&&t.setUpForm.get("username").touched),l(6),m("type",t.show?"text":"password"),l(),m("ngIf",!t.show),l(),m("ngIf",t.show),l(),m("ngIf",t.configurationForm.get("password")&&!t.configurationForm.get("password").valid&&t.configurationForm.get("password").touched)}}function dt(e,i){if(e&1&&(C(0),o(1,"div",58)(2,"label",13),s(3,"Database Name"),o(4,"span",14),s(5,"*"),a()(),u(6,"input",59),d(7,at,2,0,"mat-error",16),a(),o(8,"div",12)(9,"div",35),u(10,"input",60),s(11," Do you want to create database user?"),o(12,"span",14),s(13,"*"),a()()(),d(14,pt,19,5,"ng-container",16),S()),e&2){let t,r=g();l(7),m("ngIf",r.configurationForm.get("MYSQL_DATABASE")&&!r.configurationForm.get("MYSQL_DATABASE").valid&&r.configurationForm.get("MYSQL_DATABASE").touched),l(7),m("ngIf",((t=r.setUpForm.get("isCreateDatabaseUser"))==null?null:t.value)==!0)}}function ut(e,i){e&1&&(o(0,"div",12)(1,"div",64),u(2,"input",65),s(3," Install Sample Data"),o(4,"span",14),s(5,"*"),a()()())}function gt(e,i){e&1&&s(0," Setup Complete ")}function ft(e,i){e&1&&(o(0,"div",66),u(1,"img",67),a())}function _t(e,i){e&1&&(o(0,"div",68),u(1,"i",54),a())}function ht(e,i){e&1&&(C(0),u(1,"mat-progress-bar",69),S())}function Ct(e,i){e&1&&(o(0,"div",66),u(1,"img",67),a())}function St(e,i){e&1&&(o(0,"div",68),u(1,"i",54),a())}function vt(e,i){e&1&&(C(0),u(1,"mat-progress-bar",69),S())}function xt(e,i){if(e&1&&(C(0),o(1,"div",40)(2,"div",41)(3,"h2",42),s(4,"2. Install Master Data..."),a()(),d(5,Ct,2,0,"div",43)(6,St,2,0,"div",44),a(),d(7,vt,2,0,"ng-container",16),S()),e&2){let t=g(2);l(5),m("ngIf",t.masterDataState=="created"),l(),m("ngIf",t.masterDataState=="Error"),l(),m("ngIf",t.masterDataState=="Creating")}}function bt(e,i){if(e&1&&(C(0),d(1,xt,8,3,"ng-container",16),S()),e&2){let t=g();l(),m("ngIf",t.isetupDatabaseConfiguration)}}function yt(e,i){e&1&&(o(0,"div",66),u(1,"img",67),a())}function Et(e,i){e&1&&(o(0,"div",68),u(1,"i",54),a())}function wt(e,i){e&1&&(C(0),u(1,"mat-progress-bar",69),S())}function Mt(e,i){if(e&1&&(C(0),o(1,"div",40)(2,"div",41)(3,"h2",42),s(4,"3. Install Sample Data..."),a()(),d(5,yt,2,0,"div",43)(6,Et,2,0,"div",44),a(),d(7,wt,2,0,"ng-container",16),S()),e&2){let t=g(2);l(5),m("ngIf",t.sampleDataState=="created"),l(),m("ngIf",t.sampleDataState=="Error"),l(),m("ngIf",t.sampleDataState=="Creating")}}function It(e,i){if(e&1&&(C(0),d(1,Mt,8,3,"ng-container",16),S()),e&2){let t=g();l(),m("ngIf",t.isetupDatabaseConfiguration&&t.isInstallMasterData)}}function Dt(e,i){if(e&1&&(C(0),s(1),S()),e&2){let t=g(2);l(),X(t.error)}}function Tt(e,i){e&1&&s(0,"Error when database configuration")}function kt(e,i){if(e&1){let t=v();C(0),o(1,"p",70),s(2,"Please Copy this error & create ticket with this error."),a(),o(3,"div",71),d(4,Dt,2,1,"ng-container",72)(5,Tt,1,0,"ng-template",null,1,K),a(),o(7,"a",73),h("click",function(){f(t);let n=g();return _(n.copiedError())}),s(8,"Copy & Create Ticket"),a(),o(9,"button",74),h("click",function(){f(t);let n=g();return _(n.selectedIndex=0)}),s(10,"Back "),a(),S()}if(e&2){let t=Z(6),r=g();l(4),m("ngIf",r.error)("ngIfElse",t),l(3),m("cdkCopyToClipboard",r.error)}}function Pt(e,i){if(e&1){let t=v();o(0,"div",82)(1,"button",83),h("click",function(){f(t);let n=g(2);return _(n.copiedCredentail())}),u(2,"i",84),a(),o(3,"p"),s(4),a(),o(5,"p"),s(6),a()()}if(e&2){let t=g(2);l(),m("cdkCopyToClipboard",t.credential),l(3),Q(" UserName : ",t.userName," "),l(2),Q(" Password : ",t.password," ")}}function Ot(e,i){if(e&1){let t=v();C(0),o(1,"div",75)(2,"div")(3,"div",76),u(4,"img",77),a()(),o(5,"h2",78),s(6,"Congratulations!"),a(),o(7,"p",79),s(8,"Your configuration process has been successfully completed. Below are your credentials. We appreciate your cooperation in this matter and look forward to your continued success with our services."),a(),o(9,"p",52),s(10," Please restart API(Nodejs APP) - Check documentation for restart."),a(),d(11,Pt,7,3,"div",80),o(12,"div",24)(13,"button",81),h("click",function(){f(t);let n=g();return _(n.gotoLogin())}),s(14,"Go To Login "),a()()(),S()}if(e&2){let t=g();l(11),m("ngIf",t.setUpForm.get("version").value==null)}}function Nt(e,i){e&1&&(o(0,"mat-icon"),s(1,"database"),a())}var Le=(()=>{class e{configurationService;router;formBuilder;toastrService;configurationForm;setUpForm;configuration=new U;versions=["1.1"];databases;isetupDatabaseConfiguration=!1;isInstallMasterData=!1;isInstallSampleData=!1;databaseState="Creating";masterDataState="Creating";sampleDataState="Creating";isTested=!1;isBackupDatabased=!1;show=!1;error;userName="admin@demo.com";password="Demo@1234";isFullSetup=!1;connectionError=!1;credential;selectedIndex=0;constructor(t,r,n,c){this.configurationService=t,this.router=r,this.formBuilder=n,this.toastrService=c;let p=document.createElement("link");p.rel="stylesheet",p.href="assets/admin/scss/bootstrap4.css",document.head.insertBefore(p,document.head.firstChild),this.configurationForm=n.group({MYSQL_HOST:[null,[I.required]],MYSQL_USER:[null,[I.required]],MYSQL_PASSWORD:[null,[I.required]],MYSQL_PORT:[null,[I.required]]}),this.setUpForm=n.group({MYSQL_DATABASE:["creditapp"],username:["creditapp_admin"],password:[null],previousVersionInstalled:[!0],version:[null],database:[null],isCreateDatabaseUser:[null],isInstallMasterData:[null],isInstallSampleData:[null]})}ngOnInit(){let t=document.createElement("link");t.rel="stylesheet",t.href="assets/admin/scss/indigo-pink.css",document.head.insertBefore(t,document.head.firstChild);let r=JSON.parse(sessionStorage.getItem("jsonData")??"null");this.credential="UserName:"+this.userName+` Password:`+this.password,r&&(this.configurationForm.get("MYSQL_HOST").setValue(r.MYSQL_HOST!=""?r.MYSQL_HOST:null),this.configurationForm.get("MYSQL_USER").setValue(r.MYSQL_USER!=""?r.MYSQL_USER:null),this.configurationForm.get("MYSQL_PASSWORD").setValue(r.MYSQL_PASSWORD!=""?r.MYSQL_PASSWORD:null),this.configurationForm.get("MYSQL_PORT").setValue(r.MYSQL_PORT!=""?r.MYSQL_PASSWORD:null)),this.setUpForm.get("previousVersionInstalled")?.setValue("false")}testConnection(t){return D(this,null,function*(){try{if(t.valid){this.configuration=this.configurationForm.value;let r=yield this.configurationService.testConnection(this.configuration);r&&r.status==200&&(this.databases=r.recordList,this.isTested=!0,this.selectedIndex=1)}else Object.keys(t.controls).forEach(r=>{t.controls[r].markAsTouched()})}catch(r){this.isTested=!0,this.connectionError=!0,console.log(r)}})}databaseConfiguration(t){return D(this,null,function*(){try{debugger;if(t.valid){this.selectedIndex=2,this.databaseState="Creating",this.masterDataState="Creating",this.sampleDataState="Creating";let r=this.setUpForm.value;r.previousVersionInstalled=="true"&&(r.MYSQL_DATABASE=r.database),this.databaseState="Creating";let n=yield this.configurationService.databaseConfiguration(r);if(n&&n.status==200)if(this.databaseState="created",this.isetupDatabaseConfiguration=!0,n.recordList&&n.recordList.length>0&&(this.userName=n.recordList[0].email,this.password="admin"),r.isInstallMasterData){let c=yield this.configurationService.installMasterData(r);if(c&&c.status==200&&(this.isInstallMasterData=!0,this.masterDataState="created",r.isInstallSampleData)){let p=yield this.configurationService.installSampleData();p&&p.status==200?(this.sampleDataState="created",this.isInstallSampleData=!0):(this.isInstallSampleData=!1,this.sampleDataState="Error")}}else this.isInstallMasterData=!1,this.masterDataState="Error";else this.isetupDatabaseConfiguration=!1,this.databaseState="Error";this.isFullSetup=!0}else Object.keys(t.controls).forEach(r=>{t.controls[r].markAsTouched()})}catch(r){this.databaseState!="created"&&(this.databaseState="Error"),this.masterDataState="Error",this.sampleDataState="Error",this.isTested=!1,this.error=r?.error?.message}})}checkPreviousVersionInstalled(){let t=this.setUpForm.get("previousVersionInstalled").value;this.setUpForm.get("version").setValue(null)}backupDatabase(){return D(this,null,function*(){try{let t=this.configurationForm.value;t.MYSQL_DATABASE=this.setUpForm.get("database").value;let r=yield this.configurationService.backupDatabase(t);r&&r.status==200&&(this.isBackupDatabased=!0)}catch(t){console.log(t)}})}showPassword(){this.show=!this.show}copiedError(){this.toastrService.success("Copied Error Successfully")}generateRandomPassword(){let r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n="";for(let c=0;c<8;c++){let p=Math.floor(Math.random()*r.length);n+=r[p]}this.setUpForm.get("password").setValue(n)}gotoLogin(){this.router.navigate(["admin/login"]);let t=JSON.stringify({userName:this.userName,password:this.password});sessionStorage.setItem("userDetail",t)}reset(){this.connectionError=!1,this.isTested=!1}copiedCredentail(){this.toastrService.success("Copied Successfully")}static \u0275fac=function(r){return new(r||e)(w(ve),w(le),w(Ce),w(ae))};static \u0275cmp=H({type:e,selectors:[["app-configuration"]],decls:99,vars:23,consts:[["stepper",""],["default",""],[1,"container","col-lg-4","col-md-6","col-sm-12"],[1,"col-lg-12","text-center","mt-5"],["src","assets/admin/images/logo/logo.png"],[1,"title"],[1,"row"],[1,"col-sm-12"],[1,"card","my-3"],["state","mysql"],["matStepLabel",""],[1,"mt-3",3,"formGroup"],[1,"form-group"],["for","name"],[2,"color","red"],["type","text","name","hostName","formControlName","MYSQL_HOST","required","","s","",1,"form-control",3,"keyup"],[4,"ngIf"],["type","text","name","port","formControlName","MYSQL_PORT","required","",1,"form-control",3,"keyup"],["type","text","name","userName","formControlName","MYSQL_USER","required","",1,"form-control",3,"keyup"],[1,"col-form-label"],["formControlName","MYSQL_PASSWORD","required","","placeholder","*********",1,"form-control",3,"keyup","type"],["class","show-hide",3,"click",4,"ngIf"],["class","text-success",4,"ngIf"],["class","text-danger",4,"ngIf"],[1,"button-container"],["type","button",1,"btn","btn-primary","btn-block",3,"click","disabled"],["type","button","matStepperNext","",1,"btn","btn-primary","btn-block","mt-0",3,"click","disabled"],["for","name",1,"pb-0","mb-0"],[1,"form-group","m-t-5","m-checkbox-inline","mb-0","custom-radio-ml","ml-2"],[1,"radio","radio-primary"],["type","radio","id","versionInstalled","value","true","formControlName","previousVersionInstalled",3,"change"],["for","versionInstalled",1,"mb-0"],["type","radio","id","previousVersionNotInstalled","value","false","formControlName","previousVersionInstalled",3,"change"],["for","previousVersionNotInstalled",1,"mb-0"],[1,"form-group",2,"border-top","1px solid #ddd"],[1,"form-check",2,"font-size","16px","padding-top","20px"],["id","checkbox-info-1","type","checkbox","value","isInstallMasterData","name","installMasterData","formControlName","isInstallMasterData"],["class","form-group",4,"ngIf"],["type","button","matStepperNext","",1,"btn","btn-primary","btn-block","mt-3",3,"click"],["type","button","matStepperPrevious","",1,"btn","btn-secondary","btn-block","mt-0",3,"click"],[1,"d-flex",2,"justify-content","space-between"],[1,"text-left"],[1,"pt-3"],["class","verify mt-3",4,"ngIf"],["class","errorstate mt-3",4,"ngIf"],["matStepperIcon","edit"],[1,"show-hide",3,"click"],[1,"show"],[1,"Hide"],[1,"text-success"],[1,"verify","connectionerror"],["src","assets/website/images/check.png","alt","check",1,"checkImg"],[1,"text-danger"],[1,"errorstate","connectionerror"],[1,"fa","fa-close"],[1,"form-group","mt-2"],["placeholder","Select Installed Version","name","version","formControlName","version",1,"js-example-basic-single","p-0",3,"items","required"],["placeholder","Select Database","bindLabel","Database","bindValue","Database","name","database","formControlName","database",1,"js-example-basic-single","p-0",3,"items","required"],[1,"form-group","mt-4"],["type","text","name","hostName","formControlName","MYSQL_DATABASE","required","",1,"form-control"],["id","checkbox-info-1","type","checkbox","value","isCreateUser","name","createUser","formControlName","isCreateDatabaseUser"],["type","text","name","username","formControlName","username","required","",1,"form-control"],["formControlName","password","placeholder","*********",1,"form-control",3,"type"],["type","button",1,"btn","btn-primary","mb-3",3,"click"],[1,"form-check",2,"font-size","16px","padding-top","10px"],["id","checkbox-info-1","type","checkbox","value","isInstallSampleData","name","installSampleData","formControlName","isInstallSampleData"],[1,"verify","mt-3"],["src","assets/website/images/check.png","alt","check",1,"checkImg",2,"margin-top","3px"],[1,"errorstate","mt-3"],["mode","indeterminate"],[1,"text-danger","mt-2"],[1,"box"],[4,"ngIf","ngIfElse"],["type","button","href","https://ticket.native.software/","target","_blank",1,"btn","btn-primary","btn-block","mt-2","text-center",3,"click","cdkCopyToClipboard"],["type","button","matStepperPrevious","",1,"btn","btn-secondary","btn-block","mt-3",3,"click"],[1,"text-center"],[1,"congrats"],["src","assets/website/images/reserved.gif","alt","check",1,"checkImgsuccess"],[2,"color","#78b144","font-size","42px"],[1,"text"],["class","box userbox m-auto",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block","mt-3",3,"click"],[1,"box","userbox","m-auto"],["type","button","title","Copy",1,"btn","btn-primary","copybtn","mt-2","text-center",3,"click","cdkCopyToClipboard"],[1,"fa","fa-copy"]],template:function(r,n){if(r&1){let c=v();o(0,"title"),s(1,"Setup configuration"),a(),o(2,"div",2)(3,"div",3)(4,"div"),u(5,"img",4),a(),o(6,"div")(7,"h4",5),s(8,"Welcome to CreditAPP Configuration"),a()()(),o(9,"div",6)(10,"div",7)(11,"div",8)(12,"mat-stepper",null,0)(14,"mat-step",9),d(15,ze,1,0,"ng-template",10),o(16,"form",11)(17,"div",12)(18,"label",13),s(19,"Host Name"),o(20,"span",14),s(21,"*"),a()(),o(22,"input",15),h("keyup",function(){return f(c),_(n.reset())}),a(),d(23,Ge,2,0,"mat-error",16),a(),o(24,"div",12)(25,"label",13),s(26,"Port"),o(27,"span",14),s(28,"*"),a()(),o(29,"input",17),h("keyup",function(){return f(c),_(n.reset())}),a(),d(30,Je,2,0,"mat-error",16),a(),o(31,"div",12)(32,"label",13),s(33,"User Name"),o(34,"span",14),s(35,"*"),a()(),o(36,"input",18),h("keyup",function(){return f(c),_(n.reset())}),a(),d(37,Ze,2,0,"mat-error",16),a(),o(38,"div",12)(39,"label",19),s(40,"Password"),o(41,"span",14),s(42,"*"),a()(),o(43,"input",20),h("keyup",function(){return f(c),_(n.reset())}),a(),d(44,Xe,2,0,"div",21)(45,Ke,2,0,"div",21)(46,$e,2,0,"mat-error",16),a(),o(47,"div"),d(48,et,4,0,"h4",22)(49,tt,4,0,"h4",23),a()(),o(50,"div",24)(51,"button",25),h("click",function(){return f(c),_(n.testConnection(n.configurationForm))}),s(52,"Test Connection "),a(),o(53,"button",26),h("click",function(){return f(c),_(n.testConnection(n.configurationForm))}),s(54,"Save & Next "),a()()(),o(55,"mat-step"),d(56,nt,1,0,"ng-template",10),o(57,"form",11)(58,"label",27),s(59,"Previous Version Installed? "),o(60,"span",14),s(61,"*"),a()(),o(62,"div",28)(63,"div",29)(64,"input",30),h("change",function(){return f(c),_(n.checkPreviousVersionInstalled())}),a(),o(65,"label",31),s(66,"Yes"),a()(),o(67,"div",29)(68,"input",32),h("change",function(){return f(c),_(n.checkPreviousVersionInstalled())}),a(),o(69,"label",33),s(70,"No"),a()()(),d(71,ot,17,6,"ng-container",16)(72,dt,15,2,"ng-container",16),o(73,"div",34)(74,"div",35),u(75,"input",36),s(76," Install Master Data"),o(77,"span",14),s(78,"*"),a()()(),d(79,ut,6,0,"div",37),a(),o(80,"div",24)(81,"button",38),h("click",function(){return f(c),_(n.databaseConfiguration(n.setUpForm))}),s(82,"Database Configuration "),a(),o(83,"button",39),h("click",function(){return f(c),_(n.selectedIndex=0)}),s(84,"Back "),a()()(),o(85,"mat-step"),d(86,gt,1,0,"ng-template",10),o(87,"div",40)(88,"div",41)(89,"h2",42),s(90,"1. Setup Database..."),a()(),d(91,ft,2,0,"div",43)(92,_t,2,0,"div",44),a(),d(93,ht,2,0,"ng-container",16)(94,bt,2,1,"ng-container",16)(95,It,2,1,"ng-container",16)(96,kt,11,3,"ng-container",16)(97,Ot,15,1,"ng-container",16),a(),d(98,Nt,2,0,"ng-template",45),a()()()()()}if(r&2){let c,p,x;l(16),m("formGroup",n.configurationForm),l(7),m("ngIf",n.configurationForm.get("MYSQL_HOST")&&!n.configurationForm.get("MYSQL_HOST").valid&&n.configurationForm.get("MYSQL_HOST").touched),l(7),m("ngIf",n.configurationForm.get("MYSQL_PORT")&&!n.configurationForm.get("MYSQL_PORT").valid&&n.configurationForm.get("MYSQL_PORT").touched),l(7),m("ngIf",n.configurationForm.get("MYSQL_USER")&&!n.configurationForm.get("MYSQL_USER").valid&&n.configurationForm.get("MYSQL_USER").touched),l(6),m("type",n.show?"text":"password"),l(),m("ngIf",!n.show),l(),m("ngIf",n.show),l(),m("ngIf",n.configurationForm.get("MYSQL_PASSWORD")&&!n.configurationForm.get("MYSQL_PASSWORD").valid&&n.configurationForm.get("MYSQL_PASSWORD").touched),l(2),m("ngIf",n.isTested&&!n.connectionError),l(),m("ngIf",n.isTested&&n.connectionError),l(2),m("disabled",n.isTested&&!n.connectionError),l(2),m("disabled",!n.isTested||n.connectionError),l(4),m("formGroup",n.setUpForm),l(14),m("ngIf",((c=n.setUpForm.get("previousVersionInstalled"))==null?null:c.value)=="true"),l(),m("ngIf",((p=n.setUpForm.get("previousVersionInstalled"))==null?null:p.value)=="false"),l(7),m("ngIf",((x=n.setUpForm.get("previousVersionInstalled"))==null?null:x.value)=="false"),l(12),m("ngIf",n.databaseState=="created"),l(),m("ngIf",n.databaseState=="Error"),l(),m("ngIf",n.databaseState=="Creating"),l(),m("ngIf",n.setUpForm.get("isInstallMasterData").value==!0),l(),m("ngIf",n.setUpForm.get("isInstallSampleData").value==!0),l(),m("ngIf",n.databaseState=="Error"||n.masterDataState=="Error"||n.sampleDataState=="Error"),l(),m("ngIf",n.isFullSetup)}},dependencies:[$,xe,we,ye,Me,Ie,De,Ee,be,Te,ke,Pe,ue,ce,me,ge,pe,de,he,fe,_e],styles:['.mat-horizontal-stepper-header-container{background-color:#43f} .mat-step-text-label{color:#fff} .form-check{padding-left:0}.verify[_ngcontent-%COMP%]{background:#78d144;position:relative;border-radius:50%;padding:0 5px;width:25px;height:24px;display:inline-block;top:5px}.verify[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:16px;margin-top:-10px}li[_ngcontent-%COMP%]{margin-top:10px}.title[_ngcontent-%COMP%]{color:#7366ff;font-size:24px;margin-top:20px}.show-hide[_ngcontent-%COMP%]{position:absolute;right:36px;transform:translateY(-138%);top:auto}.show-hide[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;color:var(--theme-deafult)}.show-hide[_ngcontent-%COMP%] span.show[_ngcontent-%COMP%]:before{content:"show"}.show-hide[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:before{content:"hide"}.box[_ngcontent-%COMP%]{border:1px solid #7366ff;padding:10px}.errorstate[_ngcontent-%COMP%]{background:red;position:relative;border-radius:50%;width:25px;height:24px;display:inline-block;top:5px}.errorstate[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff;position:relative;left:8px;bottom:-3px}.userbox[_ngcontent-%COMP%]{width:300px;text-align:start}.verifysuccess[_ngcontent-%COMP%]{background:#78d144;position:relative;border-radius:50%;padding:0 5px;width:25px;height:24px;display:inline-block;top:5px}.verifysuccess[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:16px;margin-top:-10px}.congrats[_ngcontent-%COMP%]{height:150px}.congrats[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain} .mat-step-icon, .mat-step-icon-selected[_ngcontent-%COMP%]{background-color:#fff!important;color:#43f!important}.card[_ngcontent-%COMP%]{min-height:calc(100vh - 220px);overflow:auto}.connectionerror[_ngcontent-%COMP%]{height:21px;width:21px;top:1px;left:5px}.connectionerror[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{bottom:1px;left:4px}.connectionerror[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-top:-5px;height:10px}.text[_ngcontent-%COMP%]{justify-content:center;display:flex;width:91%;margin:21px auto}.copybtn[_ngcontent-%COMP%]{float:right;padding:0 10px;margin-top:20px;top:-20px;position:relative;right:-10px;cursor:pointer} .mat-step-header{pointer-events:none;cursor:not-allowed}.btn-secondary[_ngcontent-%COMP%]{background-color:#ddd!important;border-color:#ddd!important}.testbtn[_ngcontent-%COMP%]{bottom:20px;position:relative;width:92%}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:80px;overflow:hidden}.button-container[_ngcontent-%COMP%]{position:absolute;bottom:20px;width:92%;display:flex;flex-direction:column;align-items:center;gap:10px}']})}return e})();var At=[{path:"configuration",component:Le},{path:"admin",loadChildren:()=>import("./chunk-SB5MH36H.js").then(e=>e.AdminModule),pathMatch:"prefix"},{path:"",loadChildren:()=>import("./chunk-EER763EG.js").then(e=>e.WebsiteModule)},{path:"admin/**",redirectTo:"admin"}],Ue=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=y({type:e});static \u0275inj=b({imports:[j.forRoot(At),j]})}return e})();var Ft="@",Vt=(()=>{let i=class i{constructor(r,n,c,p,x){this.doc=r,this.delegate=n,this.zone=c,this.animationType=p,this.moduleImpl=x,this._rendererFactoryPromise=null,this.scheduler=W(J,{optional:!0})}ngOnDestroy(){this._engine?.flush()}loadImpl(){return(this.moduleImpl??import("./chunk-HL3K2VNU.js").then(n=>n)).catch(n=>{throw new B(5300,!1)}).then(({\u0275createEngine:n,\u0275AnimationRendererFactory:c})=>{this._engine=n(this.animationType,this.doc);let p=new c(this.delegate,this._engine,this.zone);return this.delegate=p,p})}createRenderer(r,n){let c=this.delegate.createRenderer(r,n);if(c.\u0275type===0)return c;typeof c.throwOnSyntheticProps=="boolean"&&(c.throwOnSyntheticProps=!1);let p=new q(c);return n?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(x=>{let je=x.createRenderer(r,n);p.use(je),this.scheduler?.notify(9)}).catch(x=>{p.use(c)}),p}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}};i.\u0275fac=function(n){G()},i.\u0275prov=T({token:i,factory:i.\u0275fac});let e=i;return e})(),q=class{constructor(i){this.delegate=i,this.replay=[],this.\u0275type=1}use(i){if(this.delegate=i,this.replay!==null){for(let t of this.replay)t(i);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(i,t){return this.delegate.createElement(i,t)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}get destroyNode(){return this.delegate.destroyNode}appendChild(i,t){this.delegate.appendChild(i,t)}insertBefore(i,t,r,n){this.delegate.insertBefore(i,t,r,n)}removeChild(i,t,r){this.delegate.removeChild(i,t,r)}selectRootElement(i,t){return this.delegate.selectRootElement(i,t)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,t,r,n){this.delegate.setAttribute(i,t,r,n)}removeAttribute(i,t,r){this.delegate.removeAttribute(i,t,r)}addClass(i,t){this.delegate.addClass(i,t)}removeClass(i,t){this.delegate.removeClass(i,t)}setStyle(i,t,r,n){this.delegate.setStyle(i,t,r,n)}removeStyle(i,t,r){this.delegate.removeStyle(i,t,r)}setProperty(i,t,r){this.shouldReplay(t)&&this.replay.push(n=>n.setProperty(i,t,r)),this.delegate.setProperty(i,t,r)}setValue(i,t){this.delegate.setValue(i,t)}listen(i,t,r){return this.shouldReplay(t)&&this.replay.push(n=>n.listen(i,t,r)),this.delegate.listen(i,t,r)}shouldReplay(i){return this.replay!==null&&i.startsWith(Ft)}};function Ye(e="animations"){return Y("NgAsyncAnimations"),z([{provide:P,useFactory:(i,t,r)=>new Vt(i,t,r,e),deps:[N,A,O]},{provide:E,useValue:e==="noop"?"NoopAnimations":"BrowserAnimations"}])}var Qe=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=y({type:e,bootstrap:[Ae]});static \u0275inj=b({providers:[Ye()],imports:[ee,F,Re,Ue,Ne,Oe,Se,se.forRoot()]})}return e})();te().bootstrapModule(Qe).catch(e=>console.error(e));