var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(t){let i;(function(i){class r{constructor(){this.detailsViewIndex=1;this.fileCacheHelper=n.Platform.Helpers.FileCacheHelper.Instance()}login(){let t=n.Platform.Helpers.CookieHelper.Instance().getIdentityCookie();if(t!=""&&t!=undefined)window.location.href="#/welcome",$(".modal").modal("hide");else{var i=this;jQuery("#external-form").html("");isMobileApp()?n.Platform.Helpers.MobileHelper.Instance().checkCredentials():this.fileCacheHelper.loadJsFile("tenants/themes/providers/login/login.js",function(){i.popin(0,"external-form",n.Themes.Providers.Login.Instance(),null)})}}registerUser(t){var i=this;this.fileCacheHelper.loadJsFile("tenants/themes/providers/register/register.js",function(){i.popin(0,"external-form",n.Themes.Providers.Register.Instance(),t)})}signup(){var t=this;this.fileCacheHelper.loadJsFile("tenants/themes/providers/signup/signup.js",function(){t.popin(0,"external-form",n.Themes.Providers.SignUp.Instance(),null)})}createcontact(){var t=this;this.fileCacheHelper.loadJsFile("tenants/themes/providers/createcustomer/createcustomer.js",function(){t.popin(0,"external-form",n.Themes.Providers.CreateCustomer.Instance(),null)})}forgotPassword(){var t=this;this.fileCacheHelper.loadJsFile("tenants/themes/providers/forgotpassword/forgotpassword.js",function(){t.popin(0,"external-form",n.Themes.Providers.ForgotPassword.Instance(),null)})}logOff(){var t=this;jQuery("#external-form").html("");this.fileCacheHelper.loadJsFile("tenants/themes/providers/logoff/logoff.js",function(){t.popin(0,"external-form",n.Themes.Providers.Login.Instance(),null)})}register(t,i,r,u,f){var e=this;this.fileCacheHelper.loadJsFile("tenants/themes/compact/components/confirmregister/mobilregister.js",function(){e.popin(0,"external-form",n.Themes.Compact.Components.MobilRegister.Instance(),function(e,o){var s=n.Themes.Compact.Components.MobilRegister.Instance(),h;s.userid=t;s.tenant=i;s.email=r;s.phonenumber=u;h=o;h.register(s);f!=null&&f()})})}welcome(t,i){let r=this.fileCacheHelper;n.Platform.Membership.Managers.AccountManager.Instance().IsValidSession().then(function(u){u?i!=!0?r.loadJsFile("tenants/themes/compact/index.js",function(){$(".preloader-it").remove();n.Themes.Compact.Components.Index.Instance().init(t)}):r.loadJsFile("tenants/themes/compact/index.js",function(){n.Themes.Compact.Components.Index.Instance().documentinit(t)}):(n.Platform.Helpers.CookieHelper.Instance().setIdentityCookie(""),window.location.href="#/login")})}_loadWelcomeFirst(n){var t=this.fileCacheHelper;t.isFileRegistered("tenants/themes/compact/index.js")?n!==null&&n():this.welcome(n)}sleep(n){return new Promise(t=>setTimeout(t,n))}popin(t,i,r,u){var f=this;r.cssFiles()!==[]&&this.fileCacheHelper.loadCssFiles(r.cssFiles(),null);this.fileCacheHelper.loadJsFiles(r.jsFiles(),function(){var e=i,o,s,h;(e===""||e===undefined)&&(e="_modal_bizgaze_edit_"+moment().unix());e=="external-form"||e==""||e.includes("div_portletwidget_")||e.includes("div_dashboardportletwidget_")||!$.inArray(e,n.Platform.Helpers.NavigationHelper.ModalContainerIds)||n.Platform.Helpers.NavigationHelper.ModalContainerIds.find(n=>n==e)==undefined&&n.Platform.Helpers.NavigationHelper.ModalContainerIds.push(e);$("#"+e).length<=0&&!e.includes("div_dashboardportletwidget")&&!e.includes("div_portletwidget_")&&(o='
<\/div>',$("#layout-detail").before(o));s=r.html(t,e);$("#"+e).html(s);$("#"+e).find(".btn-close").click(function(){f.close(e,null)});i.includes("_modal_bizgaze_popup_")||f.detailsViewIndex!=1||$("._bizgaze_detail_container").addClass("hidden");$("#"+e).removeClass("hidden");$("#"+e).length<=0&&(e="_bizgaze_body");$("#"+e).find(".header").addClass("modal-header").removeClass("header");$("#"+e).find(".footer").addClass("modal-footer").removeClass("footer");$("#"+e).find(".scrollable").addClass("modal-body").addClass("bg-cyan-light-5-removed").removeClass("scrollable");$("._bizgaze_popup_container").find(".card-footer").find(".col-7").addClass("d-none");$("._bizgaze_popup_container").find(".card-footer").removeClass("d-none").addClass("z-index-9");$("._bizgaze_popup_container").find(".btnClose").removeClass("hidden btn-primary pull-right").addClass("btn-outline-danger");$("#"+e).off("remove").on("remove",function(){const t=n.Platform.Helpers.NavigationHelper.ModalContainerIds;t.find(n=>n==e)!=undefined&&t.splice($.inArray(e,t),1);f.updateDefaultWidgetValues(e)});h=90;$(document).width()<1200&&($("#"+e).find(".modal-body").removeClass("w-f"),h=160);$("#"+e).find(".modal-body").css("overflow","hidden auto");r.load(t,e,function(){u!=null&&u()});u!=null&&u(i,r)})}popup(t,i,r,u,f){r.cssFiles()!==[]&&this.fileCacheHelper.loadCssFiles(r.cssFiles(),null);$(".preloader-it").attr("data-preloader","preloaderForm");var e=this;this.fileCacheHelper.loadJsFiles(r.jsFiles(),function(){var o=i,h;(o===""||o===undefined)&&(o="_modal_bizgaze_popup_"+moment().unix());o==""||o.includes("div_portletwidget_")||o.includes("div_dashboardportletwidget_")||!$.inArray(o,n.Platform.Helpers.NavigationHelper.ModalContainerIds)||n.Platform.Helpers.NavigationHelper.ModalContainerIds.find(n=>n==o)==undefined&&n.Platform.Helpers.NavigationHelper.ModalContainerIds.push(o);let s=0;if($("#"+o).length<=0){let i="col-sm-9";f===n.Platform.Helpers.Size.Mini?i="col-sm-4":f===n.Platform.Helpers.Size.Medium?i="col-sm-6":f===n.Platform.Helpers.Size.Large?i="col-sm-8":f===n.Platform.Helpers.Size.ExtraLarge?i="col-sm-12":f===n.Platform.Helpers.Size.DockRight&&(i="",s=$(document).width()-258);let r="";typeof t=="string"&&t!=undefined&&t.includes!=undefined&&(t.includes("ticketcreate")||t.includes("ticket"))&&!t.includes("ticketlist")&&(r='data-isticketcreate="true"');h='