{"version":3,"file":"sm.portal.page.continuingEducation.min.js","names":["$","sm","window","portal","extend","page","continuingEducation","initPage","viewModel","vm","ContinuingEducationViewModel","AccountViewModel","IsUserLoggedIn","DataLoading","BaseApiURL","_baseApiUri","TemplatesURL","_uploadPath","when","custom","loadCustomTemplate","utility","loadTemplate","done","LoadInitialData","TemplatesLoaded","ko","applyBindings","IsLoggedIn","CheckForActiveCESAR","jQuery","document","bind"],"sources":["assets/js/pages/sm.portal.page.continuingEducation.js"],"mappings":"CAIA,SAAWA,GACT,IAAIC,EAAKC,OAAOD,GAAKC,OAAOD,IAAM,CAAC,OAEV,IAAdA,EAAGE,QACZH,EAAEI,OAAOH,EAAI,CAAEE,OAAQ,CAAC,SAEI,IAAnBF,EAAGE,OAAOE,MACnBL,EAAEI,OAAOH,EAAGE,OAAQ,CAAEE,KAAM,CAAC,SAEmB,IAAvCJ,EAAGE,OAAOE,KAAKC,qBACxBN,EAAEI,OAAOH,EAAGE,OAAOE,KAAM,CAAEC,oBAAqB,CAAC,IA8CnDN,EAAEI,QAAO,EAAMH,EAAGE,OAAOE,KAAKC,oBAAqB,CACjDC,SA5CF,WAEEL,OAAOM,UAAY,IAAIP,EAAGE,OAAOM,GAAGH,oBAAoBI,6BAMxDR,OAAOM,UAAUG,iBAAiBC,gBAAe,WAE/CV,OAAOM,UAAUK,aAAY,GAC7BX,OAAOM,UAAUM,WAAWC,aAC5Bb,OAAOM,UAAUQ,aAAaC,YAAc,eAE5CjB,EAAEkB,KACAjB,EAAGE,OAAOM,GAAGU,OAAOC,qBACpBnB,EAAGE,OAAOkB,QAAQC,aAAa,0BAA2B,2BAC1DrB,EAAGE,OAAOkB,QAAQC,aAAa,sBAAuB,iBACtDrB,EAAGE,OAAOkB,QAAQC,aAAa,0BAA2B,uBAE1DrB,EAAGE,OAAOkB,QAAQC,aAAa,yBAA0B,wBACzDrB,EAAGE,OAAOkB,QAAQC,aAAa,kBAAmB,oBAClDrB,EAAGE,OAAOkB,QAAQC,aAAa,mCAAoC,qCACnErB,EAAGE,OAAOkB,QAAQC,aAAa,gCAAiC,mCAEhEC,MAAK,WACLrB,OAAOM,UAAUgB,kBACjBtB,OAAOM,UAAUiB,iBAAgB,GAGjCC,GAAGC,cAAczB,OAAOM,WAEpBN,OAAOM,UAAUG,iBAAiBiB,cAEpC1B,OAAOM,UAAUqB,qBAKrB,GACF,GAnCF,GAyCD,CA3DD,CA2DGC,QASAA,OAHCC,UAAUC,KAAK,mBAAmB,WAClC/B,GAAGE,OAAOE,KAAKC,oBAAoBC,UACrC","ignoreList":[],"sourcesContent":["\r\n/************************************************/\r\n/* Page Object */\r\n/************************************************/\r\n(function ($) {\r\n var sm = window.sm = window.sm || {};\r\n\r\n if (typeof sm.portal === 'undefined') {\r\n $.extend(sm, { portal: {} });\r\n }\r\n if (typeof sm.portal.page === 'undefined') {\r\n $.extend(sm.portal, { page: {} });\r\n }\r\n if (typeof sm.portal.page.continuingEducation === 'undefined') {\r\n $.extend(sm.portal.page, { continuingEducation: {} });\r\n }\r\n\r\n function initPage () {\r\n // Create the View Model\r\n window.viewModel = new sm.portal.vm.continuingEducation.ContinuingEducationViewModel();\r\n\r\n loadTemplates();\r\n }\r\n\r\n function loadTemplates () {\r\n window.viewModel.AccountViewModel.IsUserLoggedIn(function () {\r\n\r\n window.viewModel.DataLoading(true);\r\n window.viewModel.BaseApiURL(_baseApiUri);\r\n window.viewModel.TemplatesURL(_uploadPath + '/templates/');\r\n // Load the Account Templates\r\n $.when(\r\n sm.portal.vm.custom.loadCustomTemplate(),\r\n sm.portal.utility.loadTemplate('ValidationFieldTemplate', 'validationFieldTemplate'),\r\n sm.portal.utility.loadTemplate('ApplicationTemplate', 'formTemplates'),\r\n sm.portal.utility.loadTemplate('ValidationFieldTemplate', 'validationTemplates'),\r\n // templates added to the page\r\n sm.portal.utility.loadTemplate('MailingAddressTemplate', 'addressFormTemplates'),\r\n sm.portal.utility.loadTemplate('AccountTemplate', 'accountTemplates'),\r\n sm.portal.utility.loadTemplate('PortalValidationMessagesTemplate', 'portalValidationMessagesTemplates'),\r\n sm.portal.utility.loadTemplate('PortalWarningMessagesTemplate', 'portalWarningMessagesTemplates'),\r\n\r\n ).done(function () {\r\n window.viewModel.LoadInitialData();\r\n window.viewModel.TemplatesLoaded(true);\r\n\r\n // Bind to Page Elements\r\n ko.applyBindings(window.viewModel);\r\n\r\n if (window.viewModel.AccountViewModel.IsLoggedIn()) {\r\n // Do we have a student?\r\n window.viewModel.CheckForActiveCESAR();\r\n\r\n // redirect to registration\r\n // window.location = '/?u4sm_page=registration';\r\n }\r\n });\r\n });\r\n }\r\n\r\n $.extend(true, sm.portal.page.continuingEducation, {\r\n initPage: initPage\r\n });\r\n})(jQuery);\r\n\r\n/// ************************************************/\r\n/// * Event Hooks */\r\n/// ************************************************/\r\n(function ($) {\r\n $(document).bind('afterSMInitPage', function () {\r\n sm.portal.page.continuingEducation.initPage();\r\n });\r\n})(jQuery);\r\n"]}