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AAC,kBAAkB,GAAG,kBAAkB,CAAC;QAE7C,IAAI,IAAI,CAAC,wBAAwB,EAAE;YAC/B,KAAK,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;SACtD;aAAM;YACH,IAAI,CAAC,kBAAmB,EAAE,CAAC;SAC9B;IACL,CAAC;IAED,wDAAuB,GAAvB;QACI,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;QAC5C,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACrC,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACnC,CAAC;IAED,wDAAuB,GAAvB;QACI,CAAC,CAAC,wBAAwB,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,CAAC,CAAC,yBAAyB;YACvB,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,6BAA6B,CAAC;YACpE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IACL,6BAAC;AAAD,CAAC,AA1ED,IA0EC;AAED,IAAI,iBAAiB,GAAG,IAAI,sBAAsB,EAAE,CAAC","sourcesContent":["declare var StudentUpdate: any;\r\ndeclare var hidePopup: Function;\r\ndeclare var popup: Function;\r\ndeclare var toastr: any;\r\n\r\nclass SecurityQuestionsClass {\r\n\r\n /* Configs */\r\n securityQuestionsEnabled: boolean = false;\r\n randomizedSecurityQuestions: any;\r\n\r\n /* Elements */\r\n last4DigitsMobileNumberElement: HTMLElement | null = null;\r\n postCodeElement: HTMLElement | null = null;\r\n studentYearBirthElement: HTMLElement | null = null;\r\n\r\n customSecurityQuestionsCallback: (Function | null) = null;\r\n loadWizardFunction: Function | null = null;\r\n\r\n selectedSecurityQuestionIndex: number = 0;\r\n clubId: number = 0;\r\n updateInvitation: any;\r\n activeParentEnum: any;\r\n securityQuestionSecurityStamp: string = \"\";\r\n\r\n initialize (updateInvitation: any,\r\n securityStamp: string,\r\n activeParentEnum: any,\r\n securityQuestionsEnabled: boolean,\r\n customSecurityQuestionsCallback: Function) {\r\n\r\n this.updateInvitation = updateInvitation;\r\n this.securityQuestionSecurityStamp = securityStamp;\r\n this.activeParentEnum = activeParentEnum;\r\n this.securityQuestionsEnabled = securityQuestionsEnabled;\r\n this.customSecurityQuestionsCallback = customSecurityQuestionsCallback;\r\n }\r\n\r\n validateSecurityQuestions() {\r\n this.loadWizardFunction!();\r\n }\r\n\r\n validateSecurityQuestionsCallback(data: any) {\r\n //hidePopup(\"#divSecurityQuestions\", \"#popupBackground\");\r\n this.customSecurityQuestionsCallback!(data);\r\n }\r\n\r\n clearDialog(closeSecurityDialog?: boolean) {\r\n $(\"#loader\").hide();\r\n\r\n if (closeSecurityDialog) {\r\n hidePopup(\"#divSecurityQuestions\", \"#popupBackground\");\r\n }\r\n hidePopup('#divDisplayUserAttend', '#popupBackground');\r\n }\r\n\r\n loadOrSkipDialog (loadWizardFunction: Function) {\r\n this.loadWizardFunction = loadWizardFunction;\r\n\r\n if (this.securityQuestionsEnabled) {\r\n popup(\"#divSecurityQuestions\", \"#popupBackground\");\r\n } else {\r\n this.loadWizardFunction!();\r\n }\r\n }\r\n\r\n setNextSecurityQuestion() {\r\n this.clearDialog();\r\n toastr.warning(\"Security Question failed.\");\r\n this.selectedSecurityQuestionIndex++;\r\n this.refreshSecurityQuestion();\r\n }\r\n\r\n refreshSecurityQuestion() {\r\n $(\"[security-question-id]\").hide();\r\n $(\"[security-question-id='\" +\r\n this.randomizedSecurityQuestions[this.selectedSecurityQuestionIndex] +\r\n \"']\").show();\r\n }\r\n}\r\n\r\nvar SecurityQuestions = new SecurityQuestionsClass();"]}