{"version":3,"sources":["webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/src/views/pages/myAccountUpdateProfilePage/js/myAccountUpdateProfilePage.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/scroll-js/dist/scroll.js","webpack:///./wlc/fullScreenLoaderService.js","webpack:////Users/owenli/Documents/workspace/awi-wlc-fe/src/views/widgets/fullScreenLoaderWidget/tmpl/fullScreenLoaderWidget.hbs","webpack:///./wlc/Custom_Validations/custom_validation_en.js","webpack:///./wlc/Custom_Validations/custom_validation_de.js","webpack:///./wlc/Custom_Validations/custom_validation_es.js","webpack:///./wlc/Custom_Validations/custom_validation_es-mx.js","webpack:///./wlc/Custom_Validations/custom_validation_fr.js","webpack:///./wlc/Custom_Validations/custom_validation_it.js","webpack:///./wlc/Custom_Validations/custom_validation_ja.js","webpack:///./wlc/Custom_Validations/custom_validation_ko.js","webpack:///./wlc/Custom_Validations/custom_validation_vi.js","webpack:///./wlc/Custom_Validations/custom_validation_zh.js","webpack:///./wlc/Custom_Validations/custom_validation_zh-HK.js","webpack:///./wlc/Custom_Validations/custom_validation.js"],"names":["CLS","MyAccountUpdateProfilePage","element","customValidation","_classCallCheck","this","$element","$","$scroller","countryAPI","data","registerAPI","languageCode","$errorMessagesServerSide","find","$sucessMessages","fullScreenLoaderService","countries","$form","concat","regexPassword","siteTypeId","window","Site","API","$formValidate","role","formTypes","facilitator","learner","formType","loadCountries","messages_de","messages_en","messages_es","messages_es_mx","messages_fr","messages_it","messages_ja","messages_ko","messages_vi","messages_zh","messages_zh_HK","messages","buildForm","loadEducationLevel","loadOverMinimumAge","loadFacilitatorDocument","selectEvents","resetForm","key","value","_this","ajax","type","url","headers","X-IDS-SiteTypeId","success","$countrySelect","append","markup","forEach","country","Name","setTimeout","selectpicker","error","_this2","val","$educationLevelSelect","rules","required","show","hide","offset","arguments","length","undefined","scrollTo","top","position","duration","easing","on","event","currentTarget","blur","focus","formGroupElements","educationLevelOther","institution","areaStudy","areaStudyOther","howDidYouHearOther","company","expectedGraduationYear","industry","options","selectedIndex","attr","removeClass","message","addClass","text","_this3","validator","addMethod","_element","RegExp","test","validate","submitHandler","form","preventDefault","array","serializeArray","formData","map","n","i","_","forOwn","isNil","trim","json_text","JSON","stringify","request","Request","method","body","Content-Type","create","fetch","then","response","status","handleServerSideError","statusText","destroy","catch","invalidHandler","errorList","parent","scrollToElement","ignore","Salutation","FirstName","LastName","Email","email","Country","Postcode","EducationLevel","OverMinimumAge","Password","ConfirmPassword","equalTo","TermsAndConditions","errorClass","errorElement","errorPlacement","is","parents","after","insertAfter","highlight","unhighlight","el","thisArg","_arguments","generator","Element","Window","Error","sanitizeScrollOptions","scroll","from","to","prop","startTime","easeFunc","callback","requestAnimationFrame","currentTime","Date","now","time","Math","min","document","utils","getDocument","documentElement","scrollTop","setScrollPosition","currentScrollPosition","getScrollPosition","scrollProperty","props","y","x","getScrollPropertyByElement","Promise","resolve","getEasing","P","reject","fulfilled","step","next","e","rejected","result","done","apply","scrollIntoView","scroller","errorMsg","HTMLElement","validateElement","currentContainerScrollYPos","elementScrollYPos","offsetTop","pageYOffset","getBoundingClientRect","left","behavior","__webpack_require__","d","__webpack_exports__","easingMap","linear","t","ease-in","ease-out","ease-in-out","Object","keys","join","fullScreenLoaderWidget","require","Handlebars","registerPartial","FullScreenLoaderService","precompiled","Function","precompile","fullScreenLoaderWidgetTemplate","template","remove","module","exports","compiler","main","container","depth0","helpers","partials","helper","alias1","nullContext","alias2","hooks","helperMissing","alias4","escapeExpression","lookupProperty","propertyName","prototype","hasOwnProperty","call","name","hash","loc","start","line","column","end","useData","messaages_en","messaages_de","messaages_es","messaages_es_mx","messaages_fr","messaages_it","messaages_ja","messaages_ko","messaages_vi","messaages_zh","messaages_zh_HK","educationLevelFacilitator_en","educationLevelLearner_en","overMinimumAge_en","facilitatorDocument_en","educationLevelFacilitator_de","educationLevelLearner_de","overMinimumAge_de","facilitatorDocument_de","educationLevelFacilitator_es","educationLevelLearner_es","overMinimumAge_es","facilitatorDocument_es","educationLevelFacilitator_es_mx","educationLevelLearner_es_mx","overMinimumAge_es_mx","facilitatorDocument_es_mx","educationLevelFacilitator_fr","educationLevelLearner_fr","overMinimumAge_fr","facilitatorDocument_fr","educationLevelFacilitator_it","educationLevelLearner_it","overMinimumAge_it","facilitatorDocument_it","educationLevelFacilitator_ja","educationLevelLearner_ja","overMinimumAge_ja","facilitatorDocument_ja","educationLevelFacilitator_ko","educationLevelLearner_ko","overMinimumAge_ko","facilitatorDocument_ko","educationLevelFacilitator_vi","educationLevelLearner_vi","overMinimumAge_vi","facilitatorDocument_vi","educationLevelFacilitator_zh","educationLevelLearner_zh","overMinimumAge_zh","facilitatorDocument_zh","educationLevelFacilitator_zh_HK","educationLevelLearner_zh_HK","overMinimumAge_zh_HK","facilitatorDocument_zh_HK","lang","validation"],"mappings":"0gCAAA,IACMA,EAAM,6BAkBCC,EAA0B,WA2ErC,SA1ED,SAAAA,EAAYC,GA2BX,IAAIC,EACJ,mGA5BoBC,CAAAC,KAAAJ,GACpBI,KAAKH,QAAUA,EACfG,KAAKC,SAAWC,EAAEF,KAAKH,SACvBG,KAAKG,UAAYD,EAAE,iBACnBF,KAAKI,WAAaJ,KAAKC,SAASI,KAAK,cACrCL,KAAKM,YAAcN,KAAKC,SAASI,KAAK,eACtCL,KAAKO,aAAeP,KAAKC,SAASI,KAAK,QACvCL,KAAKQ,yBAA2BR,KAAKC,SAASQ,KAAK,+BACnDT,KAAKU,gBAAkBV,KAAKC,SAASQ,KAAK,qBAC1CT,KAAKW,wBAA0BA,IAC/BX,KAAKY,aACLZ,KAAKa,MAAQX,EAAC,IAAAY,OAAKnB,EAAG,UACtBK,KAAKe,cAAgB,uDACrBf,KAAKgB,WAAaC,OAAkB,WAAKA,OAAkB,UAAEC,MAAQD,OAAkB,UAAEC,KAAKC,KAAOF,OAAkB,UAAEC,KAAKC,IAAIH,WAAaC,OAAkB,UAAEC,KAAKC,IAAIH,WAAaC,OAAuB,eAChNjB,KAA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,KACJ,MAAmB,8BAAfU,EACIT,EAGgB,0BAAfS,EACDR,EAGgB,mBAAfQ,EACDP,EAIAC,EAGT,IAAK,QACJ,MAAmB,8BAAfM,EACIL,EAGgB,0BAAfK,EACDJ,EAGgB,mBAAfI,EACDH,EAIAC,EAGT,QACC,MAAmB,8BAAfE,EACI7C,EAGgB,0BAAf6C,EACD5C,EAGgB,mBAAf4C,EACD3C,EAIAC","file":"page-12.2f662a3aa586e55a56ca.js","sourcesContent":["const NS = 'MyAccountUpdateProfilePage';\nconst CLS = 'myAccountUpdateProfilePage';\n\nimport { scrollTo } from 'scroll-js';\nimport { fullScreenLoaderService } from '../../../../../src/global/js/wlc/fullScreenLoaderService';\nimport { messages_en } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_en';\nimport { messages_de } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_de';\nimport { messages_es } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_es';\nimport { messages_es_mx } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_es-mx';\nimport { messages_fr } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_fr';\nimport { messages_it } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_it';\nimport { messages_ja } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_ja';\nimport { messages_ko } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_ko';\nimport { messages_vi } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_vi';\nimport { messages_zh } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_zh';\nimport { messages_zh_HK } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation_zh-HK';\nimport { messages } from '../../../../../src/global/js/wlc/Custom_Validations/custom_validation';\n\n\nexport class MyAccountUpdateProfilePage {\n\tconstructor(element) {\n\t\tthis.element = element;\n\t\tthis.$element = $(this.element);\n\t\tthis.$scroller = $('.tpl-scroller');\n\t\tthis.countryAPI = this.$element.data('countryApi');\n\t\tthis.registerAPI = this.$element.data('registerApi');\n\t\tthis.languageCode = this.$element.data('lang');\n\t\tthis.$errorMessagesServerSide = this.$element.find('.error-messages--serverSide');\n\t\tthis.$sucessMessages = this.$element.find('.success-messages');\n\t\tthis.fullScreenLoaderService = fullScreenLoaderService;\n\t\tthis.countries = [];\n\t\tthis.$form = $(`#${CLS}-form`);\n\t\tthis.regexPassword = '^(?=.*[A-Z])(?=.*[-!@#$%^&*()_+])(?=.*[0-9]).{8,20}$';\n\t\tthis.siteTypeId = window['IDSConfig'] && window['IDSConfig'].Site && window['IDSConfig'].Site.API && window['IDSConfig'].Site.API.siteTypeId ? window['IDSConfig'].Site.API.siteTypeId : window['fallbackSiteID'];\n\t\tthis.$formValidate;\n\t\tthis.role = this.$element.data('role');\n\t\tthis.formTypes = {\n\t\t\tfacilitator: 'facilitator',\n\t\t\tlearner: 'learner'\n\t\t};\n\n\t\tthis.formType = this.role;\n\n\t\tif (this.countryAPI) {\n\t\t\tthis.loadCountries();\n\t\t}\n\n\t\tvar customValidation;\n\t\tswitch (this.languageCode) {\n\t\t\tcase 'de':\n\t\t\t\tcustomValidation = messages_de();\n\t\t\t\tbreak;\n\t\t\tcase 'en':\n\t\t\t\tcustomValidation = messages_en();\n\t\t\t\tbreak;\n\t\t\tcase 'es':\n\t\t\t\tcustomValidation = messages_es();\n\t\t\t\tbreak;\n\t\t\tcase 'es-MX':\n\t\t\t\tcustomValidation = messages_es_mx();\n\t\t\t\tbreak;\n\t\t\tcase 'fr':\n\t\t\t\tcustomValidation = messages_fr();\n\t\t\t\tbreak;\n\t\t\tcase 'it':\n\t\t\t\tcustomValidation = messages_it();\n\t\t\t\tbreak;\n\t\t\tcase 'ja':\n\t\t\t\tcustomValidation = messages_ja();\n\t\t\t\tbreak;\n\t\t\tcase 'ko':\n\t\t\t\tcustomValidation = messages_ko();\n\t\t\t\tbreak;\n\t\t\tcase 'vi':\n\t\t\t\tcustomValidation = messages_vi();\n\t\t\t\tbreak;\n\t\t\tcase 'zh':\n\t\t\t\tcustomValidation = messages_zh();\n\t\t\t\tbreak;\n\t\t\tcase 'zh-HK':\n\t\t\t\tcustomValidation = messages_zh_HK();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcustomValidation = messages_en();\n\t\t\t\tbreak;\n\t\t}\n\t\tthis.messages = customValidation;\n\t\tthis.buildForm();\n\n\t\tthis.loadEducationLevel();\n\t\tthis.loadOverMinimumAge();\n\t\tthis.loadFacilitatorDocument();\n\t\tthis.selectEvents();\n\t\tthis.resetForm();\n\t}\n\n\tloadCountries() {\n\t\t$.ajax({\n\t\t\ttype: 'GET',\n\t\t\turl: this.countryAPI,\n\t\t\theaders: {\n\t\t\t\t'X-IDS-SiteTypeId': this.siteTypeId\n\t\t\t},\n\t\t\tsuccess: (data) => {\n\t\t\t\tthis.countries = data;\n\n\t\t\t\tlet $countrySelect = this.$element.find('select.country');\n\t\t\t\t$countrySelect.append(() => {\n\t\t\t\t\tlet markup = '';\n\t\t\t\t\tthis.countries.forEach((country) => {\n\t\t\t\t\t\tmarkup += ``;\n\t\t\t\t\t});\n\t\t\t\t\treturn markup;\n\t\t\t\t});\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t$countrySelect.selectpicker('refresh');\n\t\t\t\t\t$countrySelect.selectpicker('render');\n\t\t\t\t\tthis.resetForm(); // When countries is changed it sets it ot is-valid, reset said form to prevent this\n\t\t\t\t}, 100);\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tconsole.error(`${NS}::Error`, 'Could not load the list of countries');\n\t\t\t}\n\t\t});\n\t}\n\n\tloadEducationLevel() {\n\t\tlet $educationLevelFormGroup = this.$element.find(`.form-group--educationLevel`);\n\t\tlet value = $educationLevelFormGroup.find('input[type=\"hidden\"]').val();\n\n\t\tlet $educationLevelSelect = this.$element.find('select.educationLevel');\n\n\t\tsetTimeout(() => {\n\t\t\t$educationLevelSelect.selectpicker('val', value);\n\t\t\t$educationLevelSelect.selectpicker('refresh');\n\t\t\t$educationLevelSelect.selectpicker('render');\n\n\t\t\tif(this.formType === this.formTypes.facilitator) {\n\t\t\t\t$('#educationLevelFacilitator').rules('add', {\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessages: {\n\t\t\t\t\t\trequired: messages(this.languageCode, 'educationLevelFacilitator')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$('#educationLevelLearner').rules('remove');\n\t\t\t}\n\t\t\telse if(this.formType === this.formTypes.learner) {\n\t\t\t\t$('#educationLevelFacilitator').rules('remove');\n\t\t\t\t$('#educationLevelLearner').rules('add', {\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessages: {\n\t\t\t\t\t\trequired: messages(this.languageCode, 'educationLevelLearner')\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 100);\n\t}\n\n\tloadOverMinimumAge() {\n\t\tif(this.formType === this.formTypes.learner) {\n\t\t\t$('.custom-checkbox--overMinimumAge').show();\n\t\t\tthis.$form.find('[name=\"OverMinimumAge\"]').rules('add', {\n\t\t\t\trequired: true,\n\t\t\t\tmessages: {\n\t\t\t\t\trequired: messages(this.languageCode, 'overMinimumAge')\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\t$('.custom-checkbox--overMinimumAge').hide();\n\t\t\tthis.$form.find('[name=\"OverMinimumAge\"]').rules('remove');\n\t\t}\n\t}\n\n\tloadFacilitatorDocument() {\n\t\tif(this.formType === this.formTypes.facilitator) {\n\t\t\t$('.custom-checkbox--facilitatorDocument').show();\n\t\t\tthis.$form.find('[name=\"FacilitatorDocument\"]').rules('add', {\n\t\t\t\trequired: true,\n\t\t\t\tmessages: {\n\t\t\t\t\trequired: messages(this.languageCode, 'facilitatorDocument')\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\t$('.custom-checkbox--facilitatorDocument').hide();\n\t\t\tthis.$form.find('[name=\"FacilitatorDocument\"]').rules('remove');\n\t\t}\n\t}\n\n\tscrollToElement(element, offset = 0) {\n\t\treturn scrollTo(this.$scroller[0], { top: $(element).position().top + offset, duration: 500, easing: 'ease-in-out' });\n\t}\n\n\tselectEvents() {\n\t\tthis.$element.find('select').on('change', (event) => {\n\t\t\t$(event.currentTarget).blur().focus();\n\t\t});\n\n\t\tlet formGroupElements = {\n\t\t\teducationLevelOther: this.$element.find('.form-group--educationLevelOther'),\n\t\t\tinstitution: this.$element.find('.form-group--institution'),\n\t\t\tareaStudy: this.$element.find('.form-group--areaStudy'),\n\t\t\tareaStudyOther: this.$element.find('.form-group--areaStudyOther'),\n\t\t\thowDidYouHearOther: this.$element.find('.form-group--howDidYouHearOther'),\n\t\t\tcompany: this.$element.find('.form-group--company'),\n\t\t\texpectedGraduationYear: this.$element.find('.form-group--expectedGraduationYear'),\n\t\t\tindustry: this.$element.find('.form-group--industry')\n\t\t};\n\n\t\tformGroupElements.institution.hide();\n\t\tformGroupElements.areaStudy.hide();\n\t\tformGroupElements.areaStudyOther.hide();\n\t\tformGroupElements.company.hide();\n\t\tformGroupElements.expectedGraduationYear.hide();\n\t\tformGroupElements.educationLevelOther.hide();\n\t\tformGroupElements.industry.hide();\n\n\t\tif(this.$element.find('select.howDidYouHear').val() === 'Other') {\n\t\t\tformGroupElements.howDidYouHearOther.show();\n\t\t}\n\t\telse {\n\t\t\tformGroupElements.howDidYouHearOther.hide();\n\t\t}\n\n\t\t// Deals with on change for education level\n\t\tthis.$element.find('select.educationLevel').on('change', (event) => {\n\t\t\tlet key = $(event.currentTarget.options[event.currentTarget.selectedIndex]).attr('data-key');\n\n\t\t\tif(key === 'Other' || key === 'Employed' || key === 'Woolgrower') {\n\t\t\t\tformGroupElements.areaStudy.hide().find('[name=\"AreaStudy\"]').selectpicker('val', '').selectpicker('refresh').removeClass('is-valid is-invalid');\n\t\t\t\tformGroupElements.areaStudyOther.hide().find('#AreaStudyOther').val('').removeClass('is-valid is-invalid');\n\t\t\t\tformGroupElements.institution.hide().find('[name=\"Institution\"]').val('').removeClass('is-valid is-invalid');\n\t\t\t\tformGroupElements.company.show();\n\t\t\t\tformGroupElements.industry.show();\n\t\t\t\tformGroupElements.educationLevelOther.hide().find('[name=\"EducationLevelOther\"]').val('').removeClass('is-valid is-invalid');\n\t\t\t\tformGroupElements.expectedGraduationYear.hide().find('[name=\"Expected_Graduation_Year\"]').selectpicker('val', '').selectpicker('refresh').removeClass('is-valid is-invalid');\n\t\t\t\tif(key === 'Other') {\n\t\t\t\t\tformGroupElements.educationLevelOther.show();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(key === 'Secondary' || key === 'Tertiary' || key === 'Primary') {\n\t\t\t\tformGroupElements.areaStudy.show();\n\t\t\t\tif(formGroupElements.areaStudy.find('[name=\"AreaStudy\"]').val() === 'Other'){\n\t\t\t\t\tformGroupElements.areaStudyOther.show();\n\t\t\t\t}\n\t\t\t\tformGroupElements.expectedGraduationYear.hide();\n\t\t\t\tformGroupElements.institution.show();\n\t\t\t\tformGroupElements.company.hide();\n\t\t\t\tformGroupElements.industry.hide();\n\t\t\t\tformGroupElements.educationLevelOther.hide().find('[name=\"EducationLevelOther\"]').val('').removeClass('is-valid is-invalid');\n\t\t\t\tif(key === 'Secondary' || key === 'Tertiary')\n\t\t\t\t{\n\t\t\t\t\tformGroupElements.expectedGraduationYear.show();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\n\t\t// Deals with change for area of study\n\t\tthis.$element.find('select.areaStudy').on('change', (event) => {\n\t\t\tif($(event.currentTarget).val() === 'Other') {\n\t\t\t\tformGroupElements.areaStudyOther.show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tformGroupElements.areaStudyOther.hide().find('#AreaStudyOther').val('').removeClass('is-valid is-invalid');\n\t\t\t}\n\t\t});\n\n\t\t// Deals with select change for how did you hear\n\t\tthis.$element.find('select.howDidYouHear').on('change', (event) => {\n\t\t\tif($(event.currentTarget).val() === 'Other') {\n\t\t\t\tformGroupElements.howDidYouHearOther.show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tformGroupElements.howDidYouHearOther.hide().find('[name=\"HowDidYouHear\"]').val('').removeClass('is-valid is-invalid');\n\t\t\t}\n\t\t});\n\t}\n\n\thandleServerSideError(message) {\n\t\tthis.$errorMessagesServerSide.addClass('is-active').text(message);\n\t}\n\n\tresetForm() {\n\t\tthis.$form.removeClass('is-submitted');\n\t\tthis.$formValidate.resetForm();\n\t}\n\n\t/**\n\t * Implements the form and form validation using jQuery validation: https://jqueryvalidation.org/\n\t */\n\tbuildForm() {\n\t\t$.validator.addMethod('password', (value, _element) => {\n\t\t\treturn new RegExp(this.regexPassword).test(value);\n\t\t}, `Please enter a password that contains 8–20 characters, at least one capital letter, one number, and one special character [- ! @ # $ % ^ & * ( ) _ +].`);\n\n\t\tthis.$formValidate = this.$form.validate({\n\t\t\tsubmitHandler: (form, event) => {\n\t\t\t\tthis.$errorMessagesServerSide.removeClass('is-active').text('');\n\t\t\t\t$(event.currentTarget).addClass('is-submitted');\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tvar array = $(form).serializeArray()\n\t\t\t\tvar formData = {};\n\t\t\t\t$.map(array, function (n, i) {\n\t\t\t\t\tformData[n['name']] = n['value'];\n\t\t\t\t});\n\n\n\t\t\t\t// Removes empty field values\n\t\t\t\t_.forOwn(formData, (value, key) => {\n\t\t\t\t\tif(_.isNil(value) || value.trim() === '') {\n\t\t\t\t\t\tdelete formData[key];\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tvar json_text = JSON.stringify(formData);\n\n\t\t\t\tlet request = new Request(this.registerAPI, {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: json_text,\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-Type': 'application/json'\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.fullScreenLoaderService.create();\n\n\t\t\t\t// submit form data using fetch api\n\t\t\t\tfetch(request)\n\t\t\t\t\t.then((response) => {\n\t\t\t\t\t\tif(response.status === 200) {\n\t\t\t\t\t\t\tthis.$sucessMessages.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthis.handleServerSideError(response.statusText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.fullScreenLoaderService.destroy();\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\t// errors (failed call)\n\t\t\t\t\t\tthis.handleServerSideError(error);\n\t\t\t\t\t\tthis.fullScreenLoaderService.destroy();\n\t\t\t\t\t});\n\t\t\t},\n\t\t\tinvalidHandler: (event, validator) => {\n\t\t\t\t$(event.currentTarget).addClass('is-submitted');\n\t\t\t\tif(validator.errorList[0]) {\n\t\t\t\t\tlet element = validator.errorList[0].element;\n\t\t\t\t\t// Caveat for custom-control (radio + checkbox) as the element itself is absolutely positioned.\n\t\t\t\t\t// Scroll to the parent element of it instead.\n\t\t\t\t\tif($(element).parent('.custom-control') && $(element).parent('.custom-control').length > 0) {\n\t\t\t\t\t\tthis.scrollToElement($(element).parent('.custom-control')[0], -60);\n\t\t\t\t\t}\n\t\t\t\t\t// Second caveat for custom bootstrap select (generated) content\n\t\t\t\t\t// Also scroll to the parent element of the select instead\n\t\t\t\t\telse if($(element).parent('.bootstrap-select') && $(element).parent('.bootstrap-select').length > 0) {\n\t\t\t\t\t\tthis.scrollToElement($(element).parent('.bootstrap-select')[0], -60);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.scrollToElement(element, -60);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tignore: [],\n\t\t\trules: {\n\t\t\t\tSalutation: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tFirstName: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tLastName: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tEmail: {\n\t\t\t\t\trequired: true,\n\t\t\t\t\temail: true\n\t\t\t\t},\n\t\t\t\tCountry: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tPostcode: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tEducationLevel: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tOverMinimumAge: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tPassword: {\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tConfirmPassword: {\n\t\t\t\t\trequired: true,\n\t\t\t\t\tequalTo: '[name=\"Password\"]'\n\t\t\t\t},\n\t\t\t\tTermsAndConditions: {\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t},\n\t\t\tmessages: this.messages,\n\t\t\terrorClass: 'error-messages is-active mt-1',\n\t\t\terrorElement: 'span',\n\t\t\terrorPlacement: (error, element) => {\n\t\t\t\tif($(element).is('select')) {\n\t\t\t\t\t$(element).parents('.bootstrap-select').after(error);\n\t\t\t\t}\n\t\t\t\telse if($(element).attr('name') === 'Password' || $(element).attr('name') === 'ConfirmPassword') {\n\t\t\t\t\tif((!_.isNil($('[name=\"Password\"]').val()) && $('[name=\"Password\"]').val() !== '') &&\n\t\t\t\t\t\t(!_.isNil($('[name=\"ConfirmPassword\"]').val()) && $('[name=\"ConfirmPassword\"]').val() !== '') &&\n\t\t\t\t\t\t$('[name=\"Password\"]').val() !== $('[name=\"ConfirmPassword\"]').val()) {\n\t\t\t\t\t\t$('[name=\"ConfirmPassword\"]').after(error);\n\t\t\t\t\t}\n\t\t\t\t\telse if($(element).attr('name') === 'Password') {\n\t\t\t\t\t\t$('[name=\"Password\"]').after(error);\n\t\t\t\t\t}\n\t\t\t\t\telse if($(element).attr('name') === 'ConfirmPassword') {\n\t\t\t\t\t\t$('[name=\"ConfirmPassword\"]').after(error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($(element).attr('name') === 'TermsAndConditions'\n\t\t\t\t\t|| $(element).attr('name') === 'OverMinimumAge'\n\t\t\t\t\t|| $(element).attr('name') === 'FacilitatorDocument') {\n\t\t\t\t\t$(element).parents('.custom-control').after(error);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\terror.insertAfter(element);\n\t\t\t\t}\n\t\t\t},\n\t\t\thighlight: (element) => {\n\t\t\t\t$(element).addClass('is-invalid').removeClass('is-valid');\n\t\t\t},\n\t\t\tunhighlight: (element) => {\n\t\t\t\t$(element).addClass('is-valid').removeClass('is-invalid');\n\t\t\t}\n\t\t});\n\t}\n}\n","/*!\n * Scroll-js v2.3.2\n * https://github.com/mkay581/scroll-js\n *\n * Copyright (c) 2019 Mark Kennedy\n * Licensed under the MIT license\n */\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nfunction scrollTo(el, options = {}) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n if (!(el instanceof Element) && !(el instanceof Window)) {\r\n throw new Error(`element passed to scrollTo() must be either the window or a DOM element, you passed ${el}!`);\r\n }\r\n options = sanitizeScrollOptions(options);\r\n const scroll = (from, to, prop, startTime, duration = 300, easeFunc, callback) => {\r\n window.requestAnimationFrame(() => {\r\n const currentTime = Date.now();\r\n const time = Math.min(1, (currentTime - startTime) / duration);\r\n if (from === to) {\r\n return callback ? callback() : null;\r\n }\r\n setScrollPosition(el, easeFunc(time) * (to - from) + from);\r\n /* prevent scrolling, if already there, or at end */\r\n if (time < 1) {\r\n scroll(from, to, prop, startTime, duration, easeFunc, callback);\r\n }\r\n else if (callback) {\r\n callback();\r\n }\r\n });\r\n };\r\n const currentScrollPosition = getScrollPosition(el);\r\n const scrollProperty = getScrollPropertyByElement(el);\r\n return new Promise(resolve => {\r\n scroll(currentScrollPosition, typeof options.top === 'number'\r\n ? options.top\r\n : currentScrollPosition, scrollProperty, Date.now(), options.duration, getEasing(options.easing), resolve);\r\n });\r\n });\r\n}\r\nfunction scrollIntoView(element, scroller, options) {\r\n validateElement(element);\r\n if (scroller && !(scroller instanceof Element)) {\r\n options = scroller;\r\n scroller = undefined;\r\n }\r\n const { duration, easing } = sanitizeScrollOptions(options);\r\n scroller = scroller || utils.getDocument().body;\r\n let currentContainerScrollYPos = 0;\r\n let elementScrollYPos = element ? element.offsetTop : 0;\r\n const document = utils.getDocument();\r\n // if the container is the document body or document itself, we'll\r\n // need a different set of coordinates for accuracy\r\n if (scroller === document.body || scroller === document.documentElement) {\r\n // using pageYOffset for cross-browser compatibility\r\n currentContainerScrollYPos = window.pageYOffset;\r\n // must add containers scroll y position to ensure an absolute value that does not change\r\n elementScrollYPos =\r\n element.getBoundingClientRect().top + currentContainerScrollYPos;\r\n }\r\n return scrollTo(scroller, {\r\n top: elementScrollYPos,\r\n left: 0,\r\n duration,\r\n easing\r\n });\r\n}\r\nfunction validateElement(element) {\r\n if (element === undefined) {\r\n const errorMsg = 'The element passed to scrollIntoView() was undefined.';\r\n throw new Error(errorMsg);\r\n }\r\n if (!(element instanceof HTMLElement)) {\r\n throw new Error(`The element passed to scrollIntoView() must be a valid element. You passed ${element}.`);\r\n }\r\n}\r\nfunction getScrollPropertyByElement(el) {\r\n const props = {\r\n window: {\r\n y: 'scrollY',\r\n x: 'scrollX'\r\n },\r\n element: {\r\n y: 'scrollTop',\r\n x: 'scrollLeft'\r\n }\r\n };\r\n const axis = 'y';\r\n if (el instanceof Window) {\r\n return props.window[axis];\r\n }\r\n else {\r\n return props.element[axis];\r\n }\r\n}\r\nfunction sanitizeScrollOptions(options = {}) {\r\n if (options.behavior === 'smooth') {\r\n options.easing = 'ease-in-out';\r\n options.duration = 300;\r\n }\r\n if (options.behavior === 'auto') {\r\n options.duration = 0;\r\n options.easing = 'linear';\r\n }\r\n return options;\r\n}\r\nfunction getScrollPosition(el) {\r\n const document = utils.getDocument();\r\n if (el === document.body ||\r\n el === document.documentElement ||\r\n el instanceof Window) {\r\n return document.body.scrollTop || document.documentElement.scrollTop;\r\n }\r\n else {\r\n return el.scrollTop;\r\n }\r\n}\r\nfunction setScrollPosition(el, value) {\r\n const document = utils.getDocument();\r\n if (el === document.body ||\r\n el === document.documentElement ||\r\n el instanceof Window) {\r\n document.body.scrollTop = value;\r\n document.documentElement.scrollTop = value;\r\n }\r\n else {\r\n el.scrollTop = value;\r\n }\r\n}\r\nconst utils = {\r\n // we're really just exporting this so that tests can mock the document.documentElement\r\n getDocument() {\r\n return document;\r\n }\r\n};\r\nconst easingMap = {\r\n linear(t) {\r\n return t;\r\n },\r\n 'ease-in'(t) {\r\n return t * t;\r\n },\r\n 'ease-out'(t) {\r\n return t * (2 - t);\r\n },\r\n 'ease-in-out'(t) {\r\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\r\n }\r\n};\r\nconst getEasing = (easing) => {\r\n const defaultEasing = 'linear';\r\n const easeFunc = easingMap[easing || defaultEasing];\r\n if (!easeFunc) {\r\n const options = Object.keys(easingMap).join(',');\r\n throw new Error(`Scroll error: scroller does not support an easing option of \"${easing}\". Supported options are ${options}`);\r\n }\r\n return easeFunc;\r\n};\n\nexport { easingMap, scrollIntoView, scrollTo, utils };\n","import Handlebars from 'handlebars';\nlet fullScreenLoaderWidget = require('../../../views/widgets/fullScreenLoaderWidget/tmpl/fullScreenLoaderWidget.hbs');\nHandlebars.registerPartial('fullScreenLoaderWidget', fullScreenLoaderWidget);\n\nclass FullScreenLoaderService {\n\tcreate() {\n\t\tlet template = `\n\t\t\t{{> fullScreenLoaderWidget\n\t\t\t\twg=\"fullScreenLoaderWidget\"\n\t\t\t\tns=\"FullScreenLoaderWidget\"\n\t\t\t}}\n\t\t`;\n\t\tlet precompiled = new Function('return ' + Handlebars.precompile(template))();\n\t\tlet fullScreenLoaderWidgetTemplate = Handlebars.template(precompiled);\n\n\t\t$(document.body).append(fullScreenLoaderWidgetTemplate({}));\n\t}\n\n\tdestroy() {\n\t\t$('.fullScreenLoaderWidget').remove();\n\t}\n}\n\nexport let fullScreenLoaderService = new FullScreenLoaderService();\n","var Handlebars = require('/Users/owenli/Documents/workspace/awi-wlc-fe/node_modules/handlebars/runtime.js');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"