{"version":3,"sources":["app.js","authenticationservice.js","authinterceptorservice.js","usermanualcontroller.js","logtoserver.js","ngEnter.js","ngPwdStrength.js","ngPasswordMatch.js","dataManagementService.js","datamanagementController.js","loginservice.js","logincontroller.js","inviteController.js","usercontroller.js","indexcontroller.js","resetPassword.js","landingController.js","adminLandingController.js","storagemanagementService.js","storagemanagementController.js","internalRegistrationController.js","profileservice.js","profileController.js","userAccountService.js","userAccountController.js","contactUsservice.js","contactUsController.js","userManagementService.js","usermanagementController.js","searchcontroller.js","plotgraphcontroller.js","savedworkspacecontroller.js","assignLicenseController.js","upgradeService.js","upgradeServiceController.js","paymentProcessController.js","paymentDeclineController.js","adminManagementService.js","adminManagementController.js","ngCamelCase.js","ngCaptacha.js","ngSplit.js","updateCCSuccessfulController.js","subscriptionReportService.js","subscriptionReportController.js","common/common.js","common/constants.js","modules/accessOption/accessOptionController.js","modules/directives/ngAffiliation.js","modules/directives/ngDataSetDetails.js","modules/directives/ngDownloadUserReport.js","modules/directives/ngMyDataUpload.js","modules/directives/ngTeamSetup.js","modules/teamManagement/teamManagementController.js","modules/teamManagement/teamManagementService.js","modules/upgradeService/cancelUpdateCCController.js","assets/js/chartData.js","assets/js/chartDataItems.js","assets/js/chartsJS.js","assets/js/chartsJS2.js","assets/js/classie.js","assets/js/clipboard.min.js","assets/js/custom.js","assets/js/dropzone.js","assets/js/index.js","assets/js/intlTelInput.js","assets/js/jquery.visible.min.js","assets/js/jQueryUIScripts.js","assets/js/modernizr.custom.js","assets/js/search.js","assets/js/swipe.js","assets/js/tempchartJS.js","assets/js/textFieldTransition.js","modules/admin/teamManagement/adminTeamManagementController.js","modules/admin/teamManagement/adminTeamManagementService.js","modules/admin/aippTeamRegistration/internalTeamRegistrationController.js","modules/admin/discountCodeManagement/discountCodeManagementController.js","modules/admin/discountCodeManagement/discountCodeManagementService.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACloBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACv4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACj0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACh3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtkFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtuDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3tCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACluBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/EA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5hCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACziBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC36BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtCA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACziCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACh4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"app.js","sourcesContent":["var app = angular.module('myApp', ['ngRoute', 'ui.bootstrap', 'ngCookies', 'logToServer', 'ng.deviceDetector', 'rzModule']);\r\napp.config(['$routeProvider', function ($routeProvider) {\r\n\r\n $routeProvider\r\n .when('/', {\r\n redirectTo: '/home'\r\n })\r\n .when('/paymentcancel', {\r\n templateUrl: '../app/modules/upgradeService/paymentDecline.html',\r\n controller: 'paymentDeclineController'\r\n })\r\n .when('/home', {\r\n templateUrl: '../app/modules/home/home.html',\r\n controller: 'indexController'\r\n })\r\n .when('/invite', {\r\n templateUrl: '../app/modules/invite/invite.html',\r\n controller: 'inviteController'\r\n })\r\n .when('/profile', {\r\n templateUrl: '../app/modules/profile/profile.html',\r\n controller: 'profileController'\r\n })\r\n .when('/passwordResetConfirmation', {\r\n templateUrl: '../app/modules/profile/passwordResetConfirmation.html',\r\n controller: 'inviteController'\r\n })\r\n .when('/landing', {\r\n templateUrl: '../app/modules/landing/landing.html',\r\n controller: 'landingController'\r\n })\r\n .when('/registrationsuccess', {\r\n templateUrl: '../app/modules/login/registrationsuccessful.html',\r\n controller: 'registerController'\r\n })\r\n .when('/admin/storagemanagement', {\r\n templateUrl: '../app/modules/admin/storagemanagement/storagemanagement.html',\r\n controller: 'storagemanagementController'\r\n })\r\n .when('/admin/usermanagement', {\r\n templateUrl: '../app/modules/admin/usermanagement/usermanagement.html',\r\n controller: 'usermanagementController'\r\n })\r\n .when('/admin/landing', {\r\n templateUrl: '../app/modules/admin/landing/landing.html',\r\n controller: 'adminLandingController'\r\n })\r\n .when('/welcome/:userId', {\r\n templateUrl: '../app/modules/welcome/welcome.html',\r\n controller: 'registerController'\r\n })\r\n .when('/datamanagement', {\r\n templateUrl: '../app/modules/datamanagement/datamanagement.html',\r\n controller: 'datamanagementController'\r\n })\r\n .when('/datamanagement/:mode', {\r\n templateUrl: '../app/modules/datamanagement/datamanagement.html',\r\n controller: 'datamanagementController'\r\n })\r\n .when('/search', {\r\n templateUrl: '../app/modules/search/search.html',\r\n controller: 'searchcontroller'\r\n })\r\n .when('/teamManagement', {\r\n templateUrl: '../app/modules/teamManagement/teamManagement.html',\r\n controller: 'teamManagementController'\r\n })\r\n .when('/search/:mode', {\r\n templateUrl: '../app/modules/search/search.html',\r\n controller: 'searchcontroller'\r\n })\r\n //.when('/upgradeService', {\r\n // templateUrl: '../app/modules/upgradeService/upgradeService.html',\r\n // controller: 'upgradeServiceController'\r\n //})\r\n .when('/assignlicensekey', {\r\n templateUrl: '../app/modules/upgradeService/assignLicenceKey.html',\r\n controller: 'assignLicenseController'\r\n })\r\n .when('/thankYou', {\r\n templateUrl: '../app/modules/upgradeService/thankYou.html',\r\n controller: 'thankYouController'\r\n })\r\n .when('/licenseThankYou', {\r\n templateUrl: '../app/modules/upgradeService/licenceThankYou.html'\r\n })\r\n .when('/plotgraph', {\r\n templateUrl: '../app/modules/plotgraph/plotgraph.html',\r\n controller: 'plotgraphcontroller'\r\n })\r\n .when('/plotgraph?workspacedid', {\r\n templateUrl: '../app/modules/plotgraph/plotgraph.html',\r\n controller: 'plotgraphcontroller'\r\n })\r\n .when('/login', {\r\n templateUrl: '../app/modules/login/login.html',\r\n controller: 'registerController'\r\n })\r\n .when('/login/:userId', {\r\n templateUrl: '../app/modules/login/login.html',\r\n controller: 'registerController'\r\n })\r\n .when('/register', {\r\n templateUrl: '../app/modules/login/login.html',\r\n controller: 'registerController'\r\n })\r\n .when('/register/:invitedEmail', {\r\n templateUrl: '../app/modules/login/login.html',\r\n controller: 'registerController'\r\n })\r\n .when('/resetPassword/:userId/:resetCode', {\r\n templateUrl: '../app/modules/resetPassword/resetPassword.html',\r\n controller: 'resetPasswordController'\r\n })\r\n .when('/saveuser', {\r\n templateUrl: '../app/modules/user/saveuser.html',\r\n controller: 'usercontroller'\r\n })\r\n\r\n .when('/usermanual', {\r\n templateUrl: '../app/modules/user/usermanual.html',\r\n controller: 'usermanualcontroller'\r\n })\r\n .when('/savedWorkedSpace', {\r\n templateUrl: '../app/modules/workspace/savedworkspace.html',\r\n controller: 'savedworkspacecontroller'\r\n })\r\n .when('/saveworkspace', {\r\n templateUrl: '../app/modules/workspace/saveworkspace.html',\r\n controller: 'savedworkspacecontroller'\r\n })\r\n //.when('/admin/systemAdmins', {\r\n // templateUrl: '../app/modules/admin/adminManagement/adminManagement.html',\r\n // controller: 'adminManagementController'\r\n //})\r\n //.when('/admin/systemAdmins/:userId', {\r\n // templateUrl: '../app/modules/admin/adminManagement/adminManagement.html',\r\n // controller: 'adminManagementController'\r\n //})\r\n .when('/admin/discountCodeManagement', {\r\n templateUrl: '../app/modules/admin/discountCodeManagement/discountCodeManagement.html',\r\n controller: 'discountCodeManagementController'\r\n })\r\n .when('/subscriptionReport', {\r\n templateUrl: '../app/modules/report/subscriptionReport.html',\r\n controller: 'subscriptionReportController'\r\n })\r\n .when('/admin/teamManagement', {\r\n templateUrl: '../app/modules/admin/teamManagement/teamManagement.html',\r\n controller: 'adminTeamManagementController'\r\n })\r\n .when('/notfound', {\r\n templateUrl: '../app/modules/error/notfound.html',\r\n })\r\n .when('/privacypolicy', {\r\n templateUrl: '../app/modules/privacyPolicy/privacypolicy.html',\r\n })\r\n .when('/legal', {\r\n templateUrl: '../app/modules/privacyPolicy/legal.html',\r\n })\r\n .when('/error', {\r\n templateUrl: '../app/modules/error/sorry.html',\r\n })\r\n .when('/idleTimeout', {\r\n templateUrl: '../app/modules/error/idleTimeout.html',\r\n })\r\n .when('/account', {\r\n templateUrl: '../app/modules/account/userAccount.html',\r\n controller: 'userAccountController'\r\n })\r\n .when('/internal', {\r\n templateUrl: '../app/modules/admin/aippEmployeeRegistration/internalRegistration.html',\r\n controller: 'internalRegistrationController'\r\n })\r\n .when('/internalSuperadmin', {\r\n templateUrl: '../app/modules/admin/aippEmployeeRegistration/internalSuperadminRegistration.html',\r\n controller: 'internalRegistrationController'\r\n })\r\n .when('/internalTeam', {\r\n templateUrl: '../app/modules/admin/aippTeamRegistration/internalTeamRegistration.html',\r\n controller: 'internalTeamRegistrationController'\r\n })\r\n .when('/contactUs', {\r\n templateUrl: '../app/modules/contactUs/contactUs.html',\r\n controller: 'contactUsController'\r\n })\r\n .when('/ccupdatesuccess', {\r\n templateUrl: '../app/modules/upgradeService/UpdateCCSuccessful.html',\r\n controller: 'updateCCController'\r\n })\r\n .when('/ccupdatecancel', {\r\n templateUrl: '../app/modules/upgradeService/UpdateCCInformationError.html',\r\n controller: 'cancelUpdateCCController'\r\n })\r\n .when('/payementError', {\r\n templateUrl: '../app/modules/error/paymentError.html',\r\n })\r\n .when('/accessOption', {\r\n templateUrl: '../app/modules/accessOption/accessOption.html',\r\n controller: 'accessOptionController'\r\n })\r\n .when('/accessOption/:accessType', {\r\n templateUrl: '../app/modules/accessOption/accessOption.html',\r\n controller: 'accessOptionController'\r\n })\r\n .when('/indBulkSubscribe/:accessType', {\r\n templateUrl: '../app/modules/accessOption/bulkIndSubscription.html',\r\n controller: 'indBulkPurchaseController'\r\n })\r\n .when('/partner', {\r\n templateUrl: '../app/modules/partner/partners.html'\r\n })\r\n .otherwise({\r\n redirectTo: '/notfound'\r\n });\r\n}])\r\n.config(['$httpProvider', function ($httpProvider) {\r\n $httpProvider.interceptors.push('authInterceptorService');\r\n $httpProvider.interceptors.push('logToServerInterceptor');\r\n $httpProvider.interceptors.push('noCacheInterceptor');\r\n\r\n if (!$httpProvider.defaults.headers.get) {\r\n $httpProvider.defaults.headers.get = {};\r\n }\r\n\r\n $httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';\r\n $httpProvider.defaults.headers.get['Pragma'] = 'no-cache';\r\n\r\n\r\n}])\r\n.run(['$route', '$rootScope', '$location', '$cookieStore', '$http', '$window', '$cookies', 'progressBarService',\r\n function ($route, $rootScope, $location, $cookieStore, $http, $window, $cookies, progressBarService) {\r\n\r\n var lastDigestRun = new Date();\r\n setInterval(function () {\r\n var now = Date.now();\r\n\r\n if ($cookies.get('TokenInfo') != undefined) {\r\n if (now - lastDigestRun > 30 * 60 * 1000) {\r\n //logout\r\n var cookies = $cookies.getAll();\r\n angular.forEach(cookies, function (v, k) {\r\n $cookies.remove(k);\r\n });\r\n localStorage.clear();\r\n $rootScope.$broadcast('logoutSuccess', 'true');\r\n $location.path('/idleTimeout');\r\n $rootScope.$apply();\r\n }\r\n }\r\n }, 60 * 1000);\r\n\r\n $rootScope.$watch(function () {\r\n lastDigestRun = new Date();\r\n });\r\n\r\n if ($rootScope.globalConfig == null) {\r\n $.ajax({\r\n url: './assets/misc/config.global.json',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\"\r\n }).success(function (data) {\r\n $rootScope.globalConfig = data;\r\n }).error(function (request, status, error) {\r\n console.log(\"error:\" + error)\r\n });\r\n }\r\n\r\n if ($rootScope.buildConfig == null) {\r\n $.ajax({\r\n url: './assets/misc/build.config.json',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\"\r\n }).success(function (data) {\r\n $rootScope.buildConfig = data;\r\n }).error(function (request, status, error) {\r\n console.log(\"error:\" + error)\r\n });\r\n }\r\n\r\n $rootScope.$on('$routeChangeStart', function (scope, next, current) {\r\n $('.modal').modal('hide');\r\n progressBarService.hideProgressBar();\r\n\r\n var tokenInfo = $cookies.get(\"TokenInfo\");\r\n if ((tokenInfo != undefined) && (tokenInfo != null) && (tokenInfo != \"\")) {\r\n tokenInfo = JSON.parse($cookies.get(\"TokenInfo\"));\r\n $.ajaxSetup({\r\n headers: {\r\n 'Authorization': 'Bearer ' + tokenInfo\r\n }\r\n });\r\n }\r\n\r\n if (current != undefined) {\r\n if (next.$$route.originalPath.indexOf(\"accessOption\") <= 0) {\r\n setLocalValue(\"teamPartyID\", '0');\r\n }\r\n }\r\n\r\n if (current != undefined && current.$$route.originalPath.indexOf('teamManagement') > 0) {\r\n setLocalValue(\"origPath\", \"teamManagement\");\r\n } else if (current != undefined && current.$$route.originalPath.indexOf('usermanagement') > 0) {\r\n setLocalValue(\"origPath\", \"usermanagement\");\r\n }\r\n\r\n if (current != undefined && current.$$route.originalPath.indexOf('plotgraph') > 0) {\r\n setLocalValue(\"isRedirectedFromPlotgraph\", true);\r\n } else {\r\n setLocalValue(\"isRedirectedFromPlotgraph\", false);\r\n }\r\n\r\n if ($location.$$path == '/admin/landing' && getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n }\r\n else {\r\n if ($location.$$path == '/home') {\r\n $('#eSpectraTitle').hide();\r\n $('#titleNavBar').removeClass('mheight-40px')\r\n $('#titleNavBar').addClass('mheight-5px')\r\n } else {\r\n $('#eSpectraTitle').show();\r\n $('#titleNavBar').addClass('mheight-40px')\r\n $('#titleNavBar').removeClass('mheight-5px')\r\n }\r\n if (next.$$route.originalPath.indexOf(\"login\") >= 0) {\r\n $rootScope.currentTab = 1;\r\n }\r\n else if (next.$$route.originalPath.indexOf(\"register\") >= 0) {\r\n $rootScope.currentTab = 2;\r\n }\r\n\r\n if ($rootScope.globalConfig != null) {\r\n\r\n progressBarService.showProgressBar();\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n $http({\r\n method: \"GET\",\r\n url: serviceBase + \"underMaintenance\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n if (data == \"1\" && next.$$route.originalPath.indexOf(\"login\") < 0 && getLocalValue('maintenanceFlag') != \"1\") {\r\n var cookies = $cookies.getAll();\r\n angular.forEach(cookies, function (v, k) {\r\n $cookies.remove(k);\r\n });\r\n localStorage.clear();\r\n $window.location.href = '/app/modules/error/' + $rootScope.globalConfig.underMaintenancePage;\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n })\r\n }\r\n }\r\n });\r\n }]);\r\n\r\napp.factory('noCacheInterceptor', function () {\r\n return {\r\n request: function (config) {\r\n\r\n if (config.method == 'GET') {\r\n if (config.url.indexOf('html') == -1) {\r\n var separator = config.url.indexOf('?') === -1 ? '?' : '&';\r\n config.url = config.url + separator + 'noCache=' + new Date().getTime();\r\n }\r\n }\r\n\r\n return config;\r\n }\r\n };\r\n});\r\napp.factory(\"progressBarService\", [\"$timeout\", function ($timeout) {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n\r\n return {\r\n\r\n showProgressBar: function () {\r\n\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) // If Internet Explorer, return version number\r\n {\r\n angular.element(document.getElementsByClassName(\"page-spinnerIE\")).show();\r\n }\r\n else {\r\n angular.element(document.getElementsByClassName(\"page-spinner\")).show();\r\n }\r\n },\r\n\r\n hideProgressBar: function () {\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) // If Internet Explorer, return version number\r\n {\r\n angular.element(document.getElementsByClassName(\"page-spinnerIE\")).hide();\r\n\r\n }\r\n else {\r\n\r\n angular.element(document.getElementsByClassName(\"page-spinner\")).hide();\r\n }\r\n }\r\n };\r\n}])\r\n\r\napp.directive('sliderRange', ['$document', function ($document) {\r\n\r\n // Move slider handle and range line\r\n var moveHandle = function (handle, elem, posX) {\r\n $(elem).find('.handle.' + handle).css(\"left\", posX + '%');\r\n };\r\n var moveRange = function (elem, posMin, posMax) {\r\n $(elem).find('.range').css(\"left\", posMin + '%');\r\n $(elem).find('.range').css(\"width\", posMax - posMin + '%');\r\n };\r\n\r\n return {\r\n template: '
' +\r\n '
' +\r\n '' +\r\n '' +\r\n '
',\r\n replace: true,\r\n restrict: 'E',\r\n scope: {\r\n valueMin: \"=\",\r\n valueMax: \"=\"\r\n },\r\n link: function postLink(scope, element, attrs) {\r\n // Initilization\r\n var dragging = false;\r\n var startPointXMin = 0;\r\n var startPointXMax = 0;\r\n var xPosMin = 0;\r\n var xPosMax = 0;\r\n var settings = {\r\n \"min\": (typeof (attrs.min) !== \"undefined\" ? parseInt(attrs.min, 10) : 0),\r\n \"max\": (typeof (attrs.max) !== \"undefined\" ? parseInt(attrs.max, 10) : 100),\r\n \"step\": (typeof (attrs.step) !== \"undefined\" ? parseInt(attrs.step, 10) : 1)\r\n };\r\n if (typeof (scope.valueMin) == \"undefined\" || scope.valueMin === '')\r\n scope.valueMin = settings.min;\r\n\r\n if (typeof (scope.valueMax) == \"undefined\" || scope.valueMax === '')\r\n scope.valueMax = settings.max;\r\n\r\n // Track changes only from the outside of the directive\r\n scope.$watch('valueMin', function () {\r\n if (dragging) return;\r\n xPosMin = (scope.valueMin - settings.min) / (settings.max - settings.min) * 100;\r\n if (xPosMin < 0) {\r\n xPosMin = 0;\r\n } else if (xPosMin > 100) {\r\n xPosMin = 100;\r\n }\r\n moveHandle(\"min\", element, xPosMin);\r\n moveRange(element, xPosMin, xPosMax);\r\n });\r\n\r\n scope.$watch('valueMax', function () {\r\n if (dragging) return;\r\n xPosMax = (scope.valueMax - settings.min) / (settings.max - settings.min) * 100;\r\n if (xPosMax < 0) {\r\n xPosMax = 0;\r\n } else if (xPosMax > 100) {\r\n xPosMax = 100;\r\n }\r\n moveHandle(\"max\", element, xPosMax);\r\n moveRange(element, xPosMin, xPosMax);\r\n });\r\n\r\n // Real action control is here\r\n scope.mouseDownMin = function ($event) {\r\n dragging = true;\r\n startPointXMin = $event.pageX;\r\n\r\n // Bind to full document, to make move easiery (not to lose focus on y axis)\r\n $document.on('mousemove', function ($event) {\r\n if (!dragging) return;\r\n\r\n //Calculate handle position\r\n var moveDelta = $event.pageX - startPointXMin;\r\n\r\n xPosMin = xPosMin + ((moveDelta / element.outerWidth()) * 100);\r\n if (xPosMin < 0) {\r\n xPosMin = 0;\r\n } else if (xPosMin > xPosMax) {\r\n xPosMin = xPosMax;\r\n } else {\r\n // Prevent generating \"lag\" if moving outside window\r\n startPointXMin = $event.pageX;\r\n }\r\n scope.valueMin = Math.round((((settings.max - settings.min) * (xPosMin / 100)) + settings.min) / settings.step) * settings.step;\r\n scope.$apply();\r\n\r\n // Move the Handle\r\n moveHandle(\"min\", element, xPosMin);\r\n moveRange(element, xPosMin, xPosMax);\r\n });\r\n $document.mouseup(function () {\r\n dragging = false;\r\n $document.unbind('mousemove');\r\n $document.unbind('mousemove');\r\n });\r\n };\r\n\r\n scope.mouseDownMax = function ($event) {\r\n dragging = true;\r\n startPointXMax = $event.pageX;\r\n\r\n // Bind to full document, to make move easiery (not to lose focus on y axis)\r\n $document.on('mousemove', function ($event) {\r\n if (!dragging) return;\r\n\r\n //Calculate handle position\r\n var moveDelta = $event.pageX - startPointXMax;\r\n\r\n xPosMax = xPosMax + ((moveDelta / element.outerWidth()) * 100);\r\n if (xPosMax > 100) {\r\n xPosMax = 100;\r\n } else if (xPosMax < xPosMin) {\r\n xPosMax = xPosMin;\r\n } else {\r\n // Prevent generating \"lag\" if moving outside window\r\n startPointXMax = $event.pageX;\r\n }\r\n scope.valueMax = Math.round((((settings.max - settings.min) * (xPosMax / 100)) + settings.min) / settings.step) * settings.step;\r\n scope.$apply();\r\n\r\n // Move the Handle\r\n moveHandle(\"max\", element, xPosMax);\r\n moveRange(element, xPosMin, xPosMax);\r\n });\r\n\r\n $document.mouseup(function () {\r\n dragging = false;\r\n $document.unbind('mousemove');\r\n $document.unbind('mousemove');\r\n });\r\n };\r\n }\r\n };\r\n}]);","(function () {\r\n 'use strict';\r\n app.service('AuthenticationService', ['$q', '$cookies',\r\n function ($q, $cookies) {\r\n var tokenInfo;\r\n\r\n this.setTokenInfo = function (data) {\r\n tokenInfo = data;\r\n var expireDate = new Date();\r\n expireDate.setHours(expireDate.getHours() + 3);\r\n document.cookie = \"TokenInfo=\" + encodeURI(JSON.stringify(tokenInfo.accessToken)) + \";\" + \"expires=\" + expireDate.toGMTString() + \";SameSite=None;Secure\";\r\n //commented below code and implemented above because after implementing Osano cookie samesite attribute was set as Lax and that was causing issue in payment flow. so used plain javascript to set none\r\n //$cookies.put(\"TokenInfo\", JSON.stringify(tokenInfo.accessToken), { expires: expireDate });\r\n $cookies.put(\"_rtInf\", tokenInfo.refresh_token, { expires: expireDate });\r\n }\r\n\r\n this.getTokenInfo = function () {\r\n if ($cookies.get(\"TokenInfo\") != undefined) {\r\n tokenInfo = JSON.parse($cookies.get(\"TokenInfo\"));\r\n }\r\n else {\r\n tokenInfo = undefined;\r\n }\r\n return tokenInfo;\r\n }\r\n\r\n this.removeToken = function () {\r\n \r\n tokenInfo = null;\r\n var cookies = $cookies.getAll();\r\n angular.forEach(cookies, function (v, k) {\r\n $cookies.remove(k);\r\n });\r\n\r\n localStorage.clear();\r\n cookies = null;\r\n }\r\n\r\n this.init = function () {\r\n if ($cookies.get(\"TokenInfo\") != undefined) {\r\n tokenInfo = JSON.parse($cookies.get(\"TokenInfo\"));\r\n }\r\n }\r\n\r\n this.setHeader = function (http) {\r\n delete http.defaults.headers.common['X-Requested-With'];\r\n if ((tokenInfo != undefined) && (tokenInfo != null) && (tokenInfo != \"\")) {\r\n http.defaults.headers.common['Authorization'] = 'Bearer ' + tokenInfo;\r\n http.defaults.headers.common['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';\r\n }\r\n }\r\n\r\n this.init();\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.factory('authInterceptorService', ['$q', '$location', '$rootScope', '$window', 'AuthenticationService', function ($q, $location, $rootScope, $window, AuthenticationService) {\r\n\r\n var authInterceptorServiceFactory = {};\r\n\r\n var _request = function (config) {\r\n\r\n config.headers = config.headers || {};\r\n\r\n var authData = AuthenticationService.getTokenInfo();\r\n if (authData) {\r\n config.headers.Authorization = 'Bearer ' + authData;\r\n }\r\n\r\n return config;\r\n }\r\n\r\n var _responseError = function (rejection) {\r\n switch (rejection.status) {\r\n case 401:\r\n AuthenticationService.removeToken();\r\n $rootScope.$broadcast('logoutSuccess', 'true');\r\n $location.path('/login');\r\n break;\r\n case 404:\r\n if ($rootScope.globalConfig.notfoundPage == undefined || $rootScope.globalConfig.notfoundPage == null || $rootScope.globalConfig.notfoundPage == '') {\r\n $location.path(\"/notfound\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.notfoundPage;\r\n }\r\n break;\r\n case 503:\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n break;\r\n default:\r\n // $location.path('/error');\r\n break;\r\n }\r\n\r\n return $q.reject(rejection);\r\n }\r\n\r\n authInterceptorServiceFactory.request = _request;\r\n authInterceptorServiceFactory.responseError = _responseError;\r\n\r\n return authInterceptorServiceFactory;\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('usermanualcontroller', ['$scope', 'progressBarService', '$location', '$cookies', '$rootScope', '$timeout', function ($scope, progressBarService, $location, $cookies, $rootScope, $timeout) {\r\n\r\n //if ($rootScope.globalConfig.adminUser == undefined || $rootScope.globalConfig.adminUser != $cookies.get(\"userName\")) {\r\n // $location.path(\"/notfound\");\r\n // return false;\r\n //}\r\n $scope.isAuthenticated = getLocalValue(\"isAuthenticated\");\r\n\r\n\r\n }]);\r\n})();","(function () {\r\n 'use strict'\r\n\r\n // Create new module logToServer with new $log service\r\n angular.module('logToServer', [])\r\n // Make AngularJS do JavaScript logging through JSNLog so we can log to the server by replacing the $log service\r\n .service('$log', function () {\r\n this.log = function (msg) {\r\n JL('Angular').trace(msg);\r\n }\r\n this.debug = function (msg) {\r\n JL('Angular').debug(msg);\r\n }\r\n this.info = function (msg) {\r\n JL('Angular').info(msg);\r\n }\r\n this.warn = function (msg) {\r\n JL('Angular').warn(msg);\r\n }\r\n this.error = function (msg) {\r\n JL('Angular').error(msg);\r\n }\r\n\r\n JL.setOptions({\r\n 'defaultAjaxUrl': 'LogDetails.aspx',\r\n 'requestId': window.location.pathname.split(\"/\").pop()\r\n })\r\n })\r\n // Replace the factory that creates the standard $exceptionHandler service\r\n .factory('$exceptionHandler', function () {\r\n return function (exception, cause) {\r\n JL().log(4000, { 'stack': exception.stack, 'error': exception.message });\r\n //throw exception;\r\n };\r\n })\r\n // Add a factory to create the interceptor to the logToServer module\r\n .factory('logToServerInterceptor', ['$q', function ($q) {\r\n var myInterceptor = {\r\n // The request function is called before the AJAX request is sent\r\n 'request': function (config) {\r\n config.msBeforeAjaxCall = new Date().getTime();\r\n return config;\r\n },\r\n // The response function is called after receiving a good response from the server\r\n 'response': function (response) {\r\n var msAfterAjaxCall = new Date().getTime();\r\n var timeTakenInMs = msAfterAjaxCall - response.config.msBeforeAjaxCall;\r\n JL('Angular.Ajax').info({\r\n url: response.config.url,\r\n timeTakenInMs: timeTakenInMs\r\n });\r\n return response;\r\n },\r\n // The responseError function is called when an error response was received, or when a timeout happened.\r\n 'responseError': function (rejection) {\r\n var errorMessage = \"unknown\";\r\n JL('Angular.Ajax').fatalException({\r\n status: rejection.status,\r\n url: rejection.config.url,\r\n errorMessage: (rejection.data != null) ? rejection.data.error : rejection.data\r\n });\r\n return $q.reject(rejection);\r\n }\r\n };\r\n return myInterceptor;\r\n }]);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n\r\n app.directive('ngEnter', function () {\r\n return function (scope, element, attrs) {\r\n element.bind(\"keydown keypress\", function (event) {\r\n if (event.which === 13) {\r\n scope.$apply(function () {\r\n scope.$eval(attrs.ngEnter);\r\n });\r\n\r\n event.preventDefault();\r\n }\r\n });\r\n };\r\n });\r\n\r\n app.directive('myDatePicker', ['$timeout', function($timeout){\r\n return {\r\n restrict: 'A', \r\n link: function(scope, elem, attrs){\r\n $timeout(function(){ \r\n $(elem).daterangepicker({\r\n singleDatePicker: true,\r\n showDropdowns: true,\r\n minDate: new Date(),\r\n locale: {\r\n format: 'MM-DD-YYYY'\r\n }\r\n });\r\n });\r\n }\r\n };\r\n }]);\r\n\r\n app.directive('dontAllowSpecial', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^[^`~!@#$%\\^&*()_+={}|[\\]\\\\:';\"<>?,./]*$/;\r\n // if view values matches regexp, update model value\r\n if (viewValue.match(reg)) {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n\r\n app.directive('dontAllowSpecialCharsInInst', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^[^`~!@#$%^&*_\\-\\+={}|[\\]:';\"<>?,]*$/;\r\n // if view values matches regexp, update model value\r\n if (viewValue.match(reg)) {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n\r\n app.directive('dontAllowSpecialNumbers', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^[^`~!@#$%\\^&*()_+={}|[\\]\\\\:';\"<>?,./0-9]*$/;\r\n // if view values matches regexp, update model value\r\n if (viewValue.match(reg)) {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n\r\n app.directive('alphabetsWithOnlyOneSpace', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^([a-zA-Z]+\\s?)[a-zA-Z]*$/;\r\n // if view values matches regexp, update model value\r\n if (reg.test(viewValue) || viewValue == \"\") {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n\r\n app.directive('alphabetsWithOnlyOneSpaceHyphen', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^[a-zA-Z](?!.*-.*-.*)(?!.*\\s.*\\s.*)[a-zA-Z- ]*$/;\r\n // if view values matches regexp, update model value\r\n if (reg.test(viewValue) || viewValue == \"\") {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n\r\n app.directive('allowOnlyDigits', function () {\r\n function link(scope, elem, attrs, ngModel) {\r\n ngModel.$parsers.push(function (viewValue) {\r\n var reg = /^\\d*$/;\r\n // if view values matches regexp, update model value\r\n if (viewValue.match(reg) || viewValue == \"\") {\r\n return viewValue;\r\n }\r\n // keep the model value as it is\r\n var transformedValue = ngModel.$modelValue;\r\n ngModel.$setViewValue(transformedValue);\r\n ngModel.$render();\r\n return transformedValue;\r\n });\r\n }\r\n\r\n return {\r\n restrict: 'A',\r\n require: 'ngModel',\r\n link: link\r\n };\r\n });\r\n})();","(function () {\r\n 'use strict';\r\n\r\n app.directive('ngPwdStrength', function () {\r\n return {\r\n replace: false,\r\n restrict: 'EACM',\r\n link: function (scope, iElement, iAttrs) {\r\n\r\n var strength = {\r\n colors: ['#F00', '#F90', '#FF0', '#9F0', '#0F0'],\r\n mesureStrength: function (p) {\r\n\r\n var _force = 0;\r\n var _regex = /[!@#$%^&*()_+=-]/g;\r\n\r\n var _lowerLetters = /[a-z]+/.test(p);\r\n var _upperLetters = /[A-Z]+/.test(p);\r\n var _numbers = /[0-9]+/.test(p);\r\n var _symbols = _regex.test(p);\r\n\r\n var _flags = [_upperLetters, _numbers, _symbols];\r\n var _passedMatches = $.grep(_flags, function (el) { return el === true; }).length;\r\n\r\n _force += 2 * p.length + ((p.length >= 10) ? 1 : 0);\r\n _force += _passedMatches * 10;\r\n\r\n // penality (short password)\r\n //_force = (p.length <= 6) ? Math.min(_force, 10) : _force;\r\n\r\n // penality (poor variety of characters)\r\n _force = (_passedMatches == 0) ? 0 : _force;\r\n _force = (_passedMatches == 1) ? Math.min(_force, 10) : _force;\r\n _force = (_passedMatches == 2) ? Math.min(_force, 20) : _force;\r\n _force = (_passedMatches == 3) ? Math.min(_force, 30) : _force;\r\n _force = (_passedMatches == 3 && p.length >= 7 && p.length < 20) ? 40 : _force;\r\n _force = (_passedMatches == 3 && p.length >= 20) ? 50 : _force;\r\n\r\n return _force;\r\n\r\n },\r\n getColor: function (s) {\r\n\r\n var idx = 0;\r\n if (s <= 10) { idx = 0; }\r\n else if (s <= 20) { idx = 1; }\r\n else if (s <= 30) { idx = 2; }\r\n else if (s <= 40) { idx = 3; }\r\n else { idx = 4; }\r\n\r\n return { idx: idx + 1, col: this.colors[idx] };\r\n\r\n }\r\n };\r\n\r\n scope.$watch(iAttrs.ngPwdStrength, function () {\r\n if (scope.profileData.registeredPassword === undefined || scope.profileData.registeredPassword === '') {\r\n iElement.css({ \"display\": \"none\" });\r\n } else {\r\n var c = strength.getColor(strength.mesureStrength(scope.profileData.registeredPassword));\r\n iElement.css({ \"display\": \"inline\" });\r\n\r\n var inlineMessage = '';\r\n if(c.col=='#F00')\r\n {\r\n inlineMessage = \"Non Complaint\";\r\n }\r\n else if(c.col=='#F90')\r\n {\r\n inlineMessage = \"Very Weak\";\r\n }\r\n else if(c.col=='#FF0')\r\n {\r\n inlineMessage = \"Weak\";\r\n }\r\n else if(c.col=='#9F0')\r\n {\r\n inlineMessage = \"Strong\";\r\n }\r\n else if(c.col=='#0F0')\r\n {\r\n inlineMessage = \"Very Strong\";\r\n }\r\n iElement.children('li')\r\n .css({ \"background\": \"#DDD\" })\r\n .slice(0, c.idx)\r\n .css({ \"background\": c.col });\r\n\r\n iElement.children('b')[0].innerText = inlineMessage;\r\n iElement.children('b').css({ \"color\": \"#016396\" });\r\n\r\n }\r\n });\r\n\r\n },\r\n template: '
  • '\r\n };\r\n\r\n });\r\n})();","var compareTo = function () {\r\n return {\r\n require: \"ngModel\",\r\n scope: {\r\n otherModelValue: \"=compareTo\"\r\n },\r\n link: function (scope, element, attributes, ngModel) {\r\n\r\n ngModel.$validators.compareTo = function (modelValue) {\r\n return modelValue == scope.otherModelValue;\r\n };\r\n\r\n scope.$watch(\"otherModelValue\", function () {\r\n ngModel.$validate();\r\n });\r\n }\r\n };\r\n};\r\n\r\napp.directive(\"compareTo\", compareTo);","(function () {\r\n 'use strict';\r\n app.service('DataManagementService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deviceInfo = [];\r\n var deferred;\r\n\r\n this.getFiles = function (userName) {\r\n\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/datamanagement/data\").then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.uploadFile = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/datamanagement/upload\", data, {\r\n headers: { 'Content-Type': undefined }\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.updateDatamanagement = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/datamanagement/updateDatamanagement\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.deleteFile = function (ids, files) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/datamanagement/delete?ids=\" + ids + \"&files=\" + files)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getObjectByObjectID = function (objectId) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/datamanagement/getObjectByObjectID?objectId=\" + objectId)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getUserStorageCapacityByID = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/datamanagement/getUserStorageCapacity\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","(function () {\r\n //'use strict';\r\n app.controller('datamanagementController', ['DataManagementService', 'storeUploadService', '$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', '$routeParams', function (dataManagementService, storeUploadService, $scope, $location, $cookies, progressBarService, $rootScope, $timeout, $routeParams) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return\r\n }\r\n $scope.showSavebtn = true;\r\n if ($routeParams.share) {\r\n $scope.showsharelegend = true;\r\n }\r\n\r\n if ($routeParams.mode == \"team\") {\r\n $scope.activeTab = 2;\r\n } else {\r\n $scope.activeTab = 1;\r\n }\r\n $scope.SelectedObjectID = 0;\r\n $scope.checkBoxChecked = false;\r\n\r\n $scope.totalNumberRecords = 0;\r\n $scope.currentPage = 1;\r\n $scope.teamCurrentPage = 1;\r\n\r\n $scope.pagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 1,\r\n sortBy: 'eSpectraObjectUploadedDate',\r\n reverse: true\r\n };\r\n\r\n $scope.teamPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 1,\r\n sortBy: 'eSpectraObjectUploadedDate',\r\n reverse: true\r\n };\r\n\r\n $scope.setTab = function (tabNum) {\r\n $scope.checkBoxChecked = false;\r\n $('#chkAll').prop('checked', '');\r\n $('#chkTeamAll').prop('checked', '');\r\n $('.chk').prop('checked', '');\r\n $('.chkTeam').prop('checked', '');\r\n $scope.activeTab = tabNum;\r\n }\r\n $scope.isSet = function (tabNum) {\r\n return $scope.activeTab == tabNum;\r\n }\r\n\r\n $scope.sort = function (sortBy) {\r\n if (sortBy === $scope.pagingInfo.sortBy) {\r\n $scope.pagingInfo.reverse = !$scope.pagingInfo.reverse;\r\n } else {\r\n $scope.pagingInfo.sortBy = sortBy;\r\n $scope.pagingInfo.reverse = false;\r\n }\r\n };\r\n\r\n $scope.teamSort = function (sortBy) {\r\n if (sortBy === $scope.teamPagingInfo.sortBy) {\r\n $scope.teamPagingInfo.reverse = !$scope.teamPagingInfo.reverse;\r\n } else {\r\n $scope.teamPagingInfo.sortBy = sortBy;\r\n $scope.teamPagingInfo.reverse = false;\r\n }\r\n };\r\n\r\n $scope.setPage = function (pageNo) {\r\n $scope.currentPage = pageNo;\r\n };\r\n\r\n $scope.teamSetPage = function (pageNo) {\r\n $scope.teamCurrentPage = pageNo;\r\n };\r\n\r\n //var hideMessage = function () {\r\n\r\n // $scope.isError = false;\r\n // $scope.isSuccess = false;\r\n // $scope.isModalError = false;\r\n // $scope.isModalSuccess = false;\r\n\r\n //}\r\n\r\n $scope.isPrimaryAdmin = getLocalValue('userRole').toLowerCase() == \"primary administrator\" ? true : false;\r\n\r\n $scope.isSysAdmin = getLocalValue('userRole').toLowerCase() == \"sadmin\" ? true : false;\r\n\r\n $('#referencedArticle').keyup(function () {\r\n var _this = $(this);\r\n storeUploadService.validateReferenceArticle(_this, $scope);\r\n })\r\n\r\n $scope.getData = function () {\r\n progressBarService.showProgressBar();\r\n $('#chkAll').prop(\"checked\", '');\r\n $('#chkTeamAll').prop(\"checked\", '');\r\n dataManagementService.getFiles().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n\r\n //$timeout(hideMessage, 10000);\r\n\r\n }\r\n else {\r\n $scope.setTab($scope.activeTab);\r\n $scope.dataManagementDetails = response.data;\r\n\r\n //if ($scope.isSysAdmin) {\r\n // $scope.isTeamMember = $scope.isSysAdmin ? true : $scope.dataManagementDetails.isTeamMember;\r\n //} else if ($scope.isPrimaryAdmin) {\r\n // $scope.isTeamMember = $scope.isPrimaryAdmin ? true : $scope.dataManagementDetails.isTeamMember;\r\n //} else {\r\n $scope.isTeamMember = $scope.isPrimaryAdmin ? true : $scope.dataManagementDetails.isTeamMember;\r\n //}\r\n\r\n\r\n $scope.totalNumberRecords = $scope.dataManagementDetails.dataManagementFiles.length;\r\n $scope.totalNumberTeamRecords = $scope.dataManagementDetails.teamManagementFiles.length;\r\n }\r\n $scope.checkBoxChecked = false;\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n $scope.openUploadModel = function () {\r\n $scope.clear();\r\n $scope.showSavebtn = true;\r\n $scope.isEditData = false;\r\n $scope.validDOI = true;\r\n $scope.isDisableStep1 = false;\r\n $scope.isDisableStep2 = true;\r\n $scope.isDisableStep3 = true;\r\n $('#fileStatus').text('No file selected.');\r\n var name = getLocalValue(\"fullName\").split(' ');\r\n\r\n $('#firstName').val(name[0]);\r\n $('#lastName').val(name[1]);\r\n\r\n $scope.dataManagement.FirstName = name[0];\r\n $scope.dataManagement.LastName = name[1];\r\n\r\n\r\n $('#upload').modal('show');\r\n }\r\n $scope.clear = function () {\r\n $scope.message = '';\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n $scope.modalMessage = '';\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n\r\n $scope.FileSelected = false;\r\n $scope.files = [];\r\n\r\n $scope.isDisableStep1 = false;\r\n $scope.isDisableStep2 = true;\r\n $scope.isDisableStep3 = true;\r\n\r\n $scope.SelectedObjectID = 0;\r\n\r\n $(\"input[type=file]\").val('').clone(true);\r\n $('.border-red').removeClass('border-red');\r\n\r\n $scope.dataManagementValues();\r\n\r\n $scope.dataManagementUpload.$setPristine();\r\n $scope.dataManagementUpload.$setUntouched();\r\n }\r\n\r\n $scope.dataManagementValues = function () {\r\n $scope.dataManagement = {\r\n HostMaterial: \"\",\r\n ChemicalName: \"\",\r\n ReferencedArticle: \"\",\r\n Techinque: \"\",\r\n FirstName: \"\",\r\n LastName: \"\",\r\n Description: \"\",\r\n eSpectraObjectDOI: \"\",\r\n eSpectraObjectCalibration: '',\r\n TotalAllocatedSize: '',\r\n UsedSize: '',\r\n MaximumUploadSize: '',\r\n CasRegistryNumber: ''\r\n }\r\n $scope.dataManagement.FileShare = \"private\";\r\n $scope.dataManagement.isPublic = 0;\r\n }\r\n\r\n $scope.EditData = function (objectData) {\r\n $scope.clear();\r\n $scope.isEditData = true;\r\n $scope.validDOI = true;\r\n\r\n $scope.isDisableStep1 = true;\r\n $scope.isDisableStep2 = true;\r\n $scope.isDisableStep3 = false;\r\n\r\n if ($scope.activeTab == 2) {\r\n $scope.showSavebtn = $scope.isPrimaryAdmin;\r\n } else {\r\n $scope.showSavebtn = true;\r\n }\r\n $scope.eSpectraObjectID = objectData.eSpectraObjectID;\r\n $scope.eSpectraObjectDataSetName = objectData.eSpectraObjectDataSetName;\r\n $scope.dataManagement.HostMaterial = objectData.eSpectraSpecimenHostMaterial;\r\n $scope.dataManagement.ChemicalName = objectData.eSpectraSpecimenChemicalName;\r\n $scope.dataManagement.ReferencedArticle = objectData.eSpectraObjectDOI;\r\n $scope.dataManagement.Techinque = objectData.eSpectraObjectTechnique;\r\n $scope.dataManagement.Description = objectData.eSpectraObjectComment;\r\n $scope.dataManagement.FirstName = objectData.firstName;\r\n $scope.dataManagement.LastName = objectData.lastName;\r\n $scope.dataManagement.eSpectraObjectCalibration = objectData.eSpectraObjectCalibration;\r\n $scope.dataManagement.FileShare = objectData.eSpectraObjectShareType.toLowerCase();\r\n $scope.dataManagement.isPublic = objectData.eSpectraObjectShareType.toLowerCase() == \"public\" ? 1 : 0;\r\n $scope.dataManagement.CasRegistryNumber = objectData.eSpectraCasRegistryNum;\r\n\r\n $('#upload').modal('show');\r\n }\r\n\r\n $scope.getData();\r\n\r\n $scope.onFileShareSelected = function (value) {\r\n storeUploadService.onFileShareSelected(value);\r\n };\r\n\r\n $scope.onFileCitedSelected = function (value) {\r\n var flag = false;\r\n for (var key in $scope.FileCited) {\r\n if ($scope.FileCited[key]) {\r\n flag = true;\r\n }\r\n }\r\n\r\n if (value == 'Y' && $scope.FileCited.Yes == true && $scope.FileCited.No == true) {\r\n $scope.FileCited.No = false;\r\n } else if (value == 'N' && $scope.FileCited.Yes == true && $scope.FileCited.No == true) {\r\n $scope.FileCited.Yes = false;\r\n }\r\n\r\n if (!flag) {\r\n $scope.FileCited = undefined;\r\n }\r\n };\r\n\r\n $scope.ValidateUploadDataManagement = function () {\r\n var returnVal = true;\r\n if (!$scope.isEditData) {\r\n if ($scope.files.length == 0) {\r\n $(\"#browse\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n }\r\n\r\n if (angular.element(\"#chemicalName\").val() != '') {\r\n $(\"#chemicalName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#chemicalName\").focus();\r\n }\r\n $(\"#chemicalName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#technique\").val() != '') {\r\n $(\"#technique\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#technique\").focus();\r\n }\r\n $(\"#technique\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#firstName\").val() != '') {\r\n $(\"#firstName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#firstName\").focus();\r\n }\r\n $(\"#firstName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#lastName\").val() != '') {\r\n $(\"#lastName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.dataManagementUpload.$dirty = true;\r\n this.dataManagementUpload.chemicalName.$dirty = true;\r\n this.dataManagementUpload.technique.$dirty = true;\r\n this.dataManagementUpload.firstName.$dirty = true;\r\n this.dataManagementUpload.lastName.$dirty = true;\r\n }\r\n return returnVal;\r\n }\r\n\r\n $scope.uploadFile = function () {\r\n if ($scope.ValidateUploadDataManagement()) {\r\n progressBarService.showProgressBar();\r\n var data = new FormData();\r\n data.append(\"file\", $scope.files[0]);\r\n data.append(\"eSpectraSpecimenHostMaterial\", $scope.dataManagement.HostMaterial);\r\n data.append(\"eSpectraSpecimenChemicalName\", $scope.dataManagement.ChemicalName);\r\n data.append(\"ReferencedArticle\", $scope.dataManagement.ReferencedArticle);\r\n data.append(\"eSpectraObjectTechnique\", $scope.dataManagement.Techinque);\r\n data.append(\"eSpectraObjectDesc\", $scope.dataManagement.Description);\r\n data.append(\"FirstName\", $scope.dataManagement.FirstName);\r\n data.append(\"LastName\", $scope.dataManagement.LastName);\r\n data.append(\"eSpectraObjectDOI\", $scope.dataManagement.eSpectraObjectDOI);\r\n data.append(\"eSpectraObjectCalibration\", $scope.dataManagement.eSpectraObjectCalibration);\r\n data.append(\"eSpectraObjectShareType\", $scope.dataManagement.FileShare);\r\n data.append(\"eSpectraCasRegistryNum\", $scope.dataManagement.CasRegistryNumber);\r\n\r\n dataManagementService.uploadFile(data).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n progressBarService.hideProgressBar();\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n\r\n //var data = JSON.parse(response.data);\r\n var data = response.data.status;\r\n if (data) {\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.message = GetMessage.dataUploadedSuccessfully;\r\n }\r\n else {\r\n $scope.message = GetMessage.UploadFileIntoElasticSearchFailed;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n\r\n //$timeout(hideMessage, 10000);\r\n $('#upload').modal('toggle');\r\n $('.border-red').removeClass('border-red');\r\n $scope.getData();\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n }\r\n };\r\n\r\n $scope.update = function () {\r\n if ($scope.ValidateUploadDataManagement()) {\r\n progressBarService.showProgressBar();\r\n\r\n data = {\r\n eSpectraObjectID: $scope.eSpectraObjectID,\r\n eSpectraObjectDataSetName: $scope.eSpectraObjectDataSetName,\r\n eSpectraSpecimenHostMaterial: $scope.dataManagement.HostMaterial,\r\n eSpectraSpecimenChemicalName: $scope.dataManagement.ChemicalName,\r\n ReferencedArticle: $scope.dataManagement.ReferencedArticle,\r\n eSpectraObjectTechnique: $scope.dataManagement.Techinque,\r\n eSpectraObjectDesc: $scope.dataManagement.Description,\r\n FirstName: $scope.dataManagement.FirstName,\r\n LastName: $scope.dataManagement.LastName,\r\n //eSpectraLastUpdateUserID: $cookies.get(\"UserId\"),\r\n eSpectraObjectDOI: $scope.dataManagement.ReferencedArticle,\r\n eSpectraObjectCalibration: $scope.dataManagement.eSpectraObjectCalibration,\r\n eSpectraObjectShareType: $scope.dataManagement.FileShare,\r\n eSpectraCasRegistryNum: $scope.dataManagement.CasRegistryNumber\r\n }\r\n\r\n dataManagementService.updateDatamanagement(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n progressBarService.hideProgressBar();\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n\r\n //var data = JSON.parse(response.data);\r\n if (response.data) {\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.message = GetMessage.dataUpdatedSuccessfully;\r\n }\r\n else {\r\n $scope.message = GetMessage.UploadFileIntoElasticSearchFailed;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n\r\n //$timeout(hideMessage, 10000);\r\n $('#upload').modal('toggle');\r\n $('.border-red').removeClass('border-red');\r\n $scope.getData();\r\n\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n };\r\n\r\n $scope.deleteValidate = function (data) {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = '';\r\n $(\"#confirmDelete\").modal('toggle');\r\n $(\"#data-del-no-btn\").focus();\r\n\r\n $scope.objects = [];\r\n $scope.fileNames = [];\r\n\r\n $scope.objects.push(data.eSpectraObjectID);\r\n $scope.fileNames.push(data.eSpectraObjectDataSetName);\r\n }\r\n\r\n $scope.compareValidate = function () {\r\n var checkedCheckboxes;\r\n if ($scope.activeTab == 1) {\r\n checkedCheckboxes = $('.chk:checked');\r\n } else\r\n if ($scope.activeTab == 2) {\r\n checkedCheckboxes = $('.chkTeam:checked');\r\n }\r\n var compareDataList = [];\r\n $rootScope.compareStoreData = [];\r\n if (checkedCheckboxes.length <= 0) {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n $scope.message = GetMessage.selectRecordsToCompare;\r\n return false;\r\n } else {\r\n $.each(checkedCheckboxes, function (index, value) {\r\n var compareDataArray = {\r\n eSpectraObjectID: $(this).val(),\r\n eSpectraObjectDataSetName: $(this).attr('fileName')\r\n }\r\n compareDataList.push(compareDataArray);\r\n });\r\n if (compareDataList.length > 0) {\r\n $rootScope.compareStoreData = compareDataList;\r\n $location.path('/plotgraph');\r\n }\r\n }\r\n }\r\n\r\n $scope.deleteData = function () {\r\n $(\"#confirmDelete\").modal('toggle');\r\n progressBarService.showProgressBar();\r\n\r\n dataManagementService.deleteFile($scope.objects.join(), $scope.fileNames.join()).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n if (response.data) {\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.message = GetMessage.dataDeletedSuccessfully;\r\n }\r\n else {\r\n $scope.message = GetMessage.UploadFileIntoElasticSearchFailed;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n //$timeout(hideMessage, 10000);\r\n $scope.getData();\r\n }\r\n });\r\n $scope.objects = [];\r\n $scope.fileNames = [];\r\n progressBarService.hideProgressBar();\r\n };\r\n\r\n $scope.checkAll = function (event) {\r\n\r\n var isChecked = $(event.currentTarget)[0].checked;\r\n\r\n\r\n if (isChecked) {\r\n $('.chk').prop('checked', 'checked');\r\n } else {\r\n $('.chk').prop('checked', '');\r\n }\r\n\r\n var checkedCheckboxes = $('.chk:checked').length;\r\n\r\n if (checkedCheckboxes > 0) {\r\n $scope.checkBoxChecked = true;\r\n } else {\r\n $scope.checkBoxChecked = false;\r\n }\r\n }\r\n\r\n $scope.checkTeamAll = function (event) {\r\n //if ($scope.dataManagementDetails.teamManagementFiles[0].isAdminSubscribed == 1) {\r\n var isChecked = $(event.currentTarget)[0].checked;\r\n\r\n\r\n if (isChecked) {\r\n $('.chkTeam').prop('checked', 'checked');\r\n } else {\r\n $('.chkTeam').prop('checked', '');\r\n }\r\n\r\n var checkedCheckboxes = $('.chkTeam:checked').length;\r\n\r\n if (checkedCheckboxes > 0) {\r\n $scope.checkBoxChecked = true;\r\n } else {\r\n $scope.checkBoxChecked = false;\r\n }\r\n //}\r\n }\r\n\r\n $scope.checkFile = function () {\r\n var totalLength = $('.chk').length;\r\n var checkedCheckboxes = $('.chk:checked').length;\r\n if (checkedCheckboxes == totalLength) {\r\n $('#chkAll').prop('checked', 'checked');\r\n\r\n } else {\r\n $('#chkAll').prop('checked', '');\r\n\r\n }\r\n\r\n if (checkedCheckboxes > 0) {\r\n $scope.checkBoxChecked = true;\r\n } else {\r\n $scope.checkBoxChecked = false;\r\n }\r\n }\r\n\r\n $scope.checkTeamFile = function () {\r\n //if ($scope.dataManagementDetails.teamManagementFiles[0].isAdminSubscribed == 1) {\r\n var totalLength = $('.chkTeam').length;\r\n var checkedCheckboxes = $('.chkTeam:checked').length;\r\n if (checkedCheckboxes == totalLength) {\r\n $('#chkTeamAll').prop('checked', 'checked');\r\n\r\n } else {\r\n $('#chkTeamAll').prop('checked', '');\r\n\r\n }\r\n\r\n if (checkedCheckboxes > 0) {\r\n $scope.checkBoxChecked = true;\r\n } else {\r\n $scope.checkBoxChecked = false;\r\n }\r\n //}\r\n }\r\n\r\n }]);\r\n\r\n app.service('storeUploadService', [function () {\r\n function isFloat(n) {\r\n return Number(n) === n && n % 1 !== 0;\r\n }\r\n\r\n this.validateReferenceArticle = function (_this, $scope) {\r\n var arr = _this.val().split('/');\r\n if (_this.val() != '') {\r\n if (arr.length > 1) {\r\n if (arr[arr.length - 1] == \"\") {\r\n $scope.dataManagementUpload.referencedArticle.$invalid = true;\r\n $scope.validDOI = false;\r\n } else {\r\n var countLength = 0;\r\n for (var i = 0; i < arr.length; i++) {\r\n if (isFloat(parseFloat(arr[i]))) {\r\n countLength++;\r\n }\r\n }\r\n if (countLength == arr.length) {\r\n $scope.dataManagementUpload.referencedArticle.$valid = true;\r\n $scope.validDOI = true;\r\n } else {\r\n $scope.dataManagementUpload.referencedArticle.$invalid = true;\r\n $scope.validDOI = false;\r\n }\r\n }\r\n } else {\r\n if (isFloat(parseFloat(arr[0]))) {\r\n $scope.dataManagementUpload.referencedArticle.$valid = true;\r\n $scope.validDOI = true;\r\n } else {\r\n $scope.dataManagementUpload.referencedArticle.$invalid = true;\r\n $scope.validDOI = false;\r\n }\r\n }\r\n } else {\r\n $scope.dataManagementUpload.referencedArticle.$valid = true;\r\n $scope.validDOI = true;\r\n }\r\n $scope.$apply();\r\n }\r\n\r\n this.onFileShareSelected = function (value, $scope) {\r\n var flag = false;\r\n for (var key in $scope.FileShare) {\r\n if ($scope.FileShare[key]) {\r\n flag = true;\r\n }\r\n }\r\n if (value == 'Y' && $scope.FileShare.Yes == true && $scope.FileShare.No == true) {\r\n $scope.FileShare.No = false;\r\n } else if (value == 'N' && $scope.FileShare.Yes == true && $scope.FileShare.No == true) {\r\n $scope.FileShare.Yes = false;\r\n }\r\n if (!flag) {\r\n $scope.FileShare = undefined;\r\n }\r\n };\r\n }]);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n app.service('LoginService', ['$http', '$q', 'AuthenticationService', '$rootScope', '$cookies',\r\n function ($http, $q, authenticationService, $rootScope, $cookies) {\r\n var userInfo;\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var loginServiceURL = serviceBase + 'token';\r\n var deviceInfo = [];\r\n var deferred;\r\n\r\n this.setUserDetail = function (userName) {\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/Account/user?username=\" + userName\r\n ).then(function (response) {\r\n if (response != undefined && response.data.message == undefined) {\r\n var expireDate = new Date();\r\n expireDate.setDate(expireDate.getDate() + 1);\r\n\r\n $rootScope.$broadcast('setUserSuccess', { fullName: response.data.eSpectraFirstName + \" \" + response.data.eSpectraLastName });\r\n\r\n setLocalValue(\"premiumType\", response.data.isPremiumType);\r\n setLocalValue(\"isAutorenewed\", response.data.eSpectraRecurringBillFlag);\r\n setLocalValue(\"maintenanceFlag\", response.data.eSpectraByPassMaintFlag);\r\n setLocalValue(\"isPremiumMember\", response.data.isPremiumMember)\r\n setLocalValue(\"userRole\", response.data.eSpectraUserRole);\r\n\r\n setLocalValue(\"fullName\", response.data.eSpectraFirstName.concat( \" \" + response.data.eSpectraLastName));\r\n setLocalValue(\"firstName\", response.data.eSpectraFirstName);\r\n setLocalValue(\"emailId\", response.data.eSpectraEmail);\r\n setLocalValue(\"affiliationName \", response.data.eSpectraPrimaryAffiliationName);\r\n setLocalValue(\"userRoleStatus\", response.data.eSpectraUserRoleStatus); \r\n setLocalValue(\"isKratosData\", response.data.isKratosData); \r\n \r\n $rootScope.isSA = getLocalValue(\"userRole\") == 'SAdmin' ? true : false;\r\n deferred.resolve(response);\r\n }\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.chekUser = function (emailID) {\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/Account/user?username=\" + emailID).then(function (response) {\r\n deferred.resolve(response);\r\n }).catch(function (err) {\r\n deferred.resolve(err);\r\n })\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.sendResetPasswordCode = function (userName) {\r\n\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/Account/resetpasswordcode?username=\" + userName).then(function (response) {\r\n\r\n\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n this.sendemailResetPasswordCodeNotification = function (userRegistrationInfo) {\r\n\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/Account/sendresetpasswordcodenotification?firstName=\" + userRegistrationInfo.eSpectraFirstName + \"&email=\" + userRegistrationInfo.eSpectraEmail + \"&status=\" + userRegistrationInfo.eSpectraPartyStatus + \"&resetCode=\" + userRegistrationInfo.eSpectraPasswordResetCode).then(function (response) {\r\n\r\n\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n\r\n\r\n this.login = function (userName, password) {\r\n\r\n deferred = $q.defer();\r\n var data = \"grant_type=password&username=\" + userName + \"&password=\" + password;\r\n $http.post(loginServiceURL, data, {\r\n headers:\r\n { 'Content-Type': 'application/x-www-form-urlencoded' }\r\n }).then(function (response) {\r\n var o = response;\r\n userInfo = {\r\n accessToken: response.data.access_token,\r\n userName: userName,\r\n refresh_token: response.data.refresh_token\r\n };\r\n authenticationService.setTokenInfo(userInfo);\r\n\r\n setLocalValue(\"isAuthenticated\", \"true\");\r\n setLocalValue(\"userName\", userName);\r\n setLocalValue(\"userRole\", response.data.UserRole);\r\n setLocalValue(\"premiumType\", response.data.premiumType);\r\n setLocalValue(\"isPremiumMember\", JSON.parse(response.data.isPremiumMember))\r\n setLocalValue(\"isAutorenewed\", response.data.isAutorenewed);\r\n setLocalValue(\"maintenanceFlag\", response.data.maintenanceFlag);\r\n setLocalValue(\"isKratosData\", response.data.kratosDataAccess);\r\n $rootScope.hasSharedWorkspaces = response.data.hasSharedWorkspaces;\r\n $rootScope.isFirstLogin = response.data.isFirstLogin;\r\n if ($cookies.get('appCookie') == undefined || $cookies.get('appCookie') == null || $cookies.get('appCookie') == '') {\r\n $rootScope.$broadcast('setFooter', {});\r\n }\r\n $rootScope.$broadcast('loginSuccess', { userName: userName });\r\n deferred.resolve(null);\r\n })\r\n .catch(function (err) {\r\n\r\n deferred.resolve(err.data);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.refreshToken = function () {\r\n deferred = $q.defer();\r\n var token = $cookies.get('_rtInf');\r\n var data = \"grant_type=refresh_token&refresh_token=\" + token + \"&client_id=\";\r\n\r\n $http.post(loginServiceURL, data, {\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded',\r\n }\r\n }).then(function (response) {\r\n var o = response.data;\r\n var userInfo = {\r\n accessToken: o.access_token,\r\n refresh_token: o.refresh_token\r\n };\r\n authenticationService.setTokenInfo(userInfo);\r\n \r\n setLocalValue(\"isAuthenticated\", \"true\");\r\n setLocalValue(\"userRole\", response.data.UserRole);\r\n setLocalValue(\"premiumType\", response.data.premiumType);\r\n setLocalValue(\"isPremiumMember\", JSON.parse(response.data.isPremiumMember))\r\n setLocalValue(\"isAutorenewed\", response.data.isAutorenewed);\r\n setLocalValue(\"maintenanceFlag\", response.data.maintenanceFlag);\r\n $rootScope.hasSharedWorkspaces = response.data.hasSharedWorkspaces;\r\n $rootScope.isFirstLogin = response.data.isFirstLogin;\r\n\r\n deferred.resolve(null);\r\n }).catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.logOut = function () {\r\n authenticationService.removeToken();\r\n $rootScope.$broadcast('logoutSuccess', 'true');\r\n }\r\n\r\n this.getInstituteName = function () {\r\n $http.get(serviceBase + \"api/Account/IPFilter\").then(function (response) {\r\n if (response.status == \"204\") {\r\n $rootScope.$broadcast('getInstituteFail', { error: 'Error' });\r\n }\r\n else if (response.data != undefined) {\r\n var expireDate = new Date();\r\n expireDate.setDate(expireDate.getDate() + 1);\r\n $cookies.put(\"institute\", response.data.institute, { expires: expireDate });\r\n $rootScope.$broadcast('getInstituteSuccess', { institute: response.data.institute, username: response.data.username, password: response.data.password });\r\n }\r\n }, function (err, status) {\r\n $rootScope.$broadcast('getInstituteFail', { error: 'Error' });\r\n });\r\n }\r\n\r\n this.register = function (userRegistrationInfo) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/Register\", userRegistrationInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n //get country list...\r\n\r\n\r\n this.getcountryData = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"country\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n this.sendRegistrationNotification = function (userRegistrationInfo) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/sendRegistrationNotification\", userRegistrationInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n\r\n this.verifyRegistration = function (userId) {\r\n\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/VerifyRegistration/\" + userId)\r\n .then(function (response) {\r\n\r\n deferred.resolve(response);\r\n\r\n })\r\n .catch(function (err) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.resetPassword = function (resetPasswordInfo) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/resetPassword\", resetPasswordInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.Invite = function (memberList, firstName, inviterFirstName, inviterLastName) {\r\n\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/InviteMember?members=\" + memberList.join() + \"&firstName=\" + firstName + \"&inviterFirstName=\" + inviterFirstName + \"&inviterLastName=\" + inviterLastName)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getInstitutions = function () {\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/Account/institutions\", {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(null);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.saveExtraInfo = function (data) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/saveextrainfo\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(null);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getGlobalValues = function () {\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"globalValues\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n return deferred.promise;\r\n }\r\n\r\n this.createInternalUser = function (data) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/internalRegistration\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.createInstitutionAccount = function (data) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/super/institutionAccount\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.sendInternaldRegistrationNotification = function (userRegistrationInfo) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/sendinternalregistrationnotification\", userRegistrationInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n this.sendConfirmationToUserDelete = function (userEmail,userFirstname) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/sendConfirmationToUserDelete?email=\" + userEmail + \"&firstname=\" + userFirstname)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('loginController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', '$compile', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, $compile) {\r\n\r\n $scope.isInvalidIP = false;\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n $scope.loginData = {\r\n userName: localStorage.getItem(\"email\") == null ? \"\" : localStorage.getItem(\"email\"),\r\n password: \"\"\r\n };\r\n\r\n if (localStorage.getItem(\"email\")) {\r\n localStorage.removeItem(\"email\");\r\n }\r\n\r\n //var authData = AuthenticationService.getTokenInfo();\r\n\r\n $scope.isActiveTab = function (tabIndex) {\r\n\r\n return tabIndex === $scope.currentTab\r\n\r\n };\r\n $scope.onClickTab = function (tabIndex) {\r\n\r\n $scope.currentTab = tabIndex;\r\n return tabIndex == $scope.currentTab\r\n };\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.message = '';\r\n }\r\n hideMessage();\r\n $scope.login = function () {\r\n if ($scope.validateLogin()) {\r\n progressBarService.showProgressBar();\r\n loginService.login($scope.loginData.userName, $scope.loginData.password).then(function (response) {\r\n\r\n if (response != null && response.error != undefined) {\r\n\r\n $scope.message = response.error_description;\r\n\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n }\r\n\r\n $scope.validateLogin = function () {\r\n\r\n var returnVal = true;\r\n if (angular.element(\"#userName\").val() != '') {\r\n var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n\r\n if (emailregx.test(angular.element(\"#userName\").val())) {\r\n\r\n $(\"#userName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#userName\").focus();\r\n }\r\n $(\"#userName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#userName\").focus();\r\n }\r\n $(\"#userName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#password\").val() != '') {\r\n\r\n $(\"#password\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#password\").focus();\r\n }\r\n $(\"#password\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.LoginForm.$dirty = true;\r\n this.LoginForm.password.$dirty = true;\r\n this.LoginForm.userName.$dirty = true;\r\n }\r\n return returnVal;\r\n }\r\n\r\n $scope.cancel = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n $scope.loginData = {\r\n userName: \"\",\r\n password: \"\"\r\n };\r\n $scope.message = \"\";\r\n $(\".input-feild-textbox\").siblings(\"label\").removeClass(\"active\");\r\n\r\n }\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n $rootScope.$on('getInstituteFail', function (event, args) {\r\n setTimeout(function myfunction() {\r\n $scope.isInvalidIP = true;\r\n $scope.$apply();\r\n }, 500);\r\n });\r\n\r\n $rootScope.$on('logoutSuccess', function (event, args) {\r\n setTimeout(function myfunction() {\r\n $scope.isInvalidIP = true;\r\n $scope.$apply();\r\n }, 500);\r\n //window.location.reload();\r\n });\r\n }]);\r\n})();\r\n\r\n\r\n(function () {\r\n 'use strict';\r\n app.controller('registerController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', '$http', '$routeParams', 'CommonService', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, $http, $routeParams, commonService) {\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n $scope.selectAffiliation = function () {\r\n $('#affiliationName').val('');\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n $scope.selectedInstitute.InstitutionId = $scope.profileData.InstitutionId;\r\n if (!$scope.selectedInstitute.isAffiliationExists) {\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.InstitutionName;\r\n } else {\r\n if ($scope.profileData.InstitutionName.length == 0) {\r\n $scope.selectedInstitute.isAffiliationExists = false\r\n //$('#affiliationName').removeAttr('disabled');\r\n }\r\n $scope.selectedInstitute.userDefinedAffiliation = $scope.profileData.InstitutionName;\r\n }\r\n\r\n $('#affiliation').modal('show');\r\n }\r\n\r\n $scope.loginData = {\r\n userName: localStorage.getItem(\"email\") == null ? \"\" : localStorage.getItem(\"email\"),\r\n password: \"\"\r\n };\r\n\r\n if (localStorage.getItem(\"email\")) {\r\n localStorage.removeItem(\"email\");\r\n }\r\n\r\n\r\n $scope.isInvalidIP = false;\r\n\r\n $scope.InvitedEmail = $routeParams.invitedEmail;\r\n\r\n $scope.profileDataModel = function () {\r\n $scope.profileData = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n mobileNo: \"\",\r\n workNo: \"\",\r\n emailId: \"\",\r\n registeredPassword: \"\",\r\n eSpectraCountryID: \"\",\r\n retypePassword: \"\",\r\n interest: \"\",\r\n subscription: \"\",\r\n conditionAgree: false,\r\n InstitutionId: \"\",\r\n InstitutionName: \"\",\r\n admin: false\r\n }\r\n }\r\n\r\n $scope.profileDataModel();\r\n\r\n var authData = AuthenticationService.getTokenInfo();\r\n if (authData && $rootScope.currentTab) {\r\n loginService.logOut();\r\n }\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.message = '';\r\n }\r\n\r\n hideMessage();\r\n\r\n $scope.isActiveTab = function (tabIndex) {\r\n return tabIndex === $rootScope.currentTab\r\n };\r\n $scope.onClickTab = function (tabIndex) {\r\n\r\n $rootScope.currentTab = tabIndex;\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n };\r\n\r\n\r\n $scope.login = function () {\r\n\r\n if ($scope.validateLogin()) {\r\n progressBarService.showProgressBar();\r\n loginService.login($scope.loginData.userName, $scope.loginData.password).then(function (response) {\r\n\r\n if (response != null && response.error != undefined) {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.message = response.error_description;\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n }\r\n\r\n $scope.validateLogin = function () {\r\n\r\n var returnVal = true;\r\n if (angular.element(\"#tabuserName\").val() != '') {\r\n var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n\r\n if (emailregx.test(angular.element(\"#tabuserName\").val())) {\r\n\r\n $(\"#tabuserName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#tabuserName\").focus();\r\n }\r\n $(\"#tabuserName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#tabuserName\").focus();\r\n }\r\n $(\"#tabuserName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#tabpassword\").val() != '') {\r\n\r\n $(\"#tabpassword\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(\"#tabpassword\").focus();\r\n }\r\n $(\"#tabpassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.rLoginForm.$dirty = true;\r\n this.rLoginForm.password.$dirty = true;\r\n this.rLoginForm.userName.$dirty = true;\r\n }\r\n return returnVal;\r\n }\r\n\r\n $scope.sendResetPasswordCode = function (fieldName) {\r\n\r\n if ($scope.ValidateUserResetDetails(fieldName)) {\r\n progressBarService.showProgressBar();\r\n\r\n loginService.sendResetPasswordCode(angular.element(\"#\" + fieldName).val()).then(function (response) {\r\n\r\n if (response != null && response.data != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else if (response != null && response.data == null) {\r\n\r\n }\r\n else {\r\n\r\n sendemailResetPasswordCodeNotification(response.data);\r\n $(\"#\" + fieldName).val('');\r\n $(\"#\" + fieldName).siblings(\"label\").removeClass(\"active\");\r\n $scope.message = GetMessage.accountResetSuccessfully(response.data.eSpectraEmail);\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n //$timeout(hideMessage, 10000);\r\n\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n }\r\n\r\n $scope.ValidateUserResetDetails = function (emailElem) {\r\n var returnVal = true;\r\n if (angular.element(\"#\" + emailElem).val() != '') {\r\n var email = angular.element(\"#\" + emailElem).val();\r\n var regExp = /^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$/;\r\n\r\n var isValid = regExp.test(email);\r\n if (isValid) {\r\n //$(\"#\" + emailElem).removeClass(\"border-red\");\r\n $(\"#\" + emailElem).siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n // $(\"#\" + emailElem).addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#\" + emailElem).focus();\r\n }\r\n $(\"#\" + emailElem).siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n // $(\"#\" + emailElem).addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#\" + emailElem).focus();\r\n }\r\n $(\"#\" + emailElem).siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (!$scope.captchaValid) {\r\n return false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.resetForm.$dirty = true;\r\n this.resetForm.resetPassword.$dirty = true;\r\n this.resetForm.confirmPassword.$dirty = true;\r\n }\r\n return returnVal;\r\n\r\n }\r\n\r\n $scope.cancel = function () {\r\n $scope.loginData = {\r\n userName: \"\",\r\n password: \"\"\r\n };\r\n $scope.message = \"\";\r\n $(\".input-feild-textbox\").siblings(\"label\").removeClass(\"active\");\r\n $rootScope.isForgotPassword = false;\r\n $('form#login-nav #userName').val($('form#forgot-nav #forgotEmailId').val())\r\n $(\"form[name=forgotPasswordForm]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n }\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n $scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n\r\n $scope.setAffiliation = function () {\r\n\r\n if ($scope.selectedInstitute.InstitutionName.length > 0 || $scope.selectedInstitute.userDefinedAffiliation.length > 0) {\r\n\r\n $scope.profileData.InstitutionId = parseInt($scope.selectedInstitute.InstitutionId) > 0 ? $scope.selectedInstitute.InstitutionId : 0;\r\n $scope.profileData.InstitutionName = $scope.selectedInstitute.InstitutionName != '' ? $scope.selectedInstitute.InstitutionName : $scope.selectedInstitute.userDefinedAffiliation;\r\n\r\n $scope.profileForm.instituteName.$dirty = true;\r\n $scope.profileForm.instituteName.$touched = true;\r\n $scope.profileForm.instituteName.$valid = true;\r\n $('#institution-info').removeClass('hide');\r\n $('#affiliation').modal('hide');\r\n }\r\n };\r\n\r\n $(\"#instituteName\").on('focusout', function () {\r\n $('#instituteName').typeahead('close');\r\n\r\n $scope.profileData.InstitutionName = $('#instituteName').val();\r\n\r\n $scope.$apply();\r\n return false;\r\n });\r\n\r\n $scope.deSelectInstitute = function () {\r\n $scope.profileData.InstitutionId = 1;\r\n $scope.profileData.InstitutionName = '';\r\n $scope.selectedInstitute.userDefinedAffiliation = '';\r\n $scope.selectedInstitute.isAffiliationExists = false;\r\n //$('#affiliationName').removeAttr('disabled');\r\n $('#institution-info').addClass('hide');\r\n\r\n $scope.profileForm.instituteName.$dirty = false;\r\n $scope.profileForm.instituteName.$untouched = true;\r\n $scope.profileForm.instituteName.$prestine = true;\r\n }\r\n\r\n $scope.clearAffiliationOnBackspace = function () {\r\n if ($('#affiliationName').val().length <= 0 && $scope.profileData.InstitutionName.length <= 0) {\r\n $scope.deSelectInstitute();\r\n }\r\n }\r\n\r\n $scope.register = function () {\r\n if ($scope.ValidateUserDetails()) {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n progressBarService.showProgressBar();\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n var countryCode = $('#countryCode').parent().find('.selected-dial-code').text() + \"-\";\r\n var countryCode1 = $('#countryCode1').parent().find('.selected-dial-code').text() + \"-\";\r\n var userRegistrationInfo = {\r\n eSpectraFirstName: $scope.profileData.firstName,\r\n eSpectraLastName: $scope.profileData.lastName,\r\n eSpectraEmail: $scope.profileData.emailId,\r\n eSpectraCountryID: $scope.profileData.eSpectraCountryID,\r\n eSpectraPassword: $scope.profileData.registeredPassword,\r\n eSpectraPrimaryAreaOfInterest: $scope.profileData.interest,\r\n eSpectraMobilePhoneNum: countryCode + $scope.profileData.mobileNo,\r\n eSpectraWorkPhoneNum: countryCode1 + $scope.profileData.workNo,\r\n eSpectraMktgOptInFlg: $scope.profileData.subscription ? 1 : 0,\r\n eSpectraPrimaryAffiliationID: parseInt($scope.profileData.InstitutionId) > 0 ? $scope.profileData.InstitutionId : 1,\r\n eSpectraPrimaryAffiliationName: $scope.profileData.InstitutionName,\r\n eSpectraIsAdmin: $scope.profileData.admin ? 1 : 0,\r\n InvitedEmail: $scope.InvitedEmail\r\n };\r\n loginService.register(userRegistrationInfo).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n sendRegistrationNotification(userRegistrationInfo);\r\n $rootScope.registrationMessage = GetMessage.accountCreatedSuccessfully(userRegistrationInfo.eSpectraEmail);\r\n $location.path('/registrationsuccess');\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n };\r\n\r\n var sendRegistrationNotification = function (userRegistrationInfo) {\r\n loginService.sendRegistrationNotification(userRegistrationInfo);\r\n };\r\n\r\n\r\n var sendemailResetPasswordCodeNotification = function (userRegistrationInfo) {\r\n loginService.sendemailResetPasswordCodeNotification(userRegistrationInfo);\r\n };\r\n\r\n $scope.validatePassword = function (event) {\r\n commonService.validatePassword($scope, event);\r\n }\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n var firstName = angular.element(\"#firstName\");\r\n var lastName = angular.element(\"#lastName\");\r\n var email = angular.element(\"#inputEmailId\");\r\n var password = angular.element(\"#registerPassword\");\r\n var repeatPassword = angular.element(\"#repeatPassword\");\r\n var country = angular.element(\"#country\");\r\n var countryCode = angular.element(\"#countryCode\");\r\n var countryCode1 = angular.element(\"#countryCode1\");\r\n var rememberMe = angular.element(\"#rememberMe\");\r\n\r\n if (firstName.val() != '') {\r\n firstName.removeClass(\"border-red\");\r\n\r\n var regExp = /^([a-zA-Z]+\\s?)[a-zA-Z]*$/;\r\n var isValid = regExp.test(firstName.val());\r\n if (isValid) {\r\n firstName.removeClass(\"border-red\");\r\n }\r\n else {\r\n if (returnVal) {\r\n firstName.focus();\r\n }\r\n\r\n firstName.addClass(\"border-red\");\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n if (returnVal) {\r\n firstName.focus();\r\n }\r\n\r\n firstName.addClass('border-red');\r\n returnVal = false;\r\n }\r\n\r\n if (lastName.val() != '') {\r\n lastName.removeClass(\"border-red\");\r\n\r\n var regExp = /^[a-zA-Z](?!.*-.*-.*)(?!.*\\s.*\\s.*)[a-zA-Z- ]+$/;\r\n var isValid = regExp.test(lastName.val());\r\n if (isValid) {\r\n lastName.removeClass(\"border-red\");\r\n }\r\n else {\r\n if (returnVal) {\r\n lastName.focus();\r\n }\r\n\r\n lastName.addClass('border-red')\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n if (returnVal) {\r\n lastName.focus();\r\n }\r\n\r\n lastName.addClass('border-red')\r\n returnVal = false;\r\n }\r\n\r\n if (country.val() != 1 && country.val() != \"\") {\r\n country.removeClass(\"border-red\");\r\n\r\n } else {\r\n if (returnVal) {\r\n country.focus();\r\n }\r\n\r\n country.addClass('border-red');\r\n returnVal = false;\r\n };\r\n\r\n if (countryCode.val() != \"\") {\r\n countryCode.removeClass(\"border-red\");\r\n\r\n if (isNaN(countryCode.val())) {\r\n if (returnVal) {\r\n countryCode.focus();\r\n }\r\n\r\n countryCode.addClass(\"border-red\");\r\n countryCode.siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n returnVal = false;\r\n } else {\r\n\r\n if (countryCode.val().length >= 7 && countryCode.val().length <= 13) {\r\n countryCode.removeClass(\"border-red\");\r\n } else {\r\n if (returnVal) {\r\n countryCode.focus();\r\n }\r\n\r\n countryCode.addClass(\"border-red\");\r\n returnVal = false;\r\n };\r\n }\r\n };\r\n\r\n if (countryCode1.val() != \"\") {\r\n countryCode1.removeClass(\"border-red\");\r\n\r\n if (isNaN(countryCode1.val())) {\r\n if (returnVal) {\r\n countryCode1.focus();\r\n }\r\n\r\n countryCode1.addClass(\"border-red\");\r\n countryCode1.siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n returnVal = false;\r\n } else {\r\n\r\n if (countryCode1.val().length >= 7 && countryCode1.val().length <= 13) {\r\n countryCode1.removeClass(\"border-red\");\r\n } else {\r\n if (returnVal) {\r\n countryCode1.focus();\r\n }\r\n\r\n countryCode1.addClass(\"border-red\");\r\n returnVal = false;\r\n };\r\n }\r\n };\r\n\r\n if (email.val() != '') {\r\n var regExp = /^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$/;\r\n\r\n var isValid = regExp.test(email.val());\r\n if (isValid) {\r\n $scope.profileData.emailId = email.val();\r\n email.removeClass(\"border-red\");\r\n email.siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n }\r\n else {\r\n if (returnVal) {\r\n email.focus();\r\n }\r\n\r\n email.addClass('border-red');\r\n email.siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n if (returnVal) {\r\n email.focus();\r\n }\r\n\r\n email.addClass('border-red');\r\n email.siblings('span').find(\"span.error-msg\").removeClass('display-none');\r\n returnVal = false;\r\n }\r\n\r\n if (password.val() != '') {\r\n var regExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()_+=-])[A-Za-z\\d!@#$%^&*()_+=-]{7,20}$/;\r\n var isValid = regExp.test(password.val());\r\n\r\n if (isValid) {\r\n password.removeClass(\"border-red\");\r\n if (password.val() != repeatPassword.val()) {\r\n if (returnVal) {\r\n repeatPassword.focus();\r\n }\r\n\r\n password.addClass('border-red');\r\n repeatPassword.addClass('border-red');\r\n returnVal = false;\r\n }\r\n else {\r\n password.removeClass(\"border-red\");\r\n repeatPassword.removeClass(\"border-red\");\r\n }\r\n } else {\r\n if (returnVal) {\r\n password.focus();\r\n }\r\n\r\n password.addClass('border-red');\r\n returnVal = false;\r\n }\r\n\r\n }\r\n else {\r\n if (returnVal) {\r\n password.focus();\r\n }\r\n\r\n password.addClass('border-red');\r\n returnVal = false;\r\n }\r\n\r\n if ($scope.profileData.subscription.toString() == \"\") {\r\n $($('input[name=\"subRadio\"]')[0]).parent('.subContainer').parent().siblings('div').find(\"span.error-msg\").removeClass('display-none');\r\n if (returnVal) {\r\n $($('input[name=\"subRadio\"]')[0]).focus();\r\n }\r\n returnVal = false;\r\n } else {\r\n $($('input[name=\"subRadio\"]')[0]).parent('.subContainer').parent().siblings('div').find(\"span.error-msg\").addClass('display-none');\r\n };\r\n\r\n if (rememberMe[0].checked == false) {\r\n $scope.profileForm.conditionsAgree.$dirty = true;\r\n\r\n if (returnVal) {\r\n rememberMe.focus();\r\n }\r\n returnVal = false;\r\n } else {\r\n $scope.profileForm.conditionsAgree.$dirty = false;\r\n };\r\n\r\n if (!$scope.captchaValid) {\r\n $('simple-captcha').addClass('border-all-red');\r\n returnVal = false;\r\n } else {\r\n $('simple-captcha').removeClass('border-all-red');\r\n };\r\n\r\n if (!($scope.PasswordLength && $scope.UpperCase && $scope.Numbers && $scope.SpecialCharacters)) {\r\n returnVal = false\r\n }\r\n\r\n if (!returnVal) {\r\n $scope.isSignupFailed = true;\r\n this.profileForm.$dirty = true;\r\n this.profileForm.firstName.$dirty = true;\r\n this.profileForm.lastName.$dirty = true;\r\n this.profileForm.inputEmailId.$dirty = true;\r\n this.profileForm.registerPassword.$dirty = true;\r\n this.profileForm.repeatPassword.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n\r\n $scope.getcountryData = function () {\r\n progressBarService.showProgressBar();\r\n //loginService.getcountryData().then(function (response) {\r\n // if (response != null && response.data.message != undefined) {\r\n // $scope.message = response.data.message;\r\n // $scope.isError = true;\r\n // $scope.isSuccess = false;\r\n // }\r\n // else {\r\n // progressBarService.hideProgressBar();\r\n // $scope.countries = response.data;\r\n // $scope.profileData.eSpectraCountryID = '1';\r\n // }\r\n\r\n // progressBarService.hideProgressBar();\r\n //});\r\n $http({\r\n method: 'Get',\r\n url: serviceBase + \"country\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (data != null && data.message != undefined) {\r\n $scope.message = data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n progressBarService.hideProgressBar();\r\n $scope.countries = data;\r\n $scope.profileData.eSpectraCountryID = '1';\r\n }\r\n progressBarService.hideProgressBar();\r\n }).error(function (data, status) {\r\n })\r\n\r\n }\r\n\r\n $scope.CancelRegistration = function () {\r\n $scope.profileDataModel();\r\n $(\"form[name=profileForm]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n $('#strength').hide();\r\n $scope.selectedInstitute.userDefinedAffiliation = '';\r\n $scope.selectedInstitute.isAffiliationExists = false;\r\n\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n }\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n $scope.reloadCaptcha = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n }\r\n\r\n $scope.checkCountry = function () {\r\n if ($scope.profileData.eSpectraCountryID == 1 && $scope.profileForm.country.$dirty) {\r\n $('#country').removeClass('border-red');\r\n } else {\r\n $('#country').removeClass('border-red');\r\n }\r\n }\r\n\r\n $rootScope.$on('getInstituteFail', function (event, args) {\r\n setTimeout(function myfunction() {\r\n $scope.isInvalidIP = true;\r\n $scope.$apply();\r\n }, 500);\r\n });\r\n\r\n $rootScope.$on('logoutSuccess', function (event, args) {\r\n setTimeout(function myfunction() {\r\n $scope.isInvalidIP = true;\r\n $scope.$apply();\r\n }, 500);\r\n //window.location.reload();\r\n });\r\n\r\n $rootScope.$on('forgotPassword', function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.message = \"\";\r\n });\r\n\r\n if ($routeParams.userId) {\r\n // Registration verification\r\n var userId = $routeParams.userId;\r\n progressBarService.showProgressBar();\r\n $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/Account/VerifyRegistration/\" + userId,\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n $scope.loginData.userName = data;\r\n localStorage.setItem(\"email\", data);\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n\r\n $scope.message = GetMessage.accountVerifiedSuccessfully;\r\n //$timeout(hideMessage, 10000);\r\n //}\r\n progressBarService.hideProgressBar();\r\n }).error(function (data, status) {\r\n //if (status == \"204\") {\r\n //}\r\n if (data != null && data.message != undefined) {\r\n $scope.message = data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n } else {\r\n $scope.getcountryData();\r\n }\r\n\r\n }]);\r\n app.directive('usernameAvailable', function ($timeout, $q, $http, $rootScope) {\r\n return {\r\n restrict: 'AE',\r\n require: 'ngModel',\r\n link: function (scope, elm, attr, model) {\r\n model.$asyncValidators.usernameExists = function () {\r\n\r\n var defer = $q.defer();\r\n $timeout(function () {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n $http.get(serviceBase + \"api/Account/checkuser?username=\" + model.$viewValue).then(function (res) {\r\n\r\n if (res.data) {\r\n elm[0].focus();\r\n }\r\n\r\n model.$setValidity('usernameExists', !res.data);\r\n defer.resolve;\r\n });\r\n\r\n\r\n }, 1000);\r\n return defer.promise;\r\n\r\n };\r\n }\r\n }\r\n });\r\n})();\r\n\r\n\r\n","\r\n(function () {\r\n 'use strict';\r\n app.controller('inviteController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return\r\n }\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.inviteData = [{ emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }];\r\n $scope.user = getLocalValue(\"emailId\");\r\n $scope.isValidUsers = false;\r\n var name = getLocalValue(\"fullName\").split(' ');\r\n $scope.firstName = name[0];\r\n $scope.lastName = name[1];\r\n $scope.isDisabled = true;\r\n\r\n $scope.add = function () {\r\n //$scope.isDisabled = true;\r\n if ($scope.inviteData.length < 10) {\r\n $scope.inviteData.push({ emailID: \"\" });\r\n //$scope.isDisabled = true;\r\n }\r\n //var i, count = 0;\r\n //var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n //for (i = 0; i < $scope.inviteData.length; i++) {\r\n // if ($scope.inviteData[i].emailID != \"\" && $scope.inviteData[i].emailID != undefined) {\r\n // if (emailregx.test($scope.inviteData[i].emailID)) {\r\n // count = count + 1;\r\n // } else {\r\n // count = 0;\r\n // }\r\n // }\r\n //}\r\n //if (count > 0) {\r\n // $scope.isDisabled = false;\r\n //}\r\n }\r\n $scope.remove = function (index) {\r\n $scope.isDisabled = true;\r\n if ($scope.inviteData.length > 1) {\r\n $scope.inviteData.splice(index, 1);\r\n }\r\n var i, count = 0;\r\n var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n for (i = 0; i < $scope.inviteData.length; i++) {\r\n if ($scope.inviteData[i].emailID != \"\" && $scope.inviteData[i].emailID != undefined) {\r\n if (emailregx.test($scope.inviteData[i].emailID)) {\r\n count = count + 1;\r\n $('#inviteUserId' + i).removeClass('border-red');\r\n } else {\r\n count = 0;\r\n $('#inviteUserId' + i).addClass('border-red');\r\n }\r\n }\r\n\r\n if ($scope.inviteData[i].emailID == undefined) {\r\n $('#inviteUserId' + i).addClass('border-red');\r\n }\r\n else {\r\n $('#inviteUserId' + i).removeClass('border-red');\r\n }\r\n }\r\n if (count > 0) {\r\n $scope.isDisabled = false;\r\n\r\n } else {\r\n if ($scope.inviteData.length >= 1) {\r\n $scope.isDisabled = true;\r\n }\r\n }\r\n //$scope.checkInviteEmailID();\r\n }\r\n\r\n var hideMessage = function () {\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n }\r\n\r\n $scope.checkValidEmail = function (e) {\r\n var count = 0, i, emailregx;\r\n emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if ($(e.currentTarget).val() == $scope.user) {\r\n $scope.isDisabled = true;\r\n } else {\r\n $scope.isDisabled = false;\r\n }\r\n\r\n for (i = 0; i < $scope.inviteData.length; i++) {\r\n if ($scope.inviteData[i].emailID == $scope.user) {\r\n $scope.isDisabled = true;\r\n return false;\r\n }\r\n\r\n else if ($scope.inviteData[i].emailID != \"\" && $scope.inviteData[i].emailID != undefined) {\r\n if (emailregx.test($scope.inviteData[i].emailID)) {\r\n\r\n $('#inviteUserId' + i).removeClass('border-red');\r\n count = count + 1;\r\n }\r\n else {\r\n count = 0;\r\n $('#inviteUserId' + i).addClass('border-red');\r\n }\r\n }\r\n\r\n else if ($scope.inviteData[i].emailID == undefined) {\r\n $('#inviteUserId' + i).addClass('border-red');\r\n }\r\n else {\r\n $('#inviteUserId' + i).removeClass('border-red');\r\n }\r\n }\r\n if (count > 0) {\r\n $scope.isDisabled = false;\r\n\r\n } else {\r\n if ($scope.inviteData.length >= 1) {\r\n\r\n $scope.isDisabled = true;\r\n\r\n }\r\n }\r\n //$scope.checkInviteEmailID();\r\n\r\n }\r\n\r\n\r\n\r\n $scope.inviteMember = function () {\r\n //$scope.validateInviteMemmber()\r\n //{\r\n\r\n progressBarService.showProgressBar();\r\n\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n\r\n //var userId = $cookies.get(\"UserId\");\r\n var affiliationName = getLocalValue(\"affiliationName\");\r\n\r\n\r\n\r\n var i, memberList = [];\r\n\r\n for (i = 0; i < $scope.inviteData.length; ++i) {\r\n if ($scope.inviteData[i].emailID.length > 0) {\r\n memberList.push($scope.inviteData[i].emailID);\r\n }\r\n }\r\n\r\n angular.forEach(memberList, function (value, key) {\r\n angular.forEach(memberList, function (value1, key1) {\r\n if (key != key1) {\r\n if (value.toLowerCase() == value1.toLowerCase()) {\r\n memberList.splice(key, 1);\r\n }\r\n }\r\n });\r\n });\r\n\r\n\r\n var firstName = \"\";\r\n loginService.Invite(memberList, firstName, $scope.firstName, $scope.lastName).then(function (response) {\r\n\r\n if (response != null && response.data != undefined) {\r\n if (response.data.count == 0 && response.data.errorMessage.length == 0) {\r\n $scope.message = \"You can send only 10 invites at a time.\"\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n } else if (response.data.errorMessage.length > 0) {\r\n if (response.data.status == 3) {\r\n $scope.message = response.data.errorMessage;\r\n } else {\r\n $scope.message = \"Invitation is already sent to \" + response.data.errorMessage;\r\n }\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.inviteData = [{ emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }];\r\n // $('form[name=\"inviteForm\"]').trigger('reset');\r\n $scope.isDisabled = true;\r\n }\r\n else {\r\n if (response.data.count != 1) {\r\n $scope.message = \"Email has been sent to \" + response.data.count + \" member(s)!\";\r\n } else {\r\n $scope.message = \"Email has been sent to \" + response.data.count + \" member!\";\r\n }\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.inviteData = [{ emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }, { emailID: \"\" }];\r\n // $('form[name=\"inviteForm\"]').trigger('reset');\r\n $scope.isDisabled = true;\r\n //$timeout(hideMessage, 10000);\r\n //to clear captcha value\r\n //$('.numbersOnly').val('');\r\n }\r\n }\r\n else {\r\n $scope.message = GetMessage.ApiError;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n // }\r\n\r\n };\r\n\r\n //$scope.checkInviteEmailID = function () {\r\n // $scope.isValidEmailID = true;\r\n // angular.forEach($scope.inviteData, function (value, key) {\r\n // angular.forEach($scope.inviteData, function (value1, key1) {\r\n // if (key != key1) {\r\n // if (value.emailID == \"\" || value1.emailID == \"\" || value.emailID.toLowerCase() == value1.emailID.toLowerCase()) {\r\n // $scope.isValidEmailID = false;\r\n // }\r\n // } else if ($scope.inviteData.length == 1 && value.emailID != \"\") {\r\n // $scope.isValidEmailID = true;\r\n // }\r\n // });\r\n // });\r\n //}\r\n\r\n\r\n //$scope.validateInviteMemmber = function () {\r\n\r\n // var returnVal = true;\r\n // var isEmailEnter = false;\r\n\r\n // angular.forEach($(\"#CountInput input[type='text']\"), function (value, index) {\r\n // if (angular.element(value).val() != '') {\r\n // var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n // if (emailregx.test(angular.element(value).val())&&!user) {\r\n\r\n // $(value).siblings(\"label\").find(\"span\").fadeOut();\r\n // isEmailEnter = true;\r\n // }\r\n // else {\r\n\r\n // if (returnVal) {\r\n // $(value).focus();\r\n // }\r\n // $(value).siblings(\"label\").find(\"span\").fadeIn();\r\n // returnVal = false;\r\n // }\r\n\r\n // }\r\n // else {\r\n\r\n // if (returnVal && !isEmailEnter) {\r\n // $(value).focus();\r\n // }\r\n // $(value).siblings(\"label\").find(\"span\").fadeIn();\r\n // returnVal = isEmailEnter;\r\n // }\r\n // })\r\n // if (!$scope.captchaValid) {\r\n // return false;\r\n // }\r\n // if (!returnVal) {\r\n\r\n // this.inviteForm.$dirty = true;\r\n // var FieldShellelements, i;\r\n // FieldShellelements = $(\"#CountInput div input\");\r\n // for (i = 0; i < FieldShellelements.length; i++) {\r\n // var inviteUserName = FieldShellelements[0].name;\r\n // this.inviteForm['inviteUserName' + i].$dirty = true;\r\n // };\r\n // }\r\n // return returnVal;\r\n //}\r\n\r\n $scope.getPastedText = function (event, index) {\r\n setTimeout(function () {\r\n $scope.inviteData[index].emailID = $(event.currentTarget).val();\r\n $scope.checkValidEmail(event);\r\n $scope.$apply();\r\n }, 1);\r\n }\r\n\r\n }]);\r\n\r\n})();\r\n\r\n\r\n\r\n","(function () {\r\n 'use strict';\r\n app.controller('usercontroller', ['$scope', 'LoginService', 'progressBarService', '$location', '$cookies', '$rootScope', '$timeout', function ($scope, loginService, progressBarService, $location, $cookies, $rootScope, $timeout) {\r\n\r\n if ($rootScope.globalConfig.adminUser == undefined || $rootScope.globalConfig.adminUser != $cookies.get(\"userName\")) {\r\n $location.path(\"/notfound\");\r\n return false;\r\n }\r\n\r\n $scope.register = function () {\r\n // Validate user details\r\n if ($scope.ValidateUserDetails()) {\r\n progressBarService.showProgressBar();\r\n\r\n\r\n var userRegistrationInfo = {\r\n FirstName: angular.element(\"#txtFirstName\").val(),\r\n LastName: angular.element(\"#txtLastName\").val(),\r\n UserName: angular.element(\"#txtUserName\").val(),\r\n Email: angular.element(\"#txtEmailAddress\").val(),\r\n Password: angular.element(\"#txtPassword\").val(),\r\n ConfirmPassword: angular.element(\"#txtPassword\").val()\r\n };\r\n\r\n loginService.register(userRegistrationInfo).then(function (response) {\r\n if (response != null && response.error != undefined) {\r\n //$scope.message = response.error_description;\r\n alert(\"Error while saving user : \" + response.error_description);\r\n }\r\n else {\r\n $(\"#txtFirstName\").val('');\r\n $(\"#txtFirstName\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#txtLastName\").val('');\r\n $(\"#txtLastName\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#txtUserName\").val('');\r\n $(\"#txtUserName\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#txtEmailAddress\").val('');\r\n $(\"#txtEmailAddress\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#txtPassword\").val('');\r\n $(\"#txtPassword\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#txtConfirmPassword\").val('');\r\n $(\"#txtConfirmPassword\").siblings(\"label\").removeClass(\"active\");\r\n alert(\"User added successfully\");\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n };\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#txtFirstName\").val() != '') {\r\n $(\"#txtFirstName\").removeClass(\"border-red\");\r\n $(\"#txtFirstName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#txtFirstName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtFirstName\").focus();\r\n }\r\n $(\"#txtFirstName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#txtLastName\").val() != '') {\r\n $(\"#txtLastName\").removeClass(\"border-red\");\r\n $(\"#txtLastName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#txtLastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtLastName\").focus();\r\n }\r\n $(\"#txtLastName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#txtUserName\").val() != '') {\r\n $(\"#txtUserName\").removeClass(\"border-red\");\r\n $(\"#txtUserName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#txtUserName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtUserName\").focus();\r\n }\r\n $(\"#txtUserName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#txtEmailAddress\").val() != '') {\r\n var email = angular.element(\"#txtEmailAddress\").val();\r\n var regExp = /^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$/;\r\n\r\n var isValid = regExp.test(email);\r\n if (isValid) {\r\n $(\"#txtEmailAddress\").removeClass(\"border-red\");\r\n $(\"#txtEmailAddress\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#txtEmailAddress\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtEmailAddress\").focus();\r\n }\r\n $(\"#txtEmailAddress\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n $(\"#txtEmailAddress\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtEmailAddress\").focus();\r\n }\r\n $(\"#txtEmailAddress\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#txtPassword\").val() != '') {\r\n $(\"#txtPassword\").removeClass(\"border-red\");\r\n $(\"#txtPassword\").siblings(\"label\").find(\"span\").fadeOut();\r\n\r\n if (angular.element(\"#txtPassword\").val() != angular.element(\"#txtConfirmPassword\").val()) {\r\n $(\"#txtConfirmPassword\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtConfirmPassword\").focus();\r\n }\r\n $(\"#txtConfirmPassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n else {\r\n $(\"#txtConfirmPassword\").removeClass(\"border-red\");\r\n $(\"#txtConfirmPassword\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n }\r\n else {\r\n $(\"#txtPassword\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#txtPassword\").focus();\r\n }\r\n $(\"#txtPassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n $(\".swipe-wrap\").on('focusout', \"#txtFirstName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal == '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n });\r\n $(\".swipe-wrap\").on('keyup', \"#txtFirstName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal != '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n } else {\r\n $(this).addClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").show();\r\n }\r\n });\r\n\r\n $(\".swipe-wrap\").on('focusout', \"#txtLastName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal == '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n });\r\n $(\".swipe-wrap\").on('keyup', \"#txtLastName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal != '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n else {\r\n $(this).addClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").show();\r\n }\r\n });\r\n\r\n $(\".swipe-wrap\").on('focusout', \"#txtUserName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal == '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n });\r\n $(\".swipe-wrap\").on('keyup', \"#txtUserName\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal != '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n else {\r\n $(this).addClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").show();\r\n }\r\n });\r\n\r\n $(\".swipe-wrap\").on('focusout', \"#txtPassword\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal == '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n });\r\n $(\".swipe-wrap\").on('keyup', \"#txtPassword\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal != '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n else {\r\n $(this).addClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").show();\r\n }\r\n });\r\n $(\".swipe-wrap\").on('focusout', \"#txtEmailAddress\", function (e) {\r\n var getVal = $(this).val();\r\n if (getVal == '') {\r\n $(this).removeClass(\"border-red\");\r\n $(this).siblings(\"label\").find(\"span\").hide();\r\n }\r\n });\r\n\r\n\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('indexController', ['$rootScope', '$scope', '$location', '$cookies', 'AuthenticationService', 'LoginService', 'progressBarService', '$route', '$http', function ($rootScope, $scope, $location, $cookies, AuthenticationService, loginService, progressBarService, $route, $http) {\r\n\r\n $scope.logOut = function () {\r\n if ($rootScope.buildConfig.aippSurveyOn) {\r\n $('#survayDetails').appendTo(\"body\").modal('show');\r\n }\r\n else {\r\n loginService.logOut();\r\n $location.path('/home');\r\n }\r\n\r\n }\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n $rootScope.SaveWorkspaceLinkCSS = '';\r\n $scope.closeBrowser = function () {\r\n $('#survayDetails').appendTo(\"body\").modal('show');\r\n\r\n }\r\n\r\n $rootScope.isSA = getLocalValue('userRole') == 'SAdmin';\r\n\r\n $scope.reloadCaptcha = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n }\r\n\r\n $('#survayDetails').on('hide.bs.modal', function () {\r\n loginService.logOut();\r\n $location.path('/home');\r\n });\r\n\r\n $scope.redirectToLanding = function () {\r\n if (getLocalValue('userRole') == 'SAdmin') {\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n $rootScope.SaveWorkspaceLinkCSS = '';\r\n $location.path('admin/landing');\r\n\r\n }\r\n else if (getLocalValue('userRole') == undefined) {\r\n\r\n $location.path('home');\r\n }\r\n else {\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n $rootScope.SaveWorkspaceLinkCSS = '';\r\n $location.path('landing');\r\n }\r\n }\r\n\r\n $scope.isAuthenticated = false;\r\n $scope.fullName = '';\r\n $scope.institute = '';\r\n $rootScope.isSA = getLocalValue('userRole') == 'SAdmin' ? true : false;\r\n $rootScope.isForgotPassword = false;\r\n\r\n $(\"body\").on('click', '.forgotpassword', function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n angular.element(\"#forgotPassword\").click();\r\n });\r\n\r\n $scope.forgotPassword = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n $rootScope.isForgotPassword = true;\r\n $(\"form[name=forgotPasswordForm]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n $rootScope.$broadcast('forgotPassword');\r\n $('form#forgot-nav #forgotEmailId').val($('form#login-nav #userName').val());\r\n };\r\n // loginService.getInstituteName();\r\n $scope.isAutorenewed = false;\r\n\r\n var authData = AuthenticationService.getTokenInfo();\r\n if (authData) {\r\n //$scope.userName = authData.userName;\r\n $scope.isAuthenticated = true;\r\n $scope.fullName = getLocalValue('fullName');\r\n $scope.institute = $cookies.get('institute');\r\n getObjectTechniques();\r\n if ($location.$$path == '/home') {\r\n if (getLocalValue('userRole') == 'SAdmin') {\r\n $location.path('/admin/landing');\r\n } else {\r\n $location.path('/landing');\r\n }\r\n }\r\n }\r\n\r\n $(\".linkToAccessOption\").click(function (e) {\r\n if (authData) {\r\n } else {\r\n if ($location.$$path == '/home') {\r\n $(\"body, html\").animate({\r\n scrollTop: $(\"#accessOptionContainer\").offset().top\r\n }, 600);\r\n }\r\n }\r\n });\r\n\r\n // to avoid multiple events on loginSuccess\r\n var destroyLogin;\r\n\r\n destroyLogin = $scope.$on('loginSuccess', function (event, args) {\r\n\r\n if ($scope.institute == '') {\r\n $scope.userName = args.userName;\r\n $scope.isAuthenticated = true;\r\n $scope.isAutorenewed = getLocalValue('isAutorenewed') === \"1\" ? true : false;\r\n }\r\n getObjectTechniques();\r\n loginService.setUserDetail(args.userName).then(function (response) {\r\n if ($rootScope.urlworkspaceid != null && $rootScope.urlworkspaceid != '' && $rootScope.isFirstLogin == '0') {\r\n $location.path('/plotgraph');\r\n }\r\n else {\r\n $rootScope.urlworkspaceid = null;\r\n if (getLocalValue('userRole') == 'SAdmin') {\r\n\r\n\r\n $location.path('/admin/landing');\r\n } else {\r\n $location.path('/landing');\r\n\r\n }\r\n }\r\n });\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n $scope.$on('logoutSuccess', function (event, args) {\r\n $scope.userName = '';\r\n $scope.isAuthenticated = false;\r\n $scope.fullName = '';\r\n $scope.institute = '';\r\n $scope.isAutorenewed = false;\r\n $scope.teamInfoBanner = undefined;\r\n });\r\n\r\n $scope.$on('setUserSuccess', function (event, args) {\r\n if ($scope.fullName != args.fullName) {\r\n $scope.fullName = args.fullName;\r\n }\r\n });\r\n\r\n $scope.$on('$destroy', function () {\r\n destroyLogin(); // remove listener.\r\n });\r\n\r\n function getObjectTechniques() {\r\n $http({\r\n method: \"GET\",\r\n url: serviceBase + \"getObjectTechniques\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n if (getLocalValue(\"objectTechniques\") == undefined) {\r\n setLocalValue(\"objectTechniques\", data);\r\n }\r\n getTeamInfo();\r\n });\r\n }\r\n\r\n function getTeamInfo() {\r\n $http({\r\n method: \"GET\",\r\n url: serviceBase + \"api/Account/teamInfo\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n $scope.teamInfoBanner = data;\r\n });\r\n }\r\n\r\n $scope.$on('getTeamInfo', function () {\r\n getTeamInfo();\r\n });\r\n\r\n function setFooter() {\r\n progressBarService.showProgressBar();\r\n\r\n $http({\r\n method: \"GET\",\r\n url: serviceBase + \"globalValues\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n\r\n var freeUserSpaceSize = data.loginFreeUserSpaceSize.slice(0, -2);\r\n var premUserSpaceSize = data.loginPremUserSpaceSize.slice(0, -2);\r\n var surveyMonkeyPopupLoadTime = data.surveyMonkeyPopupLoadTime;\r\n\r\n $rootScope.LoginFreeUserSpaceSize = freeUserSpaceSize < '1000' ? freeUserSpaceSize + 'MB' : freeUserSpaceSize / 1000 + 'GB';\r\n $rootScope.LoginPremUserSpaceSize = premUserSpaceSize < '1000' ? premUserSpaceSize + 'MB' : premUserSpaceSize / 1000 + 'GB';\r\n\r\n $rootScope.SurveyMonkeyPopupLoadTime = surveyMonkeyPopupLoadTime;\r\n\r\n setCookie(\"loginFreeUserSpaceSize\", $rootScope.LoginFreeUserSpaceSize, $cookies);\r\n setCookie(\"loginPremUserSpaceSize\", $rootScope.LoginPremUserSpaceSize, $cookies);\r\n setCookie(\"surveyMonkeyPopupLoadTime\", $rootScope.SurveyMonkeyPopupLoadTime, $cookies);\r\n\r\n var monthlyPrice = data.productPackMonthlyPrice.toString().split('.');\r\n if (monthlyPrice.length > 1) {\r\n $rootScope.ProductPackMonthlyPriceInDollar = monthlyPrice[0];\r\n $rootScope.ProductPackMonthlyPriceInCents = monthlyPrice[1];\r\n } else {\r\n $rootScope.ProductPackMonthlyPriceInDollar = monthlyPrice[0];\r\n }\r\n $rootScope.ProductPackYearlyPrice = data.productPackYearlyPrice;\r\n setCookie(\"productPackMonthlyPrice\", data.productPackMonthlyPrice, $cookies);\r\n setCookie(\"productPackYearlyPrice\", data.productPackYearlyPrice, $cookies);\r\n setCookie(\"versionNo\", data.applicationVersionNumber, $cookies);\r\n $rootScope.applicationVersionNo = data.applicationVersionNumber;\r\n $('#copyRightYear').text(new Date().getFullYear());\r\n $('#appVersion strong').html(getCookie(\"versionNo\", $cookies));\r\n\r\n progressBarService.hideProgressBar();\r\n })\r\n }\r\n\r\n $scope.$on('setFooter', function () {\r\n setFooter(); \r\n });\r\n\r\n if (getCookie(\"versionNo\", $cookies) === undefined || getCookie(\"versionNo\", $cookies) == \"\" || getCookie(\"versionNo\", $cookies) == null) {//($cookies.get(\"versionNo\") === undefined || $cookies.get(\"versionNo\") == \"\" || $cookies.get(\"versionNo\") == null) {\r\n setFooter();\r\n } else {\r\n $rootScope.LoginFreeUserSpaceSize = getCookie(\"loginFreeUserSpaceSize\", $cookies);\r\n $rootScope.LoginPremUserSpaceSize = getCookie(\"loginPremUserSpaceSize\", $cookies);\r\n\r\n var monthlyPrice = getCookie(\"productPackMonthlyPrice\", $cookies).toString().split('.');\r\n if (monthlyPrice.length > 1) {\r\n $rootScope.ProductPackMonthlyPriceInDollar = monthlyPrice[0];\r\n $rootScope.ProductPackMonthlyPriceInCents = monthlyPrice[1];\r\n } else {\r\n $rootScope.ProductPackMonthlyPriceInDollar = monthlyPrice[0];\r\n }\r\n\r\n $rootScope.ProductPackYearlyPrice = getCookie(\"productPackYearlyPrice\", $cookies);\r\n $('#copyRightYear').text(new Date().getFullYear());\r\n $('#appVersion strong').html(getCookie(\"versionNo\", $cookies));\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('resetPasswordController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', '$routeParams', 'CommonService', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, $routeParams, commonService) {\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n\r\n $scope.registrationData = {\r\n emailId: \"\",\r\n registeredPassword: \"\",\r\n resetCode: \"\",\r\n confirmPassword: \"\"\r\n }\r\n var hideMessage = function () {\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n }\r\n\r\n $scope.validatePassword = function (event) {\r\n commonService.validatePassword($scope, event);\r\n }\r\n\r\n $scope.resetPassword = function () {\r\n // Validate user details\r\n if ($scope.ValidateUserDetails()) {\r\n progressBarService.showProgressBar();\r\n\r\n var resetPasswordInfo = {\r\n eSpectraEmail: $routeParams.userId,\r\n eSpectraPassword: angular.element(\"#resetPassword\").val(),\r\n eSpectraPasswordResetCode: $routeParams.resetCode\r\n };\r\n\r\n loginService.resetPassword(resetPasswordInfo).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n \r\n localStorage.setItem(\"email\", response.data);\r\n $scope.message = GetMessage.passwordChangedSuccessfully;\r\n $('form[name=\"resetForm\"]').trigger('reset');\r\n $('#strength').hide();\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n //$timeout(hideMessage, 10000);\r\n\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n };\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#resetPassword\").val() != '') {\r\n var password = angular.element(\"#resetPassword\").val();\r\n var regExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()_+=-])[A-Za-z\\d!@#$%^&*()_+=-]{7,20}$/;\r\n\r\n var isValid = regExp.test(password);\r\n if (isValid) {\r\n $(\"#resetPassword\").removeClass(\"border-red\");\r\n $(\"#resetPassword\").siblings(\"label\").find(\"span\").fadeOut();\r\n } else {\r\n //$(\"#resetPassword\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#resetPassword\").focus();\r\n }\r\n $(\"#resetPassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#resetPassword\").val() != angular.element(\"#confirmPassword\").val()) {\r\n //$(\"#confirmPassword\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#confirmPassword\").focus();\r\n }\r\n $(\"#confirmPassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n else {\r\n $(\"#confirmPassword\").removeClass(\"border-red\");\r\n $(\"#confirmPassword\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n }\r\n else {\r\n //$(\"#resetPassword\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#resetPassword\").focus();\r\n }\r\n $(\"#resetPassword\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.reseresetForm.resetPassword.$dirty = true;\r\n this.reseresetForm.confirmPassword.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('landingController', ['$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', '$routeParams', 'LoginService', function ($scope, $location, $cookies, progressBarService, $rootScope, $timeout, $routeParams, loginService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') == 'SAdmin') {\r\n $location.path('/login');\r\n return\r\n }\r\n $scope.ispremiumUser = getLocalValue('isPremiumMember')\r\n $scope.isPrimaryAdmin = getLocalValue('userRole').toLowerCase() == \"primary administrator\" ? true : false;\r\n $scope.SurveyMonkeyPopupLoadTime = getCookie(\"surveyMonkeyPopupLoadTime\", $cookies)\r\n \r\n $scope.popupExtraInfo = function () {\r\n if ($rootScope.isFirstLogin == '1') {\r\n $('#extraInfo').modal({ backdrop: 'static', keyboard: false });\r\n //$rootScope.isFirstLogin = '0';\r\n }\r\n }\r\n\r\n \r\n\r\n $scope.dataModel = {\r\n currentPosition: \"\",\r\n industry: \"\",\r\n interest: \"\",\r\n peerReviewerYes: 0,\r\n currentProject: \"\",\r\n maxInterestLength: 100\r\n }\r\n\r\n var hideMessage = function () {\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.modalMessage = '';\r\n }\r\n\r\n\r\n $rootScope.$broadcast('getTeamInfo', {});\r\n\r\n $scope.submitData = function () {\r\n //var peerReviewerFlag = $('#yes')[0].checked ? 1 : 0;\r\n\r\n var data = {\r\n eSpectraProfessionalTitle: $scope.dataModel.currentPosition,\r\n eSpectraPrimaryAreaOfInterest: $scope.dataModel.interest,\r\n eSpectraLatestProject: $scope.dataModel.currentProject,\r\n eSpectraPrimaryIndustry: $scope.dataModel.industry,\r\n // eSpectraSSSPeerReviewerFlag: peerReviewerFlag,\r\n //eSpectraPersonID: $cookies.get('UserId')\r\n };\r\n\r\n loginService.saveExtraInfo(data).then(function (response) {\r\n if (response == null) {\r\n //$('#extraInfo').modal('hide');\r\n //if ($rootScope.hasSharedWorkspaces == '1') {\r\n // $location.path('/savedWorkedSpace');\r\n //}\r\n $scope.hideModal();\r\n }\r\n else {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n });\r\n }\r\n\r\n $scope.hideModal = function () {\r\n $('#extraInfo').modal('hide');\r\n if ($rootScope.hasSharedWorkspaces == '1') {\r\n $location.path('/savedWorkedSpace');\r\n } else {\r\n $rootScope.isFirstLogin = '0';\r\n }\r\n }\r\n\r\n $scope.popupExtraInfo();\r\n\r\n if ($rootScope.buildConfig.surveyMonkeyAfterLogin) {\r\n $timeout(function () {\r\n (function (t, e, s, o) { var n, c, l; t.SMCX = t.SMCX || [], e.getElementById(o) || (n = e.getElementsByTagName(s), c = n[n.length - 1], l = e.createElement(s), l.type = \"text/javascript\", l.async = !0, l.id = o, l.src = \"https://widget.surveymonkey.com/collect/website/js/tRaiETqnLgj758hTBazgd_2BNHLyIwmuFE7cezwkskiixLls5pSrhPm15gxny5PVsU.js\", c.parentNode.insertBefore(l, c)) })(window, document, \"script\", \"smcx-sdk\");\r\n }, $scope.SurveyMonkeyPopupLoadTime);\r\n }\r\n \r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('adminLandingController', ['$scope', '$location', '$cookies', '$route', function ($scope, $location, $cookies, $route) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return;\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.service('storagemanagementService', ['$http', '$q', '$rootScope','$cookies',\r\n function ($http, $q, $rootScope, $cookies) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deviceInfo = [];\r\n var deferred;\r\n \r\n this.getStorageDetails = function (data) {\r\n \r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/super/storagedata\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n this.saveStorageDetails = function (data) {\r\n\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/super/updateStorageCapacity?partyId=\" + data.eSpectraSubmitPersonID + \"&capacity=\" + data.size, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getStorageDetailsReport = function (data) {\r\n\r\n var searchByPremium = data.searchByPremium == true ? 2 : '-1';\r\n var searchByRestricted = data.searchByRestricted == true ? 1 : '-1';\r\n var searchByFree = data.searchByFree == true ? 0 : '-1';\r\n var sortDirection = data.reverse == true ? 'desc' : 'asc';\r\n var searchByIndividualAccount = data.searchByIndividualAccount ? '1' : '0';\r\n var searchByInstitutionAccount = data.searchByInstitutionAccount ? '1' : '0';\r\n var searchByAdministrator = data.searchByAdministrator ? '1' : '0';\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/super/storagedatareport?searchByName=\" + data.searchByName + \"&searchByEmail=\" + data.searchByEmail + \"&searchByInstitutionName=\" + data.searchByInstitutionName + \"&searchByPremium=\" + searchByPremium + \"&searchByRestricted=\" + searchByRestricted + \"&searchByFree=\" + searchByFree + \"&sortBy=\" + data.sortBy + \"&reverse=\" + sortDirection + \"&searchByAdministrator=\" + searchByAdministrator + \"&searchByInstitutionAccount=\" + searchByInstitutionAccount+ \"&searchByIndividualAccount=\" + searchByIndividualAccount, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getinvitedUserDetail = function (data) {\r\n\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/super/invitedUserDetails/\" + data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('storagemanagementController', ['storagemanagementService', '$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', '$routeParams', function (storagemanagementService, $scope, $location, $cookies, progressBarService, $rootScope, $timeout, $routeParams) {\r\n\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return\r\n }\r\n\r\n $scope.active = true;\r\n $scope.active1 = true;\r\n $scope.tab = 1;\r\n\r\n //$scope.setTab = function (newTab) {\r\n\r\n // $scope.tab = newTab;\r\n //};\r\n\r\n $scope.isSet = function (tabNum) {\r\n\r\n return $scope.tab === tabNum;\r\n };\r\n\r\n $scope.filter = {\r\n eSpectraEmail: \"\",\r\n affiliationName: \"\",\r\n eSpectraFullName: \"\"\r\n };\r\n\r\n $scope.storageManagementValues = function () {\r\n $scope.searchByUser = {\r\n sortBy: '',\r\n reverse: false,\r\n currentPage: 1,\r\n itemsPerPage: 10,\r\n searchByName: \"\",\r\n searchByEmail: \"\",\r\n searchByPremium: true,\r\n searchByRestricted: true,\r\n searchByFree: true,\r\n searchByInstitutionName: '',\r\n totalRecords: 0,\r\n searchByAdministrator: true,\r\n searchByIndividualAccount: true,\r\n searchByInstitutionAccount: true\r\n }\r\n\r\n\r\n $scope.searchByInstitute = {\r\n sortBy: '',\r\n reverse: false,\r\n currentPage: 1,\r\n itemsPerPage: 10,\r\n searchByName: \"\",\r\n searchByEmail: \"\",\r\n searchByPremium: true,\r\n searchByRestricted: true,\r\n searchByFree: true,\r\n isAffiliation: 1,\r\n totalRecords: 0\r\n }\r\n }\r\n\r\n $scope.storageManagementValues();\r\n\r\n $scope.clearData = function () {\r\n $scope.storageManagementValues();\r\n $scope.storageDetailsAffiliation = [];\r\n $scope.storageDetails = [];\r\n }\r\n\r\n $scope.setPage = function (currentPage) {\r\n\r\n $scope.searchByUser.currentPage = currentPage;\r\n $scope.getStorageDetails($scope.searchByUser);\r\n }\r\n $scope.setInstitutePage = function (currentPage) {\r\n\r\n $scope.searchByInstitute.currentPage = currentPage;\r\n $scope.getStorageDetails($scope.searchByInstitute);\r\n }\r\n $scope.sort = function (sortBy, byAffiliation) {\r\n if ($scope.searchByUser.totalRecords < 1 && byAffiliation == 0) {\r\n return false;\r\n }\r\n else if ($scope.searchByInstitute.totalRecords < 1 && byAffiliation == 1) {\r\n\r\n return false;\r\n }\r\n $scope.searchByUser.sortBy = sortBy;\r\n $scope.searchByUser.reverse = !$scope.searchByUser.reverse;\r\n $scope.searchByUser.currentPage = 1;\r\n //$scope.searchByUser.isAffiliation = byAffiliation;\r\n $scope.getStorageDetails($scope.searchByUser);\r\n\r\n };\r\n $scope.getStorageDetails = function (data) {\r\n $scope.message = '';\r\n progressBarService.showProgressBar();\r\n\r\n var search = {\r\n eSpectraLastName: data.searchByName,\r\n eSpectraEmail: data.searchByEmail,\r\n eSpectraPrimaryAffiliationName: data.searchByInstitutionName,\r\n Restricted: data.searchByRestricted == true ? 1 : '-1',\r\n Free: data.searchByFree == true ? 0 : '-1',\r\n PremiumType: data.searchByPremium == true ? 2 : '-1',\r\n PageNo: data.currentPage,\r\n SortBy: data.sortBy,\r\n Reverse: data.reverse == true ? 'desc' : 'asc',\r\n ItemsPerPage: data.itemsPerPage,\r\n Administrator: data.searchByAdministrator ? '1' : '0',\r\n IndividualAccount: data.searchByIndividualAccount ? '1' : '0',\r\n InstitutionAccount: data.searchByInstitutionAccount ? '1' : '0'\r\n };\r\n\r\n storagemanagementService.getStorageDetails(search).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.storageDetails = [];\r\n $scope.searchByUser.totalRecords = 0;\r\n $scope.message = response.data.message;\r\n }\r\n else {\r\n angular.forEach(response.data.dataManagementDetails, function (value1, i) {\r\n\r\n response.data.dataManagementDetails[i].editable = false;\r\n if (response.data.dataManagementDetails[i].totalAllocatedSize.indexOf('MB') > -1) {\r\n response.data.dataManagementDetails[i].unit = 'MB';\r\n response.data.dataManagementDetails[i].size = response.data.dataManagementDetails[i].totalAllocatedSize.replace('MB', '');\r\n }\r\n else if (response.data.dataManagementDetails[i].totalAllocatedSize.indexOf('GB') > -1) {\r\n response.data.dataManagementDetails[i].unit = 'GB';\r\n response.data.dataManagementDetails[i].size = response.data.dataManagementDetails[i].totalAllocatedSize.replace('GB', '');\r\n }\r\n\r\n });\r\n\r\n //if (data.isAffiliation == 1) {\r\n\r\n // $scope.storageDetailsAffiliation = response.data.dataManagementDetails;\r\n // $scope.searchByInstitute.totalRecords = response.data.totalRecords;\r\n //}\r\n //else \r\n //if (data.isAffiliation == 0) {\r\n $scope.storageDetails = response.data.dataManagementDetails;\r\n $scope.searchByUser.totalRecords = response.data.totalRecords;\r\n //}\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n if ($rootScope.eSpectraUserAnalyticsEmailID != undefined) {\r\n $scope.searchByUser.searchByEmail = $rootScope.eSpectraUserAnalyticsEmailID;\r\n $scope.getStorageDetails($scope.searchByUser);\r\n }\r\n\r\n\r\n $scope.numberOfPages = function () {\r\n return Math.ceil($scope.invitedDetails.length / $scope.invitationPageInfo.pageSize);\r\n }\r\n\r\n $scope.getDetailsOfInvitationsSent = function (data) {\r\n $scope.invitationPageInfo = {\r\n currentPage: 0,\r\n pageSize: 5\r\n }\r\n $scope.modalMessage = '';\r\n $scope.isModalError = false;\r\n progressBarService.showProgressBar();\r\n storagemanagementService.getinvitedUserDetail(data.eSpectraSubmitPersonID).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $('#DetailsOfInvitation').modal('show');\r\n }\r\n else {\r\n $scope.invitedDetails = response.data;\r\n $scope.numberOfPages();\r\n $('#DetailsOfInvitation').modal('show');\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n $scope.editAffiliationStorage = function (index) {\r\n\r\n $scope.storageDetailsAffiliation[index].editable = !$scope.storageDetailsAffiliation[index].editable;\r\n }\r\n\r\n\r\n $scope.saveStorageDetails = function (index) {\r\n\r\n var data = $scope.storageDetailsAffiliation[index];\r\n\r\n var usedSize;\r\n\r\n if (data.usedSize.indexOf('MB') > -1) {\r\n usedSize = data.usedSize.substr(0, data.usedSize.length - 2);\r\n }\r\n else {\r\n usedSize = data.usedSize;\r\n }\r\n\r\n if (usedSize > data.size) {\r\n $scope.frmAffiliationStorage['updateInstStorage' + index].$invalid = true;\r\n $('#updateInstStorage' + index).addClass('border-red');\r\n return;\r\n }\r\n\r\n progressBarService.showProgressBar();\r\n\r\n storagemanagementService.saveStorageDetails(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n }\r\n else {\r\n\r\n $scope.editAffiliationStorage(index);\r\n $scope.storageDetailsAffiliation[index].totalAllocatedSize = data.size + data.unit;\r\n\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n\r\n $scope.editIndividualStorage = function (index) {\r\n\r\n $scope.storageDetails[index].editable = !$scope.storageDetails[index].editable;\r\n }\r\n\r\n\r\n $scope.saveStorageIndividualDetails = function (index) {\r\n\r\n var data = $scope.storageDetails[index];\r\n var usedSize;\r\n\r\n if (data.usedSize.indexOf('MB') > -1) {\r\n usedSize = data.usedSize.substr(0, data.usedSize.length - 2);\r\n }\r\n else {\r\n usedSize = data.usedSize;\r\n }\r\n\r\n if (usedSize > data.size) {\r\n $scope.frmIndividualStorage['updateIndStorage' + index].$invalid = true;\r\n $('#updateIndStorage' + index).addClass('border-red');\r\n return;\r\n }\r\n\r\n progressBarService.showProgressBar();\r\n\r\n storagemanagementService.saveStorageDetails(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n }\r\n else {\r\n\r\n $scope.editIndividualStorage(index);\r\n $scope.storageDetails[index].totalAllocatedSize = data.size + data.unit;\r\n\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n $scope.onKeyPress = function (event, data) {\r\n if (event.keyCode == 13) {\r\n $scope.getStorageDetails(data);\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n $scope.displayDownloadReportPopup = function () {\r\n $scope.abbreviatedReport = true;\r\n $scope.fullReport = false;\r\n $('#downloadReportDialog').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n //$scope.exportReportData = function () {\r\n\r\n // progressBarService.showProgressBar();\r\n // var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n // today = new Date();\r\n // dd = today.getDate();\r\n // mm = today.getMonth() + 1; //January is 0!\r\n\r\n // yyyy = today.getFullYear();\r\n // if (dd < 10) {\r\n // dd = '0' + dd;\r\n // }\r\n // if (mm < 10) {\r\n // mm = '0' + mm;\r\n // }\r\n // currentDate = mm + '/' + dd + '/' + yyyy;\r\n\r\n // storagemanagementService.getStorageDetailsReport($scope.searchByUser).then(function (response) {\r\n // if (response != null && response.data.message != undefined) {\r\n // $scope.message = response.data.message;\r\n // $scope.isError = true;\r\n // $scope.isSuccess = false;\r\n // //$timeout(hideMessage, 10000);\r\n // }\r\n // else {\r\n // var csv = convertArrayOfObjectsToCSV({\r\n // data: response.data.dataManagementDetailsExport\r\n // });\r\n\r\n // BlobDownloadCSV('UserAnalyticsReport_' + currentDate + '.csv', csv)\r\n\r\n // }\r\n\r\n // progressBarService.hideProgressBar();\r\n // });\r\n //}\r\n\r\n\r\n //function convertArrayOfObjectsToCSV(args) {\r\n\r\n // var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n // data = args.data || null;\r\n // if (data == null || !data.length) {\r\n // return null;\r\n // }\r\n\r\n // columnDelimiter = args.columnDelimiter || ',';\r\n // lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n\r\n // keys = Object.keys(data[0]).slice(1);\r\n\r\n // headers = [\"Email Address\",\r\n // \"Name\",\r\n // \"Affiliation\",\r\n // \"Capacity Available\",\r\n // \"Capacity Used\",\r\n // \"No. Of Files\",\r\n // \"User Type\",\r\n // \"Role Type\",\r\n // \"Create Date\",\r\n // \"Start Date\",\r\n // \"End Date\"]\r\n\r\n // result = 'Report Name' + columnDelimiter + \"User Unalytics Report\" + lineDelimiter;\r\n\r\n // result += headers.join(columnDelimiter);\r\n // result += lineDelimiter;\r\n\r\n // data.forEach(function (item) {\r\n\r\n // ctr = 0;\r\n // keys.forEach(function (key) {\r\n // if (ctr > 0) result += columnDelimiter;\r\n\r\n // result += item[key];\r\n // ctr++;\r\n // });\r\n // result += lineDelimiter;\r\n // });\r\n\r\n // return result;\r\n //}\r\n\r\n }]);\r\n})();\r\napp.filter('startFrom', function () {\r\n return function (input, start) {\r\n start = +start; //parse to int\r\n return input.slice(start);\r\n }\r\n});","'use strict';\r\napp.controller('internalRegistrationController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', '$http', '$routeParams', 'CommonService', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, $http, $routeParams, commonService) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return\r\n }\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.origPath = getLocalValue('origPath');\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n var Clear = function () {\r\n $scope.profileDataModel();\r\n $('.border-red').removeClass('border-red');\r\n\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n }\r\n\r\n $scope.profileDataModel = function () {\r\n $scope.profileData = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n emailId: \"\",\r\n InstitutionId: \"\",\r\n InstitutionName: \"\",\r\n admin: false,\r\n startDate: '',\r\n subscription: 'month',\r\n isKratosData: false\r\n }\r\n }\r\n\r\n $scope.reloadDatePicker = function () {\r\n $('.daterangepickerInp').daterangepicker({\r\n singleDatePicker: true,\r\n showDropdowns: true,\r\n minDate: new Date(),\r\n locale: {\r\n format: 'MM-DD-YYYY'\r\n }\r\n });\r\n }\r\n $scope.reloadDatePicker();\r\n\r\n $scope.profileDataModel();\r\n\r\n //$scope.disableSearchInstitute = function (e) {\r\n // if ($(e.currentTarget).prop('checked')) {\r\n // $('#affiliationName').attr('disabled', 'disabled');\r\n // } else {\r\n // $('#affiliationName').removeAttr('disabled');\r\n // }\r\n // $('#affiliationName').val('');\r\n // $scope.searchAffiliation = \"\";\r\n // $scope.selectedInstitute.InstitutionName = \"\";\r\n // $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n //}\r\n\r\n $scope.selectAffiliation = function () {\r\n $('#affiliationName').val('');\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n $scope.selectedInstitute.InstitutionId = $scope.profileData.InstitutionId;\r\n if (!$scope.selectedInstitute.isAffiliationExists) {\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.InstitutionName;\r\n } else {\r\n if ($scope.profileData.InstitutionName.length == 0) {\r\n $scope.selectedInstitute.isAffiliationExists = false\r\n //$('#affiliationName').removeAttr('disabled');\r\n }\r\n $scope.selectedInstitute.userDefinedAffiliation = $scope.profileData.InstitutionName;\r\n }\r\n\r\n $('#affiliation').modal('show');\r\n }\r\n\r\n //var institutions = new Bloodhound({\r\n // datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),\r\n // queryTokenizer: Bloodhound.tokenizers.whitespace,\r\n // remote: {\r\n // url: serviceBase + 'api/Account/institutions?query=%QUERY',\r\n // prepare: function (query, settings) {\r\n // settings.beforeSend = (function () {\r\n // $('.autopopulate-spinner').show();\r\n // $scope.selectedInstitute.userDefinedAffiliation = query;\r\n // if ($scope.profileData.admin && $scope.profileData.InstitutionName == '') {\r\n // $scope.profileForm.instituteName.$dirty = true;\r\n // $scope.profileForm.instituteName.$invalid = true;\r\n // }\r\n // else {\r\n // $scope.profileForm.instituteName.$dirty = true;\r\n // $scope.profileForm.instituteName.$valid = true;\r\n // }\r\n // $scope.$apply();\r\n // })();\r\n // return $.extend(settings, {\r\n // url: settings.url.replace('%QUERY', encodeURIComponent(query)),\r\n // error: function (jqxhr, textStatus, errorThrown) {\r\n\r\n // $('.autopopulate-spinner').hide();\r\n // },\r\n // success: function (data, textStatus, jqxhr) {\r\n // }\r\n // });\r\n // },\r\n // clearRemoteCache: function clearRemoteCache() {\r\n // this.transport && Transport.resetCache();\r\n // },\r\n // filter: function (institutions) {\r\n // $('.autopopulate-spinner').hide();\r\n // return $.map(institutions, function (institution) {\r\n // return {\r\n // value: institution.institutionName,\r\n // institutionCity: institution.institutionCity,\r\n // institutionState: institution.institutionState,\r\n // institutionMstrID: institution.institutionMstrID,\r\n // institutionCountryCode: institution.institutionCountryCode\r\n // };\r\n // });\r\n // }\r\n // }\r\n //});\r\n\r\n //// Initialize the Bloodhound suggestion engine\r\n //institutions.initialize();\r\n\r\n //// Instantiate the Typeahead UI\r\n\r\n //$(\"#affiliationName\").typeahead({\r\n // hint: false,\r\n // highlight: true,\r\n // minLength: 3\r\n //},\r\n //{\r\n // displayKey: 'value',\r\n // minLength: 3,\r\n // limit: 10,\r\n // dupChecker: true,\r\n // source: institutions.ttAdapter(),\r\n // templates: {\r\n // suggestion: function (data) {\r\n // return \"
    \" + data.value + \", \" + data.institutionCity + \", \" + data.institutionState + \", \" + data.institutionCountryCode + \"
    \";\r\n // },\r\n // empty: [\r\n // '
    ',\r\n // '
    No Items Found
    ',\r\n // '
    '\r\n // ].join('\\n')\r\n // }\r\n //}).bind('typeahead:selected', function (obj, datum, name) {\r\n\r\n // $scope.selectedInstitute.InstitutionId = datum.institutionMstrID\r\n // $scope.selectedInstitute.InstitutionName = datum.value;\r\n // $scope.selectedInstitute.isAffiliationExists = true;\r\n // $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n // $scope.$apply();\r\n // return false;\r\n //});\r\n\r\n $scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n\r\n //$scope.setAffiliation = function () {\r\n\r\n // if ($scope.selectedInstitute.InstitutionName.length > 0 || $scope.selectedInstitute.userDefinedAffiliation.length > 0) {\r\n\r\n // $scope.profileData.InstitutionId = parseInt($scope.selectedInstitute.InstitutionId) > 0 ? $scope.selectedInstitute.InstitutionId : 0;\r\n // $scope.profileData.InstitutionName = $scope.selectedInstitute.InstitutionName != '' ? $scope.selectedInstitute.InstitutionName : $scope.selectedInstitute.userDefinedAffiliation;\r\n\r\n // $scope.profileForm.instituteName.$dirty = true;\r\n // $scope.profileForm.instituteName.$touched = true;\r\n // $scope.profileForm.instituteName.$valid = true;\r\n // $('#institution-info').removeClass('hide');\r\n // $('#affiliation').modal('hide');\r\n // }\r\n //};\r\n\r\n $(\"#instituteName\").on('focusout', function () {\r\n $('#instituteName').typeahead('close');\r\n\r\n $scope.profileData.InstitutionName = $('#instituteName').val();\r\n\r\n $scope.$apply();\r\n return false;\r\n });\r\n\r\n //$scope.deSelectInstitute = function () {\r\n // $scope.profileData.InstitutionId = 1;\r\n // $scope.profileData.InstitutionName = '';\r\n // $scope.selectedInstitute.userDefinedAffiliation = '';\r\n // $scope.selectedInstitute.isAffiliationExists = false;\r\n // //$('#affiliationName').removeAttr('disabled');\r\n // $('#institution-info').addClass('hide');\r\n\r\n // $scope.profileForm.instituteName.$dirty = false;\r\n // $scope.profileForm.instituteName.$untouched = true;\r\n // $scope.profileForm.instituteName.$prestine = true;\r\n //}\r\n\r\n //$scope.clearAffiliationOnBackspace = function () {\r\n // if ($('#affiliationName').val().length <= 0 && $scope.profileData.InstitutionName.length <= 0) {\r\n // $scope.deSelectInstitute();\r\n // }\r\n //}\r\n\r\n $scope.createUser = function () {\r\n if ($scope.ValidateUserDetails()) {\r\n progressBarService.showProgressBar();\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n var userRegistrationInfo = {\r\n eSpectraFirstName: $scope.profileData.firstName,\r\n eSpectraLastName: $scope.profileData.lastName,\r\n eSpectraEmail: $scope.profileData.emailId,\r\n eSpectraPrimaryAffiliationID: parseInt($scope.profileData.InstitutionId) > 0 ? $scope.profileData.InstitutionId : 1,\r\n eSpectraPrimaryAffiliationName: $scope.profileData.InstitutionName,\r\n eSpectraIsAdmin: $scope.profileData.admin ? 1 : 0,\r\n eSpectraOrderStartDate: $scope.profileData.startDate,\r\n userSubscriptionType: $scope.profileData.subscription,\r\n isKratosData: $scope.profileData.isKratosData ? 1 : 0\r\n };\r\n loginService.createInternalUser(userRegistrationInfo).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.message = \"User account has been created successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n sendInternalRegistrationNotification(response.data);\r\n $scope.profileDataModel();\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n };\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#lastName\").val() != '') {\r\n $(\"#lastName\").removeClass(\"border-red\");\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n var regExp = /^[a-zA-Z](?!.*-.*-.*)(?!.*\\s.*\\s.*)[a-zA-Z- ]+$/;\r\n var isValid = regExp.test(angular.element(\"#lastName\").val());\r\n if (isValid) {\r\n $(\"#lastName\").removeClass(\"border-red\");\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n }\r\n else {\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.profileForm.lastName.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n var sendInternalRegistrationNotification = function (userRegistrationInfo) {\r\n loginService.sendInternaldRegistrationNotification(userRegistrationInfo);\r\n };\r\n\r\n $scope.validatePassword = function (event) {\r\n commonService.validatePassword($scope, event);\r\n }\r\n\r\n $scope.CancelRegistration = function () {\r\n $scope.profileDataModel();\r\n $(\"form[name=profileForm]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n $('#strength').hide();\r\n $scope.selectedInstitute.userDefinedAffiliation = '';\r\n $scope.selectedInstitute.isAffiliationExists = false;\r\n\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n }\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n $scope.reloadCaptcha = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n }\r\n\r\n $scope.createSuperadmin = function () {\r\n if ($scope.ValidateUserDetails()) {\r\n progressBarService.showProgressBar();\r\n var currentDate = new Date();\r\n //currentDate = currentDate.getDate() + \"-\" + (currentDate.getMonth() + 1) + \"-\" + currentDate.getFullYear();\r\n var userRegistrationInfo = {\r\n eSpectraFirstName: $scope.profileData.firstName,\r\n eSpectraLastName: $scope.profileData.lastName,\r\n eSpectraEmail: $scope.profileData.emailId,\r\n eSpectraOrderStartDate: currentDate,\r\n userSubscriptionType: \"Unlimited\",\r\n eSpectraIsSuperadmin: 1,\r\n isKratosData: 1\r\n };\r\n loginService.createInternalUser(userRegistrationInfo).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.message = \"System administrator account has been created successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n sendInternalRegistrationNotification(response.data);\r\n $scope.profileDataModel();\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n }\r\n\r\n}]);\r\n","(function () {\r\n 'use strict';\r\n app.service('profileservice', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deviceInfo = [];\r\n var deferred;\r\n\r\n\r\n\r\n this.getprofileData = function (username) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/Account/user?username=\" + username)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getUserSubPackPurchaseDetails = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/Account/userSubPackPurchaseDetails\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getcountryData= function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"country\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getstateData = function (AipCountryID,AipCountryCode) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"state?AipCountryID=\" + AipCountryID + \"&AipCountryCode=\" + AipCountryCode)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n\r\n \r\n this.saveProfileData = function (userRegistrationInfo) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/saveprofile\", userRegistrationInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n \r\n this.deactivateAccount = function () {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/deactivateAccount\", {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.deleteRecords = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/deleteRecords\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.resetPassword = function (resetPasswordInfo) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/profile_changePassword\", resetPasswordInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getUpdateCCSignature = function () {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/subscription/getSignatureToUpdateCCDetails/\", {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.turnOnRecurringSubscription = function (data) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/subscription/turnOnRecurringSubscription/\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","(function () {\r\n //'use strict';\r\n app.controller('profileController', ['$filter', '$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', 'profileservice', '$route', 'LoginService', 'CommonService', 'UpgradeService', 'PaymentConfService', function ($filter, $scope, $location, $cookies, progressBarService, $rootScope, $timeout, profileservice, $route, loginService, commonService, upgradeService, paymentConfService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n $scope.isAutorenewal = 1;\r\n\r\n if ($cookies.get('_trns') != undefined) {\r\n\r\n progressBarService.showProgressBar();\r\n\r\n var data = $cookies.get('_trns');\r\n $cookies.remove('_trns', { path: '/' });\r\n\r\n paymentConfService.confirmPayment($scope, data, \"p\");\r\n\r\n } else {\r\n $cookies.remove('_trns', { path: '/' });\r\n }\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.currentPage = 0;\r\n $scope.pageSize = 10;\r\n $scope.isValidZipCode = true;\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = '';\r\n\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.modalMessage = '';\r\n }\r\n $scope.isEdited = false;\r\n $scope.disableProfile = function (flag) {\r\n $scope.disableFirstName = flag;\r\n $scope.disableLastName = flag;\r\n $scope.disableprofessionaltitle = flag;\r\n $scope.disableAreaOfInterest = flag;\r\n $scope.disablemobileNo = flag;\r\n $scope.disableWorkPhoneNum = flag;\r\n $scope.disableAffiliationName = flag;\r\n $scope.disableAdmin = flag;\r\n $scope.disableeSpectraEmail = flag;\r\n $scope.disabletermcodition = flag;\r\n $scope.disableInfoFlag = flag;\r\n $scope.disablePassword = flag;\r\n $scope.disableLatestProject = flag;\r\n $scope.disablePrimaryIndustry = flag;\r\n $scope.disableselectAffiliationName = flag;\r\n $scope.disableAddrs1 = flag;\r\n $scope.disableAddrs2 = flag;\r\n $scope.disableCity = flag;\r\n $scope.disableState = flag;\r\n $scope.disableCountry = flag;\r\n $scope.disableZipCode = flag;\r\n $scope.SSSPeerReviewerFlag = flag;\r\n //$scope.isprofileDisable = flag;\r\n $scope.btnUpdate = flag;\r\n $scope.btnCancel = flag;\r\n $scope.disableAutorenewal = flag;\r\n $scope.disableMktgOptInFlg = flag;\r\n flag ? $('.clearAffiliation').addClass('hide') : $('.clearAffiliation').removeClass('hide');\r\n\r\n }\r\n $scope.disableProfile(true);\r\n\r\n $scope.cancelProfile = function () {\r\n $location.path('profile');\r\n $route.reload();\r\n }\r\n\r\n $scope.viewProfile = \"View Profile\";\r\n\r\n $scope.editProfile = function () {\r\n $('.selected-flag ').removeClass('disable');\r\n //$scope.isprofileDisable = false;\r\n\r\n $scope.btnUpdate = false;\r\n $scope.btnCancel = false;\r\n\r\n $('.clearAffiliation').addClass('hide');\r\n\r\n if ($scope.profileData.eSpectraPrimaryAffiliationName.length > 0) {\r\n $scope.disableselectAffiliationName = true;\r\n $('.clearAffiliation').removeClass('hide');\r\n }\r\n $('.administrator').hide();\r\n $('.administrator1').show();\r\n $scope.disableProfile(false);\r\n\r\n $scope.disableeSpectraEmail = true;\r\n $scope.disablePurchaseBtn = true;\r\n $scope.disableAffiliationName = $scope.profileData.isTeamMember == 1 ? true : false;\r\n $scope.disableselectAffiliationName = $scope.profileData.isTeamMember == 1 ? true : false;\r\n $scope.viewProfile = \"Edit Profile\";\r\n $scope.btnEdit = true;\r\n\r\n var UserRoleStatus = getLocalValue(\"userRoleStatus\");\r\n if (UserRoleStatus != 'active' && UserRoleStatus != \"\") {\r\n $scope.pending = \"(Pending Approval)\";\r\n $('.administrator').show();\r\n $('.administrator1').hide()\r\n }\r\n if (UserRoleStatus.toLowerCase() == 'active') {\r\n $('.administrator').show();\r\n $('.administrator1').hide()\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.selectAffiliation = function () {\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n $scope.selectedInstitute.InstitutionId = $scope.profileData.InstitutionId;\r\n if (!$scope.selectedInstitute.isAffiliationExists) {\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n } else {\r\n if ($scope.profileData.eSpectraPrimaryAffiliationName.length == 0) {\r\n $scope.selectedInstitute.isAffiliationExists = false\r\n //$('#affiliationName').removeAttr('disabled');\r\n }\r\n //$scope.selectedInstitute.userDefinedAffiliation = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n }\r\n\r\n $('#affiliation').modal('show');\r\n }\r\n\r\n $scope.validatePassword = function (event) {\r\n commonService.validatePassword($scope, event);\r\n }\r\n\r\n $scope.profileDataModel = function () {\r\n $scope.profileData = {\r\n eSpectraLastUpdateUserID: \"\",\r\n eSpectraFirstName: \"\",\r\n eSpectraLastName: \"\",\r\n eSpectraMobilePhoneNum: \"\",\r\n eSpectraStreetAddrs1: \"\",\r\n eSpectraStreetAddrs2: \"\",\r\n eSpectraCity: \"\",\r\n eSpectraCountryID: \"\",\r\n eSpectraPrimaryIndustry: \"\",\r\n eSpectraLatestProject: \"\",\r\n eSpectraSSSPeerReviewerFlag: \"\",\r\n eSpectraStateCode: \"\",\r\n eSpectraOtherState: \"\",\r\n eSpectraZipPostalCode: \"\",\r\n eSpectraWorkPhoneNum: \"\",\r\n eSpectraEmail: \"\",\r\n registeredPassword: \"\",\r\n retypePassword: \"\",\r\n eSpectraPrimaryAreaOfInterest: \"\",\r\n eSpectraProfessionalTitle: \"\",\r\n eSpectraTermConditionAgreeTS: false,\r\n InstitutionId: \"\",\r\n eSpectraPrimaryAffiliationName: \"\",\r\n eSpectraIsAdmin: false,\r\n eSpectraReceiveInfoFlag: false,\r\n eSpectraMktgOptInFlg: true\r\n }\r\n }\r\n\r\n $scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n\r\n $scope.profileDataModel();\r\n\r\n $(\"#instituteName\").on('focusout', function () {\r\n $('#instituteName').typeahead('close');\r\n\r\n $scope.profileData.eSpectraPrimaryAffiliationName = $('#instituteName').val();\r\n\r\n $scope.$apply();\r\n return false;\r\n });\r\n\r\n $scope.getprofileData = function () {\r\n var emailId, UserRole, UserRoleStatus;\r\n emailId = getLocalValue('emailId');\r\n UserRole = getLocalValue(\"userRole\");\r\n UserRoleStatus = getLocalValue(\"userRoleStatus\");\r\n progressBarService.showProgressBar();\r\n\r\n profileservice.getprofileData(emailId).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n $scope.profileData = response.data;\r\n $scope.profileData.eSpectraCountryID = response.data.eSpectraCountryID.toString() == \"1\" ? \"\" : response.data.eSpectraCountryID.toString();\r\n $scope.profileData.InstitutionId = response.data.eSpectraPrimaryAffiliationID;\r\n $scope.profileData.InstitutionName = response.data.eSpectraPrimaryAffiliationName;\r\n $scope.profileData.eSpectraOtherState = response.data.eSpectraStateCode;\r\n $scope.profileData.eSpectraMktgOptInFlg = $scope.profileData.eSpectraMktgOptInFlg == 1 ? true : false;\r\n\r\n setLocalValue(\"userRoleStatus\", response.data.eSpectraUserRoleStatus);\r\n\r\n if (response.data.eSpectraSSSPeerReviewerFlag == 1) {\r\n $scope.profileForm.eSpectraSSSPeerReviewerFlag = true;\r\n } else {\r\n $scope.profileForm.eSpectraSSSPeerReviewerFlag = false;\r\n\r\n }\r\n\r\n var MobilePhoneNum = $scope.profileData.eSpectraMobilePhoneNum;\r\n var mobilenumber = MobilePhoneNum.split('-');\r\n var WorkPhoneNum = $scope.profileData.eSpectraWorkPhoneNum;\r\n var worknumber = WorkPhoneNum.split('-');\r\n\r\n if ($scope.profileData.eSpectraMobilePhoneNum.length > 0) {\r\n $(\"#mobileNo\").intlTelInput(\"setNumber\", mobilenumber[0]);\r\n $scope.profileData.eSpectraMobilePhoneNum = mobilenumber[1] == undefined ? \"\" : mobilenumber[1];\r\n\r\n }\r\n if ($scope.profileData.eSpectraWorkPhoneNum.length > 0) {\r\n $(\"#workNo\").intlTelInput(\"setNumber\", worknumber[0]);\r\n $scope.profileData.eSpectraWorkPhoneNum = worknumber[1] == undefined ? \"\" : worknumber[1];\r\n }\r\n\r\n if (UserRoleStatus.toLowerCase() == 'active') {\r\n $('.administrator').show();\r\n $('.administrator1').hide()\r\n\r\n } else {\r\n if (UserRole != \" \" && UserRoleStatus != 'pending' && UserRoleStatus != 'rejected' && UserRoleStatus != \"\") {\r\n\r\n $('.administrator').hide();\r\n $('.administrator1').show();\r\n\r\n $scope.profileData.eSpectraIsAdmin = true;\r\n }\r\n else if (UserRoleStatus != 'active' && UserRoleStatus != '') {\r\n $scope.pending = \"(Pending Approval)\";\r\n $('.administrator').show();\r\n $('.administrator1').hide()\r\n }\r\n else if (UserRoleStatus == \"\") {\r\n $('.administrator').hide();\r\n }\r\n }\r\n if (response.data.eSpectraReceiveInfoFlag == 1) {\r\n response.data.eSpectraReceiveInfoFlag = true;\r\n }\r\n $scope.getUserSubPackPurchaseDetails();\r\n }\r\n\r\n });\r\n }\r\n\r\n $scope.getprofileData();\r\n\r\n $scope.getUserSubPackPurchaseDetails = function () {\r\n progressBarService.showProgressBar();\r\n\r\n profileservice.getUserSubPackPurchaseDetails().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n progressBarService.hideProgressBar();\r\n //$timeout(hideMessage, 10000);\r\n } else {\r\n $scope.hasPremiumSubscription = localStorage.pre;\r\n $scope.userSubpackPurchaseDetails = response.data.userSubPackDetails;\r\n angular.forEach($scope.userSubpackPurchaseDetails, function (value, key) {\r\n if (value.premiumType.toLowerCase() == 'premium') {\r\n $scope.hasPremiumSubscription = true;\r\n }\r\n });\r\n $scope.userCurrentSubscription = response.data.activeSubpack;\r\n $scope.userCurrentSubscription.startEndDate = $filter('date')($scope.userCurrentSubscription.eSpectraOrderStartDate, 'longDate') + \" - \" + $filter('date')($scope.userCurrentSubscription.eSpectraOrderEndDate, 'longDate');\r\n $scope.userCurrentSubscription.eSpectraCCLast4Num = '...' + $scope.userCurrentSubscription.eSpectraCCLast4Num;\r\n $scope.isAutorenewal = $scope.userCurrentSubscription.eSpectraRecurringBillFlag;\r\n $scope.disablePurchaseBtn = $scope.userCurrentSubscription.eSpectraRecurringBillFlag == 1 ? true : false;\r\n $('#on').attr('recurring', $scope.isAutorenewal);\r\n $scope.getcountryData();\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n };\r\n\r\n $scope.getcountryData = function () {\r\n profileservice.getcountryData().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.countries = response.data;\r\n $scope.getStateByCountryID();\r\n }\r\n });\r\n\r\n }\r\n\r\n $scope.getStateByCountryID = function () {\r\n var AipCountryCode = \"\";\r\n var AipCountryID = $scope.profileData.eSpectraCountryID == \"\" ? \"1\" : $scope.profileData.eSpectraCountryID;\r\n var AipCountryCode = \"\";\r\n if (AipCountryID) {\r\n $scope.getstateData(AipCountryID, AipCountryCode);\r\n }\r\n if ($scope.profileData.eSpectraZipPostalCode != '') {\r\n this.profileData.$dirty = true;\r\n this.profileData.eSpectraZipPostalCode.$dirty = true;\r\n }\r\n }\r\n\r\n //to test zip code valid or not at the time of page load\r\n $scope.$on('$viewContentLoaded', function () {\r\n $timeout(function () {\r\n $scope.selectedCountryZipCodeRegEx = $('option:selected', $('#country')).attr('validateRegex');\r\n if ($scope.profileData.eSpectraZipPostalCode != '') {\r\n var emailregx = new RegExp($scope.selectedCountryZipCodeRegEx);\r\n if (!emailregx.test($scope.profileData.eSpectraZipPostalCode)) {\r\n $scope.profileForm.eSpectraZipPostalCode.$dirty = true;\r\n $scope.profileForm.eSpectraZipPostalCode.$invalid = true;\r\n }\r\n }\r\n }, 2000);\r\n });\r\n\r\n $scope.getstateData = function (AipCountryID, AipCountryCode) {\r\n\r\n $scope.selectedCountryZipCodeRegEx = $('option:selected', $('#country')).attr('validateRegex');\r\n\r\n profileservice.getstateData(AipCountryID, AipCountryCode).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n\r\n progressBarService.hideProgressBar();\r\n $scope.states = response.data;\r\n if (response.data.length > 0) {\r\n $scope.profileData.eSpectraOtherState = \"\";\r\n } else {\r\n $scope.profileData.eSpectraStateCode = \"\";\r\n }\r\n\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.ShowAutorenewalPopup = function () {\r\n if ($scope.profileForm.$valid) {\r\n var isAutorenewal = $('#on')[0].checked ? 1 : 0;\r\n var eSpectraCancelRecurring = $('#on').attr('recurring');\r\n $scope.eSpectraOrderIsMonthly = true;\r\n if (eSpectraCancelRecurring == 0 && isAutorenewal == 1) {\r\n $scope.getProducts();\r\n } else {\r\n $scope.updateProfile();\r\n }\r\n }\r\n }\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#lastName\").val() != '') {\r\n $(\"#lastName\").removeClass(\"border-red\");\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n var regExp = /^[a-zA-Z](?!.*-.*-.*)(?!.*\\s.*\\s.*)[a-zA-Z- ]+$/;\r\n var isValid = regExp.test(angular.element(\"#lastName\").val());\r\n if (isValid) {\r\n $(\"#lastName\").removeClass(\"border-red\");\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n }\r\n else {\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.profileForm.eSpectraLastName.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n $scope.CancelAutorenewalPopup = function () {\r\n $scope.isAutorenewal = 0;\r\n $('#on')[0].checked = false;\r\n angular.element(document.querySelector('#offLbl')).addClass('active');\r\n angular.element(document.querySelector('#onLbl')).removeClass('active');\r\n $scope.updateProfile();\r\n $('#showAutorenewalDialog').modal('hide');\r\n }\r\n\r\n $scope.updateProfile = function () {\r\n if ($scope.checkZipCode()) {\r\n $('#showAutorenewalDialog').modal('hide');\r\n\r\n progressBarService.showProgressBar();\r\n\r\n //var eSpectraLastUpdateUserID = $cookies.get('UserId');\r\n var countryCode, countryCode1, eSpectraReceiveInfoFlag, eSpectraIsAdmin, userInfo, eSpectraSSSPeerReviewerFlag;\r\n countryCode = $('#mobileNo').parent().find('.selected-dial-code').text() + \"-\";\r\n countryCode1 = $('#workNo').parent().find('.selected-dial-code').text() + \"-\";\r\n eSpectraReceiveInfoFlag = $('#eSpectraReceiveInfoFlag').is(\":checked\");\r\n eSpectraIsAdmin = $('#eSpectraIsAdmin').is(\":checked\") && getLocalValue(\"userRoleStatus\") == '' ? true : false;\r\n eSpectraSSSPeerReviewerFlag = 0;//$('#yes')[0].checked ? 1 : 0;\r\n $scope.isAutorenewal = $('#on')[0].checked ? 1 : 0;\r\n $scope.eSpectraCancelRecurring = $('#on').attr('recurring');\r\n\r\n userInfo = {\r\n //eSpectraLastUpdateUserID: eSpectraLastUpdateUserID,\r\n eSpectraFirstName: $scope.profileData.eSpectraFirstName,\r\n eSpectraLastName: $scope.profileData.eSpectraLastName,\r\n eSpectraEmail: $scope.profileData.eSpectraEmail,\r\n eSpectraProfessionalTitle: $scope.profileData.eSpectraProfessionalTitle,\r\n eSpectraPrimaryAreaOfInterest: $scope.profileData.eSpectraPrimaryAreaOfInterest,\r\n eSpectraMobilePhoneNum: countryCode + $scope.profileData.eSpectraMobilePhoneNum,\r\n eSpectraWorkPhoneNum: countryCode1 + $scope.profileData.eSpectraWorkPhoneNum,\r\n eSpectraStreetAddrs1: $scope.profileData.eSpectraStreetAddrs1,\r\n eSpectraStreetAddrs2: $scope.profileData.eSpectraStreetAddrs2,\r\n eSpectraCity: $scope.profileData.eSpectraCity,\r\n eSpectraZipPostalCode: $scope.profileData.eSpectraZipPostalCode,\r\n eSpectraCountryID: $scope.profileData.eSpectraCountryID == \"\" ? \"1\" : $scope.profileData.eSpectraCountryID,\r\n eSpectraPrimaryIndustry: $scope.profileData.eSpectraPrimaryIndustry,\r\n eSpectraLatestProject: $scope.profileData.eSpectraLatestProject,\r\n eSpectraSSSPeerReviewerFlag: eSpectraSSSPeerReviewerFlag,\r\n\r\n eSpectraStateCode: $scope.profileData.eSpectraStateCode == \"\" ? $scope.profileData.eSpectraOtherState : $scope.profileData.eSpectraStateCode,\r\n\r\n eSpectraReceiveInfoFlag: eSpectraReceiveInfoFlag == true ? 1 : 0,\r\n eSpectraPrimaryAffiliationID: parseInt($scope.profileData.InstitutionId) > 0 ? $scope.profileData.InstitutionId : 1,\r\n eSpectraPrimaryAffiliationName: $scope.profileData.InstitutionName,\r\n eSpectraIsAdmin: eSpectraIsAdmin == true ? 1 : 0,\r\n eSpectraRecurringBillFlag: $scope.isAutorenewal,\r\n eSpectraCancelRecurring: $scope.eSpectraCancelRecurring,\r\n eSpectraOrderID: $scope.userCurrentSubscription.eSpectraOrderID,\r\n eSpectraOrderIsMonthly: $scope.eSpectraOrderIsMonthly == true ? 1 : 0,\r\n eSpectraMktgOptInFlg: $scope.profileData.eSpectraMktgOptInFlg == true ? 1 : 0\r\n };\r\n\r\n profileservice.saveProfileData(userInfo).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n if (response.data == false) {\r\n $scope.message = \"Profile updation fail.\";\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n $('.login-fullName').text(userInfo.eSpectraFirstName + \" \" + userInfo.eSpectraLastName);\r\n setLocalValue(\"fullName\", userInfo.eSpectraFirstName + \" \" + userInfo.eSpectraLastName);\r\n\r\n if (response.data.cyberSourceStatus == true) {\r\n $scope.message = \"Your profile has been updated successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n if (userInfo.eSpectraCancelRecurring == 1 && userInfo.eSpectraRecurringBillFlag == 0) {\r\n $scope.isAutorenewal = 0;\r\n $scope.userCurrentSubscription.eSpectraRecurringBillFlag = 0;\r\n $('#on')[0].checked = false;\r\n angular.element(document.querySelector('#offLbl')).addClass('active');\r\n angular.element(document.querySelector('#onLbl')).removeClass('active');\r\n\r\n $scope.getprofileData();\r\n }\r\n } else if (userInfo.eSpectraCancelRecurring == 1 && userInfo.eSpectraRecurringBillFlag == 0 && response.data.cyberSourceStatus == false) {\r\n $scope.message = 'Your cancellation of Auto-renewal has failed. Please contact Customer Service.';\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.isAutorenewal = 1;\r\n $('#on')[0].checked = true;\r\n angular.element(document.querySelector('#offLbl')).removeClass('active');\r\n angular.element(document.querySelector('#onLbl')).addClass('active');\r\n progressBarService.hideProgressBar();\r\n }\r\n if (userInfo.eSpectraCancelRecurring == 0 && userInfo.eSpectraRecurringBillFlag == 1) {\r\n $scope.getAutoRenewalSignature(userInfo);\r\n }\r\n\r\n //$timeout(hideMessage, 10000);\r\n }\r\n }\r\n progressBarService.hideProgressBar();\r\n $scope.disableProfile(true);\r\n $scope.disablePurchaseBtn = $scope.userCurrentSubscription.eSpectraRecurringBillFlag == 1 ? true : false;\r\n $scope.btnEdit = false;\r\n });\r\n }\r\n };\r\n\r\n $scope.getAutoRenewalSignature = function (upgradeData) {\r\n progressBarService.showProgressBar();\r\n profileservice.turnOnRecurringSubscription(upgradeData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n\r\n var data = response.data.signature;\r\n\r\n $scope.cybersourceAPI = response.data.signature.CyberSourceTokenAPI;\r\n document.autorenewal_payment_confirmation.action = $scope.cybersourceAPI;\r\n\r\n var payData = {\r\n access_key: data.access_key,\r\n profile_id: data.profile_id,\r\n transaction_uuid: data.transaction_uuid,\r\n signed_field_names: data.signed_field_names,\r\n unsigned_field_names: data.unsigned_field_names,\r\n signed_date_time: data.signed_date_time,\r\n locale: data.locale,\r\n transaction_type: data.transaction_type,\r\n reference_number: data.reference_number,\r\n amount: data.amount,\r\n currency: data.currency,\r\n signature: data.signature,\r\n bill_to_forename: data.bill_to_forename,\r\n bill_to_surname: data.bill_to_surname,\r\n bill_to_email: data.bill_to_email,\r\n bill_to_address_line1: data.bill_to_address_line1,\r\n bill_to_address_line2: data.bill_to_address_line2,\r\n bill_to_address_city: data.bill_to_address_city,\r\n bill_to_address_postal_code: data.bill_to_address_postal_code,\r\n bill_to_address_state: data.bill_to_address_state,\r\n bill_to_address_country: data.bill_to_address_country,\r\n recurring_frequency: data.recurring_frequency,\r\n recurring_amount: data.recurring_amount,\r\n recurring_start_date: data.recurring_start_date,\r\n override_custom_cancel_page: data.override_custom_cancel_page,\r\n override_custom_receipt_page: data.override_custom_receipt_page,\r\n override_backoffice_post_url: data.override_backoffice_post_url\r\n }\r\n\r\n $scope.GetSignature = payData;\r\n\r\n window.setTimeout(function () {\r\n $('#autorenewalsubmit').click();\r\n }, 100)\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.registrationData = {\r\n currentPassword: '',\r\n registeredPassword: '',\r\n confirmPassword: ''\r\n }\r\n\r\n var clearChangePasswordDialog = function () {\r\n\r\n $scope.registrationData.currentPassword = '';\r\n $scope.registrationData.registeredPassword = '';\r\n $scope.registrationData.confirmPassword = '';\r\n $scope.PasswordLength = false;\r\n $scope.UpperCase = false;\r\n $scope.Numbers = false;\r\n $scope.SpecialCharacters = false;\r\n\r\n //$('#currentPassword').val('');\r\n //$('#newPassword').val('');\r\n //$('#confirmPassword').val('');\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n $(\"form[name=frmChangepwd]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n $scope.frmChangepwd.$setPristine();\r\n $scope.frmChangepwd.$setUntouched();\r\n hideMessage();\r\n }\r\n\r\n $scope.closechangePasswordDialog = function () {\r\n clearChangePasswordDialog();\r\n }\r\n\r\n $scope.changePasswordDialog = function () {\r\n clearChangePasswordDialog();\r\n $('#changePasswordDialog').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n\r\n $scope.changePassword = function () {\r\n var data = {\r\n eSpectraEmail: getLocalValue('emailId'),\r\n eSpectraPassword: $scope.registrationData.registeredPassword,\r\n eSpectraCurrentPassword: $scope.registrationData.currentPassword\r\n }\r\n\r\n progressBarService.showProgressBar();\r\n profileservice.resetPassword(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n $('#currentPassword').addClass('border-red');\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n //loginService.logOut();\r\n progressBarService.hideProgressBar();\r\n $('#changePasswordDialog').modal('hide');\r\n //$location.path('/passwordResetConfirmation');\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.Alertdelete = function () {\r\n $scope.alerts = {\r\n alerHeaderMessage: '',\r\n alertBodyMessage: ''\r\n }\r\n $scope.alerts.alerHeaderMessage = GetMessage.recordsDeleteHeader;\r\n $scope.alerts.alertBodyMessage = GetMessage.recordsDeleteBody;\r\n\r\n $('#confirmDelete').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n\r\n $scope.delete = function () {\r\n $('#confirmDelete').modal('hide');\r\n progressBarService.showProgressBar();\r\n //var eSpectraLastUpdateUserID = $cookies.get('UserId');\r\n var eSpectraEmail = getLocalValue('emailId');\r\n var userInfo = {\r\n //eSpectraPersonID: eSpectraLastUpdateUserID,\r\n //eSpectraLastUpdateUserID: eSpectraLastUpdateUserID,\r\n eSpectraFirstName: $scope.profileData.eSpectraFirstName\r\n }\r\n\r\n profileservice.deleteRecords(userInfo).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n progressBarService.hideProgressBar();\r\n } else {\r\n $scope.message = \"Account Deleted Successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n sendConfirmationToUserDelete(eSpectraEmail, userInfo.eSpectraFirstName);\r\n $timeout(function () {\r\n progressBarService.hideProgressBar();\r\n loginService.logOut();\r\n $location.path('/home');\r\n }, 1000);\r\n }\r\n });\r\n }\r\n\r\n var sendConfirmationToUserDelete = function (userId, eSpectraFirstName) {\r\n loginService.sendConfirmationToUserDelete(userId, eSpectraFirstName);\r\n };\r\n\r\n var deactivateAccount = function () {\r\n progressBarService.showProgressBar();\r\n //var eSpectraLastUpdateUserID = $cookies.get('UserId');\r\n //var userInfo = {\r\n // eSpectraLastUpdateUserID: eSpectraLastUpdateUserID,\r\n // eSpectraPersonID: eSpectraLastUpdateUserID\r\n //}\r\n\r\n profileservice.deactivateAccount().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n } else {\r\n $scope.message = \"Account Deactivated Successfully.\";\r\n loginService.logOut();\r\n progressBarService.hideProgressBar();\r\n $timeout($location.path('/login'), 10000);\r\n return false;\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n var deleteRecords = function () {\r\n progressBarService.showProgressBar();\r\n //var eSpectraLastUpdateUserID = $cookies.get('UserId');\r\n //var userInfo = {\r\n // eSpectraLastUpdateUserID: eSpectraLastUpdateUserID\r\n //}\r\n\r\n profileservice.deleteRecords().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n } else {\r\n $scope.message = \"Records Deleted Successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n }\r\n //$timeout(hideMessage, 10000);\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n $scope.getSignature = function () {\r\n\r\n profileservice.getUpdateCCSignature().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.isAutorenewal = 0;\r\n $('#on')[0].checked = false;\r\n angular.element(document.querySelector('#offLbl')).addClass('active');\r\n angular.element(document.querySelector('#onLbl')).removeClass('active');\r\n }\r\n else {\r\n\r\n var data = response.data.signature;\r\n $scope.cybersourceUpdateAPI = response.data.signature.CyberSourceTokenAPI;\r\n document.update_payment.action = $scope.cybersourceUpdateAPI;\r\n\r\n var payData = {\r\n access_key: data.access_key,\r\n profile_id: data.profile_id,\r\n transaction_uuid: data.transaction_uuid,\r\n signed_field_names: data.signed_field_names,\r\n unsigned_field_names: data.unsigned_field_names,\r\n signed_date_time: data.signed_date_time,\r\n locale: data.locale,\r\n transaction_type: data.transaction_type,\r\n reference_number: data.reference_number,\r\n signature: data.signature,\r\n payment_token: data.subscription_id,\r\n allow_payment_token_update: data.allow_payment_token_update,\r\n override_custom_cancel_page: data.override_custom_cancel_page,\r\n override_custom_receipt_page: data.override_custom_receipt_page,\r\n override_backoffice_post_url: data.override_backoffice_post_url\r\n }\r\n\r\n $scope.GetSignature = payData;\r\n\r\n window.setTimeout(function () {\r\n $('#update_payment #submit').click();\r\n }, 100)\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n }\r\n\r\n $scope.getProducts = function () {\r\n upgradeService.getSubscriptionProducts().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.subPackMessage = response.data.message;\r\n $scope.subPackIsError = true;\r\n $scope.subPackIsSuccess = false;\r\n }\r\n else {\r\n $scope.monthlySubscriptions = response.data.monthlySusription;\r\n $scope.annualSubscriptions = response.data.yearlySuscription;\r\n $('#showAutorenewalDialog').modal('show');\r\n }\r\n });\r\n }\r\n\r\n $scope.checkZipCode = function () {\r\n var codeRegEx = $(\"#country_\" + $scope.profileData.eSpectraCountryID).attr('validateRegex');\r\n var emailregx = new RegExp(codeRegEx);\r\n if ($scope.profileData.eSpectraZipPostalCode != \"\" && !emailregx.test($scope.profileData.eSpectraZipPostalCode)) {\r\n $scope.profileForm.eSpectraZipPostalCode.$dirty = true;\r\n $scope.profileForm.eSpectraZipPostalCode.$invalid = true;\r\n $scope.isValidZipCode = false;\r\n return false;\r\n } else {\r\n $scope.profileForm.eSpectraZipPostalCode.$dirty = false;\r\n $scope.profileForm.eSpectraZipPostalCode.$invalid = false;\r\n $scope.isValidZipCode = true;\r\n return true;\r\n }\r\n }\r\n }]);\r\n\r\n app.filter('startFrom', function () {\r\n return function (input, start) {\r\n start = +start;\r\n return input.slice(start);\r\n }\r\n });\r\n\r\n})();","(function () {\r\n 'use strict';\r\n app.service('userAccountService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n\r\n this.getAccountData = function (username) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/Account/user?username=\" + username)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.deleteRecords = function (userInfo) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/deleteRecords\", userInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.cancelSubscription = function () {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/Account/cancelSubscription\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('userAccountController', ['$scope', '$location', '$cookies', '$rootScope', '$timeout', 'userAccountService', '$route', 'CommonService', 'progressBarService','LoginService', function ($scope, $location, $cookies, $rootScope, $timeout, userAccountService, $route, commonService, progressBarService, loginService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem(\"appInfo\") == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n $scope.getAccountData = function () {\r\n progressBarService.showProgressBar();\r\n var subscriptionType, emailId;\r\n emailId = getLocalValue('emailId');\r\n\r\n userAccountService.getAccountData(emailId).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n } else {\r\n $scope.accountData = response.data;\r\n }\r\n });\r\n progressBarService.hideProgressBar();\r\n }\r\n $scope.getAccountData();\r\n\r\n $scope.Alertdelete = function () {\r\n $scope.alerts = {\r\n alerHeaderMessage: '',\r\n alertBodyMessage: ''\r\n }\r\n $scope.alerts.alerHeaderMessage = GetMessage.recordsDeleteHeader;\r\n $scope.alerts.alertBodyMessage = GetMessage.recordsDeleteBody;\r\n\r\n $('#confirmDelete').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n\r\n $scope.delete = function () {\r\n $('#confirmDelete').modal('hide');\r\n progressBarService.showProgressBar();\r\n //var eSpectraLastUpdateUserID = $cookies.get('UserId');\r\n var eSpectraEmail = getLocalValue('emailId');\r\n var userInfo = {}\r\n\r\n userAccountService.deleteRecords(userInfo).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n progressBarService.hideProgressBar();\r\n } else {\r\n $scope.message = \"Account Deleted Successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n sendConfirmationToUserDelete(eSpectraEmail);\r\n $timeout(function () {\r\n progressBarService.hideProgressBar();\r\n loginService.logOut();\r\n $location.path('/home');\r\n },1000);\r\n }\r\n });\r\n }\r\n\r\n var sendConfirmationToUserDelete = function (userId) {\r\n loginService.sendConfirmationToUserDelete(userId);\r\n };\r\n\r\n $scope.alertCancel = function () {\r\n $scope.alerts = {\r\n alerHeaderMessage: '',\r\n alertBodyMessage: ''\r\n }\r\n $scope.alerts.alerHeaderMessage = GetMessage.cancelSubscriptionHeader;\r\n $scope.alerts.alertBodyMessage = GetMessage.cancelSubscriptionBody;\r\n\r\n $('#confirmCancel').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n\r\n $scope.cancelSubscription = function () {\r\n $('#confirmCancel').modal('hide');\r\n //var eSpectraUserId = $cookies.get('UserId');\r\n userAccountService.cancelSubscription().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n } else {\r\n $scope.message = \"Subscription Cancelled Successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.accountData.userSubscriptionType = '';\r\n\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n }]);\r\n\r\n})();","(function () {\r\n 'use strict';\r\n app.service('contactUsservice', ['$http', '$q', 'AuthenticationService', '$rootScope', '$cookies',\r\n function ($http, $q, authenticationService, $rootScope, $cookies) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n this.sendContactFormToEspectra = function (userData) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"sendContactFormToEspectra?emailID=\" + userData.emailId + \"&username=\" + userData.username + \"&message=\" + userData.message)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('contactUsController', ['$scope', 'LoginService', '$location', '$cookies', 'AuthenticationService', 'progressBarService', 'contactUsservice', '$rootScope', '$timeout', '$compile', function ($scope, loginService, $location, $cookies, AuthenticationService, progressBarService, contactUsservice, $rootScope, $timeout, $compile) {\r\n\r\n $scope.reloadCaptcha = function () {\r\n $rootScope.$broadcast('reloadCaptcha', {});\r\n }\r\n\r\n $scope.reloadCaptcha();\r\n\r\n $scope.submitMessage = function (userData) {\r\n $scope.sendFeedbackMailToEspectra(userData);\r\n }\r\n\r\n $scope.sendFeedbackMailToEspectra = function (userData) {\r\n progressBarService.showProgressBar();\r\n contactUsservice.sendContactFormToEspectra(userData);\r\n $timeout(function () {\r\n progressBarService.hideProgressBar();\r\n $scope.isSuccess = true;\r\n $scope.message = \"Contact form has been submitted successfully.\";\r\n }, 1000);\r\n $scope.reloadCaptcha();\r\n $scope.userData.username = '';\r\n $scope.userData.emailId = '';\r\n $scope.userData.message = '';\r\n $scope.contatcUsForm.$setPristine();\r\n $scope.contatcUsForm.$setUntouched();\r\n }\r\n }]);\r\n})();\r\n","(function () {\r\n 'use strict';\r\n app.service('userManagementService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n\r\n this.getData = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/getUserManagementData\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getDataReport = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/getUserManagementDataReport\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getFullDataReport = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/getUserManagementFullDataReport\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.resetPassword = function (resetPasswordInfo) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/Account/changePassword_superadmin\", resetPasswordInfo, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.notificationSuperadminChangePassword = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/notificationSuperadminChangePassword\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n //.catch(function (err) {\r\n // deferred.resolve(err);\r\n //});\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getStatusData = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"status\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.updateStatus = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/super/updateStatus?emailID=\" + data.emailID + \"&userID=\" + data.userID + \"&userStatusID=\" + data.statusId + \"&statusValue=\" + data.statusValue + \"&username=\" + data.username + \"&eSpectraAdminNote=\" + data.eSpectraAdminNote + \"&eSpectraAdminNoteID=\" + data.eSpectraAdminNoteID + \"&statusDate=\" + data.statusDate)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.sendSuspendedUserAccountMailtoUser = function (emailID, userFirstName) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/sendSuspendedUserAccountMailtoUser?emailID=\" + emailID + \"&userFirstName=\" + userFirstName)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.sendDeletedUserAccountMailtoUser = function (emailID, userFirstName) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/sendDeletedUserAccountMailtoUser?emailID=\" + emailID + \"&userFirstName=\" + userFirstName)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.saveAdminUpdatedUserProfile = function (userData) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/saveAdminUpdatedUserProfile/\", userData)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getUserSubPackPurchaseDetails = function (userId) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/super/userSubPackPurchaseDetails?userID=\"+ userId)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getUserStatusHistory = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/super/getUserStatusHistory\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('usermanagementController', ['$filter', '$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', '$routeParams', 'userManagementService', 'CommonService', 'profileservice', 'userAccountService', function ($filter, $scope, $location, $cookies, progressBarService, $rootScope, $timeout, $routeParams, userManagementService, commonService, profileservice, userAccountService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return false;\r\n }\r\n\r\n $scope.isSAdmin = getLocalValue('userRole') == 'SAdmin' ? true : false;\r\n\r\n $scope.isUserManagementPage = true;\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n $scope.modalMessage = '';\r\n }\r\n\r\n $scope.reset = function () {\r\n hideMessage();\r\n $scope.isAccordionHide = true;\r\n $scope.AffiliationAdmins = [];\r\n $scope.users = [];\r\n $scope.pagination = {\r\n currentPage: 1,\r\n itemsPerPage: 10,\r\n totalRows: 0,\r\n sortBy: 'eSpectraFullName',\r\n reverse: false\r\n }\r\n\r\n $scope.models = {\r\n name: '',\r\n email: '',\r\n affiliation: '',\r\n premium: true,\r\n restricted: true,\r\n free: true,\r\n active: true,\r\n deactivated: true,\r\n suspended: true,\r\n Unactivated: true,\r\n admininstrator: true,\r\n Deprecated: false,\r\n individualAccount: true,\r\n institutionAccount: true\r\n }\r\n }\r\n\r\n $scope.setPage = function (currentPage) {\r\n $scope.pagination.currentPage = currentPage;\r\n $scope.getData();\r\n }\r\n\r\n $scope.sort = function (sortBy) {\r\n if ($scope.users.length > 0) {\r\n $scope.pagination.sortBy = sortBy;\r\n $scope.pagination.currentPage = 1;\r\n $scope.pagination.reverse = !$scope.pagination.reverse;\r\n $scope.getData();\r\n }\r\n }\r\n\r\n $scope.reset();\r\n\r\n $scope.getData = function (click) {\r\n progressBarService.showProgressBar();\r\n hideMessage();\r\n if (click == \"search\") {\r\n $scope.users = [];\r\n $scope.pagination.currentPage = 1;\r\n $scope.pagination.sortBy = 'eSpectraFullName';\r\n $scope.pagination.reverse = false;\r\n }\r\n\r\n var data = {\r\n PageNo: $scope.pagination.currentPage,\r\n SortBy: $scope.pagination.sortBy,\r\n Reverse: $scope.pagination.reverse ? 'desc' : 'asc',\r\n eSpectraFullName: $scope.models.name,\r\n eSpectraEmail: $scope.models.email,\r\n eSpectraPrimaryAffiliationName: $scope.models.affiliation,\r\n PremiumType: $scope.models.premium ? '1' : '0',\r\n Restricted: $scope.models.restricted ? '1' : '0',\r\n Free: $scope.models.free ? '1' : '0',\r\n Active: $scope.models.active ? 'active' : '0',\r\n Deactivated: $scope.models.deactivated ? 'deactivated' : '0',\r\n Suspended: $scope.models.suspended ? 'suspended' : '0',\r\n Unactivated: $scope.models.Unactivated ? 'pending' : '0',\r\n Administrator: $scope.models.admininstrator ? '1' : '0',\r\n Deprecated: $scope.models.Deprecated ? 'deprecated' : '0',\r\n IndividualAccount: $scope.models.individualAccount ? '1' : '0',\r\n InstitutionAccount: $scope.models.institutionAccount ? '1' : '0'\r\n }\r\n\r\n userManagementService.getData(data).then(function (response) {\r\n $scope.isAccordionHide = false;\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n\r\n angular.forEach(response.data, function (value, index) {\r\n response.data[index].editable = false;\r\n response.data[index].eSpectraUserStatus = response.data[index].eSpectraUserStatus == 'Pending' ? 'Unactivated' : response.data[index].eSpectraUserStatus;\r\n response.data[index].eSpectraUserRoleStatus = response.data[index].eSpectraUserRoleStatus == 'Pending' ? 'Unactivated' : response.data[index].eSpectraUserRoleStatus;\r\n });\r\n $scope.users = response.data;\r\n if (response.data.length > 0) {\r\n $scope.pagination.totalRows = response.data[0].totalRows;\r\n }\r\n }\r\n $scope.getStatusData();\r\n });\r\n }\r\n\r\n $scope.validatePassword = function (event) {\r\n commonService.validatePassword($scope, event);\r\n }\r\n\r\n $scope.checkLength = function (password, event) {\r\n if (password.length > 20) {\r\n event.preventDefault();\r\n } else {\r\n if (password.length < 6) {\r\n $('#newPassword').addClass('border-red');\r\n } else {\r\n $('#newPassword').removeClass('border-red');\r\n }\r\n }\r\n }\r\n\r\n $scope.getStatusData = function () {\r\n userManagementService.getStatusData().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.status = response.data;\r\n //$scope.getStateByCountryID();\r\n }\r\n $scope.closeEditUserProfileModal();\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.displayDownloadReportPopup = function () {\r\n $scope.abbreviatedReport = true;\r\n $scope.fullReport = false;\r\n $('#downloadReportDialog').modal({ backdrop: 'static', keyboard: false });\r\n }\r\n\r\n var disableProfileForm = function (value) {\r\n $scope.disableFirstName = value;\r\n $scope.disableLastName = value;\r\n $scope.disableAffiliation = value;\r\n $scope.disableUserStatus = value;\r\n $scope.disableRoleType = value;\r\n $scope.disableChangePassword = value;\r\n $scope.disableConfirmPassword = value;\r\n $scope.disableSaveBtn = value;\r\n }\r\n\r\n $scope.displayEditProfileModal = function (index, user) {\r\n $scope.personId = user.eSpectraPersonID;\r\n $scope.modalMessage = '';\r\n disableProfileForm(false);\r\n $scope.isAffiliationDivActive = false;\r\n $scope.userStatusHistoryDetails = [];\r\n $('.clearAffiliation').addClass('hide');\r\n $scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n $scope.eSpectraAdminNote = \"\";\r\n if (user.eSpectraUserStatus == \"Deprecated\") {\r\n disableProfileForm(true);\r\n }\r\n var element = document.getElementById('suspensionReasonTextArea');\r\n if (element != null && element.classList.contains(\"border-red\")) {\r\n element.classList.remove(\"border-red\");\r\n }\r\n $scope.deletedSubPackIds = '';\r\n $scope.isShowAddSubPackIcon = true;\r\n $scope.isShowRemoveSubPackIcon = false;\r\n $scope.isCommentError = false;\r\n $scope.isWrongExpiryDate = false;\r\n $scope.errorMessageForWrongExpiryDate = \"\";\r\n $scope.purchaseDetailscurrentPage = 0;\r\n $scope.commentDetailsCurrentPage = 0;\r\n $scope.purchaseDetailsPageSize = 5;\r\n $scope.commentDetailsPageSize = 3;\r\n $scope.activeTab = 1;\r\n $scope.profileForm.$setPristine();\r\n $scope.profileForm.$setUntouched();\r\n $scope.isUserStatusChanged = false;\r\n $scope.isTopAdminNoteUpdated = false;\r\n $scope.deletedComments = '';\r\n $scope.updatedAdminNoteIndex = '';\r\n\r\n //angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n // $scope.userStatusHistoryDetails[key].isShowEditButton = true;\r\n // $scope.userStatusHistoryDetails[key].isShowDeleteButton = true;\r\n //});\r\n\r\n userAccountService.getAccountData(user.eSpectraEmail).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.profileData = response.data;\r\n $scope.profileData.index = index;\r\n $scope.profileData.InstitutionId = $scope.profileData.eSpectraPrimaryAffiliationID;\r\n $scope.profileData.currentUserSelectedAdminStatus = $scope.profileData.eSpectraUserRoleStatus;\r\n $scope.profileData.eSpectraSelectedUserStatus = $scope.profileData.eSpectraPartyStatus == 'Pending' ? 'Active' : $scope.profileData.eSpectraPartyStatus;\r\n $scope.profileData.InstitutionName = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n $scope.profileData.registeredPassword = '';\r\n $scope.profileData.confirmPassword = '';\r\n $scope.profileData.premiumType = user.premiumType;\r\n $scope.disableAffiliation = $scope.profileData.eSpectraSelectedUserStatus.toLowerCase() == 'deprecated' || $scope.profileData.isTeamMember == 1 ? true : false;\r\n $scope.profileData.isKratosData = $scope.profileData.isKratosData == 1 ? true : false;\r\n if (user.eSpectraUserRole.toLowerCase() == 'primary administrator') {\r\n $scope.profileData.eSpectraUserRole = user.eSpectraUserRole;\r\n } else {\r\n $scope.profileData.eSpectraUserRole = $scope.profileData.eSpectraUserRole == 'IAdmin' ? 'Institution Administrator' : $scope.profileData.eSpectraUserRole;\r\n $scope.profileData.eSpectraUserRole = $scope.profileData.eSpectraUserRole == 'SAdmin' ? 'System Administrator' : $scope.profileData.eSpectraUserRole;\r\n }\r\n $scope.profileData.currentUserSelectedRoleType = $scope.profileData.eSpectraUserRole;\r\n $scope.getUserSubPackPurchaseDetails();\r\n\r\n }\r\n });\r\n }\r\n\r\n $scope.getCurrentDateTime = function () {\r\n var today, dd, mm, yyyy, currentDate, currentTime;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1;\r\n yyyy = today.getFullYear();\r\n $scope.currentSeconds = today.getSeconds();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n $scope.currentDate = mm + '-' + dd + '-' + yyyy;\r\n $scope.databaseDate = yyyy + '-' + mm + '-' + dd;\r\n $scope.currentTime = today.getHours() + \":\" + today.getMinutes();\r\n }\r\n\r\n $scope.getNewStatusDetailsModel = function () {\r\n $scope.getCurrentDateTime();\r\n $scope.newStatusDetailsModel = {\r\n adminFullName: getLocalValue('fullName'),\r\n userStatus: $scope.profileData.eSpectraSelectedUserStatus,\r\n statusDate: $scope.currentDate + \" \" + $scope.currentTime,\r\n isShowCommentBox: true,\r\n isShowCommentError: false,\r\n isShowTick: true,\r\n isShowEditButton: false,\r\n isShowDeleteButton: true,\r\n adminNote: \"\",\r\n adminNoteId: 0,\r\n newAdminNote: \"\"\r\n };\r\n }\r\n\r\n $scope.checkSelectedStatus = function (eSpectraSelectedUserStatus) {\r\n $scope.activeTab = 2;\r\n $scope.getCurrentDateTime();\r\n $scope.userStatusHistoryDetails[0].userStatus = eSpectraSelectedUserStatus;\r\n $scope.userStatusHistoryDetails[0].statusDate = $scope.currentDate + \" \" + $scope.currentTime;\r\n }\r\n\r\n $scope.getUserSubPackPurchaseDetails = function () {\r\n userManagementService.getUserSubPackPurchaseDetails($scope.profileData.eSpectraPersonID).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n } else {\r\n $scope.userSubpackPurchaseDetails = response.data.userSubPackDetails;\r\n $scope.userCurrentSubscription = response.data.activeSubpack;\r\n if ($scope.userSubpackPurchaseDetails.length > 0) {\r\n $scope.userSubpackPurchaseDetails[0].isExpiryDateEditable = false;\r\n $scope.userSubpackPurchaseDetails[0].isExpiryDateUpdated = false;\r\n }\r\n $scope.isAutorenewal = $scope.userCurrentSubscription.eSpectraRecurringBillFlag;\r\n $('#editUserProfileModal').modal('show');\r\n\r\n $scope.getUserStatusCommentHistory();\r\n }\r\n });\r\n }\r\n\r\n $scope.getUserStatusCommentHistory = function () {\r\n var data = {\r\n eSpectraPersonID: $scope.personId\r\n }\r\n $scope.getNewStatusDetailsModel();\r\n userManagementService.getUserStatusHistory(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n if (response.data.message.toLowerCase() == 'no data found') {\r\n $scope.userStatusHistoryDetails.unshift($scope.newStatusDetailsModel);\r\n $scope.isUserStatusChanged = true;\r\n $scope.isNewStatusModelAdded = true;\r\n }\r\n }\r\n else {\r\n $scope.userStatusHistoryDetails = response.data;\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n $scope.userStatusHistoryDetails[key].isShowCommentBox = false;\r\n $scope.userStatusHistoryDetails[key].isShowCommentError = false;\r\n $scope.userStatusHistoryDetails[key].isShowTick = false;\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = true;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = true;\r\n $scope.userStatusHistoryDetails[key].newAdminNote = $scope.userStatusHistoryDetails[key].adminNote;\r\n });\r\n $scope.userStatusHistoryDetails.unshift($scope.newStatusDetailsModel);\r\n $scope.isNewStatusModelAdded = true;\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.setIndividualStatusComment = function (index) {\r\n var element = document.getElementsByClassName('admin-status-' + index);\r\n if (!$scope.userStatusHistoryDetails[index].isShowCommentError) {\r\n if ($scope.userStatusHistoryDetails[index].newAdminNote == \"\") {\r\n $(element).addClass('border-red');\r\n } else {\r\n $(element).removeClass('border-red');\r\n index = ($scope.commentDetailsCurrentPage * 3) + index\r\n $scope.updatedAdminNoteIndex = index;\r\n $scope.userStatusHistoryDetails[index].adminNote = $scope.userStatusHistoryDetails[index].newAdminNote == \"\" ? \"n/a\" : $scope.userStatusHistoryDetails[index].newAdminNote;\r\n $scope.getCurrentDateTime();\r\n $scope.userStatusHistoryDetails[index].statusDate = $scope.currentDate + \" \" + $scope.currentTime;\r\n if ($scope.profileData.eSpectraAdminNote != $scope.userStatusHistoryDetails[index].adminNote) {\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = $scope.userStatusHistoryDetails[index].statusDate;\r\n $scope.isTopAdminNoteUpdated = true;\r\n } else {\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = $scope.userStatusHistoryDetails[index].statusDate;\r\n }\r\n $scope.profileData.eSpectraAdminNote = $scope.userStatusHistoryDetails[index].adminNote;\r\n\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n if (key != index) {\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = false;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = false;\r\n } else {\r\n $scope.userStatusHistoryDetails[key].isShowCommentBox = false;\r\n $scope.userStatusHistoryDetails[key].isShowTick = false;\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = true;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = true;\r\n }\r\n });\r\n enableSaveForDeprecatedUser();\r\n }\r\n }\r\n }\r\n\r\n $scope.deleteComment = function (userStatusHistory, index) {\r\n index = ($scope.commentDetailsCurrentPage * 3) + index\r\n if (!$scope.isNewStatusModelAdded) {\r\n if (index == 0 && $scope.userStatusHistoryDetails.length > 0) {\r\n $scope.profileData.eSpectraAdminNote = $scope.userStatusHistoryDetails[1].adminNote;\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = $scope.userStatusHistoryDetails[1].statusDate;\r\n } else if (index == 0 && $scope.userStatusHistoryDetails.length == 0) {\r\n $scope.profileData.eSpectraAdminNote = \"\";\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = \"\";\r\n }\r\n }\r\n if (index == 0 && $scope.isNewStatusModelAdded) {\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = true;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = true;\r\n });\r\n } else {\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n if (index != key) {\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = false;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = false;\r\n }\r\n });\r\n }\r\n $scope.userStatusHistoryDetails.splice(index, 1);\r\n if ($scope.userStatusHistoryDetails.length == 0) {\r\n $scope.updatedAdminNoteIndex = '';\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = '';\r\n $scope.profileData.eSpectraAdminNote = '';\r\n enableSaveForDeprecatedUser();\r\n } else {\r\n $scope.profileData.eSpectraAdminNoteLastUpdateTS = $scope.userStatusHistoryDetails[0].statusDate;\r\n $scope.profileData.eSpectraAdminNote = $scope.userStatusHistoryDetails[0].adminNote;\r\n }\r\n $scope.deletedComments = $scope.deletedComments + userStatusHistory.adminNoteId + ',';\r\n }\r\n\r\n function enableSaveForDeprecatedUser() {\r\n if ($scope.profileData.eSpectraSelectedUserStatus.toLowerCase() == 'deprecated') {\r\n if ($scope.profileData.eSpectraAdminNote.length > 0) {\r\n $scope.disableSaveBtn = false;\r\n $scope.profileForm.$valid = true;\r\n } else {\r\n $scope.disableSaveBtn = true;\r\n $scope.profileForm.$valid = false;\r\n }\r\n }\r\n }\r\n\r\n $scope.editIndividualStatusComment = function (index) {\r\n index = ($scope.commentDetailsCurrentPage * 3) + index;\r\n $scope.userStatusHistoryDetails[index].newAdminNote = $scope.userStatusHistoryDetails[index].adminNote;\r\n $scope.userStatusHistoryDetails[index].isShowCommentBox = !$scope.userStatusHistoryDetails[index].isShowCommentBox;\r\n $scope.userStatusHistoryDetails[index].isShowCommentError = $scope.userStatusHistoryDetails[index].isShowCommentError == true ? false : $scope.userStatusHistoryDetails[index].isShowCommentError;\r\n if ($scope.userStatusHistoryDetails[index].isShowCommentBox) {\r\n if (index != 0) {\r\n $scope.userStatusHistoryDetails.splice(0, 1);\r\n $scope.isNewStatusModelAdded = false;\r\n index = index - 1;\r\n }\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n if (index != key) {\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = false;\r\n $scope.userStatusHistoryDetails[key].isShowCommentBox = false;\r\n $scope.userStatusHistoryDetails[key].isShowTick = false;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = false;\r\n }\r\n });\r\n } else if ($scope.profileData.eSpectraAdminNoteLastUpdateTS != $scope.userStatusHistoryDetails[index].statusDate && $scope.profileData.eSpectraAdminNote != $scope.userStatusHistoryDetails[index].adminNote || !$scope.isTopAdminNoteUpdated) {\r\n angular.forEach($scope.userStatusHistoryDetails, function (value, key) {\r\n $scope.userStatusHistoryDetails[key].isShowEditButton = true;\r\n $scope.userStatusHistoryDetails[key].isShowDeleteButton = true;\r\n });\r\n if (!$scope.isNewStatusModelAdded) {\r\n $scope.getNewStatusDetailsModel();\r\n $scope.userStatusHistoryDetails.unshift($scope.newStatusDetailsModel);\r\n index = index + 1;\r\n $scope.isNewStatusModelAdded = true;\r\n }\r\n }\r\n $scope.userStatusHistoryDetails[index].isShowTick = !$scope.userStatusHistoryDetails[index].isShowTick;\r\n $scope.userStatusHistoryDetails[index].isShowEditButton = true;\r\n $scope.userStatusHistoryDetails[index].isShowDeleteButton = true;\r\n }\r\n\r\n $scope.saveAdminUpdatedUserProfile = function (currentUser) {\r\n if ($scope.ValidateUserDetails()) {\r\n var element = document.getElementById('eSpectraAdminNoteField');\r\n if (currentUser.eSpectraSelectedUserStatus != currentUser.eSpectraPartyStatus && currentUser.eSpectraSelectedUserStatus.toLowerCase() == 'suspended' && !$scope.isTopAdminNoteUpdated) {// && element != null && element.className.indexOf('ng-empty') != -1) {\r\n if (!$scope.isTopAdminNoteUpdated && element != null) {\r\n var element0 = document.getElementById('save-comment-0');\r\n if (element.className.indexOf('ng-empty') != -1) {\r\n element.classList.add('border-red');\r\n } else {\r\n element.classList.remove('border-red');\r\n element0.firstChild.classList.add('untick-comment');\r\n }\r\n }\r\n $scope.setTab(2);\r\n } else {\r\n progressBarService.showProgressBar();\r\n var userData = {\r\n eSpectraFirstName: currentUser.eSpectraFirstName,\r\n eSpectraLastName: currentUser.eSpectraLastName,\r\n eSpectraUserStatus: currentUser.eSpectraSelectedUserStatus,\r\n eSpectraUserRole: currentUser.currentUserSelectedRoleType,\r\n eSpectraPersonID: currentUser.eSpectraPersonID,\r\n //eSpectraAdminId: eSpectraAdminId,\r\n eSpectraOrderStartDate: $scope.addMonthlySubscription == true ? $scope.userSubpackPurchaseDetails[0].eSpectraOrderStartDate.toDateString() : '',\r\n eSpectraOrderIDs: $scope.deletedSubPackIds.substr(0, $scope.deletedSubPackIds.length - 1),\r\n eSpectraAdminNoteIDs: $scope.deletedComments.substr(0, $scope.deletedComments.length - 1),\r\n eSpectraSubPackIsAddSubscription: $scope.addMonthlySubscription == true ? 1 : 0,\r\n eSpectraRecurringBillFlag: $scope.userSubpackPurchaseDetails.length != 0 && $('#on')[0].checked ? 1 : 0,\r\n eSpectraCancelRecurring: $scope.userSubpackPurchaseDetails.length != 0 && $('#off')[0].checked && $scope.userCurrentSubscription.eSpectraRecurringBillFlag != 0 ? 1 : 0,\r\n eSpectraPrimaryAffiliationID: parseInt(currentUser.InstitutionId) > 0 ? currentUser.InstitutionId : 1,\r\n eSpectraPrimaryAffiliationName: currentUser.InstitutionName,\r\n isKratosData: currentUser.isKratosData ? 1 : 0\r\n }\r\n\r\n if ($scope.addMonthlySubscription == true && !$scope.userSubpackPurchaseDetails[0].isExpiryDateUpdated) {\r\n userData.eSpectraOrderEndDate = $scope.userSubpackPurchaseDetails[0].eSpectraOrderEndDate.toDateString();\r\n } else if ($scope.userSubpackPurchaseDetails.length > 0 && $scope.userSubpackPurchaseDetails[0].isExpiryDateUpdated) {\r\n userData.eSpectraOrderEndDate = $scope.userSubpackPurchaseDetails[0].eSpectraOrderEndDate;\r\n } else {\r\n userData.eSpectraOrderEndDate = '';\r\n }\r\n\r\n var newPasswordData = {\r\n eSpectraEmail: '',\r\n eSpectraPassword: ''\r\n }\r\n\r\n var userStatusData = {\r\n //adminUserId: eSpectraAdminId,\r\n userID: currentUser.eSpectraPersonID,\r\n userFirstName: currentUser.eSpectraFirstName,\r\n username: currentUser.eSpectraFullName,\r\n emailID: currentUser.eSpectraEmail,\r\n eSpectraAdminNote: $scope.updatedAdminNoteIndex.toString() != '' && $scope.userStatusHistoryDetails.length > 0 ? $scope.userStatusHistoryDetails[$scope.updatedAdminNoteIndex].adminNote : \"\",\r\n statusId: '',\r\n statusValue: currentUser.eSpectraSelectedUserStatus,\r\n //isAdminNoteUpdated: $scope.isAdminNoteUpdated,\r\n //eSpectraAdminNoteID: $scope.isAdminNoteUpdated == true ? $scope.userStatusHistoryDetails[$scope.updatedAdminNoteIndex].adminNoteId : 0,\r\n eSpectraAdminNoteID: $scope.updatedAdminNoteIndex.toString() == '' ? 0 : $scope.userStatusHistoryDetails[$scope.updatedAdminNoteIndex].adminNoteId,\r\n statusDate: $scope.userStatusHistoryDetails.length > 0 && $scope.updatedAdminNoteIndex.toString() != '' ? $scope.databaseDate + \" \" + $scope.currentTime + \":\" + $scope.currentSeconds : \" \"\r\n }\r\n\r\n userManagementService.saveAdminUpdatedUserProfile(userData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n // $scope.closeEditUserProfileModal();\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n if (response.data.cyberSourceStatus == true) {\r\n if (userData.eSpectraCancelRecurring == 1 && userData.eSpectraRecurringBillFlag == 0) {\r\n $scope.isAutorenewal = 0;\r\n $scope.userCurrentSubscription.eSpectraRecurringBillFlag = 0;\r\n $('#on')[0].checked = false;\r\n angular.element(document.querySelector('#offLbl')).addClass('active');\r\n angular.element(document.querySelector('#onLbl')).removeClass('active');\r\n }\r\n } else if (userData.eSpectraCancelRecurring == 1 && userData.eSpectraRecurringBillFlag == 0 && response.data.cyberSourceStatus == false) {\r\n $scope.modalMessage = 'Your cancellation of Auto-renewal has failed. Please contact Customer Service.';\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n $scope.isAutorenewal = 1;\r\n $('#on')[0].checked = true;\r\n angular.element(document.querySelector('#offLbl')).removeClass('active');\r\n angular.element(document.querySelector('#onLbl')).addClass('active');\r\n }\r\n\r\n $scope.saveIndividualStatusDetails(currentUser.index, userStatusData, currentUser.eSpectraPartyStatus);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n $scope.saveIndividualStatusDetails = function (index, userStatusData, eSpectraUserStatus) {\r\n progressBarService.showProgressBar();\r\n if (userStatusData.statusValue.toLowerCase() == eSpectraUserStatus.toLowerCase() && userStatusData.eSpectraAdminNote == \"\") {\r\n $scope.changePassword();\r\n } else {\r\n angular.forEach($scope.status, function (value, key) {\r\n if (value.eSpectraTypeItemName == userStatusData.statusValue) {\r\n userStatusData.statusId = value.eSpectraTypeID;\r\n }\r\n });\r\n userManagementService.updateStatus(userStatusData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.closeEditUserProfileModal();\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n if (userStatusData.statusValue.toLowerCase() === 'suspended')\r\n $scope.sendSuspendedUserAccountMailtoUser(userStatusData.emailID, userStatusData.userFirstName);\r\n if (userStatusData.statusValue.toLowerCase() === 'deprecated')\r\n $scope.sendDeletedUserAccountMailtoUser(userStatusData.emailID, userStatusData.userFirstName);\r\n $scope.changePassword();\r\n }\r\n\r\n });\r\n }\r\n }\r\n\r\n $scope.sendSuspendedUserAccountMailtoUser = function (emailID, userFirstName) {\r\n userManagementService.sendSuspendedUserAccountMailtoUser(emailID, userFirstName);\r\n }\r\n\r\n $scope.sendDeletedUserAccountMailtoUser = function (emailID, userFirstName) {\r\n userManagementService.sendDeletedUserAccountMailtoUser(emailID, userFirstName);\r\n }\r\n\r\n $scope.changePassword = function () {\r\n\r\n var data = {\r\n eSpectraEmail: $scope.profileData.eSpectraEmail,\r\n eSpectraPassword: $scope.profileData.registeredPassword\r\n }\r\n if (data.eSpectraPassword == \"\") {\r\n $scope.isSuccess = true;\r\n $scope.message = \"Profile has been updated successfully for user with email id '\" + data.eSpectraEmail + \"'\";\r\n $scope.getData();;\r\n } else {\r\n userManagementService.resetPassword(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n $scope.closeEditUserProfileModal();\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n $scope.isSuccess = true;\r\n senNotification(data);\r\n $scope.message = \"Profile has been updated successfully for user with email id '\" + data.eSpectraEmail + \"'\";\r\n $scope.getData();\r\n }\r\n });\r\n }\r\n }\r\n\r\n var senNotification = function (data) {\r\n userManagementService.notificationSuperadminChangePassword(data);\r\n };\r\n\r\n $scope.ValidateUserDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#eSpectraLastName\").val() != '') {\r\n $(\"#eSpectraLastName\").removeClass(\"border-red\");\r\n $(\"#eSpectraLastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n var regExp = /^[a-zA-Z](?!.*-.*-.*)(?!.*\\s.*\\s.*)[a-zA-Z- ]+$/;\r\n var isValid = regExp.test(angular.element(\"#eSpectraLastName\").val());\r\n if (isValid) {\r\n $(\"#eSpectraLastName\").removeClass(\"border-red\");\r\n $(\"#eSpectraLastName\").siblings('span').find(\"span.error-msg\").addClass('display-none')\r\n }\r\n else {\r\n if (returnVal) {\r\n $(\"#eSpectraLastName\").focus();\r\n }\r\n $(\"#eSpectraLastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n //$(\"#eSpectraLastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#eSpectraLastName\").focus();\r\n }\r\n $(\"#eSpectraLastName\").siblings('span').find(\"span.error-msg\").removeClass('display-none')\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.profileForm.eSpectraLastName.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n $scope.editIndividualSubPackEndDate = function (index) {\r\n $scope.userSubpackPurchaseDetails[index].isExpiryDateEditable = !$scope.userSubpackPurchaseDetails[index].isExpiryDateEditable;\r\n $scope.isWrongExpiryDate = false;\r\n }\r\n\r\n $scope.showNextPurchaseDetailsPage = function () {\r\n $scope.purchaseDetailscurrentPage = $scope.purchaseDetailscurrentPage + 1;\r\n $scope.userSubpackPurchaseDetails[0].isExpiryDateEditable = false\r\n }\r\n\r\n $scope.showNextCommentDetailsPage = function () {\r\n $scope.commentDetailsCurrentPage = $scope.commentDetailsCurrentPage + 1;\r\n }\r\n\r\n $scope.deleteSubpack = function (purchaseData, $index) {\r\n $scope.isShowAddSubPackIcon = true;\r\n $scope.userSubpackPurchaseDetails.splice($index, 1);\r\n $scope.deletedSubPackIds = $scope.deletedSubPackIds + purchaseData.eSpectraOrderID + ',';\r\n if ($scope.userSubpackPurchaseDetails.length != 0) {\r\n document.getElementById('edit-' + ($index + 1)).classList.remove('ng-hide');\r\n document.getElementById('delete-' + ($index + 1)).classList.remove('ng-hide');\r\n document.getElementById('save-' + ($index + 1)).classList.remove('ng-hide');\r\n }\r\n }\r\n\r\n $scope.addMonthlySubscriptionPack = function () {\r\n $scope.activeTab = 1;\r\n $scope.isShowAddSubPackIcon = false;\r\n $scope.addMonthlySubscription = true;\r\n var newSubStartDate, eSpectraExpiryDate, newSubExpiryDate, todayDate;\r\n todayDate = new Date();\r\n todayDate.setHours(0, 0, 0, 0);\r\n if ($scope.userSubpackPurchaseDetails.length != 0) {\r\n eSpectraExpiryDate = new Date($scope.userSubpackPurchaseDetails[0].eSpectraOrderEndDate);\r\n eSpectraExpiryDate.setHours(0, 0, 0, 0);\r\n if (todayDate <= eSpectraExpiryDate) {\r\n $scope.userSubpackPurchaseDetails[0].isExpiryDateEditable = $scope.userSubpackPurchaseDetails[0].isExpiryDateEditable == true ? false : '';\r\n newSubStartDate = new Date(eSpectraExpiryDate.setDate(eSpectraExpiryDate.getDate() + 1));\r\n newSubExpiryDate = new Date(eSpectraExpiryDate.setMonth(eSpectraExpiryDate.getMonth() + 1));\r\n } else {\r\n newSubStartDate = new Date();\r\n newSubExpiryDate = new Date(todayDate.setMonth(todayDate.getMonth() + 1));\r\n }\r\n } else {\r\n newSubStartDate = new Date();\r\n newSubExpiryDate = new Date(todayDate.setMonth(todayDate.getMonth() + 1));\r\n }\r\n var newSubscription = {\r\n eSpectraSubPackPlanType: 'Monthly',\r\n premiumType: 'Premium',\r\n eSpectraOrderStartDate: newSubStartDate,\r\n eSpectraOrderEndDate: newSubExpiryDate\r\n }\r\n $scope.userSubpackPurchaseDetails.unshift(newSubscription);\r\n }\r\n\r\n $scope.removeMonthlySubscriptionPack = function () {\r\n $scope.activeTab = 1;\r\n $scope.addMonthlySubscription = false;\r\n $scope.isShowAddSubPackIcon = true;\r\n $scope.userSubpackPurchaseDetails.splice(0, 1);\r\n }\r\n\r\n $scope.viewAnalytics = function (emailId) {\r\n $rootScope.eSpectraUserAnalyticsEmailID = emailId;\r\n $location.path('/admin/storagemanagement');\r\n }\r\n\r\n $scope.viewTransactions = function (emailId) {\r\n $rootScope.eSpectraUserTransactionsEmailID = emailId;\r\n $location.path('/subscriptionReport');\r\n }\r\n\r\n $scope.updateIndividualSubPackEndDate = function (index) {\r\n var newExpiryDate = new Date($('#eSpectraExpiryDate').val());\r\n var cureentStartDate = new Date($scope.userSubpackPurchaseDetails[index].eSpectraOrderStartDate)\r\n var cureentExpiryDate = new Date($scope.userSubpackPurchaseDetails[index].eSpectraOrderEndDate)\r\n cureentExpiryDate = (cureentExpiryDate.getMonth() + 1) + '-' + cureentExpiryDate.getDate() + '-' + cureentExpiryDate.getFullYear();\r\n var todayDate = new Date();\r\n if (newExpiryDate >= todayDate && cureentStartDate < newExpiryDate && cureentExpiryDate != $('#eSpectraExpiryDate').val()) {\r\n $scope.userSubpackPurchaseDetails[index].eSpectraOrderEndDate = $('#eSpectraExpiryDate').val();\r\n $scope.userSubpackPurchaseDetails[index].isExpiryDateEditable = false;\r\n $scope.userSubpackPurchaseDetails[index].isExpiryDateUpdated = true;\r\n $scope.isWrongExpiryDate = false;\r\n } else {\r\n $scope.isWrongExpiryDate = true;\r\n }\r\n }\r\n\r\n $scope.hideWrongExpiryDateMessage = function () {\r\n $scope.isWrongExpiryDate = false;\r\n }\r\n\r\n $scope.selectAffiliation = function () {\r\n\r\n $('#affiliationName').val('');\r\n $scope.isAffiliationDivActive = true;\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n $scope.selectedInstitute.InstitutionId = $scope.profileData.InstitutionId;\r\n if (!$scope.selectedInstitute.isAffiliationExists) {\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n $scope.selectedInstitute.InstitutionName = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n } else {\r\n if ($scope.profileData.eSpectraPrimaryAffiliationName.length == 0) {\r\n $scope.selectedInstitute.isAffiliationExists = false\r\n //$('#affiliationName').removeAttr('disabled');\r\n }\r\n $scope.selectedInstitute.userDefinedAffiliation = $scope.profileData.eSpectraPrimaryAffiliationName;\r\n }\r\n\r\n $('#affiliation').modal('show');\r\n }\r\n\r\n $scope.downloadStatusHistory = function () {\r\n\r\n progressBarService.showProgressBar();\r\n var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1; //January is 0!\r\n\r\n yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n currentDate = mm + '/' + dd + '/' + yyyy;\r\n\r\n var data = {\r\n eSpectraPersonID: $scope.personId\r\n }\r\n\r\n userManagementService.getUserHistory(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n }\r\n else {\r\n var csv = UserHistory_ConvertArrayOfObjectsToCSV({\r\n data: response.data\r\n });\r\n\r\n BlobDownloadCSV('UserStatusHistory_' + currentDate + '.csv', csv)\r\n\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n function UserHistory_ConvertArrayOfObjectsToCSV(args) {\r\n\r\n var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n data = args.data || null;\r\n if (data == null || !data.length) {\r\n return null;\r\n }\r\n\r\n columnDelimiter = args.columnDelimiter || ',';\r\n lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n keys = Object.keys(data[0]).slice(1);\r\n\r\n headers = [\"Admin Name\",\r\n \"Status\",\r\n \"Admin Note\",\r\n \"Status Date\"\r\n ]\r\n\r\n result = 'Report Name' + columnDelimiter + \"User Status History Report\" + lineDelimiter;\r\n\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n\r\n data.forEach(function (item) {\r\n\r\n ctr = 0;\r\n keys.forEach(function (key) {\r\n if (ctr > 0) result += columnDelimiter;\r\n\r\n result += item[key];\r\n ctr++;\r\n });\r\n result += lineDelimiter;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n $scope.setTab = function (tab) {\r\n $scope.activeTab = tab;\r\n }\r\n\r\n $scope.checkLenghtOfComment = function (index) {\r\n if ($scope.userStatusHistoryDetails[index].newAdminNote.length <= 500) {\r\n $scope.userStatusHistoryDetails[index].isShowCommentError = false\r\n $scope.isCommentError = false;\r\n } else {\r\n $scope.userStatusHistoryDetails[index].isShowCommentError = true;\r\n $scope.isCommentError = true;\r\n }\r\n }\r\n\r\n $scope.closeEditUserProfileModal = function () {\r\n $('#editUserProfileModal').modal('hide');\r\n $('div.modal-backdrop').remove();\r\n }\r\n\r\n }]);\r\n})();","'use strict';\r\n\r\napp.controller('searchcontroller', ['$scope', '$location', '$window', '$http', '$cookies', 'searchservice', 'searchDataService', 'plotDataService', 'GetSpectrumIDServices', 'plotgraphservice', 'progressBarService', '$compile', '$rootScope', 'deviceDetector', '$timeout', '$routeParams', 'storeUploadService', 'DataManagementService', function ($scope, $location, $window, $http, $cookies, searchservice, searchDataService, plotDataService, GetSpectrumIDServices, plotgraphservice, progressBarService, $compile, $rootScope, deviceDetector, $timeout, $routeParams, storeUploadService, dataManagementService) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n $rootScope.selectedWorkspaceName = $rootScope.selectedWorkspaceName == undefined || $rootScope.selectedWorkspaceName == \"\" ? 'Choose Workspace' : $rootScope.selectedWorkspaceName;\r\n\r\n $scope.showSavebtn = false;\r\n $scope.isUVTechSelected = false;\r\n $scope.isUVTechSearchResult = false;\r\n\r\n $scope.serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n $scope.isKratosData = getLocalValue(\"isKratosData\");\r\n\r\n $scope.pagingInfoEnegry = searchDataService.pagingInfoEnegry;\r\n $scope.pagingInfo = searchDataService.pagingInfo;\r\n $scope.viewMyDataPagingInfo = searchDataService.viewMyDataPagingInfo;\r\n $scope.viewTeamDataPagingInfo = searchDataService.viewTeamDataPagingInfo;\r\n $scope.searchTypeBasic = searchDataService.searchTypeBasic;\r\n if (searchDataService.techniques.length == 0) {\r\n var objectTechniques = getLocalValue(\"objectTechniques\");\r\n\r\n angular.forEach(objectTechniques, function (value, key) {\r\n searchDataService.techniques.push({\r\n name: value,\r\n selected: value.toLowerCase() == 'xps' || value.toLowerCase() == 'ups' ? true : false,\r\n disabled: false\r\n })\r\n });\r\n }\r\n $scope.techniques = searchDataService.techniques;\r\n\r\n $scope.selection = searchDataService.selection;\r\n // spectral\r\n $scope.spectrals = searchDataService.spectrals;\r\n\r\n $scope.selectionSpectral = searchDataService.selectionSpectral;\r\n\r\n searchservice.getAllSavedWorkSpace($scope);\r\n\r\n $scope.collapsableRowsSwitchOn = searchDataService.collapsableRowsSwitchOn;\r\n\r\n $scope.currentTab = $scope.pagingInfo.currentTab;\r\n\r\n $scope.isActiveTab = function (tabIndex) {\r\n return tabIndex === $scope.currentTab\r\n };\r\n\r\n $scope.isActiveTab($scope.currentTab);\r\n\r\n $scope.onClickTab = function (tabIndex) {\r\n $scope.currentTab = tabIndex;\r\n $scope.pagingInfo.currentTab = tabIndex;\r\n searchDataService.pagingInfo.currentTab = tabIndex;\r\n if (tabIndex == 2 && $scope.viewMyDataSearchResults === undefined) {\r\n $scope.search();\r\n } else if (tabIndex == 2 && $scope.viewMyDataSearchResults.length <= 0) {\r\n $scope.search();\r\n } else if (tabIndex == 3 && $scope.viewTeamDataSearchResults === undefined) {\r\n $scope.search();\r\n } else if (tabIndex == 3 && $scope.viewTeamDataSearchResults.length <= 0) {\r\n $scope.search();\r\n }\r\n return tabIndex == $scope.currentTab\r\n };\r\n\r\n $scope.showAdvancedSearch = function (isAdvancedSearch) {\r\n $scope.searchTypeBasic = !isAdvancedSearch;\r\n searchDataService.searchTypeBasic = $scope.searchTypeBasic;\r\n if (isAdvancedSearch) {\r\n if ($scope.pagingInfo.keywords.length > 0) {\r\n $($('.keywords')[1]).focus();\r\n $($('.keywords')[1]).parent().siblings(\"label\").addClass(\"active\");\r\n $($('.keywords')[1]).siblings(\"label\").addClass(\"active\");\r\n } else {\r\n $($('.keywords')[1]).parent().siblings(\"label\").removeClass(\"active\");\r\n $($('.keywords')[1]).siblings(\"label\").removeClass(\"active\");\r\n }\r\n } else {\r\n if ($scope.pagingInfo.keywords.length > 0) {\r\n $('.keywords').focus();\r\n $('.keywords').parent().siblings(\"label\").addClass(\"active\");\r\n $('.keywords').siblings(\"label\").addClass(\"active\");\r\n } else {\r\n $('.keywords').parent().siblings(\"label\").removeClass(\"active\");\r\n $('.keywords').siblings(\"label\").removeClass(\"active\");\r\n }\r\n }\r\n }\r\n\r\n $scope.pagingInfoDate = searchDataService.pagingInfoDate;\r\n\r\n $(\"#fromDate\").val($scope.pagingInfoDate.startVal);\r\n\r\n $(\"#toDate\").val($scope.pagingInfoDate.endVal);\r\n\r\n var vm = this;\r\n vm.data = deviceDetector;\r\n vm.allData = JSON.stringify(vm.data, null, 2);\r\n if (vm != null) {\r\n $scope.deviceName = vm.data.device;\r\n }\r\n\r\n $scope.showFiguresDetailsTableHeader = 0;\r\n $rootScope.SearchLinkCSS = 'active';\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n $rootScope.SaveWorkspaceLinkCSS = '';\r\n\r\n $scope.UnPublishedDataSet = [];\r\n\r\n $scope.generateYear = function () {\r\n var i, yr, now = new Date();\r\n for (i = now.getFullYear() ; i >= 1992; i--) {\r\n\r\n $('.year-dropdown').append('
  • ' + i + '
  • ');\r\n };\r\n }\r\n\r\n $scope.generateYear();\r\n\r\n $scope.reset = function (event) {\r\n $scope.isActiveTab(1);\r\n $scope.currentTab = 1;\r\n\r\n $(\"#searchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewMyDataSearchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewTeamDataSearchResultsContainer\").removeClass(\"in\");\r\n\r\n $scope.searchResultMsg = \"Kindly search for a dataset.\";\r\n $scope.viewMyDataSearchResultMsg = \"Kindly search for a dataset.\";\r\n $scope.viewTeamDataSearchResultMsg = \"Kindly search for a dataset.\";\r\n\r\n $(\".no-dataset-msg\").show();\r\n $(\".search-result-div\").css(\"min-height\", $(\".search-result-div\").siblings(\".col-md-4\").height());\r\n\r\n $scope.searchResults = [];\r\n $scope.viewMyDataSearchResults = [];\r\n $scope.viewTeamDataSearchResults = [];\r\n\r\n $(\".input-feild-textbox\").val(\"\");\r\n $scope.changedField = '';\r\n $(\".input-feild-textbox\").typeahead('destroy');\r\n $(\".input-feild-textbox\").removeClass(\"border-red\");\r\n\r\n $(\"#searchCriteriaContainer\").find(\".control-label\").not(\".spectral-region\").removeClass(\"active\");\r\n $(\"#searchCriteriaContainer\").find(\".control-label\").find(\"span\").not(\".doi-eg\").hide();\r\n $(\"#viewMyDataSearchCriteriaContainer\").find(\".control-label\").not(\".spectral-region\").removeClass(\"active\");\r\n $(\"#viewMyDataSearchCriteriaContainer\").find(\".control-label\").find(\"span\").not(\".doi-eg\").hide();\r\n $(\"#viewTeamDataSearchCriteriaContainer\").find(\".control-label\").not(\".spectral-region\").removeClass(\"active\");\r\n $(\"#viewTeamDataSearchCriteriaContainer\").find(\".control-label\").find(\"span\").not(\".doi-eg\").hide();\r\n\r\n $(\"#spectralRegion\").val('survey');\r\n $scope.selectionSpectral = ['Survey', 'Valence Band', 'Transition', 'UNSPECIFIED'];\r\n $scope.selection = ['XPS', 'UPS'];\r\n searchDataService.selection = ['XPS', 'UPS'];\r\n searchDataService.selectionSpectral = ['Survey', 'Valence Band', 'Transition', 'UNSPECIFIED'];\r\n searchDataService.collapsableRowsSwitchOn = true;\r\n $scope.collapsableRowsSwitchOn = true;\r\n //$(\".toggle-all-row-element\").hide();\r\n $(\".switch\").hide();\r\n $(\".switch > input[type='checkbox']\").prop('checked', false);\r\n var currentDate = new Date();\r\n\r\n $scope.pagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'doi',\r\n reverse: true,\r\n keywords: '',\r\n chemicalName: '',\r\n hostMaterial: '',\r\n transition: '',\r\n element: '',\r\n authorLName: '',\r\n spectralRegion: '',\r\n startVal: '',\r\n endVal: '',\r\n fromDate: '',\r\n toDate: '',\r\n articleName: '',\r\n technique: '',\r\n doi: '',\r\n rangeApplied: false,\r\n currentTab: 1,\r\n casRegistryNumber: '',\r\n pubYear: ''\r\n };\r\n\r\n $scope.viewMyDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n $scope.viewTeamDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n $scope.pagingInfoEnegry = {\r\n startVal: '', endVal: '', min: '', max: '', options: {\r\n floor: '',\r\n ceil: '',\r\n step: 1\r\n }\r\n };\r\n\r\n $scope.pagingInfoDate = {\r\n startVal: '', endVal: '', min: '', max: '', options: {\r\n floor: '',\r\n ceil: '',\r\n step: 1\r\n }\r\n };\r\n\r\n\r\n searchDataService.showBackupData = false;\r\n\r\n //clear all array stored backups\r\n //searchDataService.pagingInfo = $scope.originForm;\r\n $scope.currentPage = 1;\r\n $scope.viewMyDataCurrentPage = 1;\r\n $scope.viewTeamDataCurrentPage = 1;\r\n\r\n searchDataService.currentPage = 1;\r\n searchDataService.viewMyDataCurrentPage = 1;\r\n searchDataService.viewTeamDataCurrentPage = 1;\r\n\r\n searchDataService.searchResultsBackup = [];\r\n searchDataService.viewMyDataSearchResultsBackup = [];\r\n searchDataService.viewTeamDataSearchResultsBackup = [];\r\n\r\n //Enable submt button\r\n $(\"#submitButton\").removeClass(\"disabled\");\r\n $(\"#submitButton\").prop(\"disabled\", false);\r\n $(\"#toDate\").prop(\"disabled\", true);\r\n //$(\"#submitButton\").focus();\r\n if (event != undefined) {\r\n event.preventDefault();\r\n }\r\n\r\n $(\"html, body\").animate({\r\n scrollTop: 0\r\n }, \"500\");\r\n $scope.isUVTechSelected = false;\r\n $scope.techniques = [];\r\n var objectTechniques = getLocalValue(\"objectTechniques\");\r\n angular.forEach(objectTechniques, function (value, key) {\r\n $scope.techniques.push({\r\n name: value,\r\n selected: value.toLowerCase() == 'xps' || value.toLowerCase() == 'ups' ? true : false,\r\n disabled: false\r\n })\r\n });\r\n };\r\n\r\n $scope.CloseWorkSpace = function () {\r\n angular.element(document.getElementsByClassName(\"pull-right clear-all-datasets\")).hide();\r\n $rootScope.SelectedWorkArea = null;\r\n //searchservice.deleteUnpublishedDataSets($scope, '', '', true);\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearObjectIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n plotDataService.clearFiles();\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).parent().removeClass(\"active\").addClass(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).addClass(\"disabled\").attr(\"disabled\", true);\r\n\r\n $rootScope.selectedWorkspaceName = 'Choose Workspace';\r\n\r\n $(\".plot-chart\").addClass(\"disabled\");\r\n $(\".plot-chart\").prop(\"disabled\", true);\r\n\r\n $(\"#searchResultsTable\").find(\".added-row\").removeClass(\"added-row\");\r\n $(\"#searchResultsTable\").find(\".add-chemical\").removeClass(\"fa-minus remove-chemical color-red\").addClass(\"fa-plus\")\r\n $(\"#viewMyDataSearchResultsTable\").find(\".added-row\").removeClass(\"added-row\");\r\n $(\"#viewMyDataSearchResultsTable\").find(\".add-chemical\").removeClass(\"fa-minus remove-chemical color-red\").addClass(\"fa-plus\")\r\n $(\"#viewTeamDataSearchResultsTable\").find(\".added-row\").removeClass(\"added-row\");\r\n $(\"#viewTeamDataSearchResultsTable\").find(\".add-chemical\").removeClass(\"fa-minus remove-chemical color-red\").addClass(\"fa-plus\")\r\n\r\n $(\"#addedChemicals tbody\").children().remove();\r\n $(\".no-chemical-msg\").fadeIn();\r\n $(\".plotting-area\").parent().removeClass(\"active\").addClass(\"disabled\");\r\n $(\".plotting-area\").addClass(\"disabled\").attr(\"disabled\", true);\r\n }\r\n\r\n $scope.ClearSpectrumIds = function () {\r\n progressBarService.showProgressBar();\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearObjectIds();\r\n //searchservice.deleteUnpublishedDataSets($scope, '', '', true);\r\n plotDataService.clearTechnique();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n plotDataService.clearFiles();\r\n progressBarService.hideProgressBar();\r\n\r\n $scope.CloseWorkSpace();\r\n }\r\n\r\n //if ($cookies.get('SessionID') != null && $cookies.get('SessionID') != 'undefined' && $cookies.get('SessionID') != '') {\r\n // $scope.SessionUploadID = $cookies.get('SessionID');\r\n //}\r\n //else {\r\n if (!getLocalValue('isRedirectedFromPlotgraph')) {\r\n searchservice.getSessionID($scope);\r\n $scope.reset();\r\n $scope.searchTypeBasic = true;\r\n $scope.collapsableRowsSwitchOn = true;\r\n if (!$routeParams.mode) {\r\n $scope.ClearSpectrumIds();\r\n $rootScope.SelectedWorkArea = undefined;\r\n }\r\n }\r\n\r\n //searchservice.getUnpublishedFile($scope);\r\n\r\n $scope.unPublishedIDs = 0;\r\n if ($scope.unPublishedIDs == \"undefined\") {\r\n $scope.unPublishedIDs = 0;\r\n }\r\n\r\n $scope.SetWorkSpaceData = function () {\r\n\r\n var spectrumIdList = plotDataService.getSpectrumIds();\r\n //var objectIdList = plotDataService.getObjectIds();\r\n\r\n\r\n if (spectrumIdList != null && spectrumIdList.length > 0) {\r\n for (var i = 0; i < spectrumIdList.length; i++) {\r\n var details = plotDataService.getSpectrumId(spectrumIdList[i])\r\n if (details != null && details.isValidFigureData) {\r\n $scope.workareaId = details.WorkAreaID;\r\n $scope.SetDataSetOnLoad(details.ObjectID, details.SpectrumId, details.Technique, details.ChemicalName, details.HostMaterial, details.SpectralRegion, details.PublicationYear, details.Doi, details.FileName, details.IsCurated, details.index);\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n $scope.SetWorkSpaceFileData = function () {\r\n var spectrumFiles = plotDataService.getFiles();\r\n if (spectrumFiles != null && spectrumFiles.length > 0) {\r\n for (var i = 0; i < spectrumFiles.length; i++) {\r\n var details = plotDataService.getfileByName(spectrumFiles[i])\r\n if (details != null && details.isValidFigureData) {\r\n $scope.workareaId = details.WorkAreaID;\r\n $scope.SetDataSetOnLoad(details.ObjectID, details.SpectrumId, details.Technique, details.ChemicalName, details.HostMaterial, details.SpectralRegion, details.PublicationYear, details.Doi, details.FileName, details.IsCurated, details.index);\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n $scope.SetDataSetOnLoad = function (objectId, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName, isCurated, index) {\r\n\r\n var createString;\r\n var selectedField = [];\r\n\r\n selectedField.push(doi);\r\n\r\n if (technique != null && technique != \"\") {\r\n selectedField.push(technique);\r\n }\r\n\r\n if (chemicalName != null && chemicalName != \"\") {\r\n selectedField.push(chemicalName);\r\n }\r\n\r\n //if (hostMaterial != null && hostMaterial != \"\") {\r\n // selectedField.push(hostMaterial);\r\n //}\r\n\r\n if (spectralRegion != null && spectralRegion != \"\") {\r\n selectedField.push(spectralRegion);\r\n }\r\n\r\n if (publicationYear != null && publicationYear != \"\") {\r\n selectedField.push(publicationYear.split(\"-\")[0]);\r\n }\r\n\r\n createString = selectedField.join(\" - \");\r\n\r\n var chkTechnique = searchDataService.showBackupData == false ? $scope.selection : searchDataService.selection;\r\n var selectedTech = chkTechnique.join('-');\r\n\r\n var chkSpectral = searchDataService.showBackupData == false ? $scope.selectionSpectral : searchDataService.selectionSpectral;\r\n var selectedSpectral = chkSpectral.join('-');\r\n\r\n var keywordSearch = angular.element(\"#advKeywords\").val().replace('\"', '');\r\n\r\n var SearchString = \"KeyWord:\" + keywordSearch + \"|ChemicalName:\" + angular.element(\"#chemicalName\").val() + \"|Element:\" + angular.element(\"#element\").val() + \"|HostMaterial:\" + angular.element(\"#hostMaterial\").val() + \"|Transition:\" + angular.element(\"#transition\").val() + \"|Technique:\" + selectedTech.trim() + \"|Accession:\" + angular.element(\"#articleName\").val() + \"|AuthorLastName:\" + angular.element(\"#authorLName\").val() + \"|SpectralRegion:\" + selectedSpectral.trim() + \"|StartValue:\" + angular.element(\"#enegryStartVal\").val() + \"|EndValue:\" + angular.element(\"#enegryEndVal\").val() + \"|FromYear:\" + angular.element(\"#fromDate\").val() + \"|Todate:\" + angular.element(\"#toDate\").val() + \"|Doi:\" + angular.element(\"#doi\").val() + \"\";\r\n var UvVisSearchString = \"KeyWord:\" + keywordSearch + \"|ChemicalName:\" + angular.element(\"#chemicalName\").val() + \"|CasRegistryNumber:\" + angular.element(\"#casRegistryNumber\").val() + \"|Technique:\" + selectedTech.trim() + \"|AuthorLastName:\" + angular.element(\"#authorLName\").val() + \"|PublicationYear:\" + angular.element(\"#pubYear\").val() + \"|SourceTitle:\" + angular.element(\"#articleName\").val();\r\n SearchString = technique.toLowerCase() == 'uv-vis' ? UvVisSearchString : SearchString;\r\n plotDataService.addSearchString(SearchString.toString(), spectrumId, $scope.workareaId, true);\r\n var rowid = parseInt(spectrumId) == 0 ? fileName : objectId;\r\n var newRow = '' + createString + '';\r\n var compiledHtml = $compile(newRow)($scope);\r\n angular.element(document.getElementById('addedChemicals')).append(compiledHtml);\r\n\r\n $(\".plot-chart\").removeClass(\"disabled\");\r\n $(\".plot-chart\").prop(\"disabled\", false);\r\n $(\".clear-all-datasets\").show();\r\n $(\".no-chemical-msg\").hide();\r\n $(\".added-chemicals-title\").removeClass(\"title-border-bottom\");\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-row\" + rowid).fadeIn(function () {\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-row\" + rowid).removeClass(\"added-row\");\r\n });\r\n\r\n //plotDataService.setTechnique(objectId, technique, true);\r\n }\r\n $scope.RemoveDataset = function (spectraObjectID) {\r\n plotDataService.removeSpectrumIds(spectraObjectID);\r\n plotDataService.removeFiles(spectraObjectID);\r\n plotDataService.removeObjectIds(spectraObjectID);\r\n plotDataService.setTechnique(spectraObjectID, technique, false);\r\n plotDataService.removeDataSetDisplayString(spectraObjectID);\r\n plotDataService.removeDataSetDisplayString(spectraObjectID);\r\n plotDataService.removeSearchString(spectraObjectID);\r\n plotDataService.removeSearchString(spectraObjectID);\r\n $('.row'+spectraObjectID).removeClass('added-row');\r\n };\r\n $scope.SetWorkSpaceData();\r\n\r\n $scope.SetWorkSpaceFileData();\r\n\r\n $scope.changedField = '';\r\n\r\n $scope.searchResultMsg = \"Kindly search for a dataset.\";\r\n\r\n $scope.viewMyDataSearchResultMsg = \"Kindly search for a dataset.\";\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n $scope.search = function (clickedFrom) {\r\n $rootScope.fromworkspaceurl = false;\r\n progressBarService.showProgressBar();\r\n $scope.clickedFromSearchButton = false;\r\n\r\n if ($scope.selectedTechs != undefined && !angular.equals($scope.selectedTechs, $scope.selection)) {\r\n $scope.ClearSpectrumIds();\r\n progressBarService.showProgressBar();\r\n }\r\n if (clickedFrom == 'SearchButton') {\r\n searchDataService.showBackupData = false;\r\n $scope.clickedFromSearchButton = true;\r\n\r\n $scope.currentPage = 1;\r\n $scope.viewMyDataCurrentPage = 1;\r\n $scope.viewTeamDataCurrentPage = 1;\r\n\r\n searchDataService.currentPage = 1;\r\n searchDataService.viewMyDataCurrentPage = 1;\r\n searchDataService.viewTeamDataCurrentPage = 1;\r\n\r\n $scope.pagingInfo.sortBy = 'doi';\r\n $scope.pagingInfo.reverse = true\r\n\r\n }\r\n\r\n if ($(\"#searchUploadChemicals input[type=text]\").hasClass(\"border-red\")) {\r\n $(\"#searchUploadChemicals input[type=text].border-red\").focus();\r\n progressBarService.hideProgressBar();\r\n return false;\r\n }\r\n\r\n if ($rootScope.SelectedWorkArea != undefined && $rootScope.SelectedWorkArea.isUVTechData) {\r\n $scope.selection = ['UV-VIS'];\r\n searchDataService.selection = $scope.selection;\r\n }\r\n\r\n var chkTechnique = searchDataService.showBackupData == false ? $scope.selection : searchDataService.selection;\r\n var selectedTech = chkTechnique.join();\r\n //$scope.isUVTechSelected = selectedTech.toLowerCase() == 'uv-vis' ? true : false;\r\n\r\n if (selectedTech.toLowerCase() == 'uv-vis') {\r\n $scope.isUVTechSelected = true;\r\n $scope.selectionSpectral = [];\r\n searchDataService.selectionSpectral = [];\r\n angular.forEach($scope.techniques, function (value, key) {\r\n if (value.name.toLowerCase() != \"uv-vis\") {\r\n $scope.techniques[key].selected = false;\r\n } else {\r\n $scope.techniques[key].selected = true;\r\n }\r\n });\r\n\r\n } else {\r\n angular.forEach(chkTechnique, function (value, key) {\r\n $scope.techniques[findIndexFromArrayList(value)].selected = true;\r\n });\r\n }\r\n\r\n var chkSpectral = searchDataService.showBackupData == false ? $scope.selectionSpectral : searchDataService.selectionSpectral;\r\n var selectedSpectral = chkSpectral.join();\r\n\r\n if ($scope != null && $scope.pagingInfo != null) {\r\n $scope.pagingInfo.chemicalName = searchDataService.showBackupData == false ? $(\"#chemicalName\").val().trim() : searchDataService.pagingInfo.chemicalName;\r\n $scope.pagingInfo.hostMaterial = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#hostMaterial\").val().trim() : searchDataService.pagingInfo.hostMaterial;\r\n $scope.pagingInfo.transition = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#transition\").val().trim() : searchDataService.pagingInfo.transition.trim();\r\n $scope.pagingInfo.element = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#element\").val().trim() : searchDataService.pagingInfo.element.trim();\r\n $scope.pagingInfo.authorLName = searchDataService.showBackupData == false ? $(\"#authorLName\").val().trim() : searchDataService.pagingInfo.authorLName;\r\n $scope.pagingInfo.fromDate = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#fromDate\").val().trim() : searchDataService.pagingInfoDate.startVal; //$(\"#fromDate\").val().trim();\r\n $scope.pagingInfo.toDate = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#toDate\").val().trim() : searchDataService.pagingInfoDate.endVal;// $(\"#toDate\").val().trim();\r\n $scope.pagingInfo.articleName = searchDataService.showBackupData == false ? $(\"#articleName\").val().trim() : searchDataService.pagingInfo.articleName;\r\n $scope.pagingInfo.startVal = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $scope.pagingInfoEnegry.startVal : searchDataService.pagingInfoEnegry.startVal; //$(\"#startVal\").val().trim();\r\n $scope.pagingInfo.endVal = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $scope.pagingInfoEnegry.endVal : searchDataService.pagingInfoEnegry.endVal; // $(\"#endVal\").val().trim();\r\n $scope.pagingInfo.spectralRegion = !$scope.isUVTechSelected && selectedSpectral.trim();\r\n $scope.pagingInfo.keywords = searchDataService.showBackupData == false ? $(\"#advKeywords\").val().trim() : searchDataService.pagingInfo.keywords;\r\n $scope.pagingInfo.technique = selectedTech.trim();\r\n $scope.pagingInfo.doi = !$scope.isUVTechSelected && searchDataService.showBackupData == false ? $(\"#doi\").val().trim() : searchDataService.pagingInfo.doi;\r\n\r\n if (!$scope.isUVTechSelected) {\r\n if ($scope.pagingInfo.fromDate == \"\") {\r\n $scope.pagingInfo.fromDate = \"1992\"\r\n }\r\n if ($scope.pagingInfo.toDate == \"\") {\r\n $scope.pagingInfo.toDate = new Date().getFullYear();\r\n }\r\n\r\n if ($scope.pagingInfo.startVal != \"\" || $scope.pagingInfo.endVal != \"\") {\r\n $scope.pagingInfo.rangeApplied = true;\r\n }\r\n\r\n $scope.pagingInfoDate.startVal = $(\"#fromDate\").val();\r\n $scope.pagingInfoDate.endVal = $(\"#toDate\").val();\r\n //}\r\n\r\n if (!$scope.pagingInfoEnegry) {\r\n $scope.pagingInfoEnegry = searchDataService.pagingInfoEnegry;\r\n }\r\n searchDataService.pagingInfoEnegry = $scope.pagingInfoEnegry;\r\n if (!$scope.pagingInfoDate) {\r\n $scope.pagingInfoDate = searchDataService.pagingInfoDate;\r\n }\r\n searchDataService.pagingInfoDate = $scope.pagingInfoDate;\r\n\r\n plotDataService.setStartEndValues($scope.pagingInfo.startVal, $scope.pagingInfo.endVal);\r\n }\r\n var pagingInfo = angular.copy($scope.pagingInfo);\r\n searchDataService.pagingInfo = $scope.pagingInfo;\r\n }\r\n\r\n if (clickedFrom == 'SearchButton') {\r\n $scope.pagingInfoBackup = angular.copy($scope.pagingInfo);\r\n } else {\r\n $scope.pagingInfoBackup = searchDataService.pagingInfo;\r\n }\r\n\r\n if ($scope.currentTab == 1 || $scope.clickedFromSearchButton) {\r\n pagingInfo.pageNo = $scope.currentPage;\r\n pagingInfo.sortBy = $scope.isUVTechSelected && $scope.pagingInfo.sortBy.toLowerCase() == \"doi\" ? 'chemicalName' : $scope.pagingInfo.sortBy;\r\n pagingInfo.reverse = $scope.pagingInfo.reverse;\r\n $scope.pagingInfo.pageNo = pagingInfo.pageNo;\r\n\r\n } else if ($scope.currentTab == 2) {\r\n pagingInfo.pageNo = $scope.viewMyDataCurrentPage;\r\n pagingInfo.sortBy = $scope.viewMyDataPagingInfo.sortBy;\r\n pagingInfo.reverse = $scope.viewMyDataPagingInfo.reverse;\r\n $scope.viewMyDataPagingInfo.pageNo = pagingInfo.pageNo;\r\n\r\n } else if ($scope.currentTab == 3) {\r\n pagingInfo.pageNo = $scope.viewTeamDataCurrentPage;\r\n pagingInfo.sortBy = $scope.viewTeamDataPagingInfo.sortBy;\r\n pagingInfo.reverse = $scope.viewTeamDataPagingInfo.reverse;\r\n $scope.viewTeamDataPagingInfo.pageNo = pagingInfo.pageNo;\r\n }\r\n\r\n //pagingInfo.pageNo = $scope.currentTab == 1 ? $scope.currentPage : $scope.viewMyDataCurrentPage;\r\n //pagingInfo.sortBy = $scope.currentTab == 1 || $scope.clickedFromSearchButton ? $scope.pagingInfo.sortBy : $scope.viewMyDataPagingInfo.sortBy;\r\n //pagingInfo.reverse = $scope.currentTab == 1 ? $scope.pagingInfo.reverse : $scope.viewMyDataPagingInfo.reverse;\r\n //if ($scope.currentTab == 1) {\r\n // $scope.pagingInfo.pageNo = pagingInfo.pageNo;\r\n //} else {\r\n // $scope.viewMyDataPagingInfo.pageNo = pagingInfo.pageNo;\r\n //}\r\n\r\n searchservice.search($scope, pagingInfo);\r\n $scope.setTextboxStyle();\r\n };\r\n\r\n $scope.setPage = function (pageNo) {\r\n if ($scope.currentTab == 1) {\r\n if ($('#searchResultsTable > tbody > tr').length > 0) {\r\n $scope.currentPage = pageNo;\r\n searchDataService.currentPage = pageNo;\r\n }\r\n } else if ($scope.currentTab == 2) {\r\n if ($('#viewMyDataSearchResultsTable > tbody > tr').length > 0) {\r\n $scope.viewMyDataCurrentPage = pageNo;\r\n searchDataService.viewMyDataCurrentPage = pageNo;\r\n }\r\n } else if ($scope.currentTab == 3) {\r\n if ($('#viewTeamDataSearchResultsTable > tbody > tr').length > 0) {\r\n $scope.viewTeamDataCurrentPage = pageNo;\r\n searchDataService.viewTeamDataCurrentPage = pageNo;\r\n }\r\n }\r\n\r\n $scope.currentPage = searchDataService.currentPage;\r\n $scope.viewMyDataCurrentPage = searchDataService.viewMyDataCurrentPage;\r\n $scope.viewTeamDataCurrentPage = searchDataService.viewTeamDataCurrentPage;\r\n\r\n $scope.search();\r\n };\r\n\r\n $scope.SearchCriteriaChanged = function () {\r\n\r\n if ($scope.pagingInfoBackup.chemicalName != $(\"#chemicalName\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#hostMaterial\").val() != undefined && $scope.pagingInfoBackup.hostMaterial != $(\"#hostMaterial\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#element\").val() != undefined && $scope.pagingInfoBackup.element != $(\"#element\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#transition\").val() != undefined && $scope.pagingInfoBackup.transition != $(\"#transition\").val().trim()) {\r\n return true;\r\n }\r\n if ($scope.pagingInfoBackup.keywords != $(\"#advKeywords\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#doi\").val() != undefined && $scope.pagingInfoBackup.doi != $(\"#doi\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#pubYear\").val() != undefined && $scope.pagingInfoBackup.pubYear != $(\"#pubYear\").val().trim()) {\r\n return true;\r\n }\r\n if ($(\"#casRegistryNumber\").val() != undefined && $scope.pagingInfoBackup.casRegistryNumber != $(\"#casRegistryNumber\").val().trim()) {\r\n return true;\r\n }\r\n if ($scope.pagingInfoBackup.articleName != $(\"#articleName\").val().trim()) {\r\n return true;\r\n }\r\n if ($scope.pagingInfoBackup.authorLName != $(\"#authorLName\").val().trim()) {\r\n return true;\r\n }\r\n var chkSpectral = $scope.selectionSpectral\r\n var selectedSpectral = chkSpectral.join();\r\n var chkTechnique = $scope.selection;\r\n var selectedTech = chkTechnique.join();\r\n if ($scope.pagingInfoBackup.technique != selectedTech.trim()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n // Instantiate the Bloodhound suggestion engine\r\n var autoCompleteData = new Bloodhound({\r\n datumTokenizer: function (datum) {\r\n return Bloodhound.tokenizers.whitespace(datum.value);\r\n },\r\n queryTokenizer: Bloodhound.tokenizers.whitespace,\r\n remote: {\r\n url: $scope.serviceBase + \"searchSuggession?\",\r\n replace: function (url, uriEncodedQuery) {\r\n if ($scope.CallAutoSuggession($scope.changedField, $(\"#\" + $scope.changedField).val()) == true) {\r\n var changeField = $scope.changedField == \"advKeywords\" ? \"Keywords\" : $scope.changedField;\r\n changeField = changeField == \"sourceTitle\" ? \"articleName\" : changeField;\r\n var res = (url + changeField + '=' + encodeURIComponent(uriEncodedQuery) + '&technique=' + $scope.selection.join())// + '&searchBy=' + $scope.postedBy)\r\n return res\r\n }\r\n else {\r\n return false;\r\n }\r\n },\r\n clearRemoteCache: function clearRemoteCache() {\r\n this.transport && Transport.resetCache();\r\n },\r\n filter: function (autoCompleteData) {\r\n return $.map(autoCompleteData, function (movie) {\r\n return {\r\n value: movie,\r\n };\r\n });\r\n }\r\n },\r\n limit: 100\r\n });\r\n\r\n // Initialize the Bloodhound suggestion engine\r\n autoCompleteData.initialize();\r\n\r\n // Instantiate the Typeahead UI\r\n $scope.fieldChanged = function (fieldName, e) {\r\n if (e.keyCode == '13') {\r\n $(\"#\" + fieldName).typeahead('close');\r\n }\r\n if ($scope.CallAutoSuggession(e.target.id, e.target.value) == true) {\r\n if ($scope.changedField != fieldName && e.keyCode != \"9\" && e.keyCode != \"13\") {\r\n $scope.changedField = fieldName;\r\n $(\"#\" + $scope.changedField).typeahead('destroy');\r\n $(\"#\" + $scope.changedField).typeahead(null, {\r\n displayKey: 'value',\r\n minLength: 2,\r\n source: autoCompleteData.ttAdapter(),\r\n limit: 100,\r\n dupChecker: true\r\n });\r\n //$(\"#\" + $scope.changedField).focus();\r\n setTimeout(function () {\r\n $(\"#\" + $scope.changedField).focus();\r\n var isIE11 = !!navigator.userAgent.match(/Trident.*rv\\:11\\./);\r\n if (isIE11) {\r\n $(\"#\" + $scope.changedField).val($(\"#\" + $scope.changedField).val())\r\n }\r\n }, 100);\r\n }\r\n }\r\n }\r\n\r\n $scope.redirectToPlotGraph = function (path) {\r\n $timeout(function () {\r\n progressBarService.showProgressBar();\r\n $timeout(function () {\r\n $location.path(path);\r\n }, 300);\r\n }, 0);\r\n }\r\n\r\n\r\n $scope.ShowUnsavedWorkspaceModal = function (obj, spectraObjectID, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName, isCurated, contentType, casRegistryNum, pubYear, index, resultType) {\r\n if ($rootScope.selectedWorkspaceName == 'Choose Workspace' || getCookie(\"isShowUnsavedWorkspaceModal\", $cookies) || obj.currentTarget.classList.contains(\"remove-chemical\")) {\r\n publicationYear = technique.toLowerCase() == 'uv-vis' ? pubYear : publicationYear;\r\n $scope.SetDataSet(obj, spectraObjectID, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName, isCurated, contentType, casRegistryNum, index);\r\n $('#enable-add-chemical').text('1');\r\n } else {\r\n $scope.dataSetIndex = index;\r\n $scope.resultType = resultType;\r\n $scope.eventObj = obj;\r\n $scope.isShowUnsavedWorkspaceModal = false;\r\n if ($('.fa-add-chemical').length == 1) {\r\n $('.fa-add-chemical')[0].classList.remove('fa-add-chemical');\r\n }\r\n if (!$scope.isShowUnsavedWorkspaceModal) {\r\n $('#enable-add-chemical').text('0');\r\n }\r\n $scope.eventObj.currentTarget.classList.add('fa-add-chemical');\r\n $('#unsaved-wrokspace').modal('show');\r\n }\r\n }\r\n\r\n $scope.ContinueAddingDataSet = function () {\r\n if ($scope.isShowUnsavedWorkspaceModal) {\r\n setCookie(\"isShowUnsavedWorkspaceModal\", $scope.isShowUnsavedWorkspaceModal, $cookies);\r\n $('#enable-add-chemical').text('1');\r\n }\r\n if ($scope.resultType != undefined) {\r\n $scope.SetDataSet($scope.eventObj, $scope.searchResults[$scope.dataSetIndex].spectraObjectID, $scope.searchResults[$scope.dataSetIndex].spectrumID, $scope.searchResults[$scope.dataSetIndex].technique, $scope.searchResults[$scope.dataSetIndex].chemicalName, $scope.searchResults[$scope.dataSetIndex].hostMaterial, $scope.searchResults[$scope.dataSetIndex].spectralRegion, $scope.searchResults[$scope.dataSetIndex].publicationYear, $scope.searchResults[$scope.dataSetIndex].doi, $scope.searchResults[$scope.dataSetIndex].fileName, $scope.searchResults[$scope.dataSetIndex].isCurated, $scope.searchResults[$scope.dataSetIndex].contentType, $scope.dataSetIndex)\r\n } else {\r\n $scope.SetDataSet($scope.eventObj, $scope.viewMyDataSearchResults[$scope.dataSetIndex].spectraObjectID, $scope.viewMyDataSearchResults[$scope.dataSetIndex].spectrumID, $scope.viewMyDataSearchResults[$scope.dataSetIndex].technique, $scope.viewMyDataSearchResults[$scope.dataSetIndex].chemicalName, $scope.viewMyDataSearchResults[$scope.dataSetIndex].hostMaterial, $scope.viewMyDataSearchResults[$scope.dataSetIndex].spectralRegion, $scope.viewMyDataSearchResults[$scope.dataSetIndex].publicationYear, $scope.viewMyDataSearchResults[$scope.dataSetIndex].doi, $scope.viewMyDataSearchResults[$scope.dataSetIndex].fileName, $scope.viewMyDataSearchResults[$scope.dataSetIndex].isCurated, $scope.dataSetIndex)\r\n }\r\n }\r\n\r\n $scope.SetDataSet = function (obj, spectraObjectID, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName, isCurated, contentType, casRegistryNum, index) {\r\n $('#unsaved-wrokspace').modal('hide');\r\n contentType = contentType == null ? '' : contentType.toString();\r\n if (obj.target.className.search(\"remove-chemical\") < 0) {\r\n spectrumId = spectrumId == 0 && contentType.toLowerCase() == 'kratos' ? spectraObjectID : spectrumId; // if spectrum id is null for kratos\r\n if (spectrumId != 0) {\r\n plotDataService.addSpectrumId(spectraObjectID);\r\n }\r\n if (contentType.toLowerCase() != 'kratos' && fileName != null && fileName != undefined && fileName != \"\") {// if spectrum id is null for kratos\r\n plotDataService.addFileList(spectraObjectID);\r\n }\r\n\r\n //if (spectraObjectID != 0) {\r\n // plotDataService.addObjectId(spectraObjectID);\r\n //}\r\n\r\n var createString;\r\n var selectedField = [];\r\n\r\n selectedField.push(doi);\r\n\r\n plotDataService.addChemicalname(chemicalName);\r\n\r\n if (technique != null && technique != \"\") {\r\n selectedField.push(technique);\r\n }\r\n\r\n if (chemicalName != null && chemicalName != \"\") {\r\n selectedField.push(chemicalName);\r\n }\r\n\r\n //if (hostMaterial != null && hostMaterial != \"\") {\r\n // selectedField.push(hostMaterial);\r\n //}\r\n\r\n if (spectralRegion != null && spectralRegion != \"\") {\r\n selectedField.push(spectralRegion);\r\n }\r\n\r\n if (publicationYear != null && publicationYear != \"\") {\r\n selectedField.push(publicationYear.split(\"-\")[0]);\r\n }\r\n\r\n createString = selectedField.join(\" - \");\r\n\r\n var chkTechnique = $scope.selection;\r\n var selectedTech = chkTechnique.join('-');\r\n\r\n var chkSpectral = technique.toLowerCase() == 'uv-vis' ? [] : $scope.selectionSpectral;\r\n var selectedSpectral = chkSpectral.join('-');\r\n\r\n //var rowid = parseInt(spectrumId) == 0 ? fileName.split('.')[0].replace(/ /g, '') : spectrumId;\r\n\r\n var newRow = '' + createString + '';\r\n var compiledHtml = $compile(newRow)($scope);\r\n angular.element(document.getElementById('addedChemicals')).append(compiledHtml);\r\n\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-row\" + spectraObjectID).fadeIn(function () {\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-row\" + spectraObjectID).removeClass(\"added-row\");\r\n });\r\n var keywordSearch = angular.element(\"#advKeywords\").val().replace('\"', '')\r\n var SearchString = \"KeyWord:\" + keywordSearch + \"|ChemicalName:\" + angular.element(\"#chemicalName\").val() + \"|Element:\" + angular.element(\"#element\").val() + \"|HostMaterial:\" + angular.element(\"#hostMaterial\").val() + \"|Transition:\" + angular.element(\"#transition\").val() + \"|Technique:\" + selectedTech.trim() + \"|Accession:\" + angular.element(\"#articleName\").val() + \"|AuthorLastName:\" + angular.element(\"#authorLName\").val() + \"|SpectralRegion:\" + selectedSpectral.trim() + \"|StartValue:\" + angular.element(\"#enegryStartVal\").val() + \"|EndValue:\" + angular.element(\"#enegryEndVal\").val() + \"|FromYear:\" + angular.element(\"#fromDate\").val() + \"|Todate:\" + angular.element(\"#toDate\").val() + \"|Doi:\" + angular.element(\"#doi\").val() + \"\";\r\n var UvVisSearchString = \"KeyWord:\" + keywordSearch + \"|ChemicalName:\" + angular.element(\"#chemicalName\").val() + \"|CasRegistryNumber:\" + angular.element(\"#casRegistryNumber\").val() + \"|Technique:\" + selectedTech.trim() + \"|AuthorLastName:\" + angular.element(\"#authorLName\").val() + \"|PublicationYear:\" + angular.element(\"#pubYear\").val() + \"|SourceTitle:\" + angular.element(\"#articleName\").val();\r\n SearchString = technique.toLowerCase() == 'uv-vis' ? UvVisSearchString : SearchString;\r\n\r\n plotDataService.addSearchString(SearchString.toString(), spectrumId > 0 ? spectraObjectID : 0, spectrumId, $scope.workareaId, fileName != \"\" && contentType.toLowerCase() != 'kratos' ? spectraObjectID : \"\", true, casRegistryNum, publicationYear); // // if spectrum id is null for kratos\r\n plotDataService.addSetdata($scope.workareaId, spectrumId > 0 ? spectraObjectID : 0, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName != \"\" && contentType.toLowerCase() != 'kratos' ? spectraObjectID : \"\", isCurated, true, index); //// if spectrum id is null for kratos\r\n plotDataService.setTechnique(spectraObjectID, technique, true);\r\n }\r\n else {\r\n plotDataService.removeSpectrumIds(spectraObjectID);\r\n plotDataService.removeFiles(spectraObjectID);\r\n plotDataService.removeObjectIds(spectraObjectID);\r\n plotDataService.setTechnique(spectraObjectID, technique, false);\r\n plotDataService.removeDataSetDisplayString(spectraObjectID);\r\n plotDataService.removeDataSetDisplayString(fileName);\r\n plotDataService.removeDataSetDisplayString(spectraObjectID);\r\n plotDataService.removeSearchString(spectrumId);\r\n plotDataService.removeSearchString(fileName);\r\n plotDataService.removeSearchString(spectraObjectID);\r\n }\r\n }\r\n\r\n $scope.CallAutoSuggession = function (fieldId, fieldValue) {\r\n var returnVal = false;\r\n switch (fieldId) {\r\n case 'Keywords':\r\n case 'advKeywords':\r\n case 'chemicalName':\r\n case 'hostMaterial':\r\n case 'transition':\r\n case 'authorLName':\r\n case 'articleName':\r\n case 'hostMaterial':\r\n case 'casRegistryNumber':\r\n case 'pubYear':\r\n case 'sourceTitle':\r\n if (fieldValue.length >= 2) {\r\n returnVal = true;\r\n }\r\n break;\r\n case 'element':\r\n if (fieldValue.length >= 1) {\r\n returnVal = true;\r\n }\r\n break;\r\n case 'doi':\r\n if (fieldValue.length >= 8) {\r\n returnVal = true;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n //TODO-START : Make it a server side API call and fetch date from there\r\n var xmlHttp;\r\n function srvTime() {\r\n try {\r\n //FF, Opera, Safari, Chrome\r\n xmlHttp = new XMLHttpRequest();\r\n }\r\n catch (err1) {\r\n //IE\r\n try {\r\n xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');\r\n }\r\n catch (err2) {\r\n try {\r\n xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');\r\n }\r\n catch (eerr3) {\r\n //AJAX not supported, use CPU time.\r\n alert(\"AJAX not supported\");\r\n }\r\n }\r\n }\r\n xmlHttp.open('HEAD', window.location.href.toString(), false);\r\n xmlHttp.setRequestHeader(\"Content-Type\", \"text/html\");\r\n xmlHttp.send('');\r\n return xmlHttp.getResponseHeader(\"Date\");\r\n }\r\n //TODO-END : Make it a server side API call and fetch date from there\r\n\r\n $scope.GetDataSetStatus = function (XYDataCount, dataSetId) {\r\n var retVal = 0;\r\n if (XYDataCount > 0) {\r\n retVal = 1;\r\n if (plotDataService.isSpectrumIdExist(dataSetId) >= 0) {\r\n retVal = 2;\r\n }\r\n }\r\n return retVal;\r\n };\r\n\r\n $scope.GetDataSetStatusForObjectId = function (XYDataCount, dataSetId) {\r\n var retVal = 0;\r\n if (XYDataCount > 0) {\r\n retVal = 1;\r\n if (plotDataService.isObjectIdExist(dataSetId) >= 0) {\r\n retVal = 2;\r\n }\r\n }\r\n return retVal;\r\n };\r\n\r\n $scope.GetDataSetStatusForFile = function (fileName) {\r\n var retVal = 0;\r\n if (fileName.length > 0) {\r\n retVal = 1;\r\n //var datalist = plotDataService.getSetdata();\r\n //$.each(datalist, function (index, key) {\r\n // if (key.FileName == fileName) {\r\n // retVal = 2;\r\n // }\r\n //});\r\n if (plotDataService.isFileExist(parseInt(fileName)) >= 0) {\r\n retVal = 2;\r\n }\r\n\r\n }\r\n\r\n return retVal;\r\n };\r\n\r\n $scope.RemoveSelectedDataSet = function (objectId, technique) {\r\n\r\n //if (fileName != null && fileName != undefined && fileName != \"\") {\r\n // plotDataService.removeFiles(fileName);\r\n // plotDataService.removeDataSetDisplayString(fileName);\r\n // plotDataService.removeSearchString(fileName);\r\n //} else {\r\n // plotDataService.setTechnique(spectrumId, technique, false);\r\n // plotDataService.removeSpectrumIds(spectrumId);\r\n // plotDataService.removeDataSetDisplayString(spectrumId);\r\n // plotDataService.removeSearchString(spectrumId);\r\n //}\r\n plotDataService.removeFiles(objectId);\r\n plotDataService.removeSpectrumIds(objectId);\r\n plotDataService.setTechnique(objectId, technique, false);\r\n plotDataService.removeObjectIds(objectId);\r\n plotDataService.removeDataSetDisplayString(objectId);\r\n plotDataService.removeSearchString(objectId);\r\n\r\n }\r\n\r\n $scope.sort = function (sortBy) {\r\n\r\n if ($(\"#searchUploadChemicals input[type=text]\").hasClass(\"border-red\") || $scope.SearchCriteriaChanged()) {\r\n progressBarService.hideProgressBar();\r\n return false;\r\n }\r\n if ($scope.currentTab == 1) {\r\n if (sortBy === $scope.pagingInfo.sortBy) {\r\n $scope.pagingInfo.reverse = !$scope.pagingInfo.reverse;\r\n searchDataService.pagingInfo.reverse = $scope.pagingInfo.reverse;\r\n } else {\r\n $scope.pagingInfo.sortBy = sortBy;\r\n $scope.pagingInfo.reverse = false;\r\n\r\n searchDataService.pagingInfo.sortBy = sortBy;\r\n searchDataService.pagingInfo.reverse = false;\r\n }\r\n\r\n $scope.pagingInfo.page = 1;\r\n $scope.currentPage = 1;\r\n\r\n searchDataService.pagingInfo.page = 1;\r\n searchDataService.currentPage = 1;\r\n } else if ($scope.currentTab == 2) {\r\n if (sortBy === $scope.viewMyDataPagingInfo.sortBy) {\r\n //$scope.pagingInfo.reverse = !$scope.viewMyDataPagingInfo.reverse;\r\n $scope.viewMyDataPagingInfo.reverse = !$scope.viewMyDataPagingInfo.reverse;\r\n searchDataService.viewMyDataPagingInfo.reverse = $scope.viewMyDataPagingInfo.reverse;\r\n } else {\r\n //$scope.pagingInfo.sortBy = sortBy;\r\n //$scope.pagingInfo.reverse = false;\r\n\r\n $scope.viewMyDataPagingInfo.sortBy = sortBy;\r\n $scope.viewMyDataPagingInfo.reverse = false;\r\n\r\n searchDataService.viewMyDataPagingInfo.sortBy = sortBy;\r\n searchDataService.viewMyDataPagingInfo.reverse = false;\r\n }\r\n $scope.viewMyDataPagingInfo.page = 1;\r\n $scope.viewMyDataCurrentPage = 1;\r\n\r\n searchDataService.viewMyDataPagingInfo.page = 1;\r\n searchDataService.viewMyDataCurrentPage = 1;\r\n } else if ($scope.currentTab == 3) {\r\n if (sortBy === $scope.viewTeamDataPagingInfo.sortBy) {\r\n //$scope.pagingInfo.reverse = !$scope.viewMyDataPagingInfo.reverse;\r\n $scope.viewTeamDataPagingInfo.reverse = !$scope.viewTeamDataPagingInfo.reverse;\r\n searchDataService.viewTeamDataPagingInfo.reverse = $scope.viewTeamDataPagingInfo.reverse;\r\n } else {\r\n //$scope.pagingInfo.sortBy = sortBy;\r\n //$scope.pagingInfo.reverse = false;\r\n\r\n $scope.viewTeamDataPagingInfo.sortBy = sortBy;\r\n $scope.viewTeamDataPagingInfo.reverse = false;\r\n\r\n searchDataService.viewTeamDataPagingInfo.sortBy = sortBy;\r\n searchDataService.viewTeamDataPagingInfo.reverse = false;\r\n }\r\n $scope.viewTeamDataPagingInfo.page = 1;\r\n $scope.viewTeamDataCurrentPage = 1;\r\n\r\n searchDataService.viewTeamDataPagingInfo.page = 1;\r\n searchDataService.viewTeamDataCurrentPage = 1;\r\n }\r\n $scope.search();\r\n };\r\n\r\n\r\n // toggle selection for a given techniques by name\r\n $scope.toggleSelection = function toggleSelection(techniqueName, index) {\r\n var idx = $scope.selection.indexOf(techniqueName);\r\n $scope.techniques[index].selected = !$scope.techniques[index].selected;\r\n if (!$scope.techniques[index].selected) {\r\n if (techniqueName.toLowerCase() == \"uv-vis\") {\r\n $scope.isUVTechSelected = false;\r\n }\r\n if (idx > -1) {\r\n $scope.selection.splice(idx, 1);\r\n }\r\n }\r\n else {\r\n // $scope.techniques[index].selected = true;\r\n var tempIdx;\r\n if (techniqueName.toLowerCase() == \"uv-vis\") {\r\n $scope.isUVTechSelected = true;\r\n angular.forEach($scope.techniques, function (value, key) {\r\n if (value.name.toLowerCase() != \"uv-vis\") {\r\n $scope.techniques[key].selected = false;\r\n }\r\n });\r\n $scope.selection = [];\r\n $scope.selectionSpectral = [];\r\n } else {\r\n $scope.isUVTechSelected = false;\r\n }\r\n if (techniqueName.toLowerCase() == \"xps\" || techniqueName.toLowerCase() == \"ups\") {\r\n $scope.techniques[findIndexFromArrayList('AES')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('UV-VIS')].selected = false;\r\n RemoveTech('AES');\r\n RemoveTech('UV-VIS');\r\n }\r\n\r\n if (techniqueName.toLowerCase() == \"aes\") {\r\n $scope.techniques[findIndexFromArrayList('UV-VIS')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('XPS')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('UPS')].selected = false;\r\n RemoveTech('UV-VIS');\r\n RemoveTech('XPS');\r\n RemoveTech('UPS');\r\n }\r\n\r\n if (techniqueName.toLowerCase() == \"unspecified\") {\r\n $scope.techniques[findIndexFromArrayList('UV-VIS')].selected = false;\r\n RemoveTech('UV-VIS');\r\n }\r\n\r\n $scope.selection.push(techniqueName);\r\n }\r\n\r\n searchDataService.selection = $scope.selection;\r\n };\r\n\r\n function RemoveTech(name) {\r\n tempIdx = $scope.selection.indexOf(name);\r\n if (tempIdx > -1) {\r\n $scope.selection.splice(tempIdx, 1);\r\n }\r\n }\r\n\r\n var lIndex = -1;\r\n function findIndexFromArrayList(value) {\r\n lIndex = -1;\r\n $scope.techniques.some(function (obj, i) {\r\n if (obj.name === value) {\r\n lIndex = i;\r\n return true;\r\n }\r\n });\r\n return lIndex;\r\n }\r\n\r\n $scope.searchResults = searchDataService.searchResultsBackup;\r\n $scope.viewMyDataSearchResults = searchDataService.viewMyDataSearchResultsBackup;\r\n $scope.viewTeamDataSearchResults = searchDataService.viewTeamDataSearchResultsBackup;\r\n\r\n $scope.autoComplete = [];\r\n\r\n if ((!$scope.searchResults || $scope.searchResults.length <= 0) && (!$scope.viewMyDataSearchResults || $scope.viewMyDataSearchResults.length <= 0) && (!$scope.viewTeamDataSearchResults || $scope.viewTeamDataSearchResults.length <= 0)) {\r\n\r\n $scope.totalNumberRecords = 1 / 0;\r\n $scope.viewMyDataTotalNumberRecords = 1 / 0;\r\n $scope.viewTeamDataTotalNumberRecords = 1 / 0;\r\n\r\n $scope.currentPage = 1;\r\n $scope.viewMyDataCurrentPage = 1;\r\n $scope.viewTeamDataCurrentPage = 1;\r\n\r\n if ($scope.currentPage == undefined) {\r\n $scope.currentPage = 1;\r\n $scope.viewMyDataCurrentPage = 1;\r\n $scope.viewTeamDataCurrentPage = 1;\r\n }\r\n\r\n searchDataService.currentPage = $scope.currentPage;\r\n searchDataService.viewMyDataCurrentPage = $scope.viewMyDataCurrentPage;\r\n searchDataService.viewTeamDataCurrentPage = $scope.viewTeamDataCurrentPage;\r\n\r\n $scope.pagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'doi',\r\n reverse: true,\r\n keywords: '',\r\n chemicalName: '',\r\n hostMaterial: '',\r\n transition: '',\r\n element: '',\r\n authorLName: '',\r\n spectralRegion: '',\r\n startVal: '',\r\n endVal: '',\r\n fromDate: '',\r\n toDate: '',\r\n articleName: '',\r\n technique: '',\r\n doi: '',\r\n rangeApplied: false,\r\n currentTab: 1,\r\n casRegistryNumber: '',\r\n pubYear: ''\r\n };\r\n\r\n $scope.viewMyDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n $scope.viewTeamDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n searchDataService.pagingInfo = $scope.pagingInfo;\r\n searchDataService.viewMyDataPagingInfo = $scope.viewMyDataPagingInfo;\r\n searchDataService.viewTeamDataPagingInfo = $scope.viewTeamDataPagingInfo;\r\n\r\n if (!searchDataService.showBackupData && plotDataService.getSetdata().length > 0) {\r\n $scope.currentPage = searchDataService.currentPage;\r\n $scope.viewMyDataCurrentPage = searchDataService.viewMyDataCurrentPage;\r\n $scope.viewTeamDataCurrentPage = searchDataService.viewTeamDataCurrentPage;\r\n\r\n $scope.pagingInfo = searchDataService.pagingInfo;\r\n $scope.viewMyDataPagingInfo = searchDataService.viewMyDataPagingInfo;\r\n $scope.viewTeamDataPagingInfo = searchDataService.viewTeamDataPagingInfo;\r\n $scope.search();\r\n }\r\n\r\n } else {\r\n if (searchDataService.showBackupData) {\r\n $scope.currentPage = searchDataService.currentPage;\r\n $scope.viewMyDataCurrentPage = searchDataService.viewMyDataCurrentPage;\r\n $scope.viewTeamDataCurrentPage = searchDataService.viewTeamDataCurrentPage;\r\n\r\n $scope.pagingInfo = searchDataService.pagingInfo;\r\n $scope.viewMyDataPagingInfo = searchDataService.viewMyDataPagingInfo;\r\n $scope.viewTeamDataPagingInfo = searchDataService.viewTeamDataPagingInfo;\r\n $scope.search();\r\n }\r\n }\r\n\r\n $scope.originForm = angular.copy($scope.pagingInfo);\r\n\r\n // toggle selection for a given Spectral region by name\r\n $scope.toggleSpectralSelection = function toggleSpectralSelection(spectralName) {\r\n var idx = $scope.selectionSpectral.indexOf(spectralName);\r\n\r\n // is currently selected\r\n if (idx > -1) {\r\n $scope.selectionSpectral.splice(idx, 1);\r\n }\r\n // is newly selected\r\n else {\r\n $scope.selectionSpectral.push(spectralName);\r\n }\r\n\r\n searchDataService.selectionSpectral = $scope.selectionSpectral;\r\n };\r\n\r\n $scope.editfilename = function (id) {\r\n //var tddata = $('#td-data-' + id).html();\r\n //var tempArray = tddata.split('-');\r\n //var tempFileName = tddata.substring(tempArray[0].length + 1);\r\n //$('#td-data-' + id).html('');\r\n //$(\"#edit-text-\" + id).focus();\r\n //$('#edit-button-' + id).hide();\r\n //$('#save-button-' + id).show();\r\n\r\n //$scope.SessionUploadID = $cookies.get('SessionID');\r\n $scope.uniqueID = id.toString();\r\n\r\n searchservice.getfileNameByUniqueID($scope);\r\n }\r\n\r\n $scope.savefilename = function (id, fileExt) {\r\n //var regExp = \"^[a-zA-Z0-9 \\-]+$\";\r\n var textd = $('#edit-text-' + id).val();\r\n //var flag = textValidate(textd, regExp);\r\n //if (flag == true && isNaN(textd) && textd != '') {\r\n if (isNaN(textd) && textd != '') {\r\n $('#td-data-' + id).html(\"Upload\" + id + \"-\" + textd);\r\n $('#edit-button-' + id).show();\r\n $('#save-button-' + id).hide();\r\n\r\n searchservice.saveFileName($scope, id, textd + fileExt);\r\n }\r\n else {\r\n alert('Please enter valid file name.');\r\n $('#edit-text-' + id).focus();\r\n return false;\r\n }\r\n }\r\n\r\n $scope.$on('ngRepeatBroadcast1', function (ngRepeatFinishedEvent) {\r\n\r\n assignHeightToSelectedResults();\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n if (($rootScope.SelectedWorkArea != null && $rootScope.SelectedWorkArea.name != '' && (plotDataService.getSpectrumIds().length > 0 || plotDataService.getFiles().length > 0))) {\r\n $rootScope.selectedWorkspaceName = $rootScope.SelectedWorkArea.name;\r\n $rootScope.PlotGraphLinkCSS = '';\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).parent().removeClass(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).removeClass(\"disabled\").attr(\"disabled\", false);\r\n $scope.scrollTop = true;\r\n }\r\n else {\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).parent().addClass(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).addClass(\"disabled\").attr(\"disabled\", true);\r\n }\r\n\r\n $scope.showFigureDetails = function (index) {\r\n $scope.searchResults[index].showFigureDetails = !$scope.searchResults[index].showFigureDetails;\r\n if ($scope.searchResults[index].showFigureDetails == true) {\r\n $(\".figure-details-tr-\" + index).fadeIn('slow');\r\n $(\".figure-details-tr-\" + index).removeClass('ng-hide');\r\n } else {\r\n $(\".figure-details-tr-\" + index).fadeOut('slow');\r\n $(\".figure-details-tr-\" + index).addClass('ng-hide');\r\n }\r\n }\r\n\r\n $scope.toggleCollapsableRows = function ($event) {\r\n var currentTarget = $event.currentTarget;\r\n if ($(currentTarget)[0].checked == true) {\r\n searchDataService.collapsableRowsSwitchOn = true;\r\n angular.forEach($scope.searchResults, function (value, key) {\r\n if (value.figuresDetails.length > 0) {\r\n $scope.searchResults[key].showFigureDetails = true;\r\n }\r\n });\r\n } else {\r\n searchDataService.collapsableRowsSwitchOn = false;\r\n angular.forEach($scope.searchResults, function (value, key) {\r\n if (value.figuresDetails.length > 0) {\r\n $scope.searchResults[key].showFigureDetails = false;\r\n }\r\n });\r\n }\r\n $scope.collapsableRowsSwitchOn = searchDataService.collapsableRowsSwitchOn;\r\n\r\n $scope.fadeInFadeOutDetails();\r\n }\r\n\r\n $scope.fadeInFadeOutDetails = function () {\r\n if ($scope.collapsableRowsSwitchOn == true) {\r\n $(\".collapsable-table-tr\").fadeIn('slow');\r\n $(\".switch-text\").text('Hide');\r\n } else {\r\n $(\".collapsable-table-tr\").fadeOut('slow');\r\n $(\".switch-text\").text('Show');\r\n }\r\n\r\n angular.forEach($('.collapsable-table-tr'), function (value, key) {\r\n var trLength = $(value).find('table.collpasable-table > tbody > tr').length;\r\n if (trLength > 0) {\r\n $(value).removeClass('ng-hide');\r\n }\r\n });\r\n }\r\n\r\n $scope.$on('$viewContentLoaded', function () {\r\n\r\n $timeout(function () {\r\n\r\n $(\".input-feild-textbox\").filter(function () {\r\n if (!$(this).val()) {\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n } else {\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }\r\n });\r\n }, 0.2);\r\n\r\n });\r\n\r\n //upload Data\r\n\r\n $('#referencedArticle').keyup(function () {\r\n var _this = $(this);\r\n storeUploadService.validateReferenceArticle(_this, $scope);\r\n })\r\n\r\n getTeamInfo();\r\n\r\n $scope.openUploadModel = function () {\r\n $scope.clear();\r\n $scope.isEditData = false;\r\n $scope.showSavebtn = true;\r\n $scope.isDisableStep1 = false;\r\n $scope.isDisableStep2 = true;\r\n $scope.isDisableStep3 = true;\r\n $scope.validDOI = true;\r\n $('#fileStatus').text('No file selected.');\r\n var name = getLocalValue(\"fullName\").split(' ');\r\n\r\n $('#firstName').val(name[0]);\r\n $('#lastName').val(name[1]);\r\n\r\n $scope.dataManagement.FirstName = name[0];\r\n $scope.dataManagement.LastName = name[1];\r\n\r\n $('#upload').modal('show');\r\n }\r\n\r\n function getTeamInfo() {\r\n $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"api/Account/teamInfo\",\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, headers, status) {\r\n $scope.isTeamPerson = data.isTeamMember;\r\n $scope.isTeamMember = $scope.isTeamPerson;\r\n });\r\n }\r\n\r\n $scope.clear = function () {\r\n\r\n $scope.modalMessage = '';\r\n $scope.isModalError = false;\r\n $scope.isModalSuccess = false;\r\n\r\n $scope.FileSelected = false;\r\n $scope.files = [];\r\n\r\n $scope.SelectedObjectID = 0;\r\n\r\n $(\"input[type=file]\").val('').clone(true);\r\n //$(\"form[name=propertiesForm]\").trigger('reset');\r\n $('.border-red').removeClass('border-red');\r\n\r\n $scope.dataManagementValues();\r\n\r\n $scope.dataManagementUpload.$setPristine();\r\n $scope.dataManagementUpload.$setUntouched();\r\n }\r\n\r\n $scope.showSpectralRegionRawPopover = function (searchResult, index) {\r\n if (searchResult.duplicateSpectralRegionRaw.length > 15) {\r\n $('[data-toggle=\"popoverTest-' + index + '\"]').popover('show');\r\n var element = document.getElementById(\"spectralRegionRaw-\" + index);\r\n $(element).siblings(\".popover\").addClass('spectralRegionRaw-popup-border');\r\n $(element).siblings(\".popover\").children('.arrow').addClass('spectralRegionRaw-popup-arrow');\r\n }\r\n }\r\n\r\n $scope.hideSpectralRegionRawPopover = function (searchResult, index) {\r\n if (searchResult.duplicateSpectralRegionRaw.length > 15) {\r\n $('[data-toggle=\"popoverTest-' + index + '\"]').popover('hide');\r\n }\r\n }\r\n\r\n $scope.onFileShareSelected = function (value) {\r\n storeUploadService.onFileShareSelected(value);\r\n };\r\n\r\n $scope.uploadFile = function () {\r\n\r\n progressBarService.showProgressBar();\r\n var data = new FormData();\r\n data.append(\"file\", $scope.files[0]);\r\n data.append(\"eSpectraSpecimenHostMaterial\", $scope.dataManagement.HostMaterial);\r\n data.append(\"eSpectraSpecimenChemicalName\", $scope.dataManagement.ChemicalName);\r\n data.append(\"ReferencedArticle\", $scope.dataManagement.ReferencedArticle);\r\n data.append(\"eSpectraObjectTechnique\", $scope.dataManagement.Techinque);\r\n data.append(\"eSpectraObjectDesc\", $scope.dataManagement.Description);\r\n data.append(\"FirstName\", $scope.dataManagement.FirstName);\r\n data.append(\"LastName\", $scope.dataManagement.LastName);\r\n //data.append(\"eSpectraSubmitPersonID\", $cookies.get(\"UserId\"));\r\n data.append(\"eSpectraObjectDOI\", $scope.dataManagement.eSpectraObjectDOI);\r\n data.append(\"eSpectraObjectCalibration\", $scope.dataManagement.eSpectraObjectCalibration);\r\n data.append(\"eSpectraObjectShareType\", $scope.dataManagement.FileShare);\r\n data.append(\"eSpectraCasRegistryNum\", $scope.dataManagement.CasRegistryNumber);\r\n\r\n $scope.isDisableStep2 = true;\r\n $scope.isDisableStep3 = true;\r\n $scope.isDisableUpload = true;\r\n\r\n dataManagementService.uploadFile(data).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n $scope.isDisableStep2 = false;\r\n $scope.isDisableStep3 = false;\r\n $scope.isDisableUpload = false;\r\n progressBarService.hideProgressBar();\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n //var data = JSON.parse(response.data);\r\n $('#upload').modal('toggle');\r\n $('.border-red').removeClass('border-red');\r\n $scope.isDisableStep2 = false;\r\n $scope.isDisableStep3 = false;\r\n $scope.isDisableUpload = false;\r\n var data = response.data.status;\r\n if (data) {\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.message = GetMessage.dataUploadedSuccessfully;\r\n if ($scope.dataManagement.Techinque.toLowerCase() == \"uv-vis\") {\r\n $scope.selection = ['UV-VIS'];\r\n searchDataService.selection = $scope.selection;\r\n $scope.selectionSpectral = [];\r\n searchDataService.selectionSpectral = [];\r\n\r\n $scope.techniques[findIndexFromArrayList('UV-VIS')].selected = true;\r\n $scope.techniques[findIndexFromArrayList('XPS')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('UPS')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('AES')].selected = false;\r\n $scope.techniques[findIndexFromArrayList('Unspecified')].selected = false;\r\n\r\n $scope.isUVTechSelected = true;\r\n }\r\n $scope.search();\r\n\r\n var dataList = [];\r\n var dataArray = {\r\n eSpectraObjectID: response.data.dataManagementFile.eSpectraObjectID,\r\n eSpectraObjectDataSetName: response.data.dataManagementFile.eSpectraObjectDataSetName\r\n }\r\n dataList.push(dataArray);\r\n\r\n searchservice.GetObjectData($scope, dataList);\r\n }\r\n else {\r\n $scope.message = GetMessage.UploadFileIntoElasticSearchFailed;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n };\r\n\r\n $scope.EditData = function (objectId) {\r\n $scope.clear();\r\n $scope.isEditData = true;\r\n $scope.showSavebtn = false;\r\n $scope.isDisableStep1 = false;\r\n $scope.isDisableStep2 = false;\r\n $scope.isDisableStep3 = false;\r\n $scope.validDOI = true;\r\n dataManagementService.getObjectByObjectID(objectId).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.modalMessage = response.data.message;\r\n $scope.isModalError = true;\r\n $scope.isModalSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n $('#upload').modal('show');\r\n }\r\n else {\r\n $scope.eSpectraObjectID = response.data.eSpectraObjectID;\r\n $scope.eSpectraObjectDataSetName = response.data.eSpectraObjectDataSetName;\r\n $scope.dataManagement.HostMaterial = response.data.eSpectraSpecimenHostMaterial;\r\n $scope.dataManagement.ChemicalName = response.data.eSpectraSpecimenChemicalName;\r\n $scope.dataManagement.ReferencedArticle = response.data.eSpectraObjectDOI;\r\n $scope.dataManagement.Techinque = response.data.eSpectraObjectTechnique;\r\n $scope.dataManagement.Description = response.data.eSpectraObjectComment;\r\n $scope.dataManagement.FirstName = response.data.firstName;\r\n $scope.dataManagement.LastName = response.data.lastName;\r\n $scope.dataManagement.eSpectraObjectCalibration = response.data.eSpectraObjectCalibration;\r\n $scope.dataManagement.FileShare = response.data.eSpectraObjectShareType.toLowerCase();\r\n $scope.dataManagement.isPublic = response.data.eSpectraObjectShareType.toLowerCase() == \"public\" ? 1 : 0;\r\n $scope.dataManagement.CasRegistryNumber = response.data.eSpectraCasRegistryNum;\r\n $scope.isTeamMember = response.data.isTeamMember;\r\n }\r\n $('#upload').modal('show');\r\n });\r\n }\r\n\r\n $scope.ShowSpectraFiguredetails = function (displayId, spectrunID, fileName) {\r\n plotgraphservice.getSpectraFiguredetails($scope, displayId);\r\n }\r\n\r\n $scope.selectedWorkspace = function (mode, workspaceType, savedWorkspace) {\r\n progressBarService.showProgressBar();\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearFiles();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n $rootScope.SelectedWorkArea = null;\r\n $scope.WorkAreaid = savedWorkspace.workAreaID;\r\n $rootScope.selectedWorkspaceName = savedWorkspace.areaName;\r\n\r\n GetSpectrumIDServices.GetWorkSpaceByID($scope, mode, workspaceType);\r\n\r\n }\r\n\r\n $scope.toggleTechDropDown = function () {\r\n $('#spectralCheckboxes').hide();\r\n $('#techCheckboxes').toggle();\r\n }\r\n\r\n $scope.toggleSpectralDropDown = function () {\r\n $('#techCheckboxes').hide();\r\n $('#spectralCheckboxes').toggle();\r\n }\r\n\r\n}]);\r\n\r\napp.service('searchservice', ['$http', '$cookies', 'searchDataService', 'plotDataService', 'progressBarService', function ($http, $cookies, searchDataService, plotDataService, progressBarService) {\r\n\r\n this.search = function ($scope, pagingInfo) {\r\n $scope.selectedTechs = [];\r\n if ($scope.currentTab == 1) {\r\n $scope.searchResults = null;\r\n $scope.searchResultMsg = \"\";\r\n } else if ($scope.currentTab == 2) {\r\n $scope.viewMyDataSearchResults = null;\r\n $scope.viewMyDataSearchResultMsg = \"\";\r\n } else if ($scope.currentTab == 3) {\r\n $scope.viewTeamDataSearchResults = null;\r\n $scope.viewTeamDataSearchResultMsg = \"\";\r\n }\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"search\",\r\n params: pagingInfo,\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n $(\"#searchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewMyDataSearchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewTeamDataSearchResultsContainer\").removeClass(\"in\");\r\n\r\n $(\".switch\").fadeOut();\r\n $(\".switch > input[type='checkbox']\").prop('checked', false);\r\n $(\".switch-text\").text('Show');\r\n\r\n $scope.searchResultMsg = \"No data found.\";\r\n $scope.viewMyDataSearchResultMsg = \"No data found.\";\r\n $scope.viewTeamDataSearchResultMsg = \"No data found.\";\r\n\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n angular.forEach($scope.selection, function (value, key) {\r\n $scope.selectedTechs.push(value);\r\n })\r\n $scope.isUVTechSearchResult = $scope.selection[0].toLowerCase() == 'uv-vis' ? true : false;\r\n $scope.postedBy = data.loggedInUserId;\r\n $scope.premiumType = data.premiumType;\r\n setLocalValue(\"premiumType\", $scope.premiumType);\r\n\r\n if ($scope.pagingInfo.currentTab == 1 || $scope.clickedFromSearchButton == true) {\r\n if ($scope.pagingInfo.pageNo == 1) {\r\n $scope.totalNumberRecords = data.totalNoOfRecords;\r\n searchDataService.totalNumberRecords = data.totalNoOfRecords;\r\n\r\n $scope.viewMyDataTotalNumberRecords = data.viewMyDataTotalNoOfRecords;\r\n searchDataService.viewMyDataTotalNumberRecords = data.viewMyDataTotalNoOfRecords;\r\n\r\n $scope.viewTeamDataTotalNumberRecords = data.viewTeamDataTotalNoOfRecords;\r\n searchDataService.viewTeamDataTotalNumberRecords = data.viewTeamDataTotalNoOfRecords;\r\n } else if (!$scope.totalNumberRecords) {\r\n $scope.totalNumberRecords = searchDataService.totalNumberRecords;\r\n }\r\n }\r\n if ($scope.pagingInfo.currentTab == 2) {\r\n if ($scope.viewMyDataPagingInfo.pageNo == 1) {\r\n $scope.viewMyDataTotalNumberRecords = data.viewMyDataTotalNoOfRecords;\r\n searchDataService.viewMyDataTotalNumberRecords = data.viewMyDataTotalNoOfRecords;\r\n } else if (!$scope.viewMyDataTotalNumberRecords) {\r\n $scope.viewMyDataTotalNumberRecords = searchDataService.viewMyDataTotalNumberRecords;\r\n }\r\n if (searchDataService.totalNumberRecords) {\r\n $scope.totalNumberRecords = searchDataService.totalNumberRecords;\r\n }\r\n }\r\n if ($scope.pagingInfo.currentTab == 3) {\r\n if ($scope.viewTeamDataPagingInfo.pageNo == 1) {\r\n $scope.viewTeamDataTotalNumberRecords = data.viewTeamDataTotalNoOfRecords;\r\n searchDataService.viewTeamDataTotalNumberRecords = data.viewTeamDataTotalNoOfRecords;\r\n } else if (!$scope.viewTeamDataTotalNumberRecords) {\r\n $scope.viewTeamDataTotalNumberRecords = searchDataService.viewTeamDataTotalNumberRecords;\r\n }\r\n if (searchDataService.totalNumberRecords) {\r\n $scope.totalNumberRecords = searchDataService.totalNumberRecords;\r\n }\r\n }\r\n\r\n searchDataService.showBackupData = true;\r\n var count = 0;\r\n\r\n $(\".switch\").fadeIn();\r\n searchDataService.collapsableRowsSwitchOn = $scope.isUVTechSearchResult ? false : searchDataService.collapsableRowsSwitchOn;\r\n $(\".switch > input[type='checkbox']\").prop('checked', searchDataService.collapsableRowsSwitchOn);\r\n if (searchDataService.collapsableRowsSwitchOn) {\r\n $(\".collapsable-table-tr\").fadeIn('slow');\r\n $(\".switch-text\").text('Hide');\r\n } else {\r\n $(\".collapsable-table-tr\").fadeOut('slow');\r\n $(\".switch-text\").text('Show');\r\n }\r\n\r\n $scope.showFiguresDetailsTableHeader = -1;\r\n\r\n angular.forEach(data.searchResult, function (value, key) {\r\n\r\n value.resultFlag = $scope.GetDataSetStatus(value.figuresDataCount, value.spectraObjectID);\r\n if (value.figuresDetails.length > 0 && $scope.showFiguresDetailsTableHeader == -1) {\r\n $scope.showFiguresDetailsTableHeader = count;\r\n }\r\n if ((value.contentType != null ? value.contentType.toLowerCase() != 'kratos' : true) && value.fileName.length > 0) { // for kratos data with filename\r\n value.resultFlag = $scope.GetDataSetStatusForFile(value.spectraObjectID.toString());\r\n }\r\n value.device = $scope.deviceName;\r\n count++;\r\n });\r\n if ($scope.pagingInfo.currentTab == 1 || $scope.clickedFromSearchButton == true) {\r\n $scope.searchResults = data.searchResult;\r\n angular.forEach($scope.searchResults, function (value, key) {\r\n $scope.searchResults[key].duplicateSpectralRegionRaw = $scope.searchResults[key].spectralRegionRaw;\r\n if (value.spectralRegionRaw != null && value.spectralRegionRaw.length > 15) {\r\n if ($scope.searchResults[key].spectralRegionRaw.charAt(14) == \",\") {\r\n $scope.searchResults[key].spectralRegionRaw = $scope.searchResults[key].spectralRegionRaw.substring(0, 15) + \"...\";\r\n } else {\r\n var lastIndexOfComma = $scope.searchResults[key].spectralRegionRaw.substring(0, 15).lastIndexOf(',');\r\n $scope.searchResults[key].spectralRegionRaw = $scope.searchResults[key].spectralRegionRaw.substring(0, (lastIndexOfComma + 1)) + \"...\";\r\n }\r\n }\r\n if (value.figuresDetails.length > 0) {\r\n $scope.searchResults[key].showFigureDetails = searchDataService.collapsableRowsSwitchOn == true ? true : false;\r\n }\r\n });\r\n searchDataService.searchResultsBackup = $scope.searchResults;\r\n\r\n $scope.viewMyDataSearchResults = searchDataService.viewMyDataSearchResultsBackup;\r\n $scope.viewMyDataTotalNumberRecords = searchDataService.viewMyDataTotalNumberRecords;\r\n\r\n $scope.viewTeamDataSearchResults = searchDataService.viewTeamDataSearchResultsBackup;\r\n $scope.viewTeamDataTotalNumberRecords = searchDataService.viewTeamDataTotalNumberRecords;\r\n\r\n } else {\r\n $scope.searchResults = searchDataService.searchResultsBackup;\r\n }\r\n\r\n if ($scope.pagingInfo.currentTab == 2 || $scope.clickedFromSearchButton == true) {\r\n angular.forEach(data.viewMyDataSearchResult, function (value, key) {\r\n\r\n value.resultFlag = $scope.GetDataSetStatus(value.figuresDataCount, value.spectraObjectID);\r\n if (value.figuresDetails.length > 0 && $scope.showFiguresDetailsTableHeader == -1) {\r\n $scope.showFiguresDetailsTableHeader = count;\r\n }\r\n if (value.fileName.length > 0) {\r\n value.resultFlag = $scope.GetDataSetStatusForFile(value.spectraObjectID.toString());\r\n }\r\n value.device = $scope.deviceName;\r\n count++;\r\n });\r\n $scope.viewMyDataSearchResults = data.viewMyDataSearchResult;\r\n searchDataService.viewMyDataSearchResultsBackup = $scope.viewMyDataSearchResults;\r\n }\r\n\r\n if ($scope.pagingInfo.currentTab == 3 || $scope.clickedFromSearchButton == true) {\r\n angular.forEach(data.viewTeamDataSearchResult, function (value, key) {\r\n\r\n value.resultFlag = $scope.GetDataSetStatus(value.figuresDataCount, value.spectraObjectID);\r\n if (value.figuresDetails.length > 0 && $scope.showFiguresDetailsTableHeader == -1) {\r\n $scope.showFiguresDetailsTableHeader = count;\r\n }\r\n if (value.fileName.length > 0) {\r\n value.resultFlag = $scope.GetDataSetStatusForFile(value.spectraObjectID.toString());\r\n }\r\n value.device = $scope.deviceName;\r\n count++;\r\n });\r\n $scope.viewTeamDataSearchResults = data.viewTeamDataSearchResult;\r\n searchDataService.viewTeamDataSearchResultsBackup = $scope.viewTeamDataSearchResults;\r\n }\r\n\r\n $(\"#searchResultsContainer\").addClass(\"in\");\r\n $(\"#viewMyDataSearchResultsContainer\").addClass(\"in\");\r\n $(\"#viewTeamDataSearchResultsContainer\").addClass(\"in\");\r\n\r\n //$(\".toggle-all-row-element\").fadeIn();\r\n if ($scope.scrollTop == true) {\r\n $(\"html, body\").animate({\r\n scrollTop: 0\r\n }, \"500\");\r\n } else {\r\n $(\"html, body\").animate({\r\n scrollTop: $(\".search-results-title\").offset().top\r\n }, \"slow\");\r\n }\r\n\r\n $(\".no-dataset-msg\").hide();\r\n progressBarService.hideProgressBar();\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\" || status == \"400\") {\r\n $(\"#searchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewMyDataSearchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewTeamDataSearchResultsContainer\").removeClass(\"in\");\r\n //$(\".toggle-all-row-element\").fadeOut();\r\n $(\".switch\").fadeOut();\r\n $(\".switch > input[type='checkbox']\").prop('checked', false);\r\n $(\".switch-text\").text('Show');\r\n $scope.searchResultMsg = \"No data found.\";\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n this.GetObjectData = function ($scope, compareData) {\r\n //$scope.UserId = $cookies.get(\"UserId\");\r\n\r\n $.ajax({\r\n url: $scope.serviceBase + 'GetComparingObjectsData',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n DatamanagementFile: compareData\r\n }\r\n }).success(function (data) {\r\n\r\n for (var key in data) {\r\n\r\n if (data[key].objectDataSetName != \"\") {\r\n plotDataService.addFileList(data[key].objectID);\r\n }\r\n\r\n plotDataService.addSetdata(data[key].workAreaID, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].technique, data[key].chemicalName, data[key].hostMaterial, data[key].spectralRegion, data[key].pubDate, data[key].dOI, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", data[key].isCurated, true);\r\n if (data[key].spectrumID > 0) {\r\n plotDataService.addSpectrumId(data[key].objectID);\r\n }\r\n plotDataService.addChemicalname(data[key].chemicalName);\r\n plotDataService.addSearchString(data[key].searchStringList, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].workAreaID, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", true);\r\n plotDataService.setTechnique(data[key].objectID, data[key].technique, true);\r\n\r\n $scope.SetDataSetOnLoad(data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].technique, data[key].chemicalName, data[key].hostMaterial, data[key].spectralRegion, data[key].pubDate, data[key].dOI, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", data[key].isCurated);\r\n }\r\n\r\n }).error(function (request, status, error) {\r\n if (error == \"Not Found\") {\r\n $scope.searchResultMsg = \"No data found.\";\r\n }\r\n else if (error == \"Service Unavailable\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n else if (error == \"Internal Server Error\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n\r\n console.log($scope.searchResultMsg);\r\n });\r\n };\r\n\r\n this.getSessionID = function ($scope) {\r\n //$(\"#searchUploadChemicals\").click();\r\n $.ajax({\r\n url: $scope.serviceBase + \"getNewSessionID\",\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {}\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n $scope.SessionUploadID = data.sessionid;\r\n var expireDate = new Date();\r\n expireDate.setDate(expireDate.getDate() + 1);\r\n }\r\n }).error(function (request, status, error) {\r\n });\r\n };\r\n\r\n this.getGlobalValues = function ($scope) {\r\n $.ajax({\r\n url: $scope.serviceBase + \"globalValues\",\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {}\r\n }).success(function (data, status) {\r\n var expireDate = new Date();\r\n expireDate.setDate(expireDate.getDate() + 1);\r\n $cookies.put(\"versionNo\", data.applicationVersionNumber, { expires: expireDate });\r\n $cookies.put(\"energyRangeStart\", data.searchSliderEnergyRangeStart, { expires: expireDate });\r\n $cookies.put(\"energyRangeEnd\", data.searchSliderEnergyRangeEnd, { expires: expireDate });\r\n }).error(function (request, status, error) {\r\n });\r\n }\r\n\r\n this.deleteUnpublishedDataSets = function ($scope, uniqueID, filename, deleteAllRows) {\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"deleteFiles\",\r\n params: {\r\n 'uniqueID': uniqueID, 'sessionID': $scope.SessionUploadID, 'deleteAllRows': deleteAllRows\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n if (!deleteAllRows) {\r\n plotDataService.removeUnPublishedDataSet(uniqueID);\r\n --$scope.unPublishedIDs;\r\n if ($scope.UnPublishedDataSetCount <= 0) {\r\n $(\".clear-all-datasets\").show();\r\n }\r\n $scope.$apply();\r\n }\r\n else {\r\n plotDataService.clearUnPublishedDataSet();\r\n $scope.unPublishedIDs = 0;\r\n $scope.$apply();\r\n }\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n }\r\n });\r\n };\r\n\r\n this.getUnpublishedFile = function ($scope) {\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"getFilesNames\",\r\n params: {\r\n 'sessionID': $scope.SessionUploadID\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n angular.forEach(data, function (value, key) {\r\n $scope.SetUnPublishedDataSetOnLoad(value.split(\",\")[1], value.split(\",\")[0]);\r\n });\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n }\r\n });\r\n };\r\n\r\n this.saveFileName = function ($scope, uniqueID, filename) {\r\n //return $http({\r\n // method: \"GET\",\r\n // url: \"http://localhost:58252/saveFileName\",\r\n // //params: { 'uniqueID': uniqueID, 'sessionID': $scope.SessionUploadID, 'fileName': filename},\r\n // headers: { 'Content-Type': 'application/json' }\r\n //}).success(function (data) {\r\n // //plotDataService.removeUnPublishedDataSet(filename);\r\n // //--$scope.unPublishedIDs;\r\n // //if ($scope.UnPublishedDataSetCount <= 0) {\r\n // // $(\".clear-all-datasets\").show();\r\n // //}\r\n // //$scope.$apply();\r\n //}).error(function (data, status) {\r\n // if (status == \"204\") {\r\n // }\r\n //});\r\n $.ajax({\r\n url: $scope.serviceBase + \"saveFileName\",\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n uniqueID: uniqueID, sessionID: $scope.SessionUploadID, fileName: filename\r\n }\r\n }).success(function (data) {\r\n }).error(function (request, status, error) {\r\n });\r\n };\r\n\r\n this.getfileNameByUniqueID = function ($scope) {\r\n progressBarService.showProgressBar();\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"getfileNameByUniqueID\",\r\n params: {\r\n 'UniqueID': $scope.uniqueID, 'sessionID': $scope.SessionUploadID\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data) {\r\n var filename = data[0];\r\n var fileNameWithoutExt = filename.substr(0, filename.lastIndexOf('.'));\r\n\r\n $('#td-data-' + $scope.uniqueID).html($('').val(fileNameWithoutExt));\r\n\r\n $(\"#edit-text-\" + $scope.uniqueID).focus();\r\n $('#edit-button-' + $scope.uniqueID).hide();\r\n $('#save-button-' + $scope.uniqueID).show();\r\n progressBarService.hideProgressBar();\r\n\r\n }).error(function (data, status) {\r\n if (status == \"404\") {\r\n $(\"#searchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewMyDataSearchResultsContainer\").removeClass(\"in\");\r\n $(\"#viewTeamDataSearchResultsContainer\").removeClass(\"in\");\r\n //$(\".toggle-all-row-element\").fadeOut();\r\n $(\".switch\").fadeOut();\r\n $(\".switch > input[type='checkbox']\").prop('checked', false);\r\n $scope.searchResultMsg = \"No data found.\";\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n this.getAllSavedWorkSpace = function ($scope) {\r\n progressBarService.showProgressBar();\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"GetAllSavedWorkArea\",\r\n //params: { AreaName: $(\"#txtAreatitle\").val(), SavedPageNo: $scope.pagingInfo.savedPageNo, itemsPerPage: $scope.pagingInfo.itemsPerPage, SavedWorkOrderBy: $scope.pagingInfo.savedWorkSortBy, SavedWorkSortDirection: $scope.pagingInfo.savedWorkReverse, SharedPageNo: $scope.pagingInfo.sharedPageNo, SharedWorkOrderBy: $scope.pagingInfo.sharedWorkSortBy, SharedWorkSortDirection: $scope.pagingInfo.sharedWorkReverse },\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n $scope.savedWorkspaceList = data;\r\n progressBarService.hideProgressBar();\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n}]);\r\n\r\napp.service('searchDataService', ['$cookies', function ($cookies) {\r\n var currentDate = new Date();\r\n var energyRangeStart = parseFloat($cookies.get(\"energyRangeStart\"));\r\n var energyRangeEnd = parseFloat($cookies.get(\"energyRangeEnd\"));\r\n\r\n\r\n var searchResultsBackup = [];\r\n var viewMyDataSearchResultsBackup = [];\r\n var viewTeamDataSearchResultsBackup = [];\r\n\r\n var totalNumberRecords;\r\n var viewMyDataTotalNumberRecords;\r\n var viewTeamDataTotalNumberRecords;\r\n\r\n var currentPage;\r\n var viewMyDataCurrentPage;\r\n var viewTeamDataCurrentPage;\r\n\r\n var pagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'doi',\r\n reverse: true,\r\n keywords: '',\r\n chemicalName: '',\r\n hostMaterial: '',\r\n transition: '',\r\n element: '',\r\n authorLName: '',\r\n spectralRegion: '',\r\n startVal: '',\r\n endVal: '',\r\n fromDate: '',\r\n toDate: '',\r\n articleName: '',\r\n technique: '',\r\n doi: '',\r\n rangeApplied: false,\r\n currentTab: 1\r\n };\r\n\r\n var viewMyDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n var viewTeamDataPagingInfo = {\r\n pageNo: 1,\r\n itemsPerPage: 10,\r\n sortBy: 'publicationyear',\r\n reverse: true\r\n };\r\n\r\n var collapsableRowsSwitchOn = true\r\n\r\n var searchTypeBasic = true;\r\n\r\n var pagingInfoEnegry = {\r\n startVal: '', endVal: '', min: '', max: '', options: {\r\n floor: '',\r\n ceil: '',\r\n step: 1\r\n }\r\n };\r\n\r\n var pagingInfoDate = {\r\n startVal: '', endVal: '', min: '', max: '', options: {\r\n floor: '',\r\n ceil: '',\r\n step: 1\r\n }\r\n };\r\n\r\n var showBackupData = false;\r\n\r\n var techniques = [];\r\n\r\n var objectTechniques = getLocalValue(\"objectTechniques\");\r\n\r\n angular.forEach(objectTechniques, function (value, key) {\r\n techniques.push({\r\n name: value,\r\n selected: value.toLowerCase() == 'xps' || value.toLowerCase() == 'ups' ? true : false,\r\n disabled: false\r\n })\r\n });\r\n\r\n var selection = ['XPS', 'UPS'];\r\n\r\n var spectrals = [\r\n {\r\n name: 'Survey', selected: true\r\n },\r\n {\r\n name: 'Valence Band', selected: true\r\n },\r\n{\r\n name: 'Transition', selected: true\r\n},\r\n {\r\n name: 'UNSPECIFIED', selected: true\r\n },\r\n ];\r\n\r\n var selectionSpectral = ['Survey', 'Valence Band', 'Transition', 'UNSPECIFIED'];\r\n\r\n return {\r\n searchTypeBasic: searchTypeBasic,\r\n techniques: techniques,\r\n selection: selection,\r\n spectrals: spectrals,\r\n selectionSpectral: selectionSpectral,\r\n pagingInfoEnegry: pagingInfoEnegry,\r\n pagingInfoDate: pagingInfoDate,\r\n showBackupData: showBackupData,\r\n collapsableRowsSwitchOn: collapsableRowsSwitchOn,\r\n pagingInfo: pagingInfo,\r\n viewMyDataPagingInfo: viewMyDataPagingInfo,\r\n viewTeamDataPagingInfo: viewTeamDataPagingInfo\r\n }\r\n}]);\r\n\r\napp.service('plotDataService', function () {\r\n // Pass data to plotgraph controller\r\n\r\n var spectrumIdList = [];\r\n\r\n var objectIdList = [];\r\n\r\n var startendValues = [\"\", \"\"];\r\n\r\n var techniques = [];\r\n\r\n var unPublishedDataSet = [];\r\n\r\n var searchstringList = [];\r\n\r\n var chemicalnamelist = [];\r\n\r\n var SetdataList = [];\r\n\r\n var deletedObjectIDList = [];\r\n\r\n var deletedSearchstringList = [];\r\n\r\n var doiList = [];\r\n\r\n var fileDataSet = [];\r\n\r\n var addSpectrumId = function (newObj) {\r\n spectrumIdList.push(newObj);\r\n\r\n };\r\n\r\n var addObjectId = function (newObj) {\r\n objectIdList.push(newObj);\r\n\r\n };\r\n\r\n var getSpectrumIds = function () {\r\n return spectrumIdList;\r\n };\r\n\r\n var getObjectIds = function () {\r\n return objectIdList;\r\n };\r\n\r\n var removeSpectrumIds = function (newObj) {\r\n var index = spectrumIdList.indexOf(newObj);\r\n if (index > -1) {\r\n spectrumIdList.splice(index, 1);\r\n }\r\n };\r\n\r\n var removeObjectIds = function (newObj) {\r\n var index = objectIdList.indexOf(newObj);\r\n if (index > -1) {\r\n objectIdList.splice(index, 1);\r\n }\r\n };\r\n\r\n var clearSpectrumIds = function () {\r\n spectrumIdList.splice(0, spectrumIdList.length);\r\n };\r\n\r\n var clearObjectIds = function () {\r\n objectIdList.splice(0, objectIdList.length);\r\n };\r\n\r\n var addFileList = function (newObj) {\r\n fileDataSet.push(newObj);\r\n };\r\n\r\n var getFiles = function () {\r\n return fileDataSet;\r\n };\r\n\r\n var removeFiles = function (newObj) {\r\n var index = fileDataSet.indexOf(newObj);\r\n if (index > -1) {\r\n fileDataSet.splice(index, 1);\r\n }\r\n };\r\n\r\n var clearFiles = function () {\r\n fileDataSet.splice(0, fileDataSet.length);\r\n };\r\n\r\n var isSpectrumIdExist = function (newObj) {\r\n var index = spectrumIdList.indexOf(newObj);\r\n return index;\r\n };\r\n\r\n var isObjectIdExist = function (newObj) {\r\n var index = objectIdList.indexOf(newObj);\r\n return index;\r\n };\r\n\r\n var isFileExist = function (newObj) {\r\n var index = fileDataSet.indexOf(newObj);\r\n return index;\r\n };\r\n\r\n var setStartEndValues = function (startVal, endVal) {\r\n startendValues[0] = startVal;\r\n startendValues[1] = endVal;\r\n };\r\n\r\n var getStartEndValues = function () {\r\n return startendValues;\r\n };\r\n\r\n var setTechnique = function (objectid, tech, flag) {\r\n if (flag) {\r\n var index = techniques.indexOf(objectid + \"-\" + tech);\r\n if (index < 0) {\r\n techniques.push(objectid + \"-\" + tech);\r\n }\r\n }\r\n else {\r\n var index = techniques.indexOf(objectid + \"-\" + tech);\r\n if (index > -1) {\r\n techniques.splice(index, 1);\r\n }\r\n }\r\n };\r\n\r\n var getTechnique = function () {\r\n return techniques;\r\n };\r\n\r\n var clearTechnique = function () {\r\n techniques.splice(0, techniques.length);\r\n };\r\n\r\n var addUnPublishedDataSet = function (newObj) {\r\n unPublishedDataSet.push(newObj);\r\n };\r\n\r\n var getUnPublishedDataSet = function () {\r\n return unPublishedDataSet;\r\n };\r\n\r\n var removeUnPublishedDataSet = function (newObj) {\r\n var index = unPublishedDataSet.indexOf(newObj);\r\n if (index > -1) {\r\n unPublishedDataSet.splice(index, 1);\r\n }\r\n };\r\n\r\n var clearUnPublishedDataSet = function () {\r\n unPublishedDataSet.splice(0, unPublishedDataSet.length);\r\n };\r\n\r\n var addSearchString = function (searchstring, objectId, Spectrumid, workareaId, fileName, isValidFigureData, casRegistryNum, pubYear) {\r\n searchstringList.push({\r\n ObjectId: objectId, id: Spectrumid, Searchstring: searchstring, WorkareaId: workareaId, FileName: fileName, IsValidFigureData: isValidFigureData, CasRegistryNum: casRegistryNum, PubYear: pubYear\r\n });\r\n };\r\n\r\n var getSearchString = function () {\r\n return searchstringList;\r\n };\r\n\r\n var clearSearchString = function () {\r\n searchstringList.splice(0, searchstringList.length);\r\n };\r\n\r\n //This method will Add ChemicalName to array \r\n var addChemicalname = function (newObj) {\r\n chemicalnamelist.push(newObj);\r\n };\r\n\r\n //This method will Fetech ChemicalName from array .\r\n var getChemicalNameList = function () {\r\n return chemicalnamelist;\r\n };\r\n\r\n var clearChemicalName = function () {\r\n chemicalnamelist.splice(0, chemicalnamelist.length);\r\n };\r\n\r\n var isChemicalNameExist = function (newObj) {\r\n var index = chemicalnamelist.indexOf(newObj);\r\n return index;\r\n };\r\n\r\n var addSetdata = function (workAreaID, objectId, spectrumId, technique, chemicalName, hostMaterial, spectralRegion, publicationYear, doi, fileName, isCurated, isValidFigureData, index) {\r\n SetdataList.push({\r\n WorkAreaID: workAreaID, ObjectID: objectId, SpectrumId: spectrumId, Technique: technique, ChemicalName: chemicalName, HostMaterial: hostMaterial, SpectralRegion: spectralRegion, PublicationYear: publicationYear, Doi: doi, FileName: fileName, IsCurated: isCurated, isValidFigureData: isValidFigureData, index: index\r\n });\r\n };\r\n\r\n var setDeletedObjectIDList = function (objectId) {\r\n deletedObjectIDList.push(objectId);\r\n }\r\n\r\n var getDeletedObjectIDList = function (objectId) {\r\n return deletedObjectIDList;\r\n };\r\n\r\n var addDeletedSearchString = function (searchStringData) {\r\n deletedSearchstringList.push({\r\n ObjectId: searchStringData.ObjectId, id: searchStringData.Spectrumid, Searchstring: searchStringData.Searchstring, WorkareaId: searchStringData.WorkareaId, FileName: searchStringData.FileName, IsValidFigureData: searchStringData.IsValidFigureData, CasRegistryNum: searchStringData.CasRegistryNum, PubYear: searchStringData.PubYear\r\n });\r\n }\r\n\r\n var getDeletedSearchString = function () {\r\n return deletedSearchstringList;\r\n }\r\n\r\n var clearDeletedSearchString = function () {\r\n deletedSearchstringList.splice(0, deletedSearchstringList.length);\r\n };\r\n\r\n var clearDeletedObjectIDList = function () {\r\n deletedObjectIDList.splice(0, deletedObjectIDList.length);\r\n };\r\n\r\n var getSetdata = function () {\r\n return SetdataList;\r\n };\r\n\r\n var getSpectrumId = function (spectrumId) {\r\n for (var i = 0; i < SetdataList.length; i++) {\r\n if (SetdataList[i].ObjectID == spectrumId) {\r\n return SetdataList[i];\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n var getObjectId = function (objectId) {\r\n for (var i = 0; i < SetdataList.length; i++) {\r\n if (SetdataList[i].ObjectID == objectId) {\r\n return SetdataList[i];\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n var getfileByName = function (file) {\r\n for (var i = 0; i < SetdataList.length; i++) {\r\n if (SetdataList[i].FileName == file) {\r\n return SetdataList[i];\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n var clearDataSetDisplayString = function () {\r\n SetdataList.splice(0, SetdataList.length);\r\n };\r\n\r\n var removeDataSetDisplayString = function (spectrumId) {\r\n if (spectrumId != '') {\r\n var index = -1;\r\n for (var i = 0; i < SetdataList.length; i++) {\r\n\r\n if (SetdataList[i].SpectrumId == spectrumId || SetdataList[i].FileName == spectrumId || SetdataList[i].ObjectID == spectrumId) {\r\n index = i;\r\n }\r\n }\r\n if (index > -1) {\r\n SetdataList.splice(index, 1);\r\n }\r\n }\r\n };\r\n\r\n var removeSearchString = function (spectrumId) {\r\n if (spectrumId != '') {\r\n var index = -1;\r\n\r\n if (spectrumId > 0) {\r\n for (var i = 0; i < searchstringList.length; i++) {\r\n if (searchstringList[i].id == spectrumId || searchstringList[i].FileName == spectrumId || searchstringList[i].ObjectId == spectrumId) {\r\n index = i;\r\n }\r\n }\r\n if (index > -1) {\r\n searchstringList.splice(index, 1);\r\n }\r\n }\r\n }\r\n };\r\n\r\n var getChemicalNameFromSetData = function () {\r\n var chemicalNames = '';\r\n for (var i = 0; i < SetdataList.length; i++) {\r\n chemicalNames += SetdataList[i].ChemicalName + \",\"\r\n }\r\n\r\n return chemicalNames;\r\n };\r\n\r\n return {\r\n addSpectrumId: addSpectrumId,\r\n addObjectId: addObjectId,\r\n getSpectrumIds: getSpectrumIds,\r\n getObjectIds: getObjectIds,\r\n getfileByName: getfileByName,\r\n removeSpectrumIds: removeSpectrumIds,\r\n removeObjectIds: removeObjectIds,\r\n clearSpectrumIds: clearSpectrumIds,\r\n clearObjectIds: clearObjectIds,\r\n addFileList: addFileList,\r\n getFiles: getFiles,\r\n removeFiles: removeFiles,\r\n clearFiles: clearFiles,\r\n setStartEndValues: setStartEndValues,\r\n getStartEndValues: getStartEndValues,\r\n isSpectrumIdExist: isSpectrumIdExist,\r\n isObjectIdExist: isObjectIdExist,\r\n isFileExist: isFileExist,\r\n setTechnique: setTechnique,\r\n getTechnique: getTechnique,\r\n clearTechnique: clearTechnique,\r\n addUnPublishedDataSet: addUnPublishedDataSet,\r\n getUnPublishedDataSet: getUnPublishedDataSet,\r\n removeUnPublishedDataSet: removeUnPublishedDataSet,\r\n clearUnPublishedDataSet: clearUnPublishedDataSet,\r\n addChemicalname: addChemicalname,\r\n getChemicalNameList: getChemicalNameList,\r\n addSearchString: addSearchString,\r\n getSearchString: getSearchString,\r\n clearSearchString: clearSearchString,\r\n isChemicalNameExist: isChemicalNameExist,\r\n clearChemicalName: clearChemicalName,\r\n addSetdata: addSetdata,\r\n getSpectrumId: getSpectrumId,\r\n getObjectId: getObjectId,\r\n clearDataSetDisplayString: clearDataSetDisplayString,\r\n removeDataSetDisplayString: removeDataSetDisplayString,\r\n getChemicalNameFromSetData: getChemicalNameFromSetData,\r\n removeSearchString: removeSearchString,\r\n getSetdata: getSetdata,\r\n setDeletedObjectIDList: setDeletedObjectIDList,\r\n getDeletedObjectIDList: getDeletedObjectIDList,\r\n clearDeletedObjectIDList: clearDeletedObjectIDList,\r\n addDeletedSearchString: addDeletedSearchString,\r\n getDeletedSearchString: getDeletedSearchString,\r\n clearDeletedSearchString: clearDeletedSearchString\r\n };\r\n\r\n});\r\n\r\napp.directive('dropzone', function () {\r\n return {\r\n restrict: 'C',\r\n link: function (scope, element, attrs) {\r\n scope.UploadUniqueID = null;\r\n var dropzone = null;\r\n var config = {\r\n url: scope.serviceBase + \"upload\",\r\n maxFilesize: 100,\r\n paramName: \"file\",\r\n maxThumbnailFilesize: 10,\r\n parallelUploads: 2,\r\n autoProcessQueue: true,\r\n method: \"POST\",\r\n //withCredentials: false,\r\n //parallelUploads: 2,\r\n //uploadMultiple: false,\r\n //maxFilesize: 256,\r\n //paramName: \"uploadfile\",\r\n //createImageThumbnails: true,\r\n //maxThumbnailFilesize: 10,\r\n //thumbnailWidth: 120,\r\n //thumbnailHeight: 120,\r\n //filesizeBase: 1000,\r\n //maxFiles: null,\r\n params: {\r\n 'SessionID': scope.SessionUploadID\r\n },//[\"sessionIDTest\"],\r\n //clickable: true,\r\n //ignoreHiddenFiles: true,\r\n acceptedFiles: \".tsv,text/tab-separated-values,text/plain,.csv, application/text/plain,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\r\n //acceptedMimeTypes: null,\r\n //autoProcessQueue: true,\r\n //autoQueue: true,\r\n //addRemoveLinks: true,\r\n //previewsContainer: null,\r\n //hiddenInputContainer: \"body\",\r\n //capture: null,\r\n //renameFilename: null,\r\n //dictDefaultMessage: \"Drop spectra data files(in tab delimited format) here or click to upload\",\r\n //dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\r\n //dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\r\n //dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\r\n //dictInvalidFileType: \"You can't upload files of this type.\",\r\n //dictResponseError: \"Server responded with {{statusCode}} code.\",\r\n //dictCancelUpload: \"Cancel upload\",\r\n //dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\r\n //dictRemoveFile: \"Remove file\",\r\n //dictRemoveFileConfirmation: null,\r\n //dictMaxFilesExceeded: \"You can not upload any more files.\"\r\n };\r\n\r\n var eventHandlers = {\r\n 'addedfile': function (file, response, data) {\r\n if (file.type == \"text/plain\" || file.type == \"application/vnd.ms-excel\" || file.type == \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" || file.name.indexOf(\".tsv\") > -1) {\r\n scope.file = file;\r\n //if (this.files[1] != null) {\r\n // this.removeFile(this.files[0]);\r\n //}\r\n scope.$apply(function () {\r\n scope.fileAdded = true;\r\n });\r\n }\r\n else {\r\n alert(\"Invalid file format. Please consult the user documentation\");\r\n }\r\n },\r\n 'success': function (file, response, data) {\r\n if (data.target.status == \"200\") {\r\n\r\n scope.SetUnPublishedDataSet(file.name, response.fileName);\r\n }\r\n },\r\n 'error': function (file, response, data) {\r\n if (data.status == \"400\") {\r\n alert(\"Invalid file format. Please consult the user documentation. File Name : \" + file.name);\r\n }\r\n }\r\n };\r\n\r\n dropzone = new Dropzone(element[0], config);\r\n\r\n angular.forEach(eventHandlers, function (handler, event) {\r\n dropzone.on(event, handler);\r\n });\r\n\r\n scope.processDropzone = function () {\r\n dropzone.processQueue();\r\n };\r\n\r\n scope.resetDropzone = function () {\r\n dropzone.removeAllFiles();\r\n }\r\n }\r\n }\r\n});\r\n\r\napp.controller('redirectcontroller', ['$scope', '$location', '$http', '$cookies', 'searchservice', 'plotDataService', 'progressBarService', '$compile', '$rootScope', '$timeout', function ($scope, $location, $http, $cookies, searchservice, plotDataService, progressBarService, $compile, $rootScope, $timeout) {\r\n $scope.redirectToPlotGraph = function (path) {\r\n $timeout(function () {\r\n progressBarService.showProgressBar();\r\n $timeout(function () {\r\n $location.path(path);\r\n }, 500);\r\n }, 0);\r\n }\r\n}]);\r\n\r\napp.directive('onSearchResultsFinishRender', function ($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n if (scope.$last === true) {\r\n $timeout(function () {\r\n scope.$emit(attr.broadcasteventname ? attr.broadcasteventname : 'ngRepeatFinished');\r\n });\r\n }\r\n }\r\n }\r\n});","'use strict';\r\n\r\napp.controller('plotgraphcontroller', ['$scope', '$location', 'plotgraphservice', 'plotDataService', 'progressBarService', '$rootScope', '$cookies', '$window', '$timeout', '$routeParams', 'deviceDetector', '$http', function ($scope, $location, plotgraphservice, plotDataService, progressBarService, $rootScope, $cookies, $window, $timeout, $routeParams, deviceDetector, $http) {\r\n\r\n if ($routeParams.workspacedid != undefined && $routeParams.workspacedid != null) {\r\n $rootScope.urlworkspaceid = $routeParams.workspacedid;\r\n }\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return false;\r\n }\r\n\r\n $scope.isKratosData = getLocalValue(\"isKratosData\");\r\n\r\n //if ($cookies.get('UserId') != null && $cookies.get('UserId') != 'undefined' && $cookies.get('UserId') != '') {\r\n // $scope.UserId = $cookies.get('UserId');\r\n //}\r\n\r\n $scope.serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n plotDataService.clearDeletedSearchString();\r\n plotDataService.clearDeletedObjectIDList();\r\n progressBarService.showProgressBar();\r\n //$scope.premiumType = parseInt($cookies.get(\"premiumType\") == undefined ? 2 : $cookies.get(\"premiumType\"));\r\n if ($rootScope.urlworkspaceid != undefined && $rootScope.urlworkspaceid != null && $rootScope.urlworkspaceid != \"\") {\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearObjectIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n plotDataService.clearFiles();\r\n $rootScope.SelectedWorkArea = null;\r\n //if ($scope.SessionUploadID != '') {\r\n // plotgraphservice.deleteUnpublishedDataSets($scope, '', '', true);\r\n //}\r\n plotgraphservice.GetWorkSpaceDetailsById($scope, $rootScope.urlworkspaceid, true);\r\n $rootScope.fromworkspaceurl = true;\r\n } else if ($rootScope.compareStoreData != undefined && $rootScope.compareStoreData.length > 0) {\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearObjectIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n plotDataService.clearFiles();\r\n $rootScope.SelectedWorkArea = null;\r\n //if ($scope.SessionUploadID != '') {\r\n // plotgraphservice.deleteUnpublishedDataSets($scope, '', '', true);\r\n //}\r\n\r\n plotgraphservice.GetComparingObjectsData($scope, $rootScope.compareStoreData);\r\n $rootScope.compareStoreData = undefined;\r\n }\r\n\r\n $scope.objectIdList = plotDataService.getObjectIds();\r\n $scope.spectrumIdList = plotDataService.getSpectrumIds();\r\n $scope.startendValues = plotDataService.getStartEndValues();\r\n $scope.fileDataSet = plotDataService.getFiles();\r\n $scope.dataSetList = plotDataService.getSetdata();\r\n\r\n $scope.checkPremiumType = function (spectrumId) {\r\n\r\n var isValid = true;\r\n $.each($scope.dataSetList, function (index, key) {\r\n if (key.IsCurated != undefined && key.IsCurated == true && key.SpectrumId == spectrumId && key.SpectrumId != 0 && $scope.premiumType == 0) {\r\n isValid = false;\r\n\r\n return isValid;\r\n }\r\n })\r\n return isValid\r\n }\r\n\r\n $scope.isDownloadNotRistricted = true;\r\n $scope.searchResults = [];\r\n $scope.searchResultsBackUp = [];\r\n $scope.searchResultMsg = \"\";\r\n var chart;\r\n function setMobileSize(value) {\r\n if (value < 768) {\r\n $scope.mobileSize = true;\r\n } else {\r\n $scope.mobileSize = false;\r\n }\r\n };\r\n\r\n setMobileSize($window.innerWidth);\r\n $scope.SessionUploadID = $cookies.get('SessionID');\r\n\r\n $rootScope.SearchLinkCSS = '';\r\n $rootScope.PlotGraphLinkCSS = 'active';\r\n $rootScope.SaveWorkspaceLinkCSS = '';\r\n\r\n var vm = this;\r\n vm.data = deviceDetector;\r\n vm.allData = JSON.stringify(vm.data, null, 2);\r\n $scope.device = vm.data.device;\r\n\r\n // Set Technique \r\n $scope.SetTechnique = function () {\r\n $scope.technique = plotDataService.getTechnique();\r\n\r\n if ($scope.technique != null && $scope.technique.length > 0) {\r\n var flagXPSUPS = false;\r\n var flagAES = false;\r\n var flagUnspec = false;\r\n $scope.flagUV = false;\r\n\r\n for (var i = 0; i < $scope.technique.length; i++) {\r\n var temp = $scope.technique[i].split(\"-\");\r\n if (temp[1] == \"XPS\" || temp[1] == \"UPS\") {\r\n flagXPSUPS = true;\r\n }\r\n else if (temp[1] == \"AES\") {\r\n flagAES = true;\r\n } else if (temp[1] == \"UV\") {\r\n $scope.flagUV = true;\r\n } else if (temp[1] == \"Unspecified\") {\r\n flagUnspec = true;\r\n }\r\n }\r\n if (flagXPSUPS) {\r\n CheckTechnique(\"xps\")\r\n } else {\r\n UnCheckTechnique(\"xps\");\r\n }\r\n\r\n if (flagAES) {\r\n CheckTechnique(\"aes\");\r\n } else {\r\n UnCheckTechnique(\"aes\");\r\n }\r\n\r\n if (flagUnspec) {\r\n CheckTechnique(\"unspecified\");\r\n } else {\r\n UnCheckTechnique(\"unspecified\");\r\n }\r\n\r\n if ($scope.flagUV) {\r\n CheckTechnique(\"uv-vis\")\r\n } else {\r\n UnCheckTechnique(\"uv-vis\");\r\n }\r\n }\r\n }\r\n\r\n function CheckTechnique(techName) {\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n var _this = $(this);\r\n if (_this.attr(\"graph-figures\").toLowerCase() == techName.toLowerCase()) {\r\n _this.prop(\"checked\", true);\r\n }\r\n });\r\n }\r\n\r\n function UnCheckTechnique(techName) {\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n var _this = $(this);\r\n if (_this.attr(\"graph-figures\").toLowerCase() == techName.toLowerCase()) {\r\n _this.prop(\"checked\", false);\r\n _this.prop(\"disabled\", true);\r\n _this.parent().addClass(\"disabled\");\r\n }\r\n });\r\n }\r\n\r\n $scope.SetTechnique();\r\n\r\n if ($scope.objectIdList.length > 0 || $scope.spectrumIdList.length > 0 || $scope.fileDataSet.length > 0 || plotDataService.getUnPublishedDataSet().length > 0 || $scope.fileDataSet.length > 0) {\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", true);\r\n }\r\n else {\r\n // No spectrum Id found\r\n progressBarService.hideProgressBar();\r\n var paramValue = $location.search().workspacedid;\r\n if (paramValue != null || paramValue != undefined) {\r\n $location.search('workspacedid', null);\r\n }\r\n $location.path('/search');\r\n }\r\n\r\n $scope.ShowGraphByGraphFigures = function (graphFiguresValue) {\r\n $timeout(function () {\r\n progressBarService.showProgressBar();\r\n\r\n $timeout(function () {\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n }, 50);\r\n }, 50);\r\n }\r\n\r\n $scope.ShowPlottedResult = function (technique, obj) {\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n if ($(this).prop(\"checked\") == true) {\r\n getFigure = $(this).attr(\"graph-figures\");\r\n }\r\n })\r\n if (technique.toLowerCase() == getFigure.toLowerCase() || (technique.toLowerCase() == \"ups\" && getFigure.toLowerCase() == \"xps\") || technique.toLowerCase() == \"unpublished\") {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n $scope.SetYOffTextBox = function (technique, spectrumID, offsetApplied, visible) {\r\n\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n if ($(this).prop(\"checked\") == true) {\r\n getFigure = $(this).attr(\"graph-figures\");\r\n }\r\n })\r\n\r\n if ((technique.toLowerCase() == getFigure.toLowerCase() || (technique == \"UPS\" && getFigure == \"XPS\") || technique == \"UnPublished\") && visible == true) {\r\n\r\n if (offsetApplied) {\r\n /// Disable\r\n $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").attr(\"disabled\", \"disabled\");\r\n }\r\n else {\r\n /// Enable\r\n $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").attr(\"disabled\", \"\");\r\n $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").removeAttr(\"disabled\");\r\n }\r\n\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n $scope.RemoveGraph = function (spectrumID, technique, objectStatusType, obj) {\r\n\r\n $timeout(function () {\r\n progressBarService.showProgressBar();\r\n\r\n $timeout(function () {\r\n progressBarService.showProgressBar();\r\n\r\n var index;\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].displayID == spectrumID) {\r\n index = count;\r\n break;\r\n }\r\n }\r\n\r\n // remove techniques\r\n plotDataService.setTechnique(spectrumID, technique, false);\r\n\r\n // remove\r\n $scope.searchResults.splice(index, 1);\r\n progressBarService.showProgressBar();\r\n // remove other related data\r\n $scope.searchStringList = plotDataService.getSearchString();\r\n\r\n if ($rootScope.SelectedWorkArea != undefined && $rootScope.SelectedWorkArea != null && $rootScope.SelectedWorkArea.name.length > 0 && objectStatusType.toLowerCase() == 'active') {\r\n\r\n angular.forEach($scope.searchStringList, function (value, key) {\r\n if (value.FileName == spectrumID || value.ObjectId == spectrumID) {\r\n plotDataService.addDeletedSearchString(value);\r\n }\r\n });\r\n\r\n plotDataService.setDeletedObjectIDList(spectrumID);\r\n }\r\n\r\n plotDataService.removeSpectrumIds(parseInt(spectrumID));\r\n plotDataService.removeFiles(parseInt(spectrumID));\r\n plotDataService.removeObjectIds(parseInt(spectrumID));\r\n plotDataService.removeDataSetDisplayString(spectrumID);\r\n plotDataService.removeSearchString(spectrumID);\r\n\r\n\r\n var techniqueFound = false;\r\n\r\n if (technique == \"UnPublished\") {\r\n techniqueFound = true;\r\n }\r\n else {\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].technique == technique) {\r\n techniqueFound = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (techniqueFound == false) {\r\n $scope.SetTechnique();\r\n }\r\n\r\n //disable save button\r\n $scope.SetWorkSpaceSaveBuuton();\r\n\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n }, 5);\r\n }, 5);\r\n\r\n\r\n }\r\n\r\n $scope.VisibleGraph = function (spectrumID, obj) {\r\n var element = document.getElementById(\"checkbox-\" + spectrumID);\r\n $(element).toggleClass(\"fa-check\");\r\n progressBarService.showProgressBar();\r\n $timeout(function () {\r\n $timeout(function () {\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].displayID == spectrumID) {\r\n //if (obj.target.checked == true) {\r\n if ($(element).hasClass(\"fa-check\")) {\r\n $scope.searchResults[count].visible = true;\r\n }\r\n else {\r\n $scope.searchResults[count].visible = false;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n }, 50);\r\n }, 5);\r\n }\r\n\r\n $scope.VisibleSelectedPeakLabel = function (spectrumID, obj) {\r\n progressBarService.showProgressBar();\r\n var index;\r\n\r\n return $http({\r\n method: \"GET\",\r\n url: './assets/misc/config.global.json',\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].displayID == spectrumID) {\r\n if (obj.target.className.search(\"hidden-labels\") > 0) {\r\n $scope.searchResults[count].showPeakLabel = true;\r\n }\r\n else {\r\n $scope.searchResults[count].showPeakLabel = false;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n }).error(function (data, status) {\r\n console.log(\"Error - VisibleSelectedPeakLabel\");\r\n });\r\n }\r\n\r\n $scope.VisibleAllPeakLabel = function (obj) {\r\n progressBarService.showProgressBar();\r\n\r\n return $http({\r\n method: \"GET\",\r\n //url: $scope.serviceBase + \"search\",\r\n url: './assets/misc/config.global.json',\r\n //params: $scope.pagingInfo,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if (obj.target.checked == true) {\r\n $scope.searchResults[count].showPeakLabel = true;\r\n }\r\n else {\r\n $scope.searchResults[count].showPeakLabel = false;\r\n }\r\n }\r\n\r\n plotgraphservice.renderChart2($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n\r\n }).error(function (data, status) {\r\n console.log(\"Error - VisibleAllPeakLabel\");\r\n });\r\n }\r\n\r\n $scope.SetYOffsetValue = function (spectrumID, obj) {\r\n var element = document.getElementById(\"checkbox-\" + spectrumID);\r\n if ($(element).hasClass(\"fa-check\")) {\r\n //if ($(\"#plotDetails .show-hide-graph[spectrum-id='\" + spectrumID + \"']\").prop(\"checked\") == true) {\r\n if (!isNaN($(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val()) && !isNaN(parseFloat($(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val()))) {\r\n\r\n progressBarService.showProgressBar();\r\n\r\n var offsetValue = 0;\r\n\r\n if (obj.target.className.search(\"fa-toggle-on\") > 0) {\r\n obj.target.className = \"fa fa-toggle-off offset-toggle fa-2x mr-0\";\r\n\r\n // Get Value from Original Array\r\n for (var count = 0; count < $scope.searchResultsBackUp.length; count++) {\r\n if ($scope.searchResultsBackUp[count].displayID == spectrumID) {\r\n tempResult = angular.copy($scope.searchResultsBackUp[count]);\r\n tempResult.offsetApplied = false;\r\n break;\r\n }\r\n }\r\n\r\n // set offset value\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].displayID == spectrumID) {\r\n // Set Peak Status\r\n tempResult.showPeakLabel = $scope.searchResults[count].showPeakLabel;\r\n $scope.searchResults[count] = tempResult;\r\n }\r\n }\r\n\r\n $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val('');\r\n\r\n // show graph\r\n plotgraphservice.renderZoomableChart($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n }\r\n else {\r\n obj.target.className = \"fa fa-toggle-on offset-toggle fa-2x mr-0\";\r\n // Get Offset Value \r\n offsetValue = $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val();\r\n if (offsetValue == \"\") {\r\n offsetValue = 0;\r\n }\r\n else {\r\n offsetValue = parseFloat(offsetValue);\r\n }\r\n\r\n // Show * on legend\r\n $(\"#customLegends\").find(\".offset-asterisk[spectrum-id='\" + spectrumID + \"']\").css('display', 'inline-block');\r\n\r\n // Get Value from Original Array\r\n var tempResult = [];\r\n for (var count = 0; count < $scope.searchResultsBackUp.length; count++) {\r\n if ($scope.searchResultsBackUp[count].displayID == spectrumID) {\r\n //angular.copy($scope.searchResultsBackUp[count], tempResult);\r\n tempResult = angular.copy($scope.searchResultsBackUp[count]);\r\n break;\r\n }\r\n }\r\n\r\n // set offset value\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].displayID == spectrumID) {\r\n tempResult.showPeakLabel = $scope.searchResults[count].showPeakLabel;\r\n $scope.searchResults[count] = tempResult;\r\n var datasetarrayDynamic = [];\r\n var peakinfo1 = null;\r\n datasetarrayDynamic = $scope.searchResults[count].datapoint.data;\r\n peakinfo1 = $scope.searchResults[count].peakInfo;\r\n\r\n if ($(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val() != '') {\r\n for (var i = 0; i < datasetarrayDynamic.length; i++) {\r\n datasetarrayDynamic[i][1] = parseFloat(datasetarrayDynamic[i][1]) + offsetValue;\r\n }\r\n\r\n for (var i = 0; i < peakinfo1.length; i++) {\r\n peakinfo1[i].yval = parseFloat(peakinfo1[i].yval) + offsetValue;\r\n }\r\n }\r\n\r\n if ($(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val() != '') {\r\n $scope.searchResults[count].yOffset = offsetValue;\r\n }\r\n else {\r\n $scope.searchResults[count].yOffset = '';\r\n }\r\n\r\n $scope.searchResults[count].offsetApplied = true;\r\n }\r\n }\r\n\r\n // show graph\r\n plotgraphservice.renderZoomableChart($scope, $location, \"chartdiv\", \"legendDivId\", false);\r\n\r\n //angular.element(document.getElementsByClassName(\"page-spinner\")).hide();\r\n }\r\n }\r\n else {\r\n $(\"#plotDetails .offset-input[spectrum-id='\" + spectrumID + \"']\").val('');\r\n }\r\n }\r\n }\r\n\r\n //Redirect to Article\r\n $scope.redirectToArticle = function (doi) {\r\n $window.open(\"http://dx.doi.org/openurl?url_ver=Z39.88-2003&rft_id=doi:\" + doi + \"&trackingtype=SSS&code=browser\", \"_blank\");\r\n }\r\n\r\n //Export X, Y Data\r\n $scope.ExportXYData = function (displayID, spectrumID, fileName, fileExtension) {\r\n\r\n\r\n //Filter SpectrumID from searchResultsBackUp\r\n var spectrumData = [];\r\n if (spectrumID == 0 && fileName.length > 0) {\r\n spectrumData = $.grep($scope.searchResultsBackUp, function (element, index) {\r\n return element.fileName == fileName;\r\n });\r\n\r\n exportToFile(fileName + \"_Download.\" + fileExtension, spectrumData[0].datapoint.data, fileExtension);\r\n }\r\n else {\r\n spectrumData = $.grep($scope.searchResultsBackUp, function (element, index) {\r\n return element.displayID == displayID;\r\n });\r\n exportToFile(spectrumID + \"_Download.\" + fileExtension, spectrumData[0].datapoint.data, fileExtension);\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n function exportToFile(filename, rows, filetype) {\r\n\r\n var processRow = function (row) {\r\n var finalVal = '';\r\n for (var j = 0; j < row.length; j++) {\r\n var innerValue = row[j] === null ? '' : row[j].toString();\r\n if (row[j] instanceof Date) {\r\n innerValue = row[j].toLocaleString();\r\n };\r\n var result = innerValue.replace(/\"/g, '\"\"');\r\n if (result.search(/(\"|,|\\r\\n)/g) >= 0)\r\n result = '\"' + result + '\"';\r\n if (j > 0)\r\n if (filetype == \"csv\") {\r\n finalVal += ',';\r\n }\r\n else {\r\n finalVal += '\\t';\r\n }\r\n finalVal += result;\r\n }\r\n return finalVal + '\\r\\n';\r\n }\r\n\r\n\r\n var csvFile = '';\r\n for (var i = 0; i < rows.length; i++) {\r\n csvFile += processRow(rows[i]);\r\n }\r\n\r\n var blob = new Blob([csvFile], { type: 'text/csv;charset=utf-8;' });\r\n if (navigator.msSaveBlob) { // IE 10+\r\n navigator.msSaveBlob(blob, filename);\r\n } else {\r\n var link = document.createElement(\"a\");\r\n if (link.download !== undefined) { // feature detection\r\n // Browsers that support HTML5 download attribute\r\n var url = URL.createObjectURL(blob);\r\n link.setAttribute(\"href\", url);\r\n link.setAttribute(\"download\", filename);\r\n link.style.visibility = 'hidden';\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n }\r\n }\r\n\r\n $scope.ShowSpectraFiguredetails = function (displayId, spectrunID, fileName) {\r\n plotgraphservice.getSpectraFiguredetails($scope, displayId);\r\n }\r\n\r\n\r\n\r\n //$scope.closeDetails = function () {\r\n // html2canvas($('#chartdiv'), {\r\n // onrendered: function (canvas) {\r\n // window.scrollTo(0, $scope.scrollY);\r\n // }\r\n // });\r\n //};\r\n\r\n $(\".navbar-nav\").find(\"li\").removeClass(\"active\").removeClass(\"disabled\");\r\n $(\".plotting-area\").removeClass(\"disabled\").attr(\"disabled\", false);\r\n $(\".plotting-area\").parent().addClass(\"active\");\r\n $(\".plot-chart-xs\").hide();\r\n\r\n $scope.$on('ngRepeatBroadcast2', function (ngRepeatFinishedEvent) {\r\n GenerateImage();\r\n //Scroll to top of page\r\n\r\n if (!$scope.isPageSecondTimeLoading) {\r\n $(\"html, body\").animate({\r\n scrollTop: 0\r\n }, \"500\");\r\n\r\n $scope.isPageSecondTimeLoading = true;\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n $scope.SaveWorkspace = function (path) {\r\n\r\n if ($scope.AllowWorkSpaceSave()) {\r\n\r\n var searchStringList = plotDataService.getSearchString();\r\n\r\n angular.forEach($scope.searchResults, function (value, key) {\r\n if (value.objectStatusType == 'deactivated') {\r\n plotDataService.setDeletedObjectIDList(value.displayID);\r\n\r\n angular.forEach(searchStringList, function (value_0, key_0) {\r\n if (value.displayID == value_0.FileName || value.displayID == value_0.ObjectId) {\r\n plotDataService.addDeletedSearchString(value_0);\r\n }\r\n });\r\n\r\n plotDataService.removeFiles(parseInt(value.displayID));\r\n plotDataService.removeObjectIds(parseInt(value.displayID));\r\n plotDataService.removeSearchString(value.displayID);\r\n }\r\n });\r\n $location.path(path);\r\n }\r\n }\r\n\r\n $scope.CloseWorkSpace = function () {\r\n $rootScope.SelectedWorkArea = null;\r\n //plotgraphservice.deleteUnpublishedDataSets($scope, '', '', true);\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearObjectIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearFiles();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n if ($routeParams.workspacedid != undefined && $routeParams.workspacedid != null) {\r\n $location.path('/search');\r\n } else {\r\n $location.path('/savedWorkedSpace');\r\n }\r\n }\r\n\r\n $scope.ShowCitedetails = function (displayID, objectContentType, fileName) {\r\n if (objectContentType.toLowerCase() != \"user\" || (objectContentType.toLowerCase() == \"user\" && fileName == null || fileName == \"\")) {\r\n plotgraphservice.getCitedetails($scope, displayID);\r\n }\r\n else {\r\n plotgraphservice.getCitedetailsByFile($scope, displayID);\r\n }\r\n }\r\n\r\n $scope.AllowWorkSpaceSave = function () {\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n if ($scope.searchResults[count].technique == \"UPS\" || $scope.searchResults[count].technique == \"XPS\" || $scope.searchResults[count].technique == \"AES\" || $scope.searchResults[count].technique == \"UV-VIS\") {\r\n if ($scope.searchResults[count].spectrumID != 0 || $scope.searchResults[count].fileName.trim() != '') {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n $scope.SetWorkSpaceSaveBuuton = function () {\r\n\r\n if ($scope.AllowWorkSpaceSave()) {\r\n angular.element(document.getElementsByClassName(\"save-graph-icon\")).removeClass(\"disabled\").attr(\"disabled\", false);\r\n }\r\n else {\r\n angular.element(document.getElementsByClassName(\"save-graph-icon\")).addClass(\"disabled\").attr(\"disabled\", true);\r\n }\r\n }\r\n\r\n $scope.SetWorkSpaceSaveBuuton();\r\n\r\n $scope.ShowDataSetSearchDetailsForSave = function (searchResult) {\r\n\r\n plotgraphservice.setSearchTerm($scope, searchResult.spectrumID, searchResult.displayID, searchResult.technique)\r\n }\r\n\r\n $rootScope.urlworkspaceid = null;\r\n}]);\r\n\r\napp.service('plotgraphservice', ['$http', 'plotDataService', 'progressBarService', '$compile', '$rootScope', '$window', '$location', function ($http, plotDataService, progressBarService, $compile, $rootScope, $window, $location) {\r\n\r\n this.renderChart2 = function ($scope, $location, chartId, legendDivId, fetchDataFromDB) {\r\n var chartData = [];\r\n progressBarService.showProgressBar();\r\n // Get PeakInfo Data from API call\r\n var datapoint1Peakinfo = null;\r\n var datapoint1 = null;\r\n var showAstrikonLegend = 'none';\r\n var showPeakLabel = 'hide-show-label bg-color-1';\r\n var showPeakLabelText = 'graph-text';\r\n\r\n var graphConfig = [];\r\n var dataPoints = null;\r\n var dataPeakInfo = null;\r\n\r\n var graphColour = null;\r\n var graphTitle = null;\r\n var configData = [];\r\n\r\n var intensityFlag = 'intensity';\r\n var intensityFlag1 = 'intensity-1';\r\n\r\n var isSuccess = true;\r\n\r\n\r\n if (fetchDataFromDB) {\r\n $scope.searchResults = [];\r\n\r\n $.ajax({\r\n url: $scope.serviceBase + 'PlotGraph',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n dataSetIds: $scope.spectrumIdList.toString(), startVal: $scope.startendValues[0], endVal: $scope.startendValues[1], sessionID: $scope.SessionUploadID, fileList: $scope.fileDataSet.toString(), WorkspaceID: $rootScope.workspaceID\r\n }\r\n }).success(function (data, jqXHR) {\r\n if (jqXHR == \"nocontent\") {\r\n $scope.searchResultMsg = \"No data found.\";\r\n isSuccess = false;\r\n }\r\n else {\r\n // Set Mobile Size\r\n $scope.premiumType = data.premiumType;\r\n setLocalValue(\"premiumType\", $scope.premiumType);\r\n angular.forEach(data.graphPlotDataList, function (value, key) {\r\n value.mobiledevice = $scope.mobileSize;\r\n value.device = $scope.device;\r\n value.spectrumID = value.spectrumID == 0 && value.objectContentType == \"kratos\" ? value.displayID : value.spectrumID; // for kratos data with 0 spectrum id\r\n });\r\n\r\n $scope.searchResults = data.graphPlotDataList;\r\n\r\n $scope.searchResultsBackUp = angular.copy(data.graphPlotDataList);\r\n }\r\n }).error(function (request, status, error) {\r\n if (error == \"Not Found\") {\r\n $scope.searchResultMsg = \"No data found.\";\r\n }\r\n else if (error == \"Service Unavailable\") {\r\n progressBarService.hideProgressBar();\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n return false;\r\n }\r\n else if (error == \"Internal Server Error\") {\r\n progressBarService.hideProgressBar();\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n return false;\r\n }\r\n\r\n //console.log($scope.searchResultMsg);\r\n isSuccess = false;\r\n });\r\n }\r\n\r\n if (!isSuccess) {\r\n alert($scope.searchResultMsg);\r\n $location.path('/search');\r\n progressBarService.hideProgressBar();\r\n return false;\r\n }\r\n\r\n //Set flag for figures\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n if ($(this).prop(\"checked\") == true) {\r\n getFigure = $(this).attr(\"graph-figures\");\r\n }\r\n });\r\n\r\n generateChartData();\r\n\r\n function generateChartData() {\r\n $scope.isDownloadNotRistricted = true;\r\n //Clean all custom legends\r\n $(\"#customLegends\").children().remove();\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n\r\n var isValidDataset = $scope.searchResults[count].objectContentType.toLowerCase() == 'nist' && $scope.premiumType == 0 ? false : $scope.checkPremiumType($scope.searchResults[count].spectrumID);\r\n\r\n if ($scope.searchResults[count].visible === true) {\r\n $scope.searchResults[count].visible = isValidDataset && $scope.searchResults[count].objectStatusType == 'active';\r\n $scope.searchResults[count].visible = $scope.searchResults[count].visible ? $scope.searchResults[count].isValidFigureData : $scope.searchResults[count].visible;\r\n }\r\n $scope.searchResults[count].isPremium = isValidDataset;\r\n\r\n if ($scope.isDownloadNotRistricted) {\r\n $scope.isDownloadNotRistricted = isValidDataset;\r\n }\r\n\r\n if ($scope.searchResults[count].objectContentType != \"kratos\" || ($scope.searchResults[count].objectContentType == \"kratos\" && $scope.isKratosData == 1)) {\r\n if (($scope.searchResults[count].technique.toLowerCase() == getFigure.toLowerCase() || ($scope.searchResults[count].technique.toLowerCase() == \"ups\" && getFigure.toLowerCase() == \"xps\") || $scope.searchResults[count].technique.toLowerCase() == \"unpublished\") && $scope.searchResults[count].visible == true) {\r\n var datasetarrayDynamic = null;\r\n var peakinfo1 = null;\r\n showAstrikonLegend = 'none';\r\n showPeakLabel = 'hide-show-label bg-color-1';\r\n showPeakLabelText = 'graph-text';\r\n\r\n\r\n datasetarrayDynamic = $scope.searchResults[count].datapoint.data;\r\n peakinfo1 = $scope.searchResults[count].peakInfo;\r\n\r\n graphColour = $scope.searchResults[count].graphColour;\r\n graphTitle = $scope.searchResults[count].graphTitle;\r\n\r\n for (var i = 0; i < datasetarrayDynamic.length; i++) {\r\n var xVal = parseFloat(datasetarrayDynamic[i][0]).toFixed(3);\r\n var yVal = parseFloat(datasetarrayDynamic[i][1]).toFixed(3);\r\n\r\n // if (flag == 0) {\r\n var obj = {\r\n };\r\n obj['eV'] = xVal;\r\n obj[intensityFlag] = yVal;\r\n //obj['peakEnergy'] = '';\r\n chartData.push(obj);\r\n //}\r\n }\r\n for (var i = 0; i < peakinfo1.length; i++) {\r\n var xVal = parseFloat(peakinfo1[i].xval).toFixed(3);\r\n var yVal = parseFloat(peakinfo1[i].yval).toFixed(3);\r\n var label = peakinfo1[i].lbltext;\r\n var flag = 0;\r\n\r\n\r\n // if (flag == 0) {\r\n var obj = {\r\n };\r\n obj['eV'] = xVal;\r\n obj[intensityFlag1] = yVal;\r\n obj['peakEnergy'] = \"Peak Energy : \" + parseFloat(peakinfo1[i].peakEnergy).toFixed(3);\r\n obj[\"label\"] = label;\r\n chartData.push(obj);\r\n // }\r\n }\r\n\r\n // ShowHide Peak Labels\r\n var peakLabel = \"[[label]]\";\r\n //var peakLabel = \"\";\r\n\r\n if ($scope.searchResults[count].showPeakLabel == false) {\r\n peakLabel = \"\";\r\n }\r\n\r\n configData.push({\r\n \"gid\": \"AmGraph-\" + (count + 1),\r\n \"valueAxis\": \"v\" + (count + 1),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag,\r\n \"lineColor\": graphColour,\r\n //\"labelText\": \"[[label]]\",\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[eV]] , [[\" + intensityFlag + \"]]
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n }, {\r\n \"gid\": \"AmGraph-1-\" + (count + 1),\r\n \"valueAxis\": \"v1-\" + (count + 1),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 0,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag1,\r\n \"lineColor\": graphColour,\r\n \"labelText\": peakLabel,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0,\r\n //\"bulletBorderAlpha\": 1,\r\n //\"bulletBorderColor\": \"#FF9E01\",\r\n //\"hideBulletsCount\": 50,\r\n });\r\n\r\n intensityFlag = 'intensity' + (count + 1);\r\n intensityFlag1 = 'intensity1' + (count + 1);\r\n\r\n if ($scope.searchResults[count].yOffset != '') {\r\n showAstrikonLegend = 'inline-block';\r\n }\r\n\r\n //Legend Peak Labels\r\n if ($scope.searchResults[count].showPeakLabel == false) {\r\n showPeakLabel = 'hide-show-label bg-color-1 hidden-labels';\r\n showPeakLabelText = 'graph-text disabled-text';\r\n }\r\n\r\n //function to generate custom legends\r\n customLegend(count, graphColour, graphTitle, $scope.searchResults[count].displayID, showAstrikonLegend, showPeakLabel, showPeakLabelText);\r\n\r\n } else {\r\n var obj = {\r\n };\r\n obj['eV'] = 0;\r\n obj[intensityFlag] = 0;\r\n chartData.push(obj);\r\n\r\n configData.push({\r\n \"gid\": \"AmGraph-\" + (0),\r\n \"valueAxis\": \"v\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag,\r\n \"lineColor\": graphColour,\r\n \"color\": graphColour,\r\n \"valueField\": \"visits\",\r\n \"balloonText\": \"
    [[eV]] , [[\" + intensityFlag + \"]]
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n }, {\r\n \"gid\": \"AmGraph-1-\" + (0),\r\n \"valueAxis\": \"v1-\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 0,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag1,\r\n \"lineColor\": graphColour,\r\n \"labelText\": peakLabel,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n });\r\n }\r\n } else {\r\n var obj = {\r\n };\r\n obj['eV'] = 0;\r\n obj[intensityFlag] = 0;\r\n chartData.push(obj);\r\n\r\n configData.push({\r\n \"gid\": \"AmGraph-\" + (0),\r\n \"valueAxis\": \"v\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag,\r\n \"lineColor\": graphColour,\r\n \"color\": graphColour,\r\n \"valueField\": \"visits\",\r\n \"balloonText\": \"
    [[eV]] , [[\" + intensityFlag + \"]]
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n }, {\r\n \"gid\": \"AmGraph-1-\" + (0),\r\n \"valueAxis\": \"v1-\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 0,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag1,\r\n \"lineColor\": graphColour,\r\n \"labelText\": peakLabel,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n });\r\n }\r\n }\r\n\r\n if ($scope.searchResults.length == 0) {\r\n var obj = {\r\n };\r\n obj['eV'] = 0;\r\n obj[intensityFlag] = 0;\r\n chartData.push(obj);\r\n\r\n configData.push({\r\n \"gid\": \"AmGraph-\" + (0),\r\n \"valueAxis\": \"v\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag,\r\n \"lineColor\": graphColour,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[eV]] , [[\" + intensityFlag + \"]]
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n }, {\r\n \"gid\": \"AmGraph-1-\" + (0),\r\n \"valueAxis\": \"v1-\" + (0),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 0,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag1,\r\n \"lineColor\": graphColour,\r\n \"labelText\": peakLabel,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n });\r\n }\r\n }\r\n\r\n if (getFigure == \"XPS\") {\r\n st = true;\r\n } else {\r\n st = false;\r\n }\r\n $scope.isShowAllPeakLabels = getFigure.toLowerCase() == \"uv-vis\" ? false : true;\r\n var bottomTitle = getFigure.toLowerCase() == \"uv-vis\" ? \"Wavelength (nm)\" : \"Energy (eV)\";\r\n var leftTitle = getFigure.toLowerCase() == \"uv-vis\" ? \"Logarithm Epsilon (cm\" : \"Intensity (Counts/s)\";\r\n\r\n chart = AmCharts.makeChart(chartId, {\r\n \"type\": \"xy\",\r\n \"zoomOutButtonAlpha\": 1,\r\n \"export\": {\r\n \"enabled\": $scope.isDownloadNotRistricted,\r\n \"menu\": [{\r\n \"class\": \"export-main\",\r\n \"menu\": [{\r\n \"label\": \"Download as ...\",\r\n \"menu\": [\"PNG\", \"JPG\", \"CSV\", \"PDF\"]\r\n }, {\r\n label: \"Save as ...\",\r\n menu: [\"CSV\", \"XLSX\", \"JSON\"]\r\n }, {\r\n format: \"PRINT\",\r\n label: \"Print Graph\"\r\n }, {\r\n format: \"PRINT\",\r\n label: \"Print Page\"\r\n }]\r\n }]\r\n },\r\n \"zoomLatitude\": 0,\r\n \"zoomLongitude\": 0,\r\n \"mouseWheelZoomEnabled\": true,\r\n\r\n //\"legend\": {\r\n // //\"useGraphSettings\": false,\r\n // //\"align\": \"center\",\r\n // //\"markerSize\": 16,\r\n // //\"markerType\": \"square\",\r\n // //\"divId\": legendDivId,\r\n // //\"clickMarker\": handleLegendClick,\r\n // //\"clickLabel\": handleLegendClick\r\n // \"enabled\": false\r\n //},\r\n\r\n \"graphs\": configData,\r\n\r\n \"valueAxes\": [\r\n {\r\n \"title\": bottomTitle,\r\n \"position\": \"bottom\",\r\n \"reversed\": st,\r\n },\r\n {\r\n \"title\": leftTitle,\r\n \"position\": \"left\"\r\n }\r\n ],\r\n\r\n \"chartCursor\": {\r\n \"valueLineBalloonEnabled\": false,\r\n //\"cursorAlpha\": 0,\r\n \"cursorColor\": \"#258cbb\",\r\n //\"valueLineAlpha\": 0,\r\n //\"valueZoomable\": true,\r\n \"cursorPosition\": \"mouse\"\r\n },\r\n\r\n \"chartScrollbar\": {\r\n \"updateOnReleaseOnly\": true\r\n },\r\n\r\n \"balloon\": {\r\n \"fixedPosition\": false,\r\n \"offsetY\": 20\r\n },\r\n\r\n \"dataProvider\": chartData\r\n\r\n });\r\n\r\n function handleLegendClick(graph) {\r\n var chartVar = graph.chart;\r\n for (var i = 0; i < chartVar.graphs.length; i++) {\r\n if (graph.id == chartVar.graphs[i].id) {\r\n var graphRow = $(\"#graph-row-\" + i);\r\n\r\n if ($(graphRow).children().find(\".show-hide-graph\").hasClass(\"fa-eye\")) {\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\", \"Show graph\");\r\n chartVar.hideGraph(chartVar.graphs[i]);\r\n } else {\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\", \"Hide graph\");\r\n chartVar.showGraph(chartVar.graphs[i]);\r\n }\r\n\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n }\r\n }\r\n\r\n // return false so that default action is canceled\r\n return false;\r\n }\r\n\r\n function customLegend(count, graphColour, graphTitle, spectrumID, showAstrikonLegend, showPeakLabel, showPeakLabelText) {\r\n var legend = '
    ' +\r\n '' +\r\n '' + graphTitle + '' +\r\n '
    ';\r\n var compiledHtml = $compile(legend)($scope);\r\n angular.element(document.getElementById('customLegends')).append(compiledHtml);\r\n }\r\n\r\n function handleClick(event) {\r\n console.log(event);\r\n }\r\n\r\n chart.handleResize();\r\n chart.write(\"chartdiv\");\r\n\r\n if (getFigure.toLowerCase() == \"uv-vis\") {\r\n var tspanElements = [];\r\n tspanElements = document.getElementsByTagName(\"tspan\");\r\n if (tspanElements.length > 0)\r\n angular.forEach(tspanElements, function (value, key) {\r\n var textContent = value.textContent;\r\n if (textContent != undefined && textContent.indexOf(\"Logarithm Epsilon\") > -1) {\r\n var firstTspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\r\n firstTspan.setAttributeNS(null, \"dy\", \"-5\");\r\n var firstTextnode = document.createTextNode(\"2\");\r\n firstTspan.appendChild(firstTextnode);\r\n var secondTspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\r\n secondTspan.setAttributeNS(null, \"dy\", \"5\");\r\n var secondTextnode = document.createTextNode(\"/mol)\");\r\n secondTspan.appendChild(secondTextnode);\r\n value.appendChild(firstTspan);\r\n value.appendChild(secondTspan);\r\n }\r\n });\r\n }\r\n\r\n hideAllPeakLabel();\r\n function hideAllPeakLabel() {\r\n var getTotalLength = angular.element(document.getElementById('customLegends')).children(\":visible\").length;\r\n var getHiddenLabelsLength = angular.element(document.getElementById('customLegends')).find(\".hidden-labels\").length;\r\n\r\n if (getTotalLength == getHiddenLabelsLength) {\r\n if (getTotalLength == 0) {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", false);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Check to show all labels\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"disabled\", \"disabled\");\r\n }\r\n else {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", false);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Check to show all labels\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).removeAttr(\"disabled\");\r\n }\r\n }\r\n else if (getHiddenLabelsLength == 0) {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).removeAttr(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", true);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Uncheck to hide all labels\");\r\n }\r\n }\r\n\r\n //angular.element(document.getElementsByClassName(\"page-spinner\")).hide();\r\n };\r\n\r\n this.renderZoomableChart = function ($scope, $location, chartId, legendDivId, fetchDataFromDB) {\r\n var chartData = [];\r\n progressBarService.showProgressBar();\r\n // Get PeakInfo Data from API call\r\n var datapoint1Peakinfo = null;\r\n var datapoint1 = null;\r\n var showAstrikonLegend = 'none';\r\n var showPeakLabel = 'hide-show-label bg-color-1';\r\n var showPeakLabelText = 'graph-text';\r\n\r\n var graphConfig = [];\r\n var dataPoints = null;\r\n var dataPeakInfo = null;\r\n\r\n var graphColour = null;\r\n var graphTitle = null;\r\n var configData = [];\r\n\r\n var intensityFlag = 'intensity';\r\n var intensityFlag1 = 'intensity-1';\r\n\r\n generateChartData();\r\n\r\n function generateChartData() {\r\n $scope.isDownloadNotRistricted = true;\r\n //Clean all custom legends\r\n $(\"#customLegends\").children().remove();\r\n for (var count = 0; count < $scope.searchResults.length; count++) {\r\n var isValidDataset = $scope.searchResults[count].objectContentType.toLowerCase() == 'nist' && $scope.premiumType == 0 ? false : $scope.checkPremiumType($scope.searchResults[count].spectrumID);\r\n if ($scope.searchResults[count].visible === true) {\r\n $scope.searchResults[count].visible = isValidDataset && $scope.searchResults[count].objectStatusType == 'active';\r\n }\r\n $scope.searchResults[count].isPremium = isValidDataset;\r\n\r\n if (($scope.searchResults[count].technique.toLowerCase() == getFigure.toLowerCase() || ($scope.searchResults[count].technique.toLowerCase() == \"ups\" && getFigure.toLowerCase() == \"xps\") || $scope.searchResults[count].technique.toLowerCase() == \"unpublished\") && $scope.searchResults[count].visible == true) {\r\n var datasetarrayDynamic = null;\r\n var peakinfo1 = null;\r\n showAstrikonLegend = 'none';\r\n showPeakLabel = 'hide-show-label bg-color-1';\r\n showPeakLabelText = 'graph-text';\r\n\r\n if ($scope.isDownloadNotRistricted) {\r\n $scope.isDownloadNotRistricted = isValidDataset;\r\n }\r\n\r\n datasetarrayDynamic = $scope.searchResults[count].datapoint.data;\r\n peakinfo1 = $scope.searchResults[count].peakInfo;\r\n\r\n graphColour = $scope.searchResults[count].graphColour;\r\n graphTitle = $scope.searchResults[count].graphTitle;\r\n\r\n for (var i = 0; i < datasetarrayDynamic.length; i++) {\r\n var xVal = parseFloat(datasetarrayDynamic[i][0]).toFixed(3);\r\n var yVal = parseFloat(datasetarrayDynamic[i][1]).toFixed(3);\r\n\r\n // if (flag == 0) {\r\n var obj = {\r\n };\r\n obj['eV'] = xVal;\r\n obj[intensityFlag] = yVal;\r\n //obj['peakEnergy'] = '';\r\n chartData.push(obj);\r\n //}\r\n }\r\n for (var i = 0; i < peakinfo1.length; i++) {\r\n var xVal = parseFloat(peakinfo1[i].xval).toFixed(3);\r\n var yVal = parseFloat(peakinfo1[i].yval).toFixed(3);\r\n var label = peakinfo1[i].lbltext;\r\n var flag = 0;\r\n\r\n\r\n // if (flag == 0) {\r\n var obj = {\r\n };\r\n obj['eV'] = xVal;\r\n obj[intensityFlag1] = yVal;\r\n obj['peakEnergy'] = \"Peak Energy : \" + parseFloat(peakinfo1[i].peakEnergy).toFixed(3);\r\n obj[\"label\"] = label;\r\n chartData.push(obj);\r\n // }\r\n }\r\n\r\n // ShowHide Peak Labels\r\n var peakLabel = \"[[label]]\";\r\n //var peakLabel = \"\";\r\n\r\n if ($scope.searchResults[count].showPeakLabel == false) {\r\n peakLabel = \"\";\r\n }\r\n\r\n configData.push({\r\n \"gid\": \"AmGraph-\" + (count + 1),\r\n \"valueAxis\": \"v\" + (count + 1),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag,\r\n \"lineColor\": graphColour,\r\n //\"labelText\": \"[[label]]\",\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[eV]] , [[\" + intensityFlag + \"]]
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0\r\n }, {\r\n \"gid\": \"AmGraph-1-\" + (count + 1),\r\n \"valueAxis\": \"v1-\" + (count + 1),\r\n \"title\": graphTitle,\r\n \"type\": \"line\",\r\n \"lineAlpha\": 0,\r\n \"xField\": \"eV\",\r\n \"yField\": intensityFlag1,\r\n \"lineColor\": graphColour,\r\n \"labelText\": peakLabel,\r\n \"color\": graphColour,\r\n \"valueField\": \"label\",\r\n \"balloonText\": \"
    [[peakEnergy]]
    \",\r\n \"bullet\": \"round\",\r\n \"bulletAlpha\": 0,\r\n \"bulletSize\": 0,\r\n //\"bulletBorderAlpha\": 1,\r\n //\"bulletBorderColor\": \"#FF9E01\",\r\n //\"hideBulletsCount\": 50,\r\n });\r\n\r\n intensityFlag = 'intensity' + (count + 1);\r\n intensityFlag1 = 'intensity1' + (count + 1);\r\n\r\n if ($scope.searchResults[count].yOffset != '') {\r\n showAstrikonLegend = 'inline-block';\r\n }\r\n\r\n //Legend Peak Labels\r\n if ($scope.searchResults[count].showPeakLabel == false) {\r\n showPeakLabel = 'hide-show-label bg-color-1 hidden-labels';\r\n showPeakLabelText = 'graph-text disabled-text';\r\n }\r\n\r\n //function to generate custom legends\r\n customLegend(count, graphColour, graphTitle, $scope.searchResults[count].displayID, showAstrikonLegend, showPeakLabel, showPeakLabelText);\r\n\r\n }\r\n }\r\n\r\n chart.ignoreZoomed = true;\r\n chart.dataProvider = chartData;\r\n chart.validateData();\r\n\r\n if (getFigure.toLowerCase() == \"uv-vis\") {\r\n var tspanElements = [];\r\n tspanElements = document.getElementsByTagName(\"tspan\");\r\n if (tspanElements.length > 0)\r\n angular.forEach(tspanElements, function (value, key) {\r\n var textContent = value.textContent;\r\n if (textContent != undefined && textContent.indexOf(\"Logarithm Epsilon\") > -1) {\r\n var firstTspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\r\n firstTspan.setAttributeNS(null, \"dy\", \"-5\");\r\n var firstTextnode = document.createTextNode(\"2\");\r\n firstTspan.appendChild(firstTextnode);\r\n var secondTspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\r\n secondTspan.setAttributeNS(null, \"dy\", \"5\");\r\n var secondTextnode = document.createTextNode(\"/mol)\");\r\n secondTspan.appendChild(secondTextnode);\r\n value.appendChild(firstTspan);\r\n value.appendChild(secondTspan);\r\n }\r\n });\r\n }\r\n }\r\n\r\n function customLegend(count, graphColour, graphTitle, spectrumID, showAstrikonLegend, showPeakLabel, showPeakLabelText) {\r\n var legend = '
    ' +\r\n '' +\r\n '' + graphTitle + '' +\r\n '
    ';\r\n var compiledHtml = $compile(legend)($scope);\r\n angular.element(document.getElementById('customLegends')).append(compiledHtml);\r\n }\r\n\r\n\r\n };\r\n\r\n\r\n function GetCheckedGraph(graphNo) {\r\n //Set flag for figures\r\n //var count = 0;\r\n var returnVal = false;\r\n var checkBoxes = $(\".show-hide-graph\")\r\n\r\n for (var i = 0; i < checkBoxes.length; i++) {\r\n if (checkBoxes[i].checked == true && i == graphNo) {\r\n returnVal = true;\r\n break;\r\n }\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n function hideAllPeakLabel() {\r\n var getTotalLength = angular.element(document.getElementById('customLegends')).children(\":visible\").length\r\n var getHiddenLabelsLength = angular.element(document.getElementById('customLegends')).find(\".hidden-labels\").length;\r\n\r\n if (getTotalLength == getHiddenLabelsLength) {\r\n if (getTotalLength == 0) {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", false);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Check to show all labels\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"disabled\", \"disabled\");\r\n }\r\n else {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", false);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Check to show all labels\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).removeAttr(\"disabled\");\r\n }\r\n }\r\n else if (getHiddenLabelsLength == 0) {\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).removeAttr(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).prop(\"checked\", true);\r\n angular.element(document.getElementsByClassName(\"show-all-peak-labels\")).attr(\"title\", \"Uncheck to hide all labels\");\r\n }\r\n }\r\n\r\n\r\n //offset input change\r\n $(\".swipe-wrap\").on('keyup', \".offset-input\", function (e) {\r\n //validate value\r\n var getVal = $(this).val();\r\n if (getVal.substr(0, 1) == \"-\") {\r\n $(this).attr(\"maxlength\", \"7\");\r\n } else {\r\n $(this).attr(\"maxlength\", \"6\");\r\n }\r\n if ((!isNaN(getVal) && getVal > -1000000 && getVal < 1000000) || (getVal == \"-\")) {\r\n $(this).removeClass(\"border-red\");\r\n\r\n //copy the value to print table value\r\n var getRow = $(this).closest(\"tr\").attr(\"row\");\r\n var getVal = $(this).val();\r\n $(\".print-visible\").find(\".\" + getRow).find(\".offset-input\").attr(\"value\", getVal);\r\n\r\n } else {\r\n $(this).addClass(\"border-red\");\r\n return false;\r\n }\r\n });\r\n\r\n this.getSpectraFiguredetails = function ($scope, spectrunID) {\r\n $.ajax({\r\n url: $scope.serviceBase + 'Instrument',\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n 'spectrumId': spectrunID\r\n }\r\n }).success(function (data) {\r\n\r\n $scope.spectrumDetails = data;\r\n $scope.spectrumDetails.figureNumber = spectrunID.toString().replace($scope.spectrumDetails.accessionNo, $scope.spectrumDetails.accessionNo + '-');\r\n $scope.$apply();\r\n $('#details').modal('show');\r\n\r\n\r\n }).error(function (request, status, error) {\r\n //alert();\r\n });\r\n };\r\n\r\n this.getSpectraFiguredetailsByFileName = function ($scope, fileName) {\r\n\r\n $.ajax({\r\n url: $scope.serviceBase + 'InstrumentByFileName',\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n 'fileName': fileName\r\n }\r\n }).success(function (data) {\r\n\r\n $scope.spectrumDetails = data;\r\n $scope.spectrumDetails.figureNumber = \"\";\r\n $scope.$apply();\r\n $('#details').modal('show');\r\n\r\n\r\n }).error(function (request, status, error) {\r\n //alert();\r\n });\r\n };\r\n\r\n\r\n this.deleteUnpublishedDataSets = function ($scope, uniqueID, filename, deleteAllRows) {\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"deleteFiles\",\r\n params: {\r\n 'uniqueID': uniqueID, 'sessionID': $scope.SessionUploadID, 'deleteAllRows': deleteAllRows\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n if (!deleteAllRows) {\r\n plotDataService.removeUnPublishedDataSet(filename);\r\n --$scope.unPublishedIDs;\r\n if ($scope.UnPublishedDataSetCount <= 0) {\r\n $(\".clear-all-datasets\").show();\r\n }\r\n $scope.$apply();\r\n }\r\n else {\r\n plotDataService.clearUnPublishedDataSet();\r\n $scope.unPublishedIDs = 0;\r\n $scope.$apply();\r\n }\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n }\r\n });\r\n };\r\n\r\n this.getCitedetails = function ($scope, spectrunID) {\r\n $.ajax({\r\n url: $scope.serviceBase + 'GetCiteDetails',\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n 'spectrumId': spectrunID\r\n }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n $scope.CiteDetails = data;\r\n\r\n $scope.$apply();\r\n $('#cite').modal('show');\r\n }\r\n }).error(function (request, status, error) {\r\n //alert();\r\n });\r\n };\r\n\r\n this.getCitedetailsByFile = function ($scope, fileName) {\r\n\r\n $.ajax({\r\n url: $scope.serviceBase + 'GetCiteDetailsByFileName',\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n 'fileName': fileName\r\n }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n $scope.CiteDetails = data;\r\n\r\n $scope.$apply();\r\n $('#cite').modal('show');\r\n }\r\n }).error(function (request, status, error) {\r\n //alert();\r\n });\r\n };\r\n\r\n this.setSearchTerm = function ($scope, spectrunID, fileName, technique) {\r\n\r\n $scope.dataSetSearchDetailsToSave = null;\r\n var searchString = plotDataService.getSearchString();\r\n\r\n $('#searchTermsModal').modal('show');\r\n\r\n if (searchString != null) {\r\n for (var i = 0; i < searchString.length; i++) {\r\n var isShow = technique.toLowerCase() == 'uv-vis' ? searchString[i].FileName == fileName : searchString[i].id == spectrunID;\r\n if (isShow) {\r\n\r\n var temp = searchString[i].Searchstring.split(\"|\");\r\n if ($scope.flagUV) {\r\n $scope.dataSetSearchDetailsToSave = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n casRegistryNumber: temp[2].split(\":\")[1],\r\n technique: temp[3].split(\":\")[1],\r\n authorLastName: temp[4].split(\":\")[1],\r\n publicationYear: temp[5].split(\":\")[1],\r\n sourceTitle: temp[6].split(\":\")[1],\r\n };\r\n } else {\r\n $scope.dataSetSearchDetailsToSave = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n element: temp[2].split(\":\")[1],\r\n hostMaterial: temp[3].split(\":\")[1],\r\n transition: temp[4].split(\":\")[1],\r\n technique: temp[5].split(\":\")[1].replace(\"UNSPECIFIED\", \"Unspecified\"),\r\n accession: temp[6].split(\":\")[1],\r\n authorLastName: temp[7].split(\":\")[1],\r\n spectralRegion: temp[8].split(\":\")[1].replace(\"UNSPECIFIED\", \"Unspecified\"),\r\n startValue: temp[9].split(\":\")[1],\r\n endValue: temp[10].split(\":\")[1],\r\n fromYear: temp[11].split(\":\")[1],\r\n todate: temp[12].split(\":\")[1],\r\n doi: temp[13].split(\":\")[1]\r\n };\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n\r\n this.GetWorkSpaceDetailsById = function ($scope, workspaceId, decryptedWorkareaid) {\r\n $.ajax({\r\n url: $scope.serviceBase + 'GetWorkSpaceByID',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n dataSetIds: workspaceId, DecryptedWorkareaid: decryptedWorkareaid\r\n }\r\n }).success(function (data) {\r\n var workAreaId, workAreaName, workspaceOwnerId;\r\n\r\n for (var key in data) {\r\n if (data[key].workAreaID != undefined) {\r\n if (data[key].objectDataSetName != \"\") {\r\n //objectWorkSpaceId = data[key].workAreaID;\r\n plotDataService.addFileList(data[key].objectID);\r\n }\r\n //} else {\r\n workAreaId = data[key].workAreaID;\r\n workspaceOwnerId = data[key].eSpectraPersonID;\r\n //}\r\n workAreaName = data[key].areaName;\r\n plotDataService.addSetdata(data[key].workAreaID, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].technique, data[key].chemicalName, data[key].hostMaterial, data[key].spectralRegion, data[key].pubDate, data[key].dOI, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", data[key].isCurated, true);\r\n if (data[key].spectrumID > 0) {\r\n plotDataService.addSpectrumId(data[key].objectID);\r\n }\r\n plotDataService.addChemicalname(data[key].chemicalName);\r\n plotDataService.addSearchString(data[key].searchStringList, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, workAreaId, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", true);\r\n plotDataService.setTechnique(data[key].objectID, data[key].technique, true);\r\n }\r\n }\r\n\r\n $rootScope.SelectedWorkArea = {\r\n id: workAreaId, name: workAreaName, ownerId: workspaceOwnerId\r\n };\r\n\r\n }).error(function (request, status, error) {\r\n if (error == \"Not Found\") {\r\n $scope.searchResultMsg = \"No data found.\";\r\n }\r\n else if (error == \"Service Unavailable\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n else if (error == \"Internal Server Error\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n\r\n console.log($scope.searchResultMsg);\r\n });\r\n };\r\n\r\n this.GetComparingObjectsData = function ($scope, compareData) {\r\n $.ajax({\r\n url: $scope.serviceBase + 'GetComparingObjectsData',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {\r\n DatamanagementFile: compareData\r\n }\r\n }).success(function (data) {\r\n\r\n for (var key in data) {\r\n\r\n if (data[key].objectDataSetName != \"\") {\r\n plotDataService.addFileList(data[key].objectID);\r\n }\r\n\r\n plotDataService.addSetdata(data[key].workAreaID, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].technique, data[key].chemicalName, data[key].hostMaterial, data[key].spectralRegion, data[key].pubDate, data[key].dOI, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", data[key].isCurated, true);\r\n if (data[key].spectrumID > 0) {\r\n plotDataService.addSpectrumId(data[key].objectID);\r\n }\r\n plotDataService.addChemicalname(data[key].chemicalName);\r\n plotDataService.addSearchString(data[key].searchStringList, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].workAreaID, data[key].objectDataSetName != \"\" ? data[key].objectID : \"\", true);\r\n plotDataService.setTechnique(data[key].objectID, data[key].technique, true);\r\n\r\n }\r\n }).error(function (request, status, error) {\r\n if (error == \"Not Found\") {\r\n $scope.searchResultMsg = \"No data found.\";\r\n }\r\n else if (error == \"Service Unavailable\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n else if (error == \"Internal Server Error\") {\r\n if ($rootScope.globalConfig.errorPage == undefined || $rootScope.globalConfig.errorPage == null || $rootScope.globalConfig.errorPage == '') {\r\n $location.path(\"/error\");\r\n }\r\n else {\r\n $window.location.href = '../app/modules/error/' + $rootScope.globalConfig.errorPage;\r\n }\r\n }\r\n\r\n console.log($scope.searchResultMsg);\r\n });\r\n };\r\n\r\n}]);\r\n\r\napp.directive('onFinishRender', function ($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n if (scope.$last === true) {\r\n $timeout(function () {\r\n scope.$emit(attr.broadcasteventname ? attr.broadcasteventname : 'ngRepeatFinished');\r\n });\r\n }\r\n }\r\n }\r\n});\r\n\r\napp.filter('ngRepeatFinish', function ($timeout) {\r\n return function (data, scope) {\r\n var me = this;\r\n\r\n var flagProperty = '__finishedRendering__';\r\n if (!data[flagProperty]) {\r\n Object.defineProperty(\r\n data,\r\n flagProperty,\r\n {\r\n enumerable: false, configurable: true, writable: false, value: {}\r\n });\r\n $timeout(function () {\r\n delete data[flagProperty];\r\n scope.$emit('ngRepeatBroadcast2');\r\n }, 0, false);\r\n }\r\n\r\n return data;\r\n }\r\n});","'use strict';\r\napp.controller('savedworkspacecontroller', ['$scope', '$location', 'plotDataService', 'SaveGraphServices', 'GetSavedWorkSpaceServices', 'GetSpectrumIDServices', 'SpectrumIDService', 'GetAreaNameServices', 'progressBarService', '$rootScope', '$cookies', 'DeleteWokSpaceServices', '$window', '$timeout', 'CommonService', function ($scope, $location, plotDataService, SaveGraphServices, GetSavedWorkSpaceServices, GetSpectrumIDServices, SpectrumIDService, GetAreaNameServices, progressBarService, $rootScope, $cookies, DeleteWokSpaceServices, $window, $timeout, commonService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n if ($rootScope.isFirstLogin == '1' && $rootScope.hasSharedWorkspaces == '1') {\r\n $scope.activeTab = 2;\r\n $rootScope.isFirstLogin = '0';\r\n $('div.modal-backdrop').remove();\r\n } else {\r\n $scope.activeTab = 1;\r\n }\r\n\r\n $scope.serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n $scope.eSpectraEmail = getLocalValue('emailId');\r\n $scope.currentU\r\n $scope.spectrumIdList = [];\r\n $scope.searchstringlist = [];\r\n $scope.workareaidlist = [];\r\n $scope.fileNameList = [];\r\n $scope.isShowPlus = true;\r\n $scope.captchaVisible = true;\r\n $scope.isShowSharedDatafields = false;\r\n //$scope.activeTab = 1;\r\n $scope.isDisableSaveBtn = true;\r\n //$scope.workspaceMsg = \"Kindly search for a workspace.\";\r\n $('#tblsavedworkSpace').hide();\r\n var workareaid = \"\";\r\n\r\n //if ($('#txtWorkspaceName').val() == \"\") {\r\n // $scope.isDisableSaveBtn = true;\r\n //} else {\r\n // $scope.isDisableSaveBtn = false;\r\n //}\r\n\r\n $rootScope.SearchLinkCSS = '';\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n $rootScope.SaveWorkspaceLinkCSS = 'active';\r\n\r\n $scope.totalNoOfRecordsofSavedWorkspace = 1 / 0;\r\n $scope.totalNoOfRecordsofSharedWorkspace = 1 / 0;\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n if ($scope.currentPageOfSavedWorkspace == undefined) {\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n }\r\n\r\n $scope.currentPageOfSharedWorkspace = 1;\r\n if ($scope.currentPageOfSharedWorkspace == undefined) {\r\n $scope.currentPageOfSharedWorkspace = 1;\r\n }\r\n\r\n $scope.pagingInfo = {\r\n savedPageNo: 1,\r\n sharedPageNo: 1,\r\n itemsPerPage: 10,\r\n savedWorkSortBy: 'eSpectraCreateTS',\r\n sharedWorkSortBy: 'eSpectraCreateTS',\r\n savedWorkReverse: true,\r\n sharedWorkReverse: true\r\n };\r\n\r\n\r\n $scope.setTab = function (tabNum) {\r\n $scope.activeTab = tabNum;\r\n }\r\n\r\n $scope.isSet = function (tabNum) {\r\n return $scope.activeTab == tabNum;\r\n }\r\n\r\n $scope.sort = function (sortBy, workspaceType) {\r\n if (workspaceType == 'savedworkSpace') {\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n $scope.pagingInfo.savedPageNo = 1;\r\n if (sortBy === $scope.pagingInfo.savedWorkSortBy) {\r\n $scope.pagingInfo.savedWorkReverse = !$scope.pagingInfo.savedWorkReverse;\r\n } else {\r\n $scope.pagingInfo.savedWorkSortBy = sortBy;\r\n $scope.pagingInfo.savedWorkReverse = false;\r\n }\r\n } else {\r\n $scope.currentPageOfSharedWorkspace = 1;\r\n $scope.pagingInfo.sharedPageNo = 1;\r\n if (sortBy === $scope.pagingInfo.sharedWorkSortBy) {\r\n $scope.pagingInfo.sharedWorkReverse = !$scope.pagingInfo.sharedWorkReverse;\r\n } else {\r\n $scope.pagingInfo.sharedWorkSortBy = sortBy;\r\n $scope.pagingInfo.sharedWorkReverse = false;\r\n }\r\n }\r\n\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n };\r\n\r\n $scope.addFields = function () {\r\n if ($scope.shareData.length < 10) {\r\n $scope.shareData.push({ name: \"\", emailID: \"\", isShowPlus: false, isValid: true });\r\n }\r\n }\r\n\r\n $scope.removeField = function (index) {\r\n $scope.shareData.splice(index, 1);\r\n $scope.checkSharedEmailID();\r\n }\r\n\r\n var SearStringResult = plotDataService.getSearchString();\r\n\r\n if (SearStringResult.length > 0) {\r\n for (var i = 0; i < SearStringResult.length; i++) {\r\n if ((SearStringResult[i].id != 0 || SearStringResult[i].FileName != '') && SearStringResult[i].IsValidFigureData) {\r\n $scope.spectrumIdList.push(SearStringResult[i].ObjectId);\r\n $scope.fileNameList.push(SearStringResult[i].FileName);\r\n $scope.searchstringlist.push(SearStringResult[i].Searchstring);\r\n //if (SearStringResult[i].FileName.trim() == '') {\r\n $scope.WorkAreaid = SearStringResult[i].WorkareaId;\r\n //} else {\r\n // $scope.objectWorkSpaceId = SearStringResult[i].WorkareaId;\r\n //}\r\n }\r\n }\r\n }\r\n else {\r\n if ($location.$$path != '/savedWorkedSpace') {\r\n $location.path('/search');\r\n return false;\r\n }\r\n }\r\n\r\n $scope.chemicalname = plotDataService.getChemicalNameFromSetData().replace(/,\\s*$/, \"\");;\r\n\r\n //if ($cookies.get('UserId') != null && $cookies.get('UserId') != 'undefined' && $cookies.get('UserId') != '') {\r\n // $scope.UserId = $cookies.get('UserId');\r\n //}\r\n\r\n $scope.SessionUploadID = '';\r\n if ($cookies.get('SessionID') != null && $cookies.get('SessionID') != 'undefined' && $cookies.get('SessionID') != '') {\r\n $scope.SessionUploadID = $cookies.get('SessionID');\r\n }\r\n //$scope.isWorkspaceEditingByOwner = false;\r\n //if ($rootScope.SelectedWorkArea != null && $rootScope.SelectedWorkArea.name != '') {\r\n // $(\"#lblTitle\").addClass(\"active\");\r\n // $scope.isWorkspaceEditingByOwner = $scope.SelectedWorkArea.ownerId.toString() === $scope.UserId.toString();\r\n //}\r\n\r\n $scope.savedWorkspaceSearchResult = [];\r\n $scope.searchResultMsgforSavedWorkSpace = \"\";\r\n\r\n $scope.sharedWorkspaceSearchResult = [];\r\n $scope.searchResultMsgforSharedWorkSpace = \"\";\r\n\r\n if (angular.element(\"#txtWorkspaceName\") == null) {\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n }\r\n\r\n $(\"#saveGraphBtn\").focus();\r\n\r\n $scope.displayShareWorkspaceModal = function (areaName, id, encId, index) {\r\n progressBarService.showProgressBar();\r\n $scope.shareData = [{\r\n name: \"\", emailID: \"\", isShowPlus: true, isValid: true\r\n }];\r\n $scope.message = \"\";\r\n $scope.isError = false;\r\n $scope.isSameEmailID = true;\r\n $scope.ShareUserForm.$setPristine();\r\n $scope.ShareUserForm.$setUntouched();\r\n $scope.sharedWorkSpaceUsers = [];\r\n $scope.isShowSharedDatafields = false;\r\n $scope.savedWorkSpaceId = id;\r\n $scope.savedWorkSpaceEncId = encId;\r\n $scope.currentSavedWorkspaceIndex = index;\r\n var workspaceurl = $scope.workspaceurl + encId;\r\n $('#lblWorkSpaceUrl').html(workspaceurl);\r\n $scope.workAreaName = areaName;\r\n GetSavedWorkSpaceServices.GetSharedUsers($scope);\r\n }\r\n\r\n $scope.deleteSharedUser = function (sharedUserID, workareaId, workShareID, workspaceType, index) {\r\n $scope.WorkAreaId = workareaId;\r\n $scope.SharedUserId = sharedUserID;\r\n var element = document.getElementById(\"share-arrow-0\");\r\n $scope.sharedWorkSpaceUsers.splice(index, 1);\r\n if (index == 0 && $scope.sharedWorkSpaceUsers.length > 1 && element.classList.contains(\"fa-caret-down\")) {\r\n $scope.sharedWorkSpaceUsers[index].isShowArrow = true;\r\n $scope.sharedWorkSpaceUsers[index].isShowDownArrow = true;\r\n $scope.sharedWorkSpaceUsers[index].isShowRightArrow = false;\r\n } else if ($scope.sharedWorkSpaceUsers.length > 1 && element.classList.contains(\"fa-caret-right\")) {\r\n element = document.getElementById(\"share-arrow-\" + (index + 1))\r\n element.classList.remove(\"ng-hide\");\r\n $scope.sharedWorkSpaceUsers[0].isShowArrow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShow = true;\r\n $scope.sharedWorkSpaceUsers[index].isShowDownArrow = false;\r\n $scope.sharedWorkSpaceUsers[index].isShowRightArrow = true;\r\n } else if ($scope.sharedWorkSpaceUsers.length == 1) {\r\n $scope.sharedWorkSpaceUsers[0].isShow = true;\r\n }\r\n if (workspaceType == 'savedWorkspace') {\r\n $scope.savedWorkspaceSearchResult[$scope.currentSavedWorkspaceIndex].workspaceCount = $scope.sharedWorkSpaceUsers.length;\r\n }\r\n DeleteWokSpaceServices.DeleteSavedWorkSpace($scope, \"WorkspaceSharedUser\", workShareID);\r\n }\r\n\r\n //This Method Will Call Save Button.\r\n $scope.SaveWorkSpace = function ($event) {\r\n $rootScope.selectedWorkspaceName = 'Choose Workspace';\r\n var keyCode = $event.which || $event.keyCode;\r\n\r\n if (keyCode === 13 || keyCode == 1) {\r\n if (angular.element(\"#txtWorkspaceName\").val().trim() != '') {\r\n $(\"#txtWorkspaceName\").removeClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").hide();\r\n\r\n var workspaceid = 0;\r\n //var objectWorkspaceId = 0;\r\n if ($rootScope.SelectedWorkArea != null && $rootScope.SelectedWorkArea.name != '') {\r\n workspaceid = $rootScope.SelectedWorkArea.id;\r\n //objectWorkspaceId = $rootScope.SelectedWorkArea.objectWorkSpaceId;\r\n }\r\n var isCreateNewWorkspace = $rootScope.SelectedWorkArea == null ? true : false;\r\n\r\n var deletedSearchStringList = plotDataService.getDeletedSearchString();\r\n $scope.deletedSearchString = [];\r\n for (var i = 0; i < deletedSearchStringList.length; i++) {\r\n $scope.deletedSearchString.push(deletedSearchStringList[i].Searchstring);\r\n }\r\n\r\n $scope.deletedObjectIDs = plotDataService.getDeletedObjectIDList().length > 0 ? plotDataService.getDeletedObjectIDList() : [];\r\n\r\n SaveGraphServices.SaveWorkSpace($scope, workspaceid, isCreateNewWorkspace);\r\n }\r\n else {\r\n $(\"#txtWorkspaceName\").addClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").focus();\r\n $(\"#spanTitleError\").html(\"Invalid workspace name.\");\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").fadeIn();\r\n }\r\n }\r\n }\r\n\r\n $scope.SaveAsWorkSpace = function () {\r\n $rootScope.selectedWorkspaceName = 'Choose Workspace';\r\n if (angular.element(\"#txtWorkspaceName\").val().trim() != '') {\r\n $(\"#txtWorkspaceName\").removeClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").hide();\r\n var deletedSearchStringList = plotDataService.getDeletedSearchString();\r\n $scope.deletedSearchString = [];\r\n for (var i = 0; i < deletedSearchStringList.length; i++) {\r\n $scope.deletedSearchString.push(deletedSearchStringList[i].Searchstring);\r\n }\r\n $scope.deletedObjectIDs = plotDataService.getDeletedObjectIDList().length > 0 ? plotDataService.getDeletedObjectIDList() : [];\r\n SaveGraphServices.SaveWorkSpace($scope, 0, 'true');\r\n }\r\n else {\r\n $(\"#txtWorkspaceName\").addClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").focus();\r\n $(\"#spanTitleError\").html(\"Invalid workspace name.\");\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").fadeIn();\r\n }\r\n }\r\n\r\n $scope.CloseWorkSpace = function () {\r\n $rootScope.SelectedWorkArea = null;\r\n //GetSpectrumIDServices.deleteUnpublishedDataSets($scope, '', '', true);\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearFiles();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n }\r\n\r\n function SavedWorkspaces_Load() {\r\n if ($location.$$path == '/savedWorkedSpace') {\r\n $scope.CloseWorkSpace();\r\n $scope.pagingInfo.savedPageNo = 1;\r\n $scope.pagingInfo.sharedPageNo = 1;\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n $scope.currentPageOfSharedWorkspace = 1;\r\n $(\"#SearchWorkspace\").focus();\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n }\r\n }\r\n\r\n $scope.LoadWorkspaces = function () {\r\n $('#shareWorkSpaceModal').modal('hide');\r\n $scope.isShowSharedDatafields = \"\";\r\n $scope.nameShare = \"\";\r\n $scope.emailIdToShare = \"\";\r\n $scope.isShowSharedDatafields = \"\";\r\n //$rootScope.$broadcast('reloadCaptcha', {});\r\n $scope.ShareUserForm.$setPristine();\r\n $scope.ShareUserForm.$setUntouched();\r\n $scope.isShowPlus = true;\r\n $scope.isError = false;\r\n $scope.message = \"\";\r\n SavedWorkspaces_Load();\r\n };\r\n\r\n $scope.SearchWorkSpace = function (fromObject, $event) {\r\n var keyCode = $event.which || $event.keyCode;\r\n\r\n if (keyCode === 13 || keyCode == 1) {\r\n if (fromObject == 'fromSearchButton') {\r\n $scope.pagingInfo.savedPageNo = 1;\r\n $scope.pagingInfo.sharedPageNo = 1;\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n $scope.currentPageOfSharedWorkspace = 1;\r\n }\r\n else {\r\n $scope.pagingInfo.savedPageNo = $scope.currentPageOfSavedWorkspace;\r\n $scope.pagingInfo.sharedPageNo = $scope.currentPageOfSharedWorkspace;\r\n }\r\n if (angular.element(\"#txtAreatitle\").val() == \"\") {\r\n $(\"#exampleInputAmount\").removeClass(\"active\");\r\n $(\"#SearchWorkspace\").focus();\r\n }\r\n\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n }\r\n }\r\n\r\n $scope.setSavedPage = function (pageNo, $event) {\r\n $scope.currentPageOfSavedWorkspace = pageNo;\r\n $scope.pagingInfo.savedPageNo = pageNo;\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n //$scope.workspaceMsg = \"Kindly search for a workspace.\";\r\n $('#tblsavedworkSpace').hide();\r\n };\r\n\r\n $scope.setSharedPage = function (pageNo, $event) {\r\n $scope.currentPageOfSharedWorkspace = pageNo;\r\n $scope.pagingInfo.sharedPageNo = pageNo;\r\n GetSavedWorkSpaceServices.GetSavedWorkSpace($scope);\r\n $('#tblsharedworkSpace').hide();\r\n };\r\n\r\n $scope.reset = function (event) {\r\n $('label').removeClass('active');\r\n angular.element(\"#txtAreatitle\").val('');\r\n $scope.pagingInfo = {\r\n savedPageNo: 1,\r\n sharedPageNo: 1,\r\n itemsPerPage: 10,\r\n savedWorkSortBy: 'eSpectraCreateTS',\r\n sharedWorkSortBy: 'eSpectraCreateTS',\r\n savedWorkReverse: true,\r\n sharedWorkReverse: true\r\n };\r\n SavedWorkspaces_Load();\r\n }\r\n\r\n SavedWorkspaces_Load();\r\n\r\n //This method will redirect to plot Graph.\r\n $scope.RedirecttoPloatgraph = function (event, mode, workspaceType) {\r\n progressBarService.showProgressBar();\r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearFiles();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n $rootScope.SelectedWorkArea = null;\r\n\r\n if (event.target.id != null && event.target.id > 0) {\r\n var workAreaID = event.target.id;\r\n $scope.WorkAreaid = workAreaID;\r\n $rootScope.selectedWorkspaceName = event.target.name;\r\n }\r\n else {\r\n $scope.WorkAreaid = $scope.savedWorkSpaceId;\r\n //$scope.ObjectWorkSpaceId = $scope.savedObjectWorkSpaceId;\r\n }\r\n\r\n $rootScope.workspaceID = $scope.WorkAreaid;\r\n\r\n GetSpectrumIDServices.GetWorkSpaceByID($scope, mode, workspaceType);\r\n $('#shareWorkSpaceModal').modal('hide');\r\n $scope.isShowSharedDatafields = false;\r\n }\r\n\r\n $scope.setTextboxStyle = function () {\r\n $(\".input-feild-textbox\").on(\"focusin\", function () {\r\n $(this).parent().siblings(\"label\").addClass(\"active\");\r\n $(this).siblings(\"label\").addClass(\"active\");\r\n }).focusout(function () {\r\n if (!$(this).val().trim()) {\r\n $(this).parent().siblings(\"label\").removeClass(\"active\");\r\n $(this).siblings(\"label\").removeClass(\"active\");\r\n }\r\n });\r\n };\r\n\r\n $scope.setTextboxStyle();\r\n\r\n //This is method will delete saved Work Space.\r\n $scope.DeleteWorkSpace = function (workAreaId, workspaceType, workShareID) {\r\n\r\n if ($window.confirm(\"Are you sure you want to delete this record?\")) {\r\n $scope.WorkAreaId = workAreaId;\r\n DeleteWokSpaceServices.DeleteSavedWorkSpace($scope, workspaceType, workShareID);\r\n $scope.result = \"Yes\";\r\n }\r\n else {\r\n $scope.result = \"No\";\r\n }\r\n }\r\n\r\n $scope.ShowDataSetSearchDetails = function (workAreaID, workAreaDetail, typeOfWorkspace) {\r\n var spectrunID = workAreaDetail.spectrumID;\r\n var searchResults = typeOfWorkspace == 'MyWorkspace' ? $scope.savedWorkspaceSearchResult : $scope.sharedWorkspaceSearchResult;\r\n $scope.dataSetSearchDetails = null;\r\n for (var i = 0; i < searchResults.length; i++) {\r\n if (searchResults[i].workAreaID == workAreaID) {\r\n for (var count = 0; count < searchResults[i].workAreaDetails.length; count++) {\r\n var isShow = searchResults[i].workAreaDetails[count].technique.toLowerCase() == 'uv-vis' ? searchResults[i].workAreaDetails[count].objectDataSetName == workAreaDetail.objectDataSetName : searchResults[i].workAreaDetails[count].spectrumID == spectrunID;\r\n if (isShow) {\r\n var temp = searchResults[i].workAreaDetails[count].searchStringList.split(\"|\");\r\n if (temp != \"\") {\r\n if (temp.indexOf('Technique:UV-VIS') > 0 || temp.indexOf('Technique:UV-Vis') > 0) {\r\n $scope.dataSetSearchDetails = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n casRegistryNumber: temp[2].split(\":\")[1],\r\n technique: temp[3].split(\":\")[1],\r\n authorLastName: temp[4].split(\":\")[1],\r\n publicationYear: temp[5].split(\":\")[1],\r\n sourceTitle: temp[6].split(\":\")[1],\r\n };\r\n }\r\n else {\r\n $scope.dataSetSearchDetails = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n element: temp[2].split(\":\")[1],\r\n hostMaterial: temp[3].split(\":\")[1],\r\n transition: temp[4].split(\":\")[1],\r\n technique: temp[5].split(\":\")[1],\r\n accession: temp[6].split(\":\")[1],\r\n authorLastName: temp[7].split(\":\")[1],\r\n spectralRegion: temp[8].split(\":\")[1],\r\n startValue: temp[9].split(\":\")[1],\r\n endValue: temp[10].split(\":\")[1],\r\n fromYear: temp[11].split(\":\")[1],\r\n todate: temp[12].split(\":\")[1],\r\n doi: temp[13].split(\":\")[1]\r\n };\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $('#searchTermsModal').modal('show');\r\n }\r\n\r\n $scope.ShowDataSetSearchDetailsForSave = function (dataSet) {\r\n var spectrunID = dataSet.SpectrumId;\r\n $scope.dataSetSearchDetailsToSave = null;\r\n var searchString = plotDataService.getSearchString();\r\n\r\n if (searchString != null) {\r\n for (var i = 0; i < searchString.length; i++) {\r\n var isShow = dataSet.Technique.toLowerCase() == 'uv-vis' ? searchString[i].FileName == dataSet.FileName : searchString[i].id == spectrunID;\r\n if (isShow) {\r\n\r\n var temp = searchString[i].Searchstring.split(\"|\");\r\n if (temp != \"\") {\r\n if (temp.indexOf('Technique:UV-VIS') > 0 || temp.indexOf('Technique:UV-Vis') > 0) {\r\n $scope.dataSetSearchDetailsToSave = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n casRegistryNumber: temp[2].split(\":\")[1],\r\n technique: temp[3].split(\":\")[1],\r\n authorLastName: temp[4].split(\":\")[1],\r\n publicationYear: temp[5].split(\":\")[1],\r\n sourceTitle: temp[6].split(\":\")[1],\r\n };\r\n } else {\r\n $scope.dataSetSearchDetailsToSave = {\r\n spectrumID: spectrunID,\r\n keyWord: temp[0].split(\":\")[1],\r\n chemicalName: temp[1].split(\":\")[1],\r\n element: temp[2].split(\":\")[1],\r\n hostMaterial: temp[3].split(\":\")[1],\r\n transition: temp[4].split(\":\")[1],\r\n technique: temp[5].split(\":\")[1].replace(\"UNSPECIFIED\", \"Unspecified\"),\r\n accession: temp[6].split(\":\")[1],\r\n authorLastName: temp[7].split(\":\")[1],\r\n spectralRegion: temp[8].split(\":\")[1].replace(\"UNSPECIFIED\", \"Unspecified\"),\r\n startValue: temp[9].split(\":\")[1],\r\n endValue: temp[10].split(\":\")[1],\r\n fromYear: temp[11].split(\":\")[1],\r\n todate: temp[12].split(\":\")[1],\r\n doi: temp[13].split(\":\")[1]\r\n };\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n $('#searchTermsModal').modal('show');\r\n }\r\n\r\n $scope.$on('ngRepeatBroadcast1', function (ngRepeatFinishedEvent) {\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n $scope.DisplayDataSetToSave = function () {\r\n\r\n //$scope.dataSetsToSave = plotDataService.getSetdata();\r\n $scope.dataSetsToSave = [];\r\n var data = plotDataService.getSetdata();\r\n\r\n angular.forEach(data, function (value, key) {\r\n if (value.isValidFigureData) {\r\n value.SpectrumId = value.SpectrumId == value.ObjectID ? 0 : value.SpectrumId;\r\n $scope.dataSetsToSave.push(value);\r\n }\r\n });\r\n\r\n $.each($scope.dataSetsToSave, function (index, value) {\r\n if (value.IsCurated == true) {\r\n $scope.isAnyCurated = true;\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n $scope.DisplayDataSetToSave();\r\n\r\n $scope.ShareGraph = function () {\r\n angular.element(\"#divEmailSend\").show();\r\n }\r\n\r\n $scope.SendEmailCancel = function () {\r\n angular.element(\"#emailIdToShare\").val('');\r\n $(\"#emailIdToShare\").removeClass(\"active\");\r\n $(\"#emailIdToShare\").siblings(\"label\").removeClass(\"active\");\r\n $(\"#emailIdToShare\").removeClass(\"border-red\");\r\n $(\"#emailIdToShare\").siblings(\"label\").find(\"span\").fadeOut();\r\n angular.element(\"#nameShare\").val('');\r\n $(\"#nameShare\").removeClass(\"border-red\");\r\n $(\"#nameShare\").siblings(\"label\").find(\"span\").fadeOut();\r\n $(\"#nameShare\").removeClass(\"active\");\r\n $(\"#nameShare\").siblings(\"label\").removeClass(\"active\");\r\n angular.element(\"#divEmailSend\").hide();\r\n $('#shareWorkSpaceModal').modal('hide');\r\n $scope.isShowSharedDatafields = false;\r\n }\r\n\r\n $scope.SendEmail = function (workspaceType) {\r\n progressBarService.showProgressBar();\r\n //$scope.sharedWorkSpaceUsers = $scope.sharedWorkSpaceUsers == undefined ? []: $scope.sharedWorkSpaceUsers;\r\n var isNotExist = true, i, sharememberList = [], duplicateEmailIds = '';\r\n if ($scope.sharedWorkSpaceUsers.length > 1 && $scope.sharedWorkSpaceUsers[0].isShowDownArrow) {\r\n $scope.sharedWorkSpaceUsers[0].isShowDownArrow = !$scope.sharedWorkSpaceUsers[0].isShowDownArrow;\r\n $scope.sharedWorkSpaceUsers[0].isShowRightArrow = !$scope.sharedWorkSpaceUsers[0].isShowRightArrow;\r\n angular.forEach($scope.sharedWorkSpaceUsers, function (value, key) {\r\n if (key > 0) {\r\n $scope.sharedWorkSpaceUsers[key].isShow = !$scope.sharedWorkSpaceUsers[key].isShow;\r\n }\r\n });\r\n }\r\n\r\n //if ($scope.isAnyCurated) {\r\n // var email = angular.element(\"#emailIdToShare\").val();\r\n // commonService.getUserByEmail(email).then(function (response) {\r\n // if (response != null && response.data.message == undefined && response.data.isPremiumType != 2) {\r\n // $(\"#emailIdToShare\").addClass(\"border-red\");\r\n // $(\"#emailIdToShare\").focus();\r\n // $(\"#emailIdToShare\").siblings(\"label\").find(\"span\").fadeIn();\r\n // $('#spanEmailError').text('Curated data can share with premium users only.');\r\n // progressBarService.hideProgressBar();\r\n // } else {\r\n // // Send Mail\r\n // SaveGraphServices.ShareWorkSpace($scope, angular.element(\"#nameShare\").val(), angular.element(\"#emailIdToShare\").val(), $(\"#lblWorkSpaceUrl\").html(), $scope.savedWorkSpaceId);\r\n // }\r\n // });\r\n //} else {\r\n // Send Mail\r\n for (i = 0; i < $scope.shareData.length; ++i) {\r\n if ($scope.shareData[i].emailID.length > 0) {\r\n sharememberList.push({\r\n inviteeName: $scope.shareData[i].name,\r\n To: $scope.shareData[i].emailID,\r\n Url: $scope.savedWorkSpaceEncId,\r\n WorkAreaId: $scope.savedWorkSpaceId,\r\n SharingPersonName: getLocalValue('fullName'),\r\n WorkSpaceName: angular.element(\"#txtWorkspaceName\").val()\r\n });\r\n }\r\n }\r\n angular.forEach($scope.sharedWorkSpaceUsers, function (datavalue, datakey) {\r\n angular.forEach(sharememberList, function (value, key) {\r\n if (datavalue.eSpectraSharedUserEmailID.toLowerCase() == value.To.toLowerCase()) {\r\n duplicateEmailIds = duplicateEmailIds + \"\\\"\" + value.To + \"\\\" \";\r\n sharememberList.splice(key, 1);\r\n\r\n }\r\n });\r\n });\r\n\r\n if (sharememberList.length > 0) {\r\n SaveGraphServices.ShareWorkSpace($scope, sharememberList, $(\"#lblWorkSpaceUrl\").html(), workspaceType);\r\n } else {\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n if (duplicateEmailIds != \"\") {\r\n $scope.message = \"Workspace is already shared to \" + duplicateEmailIds + \". \"\r\n $scope.isError = true;\r\n }\r\n $scope.shareData = [{\r\n name: \"\", emailID: \"\", isShowPlus: true\r\n }];\r\n $scope.ShareUserForm.$setPristine();\r\n $scope.ShareUserForm.$setUntouched();\r\n }\r\n\r\n\r\n $scope.removeTagOnBackspace = function (event) {\r\n if (event.keyCode === 8) {\r\n $(\"#spanEmailError\").hide();\r\n $(\"#emailIdToShare\").removeClass(\"border-red\");\r\n }\r\n };\r\n\r\n $scope.ValidateToSendEmail = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#nameShare\").val() != '') {\r\n $(\"#nameShare\").removeClass(\"border-red\");\r\n $(\"#nameShare\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#nameShare\").addClass(\"border-red\");\r\n $(\"#nameShare\").focus();\r\n $(\"#nameShare\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#emailIdToShare\").val() != '') {\r\n var email = angular.element(\"#emailIdToShare\").val();\r\n var regExp = /^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$/;\r\n\r\n var isValid = regExp.test(email);\r\n if (isValid) {\r\n $(\"#emailIdToShare\").removeClass(\"border-red\");\r\n $(\"#emailIdToShare\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n $(\"#emailIdToShare\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#emailIdToShare\").focus();\r\n }\r\n $(\"#emailIdToShare\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n $(\"#emailIdToShare\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#emailIdToShare\").focus();\r\n }\r\n $(\"#emailIdToShare\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!$scope.captchaValid) {\r\n returnVal = false;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n $scope.ShowAllSharedUsers = function () {\r\n $scope.sharedWorkSpaceUsers[0].isShowDownArrow = !$scope.sharedWorkSpaceUsers[0].isShowDownArrow;\r\n $scope.sharedWorkSpaceUsers[0].isShowRightArrow = !$scope.sharedWorkSpaceUsers[0].isShowRightArrow;\r\n angular.forEach($scope.sharedWorkSpaceUsers, function (value, key) {\r\n if (key > 0) {\r\n $scope.sharedWorkSpaceUsers[key].isShow = !$scope.sharedWorkSpaceUsers[key].isShow;\r\n }\r\n });\r\n }\r\n\r\n if (($rootScope.SelectedWorkArea != null && $rootScope.SelectedWorkArea.name != '' && (plotDataService.getSpectrumIds().length > 0 || plotDataService.getFiles().length > 0))) {\r\n $rootScope.PlotGraphLinkCSS = '';\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).parent().removeClass(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).removeClass(\"disabled\").attr(\"disabled\", false);\r\n $scope.workSpaceName = $rootScope.SelectedWorkArea.name;\r\n if ($scope.workSpaceName) {\r\n $('#lblTitle').addClass('active');\r\n $(\"#txtWorkspaceName\").focus();\r\n $scope.isDisableSaveBtn = false;\r\n }\r\n $scope.originalWorkSpaceName = $rootScope.SelectedWorkArea.name;\r\n $scope.workspaceOwnerId = $rootScope.SelectedWorkArea.ownerId;\r\n }\r\n else {\r\n $rootScope.PlotGraphLinkCSS = 'disabled';\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).parent().addClass(\"disabled\");\r\n angular.element(document.getElementsByClassName(\"plotting-area\")).addClass(\"disabled\").attr(\"disabled\", true);\r\n }\r\n\r\n $scope.checkWorkspaceName = function () {\r\n if ($scope.workSpaceName == \"\") {\r\n $scope.isDisableSaveBtn = true;\r\n } else if ($scope.workSpaceName == \" \") {\r\n $scope.workSpaceName = \"\";\r\n $scope.isDisableSaveBtn = true;\r\n } else if ($scope.originalWorkSpaceName != undefined) {\r\n if ($scope.workSpaceName == $scope.originalWorkSpaceName) {\r\n $scope.isDisableSaveBtn = false;\r\n } else {\r\n $scope.isDisableSaveBtn = true;\r\n }\r\n } else {\r\n $scope.isDisableSaveBtn = false;\r\n }\r\n }\r\n\r\n $scope.checkSharedEmailID = function () {\r\n var element;\r\n $scope.isValid = true;\r\n angular.forEach($scope.shareData, function (value, key) {\r\n angular.forEach($scope.shareData, function (value1, key1) {\r\n\r\n if (value.emailID.toLowerCase() == $scope.eSpectraEmail.toLowerCase()) {\r\n isSameEmailID = true;\r\n $scope.isValid = false;\r\n element = document.getElementById(\"emailIdToShare_\" + key);\r\n $(element).addClass('border-red');\r\n }\r\n else if (key != key1) {\r\n if (value.emailID.toLowerCase() == value1.emailID.toLowerCase()) {\r\n isSameEmailID = true;\r\n $scope.isValid = false;\r\n }\r\n }\r\n });\r\n });\r\n }\r\n}]);\r\n\r\napp.service('DeleteWokSpaceServices', ['$http', '$window', '$cookies', function ($http, $window, $cookies) {\r\n\r\n this.DeleteSavedWorkSpace = function ($scope, workspaceType, workShareID) {\r\n //var userID = \"\";\r\n //userID = $cookies.get('UserId');\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"DeleteSavedWorkSpace\",\r\n params: { WorkAreaID: $scope.WorkAreaId, WorkspaceType: workspaceType, eSpectraShareID: workShareID },\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n else {\r\n if (data == \"1\") {\r\n //$window.location.reload();\r\n var index;\r\n if (workspaceType == 'savedWorkspace') {\r\n for (var i = 0; i < $scope.savedWorkspaceSearchResult.length; i++) {\r\n if ($scope.savedWorkspaceSearchResult[i].workAreaID == $scope.WorkAreaId) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n $scope.savedWorkspaceSearchResult.splice(index, 1);\r\n if ($scope.savedWorkspaceSearchResult.length <= 0) {\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n $scope.pagingInfo.savedPageNo = 1;\r\n }\r\n var sort = $scope.pagingInfo.savedWorkSortBy;\r\n $scope.pagingInfo.savedWorkReverse = !$scope.pagingInfo.savedWorkReverse;\r\n $scope.sort(sort, 'savedworkSpace');\r\n } else if (workspaceType == \"sharedWorkspace\") {\r\n for (var i = 0; i < $scope.sharedWorkspaceSearchResult.length; i++) {\r\n if ($scope.sharedWorkspaceSearchResult[i].workAreaID == $scope.WorkAreaId) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n $scope.sharedWorkspaceSearchResult.splice(index, 1);\r\n if ($scope.sharedWorkspaceSearchResult.length <= 0) {\r\n $scope.currentPageOfSavedWorkspace = 1;\r\n $scope.pagingInfo.sharedPageNo = 1;\r\n }\r\n var sort = $scope.pagingInfo.sharedWorkSortBy;\r\n $scope.pagingInfo.sharedWorkReverse = !$scope.pagingInfo.sharedWorkReverse;\r\n $scope.sort(sort, 'sharedworkSpace');\r\n }\r\n //else {\r\n // for (var i = 0; i < $scope.sharedWorkSpaceUsers.length; i++) {\r\n // if ($scope.sharedWorkSpaceUsers[i].workspaceSharedUserID == $scope.SharedUserId) {\r\n // index = i;\r\n // break;\r\n // }\r\n // }\r\n // $scope.sharedWorkSpaceUsers.splice(index, 1);\r\n // $scope.savedWorkspaceSearchResult[$scope.currentSavedWorkspaceIndex].workspaceCount = $scope.sharedWorkSpaceUsers.length;\r\n //}\r\n }\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n });\r\n };\r\n}]);\r\n\r\napp.service('GetAreaNameServices', ['$http', function ($http) {\r\n\r\n}]);\r\n\r\n// This Service Call GetSpectrumID Method.This will Fetech SpectrumID from dadatabse based on WorkAreaID.\r\napp.service('GetSpectrumIDServices', ['$http', '$location', 'SpectrumIDService', 'plotDataService', 'progressBarService', '$rootScope', '$cookies', '$route', function ($http, $location, SpectrumIDService, plotDataService, progressBarService, $rootScope, $cookies, $route) {\r\n\r\n this.GetWorkSpaceByID = function ($scope, mode, workspaceType) {\r\n var spectrumIds = [];\r\n var SearchString = [];\r\n var WorkAreaID = [];\r\n var premiumType = getLocalValue('premiumType');\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"GetWorkSpaceByID\",\r\n params: { DataSetIds: $scope.WorkAreaid },\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n $scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n $scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n var workAreaId, workAreaName, workspaceOwnerId;\r\n var isUVTechData = data.length > 0 && data[0].technique.toLowerCase() == 'uv-vis' ? true : false;\r\n for (var key in data) {\r\n if (data[key].workAreaID != undefined) {\r\n if (data[key].objectDataSetName != \"\" && data[key].objectContentType.toLowerCase() != 'kratos') { // for kratos data with objectDataSetName\r\n plotDataService.addFileList(data[key].objectID);\r\n }\r\n\r\n workAreaId = data[key].workAreaID;\r\n workAreaName = data[key].areaName;\r\n workspaceOwnerId = data[key].eSpectraPersonID;\r\n\r\n data[key].spectrumID = data[key].spectrumID == 0 && data[key].objectContentType.toLowerCase() == 'kratos' ? data[key].objectID : data[key].spectrumID; // for kratos data with zero spectrum ID\r\n\r\n plotDataService.addSetdata(data[key].workAreaID, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, data[key].technique, data[key].chemicalName, data[key].hostMaterial, data[key].spectralRegion, data[key].pubDate, data[key].dOI, data[key].objectDataSetName != \"\" && data[key].objectContentType.toLowerCase() != 'kratos' ? data[key].objectID : \"\", data[key].isCurated, data[key].isValidFigureData); // for kratos data with zero spectrum ID\r\n if (data[key].spectrumID > 0) {\r\n plotDataService.addSpectrumId(data[key].objectID);\r\n }\r\n plotDataService.addChemicalname(data[key].chemicalName);\r\n plotDataService.addSearchString(data[key].searchStringList, data[key].spectrumID > 0 ? data[key].objectID : 0, data[key].spectrumID, workAreaId, data[key].objectDataSetName != \"\" && data[key].objectContentType.toLowerCase() != 'kratos' ? data[key].objectID : \"\", data[key].isValidFigureData); // for kratos data with zero spectrum ID\r\n plotDataService.setTechnique(data[key].objectID, data[key].technique, true);\r\n }\r\n }\r\n\r\n $rootScope.SelectedWorkArea = { id: workAreaId, name: workAreaName, ownerId: workspaceOwnerId, workspaceType: workspaceType, isUVTechData: isUVTechData };\r\n\r\n if (mode == \"edit\") {\r\n $location.path('/search/edit');\r\n if ($route.current.originalPath == \"/search/:mode\") {\r\n $route.reload();\r\n }\r\n }\r\n else {\r\n $location.path('/plotgraph');\r\n }\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n $scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n $scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n this.deleteUnpublishedDataSets = function ($scope, uniqueID, filename, deleteAllRows) {\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"deleteFiles\",\r\n params: { 'uniqueID': uniqueID, 'sessionID': $scope.SessionUploadID, 'deleteAllRows': deleteAllRows },\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n if (status != \"204\") {\r\n if (!deleteAllRows) {\r\n plotDataService.removeUnPublishedDataSet(filename);\r\n --$scope.unPublishedIDs;\r\n if ($scope.UnPublishedDataSetCount <= 0) {\r\n $(\".clear-all-datasets\").show();\r\n }\r\n $scope.$apply();\r\n }\r\n else {\r\n plotDataService.clearUnPublishedDataSet();\r\n $scope.unPublishedIDs = 0;\r\n $scope.$apply();\r\n }\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n }\r\n });\r\n };\r\n\r\n}]);\r\n\r\n//This Service Will add /retrive SpectrumID so that on while ploting We can use these IDs.\r\napp.service('SpectrumIDService', function () {\r\n\r\n});\r\n\r\n//This method will Fetech Saved Work Spaces to display.\r\napp.service('GetSavedWorkSpaceServices', ['progressBarService', '$http', '$cookies', function (progressBarService, $http, $cookies) {\r\n this.GetSavedWorkSpace = function ($scope) {\r\n progressBarService.showProgressBar();\r\n $scope.savedWorkspaceSearchResult = [];\r\n $scope.sharedWorkspaceSearchResult = [];\r\n $scope.searchResultMsgforSavedWorkSpace = \"\";\r\n $scope.searchResultMsgforSharedWorkSpace = \"\";\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"GetSavedWorkedSpace\",\r\n params: { AreaName: $(\"#txtAreatitle\").val(), SavedPageNo: $scope.pagingInfo.savedPageNo, itemsPerPage: $scope.pagingInfo.itemsPerPage, SavedWorkOrderBy: $scope.pagingInfo.savedWorkSortBy, SavedWorkSortDirection: $scope.pagingInfo.savedWorkReverse, SharedPageNo: $scope.pagingInfo.sharedPageNo, SharedWorkOrderBy: $scope.pagingInfo.sharedWorkSortBy, SharedWorkSortDirection: $scope.pagingInfo.sharedWorkReverse },\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".toggle-all-row-element\").fadeOut();\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n $scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n $scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n $('#tblsavedworkSpace').hide();\r\n $('#tblsharedworkSpace').hide();\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n if ($scope.pagingInfo.savedPageNo == 1) {\r\n $scope.totalNoOfRecordsofSavedWorkspace = data.totalNoOfRecordsofSavedWorkspace;\r\n }\r\n\r\n if ($scope.pagingInfo.sharedPageNo == 1) {\r\n $scope.totalNoOfRecordsofSharedWorkspace = data.totalNoOfRecordsofSharedWorkspace;\r\n }\r\n\r\n if (data.savedWorkspaceSearchResult.length > 0) {\r\n $scope.workspaceurl = \"http://\" + location.host + location.pathname + \"#/plotgraph?workspacedid=\";\r\n $scope.savedWorkspaceSearchResult = data.savedWorkspaceSearchResult;\r\n $scope.workspaceMsg = '';\r\n $('#tblsavedworkSpace').show();\r\n }\r\n else {\r\n $scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n $('#tblsavedworkSpace').hide();\r\n }\r\n\r\n if (data.sharedWorkspaceSearchResult.length > 0) {\r\n $scope.workspaceurl = \"http://\" + location.host + location.pathname + \"#/plotgraph?workspacedid=\";\r\n $scope.sharedWorkspaceSearchResult = data.sharedWorkspaceSearchResult;\r\n $scope.workspaceMsg = '';\r\n $('#tblsharedworkSpace').show();\r\n }\r\n else {\r\n $scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n $('#tblsharedworkSpace').hide();\r\n }\r\n progressBarService.hideProgressBar();\r\n }\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".toggle-all-row-element\").fadeOut();\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n $scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n $scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n $('#tblsavedworkSpace').hide();\r\n $('#tblsharedworkSpace').hide();\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n this.GetSharedUsers = function ($scope) {\r\n return $http({\r\n method: \"GET\",\r\n url: $scope.serviceBase + \"GetSharedUsers\",\r\n params: { workAreaID: $scope.savedWorkSpaceId },\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status) {\r\n if (status == \"204\") {\r\n $('.copied-url-msg').addClass('hide');\r\n $('#shareWorkSpaceModal').modal('show');\r\n progressBarService.hideProgressBar();\r\n } else {\r\n progressBarService.hideProgressBar();\r\n $scope.sharedWorkSpaceUsers = data;\r\n $scope.sharedWorkSpaceUsers[0].isShow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShowArrow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShowRightArrow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShowDownArrow = false;\r\n angular.forEach($scope.sharedWorkSpaceUsers, function (value, key) {\r\n if (key > 0) {\r\n $scope.sharedWorkSpaceUsers[key].isShow = false;\r\n }\r\n });\r\n $('.copied-url-msg').addClass('hide');\r\n $('#shareWorkSpaceModal').modal('show');\r\n }\r\n\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n //$(\".no-dataset-msg\").show();\r\n //$(\".toggle-all-row-element\").fadeOut();\r\n //$(\".no-dataset-msg\").show();\r\n //$(\".no-dataset-msg\").addClass(\"animate\");\r\n //$(\".no-dataset-msg\").addClass(\"animate\");\r\n //$scope.searchResultMsgforSavedWorkSpace = \"No data found.\";\r\n //$scope.searchResultMsgforSharedWorkSpace = \"No data found.\";\r\n //$('#tblsavedworkSpace').hide();\r\n //$('#tblsharedworkSpace').hide();\r\n //setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n $('.copied-url-msg').addClass('hide');\r\n $('#shareWorkSpaceModal').modal('show');\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n\r\n}]);\r\n\r\n// This Service Call SaveGraph Method.\r\napp.service('SaveGraphServices', ['$http', '$location', '$cookies', 'plotDataService', '$rootScope', 'GetSpectrumIDServices', 'progressBarService', '$timeout', function ($http, $location, $cookies, plotDataService, $rootScope, GetSpectrumIDServices, progressBarService, $timeout) {\r\n this.SaveWorkSpace = function ($scope, workspaceid, isCreateNewWorkspace) {\r\n\r\n progressBarService.showProgressBar();\r\n var SavedWorkAreaCriteria = new Object();\r\n SavedWorkAreaCriteria.DataSetIds = $scope.spectrumIdList.toString();\r\n SavedWorkAreaCriteria.AreaName = $(\"#txtWorkspaceName\").val();\r\n //SavedWorkAreaCriteria.UserId = $scope.UserId;\r\n SavedWorkAreaCriteria.SearchString = $scope.searchstringlist.toString();\r\n SavedWorkAreaCriteria.DeletedSearchString = $scope.deletedSearchString.toString();\r\n SavedWorkAreaCriteria.WorkAreaId = workspaceid;\r\n //SavedWorkAreaCriteria.WorkspaceId = objectWorkspaceId;\r\n SavedWorkAreaCriteria.FileNames = $scope.fileNameList.toString();\r\n SavedWorkAreaCriteria.isCreateNewWorkspace = isCreateNewWorkspace;\r\n SavedWorkAreaCriteria.DeletedObjectIds = $scope.deletedObjectIDs.toString();\r\n\r\n return $http({\r\n method: \"POST\",\r\n url: $scope.serviceBase + \"SaveGraph\",\r\n dataType: 'json',\r\n data: SavedWorkAreaCriteria,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, status, headers) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n else {\r\n if (data.status == \"1\") {\r\n //clear workspace details \r\n plotDataService.clearSpectrumIds();\r\n plotDataService.clearTechnique();\r\n plotDataService.clearDataSetDisplayString();\r\n plotDataService.clearSearchString();\r\n plotDataService.clearFiles();\r\n $rootScope.SelectedWorkArea = null;\r\n //if ($scope.SessionUploadID != '') {\r\n // GetSpectrumIDServices.deleteUnpublishedDataSets($scope, '', '', true);\r\n //}\r\n angular.element(\"#divCopyShare\").show();\r\n var workspaceurl = \"http://\" + location.host + location.pathname + \"#/plotgraph?workspacedid=\" + data.encrptedWorkAreaID;\r\n $(\"#lblWorkSpaceUrl\").html(workspaceurl);\r\n $scope.saveWorkspaceEncryptedAreaID = data.encrptedWorkAreaID;\r\n $scope.WorkSpaceUrl = workspaceurl;\r\n $scope.savedWorkSpaceId = data.workAreaID;\r\n //$scope.savedObjectWorkSpaceId = data.WorkSpaceID;\r\n $scope.savedWorkSpaceEncId = data.encrptedWorkAreaID;\r\n angular.element(\"#divViewDataSets\").hide();\r\n angular.element(\"#saveGraphBtn\").addClass(\"hide\");\r\n angular.element(\"#saveGraphBtn\").attr(\"disabled\", true);\r\n angular.element(\"#btnSaveAs\").addClass(\"hide\");\r\n angular.element(\"#btnSaveAs\").attr(\"disabled\", true);\r\n angular.element(\"#txtWorkspaceName\").attr(\"disabled\", true);\r\n\r\n $(\"#txtWorkspaceName\").removeClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").hide();\r\n }\r\n else if (data.status == \"2\") {\r\n $(\"#txtWorkspaceName\").addClass(\"border-red\");\r\n $(\"#txtWorkspaceName\").focus();\r\n $(\"#txtWorkspaceName\").siblings(\"label\").find(\"span\").fadeIn();\r\n $(\"#spanTitleError\").html(\"Workspace with same title already exists.\");\r\n }\r\n }\r\n progressBarService.hideProgressBar();\r\n }).error(function (data, status) {\r\n if (status == \"204\") {\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-dataset-msg\").addClass(\"animate\");\r\n setTimeout(function () { $(\".no-dataset-msg\").removeClass(\"animate\") }, 2000);\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n };\r\n\r\n this.ShareWorkSpace = function ($scope, sharememberList, url, workspaceType) {\r\n\r\n //var ShareWorkSpaceCriteria = new Object();\r\n //ShareWorkSpaceCriteria.inviteeName = inviteeName,\r\n //ShareWorkSpaceCriteria.To = to,\r\n //ShareWorkSpaceCriteria.Url = $scope.savedWorkSpaceEncId;\r\n //ShareWorkSpaceCriteria.WorkAreaId = workspaceid;\r\n //ShareWorkSpaceCriteria.SharingPersonName = getLocalValue('fullName');\r\n ////ShareWorkSpaceCriteria.UserID = $scope.UserId;\r\n //ShareWorkSpaceCriteria.WorkSpaceName = angular.element(\"#txtWorkspaceName\").val();\r\n return $http({\r\n method: \"POST\",\r\n url: $scope.serviceBase + \"shareworkspace\",\r\n dataType: 'json',\r\n data: sharememberList,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n if (data.savedWorkAreaList.length > 0) {\r\n $timeout(function () {\r\n alert(\"Email sent successfully.\");\r\n }, 50);\r\n var sharedDataDetails = data.savedWorkAreaList;\r\n angular.forEach(sharedDataDetails, function (datavalue, datakey) {\r\n angular.forEach(sharememberList, function (value, key) {\r\n if (datavalue.eSpectraSharedUserEmailID == value.To) {\r\n if (datavalue.workspaceSharedUserID == 0) {\r\n $scope.sharedWorkSpaceUsers.push({\r\n eSpectraSharedUserEmailID: value.To,\r\n eSpectraShareID: datavalue.eSpectraShareID,\r\n workspaceSharedUserID: 0,\r\n isShow: false,\r\n isShowArrow: false,\r\n isShowRightArrow: false,\r\n isShowDownArrow: false\r\n });\r\n } else {\r\n $scope.sharedWorkSpaceUsers.push({\r\n eSpectraSharedUserEmailID: value.To,\r\n eSpectraShareFullName: datavalue.eSpectraShareFullName,\r\n eSpectraShareID: datavalue.eSpectraShareID,\r\n workspaceSharedUserID: datavalue.workspaceSharedUserID,\r\n isShow: false,\r\n isShowArrow: false,\r\n isShowRightArrow: false,\r\n isShowDownArrow: false\r\n });\r\n }\r\n }\r\n });\r\n });\r\n\r\n $scope.sharedWorkSpaceUsers[0].isShow = true;\r\n if ($scope.sharedWorkSpaceUsers.length > 1) {\r\n $scope.sharedWorkSpaceUsers[0].isShowArrow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShowRightArrow = true;\r\n $scope.sharedWorkSpaceUsers[0].isShowDownArrow = false;\r\n }\r\n if (workspaceType == 'savedWorkspace') {\r\n $scope.savedWorkspaceSearchResult[$scope.currentSavedWorkspaceIndex].workspaceCount = $scope.sharedWorkSpaceUsers.length;\r\n }\r\n }\r\n if (data.message.length > 0) {\r\n if (data.status == 3) {\r\n $scope.message = data.message;\r\n } else {\r\n $scope.message = \"Workspace is already shared to \" + data.message + \". \"\r\n }\r\n $scope.isError = true;\r\n }\r\n progressBarService.hideProgressBar();\r\n }).error(function (data, status) {\r\n progressBarService.hideProgressBar();\r\n if (status == \"204\") {\r\n }\r\n });\r\n };\r\n}]);\r\n\r\napp.directive('onFinishRender', function ($timeout) {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attr) {\r\n if (scope.$last === true) {\r\n $timeout(function () {\r\n scope.$emit(attr.broadcasteventname ? attr.broadcasteventname : 'ngRepeatFinished');\r\n });\r\n }\r\n }\r\n }\r\n});\r\n\r\napp.directive('preventRightClick', [\r\n\r\n function () {\r\n return {\r\n restrict: 'A',\r\n link: function ($scope, $ele) {\r\n $ele.bind(\"contextmenu\", function (e) {\r\n e.preventDefault();\r\n });\r\n }\r\n };\r\n }\r\n]);","(function () {\r\n 'use strict';\r\n app.controller('assignLicenseController', ['$scope', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', 'UpgradeService', '$route', function ($scope, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, upgradeService, $route) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n \r\n \r\n $scope.disable = true;\r\n $scope.LicenseStatusOptions = ['Unassigned', 'Assigned'];\r\n $scope.subscriptionAssignedUsers = [];\r\n $scope.alreadyAssignCount = 0;\r\n $scope.isFormDirty = false;\r\n\r\n var subscriptionAssignedUsersList = function (count) {\r\n for (var i = 1; i <= count; i++) {\r\n $scope.subscriptionAssignedUsers.push(\r\n {\r\n eSpectraSubPackStartDate: null,\r\n eSpectraSubPackEndDate: null,\r\n eSpectraFirstName: '',\r\n eSpectraLastName: '',\r\n eSpectraSubAssignedPersonEmail: '',\r\n selected: 'Unassigned',\r\n isNew: 1\r\n });\r\n\r\n }\r\n }\r\n\r\n //subscriptionAssignedUsersList();\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n }\r\n\r\n $scope.goToAdminPackage = function (userId) {\r\n $scope.disable = true;\r\n $scope.subscriptionAssignedUsers = [];\r\n $scope.alreadyAssignCount = 0;\r\n $scope.getSubscriptionData(userId);\r\n }\r\n\r\n $scope.getSubscriptionData = function (userId) {\r\n var userId, eSpectraPrimaryAffiliationName;\r\n //userId = $cookies.get('UserId');\r\n //$scope.eSpectraPrimaryAffiliationName = $cookies.get('eSpectraPrimaryAffiliationName') == \"\" ? \"----\" : $cookies.get('eSpectraPrimaryAffiliationName');\r\n progressBarService.showProgressBar();\r\n upgradeService.getSubscriptionData(userId).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n progressBarService.hideProgressBar();\r\n $scope.subscribtionDetails = response.data;\r\n $scope.selectedPackId = $scope.subscribtionDetails.eSpectraSubPackID;\r\n $scope.selectedOwnerId = userId;\r\n subscriptionAssignedUsersList($scope.subscribtionDetails.eSpectraSubPurchNum)\r\n angular.forEach(response.data.subscriptionAssign, function (key, index) {\r\n if (key.eSpectraSubAssignedPersonEmail != \"\") {\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubAssignedPersonEmail = key.eSpectraSubEmail == \"\" ? key.eSpectraSubAssignedPersonEmail : key.eSpectraSubEmail;\r\n $scope.subscriptionAssignedUsers[index].selected = 'Assigned';\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubPackStartDate = key.eSpectraSubPackStartDate;\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubPackEndDate = key.eSpectraSubPackEndDate;\r\n $scope.subscriptionAssignedUsers[index].eSpectraFirstName = key.eSpectraFirstName;\r\n $scope.subscriptionAssignedUsers[index].eSpectraLastName = key.eSpectraLastName;\r\n $scope.subscriptionAssignedUsers[index].isDisabled = true;\r\n $scope.alreadyAssignCount = index + 1;\r\n $scope.subscriptionAssignedUsers[index].isNew = 0;\r\n }\r\n });\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.getSelectedPackageById = function (packId, ownerId) {\r\n $scope.selectedPackId = packId;\r\n $scope.selectedOwnerId = ownerId;\r\n progressBarService.showProgressBar();\r\n $scope.subscriptionAssignedUsers = [];\r\n upgradeService.getSelectedPackageById(packId, ownerId).then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n progressBarService.hideProgressBar();\r\n $scope.subscribtionDetails.eSpectraSubPurchNum = response.data.eSpectraSubPurchNum;\r\n $scope.subscribtionDetails.eSpectraSubPackStartDate = response.data.eSpectraSubPackStartDate;\r\n $scope.subscribtionDetails.eSpectraSubPackEndDate = response.data.eSpectraSubPackEndDate;\r\n subscriptionAssignedUsersList(response.data.eSpectraSubPurchNum)\r\n angular.forEach(response.data.subscriptionAssign, function (key, index) {\r\n if (key.eSpectraSubAssignedPersonEmail != \"\") {\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubAssignedPersonEmail = key.eSpectraSubEmail == \"\" ? key.eSpectraSubAssignedPersonEmail : key.eSpectraSubEmail;\r\n $scope.subscriptionAssignedUsers[index].selected = 'Assigned';\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubPackStartDate = key.eSpectraSubPackStartDate;\r\n $scope.subscriptionAssignedUsers[index].eSpectraSubPackEndDate = key.eSpectraSubPackEndDate;\r\n $scope.subscriptionAssignedUsers[index].eSpectraFirstName = key.eSpectraFirstName;\r\n $scope.subscriptionAssignedUsers[index].eSpectraLastName = key.eSpectraLastName;\r\n $scope.subscriptionAssignedUsers[index].isDisabled = true;\r\n $scope.alreadyAssignCount = index + 1;\r\n $scope.subscriptionAssignedUsers[index].isNew = 0;\r\n }\r\n });\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.getSubscriptionData($cookies.get('UserId'));\r\n\r\n $scope.onChange = function (index, _value, name) {\r\n var elemSelect = $('.sel1')[index];\r\n if (_value == '') {\r\n $scope.removeAssign(index);\r\n }\r\n var filterednames = $scope.subscriptionAssignedUsers.filter(function (obj) {\r\n return (obj.eSpectraSubAssignedPersonEmail === _value && _value != '');\r\n });\r\n\r\n if (filterednames.length > 1) {\r\n $scope.licenceForm[name].$dirty = true;\r\n $scope.licenceForm[name].$invalid = true;\r\n $scope.licenceForm.$invalid = true;\r\n $scope.apply();\r\n }\r\n\r\n\r\n\r\n $scope.isFormDirty = true;\r\n }\r\n\r\n $scope.removeAssign = function (index) {\r\n\r\n //$scope.subscriptionAssignedUsers[index].eSpectraSubAssignedPersonEmail = \"\";\r\n //$scope.subscriptionAssignedUsers[index].eSpectraFirstName = \"\";\r\n //$scope.subscriptionAssignedUsers[index].eSpectraLastName = \"\";\r\n $scope.subscriptionAssignedUsers[index].selected = 'Unassigned';\r\n $scope.isDeleteLicence = true;\r\n $scope.subscriptionAssignedUsers[index].isDisabled = false;\r\n\r\n $scope.isFormDirty = true;\r\n }\r\n $scope.setLicenseKeyStatus = function () {\r\n $('#confirmChanges').modal('hide');\r\n progressBarService.showProgressBar();\r\n var userId, isSubscribePackage, i, noOfAssignedPerson = 0, memberList = [];\r\n var packId = $scope.selectedPackId;\r\n var startDate = \"\", endDate = \"\";\r\n \r\n startDate = $scope.subscribtionDetails.eSpectraSubPackStartDate.substr(0, 10);\r\n endDate = $scope.subscribtionDetails.eSpectraSubPackEndDate.substr(0, 10);\r\n if ($scope.validateInviteMemmber()) {\r\n\r\n userId = $cookies.get(\"UserId\");\r\n isSubscribePackage = $scope.subscribtionDetails.eSpectraSubPurchNum; //$cookies.get(\"isSubscribePackage\"); \r\n\r\n for (i = 0; i < $scope.subscriptionAssignedUsers.length; ++i) {\r\n if ($scope.subscriptionAssignedUsers[i].eSpectraSubAssignedPersonEmail.length > 0) {\r\n //if ($scope.subscriptionAssignedUsers[i].selected == 'Assigned') {\r\n //noOfAssignedPerson += 1;\r\n memberList.push({\r\n 'eSpectraLicenceKeyStatus': $scope.subscriptionAssignedUsers[i].selected,\r\n 'eSpectraSubAssignedPersonEmail': $scope.subscriptionAssignedUsers[i].eSpectraSubAssignedPersonEmail,\r\n 'Status': $scope.subscriptionAssignedUsers[i].isNew\r\n });\r\n //}\r\n }\r\n }\r\n\r\n if (memberList.length <= 0) {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.message = 'There are no users to submit.';\r\n progressBarService.hideProgressBar();\r\n //$timeout(hideMessage, 10000);\r\n \r\n return false;\r\n }\r\n\r\n if (noOfAssignedPerson <=parseInt(isSubscribePackage)) {\r\n upgradeService.setLicenseKeyStatus(memberList, userId, startDate, endDate, packId).then(function (response) {\r\n progressBarService.hideProgressBar();\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n\r\n }\r\n else if (response.data == true) {\r\n $scope.isFormDirty = false;\r\n sendNotification(memberList, startDate, endDate);\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.message = 'Changes applied successfully.';\r\n var count = 0;\r\n for (var index in memberList) {\r\n if (memberList[index].Status == '1') {\r\n count++;\r\n }\r\n }\r\n if (count > 0) {\r\n $location.path('licenseThankYou');\r\n } else {\r\n $scope.getSelectedPackageById($scope.selectedPackId, $scope.selectedOwnerId);\r\n }\r\n }\r\n else if (response.data == false) {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.message = 'error:Unable to Send Email?';\r\n }\r\n\r\n //$timeout(hideMessage, 10000);\r\n \r\n });\r\n }\r\n else {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.message = 'error:Requested mail action aborted: exceeded SubscribedPackage.';\r\n //$timeout(hideMessage, 10000);\r\n progressBarService.hideProgressBar();\r\n }\r\n\r\n }\r\n else {\r\n progressBarService.hideProgressBar();\r\n }\r\n\r\n \r\n \r\n }\r\n\r\n\r\n $scope.validateInviteMemmber = function () {\r\n \r\n var returnVal = true;\r\n var isEmailEnter = false;\r\n\r\n angular.forEach($(\"#CountInput input[type='text']\"), function (value, index) {\r\n if (angular.element(value).val() != '') {\r\n var emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (emailregx.test(angular.element(value).val())) {\r\n\r\n $(value).siblings(\"label\").find(\"span\").fadeOut();\r\n isEmailEnter = true;\r\n }\r\n else {\r\n\r\n if (returnVal) {\r\n $(value).focus();\r\n }\r\n $(value).siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n }\r\n else {\r\n\r\n //if (returnVal && !isEmailEnter) {\r\n // $(value).focus();\r\n //}\r\n //$(value).siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = true;// isEmailEnter;\r\n }\r\n })\r\n\r\n if (!returnVal) {\r\n\r\n this.inviteForm.$dirty = true;\r\n var FieldShellelements, i;\r\n FieldShellelements = $(\"#CountInput div input\");\r\n for (i = 0; i < FieldShellelements.length; i++) {\r\n var inviteUserName = FieldShellelements[0].name;\r\n this.inviteForm['eSpectraSubAssignedPersonEmail' + i].$dirty = true;\r\n };\r\n }\r\n return returnVal;\r\n }\r\n\r\n var sendNotification = function (memberList, startDate, endDate) {\r\n var adminEmailId = $cookies.get('emailId');\r\n upgradeService.sendLicenseNotification(memberList, adminEmailId, startDate, endDate);\r\n }\r\n\r\n $scope.reload = function () {\r\n $scope.isFormDirty = false;\r\n $location.path('assignlicencekey');\r\n $route.reload();\r\n }\r\n\r\n //$scope.$on('$locationChangeStart', function (event) {\r\n // if ($scope.isFormDirty == true) {\r\n // var answer = confirm(\"Are you sure you want to leave this page?\")\r\n\r\n // if (!answer) {\r\n // event.preventDefault();\r\n // }\r\n // }\r\n //});\r\n\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.service('UpgradeService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deviceInfo = [];\r\n var deferred;\r\n\r\n this.save = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/subscription/updatepurchasepackage\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.paymentDecline = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/subscription/updatepaymentdecline\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n //this.getSubscriptionData = function (data) {\r\n\r\n // deferred = $q.defer();\r\n\r\n // $http.get(serviceBase + \"api/subscription/getSubscription?userId=\" + data)\r\n // .then(function (response) {\r\n // deferred.resolve(response);\r\n // })\r\n // .catch(function (err) {\r\n // deferred.resolve(err);\r\n // });\r\n\r\n // return deferred.promise;\r\n //}\r\n\r\n this.getSelectedPackageById = function (packId, ownerId) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/subscription/getPackageById?packId=\" + packId + \"&ownerId=\" + ownerId)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n\r\n\r\n this.getSubscriptionProducts = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/subscription/getProducts\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.setLicenseKeyStatus = function (memberList, userId, startDate, endDate, packId) {\r\n deferred = $q.defer();\r\n\r\n return $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/subscription/assignLicenceStatus/\" + userId + \"/\" + startDate + \"/\" + endDate + \"/\" + packId,\r\n dataType: 'json',\r\n data: memberList,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n deferred.resolve(data);\r\n }).error(function (err, status) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.sendPurchaseNotification = function (emailId, productName, amountCharged, startDate, endDate, isInstitution, isMonthly, firstName, isAutorenewal) {\r\n deferred = $q.defer();\r\n\r\n return $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/subscription/sendPurchaseNotification/\" + emailId + \"/\" + productName + \"/\" + amountCharged + \"/\" + startDate + \"/\" + endDate + \"/\" + isInstitution + \"/\" + isMonthly + \"/\" + firstName + \"/\" + isAutorenewal,\r\n dataType: 'json',\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n deferred.resolve(data);\r\n }).error(function (err, status) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.sendLicenseNotification = function (memberList, adminEmail, startDate, endDate) {\r\n return $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/subscription/sendlicencenotification/\" + adminEmail + \"/\" + startDate + \"/\" + endDate,\r\n dataType: 'json',\r\n data: memberList,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n }).error(function (err, status) {\r\n\r\n });\r\n };\r\n\r\n this.getSignature = function (upgradeData) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/subscription/purchasepackage/\", upgradeData, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getTeamSignature = function (upgradeData) {\r\n deferred = $q.defer();\r\n $http.post(serviceBase + \"api/subscription/teamPurchasepackage/\", upgradeData, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getcountryData = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"country\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getstateData = function (code) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + 'state?AipCountryID=0&AipCountryCode=' + code + '')\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.updateCCDetails = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/subscription/updateCCDetails\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.sendUpdateCCNotification = function (cardNumber, firstName) {\r\n deferred = $q.defer();\r\n\r\n return $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/subscription/sendUpdateCCNotification/\"+ cardNumber + \"/\" + firstName,\r\n dataType: 'json',\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n deferred.resolve(data);\r\n }).error(function (err, status) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.getSubscriptionConfirmationDetails = function (transId) {\r\n deferred = $q.defer();\r\n\r\n return $http({\r\n method: \"GET\",\r\n url: serviceBase + \"api/subscription/getSubscriptionConfirmationDetails/\" + transId,\r\n dataType: 'json',\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n\r\n deferred.resolve(data);\r\n }).error(function (err, status) {\r\n\r\n deferred.resolve(err);\r\n });\r\n return deferred.promise;\r\n }\r\n\r\n this.validateCoupon = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/subscription/validateCoupon\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","/// \r\n\r\n(function () {\r\n app.controller('upgradeServiceController', ['$scope', '$location', '$cookies', 'LoginService', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', 'UpgradeService', function ($scope, $location, $cookies, loginService, AuthenticationService, progressBarService, $rootScope, $timeout, upgradeService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n \r\n $scope.states = [];\r\n $scope.billingstates = [];\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.institutionName = getLocalValue('affiliationName');\r\n $scope.roleStatus = getLocalValue('userRoleStatus');\r\n $scope.isInstitution = ($scope.roleStatus == 'active' && $scope.institutionName != '') ? 1 : 0;\r\n \r\n var name = getLocalValue(\"fullName\").split(' ');\r\n $scope.firstName = name[0];\r\n $scope.lastName = name[1];\r\n\r\n $scope.purchasedCostEstimation = { packagePurchased: \"\", subscriptionLength: 0, quantity: 0, total: 0, grandTotal: 0 }\r\n\r\n $scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n\r\n $scope.getSignature = function (upgradeData) {\r\n \r\n upgradeService.getSignature(upgradeData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n\r\n var data = response.data.signature;\r\n\r\n $scope.cybersourceAPI = response.data.signature.CyberSourceTokenAPI;\r\n document.payment_confirmation.action = $scope.cybersourceAPI;\r\n document.autorenewal_payment_confirmation.action = $scope.cybersourceAPI;\r\n\r\n var payData = {\r\n access_key: data.access_key,\r\n profile_id: data.profile_id,\r\n transaction_uuid: data.transaction_uuid,\r\n signed_field_names: data.signed_field_names,\r\n unsigned_field_names: data.unsigned_field_names,\r\n signed_date_time: data.signed_date_time,\r\n locale: data.locale,\r\n transaction_type: data.transaction_type,\r\n reference_number: data.reference_number,\r\n amount: data.amount,\r\n currency: data.currency,\r\n signature: data.signature,\r\n bill_to_forename: data.bill_to_forename,\r\n bill_to_surname: data.bill_to_surname,\r\n bill_to_email: data.bill_to_email,\r\n bill_to_address_line1: data.bill_to_address_line1,\r\n bill_to_address_line2: data.bill_to_address_line2,\r\n bill_to_address_city: data.bill_to_address_city,\r\n bill_to_address_postal_code: data.bill_to_address_postal_code,\r\n bill_to_address_state: data.bill_to_address_state,\r\n bill_to_address_country: data.bill_to_address_country,\r\n recurring_frequency: data.recurring_frequency,\r\n recurring_amount: data.recurring_amount,\r\n recurring_start_date: data.recurring_start_date,\r\n override_custom_cancel_page: data.override_custom_cancel_page,\r\n override_custom_receipt_page: data.override_custom_receipt_page,\r\n override_backoffice_post_url: data.override_backoffice_post_url\r\n }\r\n\r\n $scope.GetSignature = payData;\r\n if (data.eSpectraRecurringBillFlag == 1) {\r\n window.setTimeout(function () {\r\n $('#autorenewalsubmit').click();\r\n }, 100)\r\n } else {\r\n window.setTimeout(function () {\r\n $('#submit').click();\r\n }, 100)\r\n }\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n }\r\n\r\n $scope.disableSearchInstitute = function (e) {\r\n if ($(e.currentTarget).prop('checked')) {\r\n $('#affiliationName').attr('disabled', 'disabled');\r\n } else {\r\n $('#affiliationName').removeAttr('disabled');\r\n }\r\n $('#affiliationName').val('');\r\n $scope.searchAffiliation = \"\";\r\n $scope.selectedInstitute.InstitutionName = \"\";\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n }\r\n\r\n $scope.setAffiliation = function () {\r\n if ($scope.selectedInstitute.InstitutionName.length > 0 || $scope.selectedInstitute.userDefinedAffiliation.length > 0) {\r\n $scope.subscribtionData.InstitutionId = parseInt($scope.selectedInstitute.InstitutionId) > 0 ? $scope.selectedInstitute.InstitutionId : 0;\r\n $scope.subscribtionData.InstitutionName = $scope.selectedInstitute.InstitutionName != '' ? $scope.selectedInstitute.InstitutionName : $scope.selectedInstitute.userDefinedAffiliation;\r\n\r\n $('#affiliation').modal('hide');\r\n }\r\n };\r\n\r\n $scope.chkmonthlySubscriptions = function (event) {\r\n\r\n var isChecked = $(event.currentTarget)[0].checked;\r\n \r\n $scope.subscribtionData.purchaseNumber = 0;\r\n $scope.subscribtionData.subscriptionLength = \"1\";\r\n\r\n if (isChecked) {\r\n $('.annualChk').prop('checked', '')\r\n\r\n $scope.annualcheckMe = true;\r\n $scope.annualDisabled = true;\r\n $scope.monthlycheckMe = true;\r\n\r\n $('.annualChk').removeClass('ng-invalid');\r\n $('.annualChk').removeClass('border-all-red');\r\n\r\n $scope.subscribtionData.monthlySubscription = true;\r\n $scope.subscribtionData.annualSubscription = false;\r\n\r\n $scope.subscribtionData.purchaseNumber = 1;\r\n $scope.purchasedCostEstimation.quantity = 1\r\n $scope.subscribtionData.productId = $(event.currentTarget).attr('data-product');\r\n $scope.purchasedCostEstimation.grandTotal = $scope.monthlySubscriptions[0].eSpectraUnitPrice;\r\n\r\n $scope.purchasedCostEstimation.packagePurchased = \"Monthly Individual\";\r\n }\r\n else {\r\n $('.annualChk').addClass('ng-invalid');\r\n\r\n $scope.annualcheckMe = false;\r\n $scope.annualDisabled = false;\r\n $scope.monthlycheckMe = false;\r\n\r\n $scope.subscribtionData.monthlySubscription = false;\r\n $scope.subscribtionData.annualSubscription = false;\r\n\r\n }\r\n }\r\n $scope.chkannualSubscriptions = function (e) {\r\n var selectedCheckbox = $(e.currentTarget);\r\n var FieldShellelements, i, checkedCheckboxesLength, checkedCheckboxes;\r\n $scope.subscribtionData.productId = selectedCheckbox.attr('data-product');\r\n FieldShellelements = $(\".annualChk\");\r\n\r\n for (i = 0; i < FieldShellelements.length; i++) {\r\n $(FieldShellelements[i]).removeClass('ng-invalid');\r\n $(FieldShellelements[i]).removeClass('border-all-red');\r\n };\r\n\r\n checkedCheckboxesLength = $('.annualChk:checked').length;\r\n checkedCheckboxes = $('.annualChk:checked');\r\n\r\n if (selectedCheckbox[0].checked) {\r\n var fee = selectedCheckbox.attr('data-fee');\r\n $scope.purchasedCostEstimation.packagePurchased = \"Annual Individual\";\r\n $scope.purchasedCostEstimation.grandTotal = fee;\r\n \r\n $scope.subscribtionData.purchaseNumber = 1;\r\n $scope.purchasedCostEstimation.quantity = 1;\r\n\r\n } else {\r\n $scope.purchasedCostEstimation.packagePurchased = \"\";\r\n $scope.purchasedCostEstimation.subscriptionLength = 0;\r\n $scope.purchasedCostEstimation.quantity = 0;\r\n $scope.purchasedCostEstimation.total = 0;\r\n $scope.purchasedCostEstimation.grandTotal = 0;\r\n }\r\n\r\n for (i = 0; i < checkedCheckboxesLength; i++) {\r\n if ($(checkedCheckboxes[i]).attr('id') != selectedCheckbox.attr('id')) {\r\n checkedCheckboxes[i].checked = false;\r\n }\r\n }\r\n\r\n if (checkedCheckboxesLength > 0) {\r\n $('.monthlyChk').removeClass('ng-invalid');\r\n $('.monthlyChk').removeClass('border-all-red');\r\n\r\n $('.monthlyChk').prop('checked', '')\r\n\r\n $scope.monthlycheckMe = true;\r\n $scope.monthlyDisabled = true;\r\n $scope.annualcheckMe = true;\r\n\r\n $scope.subscribtionData.monthlySubscription = false;\r\n $scope.subscribtionData.annualSubscription = true;\r\n\r\n } else {\r\n $('.monthlyChk').addClass('ng-invalid');\r\n $('.annualChk').addClass('ng-invalid');\r\n\r\n $scope.monthlycheckMe = false;\r\n $scope.monthlyDisabled = false;\r\n $scope.annualcheckMe = false;\r\n\r\n $scope.subscribtionData.monthlySubscription = false;\r\n $scope.subscribtionData.annualSubscription = false;\r\n }\r\n }\r\n\r\n $scope.chkbillingAddress = function () {\r\n\r\n var isChecked = $('#chkBiling')[0].checked;\r\n if (isChecked) {\r\n $scope.isBillingAddressSame = true;\r\n $scope.isBillingAddressSame2 = true;\r\n $scope.subscribtionData.billingCountry = $scope.subscribtionData.country;\r\n $scope.getBillingStateData($scope.subscribtionData.billingCountry);\r\n \r\n $scope.subscribtionData.billingState = $scope.subscribtionData.state;\r\n \r\n $scope.subscribtionData.billingOtherState = $scope.subscribtionData.otherState;\r\n \r\n\r\n $scope.subscribtionData.billingAddress = $scope.subscribtionData.address;\r\n $scope.subscribtionData.billingAddress2 = $scope.subscribtionData.address2;\r\n $scope.subscribtionData.billingCity = $scope.subscribtionData.city;\r\n $scope.subscribtionData.billingzipCode = $scope.subscribtionData.zipCode;\r\n\r\n $scope.selectedBillingCountryZipCodeRegEx = $scope.selectedCountryZipCodeRegEx;\r\n $scope.billingCountryZipCodeRequiredFlag = $scope.countryZipCodeRequiredFlag;\r\n\r\n }\r\n else {\r\n $scope.isBillingAddressSame = false;\r\n $scope.isBillingAddressSame2 = false;\r\n }\r\n\r\n }\r\n\r\n $scope.$watch('[subscribtionData.state, subscribtionData.otherState,subscribtionData.address,subscribtionData.address2,subscribtionData.city,subscribtionData.zipCode]', function (newValue, oldValue) {\r\n $scope.chkbillingAddress();\r\n });\r\n\r\n $scope.subscribtionDataModel = function () {\r\n $scope.subscribtionData = {\r\n\r\n firstName: \"\",\r\n lastName: \"\",\r\n emailId: $scope.email,\r\n address: \"\",\r\n address2: \"\",\r\n city: \"\",\r\n state: \"\",\r\n otherState: \"\",\r\n country: \"\",\r\n zipCode: \"\",\r\n billingAddress: \"\",\r\n billingAddress2: \"\",\r\n billingCity: \"\",\r\n billingState: \"\",\r\n billingOtherState: \"\",\r\n billingCountry: \"\",\r\n billingzipCode: \"\",\r\n autoRenewal: true,\r\n\r\n productId: 1,\r\n subscriptionLength: \"1\",\r\n purchaseNumber: 0,\r\n administratorPrivileges: getLocalValue('userRole') == 'IAdmin' && (getLocalValue('userRoleStatus') == 'active' || getLocalValue('userRoleStatus') == 'pending' || getLocalValue('userRoleStatus') == 'rejected') ? true : false,\r\n isAdmin: getLocalValue('userRole') == 'IAdmin' && (getLocalValue('userRoleStatus') == 'active' || getLocalValue('userRoleStatus') == 'pending' || getLocalValue('userRoleStatus') == 'rejected') ? true : false,\r\n administratorEmailId: \"\",\r\n monthlySubscription: false,\r\n annualSubscription: false,\r\n subscribtionName: \"\",\r\n fee: \"\",\r\n monthlyChk: false,\r\n InstitutionId: 0,\r\n InstitutionName: \"\"\r\n }\r\n\r\n $('form[name=\"subscribtionForm\"]').trigger('reset');\r\n if (this.subscribtionForm) {\r\n this.subscribtionForm.$setPristine();\r\n this.subscribtionForm.$setUntouched();\r\n }\r\n }\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n }\r\n\r\n $scope.getSubscription = function (isValid) {\r\n var selectedState;\r\n\r\n if ($scope.billingstates.length > 0) {\r\n selectedState = $scope.subscribtionData.billingState;\r\n }\r\n \r\n if ($scope.states.length > 0) {\r\n if ($scope.subscribtionData.state == \"\") {\r\n $scope.subscribtionData.state.$dirty = false;\r\n }\r\n }\r\n else if ($scope.subscribtionData.billingAddress == \"\") {\r\n $scope.subscribtionData.billingAddress.$dirty = false;\r\n }\r\n else if ($scope.subscribtionData.billingCity == \"\") {\r\n $scope.subscribtionData.billingCity.$dirty = false;\r\n }\r\n else if (selectedState == \"\") {\r\n $scope.subscribtionData.billingState.$dirty = false;\r\n $scope.subscribtionData.billingOtherState.$dirty = false;\r\n }\r\n else if ($scope.billingCountryZipCodeRequiredFlag === '1') {\r\n if ($scope.subscribtionData.billingzipCode == \"\") {\r\n $scope.subscribtionData.billingzipCode.$dirty = false;\r\n }\r\n }\r\n\r\n\r\n if (isValid) {\r\n progressBarService.showProgressBar();\r\n\r\n var upgradeData = {\r\n eSpectraLicenceKeyStatus: 'Assigned',\r\n eSpectraSubAssignedPersonEmail: $scope.subscribtionData.emailId,\r\n eSpectraOrderStartDate: new Date(),\r\n eSpectraInstitutionId: $scope.subscribtionData.InstitutionId,\r\n eSpectraInstitutionName: $scope.subscribtionData.InstitutionName == \"\" ? $scope.institutionName : $scope.subscribtionData.InstitutionName,\r\n eSpectraFirstName: $scope.firstName,\r\n eSpectraLastName: $scope.lastName,\r\n eSpectraOrderQty: $scope.subscribtionData.purchaseNumber,\r\n eSpectraOrderIsMonthly: $scope.subscribtionData.monthlySubscription ? 1 : 0,\r\n eSpectraOrderTS: new Date(),\r\n eSpectraProductID: $scope.subscribtionData.productId,\r\n eSpectraCCBillFirstName: $scope.subscribtionData.firstName,\r\n eSpectraCCBillLastName: $scope.subscribtionData.lastName,\r\n eSubscriptionLength: $scope.subscribtionData.subscriptionLength,\r\n eSpectraOrderTotalCost: $scope.purchasedCostEstimation.grandTotal,\r\n eSpectraCCBillStreetAddrs1: $scope.subscribtionData.billingAddress,\r\n eSpectraCCBillStreetAddrs2: $scope.subscribtionData.billingAddress2,\r\n eSpectraCCBillCity: $scope.subscribtionData.billingCity,\r\n eSpectraCCBillZipPostalCode: $scope.subscribtionData.billingzipCode,\r\n eSpectraCCBillStateCode: selectedState,\r\n eSpectraCCBillCountryID: $scope.subscribtionData.billingCountry,\r\n eSpectraRecurringBillFlag: $scope.subscribtionData.autoRenewal ? 1 : 0\r\n }\r\n $scope.getSignature(upgradeData);\r\n }\r\n\r\n }\r\n\r\n $scope.validateSubscriptionDetails = function () {\r\n var returnVal = true;\r\n if (angular.element(\"#firstName\").val() != '') {\r\n $(\"#firstName\").removeClass(\"border-red\");\r\n $(\"#firstName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#firstName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#firstName\").focus();\r\n }\r\n $(\"#firstName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#lastName\").val() != '') {\r\n $(\"#lastName\").removeClass(\"border-red\");\r\n $(\"#lastName\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#lastName\").focus();\r\n }\r\n $(\"#lastName\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#address\").val() != '') {\r\n $(\"#address\").removeClass(\"border-red\");\r\n $(\"#address\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#address\").focus();\r\n }\r\n $(\"#address\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#city\").val() != '') {\r\n $(\"#city\").removeClass(\"border-red\");\r\n $(\"#city\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#city\").focus();\r\n }\r\n $(\"#city\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#state\").val() != '') {\r\n $(\"#state\").removeClass(\"border-red\");\r\n $(\"#state\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#state\").focus();\r\n }\r\n $(\"#state\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#zipCode\").val() != '') {\r\n $(\"#zipCode\").removeClass(\"border-red\");\r\n $(\"#zipCode\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#zipCode\").focus();\r\n }\r\n $(\"#zipCode\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n if (angular.element(\"#emailId\").val() != '') {\r\n var email = angular.element(\"#emailId\").val();\r\n var regExp = /^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$/;\r\n\r\n var isValid = regExp.test(email);\r\n if (isValid) {\r\n $scope.registrationData.emailId = $(\"#inputEmailId\").val();\r\n $(\"#emailId\").removeClass(\"border-red\");\r\n $(\"#emailId\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#inputEmailId\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#emailId\").focus();\r\n }\r\n $(\"#emailId\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n }\r\n else {\r\n //$(\"#inputEmailId\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#emailId\").focus();\r\n }\r\n $(\"#emailId\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#billingAddress\").val() != '') {\r\n $(\"#billingAddress\").removeClass(\"border-red\");\r\n $(\"#billingAddress\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#billingAddress\").focus();\r\n }\r\n $(\"#billingAddress\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (angular.element(\"#billingCity\").val() != '') {\r\n $(\"#billingCity\").removeClass(\"border-red\");\r\n $(\"#billingCity\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#billingCity\").focus();\r\n }\r\n $(\"#billingCity\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n \r\n if (angular.element(\"#billingzipCode\").val() != '') {\r\n $(\"#billingzipCode\").removeClass(\"border-red\");\r\n $(\"#billingzipCode\").siblings(\"label\").find(\"span\").fadeOut();\r\n }\r\n else {\r\n //$(\"#lastName\").addClass(\"border-red\");\r\n if (returnVal) {\r\n $(\"#billingzipCode\").focus();\r\n }\r\n $(\"#billingzipCode\").siblings(\"label\").find(\"span\").fadeIn();\r\n returnVal = false;\r\n }\r\n\r\n if (!returnVal) {\r\n this.subscribtionForm.$dirty = true;\r\n this.subscribtionForm.firstName.$dirty = true;\r\n this.subscribtionForm.lastName.$dirty = true;\r\n this.subscribtionForm.address.$dirty = true;\r\n this.subscribtionForm.city.$dirty = true;\r\n this.subscribtionForm.state.$dirty = true;\r\n this.subscribtionForm.country.$dirty = true;\r\n this.subscribtionForm.zipCode.$dirty = true;\r\n this.subscribtionForm.emailId.$dirty = true;\r\n this.subscribtionForm.month.$dirty = true;\r\n this.subscribtionForm.date.$dirty = true;\r\n this.subscribtionForm.year.$dirty = true;\r\n\r\n this.subscribtionForm.billingAddress.$dirty = true;\r\n this.subscribtionForm.billingCity.$dirty = true;\r\n this.subscribtionForm.billingState.$dirty = true;\r\n this.subscribtionForm.billingCountry.$dirty = true;\r\n this.subscribtionForm.billingzipCode.$dirty = true;\r\n }\r\n\r\n return returnVal;\r\n }\r\n\r\n $scope.getProducts = function () {\r\n progressBarService.showProgressBar();\r\n upgradeService.getSubscriptionProducts().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n\r\n $scope.monthlySubscriptions = response.data.monthlySusription;\r\n $scope.annualSubscriptions = response.data.yearlySuscription;\r\n $scope.email = response.data.loggedInEmailId;\r\n $scope.subscribtionData.emailId = $scope.email;\r\n\r\n loginService.setUserDetail($scope.email).then(function (response) {\r\n if (response != null && response.data.message == undefined) {\r\n var userData = response.data;\r\n\r\n $scope.subscribtionData.state = userData.eSpectraStateCode;\r\n $scope.subscribtionData.otherState = userData.eSpectraStateCode;\r\n\r\n $scope.subscribtionData.firstName = userData.eSpectraFirstName;\r\n $scope.subscribtionData.lastName = userData.eSpectraLastName;\r\n $scope.subscribtionData.emailId = userData.eSpectraEmail;\r\n $scope.subscribtionData.address = userData.eSpectraStreetAddrs1;\r\n $scope.subscribtionData.address2 = userData.eSpectraStreetAddrs2;\r\n $scope.subscribtionData.city = userData.eSpectraCity;\r\n $scope.subscribtionData.country = userData.countryIso2,\r\n $scope.subscribtionData.zipCode = userData.eSpectraZipPostalCode;\r\n\r\n if (userData.eSpectraRecurringBillFlag == \"1\") {\r\n $location.path('/profile');\r\n }\r\n\r\n $scope.getcountryData();\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n });\r\n }\r\n\r\n $scope.getProducts();\r\n\r\n $scope.subscribtionDataModel();\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n // Instantiate the Bloodhound suggestion engine\r\n var institutions = new Bloodhound({\r\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),\r\n queryTokenizer: Bloodhound.tokenizers.whitespace,\r\n remote: {\r\n url: serviceBase + 'api/Account/institutions?query=%QUERY',\r\n prepare: function (query, settings) {\r\n settings.beforeSend = (function () {\r\n $('.autopopulate-spinner').show();\r\n $scope.$apply();\r\n })();\r\n return $.extend(settings, {\r\n url: settings.url.replace('%QUERY', encodeURIComponent(query)),\r\n error: function (jqxhr, textStatus, errorThrown) {\r\n\r\n $('.autopopulate-spinner').hide();\r\n },\r\n success: function (data, textStatus, jqxhr) {\r\n }\r\n });\r\n },\r\n clearRemoteCache: function clearRemoteCache() {\r\n this.transport && Transport.resetCache();\r\n },\r\n filter: function (institutions) {\r\n $('.autopopulate-spinner').hide();\r\n return $.map(institutions, function (institution) {\r\n return {\r\n value: institution.institutionName,\r\n institutionCity: institution.institutionCity,\r\n institutionState: institution.institutionState,\r\n institutionMstrID: institution.institutionMstrID,\r\n institutionCountryCode: institution.institutionCountryCode\r\n };\r\n });\r\n }\r\n }\r\n });\r\n\r\n // Initialize the Bloodhound suggestion engine\r\n institutions.initialize();\r\n\r\n // Instantiate the Typeahead UI\r\n\r\n $(\"#affiliationName\").typeahead({\r\n hint: false,\r\n highlight: true,\r\n minLength: 3\r\n },\r\n {\r\n displayKey: 'value',\r\n minLength: 3,\r\n limit: 10,\r\n dupChecker: true,\r\n source: institutions.ttAdapter(),\r\n templates: {\r\n suggestion: function (data) {\r\n return \"
    \" + data.value + \", \" + data.institutionCity + \", \" + data.institutionState + \", \" + data.institutionCountryCode + \"
    \";\r\n },\r\n empty: [\r\n '
    ',\r\n '
    No Items Found
    ',\r\n '
    '\r\n ].join('\\n')\r\n }\r\n }).bind('typeahead:selected', function (obj, datum, name) {\r\n\r\n $scope.selectedInstitute.InstitutionId = datum.institutionMstrID\r\n $scope.selectedInstitute.InstitutionName = datum.value;\r\n\r\n $scope.$apply();\r\n return false;\r\n });\r\n\r\n //to test zip code valid or not at the time of page load\r\n $scope.$on('$viewContentLoaded', function () {\r\n $timeout(function () {\r\n $scope.selectedCountryZipCodeRegEx = $('option:selected', $('#country')).attr('validateRegex');\r\n $scope.countryZipCodeRequiredFlag = $('option:selected', $('#country')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false;\r\n if ($scope.subscribtionData.zipCode != '') {\r\n var emailregx = new RegExp($scope.selectedCountryZipCodeRegEx);\r\n if (!emailregx.test($scope.subscribtionData.zipCode)) {\r\n $scope.subscribtionForm.zipCode.$dirty = true;\r\n $scope.subscribtionForm.zipCode.$invalid = true;\r\n }\r\n }\r\n }, 2000);\r\n });\r\n\r\n $scope.getstateData = function (code) {\r\n $scope.selectedCountryZipCodeRegEx = $('option:selected', $('#country')).attr('validateRegex');\r\n $scope.countryZipCodeRequiredFlag = $('option:selected', $('#country')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false;\r\n upgradeService.getstateData(code).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.states = response.data;\r\n $scope.chkbillingAddress();\r\n if ($scope.states.length > 0) {\r\n $scope.subscribtionData.otherState = \"\";\r\n } else {\r\n $scope.subscribtionData.state = \"\";\r\n }\r\n\r\n }\r\n });\r\n if ($scope.subscribtionData.zipCode != '') {\r\n this.subscribtionForm.$dirty = true;\r\n this.subscribtionForm.zipCode.$dirty = true;\r\n }\r\n }\r\n\r\n $scope.getBillingStateData = function (code) {\r\n\r\n upgradeService.getstateData(code).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.billingstates = response.data;\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n $scope.selectedBillingCountryZipCodeRegEx = $('option:selected', $('#billingCountry')).attr('validateRegex');\r\n $scope.billingCountryZipCodeRequiredFlag = $('option:selected', $('#billingCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false;\r\n if ($scope.billingstates.length > 0) {\r\n $scope.subscribtionData.billingState = \"\";\r\n $scope.subscribtionData.billingOtherState = \"\";\r\n }\r\n\r\n if ($scope.subscribtionData.billingzipCode != '') {\r\n this.subscribtionForm.$dirty = true;\r\n this.subscribtionForm.billingzipCode.$dirty = true;\r\n }\r\n }\r\n\r\n $scope.getcountryData = function () {\r\n progressBarService.showProgressBar();\r\n upgradeService.getcountryData().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.countries = response.data;\r\n $scope.getstateData($scope.subscribtionData.country)\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n\r\n\r\n }]);\r\n})();","app.controller('thankYouController', ['$scope', '$location', '$cookies', 'progressBarService', 'PaymentConfService', function ($scope, $location, $cookies, progressBarService, paymentConfService) {\r\n if ($cookies.get('TokenInfo') == undefined || $cookies.get('_trns') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n $cookies.remove('_trns', { path: '/' });\r\n return;\r\n }\r\n\r\n progressBarService.showProgressBar();\r\n\r\n var data = $cookies.get('_trns');\r\n $cookies.remove('_trns', { path: '/' });\r\n \r\n paymentConfService.confirmPayment($scope, data);\r\n\r\n $scope.printDiv = function (divName) {\r\n var printContents = document.getElementById(divName).innerHTML;\r\n var popupWin = window.open('', '_blank', 'width=300,height=300');\r\n popupWin.document.open();\r\n popupWin.document.write('' + printContents + '');\r\n popupWin.document.close();\r\n }\r\n\r\n \r\n\r\n}]);\r\n\r\napp.service('PaymentConfService', ['LoginService', 'progressBarService', 'UpgradeService', function (loginService, progressBarService, upgradeService) {\r\n this.confirmPayment = function ($scope, transID,paymentFrom) {\r\n upgradeService.getSubscriptionConfirmationDetails(transID).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.isSuccess = false;\r\n $scope.isSubscriptionError = true;\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n\r\n var data = response.data;\r\n $scope.paymentResponse = {\r\n eSpectraRecurringBillFlag: data.eSpectraRecurringBillFlag,\r\n subscriptionType: data.eSpectraOrderIsMonthly == 1 ? \"Monthly\" : \"Annual\",\r\n subscriptionTerm: data.eSpectraOrderIsMonthly == 1 ? \"month\" : \"year\",\r\n req_currency: \"USD\",\r\n auth_amount: data.eSpectraCCAmt,\r\n req_card_number: data.eSpectraCCLast4Num\r\n }\r\n\r\n setLocalValue(\"premiumType\", \"2\");\r\n setLocalValue(\"isAutorenewed\", data.eSpectraRecurringBillFlag);\r\n if (paymentFrom != \"p\") {\r\n $scope.isSuccess = true;\r\n }\r\n $scope.isSubscriptionSuccess = true;\r\n\r\n var startdate = data.eSpectraOrderStartDate.substr(0, 10);\r\n var endDate = data.eSpectraOrderEndDate.substr(0, 10);\r\n var amount = $scope.paymentResponse.req_currency + ' ' + $scope.paymentResponse.auth_amount;\r\n\r\n loginService.refreshToken();\r\n\r\n progressBarService.hideProgressBar();\r\n\r\n sendPurchaseNotification(data.eSpectraEmail, data.eSpectraProductName, amount, startdate, endDate, data.eSpectraIsInstitution, data.eSpectraOrderIsMonthly, data.eSpectraFirstName, data.eSpectraRecurringBillFlag);\r\n }\r\n });\r\n }\r\n\r\n var sendPurchaseNotification = function (memberList, packageName, amount, startDate, endDate, isInstitution, isMonthly, firstName, isAutorenewal) {\r\n upgradeService.sendPurchaseNotification(memberList, packageName, amount, startDate, endDate, isInstitution, isMonthly, firstName, isAutorenewal);\r\n }\r\n}])","app.controller('paymentDeclineController', ['$scope', '$location', '$cookies', function ($scope, $location, $cookies) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || $cookies.get('_trns') == undefined) {\r\n $cookies.remove('_trns', { path: '/' });\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n $scope.eSpectraCCAmt = $cookies.get('_trns');\r\n $cookies.remove('_trns', { path: '/' });\r\n\r\n}]);","(function () {\r\n 'use strict';\r\n app.service('adminManagementService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n\r\n this.getData = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/super/getData\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.update = function (approved, pending, rejected) {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/super/update?approved=\" + approved + \"&pending=\" + pending + \"&rejected=\" + rejected)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.senNotificationTodApprovedUsers = function (approvedUsers) {\r\n deferred = $q.defer();\r\n\r\n return $http({\r\n method: \"POST\",\r\n url: serviceBase + \"api/super/notificationToApprovedUsers/\",\r\n dataType: 'json',\r\n data: approvedUsers,\r\n headers: { 'Content-Type': 'application/json' }\r\n }).success(function (data, headers, status) {\r\n deferred.resolve(data);\r\n }).error(function (err, status) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","/// \r\n\r\n(function () {\r\n 'use strict';\r\n app.controller('adminManagementController', ['$scope', '$location', '$cookies', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', 'adminManagementService', function ($scope, $location, $cookies, AuthenticationService, progressBarService, $rootScope, $timeout, adminManagementService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem(\"appInfo\") == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return\r\n }\r\n\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n }\r\n\r\n $scope.search = {\r\n eSpectraAdminEmailId: \"\",\r\n eSpectraInstitutionName: \"\",\r\n eSpectraAdminName: \"\"\r\n }\r\n\r\n var approved = [];\r\n var rejected = [];\r\n var pending = [];\r\n\r\n $scope.validateData = function () {\r\n approved = [];\r\n rejected = [];\r\n pending = [];\r\n $scope.sendEmailToApprovedUsers = [];\r\n\r\n $.each($scope.AffiliationAdmins.affiliation, function (index, value) {\r\n var defaultValue = value.eSpectraDefaultAdminStatus;\r\n var currentValue = value.eSpectraAdminStatus;\r\n if (currentValue != defaultValue && currentValue == \"Approved\") {\r\n approved.push(value.eSpectraRoleAssignID);\r\n $scope.sendEmailToApprovedUsers.push({\r\n eSpectraAdminEmailId: value.eSpectraAdminEmailId,\r\n eSpectraInstitutionName: value.eSpectraInstitutionName\r\n });\r\n\r\n } else if (currentValue != defaultValue && currentValue == \"Pending\") {\r\n pending.push(value.eSpectraRoleAssignID);\r\n }\r\n else if (currentValue != defaultValue && currentValue == \"Rejected\") {\r\n rejected.push(value.eSpectraRoleAssignID);\r\n }\r\n });\r\n if (approved.length > 0 || pending.length > 0 || rejected.length > 0) {\r\n $('#confirmSubmit').modal('show');\r\n } else {\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.message = 'There are no changes available for submit data to server.';\r\n //$timeout(hideMessage, 10000);\r\n }\r\n }\r\n\r\n $scope.update = function () {\r\n $('#confirmSubmit').modal('hide');\r\n progressBarService.showProgressBar();\r\n adminManagementService.update(approved.join(), pending.join(), rejected.join()).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n if ($scope.sendEmailToApprovedUsers.length > 0) {\r\n senNotificationTodApprovedUsers($scope.sendEmailToApprovedUsers);\r\n }\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n //$timeout(hideMessage, 10000);\r\n $scope.message = 'Data updated successfully.';\r\n $scope.getData();\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n };\r\n\r\n var senNotificationTodApprovedUsers = function (approvedUsers) {\r\n adminManagementService.senNotificationTodApprovedUsers(approvedUsers);\r\n };\r\n\r\n $scope.getData = function () {\r\n progressBarService.showProgressBar();\r\n\r\n adminManagementService.getData().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n $scope.AffiliationAdmins = response.data;\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.getData();\r\n\r\n $scope.exportReportData = function () {\r\n\r\n progressBarService.showProgressBar();\r\n var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1; //January is 0!\r\n\r\n yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n currentDate = mm + '/' + dd + '/' + yyyy;\r\n var fileName = 'InstitutionAdministratorsReport_' + currentDate + '.csv';\r\n\r\n var affiliationReport = angular.copy($scope.filteredAdmins);\r\n var length = $scope.filteredAdmins.length;\r\n $(affiliationReport).each(function (index) {\r\n delete affiliationReport[index].eSpectraAdminStatus;\r\n delete affiliationReport[index].eSpectraRoleAssignID;\r\n delete affiliationReport[index].$$hashKey;\r\n });\r\n\r\n \r\n var csv = convertArrayOfObjectsToCSV({\r\n data: affiliationReport\r\n }, length);\r\n\r\n BlobDownloadCSV('InstitutionAdministratorsReport_' + currentDate + '.csv', csv)\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n\r\n function convertArrayOfObjectsToCSV(args,length) {\r\n\r\n var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n data = args.data || null;\r\n if (data == null || !length) {\r\n return null;\r\n }\r\n\r\n columnDelimiter = args.columnDelimiter || ',';\r\n lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n\r\n keys = Object.keys(data[0]).slice(1);\r\n\r\n headers = [\"Customer Name\",\r\n \"Customer Email\",\r\n \"Affiliation Name\",\r\n \"Status\"\r\n ]\r\n\r\n result = 'Report Name' + columnDelimiter + \"Institution Administrators Report\" + lineDelimiter;\r\n //result += 'Transaction Range - Start Date' + columnDelimiter + startDate + lineDelimiter;\r\n //result += 'Transaction Range - End Date' + columnDelimiter + endDate + lineDelimiter + lineDelimiter;\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n\r\n data.forEach(function (item) {\r\n\r\n ctr = 0;\r\n keys.forEach(function (key) {\r\n if (ctr > 0) result += columnDelimiter;\r\n\r\n result += item[key];\r\n ctr++;\r\n });\r\n result += lineDelimiter;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n }]);\r\n\r\n})();","app.filter('camelCase', function () {\r\n return function (input) {\r\n input = input || '';\r\n return input.replace(/\\w\\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });\r\n };\r\n});\r\n\r\napp.filter(\"trust\", ['$sce', function ($sce) {\r\n return function (htmlCode) {\r\n return $sce.trustAsHtml(htmlCode);\r\n };\r\n}]);\r\n\r\napp.filter('nospace', function () {\r\n return function (value) {\r\n return (!value) ? '' : value.toString().replace(/ /g, '');\r\n };\r\n});\r\n\r\napp.filter('customNumber', function () {\r\n return function (value) {\r\n return parseInt(value, 10); //convert to int\r\n }\r\n});\r\n\r\napp.filter('range', function () {\r\n return function (input, total) {\r\n total = parseInt(total);\r\n for (var i = 0; i < total; i++)\r\n input.push(i);\r\n return input;\r\n };\r\n});","app.directive('simpleCaptcha', function () {\r\n return {\r\n restrict: 'E',\r\n scope: { valid: '=' },\r\n template: '{{a.value}} {{operation}} {{b.value}} = {{result}}',\r\n link: function ($scope, element, attrs) {\r\n\r\n var a, b, result;\r\n\r\n $scope.tabIndex = attrs.tabindex === undefined ? \"\" : attrs.tabindex;\r\n\r\n $scope.reloadCaptcha = function () {\r\n var show = Math.random() > 0.5;\r\n\r\n var value = function (max) {\r\n return Math.floor(max * Math.random());\r\n };\r\n\r\n var int = function (str) {\r\n return parseInt(str, 10);\r\n };\r\n\r\n $scope.a = {\r\n value: show ? undefined : 1 + value(4),\r\n input: show\r\n };\r\n $scope.b = {\r\n value: !show ? undefined : 1 + value(4),\r\n input: !show\r\n };\r\n $scope.operation = '+';\r\n\r\n $scope.result = 5 + value(5);\r\n\r\n a = $scope.a;\r\n b = $scope.b;\r\n result = $scope.result;\r\n }\r\n\r\n $scope.reloadCaptcha();\r\n\r\n $scope.$on('reloadCaptcha', function (event, data) {\r\n $scope.reloadCaptcha()\r\n });\r\n\r\n var checkValidity = function () {\r\n\r\n if (a.value && b.value) {\r\n var calc = parseInt(a.value) + parseInt(b.value);\r\n $scope.valid = calc == result;\r\n } else {\r\n $scope.valid = false;\r\n }\r\n //$scope.$apply(); // needed to solve 2 cycle delay problem; Commented because this throws exception in the response of LogDetails.aspx\r\n };\r\n\r\n\r\n $scope.$watch('a.value', function () {\r\n\r\n checkValidity();\r\n });\r\n\r\n $scope.$watch('b.value', function () {\r\n\r\n checkValidity();\r\n });\r\n\r\n $scope.checkValue = function () {\r\n var ans = parseInt($scope.a.value) + parseInt($scope.b.value);\r\n if (ans == $scope.result) {\r\n $('simple-captcha').removeClass('border-all-red');\r\n } else {\r\n $('simple-captcha').addClass('border-all-red');\r\n };\r\n };\r\n }\r\n };\r\n});\r\n\r\n","app.filter('split', function () {\r\n return function (input, splitChar, splitIndex) {\r\n // do some bounds checking here to ensure it has that index\r\n return input.toString().split(splitChar)[splitIndex];\r\n }\r\n});","(function () {\r\n 'use strict'\r\n app.controller('updateCCController', ['$scope', '$location', '$cookies', 'UpgradeService', function ($scope, $location, $cookies, upgradeService) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || $cookies.get('_updatecc') == undefined) {\r\n $cookies.remove('_updatecc', { path: '/' });\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n var jsonpaymentData = $cookies.get('_updatecc');\r\n $cookies.remove('_updatecc', { path: '/' });\r\n if (jsonpaymentData != \"\") {\r\n var name = getLocalValue(\"fullName\").split(' ');\r\n $scope.paymentResponse = {\r\n req_card_number: jsonpaymentData,\r\n firstName: name[0]\r\n }\r\n $scope.isSuccess = true;\r\n\r\n upgradeService.sendUpdateCCNotification($scope.paymentResponse.req_card_number, $scope.paymentResponse.firstName);\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.service('subscriptionReportService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deviceInfo = [];\r\n var deferred;\r\n\r\n this.getSubscriptionReport = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/report/getSubscriptionReport\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.exportSubscriptionReport = function (data) {\r\n deferred = $q.defer();\r\n \r\n $http.post(serviceBase + \"api/report/exportSubscriptionReport\", data, {\r\n }).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.controller('subscriptionReportController', ['$scope', '$cookies', 'progressBarService', '$rootScope', 'subscriptionReportService', '$location', function ($scope, $cookies, progressBarService, $rootScope, subscriptionReportService, $location) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined || getLocalValue('userRole') != 'SAdmin') {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n }\r\n\r\n $scope.reloadDatePicker = function () {\r\n $('.daterangepickerInp').daterangepicker({\r\n singleDatePicker: true,\r\n showDropdowns: true,\r\n locale: {\r\n format: 'MM-DD-YYYY'\r\n }\r\n });\r\n }\r\n $scope.reloadDatePicker();\r\n $scope.reset = function () {\r\n $scope.IshideAccordion = true;\r\n $scope.email = \"\";\r\n $scope.transactionNumber = \"\";\r\n $scope.startDate = moment().subtract(29, 'days').format('MM-DD-YYYY');\r\n $scope.endDate = moment().format('MM-DD-YYYY');\r\n\r\n $scope.searchResult = [];\r\n }\r\n $scope.IshideAccordion = true;\r\n $scope.pagination = {\r\n currentPage: 1,\r\n itemsPerPage: 10,\r\n totalRows: 0,\r\n sortBy: '',\r\n reverse: false\r\n }\r\n\r\n $scope.reset();\r\n\r\n $scope.getData = function (click) {\r\n if (!$scope.isError) {\r\n progressBarService.showProgressBar();\r\n if (click == \"search\") {\r\n $scope.pagination.currentPage = 1;\r\n $scope.pagination.sortBy = '';\r\n $scope.pagination.reverse = false;\r\n }\r\n\r\n $scope.IshideAccordion = false;\r\n var startDate = Format_YYYYMMDD($scope.startDate.split('-'));\r\n var endDate = Format_YYYYMMDD($scope.endDate.split('-'));\r\n\r\n var parameter = {\r\n eSpectraOrderStartDate: startDate,\r\n eSpectraOrderEndDate: endDate,\r\n eSpectraPageNo: $scope.pagination.currentPage,\r\n eSpectraSortBy: $scope.pagination.sortBy,\r\n eSpectraSortDirection: $scope.pagination.reverse ? 'desc' : 'asc',\r\n eSpectraEmail: $scope.email,\r\n eSpectraCCRequestID: $scope.transactionNumber\r\n }\r\n\r\n subscriptionReportService.getSubscriptionReport(parameter).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n $scope.searchResult = response.data;\r\n if (response.data.length > 0) {\r\n $scope.pagination.totalRows = response.data[0].eSpectraTotalRows;\r\n }\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n } else {\r\n $scope.IshideAccordion = true;\r\n $scope.searchResult = '';\r\n }\r\n }\r\n\r\n if ($rootScope.eSpectraUserTransactionsEmailID != undefined) {\r\n $scope.email = $rootScope.eSpectraUserTransactionsEmailID;\r\n $scope.getData();\r\n }\r\n\r\n $scope.setPage = function (currentPage) {\r\n $scope.pagination.currentPage = currentPage;\r\n $scope.getData();\r\n }\r\n $scope.sort = function (sortBy) {\r\n if ($scope.searchResult.length > 0) {\r\n $scope.pagination.sortBy = sortBy;\r\n $scope.pagination.currentPage = 1;\r\n $scope.pagination.reverse = !$scope.pagination.reverse;\r\n $scope.getData();\r\n }\r\n }\r\n\r\n $scope.exportReportData = function () {\r\n\r\n progressBarService.showProgressBar();\r\n var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1; //January is 0!\r\n\r\n yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n currentDate = mm + '/' + dd + '/' + yyyy;\r\n startDate = Format_YYYYMMDD($scope.startDate.split('-'));\r\n endDate = Format_YYYYMMDD($scope.endDate.split('-'));\r\n parameter = {\r\n eSpectraOrderStartDate: startDate,\r\n eSpectraOrderEndDate: endDate,\r\n eSpectraEmail: $scope.email,\r\n eSpectraCCRequestID: $scope.transactionNumber,\r\n eSpectraSortBy: $scope.pagination.sortBy,\r\n eSpectraSortDirection: $scope.pagination.reverse ? 'desc' : 'asc'\r\n }\r\n subscriptionReportService.exportSubscriptionReport(parameter).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: response.data\r\n }, $scope.startDate, $scope.endDate);\r\n\r\n BlobDownloadCSV('E-commerce Transaction Report_' + currentDate + '.csv', csv)\r\n\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n\r\n function convertArrayOfObjectsToCSV(args,startDate,endDate) {\r\n\r\n var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n data = args.data || null;\r\n if (data == null || !data.length) {\r\n return null;\r\n }\r\n\r\n columnDelimiter = args.columnDelimiter || ',';\r\n lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n\r\n keys = Object.keys(data[0]).slice(1);\r\n\r\n headers = [\"Customer Name\",\r\n \"Customer Email\",\r\n \"Date\",\r\n \"Product Details\",\r\n \"Product Duration\",\r\n \"Amount Collected($)\",\r\n \"Discount Code\",\r\n \"Credit Card No\",\r\n \"CC Reference ID\",\r\n \"Request ID\",\r\n \"Subscription Start Date\",\r\n \"Subscription Expiry Date\"]\r\n\r\n result = 'Report Name' + columnDelimiter + \"E-commerce Transaction Report\" + lineDelimiter;\r\n result += 'Transaction Range - Start Date' + columnDelimiter + startDate + lineDelimiter;\r\n result += 'Transaction Range - End Date' + columnDelimiter + endDate + lineDelimiter + lineDelimiter;\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n\r\n data.forEach(function (item) {\r\n\r\n ctr = 0;\r\n keys.forEach(function (key) {\r\n if (ctr > 0) result += columnDelimiter;\r\n\r\n result += item[key];\r\n ctr++;\r\n });\r\n result += lineDelimiter;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n $scope.onKeyPress = function (event, data) {\r\n if (event.keyCode == 13) {\r\n $scope.getData(data);\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n $scope.compareTransactionDates = function (transactionStartDate, transactionEndDate) {\r\n var startDate = new Date(transactionStartDate);\r\n var endDate = new Date(transactionEndDate);\r\n if (startDate > endDate) {\r\n $scope.isError = true;\r\n $scope.message = 'Transaction Range - End Date can not be less than Transaction Range - Start Date.'\r\n } else {\r\n\r\n $scope.isError = false;\r\n }\r\n }\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n $('body').on('keypress', '.decimalsOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if (($.inArray(e.charCode, [8, 9, 27, 13, 45, 46]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf('.') === -1 && $(this)[0].value.indexOf('-') === -1) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if (e.shiftKey || (e.charCode < 48 || e.charCode > 57)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.numbersOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if (e.shiftKey || (e.charCode < 48 || e.charCode > 57) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.onlynumbersandhyphen', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n\r\n if (e.charCode != 45 && (e.shiftKey || (e.charCode < 48 || e.charCode > 57) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.allowNumbersOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if (e.shiftKey || (e.charCode < 48 || e.charCode > 57) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.numberRangeUpto20', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n var textComponent = $(this);\r\n var startPos = textComponent[0].selectionStart;\r\n var endPos = textComponent[0].selectionEnd;\r\n var selectedText = textComponent[0].value.substring(startPos, endPos)\r\n\r\n var _val = e.currentTarget.value.replace(selectedText, '') + e.key;\r\n\r\n if (_val != \"\" && !isNaN(parseInt(_val)) && parseInt(_val) > 20 || parseInt(_val) === 0) {\r\n e.preventDefault();\r\n }\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if (e.shiftKey || (e.charCode < 48 || e.charCode > 57) && $.inArray(e.keyCode, [8, 9, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphabetsOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphabetsWithSpaceOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n if ($.inArray(e.charCode, [8, 9, 27, 13, 32]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('change', '.alphabetsWithSpaceHyphen, .alphabetsWithOnlyOneSpace, .alphabetsWithOnlyOneSpaceHyphen', function (e) {\r\n var value = $(this).val().trim();\r\n $(this).val(value);\r\n })\r\n\r\n $('body').on('keypress', '.alphabetsWithOnlyOneSpace', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n //var re = /^(([a-zA-Z])+[\\s-])?[a-zA-Z]+$/;\r\n\r\n\r\n if (($.inArray(e.charCode, [8, 9, 27, 13, 32]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf(' ') === -1) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphabetsWithOnlyOneSpaceHyphen', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n //var re = /^(([a-zA-Z])+[\\s-])?[a-zA-Z]+$/;\r\n\r\n\r\n if ((($.inArray(e.charCode, [8, 9, 27, 13, 32]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf(' ') === -1) || (($.inArray(e.charCode, [8, 9, 27, 13, 45]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf('-') === -1)) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphabetsWithOnlyOneSpaceHyphenAfterSecondChar', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n //var re = /^(([a-zA-Z])+[\\s-])?[a-zA-Z]+$/;\r\n\r\n\r\n if ((($.inArray(e.charCode, [8, 9, 27, 13, 32]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf(' ') === -1) || (($.inArray(e.charCode, [8, 9, 27, 13, 45]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) && $(this)[0].value.indexOf('-') === -1)) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n if (e.target.value.length > 1 && ($.inArray(e.charCode, [32, 45]) !== -1)) {\r\n return;\r\n }\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && $.inArray(e.keyCode, [8, 9, 46, 35, 36, 37, 38, 39, 40]) === -1 && !(e.target.value.length > 1 && ((e.charCode == 45 && e.target.value.indexOf('-') === -1) || (e.target.value.indexOf(' ') === -1 && e.target.value.indexOf(' ') === -1)))) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphabetsWithSpaceHyphen', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n //var re = /^(([a-zA-Z])+[\\s-])?[a-zA-Z]+$/;\r\n\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13, 32, 45]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphaNumericOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && (e.charCode < 48 || e.charCode > 57)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.alphaNumericWithSpaceOnly', function (e) {\r\n // Allow: backspace, tab, escape, enter and delete\r\n\r\n if ($.inArray(e.charCode, [8, 9, 27, 13, 32]) !== -1 ||\r\n // Allow: Ctrl+A, Command+A\r\n (e.charCode === 65 && (e.ctrlKey === true || e.metaKey === true))) { //||\r\n // Allow: home, end, left, right, down, up\r\n //(e.charCode >= 35 && e.charCode <= 40)) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n // Ensure that it is a number and stop the keypress\r\n if ((e.charCode < 65 || e.charCode > 90) && (e.charCode < 97 || e.charCode > 122) && (e.charCode < 48 || e.charCode > 57)) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('keypress', '.disableEnter', function (e) {\r\n if (e.keyCode == 13) {\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n $('body').on('click', '.fa-close', function () {\r\n var alert = $(this).parent('.alert-dismissable');\r\n var scope = getScope(alert);\r\n hideMessage(scope);\r\n scope.$apply();\r\n });\r\n\r\n var hideMessage = function (scope) {\r\n if (scope !== undefined) {\r\n scope.$parent.isError = false;\r\n scope.$parent.isSuccess = false;\r\n scope.$parent.isSubscriptionSuccess = false;\r\n scope.$parent.isSubscriptionError = false;\r\n scope.$parent.isModalError = false;\r\n scope.$parent.isModalSuccess = false;\r\n }\r\n }\r\n\r\n $(\"body\").on('click', '.show-hide-password', function () {\r\n $(\".show-hide-password .fa\").toggleClass(\"fa-eye fa-eye-slash\");\r\n if ($(\".show-hide-password .fa\").hasClass(\"fa-eye\")) {\r\n $(\"#tabpassword, #registerPassword, #newPassword, #resetPassword\").attr('type', 'password');\r\n }\r\n else {\r\n $(\"#tabpassword, #registerPassword, #newPassword, #resetPassword\").attr('type', 'text');\r\n }\r\n });\r\n\r\n $(\"body\").on('keyup', '#tabpassword, #registerPassword, #newPassword, #resetPassword', function () {\r\n if ($(this).val().length > 0) {\r\n $(this).parent().find(\".show-hide-password\").show();\r\n }\r\n else {\r\n $(this).parent().find(\".show-hide-password\").hide();\r\n }\r\n });\r\n\r\n $('body').on('focus', '.signup-tooltip, #registerPassword, #newPassword, #resetPassword', function () {\r\n if (window.innerWidth >= 768) {\r\n var _this = $(this);\r\n var _top = $(_this).offset().top;\r\n var _left = $(_this).offset().left;\r\n var txtLength = $(_this).width();\r\n\r\n $(this).siblings(\"#customPopover\").css({ position: 'absolute', display: 'block' });\r\n $(this).siblings('#customPopover').removeClass('hide');\r\n }\r\n }).on('focusout', '.signup-tooltip, #registerPassword, #newPassword, #resetPassword', function () {\r\n $(this).siblings(\"#customPopover\").css({ display: 'none' });\r\n $(this).siblings('#customPopover').addClass('hide');\r\n });\r\n\r\n $('body').on('click', '.password-info', function () {\r\n if (window.innerWidth < 768) {\r\n var element = document.getElementById(\"firstNameInfo\").nextSibling;\r\n if (element != null) {\r\n element.className += \" profileFirstNamePopover\";\r\n var arrowElement = element.firstChild;\r\n if (arrowElement != null) {\r\n arrowElement.className += \" profileFirstNamePopoverArrow\";\r\n }\r\n }\r\n element = document.getElementById(\"lastNameInfo\").nextSibling;\r\n if (element != null) {\r\n element.className += \" profileLastNamePopover\";\r\n arrowElement = element.firstChild;\r\n if (arrowElement != null) {\r\n arrowElement.className += \" profileLastNamePopoverArrow\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n $('body').on('focus', '.hidden-default-upload-btn', function () {\r\n $('.upload-file-browse-btn').addClass('upload-file-browse-btn-focus');\r\n }).on('focusout', '.hidden-default-upload-btn', function () {\r\n $('.upload-file-browse-btn').removeClass('upload-file-browse-btn-focus');\r\n });\r\n\r\n $('body').on('focus', '.first-as-rd-btn, .second-as-rd-btn, .third-as-rd-btn', function () {\r\n var _this = $(this);\r\n if (_this.hasClass('first-as-rd-btn')) {\r\n $('.first-as-sp-btn').addClass('upload-file-radio-btn-focus');\r\n } else if (_this.hasClass('second-as-rd-btn')) {\r\n $('.second-as-sp-btn').addClass('upload-file-radio-btn-focus');\r\n } else {\r\n $('.third-as-sp-btn').addClass('upload-file-radio-btn-focus');\r\n }\r\n }).on('focusout', '.first-as-rd-btn, .second-as-rd-btn, .third-as-rd-btn', function () {\r\n var _this = $(this);\r\n if (_this.hasClass('first-as-rd-btn')) {\r\n $('.first-as-sp-btn').removeClass('upload-file-radio-btn-focus');\r\n } else if (_this.hasClass('second-as-rd-btn')) {\r\n $('.second-as-sp-btn').removeClass('upload-file-radio-btn-focus');\r\n } else {\r\n $('.third-as-sp-btn').removeClass('upload-file-radio-btn-focus');\r\n }\r\n });\r\n\r\n $('body').on('click', '.workspace-dropdown', function () {\r\n $('#techCheckboxes').hide();\r\n $('#spectralCheckboxes').hide();\r\n })\r\n\r\n $('body').on('focus', '.workspace-select', function () {\r\n $('.workspace-dropdown').addClass('workspace-dropdown-focus');\r\n }).on('focusout', '.workspace-select', function () {\r\n $('.workspace-dropdown').removeClass('workspace-dropdown-focus');\r\n });\r\n\r\n $('body').on('focusout', '#professionaltitle, #firstName, #lastName, #city, #otherState, #PrimaryIndustry, #LatestProject', function () {\r\n if ($(location).attr('href').indexOf('profile') > -1) {\r\n var _this = this;\r\n _this.setSelectionRange(0, 0);\r\n }\r\n });\r\n\r\n $(document).on('show.bs.modal', '.modal', function () {\r\n $('body').css('overflow', 'hidden');\r\n }).on('hidden.bs.modal', '.modal', function () {\r\n $('body').css('overflow', 'auto');\r\n });;\r\n\r\n $(document).click(function (e) {\r\n if (e.target.className.indexOf('search-dropdown-label') == -1 && e.target.className.indexOf('search-dropdown-ip') == -1 && e.target.className.indexOf('search-tech-select') == -1 && e.target.className.indexOf('search-spectral-select') == -1) {\r\n $('#techCheckboxes').hide();\r\n $('#spectralCheckboxes').hide();\r\n }\r\n var target = e.target;\r\n var parentNode = target.parentNode\r\n\r\n if (target != null) {\r\n if (target.className.indexOf('techCheckboxes') != -1 || (parentNode != null && parentNode.parentNode != null && parentNode.parentNode.className.indexOf('techCheckboxes')) != -1 || (parentNode != null && parentNode.className.indexOf('techCheckboxes') != -1)) {\r\n $('#techCheckboxes').show();\r\n } else if (target.className.indexOf('search-tech-select') != -1) {\r\n $('#techCheckboxes').toggle();\r\n } else {\r\n $('#techCheckboxes').hide();\r\n }\r\n\r\n if (target.className.indexOf('spectralCheckboxes') != -1 || (parentNode != null && parentNode.parentNode != null && parentNode.parentNode.className.indexOf('spectralCheckboxes') != -1) || (parentNode != null && parentNode.className.indexOf('spectralCheckboxes') != -1)) {\r\n $('#spectralCheckboxes').show();\r\n } else if (target.className.indexOf('search-spectral-select') != -1) {\r\n $('#spectralCheckboxes').toggle();\r\n } else {\r\n $('#spectralCheckboxes').hide();\r\n }\r\n }\r\n });\r\n\r\n app.service('CommonService', ['$http', '$q', '$rootScope', '$cookies',\r\n function ($http, $q, $rootScope, $cookies) {\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n\r\n this.getUserByEmail = function (userName) {\r\n deferred = $q.defer();\r\n $http.get(serviceBase + \"api/Account/user?username=\" + userName\r\n ).then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.validatePassword = function (scope, event) {\r\n var _value = $(event.currentTarget).val();\r\n var regUppercase = /(?=.*[A-Z])/ //uppercase letters\r\n var regNumbers = /(?=.*\\d)/ //Numbers\r\n var regSpecial = /(?=.*[!@#$%^&*()_+=-])/ //Special Characters\r\n\r\n if (_value.length > 6) {\r\n scope.PasswordLength = true;\r\n } else {\r\n scope.PasswordLength = false;\r\n }\r\n var isValid = regUppercase.test(_value);\r\n if (isValid) {\r\n scope.UpperCase = true;\r\n } else {\r\n scope.UpperCase = false;\r\n }\r\n\r\n isValid = regNumbers.test(_value);\r\n if (isValid) {\r\n scope.Numbers = true;\r\n } else {\r\n scope.Numbers = false;\r\n }\r\n\r\n isValid = regSpecial.test(_value);\r\n if (isValid) {\r\n scope.SpecialCharacters = true;\r\n } else {\r\n scope.SpecialCharacters = false;\r\n }\r\n }\r\n }]);\r\n\r\n})();\r\n\r\nfunction msieversion() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf(\"MSIE \");\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) // If Internet Explorer, return true\r\n {\r\n return true;\r\n } else { // If another browser,\r\n return false;\r\n }\r\n}\r\n\r\nfunction get_browser_info() {\r\n var ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if (/trident/i.test(M[1])) {\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name: 'IE ', version: (tem[1] || '') };\r\n }\r\n if (M[1] === 'Chrome') {\r\n tem = ua.match(/\\bOPR\\/(\\d+)/)\r\n if (tem !== null) { return { name: 'Opera', version: tem[1] }; }\r\n }\r\n M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) !== null) { M.splice(1, 1, tem[1]); }\r\n return {\r\n name: M[0],\r\n version: M[1]\r\n };\r\n}\r\n\r\nfunction downloadCSV(args, csv) {\r\n var data, filename, link;\r\n\r\n if (csv === null) return;\r\n\r\n filename = args || 'export.csv';\r\n if (msieversion()) {\r\n var IEwindow = window.open();\r\n IEwindow.document.write('sep=,\\r\\n' + csv);\r\n IEwindow.document.close();\r\n IEwindow.document.execCommand('SaveAs', true, filename);\r\n IEwindow.close();\r\n } else {\r\n var browser = get_browser_info();\r\n //if (!csv.match(/^data:text\\/csv/i)) {\r\n csv = 'data:attachment/csv;charset=utf-8,' + csv;\r\n //}\r\n data = encodeURI(csv);\r\n\r\n link = document.createElement('a');\r\n link.setAttribute('href', data);\r\n link.setAttribute('download', filename);\r\n document.body.appendChild(link);\r\n if (browser.name.toLowerCase() === 'safari') {\r\n var cle = document.createEvent(\"MouseEvent\");\r\n cle.initEvent(\"click\", true, true);\r\n link.dispatchEvent(cle);\r\n } else {\r\n link.click();\r\n }\r\n document.body.removeChild(link);\r\n }\r\n}\r\n\r\nfunction BlobDownloadCSV(fileName, csv) {\r\n var blob;\r\n try {\r\n blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });\r\n } catch (e) {\r\n if (e.name == \"InvalidStateError\") {\r\n // InvalidStateError (tested on Win7 & Win8 IE11)\r\n var bb = new MSBlobBuilder();\r\n bb.append(csv);\r\n blob = bb.getBlob('text/csv;charset=utf-8');\r\n } else {\r\n // We're screwed, blob constructor unsupported entirely\r\n }\r\n }\r\n if (navigator.msSaveBlob) { // IE 10+\r\n navigator.msSaveBlob(blob, fileName);\r\n } else {\r\n var link = document.createElement(\"a\");\r\n if (link.download !== undefined) { // feature detection\r\n // Browsers that support HTML5 download attribute\r\n var url = URL.createObjectURL(blob);\r\n link.setAttribute(\"href\", url);\r\n link.setAttribute(\"download\", fileName);\r\n link.style.visibility = 'hidden';\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n }\r\n}\r\n\r\nfunction getScope(element) {\r\n return angular.element(element).scope();\r\n}\r\n\r\nfunction encrypt(value) {\r\n var b64 = unescape(encodeURIComponent(value))\r\n return window.btoa(b64);\r\n}\r\n\r\nfunction decrypt(value) {\r\n\r\n return decodeURIComponent(escape(window.atob(value)));\r\n}\r\n\r\nfunction setLocalValue(key, value) {\r\n var info;\r\n info = localStorage.getItem('appInfo');\r\n if (info != undefined && info != null && info != '') {\r\n info = JSON.parse(decrypt(info));\r\n info[key] = value;\r\n\r\n info = encrypt(JSON.stringify(info));\r\n localStorage.removeItem('appInfo');\r\n localStorage.setItem('appInfo', info);\r\n } else {\r\n info = {};\r\n info[key] = value;\r\n\r\n info = encrypt(JSON.stringify(info));\r\n localStorage.removeItem('appInfo');\r\n localStorage.setItem('appInfo', info);\r\n }\r\n}\r\n\r\nfunction getLocalValue(key) {\r\n var info;\r\n info = localStorage.getItem('appInfo');\r\n if (info != undefined && info != null && info != '') {\r\n info = JSON.parse(decrypt(info));\r\n\r\n return info[key];\r\n }\r\n}\r\n\r\nfunction setCookie(key, value, $cookies) {\r\n var cookieArr;\r\n cookieArr = $cookies.get('appCookie');\r\n if (cookieArr != undefined && cookieArr != null && cookieArr != '') {\r\n cookieArr = JSON.parse(decrypt(cookieArr));\r\n cookieArr[key] = value;\r\n cookieArr = encrypt(JSON.stringify(cookieArr));\r\n $cookies.remove('appCookie');\r\n $cookies.put('appCookie', cookieArr);\r\n } else {\r\n cookieArr = {};\r\n cookieArr[key] = value;\r\n cookieArr = encrypt(JSON.stringify(cookieArr));\r\n $cookies.put('appCookie', cookieArr);\r\n }\r\n}\r\n\r\nfunction getCookie(key, $cookies) {\r\n var cookieArr;\r\n cookieArr = $cookies.get('appCookie');\r\n if (cookieArr != undefined && cookieArr != null && cookieArr != '') {\r\n cookieArr = JSON.parse(decrypt(cookieArr));\r\n return cookieArr[key];\r\n }\r\n}","var devideByMegaBytes = 1024 * 1024;\r\nvar devideByKB = 1024;\r\n\r\nfunction Format_YYYYMMDD(array) {\r\n return array[2] + '-' + array[0] + '-' + array[1];\r\n}\r\n\r\nvar maxLicenses = 20;","(function () {\r\n 'use strict';\r\n\r\n app.controller('accessOptionController', ['$scope', '$location', '$cookies', 'LoginService', 'AuthenticationService', 'progressBarService', '$rootScope', '$timeout', 'UpgradeService', '$routeParams', 'indBulkPurchaseService', '$filter', function ($scope, $location, $cookies, loginService, AuthenticationService, progressBarService, $rootScope, $timeout, upgradeService, $routeParams, indBulkPurchaseService, $filter) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n $scope.states = [];\r\n $scope.billingstates = [];\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.isRemoveAppliedCoupon = false;\r\n $scope.disableIndAutorenew = false;\r\n\r\n $scope.serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n\r\n $timeout(function () {\r\n indBulkPurchaseService.setAccessOptionScope($scope);\r\n }, 100);\r\n\r\n var name = getLocalValue(\"fullName\").split(' ');\r\n $scope.firstName = name[0];\r\n $scope.lastName = name[1];\r\n\r\n $scope.purchasedCostEstimation = {\r\n productId: 0, durationInWords: \"\", isMonthly: 1, packagePurchased: \"\", quantity: 0, total: 0, discountPercent: 0, grandTotal: 0, recurringAmount: 0\r\n };\r\n\r\n $scope.teamAccess = function () {\r\n $location.path('/accessOption/team');\r\n }\r\n\r\n $scope.indAccess = function () {\r\n $location.path('/accessOption/ind');\r\n }\r\n\r\n var hideMessage = function () {\r\n $scope.isError = false;\r\n $scope.isSuccess = false;\r\n $scope.message = ''\r\n }\r\n\r\n var isPopupAppeared = false;\r\n\r\n $scope.calculateTotal = function (scope) {\r\n\r\n if (scope != undefined) {\r\n $scope = scope;\r\n }\r\n\r\n if ($routeParams.accessType == 'ind') {\r\n var indChkAutoBiling = $('#indChkAutoBiling')[0];\r\n if ($scope.indSubscriptionData.indOrderQuantity > 1) {\r\n\r\n $scope.indSubscriptionData.indAutoRenewal = false;\r\n\r\n if (indChkAutoBiling != undefined) {\r\n indChkAutoBiling.disabled = true;\r\n }\r\n\r\n if (isPopupAppeared == false) {\r\n $('#popupForTeam').modal('show');\r\n isPopupAppeared = true;\r\n }\r\n } else {\r\n if (indChkAutoBiling != undefined) {\r\n indChkAutoBiling.disabled = false;\r\n }\r\n }\r\n\r\n if ($scope.purchasedCostEstimation.isMonthly == 1) {\r\n monthlyCalculateTotal();\r\n }\r\n else if ($scope.purchasedCostEstimation.isMonthly == 0) {\r\n yearlyCalculateTotal();\r\n }\r\n } else if ($routeParams.accessType == 'team') {\r\n teamCalculateTotal();\r\n }\r\n }\r\n\r\n function monthlyCalculateTotal() {\r\n var isProductChanged = true;\r\n $scope.purchasedCostEstimation.durationInWords = \"month\";\r\n $scope.purchasedCostEstimation.packagePurchased = \"Monthly Individual\";\r\n $scope.purchasedCostEstimation.quantity = $scope.indSubscriptionData.indOrderQuantity;\r\n $scope.purchasedCostEstimation.total = $scope.perSeat.month * $scope.purchasedCostEstimation.quantity;\r\n var matched = false;\r\n $.each($scope.monthlyProduct, function (value, key) {\r\n if (key.eSpectraOrderMin <= $scope.purchasedCostEstimation.quantity && key.eSpectraOrderMax >= $scope.purchasedCostEstimation.quantity) {\r\n $scope.purchasedCostEstimation.productId = key.eSpectraProductID;\r\n\r\n isProductChanged = $scope.purchasedCostEstimation.isMonthly != $scope.currentProduct;\r\n\r\n //if (key.eSpectraDiscountPCent > 0 && matched == false) {\r\n // var discounted = $scope.purchasedCostEstimation.total * key.eSpectraDiscountPCent;\r\n // $scope.purchasedCostEstimation.grandTotal = ($scope.purchasedCostEstimation.total - discounted);\r\n // matched = true;\r\n //}\r\n }\r\n });\r\n\r\n $scope.currentProduct = $scope.purchasedCostEstimation.isMonthly;\r\n\r\n if (matched == false) {\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.total;\r\n }\r\n\r\n $scope.purchasedCostEstimation.recurringAmount = parseFloat($scope.purchasedCostEstimation.grandTotal).toFixed(2);\r\n\r\n applyCoupon(isProductChanged);\r\n }\r\n\r\n function yearlyCalculateTotal() {\r\n var isProductChanged = true;\r\n\r\n $scope.purchasedCostEstimation.durationInWords = \"year\";\r\n $scope.purchasedCostEstimation.packagePurchased = \"Annual Individual\";\r\n $scope.purchasedCostEstimation.quantity = $scope.indSubscriptionData.indOrderQuantity;\r\n $scope.purchasedCostEstimation.total = $scope.perSeat.year * $scope.purchasedCostEstimation.quantity;\r\n var matched = false;\r\n $.each($scope.yearlyProduct, function (value, key) {\r\n $scope.purchasedCostEstimation.productId = key.eSpectraProductID;\r\n\r\n isProductChanged = $scope.purchasedCostEstimation.isMonthly != $scope.currentProduct;\r\n\r\n //if (key.eSpectraOrderMin <= $scope.purchasedCostEstimation.quantity && key.eSpectraOrderMax >= $scope.purchasedCostEstimation.quantity) {\r\n // if (key.eSpectraDiscountPCent > 0 && matched == false) {\r\n // var discounted = $scope.purchasedCostEstimation.total * key.eSpectraDiscountPCent;\r\n // $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.total - discounted;\r\n // matched = true;\r\n // }\r\n //}\r\n });\r\n\r\n $scope.currentProduct = $scope.purchasedCostEstimation.isMonthly;\r\n\r\n if (matched == false) {\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.total;\r\n }\r\n\r\n $scope.purchasedCostEstimation.recurringAmount = parseFloat($scope.purchasedCostEstimation.grandTotal).toFixed(2);\r\n\r\n applyCoupon(isProductChanged);\r\n }\r\n\r\n function teamCalculateTotal() {\r\n var isProductChanged = true;\r\n\r\n $scope.purchasedCostEstimation.durationInWords = \"year\";\r\n $scope.purchasedCostEstimation.packagePurchased = \"Team Subscription\";\r\n $scope.purchasedCostEstimation.quantity = $scope.teamSubscriptionData.teamOrderQuantity;\r\n //$scope.purchasedCostEstimation.total = $scope.perSeat.team * $scope.purchasedCostEstimation.quantity;\r\n var matched = false;\r\n $.each($scope.teamProduct, function (value, key) {\r\n $scope.purchasedCostEstimation.productId = key.eSpectraProductID;\r\n\r\n isProductChanged = $scope.purchasedCostEstimation.isMonthly != $scope.currentProduct;\r\n\r\n if (key.eSpectraOrderMin <= $scope.purchasedCostEstimation.quantity && key.eSpectraOrderMax >= $scope.purchasedCostEstimation.quantity) {\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.quantity * key.eSpectraUnitPrice;\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.grandTotal.toFixed(2);\r\n matched = true;\r\n //if (key.eSpectraDiscountPCent > 0 && matched == false) {\r\n // var discounted = $scope.purchasedCostEstimation.total * key.eSpectraDiscountPCent;\r\n // $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.total - discounted;\r\n // $scope.purchasedCostEstimation.discountPercent = key.eSpectraDiscountPCent * 100;\r\n // matched = true;\r\n //}\r\n }\r\n });\r\n\r\n $scope.currentProduct = $scope.purchasedCostEstimation.isMonthly;\r\n\r\n if (matched == false) {\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.total;\r\n $scope.purchasedCostEstimation.discountPercent = 0;\r\n }\r\n\r\n applyCoupon(isProductChanged);\r\n }\r\n\r\n function applyCoupon(isProductChanged) {\r\n var isError = false;\r\n if (isProductChanged) {\r\n if ($scope.coupon.discountValue != \"\") {\r\n isError = true;\r\n }\r\n\r\n $scope.purchasedCostEstimation.grandTotal = parseFloat($scope.purchasedCostEstimation.grandTotal).toFixed(2);\r\n } else if ($scope.coupon.discountValue != \"\") {\r\n if ($scope.coupon.discountType == \"money\") {\r\n $scope.discountedValue = $scope.coupon.discountValue;\r\n } else if ($scope.coupon.discountType == \"percent\") {\r\n $scope.discountedValue = $scope.purchasedCostEstimation.grandTotal * ($scope.coupon.discountValue / 100);\r\n } else {\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.grandTotal.toFixed(2);\r\n }\r\n\r\n if ($scope.discountedValue != undefined && $scope.discountedValue != 0) {\r\n if ($scope.purchasedCostEstimation.grandTotal >= $scope.discountedValue) {\r\n $scope.purchasedCostEstimation.grandTotal = ($scope.purchasedCostEstimation.grandTotal - $scope.discountedValue).toFixed(2);\r\n $scope.indSubscriptionData.indAutoRenewal = $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? false : $scope.indSubscriptionData.indAutoRenewal;\r\n $scope.disableIndAutorenew = $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? true : $scope.disableIndAutorenew;\r\n $scope.couponMessage = GetMessage.couponSuccessMessage;\r\n $('.couponMessage').addClass('couponSuccess');\r\n removeCouponMessage();\r\n } else {\r\n isError = true;\r\n }\r\n }\r\n }\r\n if (isError) {\r\n $scope.couponMessage = GetMessage.couponInvalidMessage;\r\n $('.couponMessage').addClass('couponError');\r\n clearCoupon();\r\n removeCouponMessage();\r\n }\r\n }\r\n\r\n function clearCoupon() {\r\n $scope.coupon = {\r\n discountValue: 0,\r\n discountType: \"\",\r\n prodDiscountID: 0\r\n }\r\n\r\n $scope.indSubscriptionData.discountCode = \"\";\r\n $scope.teamSubscriptionData.discountCode = \"\";\r\n }\r\n\r\n function removeCouponMessage() {\r\n if ($scope.couponMessage != undefined) {\r\n $timeout(function () {\r\n if ($scope.couponMessage != undefined) {\r\n $scope.isRemoveAppliedCoupon = $scope.couponMessage == GetMessage.couponSuccessMessage ? true : false\r\n delete $scope.couponMessage\r\n $('.couponMessage').removeClass('couponError')\r\n $('.couponMessage').removeClass('couponSuccess')\r\n }\r\n }, 5000);\r\n }\r\n }\r\n\r\n ///SubscriptionDataModel\r\n $scope.subscribtionDataModel = function () {\r\n $scope.indSubscriptionData = {\r\n indFirstName: \"\",\r\n indLastName: \"\",\r\n indEmailId: $scope.email,\r\n indAddress: \"\",\r\n indAddress2: \"\",\r\n indCity: \"\",\r\n indState: \"\",\r\n indOtherState: \"\",\r\n indCountry: \"\",\r\n indZipCode: \"\",\r\n indBillingAddress: \"\",\r\n indBillingAddress2: \"\",\r\n indBillingCity: \"\",\r\n indBillingState: \"\",\r\n indBillingOtherState: \"\",\r\n indBillingCountry: \"\",\r\n indBillingZipCode: \"\",\r\n indAutoRenewal: true,\r\n indOrderQuantity: \"1\",\r\n discountCode: \"\"\r\n }\r\n\r\n $scope.teamSubscriptionData = {\r\n teamFirstName: \"\",\r\n teamLastName: \"\",\r\n teamEmailId: $scope.email,\r\n teamAddress: \"\",\r\n teamAddress2: \"\",\r\n teamCity: \"\",\r\n teamState: \"\",\r\n teamOtherState: \"\",\r\n teamCountry: \"\",\r\n teamZipCode: \"\",\r\n teamBillingAddress: \"\",\r\n teamBillingAddress2: \"\",\r\n teamBillingCity: \"\",\r\n teamBillingState: \"\",\r\n teamBillingOtherState: \"\",\r\n teamBillingCountry: \"\",\r\n teamBillingZipCode: \"\",\r\n\r\n teamOrderQuantity: \"2\",\r\n discountCode: \"\"\r\n }\r\n\r\n clearCoupon();\r\n\r\n $('form[name=\"indForm\"]').trigger('reset');\r\n if (this.indForm) {\r\n this.indForm.$setPristine();\r\n this.indForm.$setUntouched();\r\n }\r\n\r\n $('form[name=\"teamForm\"]').trigger('reset');\r\n if (this.teamForm) {\r\n this.teamForm.$setPristine();\r\n this.teamForm.$setUntouched();\r\n }\r\n }\r\n\r\n $scope.subscribtionDataModel();\r\n\r\n function isTeamAdminHasTeam() {\r\n $.ajax({\r\n url: $scope.serviceBase + 'api/team/hasTeam',\r\n async: true,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {}\r\n }).success(function (data) {\r\n if (!data) {\r\n $(\"#teamSetup\").modal('show');\r\n }\r\n }).error(function (data, status) {\r\n $scope.message = GetMessage.ApiError;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n });\r\n }\r\n\r\n //getProducts\r\n $scope.getProducts = function () {\r\n progressBarService.showProgressBar();\r\n upgradeService.getSubscriptionProducts().then(function (response) {\r\n\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n\r\n assignProduct(response);\r\n\r\n loginService.setUserDetail($scope.email).then(function (response) {\r\n if (response != null && response.data.message == undefined) {\r\n var userData = response.data;\r\n\r\n if (response.data.eSpectraRecurringBillFlag == \"1\") {\r\n progressBarService.showProgressBar();\r\n $scope.isError = true;\r\n $scope.message = 'You can not purchase individual subscription as autorenewal is on. Redirecting to profile page.....';\r\n $timeout(function () {\r\n $location.path('/profile');\r\n }, 3000)\r\n } else {\r\n if ($routeParams.accessType == 'ind') {\r\n $scope.indSubscriptionData.indState = userData.eSpectraStateCode;\r\n $scope.indSubscriptionData.indFirstName = userData.eSpectraFirstName;\r\n $scope.indSubscriptionData.indLastName = userData.eSpectraLastName;\r\n $scope.indSubscriptionData.indEmailId = userData.eSpectraEmail;\r\n $scope.indSubscriptionData.indAddress = userData.eSpectraStreetAddrs1;\r\n $scope.indSubscriptionData.indAddress2 = userData.eSpectraStreetAddrs2;\r\n $scope.indSubscriptionData.indCity = userData.eSpectraCity;\r\n $scope.indSubscriptionData.indCountry = userData.countryIso2,\r\n $scope.indSubscriptionData.indZipCode = userData.eSpectraZipPostalCode;\r\n } else if ($routeParams.accessType == 'team') {\r\n $scope.teamSubscriptionData.teamFirstName = userData.eSpectraFirstName;\r\n $scope.teamSubscriptionData.teamLastName = userData.eSpectraLastName;\r\n $scope.teamSubscriptionData.teamEmailId = userData.eSpectraEmail;\r\n $scope.teamSubscriptionData.teamAddress = userData.eSpectraStreetAddrs1;\r\n $scope.teamSubscriptionData.teamAddress2 = userData.eSpectraStreetAddrs2;\r\n $scope.teamSubscriptionData.teamCity = userData.eSpectraCity;\r\n $scope.teamSubscriptionData.teamCountry = userData.countryIso2,\r\n $scope.teamSubscriptionData.teamZipCode = userData.eSpectraZipPostalCode;\r\n }\r\n $scope.getcountryData();\r\n progressBarService.hideProgressBar();\r\n }\r\n }\r\n\r\n });\r\n }\r\n });\r\n }\r\n //assign product\r\n function assignProduct(response) {\r\n $scope.perSeat = {\r\n month: \"\",\r\n year: \"\",\r\n team: \"\",\r\n maxSeats: 0\r\n }\r\n\r\n $scope.monthlyProduct = response.data.monthlyProduct;\r\n $scope.perSeat.month = $scope.monthlyProduct[0].eSpectraUnitPrice;\r\n $scope.perSeat.maxSeats = $scope.monthlyProduct[$scope.monthlyProduct.length - 1].eSpectraOrderMax;\r\n $scope.yearlyProduct = response.data.yearlyProduct;\r\n $scope.perSeat.year = $scope.yearlyProduct[0].eSpectraUnitPrice;\r\n $scope.perSeat.maxSeats = $scope.yearlyProduct[$scope.yearlyProduct.length - 1].eSpectraOrderMax;\r\n $scope.teamProduct = response.data.teamProduct;\r\n $scope.perSeat.team = $scope.teamProduct[0].eSpectraUnitPrice;\r\n $scope.perSeat.maxSeats = $scope.teamProduct[$scope.teamProduct.length - 1].eSpectraOrderMax;\r\n $scope.email = response.data.loggedInEmailId;\r\n $scope.indSubscriptionData.indEmailId = $scope.email;\r\n $scope.teamSubscriptionData.teamEmailId = $scope.email;\r\n\r\n $scope.calculateTotal();\r\n }\r\n\r\n $scope.indSubscribe = function () {\r\n progressBarService.showProgressBar();\r\n\r\n if ($scope.indSubscriptionData.indOrderQuantity > 1) {\r\n indBulkPurchaseService.isValidBulkSubscription = true;\r\n $location.path('/indBulkSubscribe/ind', false);\r\n return\r\n }\r\n\r\n var upgradeData = {\r\n eSpectraLicenceKeyStatus: 'Assigned',\r\n eSpectraSubAssignedPersonEmail: $scope.indSubscriptionData.indEmailId,\r\n eSpectraFirstName: $scope.firstName,\r\n eSpectraLastName: $scope.lastName,\r\n eSpectraOrderQty: $scope.indSubscriptionData.indOrderQuantity,\r\n eSpectraOrderIsMonthly: $scope.purchasedCostEstimation.isMonthly,\r\n eSpectraOrderTS: new Date(),\r\n eSpectraProductID: $scope.purchasedCostEstimation.productId,\r\n eSpectraOrderTotalCost: $scope.purchasedCostEstimation.grandTotal,\r\n eSpectraCCBillFirstName: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indFirstName,\r\n eSpectraCCBillLastName: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indLastName,\r\n eSpectraCCBillStreetAddrs1: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingAddress,\r\n eSpectraCCBillStreetAddrs2: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingAddress2,\r\n eSpectraCCBillCity: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingCity,\r\n eSpectraCCBillZipPostalCode: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingZipCode,\r\n eSpectraCCBillStateCode: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingState,\r\n eSpectraCCBillCountryID: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.indSubscriptionData.indBillingCountry,\r\n eSpectraRecurringBillFlag: $scope.indSubscriptionData.indAutoRenewal ? 1 : 0,\r\n eSpectraProdDiscountID: $scope.coupon.prodDiscountID,\r\n RecurringAmount: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? 0.00 : $scope.purchasedCostEstimation.recurringAmount\r\n }\r\n $scope.getSignature(upgradeData);\r\n }\r\n\r\n $scope.teamSubscribe = function () {\r\n progressBarService.showProgressBar();\r\n var teamPartyID = getLocalValue(\"teamPartyID\");\r\n\r\n var upgradeData = {\r\n eSpectraOrderQty: $scope.teamSubscriptionData.teamOrderQuantity,\r\n eSpectraOrderTS: new Date(),\r\n eSpectraProductID: $scope.purchasedCostEstimation.productId,\r\n eSpectraTeamPartyID: teamPartyID,\r\n eSpectraFirstName: $scope.firstName,\r\n eSpectraOrderTotalCost: $scope.purchasedCostEstimation.grandTotal,\r\n eSpectraCCBillFirstName: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamFirstName,\r\n eSpectraCCBillLastName: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamLastName,\r\n eSpectraCCBillStreetAddrs1: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingAddress,\r\n eSpectraCCBillStreetAddrs2: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingAddress2,\r\n eSpectraCCBillCity: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingCity,\r\n eSpectraCCBillZipPostalCode: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingZipCode,\r\n eSpectraCCBillStateCode: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingState,\r\n eSpectraCCBillCountryID: $scope.purchasedCostEstimation.grandTotal.toString() == '0.00' ? \"\" : $scope.teamSubscriptionData.teamBillingCountry,\r\n eSpectraProdDiscountID: $scope.coupon.prodDiscountID\r\n }\r\n\r\n $scope.getTeamSignature(upgradeData);\r\n }\r\n\r\n $scope.getSignature = function (upgradeData, scope) {\r\n\r\n if (scope != undefined) {\r\n $scope = scope;\r\n }\r\n\r\n upgradeService.getSignature(upgradeData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n\r\n if (response.data.result && response.data.signature == undefined) {\r\n var subscriptionData = response.data.subscriptionData;\r\n var subscriptionType = subscriptionData.eSpectraOrderIsMonthly == 1 ? 'Monthly' : 'Annual';\r\n var subscriptionTerm = subscriptionData.eSpectraOrderIsMonthly == 1 ? 'month' : 'year';\r\n $scope.message = GetMessage.freeSubscription(subscriptionType, subscriptionTerm);\r\n $scope.isSuccess = true;\r\n $scope.isError = false;\r\n $scope.indSubscriptionData.indAutoRenewal = true;\r\n $scope.disableIndAutorenew = false;\r\n $scope.subscribtionDataModel();\r\n $scope.getProducts();\r\n $scope.purchasedCostEstimation.isMonthly = 1;\r\n $scope.currentProduct = 1;\r\n } else {\r\n\r\n var data = response.data.signature;\r\n\r\n $scope.cybersourceAPI = response.data.signature.CyberSourceTokenAPI;\r\n document.payment_confirmation.action = $scope.cybersourceAPI;\r\n if (document.autorenewal_payment_confirmation != undefined) {\r\n document.autorenewal_payment_confirmation.action = $scope.cybersourceAPI;\r\n }\r\n\r\n var payData = {\r\n access_key: data.access_key,\r\n profile_id: data.profile_id,\r\n transaction_uuid: data.transaction_uuid,\r\n signed_field_names: data.signed_field_names,\r\n unsigned_field_names: data.unsigned_field_names,\r\n signed_date_time: data.signed_date_time,\r\n locale: data.locale,\r\n transaction_type: data.transaction_type,\r\n reference_number: data.reference_number,\r\n amount: data.amount,\r\n currency: data.currency,\r\n signature: data.signature,\r\n bill_to_forename: data.bill_to_forename,\r\n bill_to_surname: data.bill_to_surname,\r\n bill_to_email: data.bill_to_email,\r\n bill_to_address_line1: data.bill_to_address_line1,\r\n bill_to_address_line2: data.bill_to_address_line2,\r\n bill_to_address_city: data.bill_to_address_city,\r\n bill_to_address_postal_code: data.bill_to_address_postal_code,\r\n bill_to_address_state: data.bill_to_address_state,\r\n bill_to_address_country: data.bill_to_address_country,\r\n recurring_frequency: data.recurring_frequency,\r\n recurring_amount: data.recurring_amount,\r\n recurring_start_date: data.recurring_start_date,\r\n override_custom_cancel_page: data.override_custom_cancel_page,\r\n override_custom_receipt_page: data.override_custom_receipt_page,\r\n override_backoffice_post_url: data.override_backoffice_post_url\r\n }\r\n\r\n $scope.GetSignature = payData;\r\n if (data.eSpectraRecurringBillFlag == 1) {\r\n window.setTimeout(function () {\r\n $('#autorenewalsubmit').click();\r\n }, 100)\r\n } else {\r\n window.setTimeout(function () {\r\n $('#submit').click();\r\n }, 100)\r\n }\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n }\r\n\r\n $scope.getTeamSignature = function (upgradeData) {\r\n\r\n upgradeService.getTeamSignature(upgradeData).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n\r\n if (response.data.result && response.data.signature == undefined) {\r\n var subscriptionType = 'Annual';\r\n var subscriptionTerm = 'year';\r\n $scope.message = GetMessage.freeSubscription(subscriptionType, subscriptionTerm);\r\n $scope.isSuccess = true;\r\n $scope.isError = false;\r\n $scope.subscribtionDataModel();\r\n $scope.getProducts();\r\n $scope.currentProduct = 0;\r\n } else {\r\n\r\n var data = response.data.signature;\r\n\r\n $scope.cybersourceAPI = response.data.signature.CyberSourceTokenAPI;\r\n document.payment_confirmation.action = $scope.cybersourceAPI;\r\n document.autorenewal_payment_confirmation.action = $scope.cybersourceAPI;\r\n\r\n var payData = {\r\n access_key: data.access_key,\r\n profile_id: data.profile_id,\r\n transaction_uuid: data.transaction_uuid,\r\n signed_field_names: data.signed_field_names,\r\n unsigned_field_names: data.unsigned_field_names,\r\n signed_date_time: data.signed_date_time,\r\n locale: data.locale,\r\n transaction_type: data.transaction_type,\r\n reference_number: data.reference_number,\r\n amount: data.amount,\r\n currency: data.currency,\r\n signature: data.signature,\r\n bill_to_forename: data.bill_to_forename,\r\n bill_to_surname: data.bill_to_surname,\r\n bill_to_email: data.bill_to_email,\r\n bill_to_address_line1: data.bill_to_address_line1,\r\n bill_to_address_line2: data.bill_to_address_line2,\r\n bill_to_address_city: data.bill_to_address_city,\r\n bill_to_address_postal_code: data.bill_to_address_postal_code,\r\n bill_to_address_state: data.bill_to_address_state,\r\n bill_to_address_country: data.bill_to_address_country,\r\n recurring_frequency: data.recurring_frequency,\r\n recurring_amount: data.recurring_amount,\r\n recurring_start_date: data.recurring_start_date,\r\n override_custom_cancel_page: data.override_custom_cancel_page,\r\n override_custom_receipt_page: data.override_custom_receipt_page,\r\n override_backoffice_post_url: data.override_backoffice_post_url\r\n }\r\n\r\n $scope.GetSignature = payData;\r\n\r\n window.setTimeout(function () {\r\n $('#submit').click();\r\n }, 100);\r\n }\r\n progressBarService.hideProgressBar();\r\n }\r\n });\r\n }\r\n\r\n $scope.validateCoupon = function (scope) {\r\n\r\n if (scope != undefined) {\r\n $scope = scope;\r\n }\r\n\r\n if ($scope.coupon.prodDiscountID > 0) {\r\n return;\r\n }\r\n\r\n $scope.indSubscriptionData.indAutoRenewal = true;\r\n $scope.disableIndAutorenew = false;\r\n\r\n $scope.couponMessage = \"\";\r\n var couponCode = $routeParams.accessType == \"ind\" ? $scope.indSubscriptionData.discountCode : $scope.teamSubscriptionData.discountCode;\r\n if (couponCode == \"\" || couponCode == undefined || couponCode == null) {\r\n $scope.couponMessage = GetMessage.couponInvalidMessage;\r\n $('.couponMessage').addClass('couponError');\r\n removeCouponMessage();\r\n //return;\r\n }\r\n var data = {\r\n eSpectraProductId: $scope.purchasedCostEstimation.productId,\r\n discountCode: couponCode\r\n }\r\n\r\n upgradeService.validateCoupon(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.couponMessage = response.data.message;\r\n $('.couponMessage').addClass('couponError');\r\n\r\n removeCouponMessage();\r\n clearCoupon();\r\n } else {\r\n if (response.data.eSpectraValueType != \"\") {\r\n $scope.coupon.discountValue = response.data.eSpectraDiscountValue;\r\n $scope.coupon.discountType = response.data.eSpectraValueType;\r\n $scope.coupon.prodDiscountID = response.data.eSpectraProdDiscountID;\r\n\r\n applyCoupon(false);\r\n\r\n } else {\r\n $scope.couponMessage = GetMessage.couponInvalidMessage;\r\n $('.couponMessage').addClass('couponError');\r\n clearCoupon();\r\n removeCouponMessage();\r\n }\r\n }\r\n });\r\n }\r\n\r\n $scope.removeAppliedCoupon = function () {\r\n $scope.purchasedCostEstimation.grandTotal = (parseFloat($scope.purchasedCostEstimation.grandTotal) + $scope.discountedValue);\r\n $scope.purchasedCostEstimation.grandTotal = $scope.purchasedCostEstimation.grandTotal.toFixed(2);\r\n $scope.indSubscriptionData.indAutoRenewal = true;\r\n $scope.disableIndAutorenew = false;\r\n $scope.coupon.prodDiscountID = 0;\r\n $scope.coupon.discountValue = 0;\r\n if ($routeParams.accessType == \"ind\") {\r\n $scope.indSubscriptionData.discountCode = ''\r\n }\r\n else {\r\n $scope.teamSubscriptionData.discountCode = ''\r\n }\r\n $scope.isRemoveAppliedCoupon = false;\r\n }\r\n\r\n if ($routeParams.accessType == 'team') {\r\n $('.privacy-container').addClass('team-access');\r\n $('.team-privacy-btn').addClass('disabled');\r\n isTeamAdminHasTeam();\r\n $scope.getProducts();\r\n $scope.currentProduct = 0;\r\n } else if ($routeParams.accessType == 'ind') {\r\n $('.privacy-container').addClass('individual-access');\r\n $('.individual-privacy-btn').addClass('disabled');\r\n $scope.getProducts();\r\n $scope.currentProduct = 1;\r\n }\r\n\r\n //address same as above\r\n $scope.chkbillingAddress = function () {\r\n if ($routeParams.accessType == 'ind') {\r\n $scope.isBillingAddressSame = false;\r\n var isChecked = $('#indChkBiling')[0].checked;\r\n if (isChecked) {\r\n $scope.isBillingAddressSame = true;\r\n $scope.indSubscriptionData.indBillingCountry = $scope.indSubscriptionData.indCountry;\r\n $scope.getBillingStateData($scope.indSubscriptionData.indBillingCountry);\r\n\r\n $scope.indSubscriptionData.indBillingState = $scope.indSubscriptionData.indState;\r\n\r\n $scope.indSubscriptionData.indBillingOtherState = $scope.indSubscriptionData.indOtherState;\r\n\r\n\r\n $scope.indSubscriptionData.indBillingAddress = $scope.indSubscriptionData.indAddress;\r\n $scope.indSubscriptionData.indBillingAddress2 = $scope.indSubscriptionData.indAddress2;\r\n $scope.indSubscriptionData.indBillingCity = $scope.indSubscriptionData.indCity;\r\n $scope.indSubscriptionData.indBillingZipCode = $scope.indSubscriptionData.indZipCode;\r\n\r\n $scope.indSelectedBillingCountryZipCodeRegEx = $scope.indSelectedCountryZipCodeRegEx;\r\n $scope.indBillingCountryZipCodeRequiredFlag = $scope.indCountryZipCodeRequiredFlag;\r\n\r\n }\r\n } else if ($routeParams.accessType == 'team') {\r\n $scope.isBillingAddressSame = false;\r\n var isChecked = $('#teamChkBiling')[0].checked;\r\n if (isChecked) {\r\n $scope.isBillingAddressSame = true;\r\n $scope.teamSubscriptionData.teamBillingCountry = $scope.teamSubscriptionData.teamCountry;\r\n $scope.getBillingStateData($scope.teamSubscriptionData.teamBillingCountry);\r\n\r\n $scope.teamSubscriptionData.teamBillingState = $scope.teamSubscriptionData.teamState;\r\n\r\n $scope.teamSubscriptionData.teamBillingOtherState = $scope.teamSubscriptionData.teamOtherState;\r\n\r\n\r\n $scope.teamSubscriptionData.teamBillingAddress = $scope.teamSubscriptionData.teamAddress;\r\n $scope.teamSubscriptionData.teamBillingAddress2 = $scope.teamSubscriptionData.teamAddress2;\r\n $scope.teamSubscriptionData.teamBillingCity = $scope.teamSubscriptionData.teamCity;\r\n $scope.teamSubscriptionData.teamBillingZipCode = $scope.teamSubscriptionData.teamZipCode;\r\n\r\n $scope.teamSelectedBillingCountryZipCodeRegEx = $scope.teamSelectedCountryZipCodeRegEx;\r\n $scope.teamBillingCountryZipCodeRequiredFlag = $scope.teamCountryZipCodeRequiredFlag;\r\n\r\n }\r\n }\r\n }\r\n\r\n $scope.$watch('[indSubscriptionData.indState, indSubscriptionData.indAddress, indSubscriptionData.indAddress2, indSubscriptionData.indCity, indSubscriptionData.indZipCode, teamSubscriptionData.teamState, teamSubscriptionData.teamAddress, teamSubscriptionData.teamAddress2, teamSubscriptionData.teamCity, teamSubscriptionData.teamZipCode]', function (newValue, oldValue) {\r\n $scope.chkbillingAddress();\r\n });\r\n\r\n //to test zip code valid or not at the time of page load\r\n $scope.$on('$viewContentLoaded', function () {\r\n $timeout(function () {\r\n $scope.indSelectedCountryZipCodeRegEx = $scope.indSelectedCountryZipCodeRegEx == undefined ? $('option:selected', $('#indCountry')).attr('validateRegex') : $scope.indSelectedCountryZipCodeRegEx;\r\n $scope.indCountryZipCodeRequiredFlag = $scope.indCountryZipCodeRequiredFlag == undefined ? $('option:selected', $('#indCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false : $scope.indCountryZipCodeRequiredFlag;\r\n\r\n $scope.teamSelectedCountryZipCodeRegEx = $scope.teamSelectedCountryZipCodeRegEx == undefined ? $('option:selected', $('#teamCountry')).attr('validateRegex') : $scope.teamSelectedCountryZipCodeRegEx;\r\n $scope.teamCountryZipCodeRequiredFlag = $scope.teamCountryZipCodeRequiredFlag == undefined ? $('option:selected', $('#teamCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false : $scope.teamCountryZipCodeRequiredFlag;\r\n if ($routeParams.accessType == 'team') {\r\n if ($scope.teamSubscriptionData.teamZipCode != '') {\r\n var emailregx = new RegExp($scope.selectedCountryZipCodeRegEx);\r\n if (!emailregx.test($scope.teamSubscriptionData.teamZipCode)) {\r\n $scope.teamForm.teamZipCode.$dirty = true;\r\n $scope.teamForm.teamZipCode.$invalid = true;\r\n }\r\n }\r\n } else {\r\n if ($scope.indSubscriptionData.indZipCode != '') {\r\n var emailregx = new RegExp($scope.selectedCountryZipCodeRegEx);\r\n if (!emailregx.test($scope.indSubscriptionData.indZipCode)) {\r\n $scope.indForm.indZipCode.$dirty = true;\r\n $scope.indForm.indZipCode.$invalid = true;\r\n }\r\n }\r\n }\r\n }, 2000);\r\n });\r\n\r\n //state\r\n $scope.getstateData = function (code, checkZipCodeRequiredFlag) {\r\n $scope.indSelectedCountryZipCodeRegEx = checkZipCodeRequiredFlag ? $('option:selected', $('#indCountry')).attr('validateRegex') : $scope.indSelectedCountryZipCodeRegEx;\r\n $scope.indCountryZipCodeRequiredFlag = checkZipCodeRequiredFlag ? $('option:selected', $('#indCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false : $scope.indCountryZipCodeRequiredFlag;\r\n\r\n $scope.teamSelectedCountryZipCodeRegEx = checkZipCodeRequiredFlag ? $('option:selected', $('#teamCountry')).attr('validateRegex') : $scope.teamSelectedCountryZipCodeRegEx;\r\n $scope.teamCountryZipCodeRequiredFlag = checkZipCodeRequiredFlag ? $('option:selected', $('#teamCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false : $scope.teamCountryZipCodeRequiredFlag;\r\n\r\n upgradeService.getstateData(code).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.states = response.data;\r\n $scope.chkbillingAddress();\r\n if ($scope.states.length > 0) {\r\n $scope.indSubscriptionData.indOtherState = \"\";\r\n $scope.teamSubscriptionData.teamOtherState = \"\";\r\n } else {\r\n $scope.indSubscriptionData.indState = \"\";\r\n $scope.teamSubscriptionData.teamState = \"\";\r\n }\r\n\r\n }\r\n });\r\n\r\n if ($scope.indSubscriptionData.indZipCode != '') {\r\n this.indForm.$dirty = true;\r\n this.indForm.indZipCode.$dirty = true;\r\n }\r\n\r\n if ($scope.teamSubscriptionData.teamZipCode != '') {\r\n this.teamForm.$dirty = true;\r\n this.teamForm.teamZipCode.$dirty = true;\r\n }\r\n }\r\n\r\n $scope.getBillingStateData = function (code) {\r\n\r\n upgradeService.getstateData(code).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.billingstates = response.data;\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n\r\n $scope.indSelectedBillingCountryZipCodeRegEx = $('option:selected', $('#indBillingCountry')).attr('validateRegex');\r\n $scope.indBillingCountryZipCodeRequiredFlag = $('option:selected', $('#indBillingCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false;\r\n\r\n $scope.teamSelectedBillingCountryZipCodeRegEx = $('option:selected', $('#teamBillingCountry')).attr('validateRegex');\r\n $scope.teamBillingCountryZipCodeRequiredFlag = $('option:selected', $('#teamBillingCountry')).attr('countryZipCodeRequiredFlag') === \"true\" ? true : false;\r\n\r\n if ($scope.billingstates.length > 0) {\r\n $scope.indSubscriptionData.indBillingState = \"\";\r\n $scope.indSubscriptionData.indBillingOtherState = \"\";\r\n\r\n $scope.teamSubscriptionData.teamBillingState = \"\";\r\n $scope.teamSubscriptionData.teamBillingOtherState = \"\";\r\n }\r\n\r\n if ($scope.indSubscriptionData.indBillingZipCode != '') {\r\n this.indForm.$dirty = true;\r\n this.indForm.indBillingZipCode.$dirty = true;\r\n }\r\n\r\n if ($scope.teamSubscriptionData.teamBillingZipCode != '') {\r\n this.teamForm.$dirty = true;\r\n this.teamForm.teamBillingZipCode.$dirty = true;\r\n }\r\n }\r\n\r\n //country\r\n $scope.getcountryData = function () {\r\n progressBarService.showProgressBar();\r\n upgradeService.getcountryData().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.countries = response.data;\r\n if ($scope.indSubscriptionData.indCountry != '') {\r\n var indSubscriptionData = $filter('filter')($scope.countries, { countryIso2: $scope.indSubscriptionData.indCountry }, true)[0]\r\n $scope.indCountryZipCodeRequiredFlag = indSubscriptionData.countryZipCodeRequiredFlag;\r\n $scope.indSelectedCountryZipCodeRegEx = indSubscriptionData.countryValidationString;\r\n }\r\n if ($scope.teamSubscriptionData.teamCountry != '') {\r\n var teamSubscriptionData = $filter('filter')($scope.countries, { countryIso2: $scope.teamSubscriptionData.teamCountry }, true)[0];\r\n $scope.teamCountryZipCodeRequiredFlag = teamSubscriptionData.countryZipCodeRequiredFlag;\r\n $scope.teamSelectedCountryZipCodeRegEx = teamSubscriptionData.countryValidationString;\r\n }\r\n if ($routeParams.accessType == 'team') {\r\n $scope.getstateData($scope.teamSubscriptionData.teamCountry, false)\r\n } else {\r\n $scope.getstateData($scope.indSubscriptionData.indCountry, false)\r\n }\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n }])\r\n})();\r\n\r\napp.service('indBulkPurchaseService', ['$cookies', function ($cookies) {\r\n var $scope = null;\r\n\r\n var isValidBulkSubscription = false;\r\n\r\n var getAccessOptionScope = function () {\r\n return $scope;\r\n }\r\n\r\n var setAccessOptionScope = function (scope) {\r\n $scope = scope;\r\n }\r\n\r\n return {\r\n getAccessOptionScope: getAccessOptionScope,\r\n setAccessOptionScope: setAccessOptionScope,\r\n isValidBulkSubscription: isValidBulkSubscription\r\n }\r\n\r\n}]);\r\n\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n app.controller('indBulkPurchaseController', ['$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', 'UpgradeService', '$routeParams', 'indBulkPurchaseService', function ($scope, $location, $cookies, progressBarService, $rootScope, $timeout, upgradeService, $routeParams, indBulkPurchaseService) {\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n if (performance.navigation.type == 1 || indBulkPurchaseService.isValidBulkSubscription == false) {\r\n $location.path('/accessOption/ind');\r\n }\r\n\r\n $scope.couponMessage = \"\";\r\n\r\n var scope = indBulkPurchaseService.getAccessOptionScope();\r\n\r\n $scope.coupon = scope.coupon;\r\n\r\n $scope.currentProduct = scope.currentProduct;\r\n\r\n $scope.perSeat = scope.perSeat;\r\n\r\n $scope.indSubscriptionData = scope.indSubscriptionData;\r\n $scope.teamSubscriptionData = scope.teamSubscriptionData;\r\n\r\n $scope.purchasedCostEstimation = scope.purchasedCostEstimation;\r\n\r\n $scope.monthlyProduct = scope.monthlyProduct;\r\n\r\n $scope.yearlyProduct = scope.yearlyProduct;\r\n\r\n $scope.calculateTotal = function () {\r\n scope.calculateTotal($scope);\r\n };\r\n\r\n $scope.createSeats = function () {\r\n $scope.seats = [];\r\n\r\n for (var i = 0; i < parseInt($scope.indSubscriptionData.indOrderQuantity) ; i++) {\r\n $scope.seats.push({ email: \"\" });\r\n }\r\n\r\n $scope.calculateTotal();\r\n }\r\n\r\n $scope.createSeats();\r\n\r\n $scope.validateCoupon = function () {\r\n scope.validateCoupon($scope);\r\n\r\n //removeCouponMessage();\r\n }\r\n\r\n function removeCouponMessage() {\r\n $timeout(function () {\r\n delete $scope.couponMessage\r\n $('.couponMessage').removeClass('couponError')\r\n $('.couponMessage').removeClass('couponSuccess')\r\n }, 5000);\r\n }\r\n\r\n $scope.checkValidEmail = function (e) {\r\n var i, emailregx, invalid = false;\r\n\r\n emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n for (i = 0; i < $scope.seats.length; i++) {\r\n var email = $('#email' + i);\r\n if ($scope.seats[i].email != \"\" && $scope.seats[i].email != undefined) {\r\n if (emailregx.test($scope.seats[i].email)) {\r\n email.removeClass('border-red');\r\n }\r\n else {\r\n invalid = true;\r\n email.addClass('border-red');\r\n }\r\n }\r\n }\r\n\r\n if (invalid == false) {\r\n for (var i = 0; i < $scope.seats.length; i++) {\r\n var email = $('#email' + i);\r\n for (var x = i + 1; x < $scope.seats.length; x++) {\r\n var email = $('#email' + x);\r\n if ($scope.seats[i].email == $scope.seats[x].email) {\r\n invalid = true;\r\n email.addClass('border-red');\r\n }\r\n }\r\n }\r\n }\r\n\r\n $scope.isDisabled = invalid;\r\n }\r\n\r\n $scope.subscribe = function () {\r\n\r\n progressBarService.showProgressBar();\r\n\r\n var assign = [];\r\n\r\n for (var i = 0; i < $scope.seats.length; i++) {\r\n assign.push({ eSpectraSubEmail: $scope.seats[i].email });\r\n }\r\n\r\n var upgradeData = {\r\n eSpectraLicenceKeyStatus: 'Assigned',\r\n eSpectraSubAssignedPersonEmail: scope.indSubscriptionData.indEmailId,\r\n subscriptionAssign: assign,\r\n eSpectraFirstName: scope.firstName,\r\n eSpectraLastName: scope.lastName,\r\n eSpectraOrderQty: scope.indSubscriptionData.indOrderQuantity,\r\n eSpectraOrderIsMonthly: scope.purchasedCostEstimation.isMonthly,\r\n eSpectraOrderTS: new Date(),\r\n eSpectraProductID: scope.purchasedCostEstimation.productId,\r\n eSpectraCCBillFirstName: scope.indSubscriptionData.indFirstName,\r\n eSpectraCCBillLastName: scope.indSubscriptionData.indLastName,\r\n eSpectraOrderTotalCost: scope.purchasedCostEstimation.grandTotal,\r\n eSpectraCCBillStreetAddrs1: scope.indSubscriptionData.indBillingAddress,\r\n eSpectraCCBillStreetAddrs2: scope.indSubscriptionData.indBillingAddress2,\r\n eSpectraCCBillCity: scope.indSubscriptionData.indBillingCity,\r\n eSpectraCCBillZipPostalCode: scope.indSubscriptionData.indBillingZipCode,\r\n eSpectraCCBillStateCode: scope.indSubscriptionData.indBillingState,\r\n eSpectraCCBillCountryID: scope.indSubscriptionData.indBillingCountry,\r\n eSpectraRecurringBillFlag: 0,\r\n eSpectraProdDiscountID: scope.coupon.prodDiscountID,\r\n RecurringAmount: scope.purchasedCostEstimation.recurringAmount\r\n }\r\n\r\n scope.getSignature(upgradeData, $scope);\r\n }\r\n }])\r\n})();","app.directive('ngAffiliation', function () {\r\n return {\r\n restrict: 'E',\r\n templateUrl: '../app/modules/templates/afffiliationModal.html',\r\n link: {\r\n post: function ($scope, element, attr) {\r\n $scope.setAffiliation = function () {\r\n if ($scope.selectedInstitute.userDefinedAffiliation.length > 0 && $scope.selectedInstitute.userDefinedAffiliation != $scope.selectedInstitute.InstitutionName) {\r\n $scope.selectedInstitute.InstitutionName = $scope.selectedInstitute.userDefinedAffiliation;\r\n $scope.selectedInstitute.InstitutionId = 2;\r\n $scope.selectedInstitute.isAffiliationExists = true;\r\n }\r\n if ($scope.selectedInstitute.InstitutionName.length > 0 || $scope.selectedInstitute.userDefinedAffiliation.length > 0) {\r\n if ($scope.isTeamManagementPage != undefined && $scope.isTeamManagementPage == true) {\r\n $scope.profileData.eSpectraTeamAffiliationID = parseInt($scope.selectedInstitute.InstitutionId) > 0 ? $scope.selectedInstitute.InstitutionId : 2;\r\n $scope.profileData.eSpectraTeamAffiliationName = $scope.selectedInstitute.InstitutionName != '' ? $scope.selectedInstitute.InstitutionName : $scope.selectedInstitute.userDefinedAffiliation;\r\n if ($scope.selectedInstitute.InstitutionName != $scope.profileData.eSpectraOrigTeamAffiliationName && $scope.selectedInstitute.userDefinedAffiliation != $scope.profileData.eSpectraOrigTeamAffiliationName) {\r\n $scope.isAffiliationChanged = true;\r\n } else {\r\n $scope.isAffiliationChanged = false;\r\n }\r\n } else {\r\n $scope.profileData.InstitutionId = parseInt($scope.selectedInstitute.InstitutionId) > 0 ? $scope.selectedInstitute.InstitutionId : 2;\r\n $scope.profileData.InstitutionName = $scope.selectedInstitute.InstitutionName != '' ? $scope.selectedInstitute.InstitutionName : $scope.selectedInstitute.userDefinedAffiliation;\r\n }\r\n $scope.profileForm.instituteName.$dirty = true;\r\n $scope.profileForm.instituteName.$touched = true;\r\n $scope.profileForm.instituteName.$valid = true;\r\n $('#institution-info').removeClass('hide');\r\n $('#affiliation').modal('hide');\r\n\r\n if ($scope.isSAdmin != undefined && $scope.isSAdmin == true) {\r\n $scope.isAffiliationDivActive = false;\r\n }\r\n }\r\n };\r\n\r\n $scope.clearAffiliationOnBackspace = function () {\r\n if ($('#affiliationName').val().length <= 0 && $scope.profileData.InstitutionName.length <= 0) {\r\n $scope.deSelectInstitute();\r\n }\r\n }\r\n\r\n $scope.deSelectInstitute = function () {\r\n $scope.profileData.InstitutionId = 1;\r\n $scope.profileData.InstitutionName = '';\r\n $scope.selectedInstitute.userDefinedAffiliation = '';\r\n $scope.selectedInstitute.isAffiliationExists = false;\r\n //$('#affiliationName').removeAttr('disabled');\r\n $('#institution-info').addClass('hide');\r\n\r\n $scope.profileForm.instituteName.$dirty = false;\r\n $scope.profileForm.instituteName.$untouched = true;\r\n $scope.profileForm.instituteName.$prestine = true;\r\n }\r\n },\r\n pre: function ($scope, element, attr) {\r\n var serviceBase = $scope.$root.buildConfig.aippsssApiBaseUrl;\r\n\r\n // Instantiate the Bloodhound suggestion engine\r\n var institutions = new Bloodhound({\r\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),\r\n queryTokenizer: Bloodhound.tokenizers.whitespace,\r\n remote: {\r\n url: serviceBase + 'api/Account/institutions?query=%QUERY',\r\n prepare: function (query, settings) {\r\n settings.beforeSend = (function () {\r\n $('.autopopulate-spinner').show();\r\n $scope.selectedInstitute.userDefinedAffiliation = query;\r\n $scope.selectedInstitute.isAffiliationExists = false;\r\n if ($scope.profileData.admin && $scope.profileData.InstitutionName == '') {\r\n $scope.profileForm.instituteName.$dirty = true;\r\n $scope.profileForm.instituteName.$invalid = true;\r\n }\r\n else {\r\n $scope.profileForm.instituteName.$dirty = true;\r\n $scope.profileForm.instituteName.$valid = true;\r\n }\r\n $scope.$apply();\r\n })();\r\n return $.extend(settings, {\r\n url: settings.url.replace('%QUERY', encodeURIComponent(query)),\r\n error: function (jqxhr, textStatus, errorThrown) {\r\n\r\n $('.autopopulate-spinner').hide();\r\n },\r\n success: function (data, textStatus, jqxhr) {\r\n }\r\n });\r\n },\r\n clearRemoteCache: function clearRemoteCache() {\r\n this.transport && Transport.resetCache();\r\n },\r\n filter: function (institutions) {\r\n $('.autopopulate-spinner').hide();\r\n return $.map(institutions, function (institution) {\r\n return {\r\n value: institution.institutionName,\r\n institutionCity: institution.institutionCity,\r\n institutionState: institution.institutionState,\r\n institutionID: institution.institutionID,\r\n institutionCountryCode: institution.institutionCountryCode\r\n };\r\n });\r\n }\r\n }\r\n });\r\n\r\n // Initialize the Bloodhound suggestion engine\r\n institutions.initialize();\r\n\r\n $(\"#affiliationName\").typeahead({\r\n hint: false,\r\n highlight: true,\r\n minLength: 3\r\n },\r\n {\r\n displayKey: 'value',\r\n minLength: 3,\r\n limit: 10,\r\n dupChecker: true,\r\n source: institutions.ttAdapter(),\r\n templates: {\r\n suggestion: function (data) {\r\n return \"
    \" + data.value + \", \" + data.institutionCity + \", \" + data.institutionState + \", \" + data.institutionCountryCode + \"
    \";\r\n },\r\n empty: [\r\n '
    ',\r\n '
    No Items Found
    ',\r\n '
    '\r\n ].join('\\n')\r\n }\r\n }).bind('typeahead:selected', function (obj, datum, name) {\r\n\r\n $scope.selectedInstitute.InstitutionId = datum.institutionID\r\n $scope.selectedInstitute.InstitutionName = datum.value;\r\n $scope.selectedInstitute.isAffiliationExists = true;\r\n $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n $scope.$apply();\r\n return false;\r\n });\r\n }\r\n }\r\n\r\n\r\n };\r\n});\r\n","app.directive('ngDataSetDetails', function ($rootScope) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: '../app/modules/templates/dataSetDetails.html',\r\n link: function (scope, element, attr) {\r\n }\r\n }\r\n});\r\n\r\n","app.directive('downloadUserReport', ['progressBarService', 'userManagementService', 'storagemanagementService', function (progressBarService, userManagementService, storagemanagementService) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: '../app/modules/templates/downloadUserReport.html',\r\n link: function ($scope, element, attr) {\r\n $scope.downloadReport = function ()\r\n {\r\n if ($scope.abbreviatedReport && $scope.isUserManagementPage) {\r\n $scope.exportUserManagementReportData();\r\n } else if ($scope.abbreviatedReport && !$scope.isUserManagementPage) {\r\n $scope.exportUserAnalyticsReportData();\r\n } else if ($scope.fullReport) {\r\n $scope.exportFullReportData();\r\n }\r\n }\r\n\r\n $scope.getCurrentDate = function ()\r\n {\r\n var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1; //January is 0!\r\n\r\n yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n $scope.currentDate = mm + '/' + dd + '/' + yyyy;\r\n }\r\n\r\n $scope.exportUserManagementReportData = function ()\r\n {\r\n progressBarService.showProgressBar();\r\n $scope.getCurrentDate();\r\n var data = {\r\n SortBy: $scope.pagination.sortBy,\r\n Reverse: $scope.pagination.reverse ? 'desc' : 'asc',\r\n eSpectraFullName: $scope.models.name,\r\n eSpectraEmail: $scope.models.email,\r\n eSpectraPrimaryAffiliationName: $scope.models.affiliation,\r\n PremiumType: $scope.models.premium ? '1' : '0',\r\n Restricted: $scope.models.restricted ? '1' : '0',\r\n Free: $scope.models.free ? '1' : '0',\r\n Active: $scope.models.active ? 'active' : '0',\r\n Deactivated: $scope.models.deactivated ? 'deactivated' : '0',\r\n Suspended: $scope.models.suspended ? 'suspended' : '0',\r\n Unactivated: $scope.models.Unactivated ? 'pending' : '0',\r\n Administrator: $scope.models.admininstrator ? '1' : '0',\r\n Deprecated: $scope.models.Deprecated ? 'deprecated' : '0',\r\n IndividualAccount: $scope.models.individualAccount ? '1' : '0',\r\n InstitutionAccount: $scope.models.institutionAccount ? '1' : '0'\r\n }\r\n\r\n userManagementService.getDataReport(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: response.data,\r\n reportType: \"userManagementReport\"\r\n });\r\n\r\n BlobDownloadCSV('UserManagementReport_' + $scope.currentDate + '.csv', csv)\r\n if ($scope.fullReport) {\r\n $scope.exportFullReportData();\r\n } else {\r\n $('#downloadReportDialog').modal('hide');\r\n }\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.exportUserAnalyticsReportData = function ()\r\n {\r\n progressBarService.showProgressBar();\r\n $scope.getCurrentDate();\r\n storagemanagementService.getStorageDetailsReport($scope.searchByUser).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: response.data.dataManagementDetailsExport,\r\n reportType: \"userAnanyticsReport\"\r\n });\r\n\r\n BlobDownloadCSV('UserAnalyticsReport_' + $scope.currentDate + '.csv', csv)\r\n if ($scope.fullReport) {\r\n $scope.exportFullReportData();\r\n } else {\r\n $('#downloadReportDialog').modal('hide');\r\n }\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.exportFullReportData = function ()\r\n {\r\n progressBarService.showProgressBar();\r\n $scope.getCurrentDate();\r\n if ($scope.isUserManagementPage) {\r\n var data = {\r\n SortBy: $scope.pagination.sortBy,\r\n Reverse: $scope.pagination.reverse ? 'desc' : 'asc',\r\n eSpectraFullName: $scope.models.name,\r\n eSpectraEmail: $scope.models.email,\r\n eSpectraPrimaryAffiliationName: $scope.models.affiliation,\r\n PremiumType: $scope.models.premium ? '1' : '0',\r\n Restricted: $scope.models.restricted ? '1' : '0',\r\n Free: $scope.models.free ? '1' : '0',\r\n Active: $scope.models.active ? 'active' : '0',\r\n Suspended: $scope.models.suspended ? 'suspended' : '0',\r\n Unactivated: $scope.models.Unactivated ? 'pending' : '0',\r\n Administrator: $scope.models.admininstrator ? '1' : '0',\r\n Deactivated: $scope.models.deactivated ? 'deactivated' : '0',\r\n Deprecated: $scope.models.Deprecated ? 'deprecated' : '0',\r\n IndividualAccount: $scope.models.individualAccount ? '1' : '0',\r\n InstitutionAccount: $scope.models.institutionAccount ? '1' : '0'\r\n }\r\n } else {\r\n var data = {\r\n SortBy: $scope.searchByUser.sortBy == \"\" ? 'eSpectraFirstName' : $scope.searchByUser.sortBy,\r\n Reverse: $scope.searchByUser.reverse ? 'desc' : 'asc',\r\n eSpectraFullName: $scope.searchByUser.searchByName,\r\n eSpectraEmail: $scope.searchByUser.searchByEmail,\r\n eSpectraPrimaryAffiliationName: $scope.searchByUser.searchByInstitutionName,\r\n PremiumType: $scope.searchByUser.searchByPremium ? '1' : '0',\r\n Restricted: $scope.searchByUser.searchByRestricted ? '1' : '0',\r\n Free: $scope.searchByUser.searchByFree ? '1' : '0',\r\n Active: 'active',\r\n Suspended: 'suspended',\r\n Unactivated: 'pending',\r\n Administrator: $scope.searchByUser.searchByAdministrator ? '1' : '0',\r\n Deprecated: '0',\r\n Deactivated: 'deactivated',\r\n IndividualAccount: $scope.searchByUser.searchByIndividualAccount ? '1' : '0',\r\n InstitutionAccount: $scope.searchByUser.searchByInstitutionAccount ? '1' : '0'\r\n }\r\n }\r\n\r\n userManagementService.getFullDataReport(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: response.data,\r\n reportType: \"fullReport\"\r\n });\r\n\r\n BlobDownloadCSV('UserManagementFullReport_' + $scope.currentDate + '.csv', csv)\r\n\r\n }\r\n $('#downloadReportDialog').modal('hide');\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n function convertArrayOfObjectsToCSV(args) {\r\n\r\n var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n data = args.data || null;\r\n if (data == null || !data.length) {\r\n return null;\r\n }\r\n\r\n columnDelimiter = args.columnDelimiter || ',';\r\n lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n\r\n keys = Object.keys(data[0]).slice(1);\r\n\r\n if (args.reportType == \"fullReport\") {\r\n headers = [\" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \"User\", \" \", \" \", \" \", \" \", \" \", \" \", \"Storage\", \" \", \" \", \" \", \"Personal Details\"]\r\n result = 'System User / Usage Activity Report' + lineDelimiter;\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n headers = [\"Sr. No\",\r\n \"Product Description\",\r\n \"Total Number of Seats\",\r\n \"Amount of Seats Utilized\",\r\n \"Remaining Number of Seats in Account\",\r\n \"User Type\",\r\n \"User Status\",\r\n //\"Admin Status\",\r\n \"Name\",\r\n \"Email Address\",\r\n \"Role Type\",\r\n \"Create Date\",\r\n \"Start Date\",\r\n \"End Date\",\r\n \"Last Login Date/Time\",\r\n \"Capacity Available\",\r\n \"Capacity Used\",\r\n \"% Usage\",\r\n \"No of Files\",\r\n \"Institutional Affiliation\",\r\n \"Current Title\",\r\n \"Research Interests\",\r\n \"Count of Invitations Sent\",\r\n \"Email Addresses of Invitees\",\r\n \"Count of Invitees that Registered\",\r\n \"Email Addresses of Registered Invitees\"]\r\n } else if (args.reportType == \"userManagementReport\") {\r\n headers = [\"Sr No.\",\r\n \"Name\",\r\n \"Email Address\",\r\n \"Affiliation Name\",\r\n //\"Admin Status\",\r\n \"User Status\",\r\n \"Admin Note\",\r\n \"User Type\",\r\n \"Role Type\"]\r\n\r\n result = 'Report Name' + columnDelimiter + \"User Management Report\" + lineDelimiter;\r\n } else {\r\n headers = [\"Sr No.\",\r\n \"Email Address\",\r\n \"Name\",\r\n \"Affiliation\",\r\n \"Capacity Available\",\r\n \"Capacity Used\",\r\n \"No. Of Files\",\r\n \"User Type\",\r\n \"Role Type\",\r\n \"Create Date\",\r\n \"Start Date\",\r\n \"End Date\"]\r\n\r\n result = 'Report Name' + columnDelimiter + \"User Unalytics Report\" + lineDelimiter;\r\n }\r\n\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n\r\n data.forEach(function (item) {\r\n\r\n ctr = 0;\r\n keys.forEach(function (key) {\r\n if (ctr > 0) result += columnDelimiter;\r\n\r\n result += item[key];\r\n ctr++;\r\n });\r\n result += lineDelimiter;\r\n });\r\n\r\n return result;\r\n }\r\n }\r\n }\r\n}]);\r\n\r\n","app.directive('myUploadData', function ($rootScope) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: '../app/modules/templates/uploadData.html',\r\n link: function (scope, element, attr) {\r\n scope.serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n scope.isFileLengthExceed = false;\r\n //scope.storeTechniques = ['', 'XPS', 'UPS', 'AES', 'UV-VIS'];\r\n getObjectTechniques();\r\n scope.defualtFileStatus = 'No file selected.';\r\n scope.getFileDetails = function (e) {\r\n scope.files = [];\r\n var arrFiles = ['xls', 'xlsx', 'txt', 'csv', 'tsv'];\r\n scope.$apply(function () {\r\n // STORE THE FILE OBJECT IN AN ARRAY.\r\n var fileInput = $(\"input[type=file]\");\r\n for (var i = 0; i < e.files.length; i++) {\r\n\r\n var arr = e.files[0].name.split('.');\r\n if (arrFiles.indexOf(arr[arr.length - 1]) > -1) {\r\n if (e.files[i].size > 0) {\r\n getUploadStorageCapacity();\r\n var fileInKB = (e.files[i].size / devideByKB).toFixed(2);\r\n var fileInMB = (e.files[i].size / devideByMegaBytes).toFixed(2);\r\n var fileSizeExceeded = false;\r\n var maxSize;\r\n\r\n if (scope.dataManagement.MaximumUploadSize.indexOf('MB') >= 0) {\r\n maxSize = scope.dataManagement.MaximumUploadSize.substr(0, scope.dataManagement.MaximumUploadSize.length - 2)\r\n if (fileInMB > maxSize) {\r\n fileSizeExceeded = true;\r\n }\r\n } else if (scope.dataManagement.MaximumUploadSize.indexOf('KB') >= 0) {\r\n maxSize = scope.dataManagement.MaximumUploadSize.substr(0, scope.dataManagement.MaximumUploadSize.length - 2)\r\n if (parseFloat(fileInKB) > parseFloat(maxSize)) {\r\n fileSizeExceeded = true;\r\n }\r\n }\r\n\r\n scope.fileName = e.files[0].name.length >= 21 ? e.files[0].name.substr(0, 21) + '...' : e.files[0].name;\r\n\r\n if (fileSizeExceeded) {\r\n fileInput.val('').clone(true);\r\n\r\n OnFileIsInvalid(scope);\r\n\r\n scope.modalMessage = GetMessage.maximumFileUploadSizeExceeded(scope.dataManagement.MaximumUploadSize);\r\n return false;\r\n }\r\n\r\n var usedSize, totalAllocatedSize;\r\n if (scope.dataManagement.UsedSize.indexOf('MB') >= 0) {\r\n usedSize = scope.dataManagement.UsedSize.substr(0, scope.dataManagement.UsedSize.length - 2)\r\n } else {\r\n usedSize = scope.dataManagement.UsedSize;\r\n }\r\n\r\n if (scope.dataManagement.TotalAllocatedSize.indexOf('MB') >= 0) {\r\n totalAllocatedSize = scope.dataManagement.TotalAllocatedSize.substr(0, scope.dataManagement.TotalAllocatedSize.length - 2)\r\n } else {\r\n totalAllocatedSize = scope.dataManagement.TotalAllocatedSize;\r\n }\r\n\r\n if ((parseFloat(fileInMB) + parseFloat(usedSize)) > totalAllocatedSize) {\r\n fileInput.val('').clone(true);\r\n\r\n OnFileIsInvalid(scope);\r\n\r\n scope.modalMessage = GetMessage.allocatedSizeExceed;\r\n return false;\r\n }\r\n\r\n scope.files.push(e.files[0]);\r\n $('#fileStatus').text(scope.fileName);\r\n $('#fileStatus').attr('title', e.files[0].name);\r\n scope.modalMessage = '';\r\n scope.isModalError = false;\r\n scope.isModalSuccess = false;\r\n } else {\r\n fileInput.val('').clone(true);\r\n\r\n OnFileIsInvalid(scope);\r\n\r\n scope.modalMessage = GetMessage.fileIsEmpty;\r\n return false;\r\n }\r\n } else {\r\n fileInput.val('').clone(true);\r\n\r\n OnFileIsInvalid(scope);\r\n\r\n scope.modalMessage = GetMessage.fileAllowedToUpload;\r\n return false;\r\n }\r\n }\r\n if (scope.files.length > 0) {\r\n if (e.files[0].name.length > 100) {\r\n scope.isModalError = true;\r\n scope.isModalSuccess = false;\r\n scope.modalMessage = GetMessage.fileNameLengthLimitExceed;\r\n scope.FileSelected = true;\r\n scope.isDisableStep1 = true;\r\n scope.isDisableStep3 = true;\r\n scope.isFileLengthExceed = true;\r\n return false;\r\n } else {\r\n scope.isFileLengthExceed = false;\r\n scope.FileSelected = true;\r\n scope.isDisableStep1 = true;\r\n scope.isDisableStep3 = false;\r\n }\r\n } else {\r\n scope.isDisableStep1 = false;\r\n OnFileIsInvalid(scope);\r\n scope.modalMessage = scope.modalMessage == GetMessage.fileNameLengthLimitExceed ? \"\" : scope.modalMessage;\r\n }\r\n\r\n });\r\n };\r\n\r\n function OnFileIsInvalid(scope) {\r\n scope.FileSelected = false;\r\n scope.isModalError = true;\r\n scope.isModalSuccess = false;\r\n scope.isDisableStep3 = true;\r\n\r\n $('#fileStatus').text(scope.defualtFileStatus);\r\n $('#fileStatus').attr('title', scope.defualtFileStatus);\r\n }\r\n\r\n scope.FileShare = {\r\n Yes: false,\r\n No: false\r\n }\r\n\r\n scope.FileSelected = false;\r\n\r\n scope.dataManagementValues = function () {\r\n scope.dataManagement = {\r\n HostMaterial: \"\",\r\n ChemicalName: \"\",\r\n ReferencedArticle: \"\",\r\n Techinque: \"\",\r\n FirstName: \"\",\r\n LastName: \"\",\r\n Description: \"\",\r\n eSpectraObjectDOI: \"\",\r\n eSpectraObjectCalibration: '',\r\n TotalAllocatedSize: '',\r\n UsedSize: '',\r\n MaximumUploadSize: '',\r\n CasRegistryNumber: ''\r\n }\r\n scope.dataManagement.FileShare = \"private\";\r\n scope.dataManagement.isPublic = 0;\r\n }\r\n\r\n scope.dataManagementValues();\r\n\r\n scope.checkTechnique = function () {\r\n if (scope.dataManagement.Techinque != undefined) {\r\n scope.isDisableStep2 = false;\r\n } else {\r\n scope.isDisableStep2 = true;\r\n }\r\n }\r\n\r\n scope.removeFile = function () {\r\n scope.FileSelected = false;\r\n $('#fileStatus').text('No file selected.');\r\n scope.isDisableStep1 = false;\r\n scope.isDisableStep3 = true;\r\n if (scope.modalMessage == GetMessage.fileNameLengthLimitExceed) {\r\n scope.isModalError = false;\r\n scope.isModalSuccess = false;\r\n scope.modalMessage = \"\";\r\n }\r\n }\r\n\r\n scope.validateCesRegistryNumber = function () {\r\n var casRegistryNumber = scope.dataManagement.CasRegistryNumber;\r\n var count = 0;\r\n\r\n if (casRegistryNumber != \"\") {\r\n if (casRegistryNumber.indexOf(\"-\") > 0 && casRegistryNumber.lastIndexOf(\"-\") < casRegistryNumber.length - 1) {\r\n for (var i = 0; i < casRegistryNumber.length; i++) {\r\n if (casRegistryNumber.charAt(i) == \"-\") {\r\n count++;\r\n }\r\n if (count > 2) {\r\n break;\r\n }\r\n }\r\n if (count != 2) {\r\n scope.dataManagementUpload.casregistryno.$invalid = true;\r\n scope.dataManagementUpload.$valid = false;\r\n }\r\n } else {\r\n scope.dataManagementUpload.casregistryno.$invalid = true;\r\n scope.dataManagementUpload.$valid = false;\r\n }\r\n } else {\r\n scope.dataManagementUpload.casregistryno.$invalid = false;\r\n scope.dataManagementUpload.$valid = true;\r\n }\r\n }\r\n\r\n function getUploadStorageCapacity() {\r\n $.ajax({\r\n url: scope.serviceBase + 'api/datamanagement/getUserStorageCapacity',\r\n async: false,\r\n type: \"GET\",\r\n dataType: \"json\",\r\n data: {}\r\n }).success(function (data) {\r\n scope.dataManagement.TotalAllocatedSize = data.totalAllocatedSize;\r\n scope.dataManagement.UsedSize = data.usedSize;\r\n scope.dataManagement.MaximumUploadSize = data.maximumUploadSize;\r\n }).error(function (data, status) {\r\n scope.modalMessage = GetMessage.ApiError;\r\n scope.isModalError = true;\r\n scope.isModalSuccess = false;\r\n });\r\n }\r\n\r\n function getObjectTechniques() {\r\n var objectTechniques = getLocalValue(\"objectTechniques\");\r\n scope.storeTechniques = [];\r\n angular.forEach(objectTechniques, function (value, key) {\r\n scope.storeTechniques.push(value);\r\n });\r\n\r\n }\r\n }\r\n }\r\n});\r\n\r\napp.directive('toggle', function () {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n if (attrs.toggle == \"popover\") {\r\n $(element).popover();\r\n }\r\n }\r\n };\r\n});\r\n","app.directive('teamSetup', function ($location, progressBarService, teamManagementService) {\r\n return {\r\n restrict: 'E',\r\n templateUrl: '../app/modules/templates/teamSetup.html',\r\n link: function (scope, element, attr) {\r\n scope.selectedInstitute = {\r\n InstitutionId: 0,\r\n InstitutionName: '',\r\n isAffiliationExists: false,\r\n userDefinedAffiliation: ''\r\n };\r\n\r\n scope.hideModal = function () {\r\n $('#teamSetup').modal('hide');\r\n $location.path('/landing')\r\n }\r\n\r\n scope.selectAffiliation = function () {\r\n $('#affiliationName').val('');\r\n scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n scope.selectedInstitute.InstitutionId = scope.profileData.InstitutionId;\r\n if (!scope.selectedInstitute.isAffiliationExists) {\r\n scope.selectedInstitute.InstitutionName = scope.profileData.InstitutionName;\r\n } else {\r\n if (scope.profileData.InstitutionName.length == 0) {\r\n scope.selectedInstitute.isAffiliationExists = false\r\n }\r\n scope.selectedInstitute.userDefinedAffiliation = scope.profileData.InstitutionName;\r\n }\r\n\r\n $('#affiliation').modal('show');\r\n };\r\n\r\n scope.profileData = {\r\n InstitutionId: \"\",\r\n InstitutionName: \"\",\r\n teamDisplayName: \"\"\r\n }\r\n\r\n scope.proceedTeamSetup = function () {\r\n progressBarService.showProgressBar();\r\n scope.isDisabled = true;\r\n\r\n var data = {\r\n eSpectraTeamAffiliationID: parseInt(scope.profileData.InstitutionId) > 0 ? scope.profileData.InstitutionId : 1,\r\n eSpectraTeamAffiliationName: scope.profileData.InstitutionName,\r\n eSpectraTeamName: scope.profileData.teamDisplayName\r\n }\r\n\r\n teamManagementService.saveIndividualTeam(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n scope.modalMessage = response.data.message;\r\n scope.isModalError = true;\r\n scope.isDisabled = false;\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n $location.path('/landing')\r\n }\r\n });\r\n }\r\n }\r\n }\r\n});","(function () {\r\n 'use strict';\r\n app.controller('teamManagementController', ['$filter', '$scope', '$location', '$cookies', 'progressBarService', '$rootScope', '$timeout', '$routeParams', 'teamManagementService', '$http', 'LoginService', function ($filter, $scope, $location, $cookies, progressBarService, $rootScope, $timeout, $routeParams, teamManagementService, $http, loginService) {\r\n\r\n if ($cookies.get('TokenInfo') == undefined || localStorage.getItem('appInfo') == undefined) {\r\n $location.path('/login');\r\n return\r\n }\r\n\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var startIndex = 0;\r\n $scope.userDetailscurrentPage = 0;\r\n $scope.userDetailsPageSize = 10;\r\n\r\n //$scope.selectedInstitute = {\r\n // InstitutionId: 0,\r\n // InstitutionName: '',\r\n // isAffiliationExists: false,\r\n // userDefinedAffiliation: ''\r\n //};\r\n\r\n //$scope.hideModal = function () {\r\n // $('#teamSetup').modal('hide');\r\n // $location.path('/landing')\r\n //}\r\n\r\n //$scope.selectAffiliation = function () {\r\n // $('#affiliationName').val('');\r\n // $scope.selectedInstitute.userDefinedAffiliation = \"\";\r\n // $scope.selectedInstitute.InstitutionId = $scope.profileData.InstitutionId;\r\n // if (!$scope.selectedInstitute.isAffiliationExists) {\r\n // $scope.selectedInstitute.InstitutionName = $scope.profileData.InstitutionName;\r\n // } else {\r\n // if ($scope.profileData.InstitutionName.length == 0) {\r\n // $scope.selectedInstitute.isAffiliationExists = false\r\n // }\r\n // $scope.selectedInstitute.userDefinedAffiliation = $scope.profileData.InstitutionName;\r\n // }\r\n\r\n // $('#affiliation').modal('show');\r\n //};\r\n\r\n $scope.reset = function () {\r\n $scope.models = {\r\n name: '',\r\n email: '',\r\n affiliation: '',\r\n admininstrator: true,\r\n active: true,\r\n expired: true,\r\n inactive: true,\r\n pending: true\r\n }\r\n\r\n $scope.teamMemberPagination = {\r\n currentPage: 1,\r\n itemsPerPage: 10,\r\n totalRows: 0,\r\n sortBy: 'eSpectraSubAssignID',\r\n reverse: false\r\n }\r\n\r\n //$scope.profileData = {\r\n // InstitutionId: \"\",\r\n // InstitutionName: \"\",\r\n // teamDisplayName: \"\"\r\n //}\r\n }\r\n\r\n $scope.reset();\r\n\r\n $scope.goTeamData = function () {\r\n $location.path('/datamanagement/team');\r\n }\r\n\r\n //$scope.proceedTeamSetup = function () {\r\n // progressBarService.showProgressBar();\r\n // $scope.isDisabled = true;\r\n\r\n // var data = {\r\n // eSpectraTeamAffiliationID: $scope.profileData.InstitutionId,\r\n // eSpectraTeamAffiliationName: $scope.profileData.InstitutionName,\r\n // eSpectraTeamName: $scope.profileData.teamDisplayName\r\n // }\r\n\r\n // teamManagementService.saveIndividualTeam(data).then(function (response) {\r\n // if (response != null && response.data.message != undefined) {\r\n // $scope.modalMessage = response.data.message;\r\n // $scope.isModalError = true;\r\n // $scope.isDisabled = false;\r\n // }\r\n // else {\r\n // $location.path('/landing')\r\n // }\r\n // });\r\n //}\r\n\r\n $scope.resetMemberList = function () {\r\n $scope.userDetailscurrentPage = 0;\r\n $scope.isSearchUsers = false;\r\n $scope.removeTeamMemberEmailIds = '';\r\n $scope.isTeamNameChanged = false;\r\n $scope.isUpdateTeamName = false;\r\n $scope.isDisabled = false;\r\n $scope.reset();\r\n $scope.getTeamDetails();\r\n }\r\n\r\n $scope.getTeamDetails = function () {\r\n progressBarService.showProgressBar();\r\n teamManagementService.getTeamDetailsByUserID().then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n if (response.data.status == 1) {\r\n $(\"#teamSetup\").modal('show');\r\n return;\r\n }\r\n\r\n $scope.teamData = response.data;\r\n $scope.teamData.oldeSpectraTeamName = $scope.teamData.eSpectraTeamName;\r\n //$scope.teamData.eSpectraSeatsRemaining = $scope.teamData.eSpectraTeamStatus.toLowerCase() == 'expired' ? 0 : $scope.teamData.eSpectraOrderQty - $scope.teamData.eSpectraSeatsAllocated;\r\n $scope.getTeamMemberList();\r\n }\r\n });\r\n }\r\n\r\n $scope.getTeamDetails();\r\n\r\n $scope.getTeamMemberList = function (click) {\r\n progressBarService.showProgressBar();\r\n if (click == \"search\") {\r\n $scope.teamMemberData = [];\r\n $scope.teamMemberPagination.sortBy = 'eSpectraSubAssignID';\r\n $scope.teamMemberPagination.reverse = false;\r\n }\r\n var data = {\r\n eSpectraTeamPartyID: $scope.teamData.eSpectraTeamPartyID,\r\n eSpectraTeamMemberName: $scope.models.name,\r\n eSpectraTeamMemberEmail: $scope.models.email,\r\n eSpectraTeamAffiliationName: $scope.models.affiliation,\r\n Administrator: $scope.models.admininstrator ? '1' : '0',\r\n Active: $scope.models.active ? 'active' : '0',\r\n Expired: $scope.models.expired ? 'expired' : '0',\r\n //Inactive: $scope.models.inactive ? 'deactivated' : '0',\r\n Pending: $scope.models.pending ? 'pending' : '0',\r\n SortBy: $scope.teamMemberPagination.sortBy,\r\n Reverse: $scope.teamMemberPagination.reverse ? 'desc' : 'asc'\r\n }\r\n teamManagementService.getTeamMemberData(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n }\r\n else {\r\n $scope.teamMemberData = response.data;\r\n $scope.teamMemberStatusBackUp = [];\r\n //teamMemberDataBackUp = response.data;\r\n var countOfExpiredMembers = 0;\r\n angular.forEach($scope.teamMemberData, function (value, key) {\r\n $scope.teamMemberData[key].isShowNameTextField = false;\r\n $scope.teamMemberData[key].isShowEmailTextField = false;\r\n $scope.teamMemberData[key].isRenew = false;\r\n $scope.teamMemberStatusBackUp[key] = value.eSpectraSubAssignStatus;\r\n if ($scope.teamData.eSpectraTeamStatus.toLowerCase() == 'expired') {\r\n $scope.teamMemberData[key].eSpectraSubAssignStatus = 'Expired';\r\n }\r\n if (value.eSpectraSubAssignStatus == 'Expired' || value.eSpectraSubAssignStatus == 'Inactive') {\r\n $scope.teamMemberData[key].isRenewDisable = true;\r\n $scope.teamMemberData[key].isRemoveDisable = true;\r\n countOfExpiredMembers++;\r\n } else {\r\n $scope.teamMemberData[key].isRenewDisable = false;\r\n $scope.teamMemberData[key].isRemoveDisable = false;\r\n }\r\n });\r\n\r\n $scope.teamData.eSpectraSeatsRemaining = $scope.teamData.eSpectraTeamStatus.toLowerCase() == 'expired' ? 0 : ($scope.teamData.eSpectraOrderQty - $scope.teamData.eSpectraSeatsAllocated) + countOfExpiredMembers;\r\n\r\n if (data.Inactive != 0 && data.eSpectraTeamMemberName == \"\" && data.eSpectraTeamMemberEmail == \"\") {\r\n var countOfSeatsRequired = $scope.teamData.eSpectraTeamStatus.toLowerCase() == 'expired' && $scope.teamData.eSpectraSeatsAllocated == countOfExpiredMembers ? $scope.teamData.eSpectraSeatsAllocated : $scope.teamData.eSpectraSeatsAllocated - countOfExpiredMembers;\r\n if ($scope.teamData.eSpectraOrderQty != countOfSeatsRequired) {\r\n $scope.startIndex = $scope.teamMemberData.length;\r\n\r\n var remainingQty = $scope.teamData.eSpectraOrderQty - countOfSeatsRequired\r\n for (var i = startIndex; i < startIndex + remainingQty; i++) {\r\n $scope.teamMemberData.push({\r\n eSpectraTeamMemberName: '',\r\n eSpectraTeamMemberEmail: '',\r\n eSpectraOrderStartDate: $scope.teamData.eSpectraOrderStartDate,\r\n eSpectraOrderEndDate: $scope.teamData.eSpectraOrderEndDate,\r\n eSpectraSubAssignStatus: $scope.teamData.eSpectraTeamStatus.toLowerCase() == 'expired' ? 'Expired' : 'Inactive',\r\n isRenew: false,\r\n isRenewDisable: true,\r\n isRemoveDisable: true,\r\n isShowNameTextField: true,\r\n isShowEmailTextField: true,\r\n\r\n });\r\n }\r\n var index = $scope.startIndex;\r\n angular.forEach($scope.teamData.eSpectraTeamOrderDetails, function (value, key) {\r\n if (value.eSpectraOrderQty - value.eSpectraSeatsAllocated > 0) {\r\n var condition = value.eSpectraOrderQty - value.eSpectraSeatsAllocated;\r\n for (var i = index; i < condition + index; i++) {\r\n $scope.teamMemberData[i].eSpectraOrderStartDate = value.eSpectraOrderStartDate;\r\n $scope.teamMemberData[i].eSpectraOrderEndDate = value.eSpectraOrderEndDate;\r\n }\r\n index = index + condition;\r\n }\r\n })\r\n }\r\n }\r\n //if (!isSort) {\r\n // $scope.getcountryData();\r\n //}\r\n }\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n $scope.exportReportData = function () {\r\n progressBarService.showProgressBar();\r\n $scope.getCurrentDate();\r\n var data = {\r\n eSpectraTeamPartyID: $scope.teamData.eSpectraTeamPartyID,\r\n eSpectraTeamMemberName: $scope.models.name,\r\n eSpectraTeamMemberEmail: $scope.models.email,\r\n eSpectraTeamAffiliationName: $scope.models.affiliation,\r\n Administrator: $scope.models.admininstrator ? '1' : '0',\r\n Active: $scope.models.active ? 'active' : '0',\r\n Expired: $scope.models.expired ? 'expired' : '0',\r\n //Inactive: $scope.models.inactive ? 'deactivated' : '0',\r\n Pending: $scope.models.pending ? 'pending' : '0',\r\n PageNo: $scope.teamMemberPagination.currentPage,\r\n SortBy: $scope.teamMemberPagination.sortBy,\r\n Reverse: $scope.teamMemberPagination.reverse ? 'desc' : 'asc'\r\n }\r\n\r\n teamManagementService.getTeamMemberDataReport(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n //$timeout(hideMessage, 10000);\r\n }\r\n else {\r\n var csv = convertArrayOfObjectsToCSV({\r\n data: response.data\r\n });\r\n\r\n BlobDownloadCSV('TeamManagementReport_' + $scope.currentDate + '.csv', csv)\r\n }\r\n\r\n progressBarService.hideProgressBar();\r\n });\r\n }\r\n\r\n function convertArrayOfObjectsToCSV(args) {\r\n\r\n var result, ctr, keys, columnDelimiter, lineDelimiter, data, headers;\r\n\r\n data = args.data || null;\r\n if (data == null || !data.length) {\r\n return null;\r\n }\r\n\r\n columnDelimiter = args.columnDelimiter || ',';\r\n lineDelimiter = args.lineDelimiter || '\\n';\r\n\r\n\r\n keys = Object.keys(data[0]).slice(1);\r\n\r\n headers = [\"Name\",\r\n \"Email\",\r\n \"Start Date\",\r\n \"End Date\",\r\n \"Status\"]\r\n\r\n result = 'Report Name' + columnDelimiter + \"Team Management Report\" + lineDelimiter;\r\n result += headers.join(columnDelimiter);\r\n result += lineDelimiter;\r\n\r\n data.forEach(function (item) {\r\n\r\n ctr = 0;\r\n keys.forEach(function (key) {\r\n if (ctr > 0) result += columnDelimiter;\r\n\r\n result += item[key];\r\n ctr++;\r\n });\r\n result += lineDelimiter;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n $scope.getCurrentDate = function () {\r\n var today, dd, mm, yyyy, currentDate, startDate, endDate, parameter;\r\n today = new Date();\r\n dd = today.getDate();\r\n mm = today.getMonth() + 1; //January is 0!\r\n\r\n yyyy = today.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n }\r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n }\r\n $scope.currentDate = mm + '/' + dd + '/' + yyyy;\r\n }\r\n\r\n $scope.sortTeamMembers = function (sortBy) {\r\n if ($scope.teamMemberData.length > 0) {\r\n $scope.teamMemberPagination.sortBy = sortBy;\r\n $scope.teamMemberPagination.currentPage = 1;\r\n $scope.teamMemberPagination.reverse = !$scope.teamMemberPagination.reverse;\r\n $scope.getTeamMemberList();\r\n }\r\n }\r\n\r\n $scope.removeTeamMember = function (index) {\r\n if (!$scope.teamMemberData[index].isRemoveDisable) {\r\n $scope.removeTeamMemberEmailIds = $scope.removeTeamMemberEmailIds + $scope.teamMemberData[index].eSpectraTeamMemberEmail + ',';\r\n $scope.teamMemberData[index].eSpectraSubAssignStatus = 'Inactive';\r\n $scope.teamMemberData[index].isRenewDisable = true;\r\n $scope.teamMemberData[index].isShowUndo = true;\r\n $scope.teamMemberData[index].isRemoveDisable = true;\r\n }\r\n }\r\n\r\n $scope.undoTeamMember = function (index) {\r\n $scope.teamMemberData[index].eSpectraSubAssignStatus = $scope.teamMemberStatusBackUp[index];\r\n $scope.removeTeamMemberEmailIds = $scope.removeTeamMemberEmailIds.replace($scope.teamMemberData[index].eSpectraTeamMemberEmail + ',', '');\r\n $scope.teamMemberData[index].isRenewDisable = false;\r\n $scope.teamMemberData[index].isShowUndo = false;\r\n $scope.teamMemberData[index].isRemoveDisable = false;\r\n }\r\n\r\n $scope.saveAdminUpdatedTeamProfile = function () {\r\n progressBarService.showProgressBar();\r\n if ($scope.teamData.oldeSpectraTeamName != $scope.teamData.eSpectraTeamName) {\r\n $scope.isTeamNameChanged = true;\r\n }\r\n\r\n var removed = $scope.removeTeamMemberEmailIds != \"\" ? $scope.removeTeamMemberEmailIds.split(',') : \"\";\r\n var eSpectraMembers = [];\r\n\r\n angular.forEach(removed, function (value, key) {\r\n eSpectraMembers.push({ eSpectraTeamMemberEmail: value, isRemoved: 1, eSpectraTeamPartyID: $scope.teamData.eSpectraTeamPartyID });\r\n });\r\n\r\n var tempName = [], invalidData = 0;\r\n angular.forEach($scope.teamMemberData, function (value, key) {\r\n tempName = value.eSpectraTeamMemberName.split(' ')\r\n if (value.eSpectraTeamMemberName != \"\" && value.eSpectraTeamMemberEmail != \"\" && value.isShowNameTextField == true) {\r\n eSpectraMembers.push({\r\n eSpectraTeamMemberFirstName: tempName[0],\r\n eSpectraTeamMemberLastName: tempName[1],\r\n eSpectraTeamMemberEmail: value.eSpectraTeamMemberEmail,\r\n iseSpectraTeamAdmin: '0',\r\n isAdded: 1,\r\n eSpectraTeamPartyID: $scope.teamData.eSpectraTeamPartyID\r\n });\r\n } else if ((value.eSpectraTeamMemberName == \"\" && value.eSpectraTeamMemberEmail != \"\") || (value.eSpectraTeamMemberEmail == \"\" && value.eSpectraTeamMemberName != \"\")) {\r\n invalidData++;\r\n }\r\n });\r\n\r\n if (invalidData == 0) {\r\n var data = {\r\n eSpectraTeamName: $scope.teamData.eSpectraTeamName,\r\n eSpectraTeamAffiliationName: $scope.teamData.eSpectraTeamAffiliationName,\r\n isTeamNameChanged: $scope.isTeamNameChanged,\r\n eSpectraTeamPartyID: $scope.teamData.eSpectraTeamPartyID,\r\n eSpectraTeamMember: eSpectraMembers\r\n };\r\n\r\n teamManagementService.saveAdminUpdatedTeamProfile(data).then(function (response) {\r\n if (response != null && response.data.message != undefined) {\r\n $scope.message = response.data.message;\r\n $scope.isError = true;\r\n $scope.isSuccess = false;\r\n $scope.isUpdateTeamName = false;\r\n progressBarService.hideProgressBar();\r\n }\r\n else {\r\n $scope.message = \"Data has been saved successfully.\";\r\n $scope.isError = false;\r\n $scope.isSuccess = true;\r\n $scope.isTeamNameChanged = false;\r\n $scope.isUpdateTeamName = false;\r\n $scope.removeTeamMemberEmailIds = \"\";\r\n\r\n angular.forEach(data.eSpectraMembers, function (value, key) {\r\n if (value.eSpectraTeamMemberEmail == $scope.adminID) {\r\n loginService.refreshToken();\r\n }\r\n });\r\n\r\n $scope.getTeamDetails();\r\n }\r\n });\r\n } else {\r\n progressBarService.hideProgressBar();\r\n }\r\n };\r\n\r\n $scope.checkValidEmail = function (event, index) {\r\n var count = 0, i, emailregx;\r\n emailregx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if ($(event.currentTarget).val() == $scope.adminID) {\r\n $scope.isDisabled = true;\r\n } else {\r\n $scope.isDisabled = false;\r\n }\r\n\r\n for (i = startIndex; i < $scope.teamMemberData.length; i++) {\r\n if ($scope.teamMemberData[i].eSpectraTeamMemberEmail != \"\" && $scope.teamMemberData[i].eSpectraTeamMemberEmail != undefined) {\r\n if (emailregx.test($scope.teamMemberData[i].eSpectraTeamMemberEmail)) {\r\n\r\n $('#memberEmail_' + i).removeClass('border-red');\r\n count = count + 1;\r\n }\r\n else {\r\n count = 0;\r\n $('#memberEmail_' + i).addClass('border-red');\r\n }\r\n } else if ($scope.teamMemberData[i].eSpectraTeamMemberEmail == undefined) {\r\n $('#memberEmail_' + i).addClass('border-red');\r\n }\r\n else if ($scope.teamMemberData[i].eSpectraTeamMemberName == \"\") {\r\n $('#memberEmail_' + i).removeClass('border-red');\r\n //count = count + 1;\r\n }\r\n }\r\n if (count > 0) {\r\n $scope.isDisabled = false;\r\n $scope.checkDuplicateEmailIDS();\r\n } else {\r\n if ($scope.teamMemberData.length >= 1) {\r\n $scope.isDisabled = true;\r\n }\r\n }\r\n }\r\n\r\n $scope.checkDuplicateEmailIDS = function () {\r\n for (var i = 0; i < $scope.teamMemberData.length; i++) {\r\n for (var x = i + 1; x < $scope.teamMemberData.length; x++) {\r\n if ($scope.teamMemberData[i].eSpectraTeamMemberEmail != \"\" && ($scope.teamMemberData[i].eSpectraTeamMemberEmail == $scope.teamMemberData[x].eSpectraTeamMemberEmail && $scope.teamMemberData[i].eSpectraSubAssignStatus.toLowerCase() != 'inactive')) {\r\n $scope.isDisabled = true;\r\n return false;\r\n }\r\n else {\r\n $scope.isDisabled = false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $scope.isSearchUsers = false;\r\n $scope.removeTeamMemberEmailIds = '';\r\n $scope.isTeamNameChanged = false;\r\n $scope.isUpdateTeamName = false;\r\n $scope.isDisabled = false;\r\n $scope.adminID = getLocalValue(\"emailId\");\r\n $scope.noLicensesToRenew = 0;\r\n\r\n $scope.showNextUserDetailsPage = function () {\r\n $scope.userDetailscurrentPage = $scope.userDetailscurrentPage + 1;\r\n }\r\n\r\n $scope.changeTeamName = function () {\r\n $scope.isUpdateTeamName = true;\r\n }\r\n\r\n $scope.cancelUpdateTeamName = function () {\r\n $scope.isUpdateTeamName = false;\r\n }\r\n\r\n $scope.renewChk = function () {\r\n var quantity = $('input.renew[type=\"checkbox\"]:checked').length;\r\n\r\n if (quantity > 0) {\r\n $scope.noLicensesToRenew = quantity;\r\n } else {\r\n $scope.noLicensesToRenew = 0;\r\n }\r\n };\r\n\r\n $scope.renewLicenses = function () {\r\n var cost = $scope.teamData.costForOneMember;\r\n var quantity = 0;\r\n angular.forEach($scope.teamMemberData, function (value, key) {\r\n if (value.isRenew == true) {\r\n quantity++;\r\n }\r\n });\r\n if (quantity > 0) {\r\n $scope.noLicensesToRenew = quantity;\r\n $scope.costToRenewLicenses = cost * quantity;\r\n $('#renewLicensesModal').modal('show');\r\n }\r\n }\r\n\r\n $scope.addUser = function () {\r\n $location.path('/accessOption/team');\r\n setLocalValue(\"teamPartyID\", $scope.teamData.eSpectraTeamPartyID);\r\n }\r\n\r\n }]);\r\n})();","(function () {\r\n 'use strict';\r\n app.service('teamManagementService', ['$http', '$q', '$rootScope',\r\n function ($http, $q, $rootScope) {\r\n var serviceBase = $rootScope.buildConfig.aippsssApiBaseUrl;\r\n var deferred;\r\n\r\n this.getTeamDetailsByUserID = function () {\r\n deferred = $q.defer();\r\n\r\n $http.get(serviceBase + \"api/team/teamByUserID\")\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getTeamMemberData = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/team/teamMembers\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.getTeamMemberDataReport = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/team/teamMemberReport\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.saveAdminUpdatedTeamProfile = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/team/updateTeamProfile\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n this.saveIndividualTeam = function (data) {\r\n deferred = $q.defer();\r\n\r\n $http.post(serviceBase + \"api/team/team\", data)\r\n .then(function (response) {\r\n deferred.resolve(response);\r\n })\r\n .catch(function (err) {\r\n deferred.resolve(err);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n }\r\n ]);\r\n})();","(function () {\r\n 'use strict'\r\n\r\n app.controller('cancelUpdateCCController', ['$scope', '$location', '$cookies', function ($scope, $location, $cookies) {\r\n if ($cookies.get('TokenInfo') == undefined || $cookies.get('updatecc') == undefined) {\r\n $cookies.remove('updatecc', { path: '/' });\r\n $location.path('/login');\r\n return;\r\n }\r\n\r\n\r\n\r\n }]);\r\n\r\n})();","var datapoint1Peakinfo = {\r\n \"PeakInfo\": [\r\n {\r\n \"xval\": 533.5,\r\n \"yval\": 157753.33,\r\n \"lbltext\": \"0 1S\"\r\n },\r\n {\r\n \"xval\": 286,\r\n \"yval\": 37744.80,\r\n \"lbltext\": \"C 1s\"\r\n },\r\n {\r\n \"xval\": 401,\r\n \"yval\": 20934.13,\r\n \"lbltext\": \"N 1s\"\r\n },\r\n {\r\n \"xval\": 151.5,\r\n \"yval\": 59975.04,\r\n \"lbltext\": \"Si 2s\"\r\n },\r\n {\r\n \"xval\": 980,\r\n \"yval\": 33502.92,\r\n \"lbltext\": \"O KLL\"\r\n },\r\n {\r\n \"xval\": 100,\r\n \"yval\": 66897.22,\r\n \"lbltext\": \"Si 2p\"\r\n }\r\n]\r\n};\r\n\r\nvar datapoint1 = { \"label\": \"Si (100) survey\", \"data\": [[1350,6501.43],[1349.5,6467.3],[1349,6470.94],[1348.5,6444.97],[1348,6430.12],[1347.5,6354.31],[1347,6389.9],[1346.5,6496.86],[1346,6556.1],[1345.5,6464.98],[1345,6397.32],[1344.5,6480.95],[1344,6558.29],[1343.5,6567.3],[1343,6503.28],[1342.5,6541.19],[1342,6575.05],[1341.5,6539.53],[1341,6476.91],[1340.5,6555.57],[1340,6630.26],[1339.5,6623.5],[1339,6649.81],[1338.5,6671.88],[1338,6573.33],[1337.5,6535.62],[1337,6517.6],[1336.5,6611.3],[1336,6664.92],[1335.5,6724.89],[1335,6631.72],[1334.5,6563.39],[1334,6567.63],[1333.5,6603.75],[1333,6666.64],[1332.5,6633.44],[1332,6704.41],[1331.5,6664.98],[1331,6708.06],[1330.5,6660.28],[1330,6670.75],[1329.5,6534.96],[1329,6540.06],[1328.5,6543.31],[1328,6556.83],[1327.5,6569.75],[1327,6562.53],[1326.5,6718],[1326,6820.39],[1325.5,6837.35],[1325,6660.21],[1324.5,6663.13],[1324,6723.37],[1323.5,6776.65],[1323,6865.98],[1322.5,6872.61],[1322,6793.81],[1321.5,6780.62],[1321,6813.69],[1320.5,6843.58],[1320,6914.36],[1319.5,6986.92],[1319,6903.95],[1318.5,6758.62],[1318,6844.91],[1317.5,6946.7],[1317,7052.73],[1316.5,7050.61],[1316,6997.53],[1315.5,6861.87],[1315,6951.2],[1314.5,7141.27],[1314,7117.01],[1313.5,6945.7],[1313,6936.03],[1312.5,7020.39],[1312,6994.21],[1311.5,6877.51],[1311,6917.54],[1310.5,7081.23],[1310,7191.17],[1309.5,7182.09],[1309,7069.23],[1308.5,6979.5],[1308,7037.29],[1307.5,7236.7],[1307,7290.18],[1306.5,7222.31],[1306,7153],[1305.5,7188.25],[1305,7260.55],[1304.5,7221.72],[1304,7262.47],[1303.5,7292.16],[1303,7286.13],[1302.5,7134.51],[1302,7176.19],[1301.5,7345.31],[1301,7430.47],[1300.5,7421.46],[1300,7269.43],[1299.5,7309.46],[1299,7194.22],[1298.5,7082.49],[1298,7063.33],[1297.5,7229.14],[1297,7339.48],[1296.5,7379.31],[1296,7358.57],[1295.5,7388.19],[1295,7466.52],[1294.5,7438.82],[1294,7300.25],[1293.5,7275.73],[1293,7281.96],[1292.5,7281.16],[1292,7300.12],[1291.5,7332.72],[1291,7278.71],[1290.5,7322.58],[1290,7371.56],[1289.5,7371.95],[1289,7316.55],[1288.5,7380.04],[1288,7482.49],[1287.5,7526.76],[1287,7501.31],[1286.5,7319.8],[1286,7241.27],[1285.5,7335.04],[1285,7538.16],[1284.5,7610.79],[1284,7553.14],[1283.5,7539.42],[1283,7476.26],[1282.5,7449.49],[1282,7386.66],[1281.5,7311.85],[1281,7301.51],[1280.5,7372.42],[1280,7434.84],[1279.5,7327.49],[1279,7298.26],[1278.5,7358.5],[1278,7359.49],[1277.5,7263.14],[1277,7315.16],[1276.5,7476.66],[1276,7558.04],[1275.5,7509.79],[1275,7493.82],[1274.5,7388.06],[1274,7311.32],[1273.5,7365.39],[1273,7451.87],[1272.5,7353.93],[1272,7285.87],[1271.5,7505.49],[1271,7675.07],[1270.5,7683.69],[1270,7513.44],[1269.5,7487.79],[1269,7571.62],[1268.5,7681.04],[1268,7584.28],[1267.5,7491.97],[1267,7409.73],[1266.5,7484.28],[1266,7555.65],[1265.5,7772.03],[1265,7685.94],[1264.5,7683.22],[1264,7708.14],[1263.5,7761.55],[1263,7634.98],[1262.5,7661.16],[1262,7722.12],[1261.5,7755.26],[1261,7618.35],[1260.5,7744.32],[1260,7839.09],[1259.5,7997.41],[1259,7922.39],[1258.5,7914.51],[1258,7814.24],[1257.5,7777.19],[1257,7779.51],[1256.5,7821.07],[1256,7870.5],[1255.5,7951.62],[1255,8080.51],[1254.5,8064.87],[1254,8065.8],[1253.5,7984.35],[1253,8032.14],[1252.5,8115.04],[1252,8265.54],[1251.5,8269.91],[1251,8292.11],[1250.5,8271.7],[1250,8238.77],[1249.5,8303.58],[1249,8389.73],[1248.5,8357.52],[1248,8413.32],[1247.5,8439.03],[1247,8478.8],[1246.5,8451.36],[1246,8501.46],[1245.5,8414.98],[1245,8574.09],[1244.5,8658.72],[1244,8750.17],[1243.5,8777.81],[1243,8930.56],[1242.5,8936.52],[1242,8809.55],[1241.5,8711.54],[1241,8778.93],[1240.5,8909.15],[1240,8967.87],[1239.5,8901.53],[1239,8834.6],[1238.5,8792.85],[1238,8845.6],[1237.5,8834.14],[1237,9018.57],[1236.5,8952.23],[1236,8996.37],[1235.5,8841.62],[1235,8953.02],[1234.5,9067.14],[1234,9296.04],[1233.5,9438.78],[1233,9493.26],[1232.5,9682.99],[1232,9765.3],[1231.5,9858.47],[1231,9921.76],[1230.5,10023.82],[1230,10129.38],[1229.5,10218.12],[1229,10217.99],[1228.5,10190.88],[1228,10193.34],[1227.5,10227.66],[1227,10326.6],[1226.5,10368.95],[1226,10218.06],[1225.5,10062.32],[1225,10111.76],[1224.5,10064.31],[1224,9925.94],[1223.5,9750.72],[1223,9733.36],[1222.5,9566.29],[1222,9447.47],[1221.5,9346.67],[1221,9436.47],[1220.5,9241.04],[1220,8983.31],[1219.5,8812.33],[1219,8885.03],[1218.5,8720.28],[1218,8516.7],[1217.5,8431.74],[1217,8495.83],[1216.5,8370.91],[1216,8115.9],[1215.5,7916.23],[1215,7898.8],[1214.5,7760.56],[1214,7662.28],[1213.5,7621.26],[1213,7640.21],[1212.5,7505.69],[1212,7472.09],[1211.5,7626.63],[1211,7659.96],[1210.5,7577.92],[1210,7683.22],[1209.5,7708.34],[1209,7584.08],[1208.5,7467.98],[1208,7611.32],[1207.5,7484.48],[1207,7370.3],[1206.5,7335.04],[1206,7419.27],[1205.5,7414.63],[1205,7316.02],[1204.5,7273.67],[1204,7399.99],[1203.5,7561.09],[1203,7481.56],[1202.5,7443.46],[1202,7427.95],[1201.5,7452.8],[1201,7417.35],[1200.5,7423.05],[1200,7468.11],[1199.5,7592.17],[1199,7656.72],[1198.5,7607.54],[1198,7568.38],[1197.5,7584.75],[1197,7576.13],[1196.5,7629.94],[1196,7684.81],[1195.5,7661.95],[1195,7558.57],[1194.5,7597.14],[1194,7753.01],[1193.5,7744.39],[1193,7649.29],[1192.5,7628.75],[1192,7730.14],[1191.5,7763.54],[1191,7657.38],[1190.5,7610.33],[1190,7587.93],[1189.5,7605.49],[1189,7589.45],[1188.5,7657.51],[1188,7786.14],[1187.5,7753.4],[1187,7788.26],[1186.5,7634.78],[1186,7618.54],[1185.5,7616.56],[1185,7760.36],[1184.5,7762.55],[1184,7706.42],[1183.5,7821.6],[1183,7919.08],[1182.5,7961.16],[1182,7946.91],[1181.5,7996.95],[1181,7992.37],[1180.5,7873.22],[1180,7808.14],[1179.5,7728.42],[1179,7778.52],[1178.5,7845.65],[1178,7914.7],[1177.5,7865.27],[1177,7795.09],[1176.5,7779.65],[1176,7904.96],[1175.5,8081.44],[1175,8047.51],[1174.5,8037.24],[1174,8081.51],[1173.5,8195.96],[1173,8117.76],[1172.5,8125.44],[1172,8147.38],[1171.5,8126.24],[1171,8115.5],[1170.5,8067.46],[1170,8005.43],[1169.5,7942.94],[1169,8079.32],[1168.5,8189.73],[1168,8176.27],[1167.5,8226.44],[1167,8224.52],[1166.5,8171.9],[1166,8024.25],[1165.5,7977.79],[1165,8087.21],[1164.5,8197.02],[1164,8243.8],[1163.5,8165.34],[1163,8154.8],[1162.5,8031.67],[1162,7954.47],[1161.5,8018.09],[1161,8288.93],[1160.5,8450.43],[1160,8328.63],[1159.5,8262.76],[1159,8348.38],[1158.5,8363.29],[1158,8249.04],[1157.5,8335.72],[1157,8503.85],[1156.5,8508.02],[1156,8458.45],[1155.5,8406.5],[1155,8283.17],[1154.5,8249.57],[1154,8421.27],[1153.5,8617.1],[1153,8616.51],[1152.5,8570.05],[1152,8516.37],[1151.5,8524.06],[1151,8400.53],[1150.5,8375.88],[1150,8298.48],[1149.5,8473.56],[1149,8571.71],[1148.5,8762.96],[1148,8785.1],[1147.5,8714.85],[1147,8665.02],[1146.5,8657.73],[1146,8589.6],[1145.5,8603.52],[1145,8682.58],[1144.5,8806.04],[1144,8756.93],[1143.5,8828.77],[1143,8743.15],[1142.5,8696.63],[1142,8641.36],[1141.5,8730.62],[1141,8729.43],[1140.5,8745.2],[1140,8824.53],[1139.5,8934.47],[1139,8987.95],[1138.5,8992.79],[1138,8930.76],[1137.5,8715.31],[1137,8780.79],[1136.5,8872.04],[1136,9026.92],[1135.5,8970.06],[1135,9023.14],[1134.5,8986.23],[1134,8984.77],[1133.5,8984.37],[1133,9117.97],[1132.5,9166.61],[1132,9002.73],[1131.5,8827.58],[1131,8914.12],[1130.5,9009.75],[1130,9045.67],[1129.5,9163.56],[1129,9254.09],[1128.5,9216.85],[1128,9136.86],[1127.5,9141.63],[1127,9243.62],[1126.5,9320.29],[1126,9405.85],[1125.5,9325.13],[1125,9297.17],[1124.5,9362.71],[1124,9402.34],[1123.5,9369.6],[1123,9318.9],[1122.5,9449.65],[1122,9473.11],[1121.5,9432.16],[1121,9396.24],[1120.5,9399.75],[1120,9473.64],[1119.5,9543.36],[1119,9547.87],[1118.5,9500.42],[1118,9532.76],[1117.5,9578.15],[1117,9568.74],[1116.5,9637.13],[1116,9658.14],[1115.5,9670.8],[1115,9711.42],[1114.5,9766.23],[1114,9763.51],[1113.5,9773.98],[1113,9821.69],[1112.5,9786.97],[1112,9759.2],[1111.5,9733.09],[1111,9765.7],[1110.5,9751.71],[1110,9779.41],[1109.5,9979.22],[1109,10101.88],[1108.5,10027.53],[1108,9780.27],[1107.5,9767.09],[1107,9877.49],[1106.5,10050.19],[1106,10083.99],[1105.5,10167.76],[1105,10144.83],[1104.5,10004.47],[1104,9866.23],[1103.5,9955.56],[1103,10085.32],[1102.5,10108.64],[1102,10019.25],[1101.5,10037.34],[1101,10108.05],[1100.5,10112.22],[1100,10095.65],[1099.5,10221.17],[1099,10244.56],[1098.5,10186.31],[1098,10115.67],[1097.5,10081.01],[1097,10045.88],[1096.5,10105.06],[1096,10185.91],[1095.5,10291.42],[1095,10452.32],[1094.5,10503.02],[1094,10511.1],[1093.5,10435.82],[1093,10396.45],[1092.5,10567.63],[1092,10625.62],[1091.5,10613.02],[1091,10520.05],[1090.5,10544.63],[1090,10441.12],[1089.5,10454.64],[1089,10647.88],[1088.5,10818.86],[1088,10762.86],[1087.5,10701.03],[1087,10713.49],[1086.5,10634.89],[1086,10601.76],[1085.5,10759.95],[1085,10908.06],[1084.5,10737.41],[1084,10762.8],[1083.5,10977.18],[1083,11117.14],[1082.5,11124.56],[1082,11203.36],[1081.5,11201.9],[1081,11061.08],[1080.5,10916.94],[1080,10985.6],[1079.5,11102.3],[1079,11380.96],[1078.5,11443.85],[1078,11401.18],[1077.5,11240.8],[1077,11289.91],[1076.5,11434.04],[1076,11534.24],[1075.5,11527.68],[1075,11436.17],[1074.5,11557.84],[1074,11619.54],[1073.5,11566.52],[1073,11525.9],[1072.5,11651.08],[1072,11823.85],[1071.5,11812.51],[1071,11850.49],[1070.5,11789.65],[1070,11691.37],[1069.5,11569.44],[1069,11667.32],[1068.5,11941.61],[1068,12020.07],[1067.5,12026.04],[1067,11933.72],[1066.5,11955.13],[1066,12074.61],[1065.5,12194.16],[1065,12157.25],[1064.5,12247.38],[1064,12383.1],[1063.5,12373.42],[1063,12299.53],[1062.5,12463.82],[1062,12375.08],[1061.5,12349.17],[1061,12270.84],[1060.5,12262.09],[1060,12298.21],[1059.5,12434.39],[1059,12557.99],[1058.5,12671.9],[1058,12843.74],[1057.5,12841.62],[1057,12779.4],[1056.5,12821.48],[1056,12862.63],[1055.5,12991.19],[1055,13049.44],[1054.5,13218.7],[1054,13137.05],[1053.5,13057.46],[1053,13044.61],[1052.5,13147.99],[1052,13216.31],[1051.5,13138.05],[1051,13173.04],[1050.5,13201],[1050,13360.38],[1049.5,13535.34],[1049,13543.82],[1048.5,13534.68],[1048,13441.3],[1047.5,13624.67],[1047,13730.9],[1046.5,13907.18],[1046,13944.69],[1045.5,14088.76],[1045,14064.64],[1044.5,14107.12],[1044,14188.5],[1043.5,14223.09],[1043,14215.73],[1042.5,14248.2],[1042,14356.56],[1041.5,14492.94],[1041,14604.41],[1040.5,14610.5],[1040,14574.92],[1039.5,14685.65],[1039,14679.42],[1038.5,14573.46],[1038,14477.04],[1037.5,14690.82],[1037,15104.68],[1036.5,15126.68],[1036,15087.45],[1035.5,15133.31],[1035,15353.33],[1034.5,15452.53],[1034,15717.88],[1033.5,15772.68],[1033,15723.44],[1032.5,15532.12],[1032,15444.31],[1031.5,15479.84],[1031,15819],[1030.5,16035.58],[1030,16142.67],[1029.5,16148.96],[1029,16186.67],[1028.5,16152.28],[1028,16223.58],[1027.5,16256.06],[1027,16304.04],[1026.5,16540.95],[1026,16696.29],[1025.5,16793.84],[1025,16787.21],[1024.5,17101],[1024,17331.75],[1023.5,17464.36],[1023,17555.55],[1022.5,17610.95],[1022,17650.58],[1021.5,17534.27],[1021,17675.83],[1020.5,17996.31],[1020,18231.77],[1019.5,18377.03],[1019,18554.24],[1018.5,18836.48],[1018,19071.54],[1017.5,19274.46],[1017,19281.15],[1016.5,19119.39],[1016,18956.36],[1015.5,18786.32],[1015,18532.96],[1014.5,18494.46],[1014,18662.12],[1013.5,18607.72],[1013,18361.59],[1012.5,18208.24],[1012,18339.79],[1011.5,18416.86],[1011,18483.13],[1010.5,18590.02],[1010,18773.72],[1009.5,19018.39],[1009,19189.57],[1008.5,19410.18],[1008,19604.82],[1007.5,19872.22],[1007,20278.12],[1006.5,20817.03],[1006,21244.47],[1005.5,21312.93],[1005,21361.57],[1004.5,21804.59],[1004,22453.77],[1003.5,22772.4],[1003,22998.97],[1002.5,23470.75],[1002,23902.83],[1001.5,24044.52],[1001,24199.06],[1000.5,24225.57],[1000,23714.76],[999.5,22910.97],[999,22219.04],[998.5,21698.82],[998,21563.7],[997.5,21413.06],[997,21071.11],[996.5,20703.58],[996,20960.64],[995.5,21061.3],[995,20681.18],[994.5,20273.68],[994,19995.41],[993.5,19624.63],[993,19148.62],[992.5,19019.26],[992,18941.85],[991.5,18802.15],[991,18807.46],[990.5,19113.03],[990,19540.87],[989.5,19899.19],[989,20230.87],[988.5,20361.09],[988,20141.34],[987.5,19788.25],[987,19699.92],[986.5,19975.4],[986,20670.18],[985.5,21713],[985,23116.8],[984.5,24737.57],[984,26236.73],[983.5,27036.61],[983,27740.53],[982.5,28593.36],[982,29820.49],[981.5,31304.01],[981,32917.16],[980.5,34311.02],[980,35057.09],[979.5,34878.82],[979,33502.92],[978.5,31576.05],[978,29598.75],[977.5,27649.74],[977,25878.87],[976.5,24280.04],[976,23262.66],[975.5,22368.22],[975,21381.32],[974.5,20347.64],[974,19342.85],[973.5,18327.59],[973,17608.3],[972.5,17092.25],[972,16365.67],[971.5,15420.92],[971,14687.91],[970.5,13857.34],[970,13238.58],[969.5,12583.83],[969,11884.02],[968.5,11123.97],[968,10605.87],[967.5,10230.84],[967,9955.36],[966.5,9811.69],[966,9686.57],[965.5,9508.7],[965,9358.53],[964.5,9206.18],[964,9184.31],[963.5,9286.3],[963,9446.27],[962.5,9425.53],[962,9293.72],[961.5,9221.75],[961,9306.24],[960.5,9306.31],[960,9274.77],[959.5,9267.74],[959,9251.37],[958.5,9237.46],[958,9298.56],[957.5,9247],[957,9225.99],[956.5,9195.24],[956,9098.16],[955.5,9072.78],[955,9115.59],[954.5,9211.15],[954,9136.13],[953.5,9178.74],[953,8936.26],[952.5,8952.49],[952,8992.72],[951.5,9131.56],[951,9157.53],[950.5,9180.6],[950,9250.84],[949.5,9203.79],[949,9303.66],[948.5,9278.88],[948,9359.86],[947.5,9187.89],[947,9277.22],[946.5,9250.31],[946,9155.15],[945.5,9076.35],[945,9231.89],[944.5,9464.03],[944,9526],[943.5,9532.03],[943,9501.28],[942.5,9569.47],[942,9523.01],[941.5,9531.96],[941,9637.73],[940.5,9691.67],[940,9507.84],[939.5,9285.1],[939,9391.2],[938.5,9700.42],[938,9755.03],[937.5,9443.95],[937,9375.36],[936.5,9588.03],[936,9689.68],[935.5,9573.51],[935,9584.84],[934.5,9678.68],[934,9675.57],[933.5,9613.41],[933,9565.23],[932.5,9544.35],[932,9551.58],[931.5,9635.54],[931,9660.06],[930.5,9777.69],[930,9766.76],[929.5,9813.08],[929,9621.76],[928.5,9673.38],[928,9721.82],[927.5,9884.58],[927,9825.54],[926.5,9802.67],[926,9846.61],[925.5,9818.71],[925,9761.52],[924.5,9800.09],[924,10025.41],[923.5,10104.53],[923,9986.9],[922.5,9918.38],[922,9992.21],[921.5,9855.23],[921,9670.07],[920.5,9654.83],[920,9959.34],[919.5,9837.07],[919,9718.38],[918.5,9901.02],[918,10137.93],[917.5,10132.43],[917,10057.62],[916.5,10227.6],[916,10166.5],[915.5,10145.82],[915,10111.89],[914.5,10081.08],[914,10089.62],[913.5,10066.96],[913,10091.35],[912.5,10089.89],[912,10304.67],[911.5,10331.24],[911,10105.73],[910.5,9881.4],[910,9990.48],[909.5,10132.3],[909,10087.57],[908.5,10001.09],[908,10052.58],[907.5,10194.46],[907,10332.9],[906.5,10260.86],[906,10194],[905.5,10251.79],[905,10322.23],[904.5,10281.81],[904,10212.75],[903.5,10246.09],[903,10298.77],[902.5,10420.58],[902,10489.96],[901.5,10489.36],[901,10520.05],[900.5,10460.34],[900,10399.83],[899.5,10354.7],[899,10394.93],[898.5,10382.74],[898,10335.22],[897.5,10268.82],[897,10337.54],[896.5,10440.06],[896,10430.32],[895.5,10348.08],[895,10388.83],[894.5,10412.96],[894,10409.64],[893.5,10486.58],[893,10659.68],[892.5,10647.48],[892,10568.42],[891.5,10558.02],[891,10674.26],[890.5,10522.5],[890,10493.41],[889.5,10507.39],[889,10620.58],[888.5,10641.26],[888,10715.21],[887.5,10778.57],[887,10767.83],[886.5,10843.51],[886,10768.03],[885.5,10764.12],[885,10798.91],[884.5,10896.53],[884,10794.54],[883.5,10733.3],[883,10826.48],[882.5,10912.24],[882,10988.78],[881.5,10962],[881,11066.58],[880.5,11059.35],[880,10965.91],[879.5,10802.16],[879,10892.29],[878.5,11092.22],[878,11115.95],[877.5,10972.34],[877,10925.62],[876.5,10928.14],[876,10922.9],[875.5,10840.99],[875,10784.07],[874.5,10880.76],[874,11009.45],[873.5,11216.28],[873,11111.97],[872.5,10943.51],[872,10812.36],[871.5,10994.14],[871,11137.35],[870.5,11122.97],[870,11073.8],[869.5,11045.77],[869,11109.92],[868.5,11255.58],[868,11316.61],[867.5,11081.75],[867,10992.75],[866.5,11222.64],[866,11294.02],[865.5,11279.17],[865,11222.31],[864.5,11348.49],[864,11450.48],[863.5,11628.75],[863,11541.73],[862.5,11444.65],[862,11344.38],[861.5,11382.16],[861,11477.12],[860.5,11617.35],[860,11623.98],[859.5,11505.75],[859,11386.2],[858.5,11410.78],[858,11502.97],[857.5,11673.81],[857,11639.75],[856.5,11766.52],[856,11638.36],[855.5,11531],[855,11508.07],[854.5,11568.64],[854,11533.85],[853.5,11369.76],[853,11347.63],[852.5,11388.19],[852,11561.28],[851.5,11662.15],[851,11724.44],[850.5,11840.61],[850,11806.22],[849.5,11550.48],[849,11416.75],[848.5,11344.32],[848,11329.74],[847.5,11410.45],[847,11712.25],[846.5,11724.31],[846,11605.35],[845.5,11522.45],[845,11517.02],[844.5,11454.66],[844,11470.63],[843.5,11725.04],[843,11834.65],[842.5,11793.49],[842,11602.64],[841.5,11700.19],[841,11723.25],[840.5,11680.3],[840,11746.71],[839.5,11959.5],[839,12012.92],[838.5,11860.23],[838,11820.66],[837.5,11806.55],[837,11966.06],[836.5,11917.48],[836,11845.58],[835.5,12031.54],[835,12295.89],[834.5,12410.34],[834,12379.26],[833.5,12382.5],[833,12447.78],[832.5,12613.98],[832,12584.82],[831.5,12360.24],[831,12246.85],[830.5,12181.31],[830,12101.25],[829.5,12191.64],[829,12238.76],[828.5,12242.87],[828,12139.95],[827.5,12071.3],[827,11946.25],[826.5,12162.16],[826,12266.6],[825.5,12150.69],[825,11890.12],[824.5,12005.89],[824,12223.59],[823.5,12240.62],[823,12023.12],[822.5,11764.53],[822,11782.23],[821.5,12054.73],[821,12223.06],[820.5,12201.52],[820,12148.3],[819.5,12249.63],[819,12240.16],[818.5,12353.21],[818,12370.51],[817.5,12327.17],[817,12098.14],[816.5,12127.69],[816,12219.21],[815.5,12221.73],[815,12247.25],[814.5,12261.1],[814,12259.9],[813.5,12141.35],[813,12225.24],[812.5,12275.61],[812,12357.45],[811.5,12292.18],[811,12348.64],[810.5,12367.26],[810,12409.74],[809.5,12322],[809,12454.27],[808.5,12496.42],[808,12421.2],[807.5,12296.02],[807,12435.06],[806.5,12666.8],[806,12766.41],[805.5,12581.91],[805,12470.77],[804.5,12552.82],[804,12554.74],[803.5,12441.88],[803,12476.41],[802.5,12701.66],[802,12674.49],[801.5,12684.56],[801,12541.09],[800.5,12439.83],[800,12324.58],[799.5,12503.31],[799,12647.25],[798.5,12683.7],[798,12530.28],[797.5,12530.42],[797,12638.17],[796.5,12576.54],[796,12451.89],[795.5,12527.37],[795,12778.47],[794.5,12859.98],[794,12726.98],[793.5,12639.03],[793,12665.34],[792.5,12760.11],[792,12589.66],[791.5,12579.66],[791,12648.38],[790.5,12753.02],[790,12815.98],[789.5,12950.3],[789,13021.02],[788.5,12927.31],[788,12813.79],[787.5,12773.3],[787,12779.66],[786.5,12890.99],[786,13090.4],[785.5,13176.02],[785,13084.7],[784.5,12918.76],[784,12813.52],[783.5,12876.02],[783,13044.14],[782.5,13166.74],[782,13061.51],[781.5,13157.47],[781,13215.32],[780.5,13358.2],[780,13184.04],[779.5,13092.39],[779,13151.9],[778.5,13268.6],[778,13273.64],[777.5,13204.72],[777,13251.77],[776.5,13211.94],[776,13190],[775.5,13330.16],[775,13514.46],[774.5,13605.78],[774,13406.04],[773.5,13338.58],[773,13262.44],[772.5,13315.45],[772,13410.29],[771.5,13628.91],[771,13581.46],[770.5,13562.71],[770,13539.05],[769.5,13634.08],[769,13611.95],[768.5,13692.93],[768,13514.6],[767.5,13561.58],[767,13548.33],[766.5,13627.19],[766,13683.92],[765.5,13703.33],[765,13548.52],[764.5,13466.28],[764,13768.61],[763.5,13763.18],[763,13696.7],[762.5,13653.63],[762,13733.48],[761.5,13710.36],[761,13702.47],[760.5,13768.28],[760,13722.82],[759.5,13841.5],[759,13892.53],[758.5,13819.5],[758,13689.02],[757.5,13958.54],[757,14098.3],[756.5,13925],[756,13771.39],[755.5,13723.68],[755,13800.22],[754.5,13953.24],[754,14131.9],[753.5,13990.75],[753,14000.82],[752.5,14043.76],[752,14015.53],[751.5,13887.56],[751,13995.12],[750.5,14068.81],[750,14024.34],[749.5,13982.59],[749,14014.47],[748.5,13967.95],[748,14061.72],[747.5,14173.92],[747,14281.14],[746.5,14006.25],[746,14021.83],[745.5,14053.7],[745,14225.47],[744.5,14160.53],[744,14218.38],[743.5,14201.15],[743,14276.3],[742.5,14438],[742,14467.82],[741.5,14354.64],[741,14393.87],[740.5,14512.03],[740,14517.86],[739.5,14260.73],[739,14128.98],[738.5,14325.08],[738,14582.07],[737.5,14661.66],[737,14519.12],[736.5,14555.63],[736,14521.11],[735.5,14523.42],[735,14403.94],[734.5,14555.5],[734,14679.03],[733.5,14659.34],[733,14498.51],[732.5,14516.27],[732,14609.31],[731.5,14692.48],[731,14888.04],[730.5,14817.4],[730,14500.96],[729.5,14442.97],[729,14607.52],[728.5,14649.34],[728,14635.09],[727.5,14859.68],[727,14871.94],[726.5,14905.27],[726,14872.74],[725.5,14814.09],[725,14776.11],[724.5,14953.65],[724,14924.76],[723.5,14822.7],[723,14822.1],[722.5,15044.24],[722,15180.29],[721.5,15130.52],[721,14991.29],[720.5,15056.04],[720,15134.63],[719.5,15257.63],[719,15274.26],[718.5,15265.19],[718,15217.8],[717.5,15297.92],[717,15244.97],[716.5,15196.73],[716,15280.43],[715.5,15323.37],[715,15244.44],[714.5,15145.5],[714,15159.35],[713.5,15258.1],[713,15487.39],[712.5,15522.31],[712,15693.42],[711.5,15755.58],[711,15676.39],[710.5,15351.67],[710,15349.61],[709.5,15391.03],[709,15531.39],[708.5,15516.81],[708,15578.11],[707.5,15659.23],[707,15658.76],[706.5,15507.01],[706,15463.73],[705.5,15499.65],[705,15397.73],[704.5,15450.48],[704,15544.52],[703.5,15675.2],[703,15533.98],[702.5,15517.21],[702,15603.3],[701.5,15825.5],[701,15877.39],[700.5,15827.49],[700,15716.02],[699.5,15623.18],[699,15627.55],[698.5,15734.05],[698,15846.11],[697.5,15891.11],[697,15769.37],[696.5,15862.08],[696,15909],[695.5,15896.08],[695,15745.18],[694.5,15893.76],[694,15986.01],[693.5,15998.2],[693,15934.38],[692.5,15824.97],[692,15861.29],[691.5,15911.39],[691,16082.3],[690.5,16217.75],[690,16384.49],[689.5,16303.57],[689,16267.99],[688.5,16691.05],[688,17484.5],[687.5,18060.59],[687,18176.17],[686.5,17851.84],[686,17299.28],[685.5,16857.32],[685,16536.11],[684.5,16337.44],[684,16327.96],[683.5,16318.75],[683,16341.21],[682.5,16349.43],[682,16407.55],[681.5,16487.74],[681,16517.1],[680.5,16511.13],[680,16234.52],[679.5,16356.32],[679,16527.23],[678.5,16691.92],[678,16534.86],[677.5,16503.78],[677,16614.18],[676.5,16589.4],[676,16523.19],[675.5,16324.91],[675,16285.02],[674.5,16534.66],[674,16728.5],[673.5,16761.1],[673,16685.29],[672.5,16784.89],[672,16832.21],[671.5,16824.39],[671,16867.07],[670.5,16902.19],[670,16964.62],[669.5,16949.44],[669,16861.24],[668.5,16903.91],[668,16984.9],[667.5,17099.41],[667,16954.74],[666.5,16871.11],[666,16894.9],[665.5,16979.79],[665,17089.14],[664.5,17420.49],[664,17403.06],[663.5,17100.4],[663,17002.52],[662.5,17151.23],[662,17202.66],[661.5,17180.46],[661,17077.28],[660.5,17122.21],[660,17129.56],[659.5,17320.95],[659,17421.68],[658.5,17618.7],[658,17365.82],[657.5,17335.53],[657,17558.4],[656.5,17626.92],[656,17455.08],[655.5,17511.48],[655,17516.45],[654.5,17467.41],[654,17520.82],[653.5,17773.24],[653,17747.6],[652.5,17524.47],[652,17577.55],[651.5,17785.64],[651,17934.48],[650.5,17820.1],[650,17880.47],[649.5,17919.17],[649,17882.92],[648.5,17918.64],[648,17882.52],[647.5,17992.33],[647,18001.08],[646.5,18059.33],[646,18047.74],[645.5,18049.39],[645,18067.95],[644.5,17968.41],[644,17960.06],[643.5,18059.2],[643,18169.14],[642.5,18241.84],[642,18227.92],[641.5,18397.24],[641,18523.42],[640.5,18676.44],[640,18595.59],[639.5,18522.29],[639,18540.52],[638.5,18643.24],[638,18588.96],[637.5,18621.7],[637,18600.96],[636.5,18628.79],[636,18627.13],[635.5,18886.85],[635,18844.04],[634.5,18784.39],[634,18812.56],[633.5,18864.65],[633,18765.71],[632.5,18617.46],[632,18749.74],[631.5,18928.73],[631,19314.36],[630.5,19369.16],[630,19232.18],[629.5,19163.26],[629,19180.76],[628.5,19285.13],[628,19025.42],[627.5,18906.93],[627,18996.19],[626.5,19496.07],[626,19576.19],[625.5,19327.54],[625,19135.56],[624.5,19167.9],[624,19320.12],[623.5,19439.8],[623,19592.03],[622.5,19635.5],[622,19680.43],[621.5,19723.24],[621,19837.43],[620.5,19758.17],[620,19653.39],[619.5,19688.72],[619,19871.95],[618.5,20030.94],[618,19934.38],[617.5,19885.74],[617,19770.76],[616.5,19941.93],[616,20047.04],[615.5,20076.53],[615,19807.54],[614.5,19658.23],[614,20023.58],[613.5,20384.55],[613,20523.12],[612.5,20264.93],[612,20199.13],[611.5,20061.68],[611,20250.88],[610.5,20505.69],[610,20737.44],[609.5,20780.65],[609,20837.97],[608.5,20867.2],[608,20796.82],[607.5,20669.18],[607,20735.39],[606.5,20655.66],[606,20848.84],[605.5,20852.09],[605,21211.74],[604.5,21252.96],[604,21472.31],[603.5,21431.88],[603,21196.63],[602.5,20896.69],[602,20926.31],[601.5,21067.46],[601,21117.83],[600.5,21236.26],[600,21465.09],[599.5,21447.72],[599,21422.47],[598.5,21528.9],[598,21546.86],[597.5,21658.33],[597,21642.03],[596.5,21770.72],[596,21771.32],[595.5,21817.78],[595,21931.96],[594.5,21930.04],[594,22022.62],[593.5,21953.1],[593,22060.59],[592.5,22139.72],[592,22265.76],[591.5,22470.74],[591,22552.71],[590.5,22548.74],[590,22546.55],[589.5,22511.03],[589,22513.94],[588.5,22714.68],[588,22837.34],[587.5,22729.85],[587,22711.76],[586.5,22879.75],[586,22883.13],[585.5,22861.66],[585,23051.46],[584.5,23117.53],[584,23102.49],[583.5,23040.19],[583,23131.71],[582.5,23281.75],[582,23272.94],[581.5,23190.96],[581,23158.68],[580.5,23378.57],[580,23490.1],[579.5,23471.28],[579,23257.1],[578.5,23269.95],[578,23371.94],[577.5,23482.41],[577,23662.8],[576.5,23960.62],[576,24100.25],[575.5,24008.73],[575,23963.67],[574.5,23860.22],[574,23793.82],[573.5,23787.46],[573,23913.7],[572.5,23837.16],[572,23910.58],[571.5,24092.17],[571,24281.3],[570.5,24192.76],[570,24138.55],[569.5,24148.43],[569,24194.88],[568.5,24097.93],[568,24099.45],[567.5,24210.86],[567,24335.64],[566.5,24290.05],[566,24083.48],[565.5,24231.4],[565,24608.94],[564.5,25045.59],[564,25285.82],[563.5,25594.11],[563,25916.71],[562.5,26144.95],[562,26337.73],[561.5,26762.92],[561,27301.96],[560.5,27601.17],[560,27681.49],[559.5,27808.26],[559,27907.4],[558.5,28003.36],[558,28216.22],[557.5,28684.88],[557,28655.99],[556.5,28682.56],[556,28870.7],[555.5,29428.7],[555,29321.08],[554.5,28719.01],[554,27943.12],[553.5,27242.58],[553,26968.16],[552.5,26665.57],[552,26393.33],[551.5,25996.57],[551,25698.29],[550.5,25297.75],[550,25166.4],[549.5,24902.58],[549,24738.1],[548.5,24677.26],[548,24551.15],[547.5,23843.19],[547,23507.93],[546.5,23353.92],[546,23007.59],[545.5,22548.54],[545,22340.12],[544.5,21894.78],[544,21381.78],[543.5,20869.32],[543,20636.18],[542.5,20180.11],[542,19755.72],[541.5,19212.17],[541,19082.54],[540.5,19055.24],[540,19046.09],[539.5,18930.59],[539,18902.88],[538.5,18968.43],[538,19218.73],[537.5,19850.94],[537,20740.56],[536.5,21900.08],[536,24093.42],[535.5,28946.58],[535,41397.61],[534.5,70643.27],[534,119502.69],[533.5,157753.33],[533,150011.06],[532.5,102346.95],[532,56172.59],[531.5,32650.02],[531,24317.42],[530.5,21141.56],[530,19557.17],[529.5,18713.95],[529,18116.06],[528.5,17776.09],[528,17567.61],[527.5,17556.01],[527,17164.89],[526.5,17000.47],[526,17047.79],[525.5,17259.25],[525,17093.11],[524.5,16959.25],[524,17006.83],[523.5,17176.81],[523,17060.91],[522.5,17103.25],[522,17176.35],[521.5,17279.6],[521,17051.36],[520.5,17042.75],[520,17019.36],[519.5,16997.88],[519,16936.72],[518.5,16867.13],[518,16784.43],[517.5,16824.26],[517,16905.77],[516.5,16919.29],[516,16938.84],[515.5,17040.3],[515,17000.07],[514.5,16831.41],[514,16813.45],[513.5,17004.71],[513,17106.7],[512.5,17143.81],[512,17193.91],[511.5,17213.92],[511,17147.32],[510.5,17266.34],[510,17260.05],[509.5,17240.17],[509,17149.64],[508.5,17180.13],[508,17101.07],[507.5,17134.53],[507,17199.61],[506.5,17271.51],[506,17373.7],[505.5,17397.76],[505,17270.25],[504.5,17146.86],[504,16974.36],[503.5,17047.26],[503,17101.86],[502.5,17242.55],[502,17191],[501.5,17171.98],[501,17484.97],[500.5,17495.31],[500,17438.78],[499.5,17238.38],[499,17373.17],[498.5,17402.53],[498,17522.08],[497.5,17674.44],[497,17649.98],[496.5,17590.6],[496,17456.34],[495.5,17433.48],[495,17564.96],[494.5,17631.62],[494,17628.97],[493.5,17509.29],[493,17521.29],[492.5,17569.73],[492,17622.35],[491.5,17676.42],[491,17821.09],[490.5,17772.98],[490,17662.44],[489.5,17501.07],[489,17685.17],[488.5,17817.64],[488,17937.53],[487.5,17711.55],[487,17488.61],[486.5,17552.43],[486,17789.48],[485.5,17863.17],[485,17805.45],[484.5,17754.29],[484,17737.52],[483.5,17681.06],[483,17746.8],[482.5,17725.86],[482,17821.09],[481.5,17646.34],[481,17642.03],[480.5,17734.54],[480,18030.57],[479.5,17934.15],[479,17776.69],[478.5,17747.27],[478,17744.42],[477.5,17955.49],[477,18112.61],[476.5,18207.84],[476,18102.61],[475.5,17894.39],[475,17917.25],[474.5,17935.54],[474,18183.32],[473.5,18006.91],[473,18053.5],[472.5,17854.89],[472,17860.32],[471.5,17812.01],[471,17931.96],[470.5,17972.98],[470,18046.14],[469.5,17895.84],[469,17979.54],[468.5,17986.44],[468,18095.52],[467.5,18032.36],[467,18042.04],[466.5,18031.96],[466,18157.48],[465.5,18300.75],[465,18335.15],[464.5,18288.43],[464,18286.11],[463.5,18214.87],[463,18378.62],[462.5,18441.45],[462,18454.1],[461.5,18269.81],[461,18306.52],[460.5,18292.34],[460,18360.13],[459.5,18318.12],[459,18460],[458.5,18537.27],[458,18390.68],[457.5,18302.74],[457,18293.53],[456.5,18385.98],[456,18342.5],[455.5,18319.58],[455,18282.6],[454.5,18240.18],[454,18425.47],[453.5,18455.3],[453,18330.58],[452.5,18220.1],[452,18434.62],[451.5,18730.19],[451,18755.7],[450.5,18598.31],[450,18684.06],[449.5,18656.03],[449,18638.07],[448.5,18772.53],[448,18838.01],[447.5,18797.78],[447,18572.33],[446.5,18669.75],[446,18525.14],[445.5,18633.96],[445,18732.24],[444.5,18821.9],[444,18679.02],[443.5,18510.83],[443,18577.3],[442.5,18720.84],[442,18864.85],[441.5,18817.99],[441,18729.06],[440.5,18583.2],[440,18608.71],[439.5,18631.24],[439,18737.14],[438.5,18644.56],[438,18723.96],[437.5,18821.57],[437,18919.85],[436.5,18810.44],[436,18811.63],[435.5,18757.22],[435,18617.19],[434.5,18700.03],[434,18968.49],[433.5,18988.04],[433,18858.81],[432.5,18957.42],[432,18990.23],[431.5,18851.53],[431,19018],[430.5,19224.03],[430,19060.87],[429.5,19066.9],[429,19175.19],[428.5,19291.16],[428,19114.49],[427.5,19182.15],[427,19107.66],[426.5,19204.41],[426,19093.48],[425.5,19171.08],[425,19191.29],[424.5,19262.33],[424,19193.21],[423.5,19232.25],[423,19279.76],[422.5,19364.99],[422,19310.18],[421.5,19034.1],[421,18947.55],[420.5,19099.97],[420,19328.14],[419.5,19174.13],[419,19145.57],[418.5,19144.44],[418,19240.86],[417.5,19229.2],[417,19397.26],[416.5,19704.42],[416,19800.25],[415.5,19717.08],[415,19637.03],[414.5,19494.08],[414,19482.08],[413.5,19503.95],[413,19504.68],[412.5,19533.51],[412,19614.43],[411.5,19537.16],[411,19272.47],[410.5,19503.49],[410,19627.42],[409.5,19486.92],[409,19177.04],[408.5,19349.54],[408,19476.39],[407.5,19675.46],[407,19780.04],[406.5,19829.14],[406,19724.04],[405.5,19840.81],[405,19810.52],[404.5,19777.05],[404,19505.68],[403.5,19617.28],[403,19819.27],[402.5,20276.93],[402,20337.04],[401.5,20633.2],[401,20934.13],[400.5,20680.91],[400,20157.31],[399.5,19813.63],[399,19731.72],[398.5,19429],[398,19394.94],[397.5,19677.72],[397,19810.39],[396.5,19725.03],[396,19536.43],[395.5,19634.11],[395,19711.64],[394.5,19805.62],[394,19776.86],[393.5,19679.9],[393,19683.81],[392.5,19636.36],[392,19728.54],[391.5,19714.83],[391,19867.51],[390.5,19753.99],[390,19781.36],[389.5,19759.82],[389,20104.23],[388.5,20076.46],[388,19975.8],[387.5,19763.34],[387,19767.71],[386.5,19919.8],[386,20131.4],[385.5,20041.8],[385,20015.49],[384.5,20221],[384,20427.56],[383.5,20082.16],[383,19879.84],[382.5,19983.55],[382,20225.64],[381.5,20116.09],[381,20013.71],[380.5,20308.34],[380,20458.24],[379.5,20330.14],[379,20078.38],[378.5,20061.22],[378,20169.97],[377.5,20199.39],[377,20195.68],[376.5,20118.54],[376,20269.44],[375.5,20377.59],[375,20412.65],[374.5,20345.78],[374,20311.79],[373.5,20477.46],[373,20476.4],[372.5,20390.58],[372,20358.24],[371.5,20457.71],[371,20259.43],[370.5,20144.19],[370,20268.71],[369.5,20634.39],[369,20720.81],[368.5,20551.69],[368,20312.65],[367.5,20344.59],[367,20428.36],[366.5,20320.8],[366,20322.46],[365.5,20410.26],[365,20477.73],[364.5,20422.26],[364,20560.43],[363.5,20721.4],[363,20873.36],[362.5,20757.12],[362,20509.74],[361.5,20333.66],[361,20599.93],[360.5,20812.19],[360,20736.12],[359.5,20700.73],[359,20770.91],[358.5,20818.42],[358,20725.45],[357.5,20627.1],[357,20577.4],[356.5,20721.54],[356,20715.7],[355.5,20570.17],[355,20544.99],[354.5,20625.91],[354,20577.07],[353.5,20665.47],[353,20852.09],[352.5,20818.56],[352,20703.31],[351.5,20756.13],[351,20887.34],[350.5,20941.02],[350,20998.88],[349.5,21141.89],[349,21111.47],[348.5,21164.95],[348,21120.75],[347.5,21176.61],[347,20985.36],[346.5,21314.32],[346,21377.41],[345.5,21178.93],[345,20756.33],[344.5,21058.25],[344,21201.53],[343.5,21267.34],[343,21209.48],[342.5,21339.44],[342,21254.68],[341.5,21149.71],[341,20965.14],[340.5,21011],[340,21089.8],[339.5,21317.17],[339,21172.37],[338.5,21183.64],[338,21114.25],[337.5,21469.86],[337,21409.95],[336.5,21388.88],[336,21277.74],[335.5,21327.31],[335,21437.19],[334.5,21650.05],[334,21937.99],[333.5,21758.66],[333,21610.02],[332.5,21595.51],[332,21720.29],[331.5,21774.1],[331,21721.82],[330.5,21558.33],[330,21521.08],[329.5,21608.23],[329,21516.25],[328.5,21324.99],[328,21556.8],[327.5,21825],[327,21875.03],[326.5,21900.94],[326,21989.88],[325.5,21918.77],[325,21782.65],[324.5,21826.66],[324,21776.49],[323.5,21777.48],[323,21714.79],[322.5,21855.28],[322,21878.54],[321.5,22124.8],[321,22253.37],[320.5,22300.42],[320,22369.08],[319.5,22597.64],[319,22734.36],[318.5,22513.54],[318,22381],[317.5,22460],[317,22425.08],[316.5,22246.88],[316,22281.4],[315.5,22369.21],[315,22421.7],[314.5,22347.94],[314,22324.68],[313.5,22292.07],[313,22465.96],[312.5,22520.17],[312,22609.24],[311.5,22697.11],[311,22599.03],[310.5,22582.2],[310,22584.98],[309.5,22606.32],[309,22367.22],[308.5,22538.4],[308,22714.34],[307.5,22766.1],[307,22646.62],[306.5,22596.98],[306,22543.24],[305.5,22494.66],[305,22484.52],[304.5,22566.03],[304,22714.94],[303.5,22872.86],[303,22904.8],[302.5,22718.78],[302,22502.48],[301.5,22553.18],[301,22658.08],[300.5,22734.09],[300,22606.19],[299.5,22647.74],[299,22616.6],[298.5,22755.63],[298,22718.32],[297.5,22855.7],[297,22852.38],[296.5,22712.29],[296,22516.13],[295.5,22595.59],[295,22693.2],[294.5,22614.54],[294,22446.02],[293.5,22296.98],[293,22306.52],[292.5,22530.05],[292,22725.68],[291.5,23045.76],[291,23553.59],[290.5,24339.82],[290,24969.65],[289.5,25303.38],[289,25468.66],[288.5,26063.57],[288,27371.41],[287.5,28884.02],[287,31208.65],[286.5,34732.56],[286,37744.8],[285.5,36593.42],[285,31691.95],[284.5,26507.91],[284,23950.61],[283.5,23195.73],[283,23100.96],[282.5,22901.36],[282,22872.07],[281.5,22872.8],[281,22876.24],[280.5,22881.14],[280,22988.37],[279.5,23048.74],[279,23038.67],[278.5,23073.13],[278,22895.2],[277.5,22756.89],[277,22614.34],[276.5,22582.4],[276,22541.58],[275.5,22512.22],[275,22577.36],[274.5,22795.72],[274,22950.73],[273.5,22969.62],[273,22922.56],[272.5,22844.43],[272,22747.68],[271.5,22891.42],[271,23123.69],[270.5,23133.37],[270,22975.05],[269.5,23047.68],[269,23178.24],[268.5,23387.25],[268,23300.77],[267.5,23240.93],[267,23242.58],[266.5,23392.55],[266,23295.8],[265.5,23068.82],[265,23087.71],[264.5,23399.64],[264,23346.16],[263.5,23167.43],[263,23115.54],[262.5,23431.72],[262,23606.34],[261.5,23804.82],[261,23850.94],[260.5,23681.22],[260,23225.35],[259.5,23299.31],[259,23431.78],[258.5,23594.34],[258,23515.55],[257.5,23658.62],[257,23827.02],[256.5,23956.58],[256,23843.72],[255.5,23632.32],[255,23588.71],[254.5,23618.67],[254,23558.43],[253.5,23502.43],[253,23640.8],[252.5,23799.91],[252,23955.72],[251.5,23936.1],[251,23903.63],[250.5,24077.92],[250,24235.77],[249.5,24141.4],[249,23902.5],[248.5,24052.14],[248,24260.36],[247.5,24085.8],[247,23894.35],[246.5,23851.34],[246,24073.48],[245.5,24281.96],[245,24475.34],[244.5,24463.74],[244,24353.47],[243.5,24326.83],[243,24373.61],[242.5,24315.69],[242,24470.3],[241.5,24696.08],[241,24773.82],[240.5,24499.26],[240,24463.88],[239.5,24793.9],[239,24889.86],[238.5,24845.99],[238,24605.36],[237.5,24709.87],[237,24705.76],[236.5,24748.11],[236,24597.81],[235.5,24719.28],[235,24885.15],[234.5,24948.04],[234,24869.84],[233.5,24868.06],[233,24847.25],[232.5,24823.99],[232,24846.85],[231.5,25100.73],[231,25097.55],[230.5,25025.38],[230,24808.54],[229.5,24875.94],[229,24890.32],[228.5,25178.27],[228,25461.17],[227.5,25503.32],[227,25399.14],[226.5,25342.02],[226,25497.76],[225.5,25420.48],[225,25636.59],[224.5,25802.4],[224,25746.2],[223.5,25591.33],[223,25807.37],[222.5,26089.41],[222,26144.42],[221.5,26256.68],[221,26097.63],[220.5,26030.7],[220,25986.16],[219.5,26192.53],[219,25961.38],[218.5,26030.17],[218,25854.09],[217.5,25812.14],[217,25695.37],[216.5,25957.07],[216,25969.73],[215.5,25931.89],[215,25746.14],[214.5,25779.27],[214,25762.24],[213.5,25902.66],[213,25877.15],[212.5,25871.25],[212,25814.52],[211.5,25941.5],[211,26014.86],[210.5,26232.36],[210,26394.72],[209.5,26494.92],[209,26439.12],[208.5,26429.12],[208,26591.54],[207.5,26708.64],[207,26671.86],[206.5,26690.82],[206,26857.55],[205.5,27023.95],[205,26793.93],[204.5,26890.55],[204,27104.08],[203.5,27454.91],[203,27499.97],[202.5,27360.74],[202,27246.29],[201.5,27216.93],[201,27232.64],[200.5,27225.22],[200,27051.32],[199.5,26678.62],[199,26540.58],[198.5,26760.73],[198,26741.78],[197.5,26478.49],[197,26184.25],[196.5,26142.03],[196,26225.07],[195.5,26290.81],[195,26272.65],[194.5,26153.89],[194,26387.16],[193.5,26679.22],[193,26868.55],[192.5,26672.19],[192,26574.71],[191.5,26877.17],[191,27015.14],[190.5,27285.13],[190,27406.47],[189.5,28038.22],[189,28219.73],[188.5,28611.72],[188,28826.9],[187.5,29043.47],[187,28916.89],[186.5,28878.46],[186,29140.42],[185.5,29156.92],[185,28974.55],[184.5,28635.31],[184,28396.67],[183.5,28078.84],[183,27527.21],[182.5,27037.54],[182,26747.14],[181.5,26591.21],[181,26221.29],[180.5,25784.11],[180,25663.1],[179.5,25701.86],[179,25731.95],[178.5,25576.28],[178,25376.88],[177.5,25353.55],[177,25698.55],[176.5,25790.4],[176,25474.3],[175.5,25225.85],[175,25588.41],[174.5,26110.42],[174,26468.88],[173.5,26721.9],[173,27117.92],[172.5,27591.96],[172,28054.98],[171.5,28814.7],[171,29654.74],[170.5,30564.9],[170,31467.17],[169.5,32495.68],[169,32894.43],[168.5,32784.48],[168,31785.73],[167.5,30624.74],[167,29334.26],[166.5,28000.05],[166,26410.76],[165.5,24920.34],[165,23867.05],[164.5,23060.6],[164,22329.12],[163.5,21411.21],[163,20754.14],[162.5,20426.04],[162,20141.74],[161.5,20031.86],[161,20136.57],[160.5,20122.52],[160,20020.4],[159.5,19955.45],[159,20026.03],[158.5,20074.87],[158,20433.86],[157.5,21552.7],[157,23371.94],[156.5,26063.37],[156,30204.06],[155.5,35052.51],[155,37736.25],[154.5,36555.25],[154,33408.28],[153.5,30673.85],[153,30549.52],[152.5,34946.08],[152,47387.17],[151.5,60643.58],[151,59975.04],[150.5,44550.48],[150,29060.7],[149.5,22320.3],[149,19675],[148.5,18031.17],[148,17178.47],[147.5,16694.57],[147,16143.2],[146.5,15531.86],[146,15296.33],[145.5,15077.24],[145,14843.44],[144.5,14703.35],[144,14645.89],[143.5,14503.68],[143,14348.14],[142.5,14379.82],[142,14351.12],[141.5,14460.2],[141,14441.52],[140.5,14563.12],[140,14703.75],[139.5,14978.83],[139,15269.49],[138.5,15434.51],[138,15498.66],[137.5,15548.49],[137,16027.16],[136.5,16441.61],[136,16721.14],[135.5,16546.52],[135,16600.66],[134.5,16652.09],[134,16619.22],[133.5,16337.5],[133,16129.55],[132.5,15693.29],[132,15107.26],[131.5,14776.44],[131,14532.5],[130.5,14119.84],[130,13635.74],[129.5,13381.26],[129,13204.65],[128.5,13026.38],[128,12870.12],[127.5,12807.63],[127,12798.41],[126.5,12789.27],[126,12774.29],[125.5,12743.81],[125,12819.75],[124.5,13011.47],[124,13104.32],[123.5,13121.88],[123,13339.11],[122.5,13552.83],[122,13943.5],[121.5,14184.98],[121,14538.07],[120.5,14908.26],[120,15759.23],[119.5,16805.1],[119,17873.11],[118.5,19126.08],[118,20158.77],[117.5,20698.28],[117,20175.07],[116.5,18980.36],[116,17210.48],[115.5,15380.36],[115,13706.12],[114.5,12136.71],[114,10738.54],[113.5,9674.11],[113,8967.8],[112.5,8307.89],[112,7758.51],[111.5,7283.68],[111,6886.13],[110.5,6615.02],[110,6444.1],[109.5,6245.56],[109,6075.44],[108.5,6058.81],[108,6054.04],[107.5,6060.93],[107,6031.18],[106.5,6156.82],[106,6899.78],[105.5,10062.72],[105,17021.21],[104.5,26116.52],[104,31111.16],[103.5,27431.25],[103,18691.81],[102.5,11762.88],[102,9248.06],[101.5,11402.37],[101,25384.17],[100.5,52005.8],[100,66897.22],[99.5,48557.17],[99,18055.16],[98.5,2958.83],[98,3055.98],[97.5,2820.92],[97,2358.22],[96.5,2028.46],[96,1712.95],[95.5,1589.36],[95,1508.9],[94.5,1536.94],[94,1444.22],[93.5,1457.88],[93,1459.8],[92.5,1481.07],[92,1449.13],[91.5,1422.29],[91,1408.7],[90.5,1372.65],[90,1408.5],[89.5,1438.86],[89,1478.68],[88.5,1461.06],[88,1452.57],[87.5,1426.8],[87,1461.85],[86.5,1513.68],[86,1557.08],[85.5,1475.64],[85,1412.94],[84.5,1408.57],[84,1481.34],[83.5,1467.75],[83,1469.47],[82.5,1450.92],[82,1503.2],[81.5,1498.17],[81,1469.87],[80.5,1456.62],[80,1514.74],[79.5,1559],[79,1575.51],[78.5,1571.6],[78,1539.65],[77.5,1493.99],[77,1496.71],[76.5,1545.68],[76,1616.06],[75.5,1617.06],[75,1553.57],[74.5,1500.36],[74,1510.43],[73.5,1557.35],[73,1588.36],[72.5,1570.34],[72,1567.29],[71.5,1589.02],[71,1601.55],[70.5,1556.22],[70,1493.6],[69.5,1477.89],[69,1530.97],[68.5,1593.93],[68,1630.44],[67.5,1653.77],[67,1628.06],[66.5,1610.36],[66,1599.43],[65.5,1603.74],[65,1649.93],[64.5,1683.33],[64,1685.78],[63.5,1638.59],[63,1630.11],[62.5,1615.33],[62,1635.55],[61.5,1683.53],[61,1656.29],[60.5,1680.74],[60,1700.42],[59.5,1775.97],[59,1765.97],[58.5,1754.7],[58,1722.56],[57.5,1739.86],[57,1756.49],[56.5,1768.22],[56,1717.19],[55.5,1687.04],[55,1717.32],[54.5,1804.47],[54,1765.83],[53.5,1766.89],[53,1786.24],[52.5,1837.94],[52,1827.66],[51.5,1894.86],[51,1904.14],[50.5,1885.85],[50,1830.12],[49.5,1866.17],[49,1902.61],[48.5,1848.74],[48,1799.63],[47.5,1850.53],[47,1927.47],[46.5,1910.43],[46,1907.92],[45.5,1947.68],[45,1978.23],[44.5,1995.13],[44,1951.39],[43.5,1862.65],[43,1757.35],[42.5,1704.4],[42,1724.55],[41.5,1770.21],[41,1850.33],[40.5,1807.25],[40,1801.02],[39.5,1787.64],[39,1834.42],[38.5,1772],[38,1769.54],[37.5,1767.03],[37,1685.12],[36.5,1601.02],[36,1626.47],[35.5,1686.31],[35,1734.82],[34.5,1777.89],[34,1859.01],[33.5,1880.22],[33,1878.76],[32.5,1857.02],[32,1930.38],[31.5,2087.91],[31,2139.66],[30.5,2191.29],[30,2291.49],[29.5,2457.36],[29,2682.81],[28.5,3048.03],[28,3468.44],[27.5,4006.49],[27,4601.13],[26.5,5151.71],[26,5284.11],[25.5,5002.93],[25,4373.23],[24.5,3687.4],[24,2823.11],[23.5,2144.5],[23,1794.46],[22.5,1726.87],[22,1583.86],[21.5,1536.07],[21,1475.24],[20.5,1399.49],[20,1345.88],[19.5,1338.72],[19,1242.76],[18.5,1122.15],[18,1071.79],[17.5,1111.95],[17,1184.25],[16.5,1318.97],[16,1448.13],[15.5,1568.94],[15,1674.31],[14.5,1737.07],[14,1734.69],[13.5,1721.3],[13,1826.21],[12.5,1956.16],[12,1994.8],[11.5,1930.98],[11,1918.65],[10.5,1951.79],[10,1947.68],[9.5,2003.08],[9,2152.65],[8.5,2316.54],[8,2306.46],[7.5,2172.27],[7,1904.07],[6.5,1633.96],[6,1327.26],[5.5,1213.07],[5,1211.75],[4.5,1280.87],[4,1291.54],[3.5,1267.81],[3,1139.71],[2.5,900.74],[2,608.16],[1.5,344.94],[1,179.33],[0.5,127.11],[0,95.1]]};\r\n\r\n\r\n\r\nvar datapoint2Peakinfo ={\r\n\"PeakInfo\":[\r\n{\"xval\":104.25,\"yval\":14589.45, \"lbltext\":\"Si O2\"},\r\n{\"xval\":100.00,\"yval\":33732.85, \"lbltext\":\"Si0\"}\r\n]\r\n};\r\nvar datapoint2 = {\r\n \"label\": \"Si (100) Si2p\",\r\n \"data\": [[112, 3262.7], [111.88, 3229.28], [111.75, 3138.22], [111.62, 3037.67], [111.5, 3043.94], [111.38, 3002.57], [111.25, 2986.26], [111.12, 2927.7], [111, 2892.43], [110.88, 2898.5], [110.75, 2886.04], [110.62, 2839.61], [110.5, 2785.77], [110.38, 2738.52], [110.25, 2696.75], [110.12, 2686.81], [110, 2652.35], [109.88, 2599.05], [109.75, 2586.92], [109.62, 2615.73], [109.5, 2615.42], [109.38, 2597.81], [109.25, 2587.41], [109.12, 2591.67], [109, 2594.34], [108.88, 2558.71], [108.75, 2527.54], [108.62, 2551.8], [108.5, 2561.54], [108.38, 2513.21], [108.25, 2470.02], [108.12, 2446.05], [108, 2432.09], [107.88, 2413.05], [107.75, 2454.36], [107.62, 2440.13], [107.5, 2447.16], [107.38, 2371.08], [107.25, 2344], [107.12, 2310.57], [107, 2366.88], [106.88, 2378.39], [106.75, 2390.56], [106.62, 2412.12], [106.5, 2503.13], [106.38, 2612.52], [106.25, 2719.02], [106.12, 2830.75], [106, 3084.76], [105.88, 3387.68], [105.75, 3743.44], [105.62, 4218.75], [105.5, 4903.66], [105.38, 5645.02], [105.25, 6520.09], [105.12, 7571.43], [105, 8749.88], [104.88, 9954.15], [104.75, 11202.03], [104.62, 12387.63], [104.5, 13394.69], [104.38, 14118.87], [104.25, 14589.45], [104.12, 14680.44], [104, 14531.51], [103.88, 13890.94], [103.75, 13079.93], [103.62, 11878.85], [103.5, 10662.26], [103.38, 9322.24], [103.25, 8096.88], [103.12, 6908.99], [103, 5928.5], [102.88, 5164.72], [102.75, 4544.83], [102.62, 4049.28], [102.5, 3733.04], [102.38, 3539.69], [102.25, 3385.78], [102.12, 3295.04], [102, 3379.69], [101.88, 3595.02], [101.75, 3942.7], [101.62, 4516.75], [101.5, 5369.82], [101.38, 6495.6], [101.25, 8029.82], [101.12, 10087.17], [101, 12690.42], [100.88, 15966.32], [100.75, 19845], [100.62, 24011.54], [100.5, 27629], [100.38, 30363.9], [100.25, 32089.24], [100.12, 33165.63], [100, 33732.85], [99.88, 33203.18], [99.75, 30116.18], [99.62, 24149.58], [99.5, 16621.34], [99.38, 9914.74], [99.25, 5402.07], [99.12, 3194.48], [99, 2227.71], [98.88, 1757.06], [98.75, 1464.7], [98.62, 1274.6], [98.5, 1155.79], [98.38, 1041.88], [98.25, 938.85], [98.12, 848.74], [98, 822.26], [97.88, 805.91], [97.75, 775.74], [97.62, 702.64], [97.5, 688.92], [97.38, 697.98], [97.25, 690.23], [97.12, 674.32], [97, 665.31], [96.88, 661.13], [96.75, 654.42], [96.62, 672.13], [96.5, 653.56], [96.38, 639.9], [96.25, 624.15], [96.12, 632.55], [96, 621.22], [95.88, 622.61], [95.75, 611.08], [95.62, 609.22], [95.5, 600.92], [95.38, 618.72], [95.25, 621.99], [95.12, 626.78], [95, 619.21], [94.88, 625.08], [94.75, 614.88], [94.62, 622.92], [94.5, 620.95], [94.38, 622.54], [94.25, 623.18], [94.12, 629.46], [94, 625.61], [93.88, 625.08], [93.75, 617.73], [93.62, 614.26], [93.5, 621.46], [93.38, 632.13], [93.25, 606.31], [93.12, 586.84], [93, 578.18], [92.88, 592.85], [92.75, 596.89], [92.62, 605.95], [92.5, 600.61], [92.38, 599.81], [92.25, 608.58], [92.12, 627.95], [92, 634.76]]\r\n};\r\n\r\n\r\nvar datapoint3Peakinfo ={\r\n\"PeakInfo\":[\r\n{\"xval\":533.50,\"yval\":150052.33, \"lbltext\":\"0 1S\"},\r\n{\"xval\":286.50,\"yval\":49519.54, \"lbltext\":\"C 1s\"}, \r\n{\"xval\":120.50,\"yval\":37611.80, \"lbltext\":\"Si 2s\"},\r\n{\"xval\":980.00,\"yval\":41919.92, \"lbltext\":\"O KLL\"},\r\n{\"xval\":76.00,\"yval\":37201.06, \"lbltext\":\"Si 2p\"}\r\n]\r\n};\r\nvar datapoint3 = {\r\n \"label\": \"Al2O3 thin film survey\",\r\n \"data\": [[1350, 12914.72], [1349.5, 13358.86], [1349, 13362.64], [1348.5, 13270.32], [1348, 13257.53], [1347.5, 13279.54], [1347, 13094.91], [1346.5, 13062.57], [1346, 13156.07], [1345.5, 13238.84], [1345, 13374.9], [1344.5, 13362.97], [1344, 13278.34], [1343.5, 13383.58], [1343, 13508.76], [1342.5, 13479.54], [1342, 13397.16], [1341.5, 13439.11], [1341, 13454.49], [1340.5, 13615.52], [1340, 13720.3], [1339.5, 13596.17], [1339, 13537.99], [1338.5, 13711.48], [1338, 13751.84], [1337.5, 13709.1], [1337, 13801.41], [1336.5, 14020.17], [1336, 14051.05], [1335.5, 13999.82], [1335, 13911.69], [1334.5, 13987.9], [1334, 14125.14], [1333.5, 14067.29], [1333, 13940.58], [1332.5, 13986.04], [1332, 14232.7], [1331.5, 14302.28], [1331, 14223.68], [1330.5, 14031.97], [1330, 14112.48], [1329.5, 14242.84], [1329, 14322.76], [1328.5, 14352.38], [1328, 14518.39], [1327.5, 14471.27], [1327, 14473.59], [1326.5, 14602.95], [1326, 14763.98], [1325.5, 14714.61], [1325, 14704.74], [1324.5, 14752.06], [1324, 14792.61], [1323.5, 14697.05], [1323, 14659.41], [1322.5, 14679.62], [1322, 14918.13], [1321.5, 15061.6], [1321, 15257.04], [1320.5, 15247.82], [1320, 15172.54], [1319.5, 15016.81], [1319, 15209.06], [1318.5, 15366.31], [1318, 15431.46], [1317.5, 15395.94], [1317, 15519.13], [1316.5, 15528.54], [1316, 15493.95], [1315.5, 15500.05], [1315, 15498.66], [1314.5, 15537.95], [1314, 15736.76], [1313.5, 15721.59], [1313, 15563.27], [1312.5, 15545.64], [1312, 15760.02], [1311.5, 15917.22], [1311, 15836.57], [1310.5, 15852.8], [1310, 15986.14], [1309.5, 16131.87], [1309, 16137.1], [1308.5, 16063.94], [1308, 16186.21], [1307.5, 16125.31], [1307, 16530.02], [1306.5, 16694.17], [1306, 16836.58], [1305.5, 16665.87], [1305, 16671.57], [1304.5, 16428.69], [1304, 16551.03], [1303.5, 16721.07], [1303, 16777.2], [1302.5, 16761.63], [1302, 16799.74], [1301.5, 16870.78], [1301, 16842.15], [1300.5, 16715.64], [1300, 16467.79], [1299.5, 16560.83], [1299, 16787.34], [1298.5, 16964.68], [1298, 17021.34], [1297.5, 16912.59], [1297, 16912.73], [1296.5, 16966.8], [1296, 16965.02], [1295.5, 16762.36], [1295, 16883.1], [1294.5, 17022.74], [1294, 17071.91], [1293.5, 16961.83], [1293, 17238.18], [1292.5, 17327.05], [1292, 17229.9], [1291.5, 17055.67], [1291, 17217.17], [1290.5, 17325.19], [1290, 17249.11], [1289.5, 17206.9], [1289, 17328.57], [1288.5, 17396.37], [1288, 17403.12], [1287.5, 17268.4], [1287, 17412.14], [1286.5, 17528.44], [1286, 17593.59], [1285.5, 17302.46], [1285, 17254.15], [1284.5, 17490.2], [1284, 17685.17], [1283.5, 17786.76], [1283, 17919.77], [1282.5, 17952.97], [1282, 17965.49], [1281.5, 17775.56], [1281, 17861.38], [1280.5, 17797.96], [1280, 17971.72], [1279.5, 17836.2], [1279, 17894.92], [1278.5, 17737.19], [1278, 17708.03], [1277.5, 17612.41], [1277, 17671.52], [1276.5, 17665.29], [1276, 17808.43], [1275.5, 17941.7], [1275, 18286.5], [1274.5, 18430.58], [1274, 18544.63], [1273.5, 18423.49], [1273, 18288.96], [1272.5, 18074.51], [1272, 18087.3], [1271.5, 18196.51], [1271, 18331.84], [1270.5, 18437.14], [1270, 18501.29], [1269.5, 18454.5], [1269, 18283.79], [1268.5, 18334.75], [1268, 18498.3], [1267.5, 18770.61], [1267, 18812.49], [1266.5, 18759.14], [1266, 18568.82], [1265.5, 18445.62], [1265, 18586.71], [1264.5, 18846.56], [1264, 18933.24], [1263.5, 18758.02], [1263, 18746.29], [1262.5, 19040.26], [1262, 19093.88], [1261.5, 18829.26], [1261, 18759.61], [1260.5, 19000.7], [1260, 19119.72], [1259.5, 19174.26], [1259, 19261.67], [1258.5, 19332.31], [1258, 19309.92], [1257.5, 19433.24], [1257, 19434.04], [1256.5, 19404.28], [1256, 19494.48], [1255.5, 19717.68], [1255, 19799.72], [1254.5, 19799.85], [1254, 19666.25], [1253.5, 19739.68], [1253, 19830.14], [1252.5, 19903.7], [1252, 19968.04], [1251.5, 20114.83], [1251, 20396.61], [1250.5, 20405.43], [1250, 20368.12], [1249.5, 20333.46], [1249, 20559.64], [1248.5, 20639.36], [1248, 20586.61], [1247.5, 20462.35], [1247, 20494.29], [1246.5, 20552.68], [1246, 20643.14], [1245.5, 20739.1], [1245, 20902.65], [1244.5, 21026.51], [1244, 20949.04], [1243.5, 21100.6], [1243, 21139.44], [1242.5, 21286.62], [1242, 21152.89], [1241.5, 21160.38], [1241, 21128.17], [1240.5, 21208.95], [1240, 21004.38], [1239.5, 20762.49], [1239, 20876.54], [1238.5, 21111.34], [1238, 21178.53], [1237.5, 21141.29], [1237, 21300.74], [1236.5, 21410.94], [1236, 21547.72], [1235.5, 21691.13], [1235, 21956.61], [1234.5, 22186.1], [1234, 22328.78], [1233.5, 22550.59], [1233, 22765.04], [1232.5, 22941.32], [1232, 22982.74], [1231.5, 23126.54], [1231, 23089.5], [1230.5, 23068.56], [1230, 23239.07], [1229.5, 23383.47], [1229, 23436.29], [1228.5, 23383.08], [1228, 23296.79], [1227.5, 23281.82], [1227, 23606.14], [1226.5, 23714.76], [1226, 23574.86], [1225.5, 23713.7], [1225, 23856.77], [1224.5, 23775.53], [1224, 23371.48], [1223.5, 23240.26], [1223, 22982.21], [1222.5, 22881.28], [1222, 22403.47], [1221.5, 22003.2], [1221, 21645.74], [1220.5, 21518.3], [1220, 21379.73], [1219.5, 21265.61], [1219, 21128.37], [1218.5, 20800.2], [1218, 20507.62], [1217.5, 20017.75], [1217, 19530], [1216.5, 19282.94], [1216, 19357.03], [1215.5, 19326.62], [1215, 19265.91], [1214.5, 19300.97], [1214, 19084.2], [1213.5, 18739.2], [1213, 18836.42], [1212.5, 19070.68], [1212, 19191.42], [1211.5, 19083.8], [1211, 19180.03], [1210.5, 18915.61], [1210, 18948.74], [1209.5, 18950.73], [1209, 19161.8], [1208.5, 19125.42], [1208, 19153.58], [1207.5, 19023.36], [1207, 18847.02], [1206.5, 19015.81], [1206, 19145.43], [1205.5, 19405.68], [1205, 19232.64], [1204.5, 19316.68], [1204, 19071.94], [1203.5, 19063.13], [1203, 18986.52], [1202.5, 19056.43], [1202, 18993.41], [1201.5, 18973.86], [1201, 19233.11], [1200.5, 19506.27], [1200, 19517.67], [1199.5, 19208.59], [1199, 19145.9], [1198.5, 19539.08], [1198, 19783.15], [1197.5, 19869.24], [1197, 19721.65], [1196.5, 19767.91], [1196, 19620.79], [1195.5, 19574.66], [1195, 19466.25], [1194.5, 19632.85], [1194, 19850.28], [1193.5, 20137.03], [1193, 20147.9], [1192.5, 19993.09], [1192, 19739.81], [1191.5, 19671.95], [1191, 19806.15], [1190.5, 20122.78], [1190, 20120.2], [1189.5, 19864.46], [1189, 19761.68], [1188.5, 19845.84], [1188, 20009.46], [1187.5, 20022.12], [1187, 20155.39], [1186.5, 20183.55], [1186, 20126.83], [1185.5, 20042.4], [1185, 19985.01], [1184.5, 20219.21], [1184, 20161.62], [1183.5, 20184.62], [1183, 20003.23], [1182.5, 20061.48], [1182, 20196.88], [1181.5, 20359.9], [1181, 20369.97], [1180.5, 20426.04], [1180, 20572.56], [1179.5, 20851.09], [1179, 20928.37], [1178.5, 20847.71], [1178, 20448.3], [1177.5, 20352.81], [1177, 20547.05], [1176.5, 20948.64], [1176, 20990.33], [1175.5, 20981.25], [1175, 20935.06], [1174.5, 21060.24], [1174, 20916.77], [1173.5, 20754.67], [1173, 20556.66], [1172.5, 20825.84], [1172, 21132.68], [1171.5, 21255.67], [1171, 21084.17], [1170.5, 21138.18], [1170, 21186.55], [1169.5, 21258.72], [1169, 21290.26], [1168.5, 21452.96], [1168, 21403.85], [1167.5, 21235.53], [1167, 21146.13], [1166.5, 21184.5], [1166, 21277.74], [1165.5, 21313.66], [1165, 21462.5], [1164.5, 21664.69], [1164, 21704.52], [1163.5, 21461.18], [1163, 21313.59], [1162.5, 21404.51], [1162, 21577.68], [1161.5, 21726.39], [1161, 21715.06], [1160.5, 21485.43], [1160, 21368.53], [1159.5, 21399.48], [1159, 21455.01], [1158.5, 21573.77], [1158, 21692.52], [1157.5, 21649.65], [1157, 21661.24], [1156.5, 21781.53], [1156, 21948.26], [1155.5, 21948.79], [1155, 22002.93], [1154.5, 21977.82], [1154, 22012.48], [1153.5, 22007.11], [1153, 22044.95], [1152.5, 22045.81], [1152, 22179.94], [1151.5, 22160.13], [1151, 22278.48], [1150.5, 22183.19], [1150, 22483.19], [1149.5, 22507.98], [1149, 22625.01], [1148.5, 22415.2], [1148, 22329.31], [1147.5, 22294.85], [1147, 22424.08], [1146.5, 22459.93], [1146, 22487.5], [1145.5, 22536.21], [1145, 22753.18], [1144.5, 22779.09], [1144, 22860.8], [1143.5, 22645.02], [1143, 22727.66], [1142.5, 22627.8], [1142, 22856.96], [1141.5, 22903.94], [1141, 23062.53], [1140.5, 22841.52], [1140, 23039.13], [1139.5, 23195.6], [1139, 23194.6], [1138.5, 23128.53], [1138, 23140.33], [1137.5, 22924.02], [1137, 22868.82], [1136.5, 23108.12], [1136, 23292.35], [1135.5, 23332.78], [1135, 23256.43], [1134.5, 23257.63], [1134, 23333.31], [1133.5, 23420.52], [1133, 23442.32], [1132.5, 23568.56], [1132, 23760.09], [1131.5, 23589.77], [1131, 23513.03], [1130.5, 23394.67], [1130, 23543.91], [1129.5, 23688.18], [1129, 23800.91], [1128.5, 23705.35], [1128, 23801.3], [1127.5, 23846.9], [1127, 23786.86], [1126.5, 23808.8], [1126, 23984.61], [1125.5, 24165.33], [1125, 24148.23], [1124.5, 24186.93], [1124, 23917.28], [1123.5, 23739.74], [1123, 23772.41], [1122.5, 23999.85], [1122, 24192.3], [1121.5, 24212.64], [1121, 24164.4], [1120.5, 24055.38], [1120, 24198.33], [1119.5, 24381.63], [1119, 24411.85], [1118.5, 24190.58], [1118, 24238.49], [1117.5, 24328.48], [1117, 24320.6], [1116.5, 24226.89], [1116, 24557.91], [1115.5, 24798.94], [1115, 24565.33], [1114.5, 24682.63], [1114, 25033.4], [1113.5, 24949.7], [1113, 24587.73], [1112.5, 24582.3], [1112, 24875.94], [1111.5, 24855.8], [1111, 24940.82], [1110.5, 25133.4], [1110, 25376.68], [1109.5, 25451.3], [1109, 25187.94], [1108.5, 24938.37], [1108, 24919.95], [1107.5, 25217.23], [1107, 25414.32], [1106.5, 25402.06], [1106, 25319.49], [1105.5, 25492.78], [1105, 25535.2], [1104.5, 25479.93], [1104, 25475.16], [1103.5, 25712.54], [1103, 25870.26], [1102.5, 25984.57], [1102, 25921.29], [1101.5, 25661.11], [1101, 25603.65], [1100.5, 25937.52], [1100, 25887.75], [1099.5, 25807.77], [1099, 25752.23], [1098.5, 25998.96], [1098, 25972.98], [1097.5, 26144.29], [1097, 26255.29], [1096.5, 26164.9], [1096, 26226.79], [1095.5, 26406.12], [1095, 26503.14], [1094.5, 26436.6], [1094, 26559.34], [1093.5, 26737.6], [1093, 26660.13], [1092.5, 26830.64], [1092, 26796.32], [1091.5, 26707.32], [1091, 26431.96], [1090.5, 26642.31], [1090, 26719.38], [1089.5, 26767.62], [1089, 26833.5], [1088.5, 27069.28], [1088, 27021.44], [1087.5, 26807.58], [1087, 26926.94], [1086.5, 27114.35], [1086, 27091.88], [1085.5, 26842.71], [1085, 26717.39], [1084.5, 26825.48], [1084, 27057.49], [1083.5, 27252.65], [1083, 27231.45], [1082.5, 27367.5], [1082, 27581.68], [1081.5, 27669.23], [1081, 27454.11], [1080.5, 27132.17], [1080, 27319.19], [1079.5, 27511.84], [1079, 27658.96], [1078.5, 27565.98], [1078, 27721.12], [1077.5, 27807.53], [1077, 27965.12], [1076.5, 27922.98], [1076, 27832.45], [1075.5, 27904.55], [1075, 28145.84], [1074.5, 28471.36], [1074, 28710.06], [1073.5, 28833.99], [1073, 28741.08], [1072.5, 28567.25], [1072, 28396.41], [1071.5, 28593.56], [1071, 28515.83], [1070.5, 28332.32], [1070, 28350.28], [1069.5, 28550.95], [1069, 28487.6], [1068.5, 28296.54], [1068, 28491.64], [1067.5, 28682.96], [1067, 28695.42], [1066.5, 28574.21], [1066, 28530.01], [1065.5, 28593.63], [1065, 28714.44], [1064.5, 28867.19], [1064, 28865.47], [1063.5, 28692.04], [1063, 28777.99], [1062.5, 28985.95], [1062, 29149.37], [1061.5, 29253.48], [1061, 29185.29], [1060.5, 29248.78], [1060, 29359.31], [1059.5, 29573.56], [1059, 29712.86], [1058.5, 29802.99], [1058, 29656.07], [1057.5, 29379.66], [1057, 29393.64], [1056.5, 29505.04], [1056, 29710.94], [1055.5, 29610.21], [1055, 29709.55], [1054.5, 29482.71], [1054, 29800.94], [1053.5, 29791.2], [1053, 29954.09], [1052.5, 29700.34], [1052, 29784.7], [1051.5, 30023.07], [1051, 30395.45], [1050.5, 30554.56], [1050, 30422.82], [1049.5, 30249.52], [1049, 30112.67], [1048.5, 29931.56], [1048, 30145.41], [1047.5, 30538.46], [1047, 30875.44], [1046.5, 30675.3], [1046, 30539.72], [1045.5, 30739.45], [1045, 30931.84], [1044.5, 30855.96], [1044, 30748.47], [1043.5, 30694.66], [1043, 30966.03], [1042.5, 31090.75], [1042, 31173.92], [1041.5, 30975.04], [1041, 30991.15], [1040.5, 31095.86], [1040, 31344.37], [1039.5, 31507], [1039, 31482.01], [1038.5, 31377.7], [1038, 31247.02], [1037.5, 31294.34], [1037, 31687.05], [1036.5, 31951.14], [1036, 31744.44], [1035.5, 31595.2], [1035, 31718.79], [1034.5, 31784], [1034, 31660.54], [1033.5, 31664.92], [1033, 31792.35], [1032.5, 31913.83], [1032, 32154.98], [1031.5, 32312.71], [1031, 32202.7], [1030.5, 31883.34], [1030, 31990.64], [1029.5, 32206.48], [1029, 32419.47], [1028.5, 32550.42], [1028, 32646.51], [1027.5, 32563.41], [1027, 32497.53], [1026.5, 32509.46], [1026, 32692.57], [1025.5, 32794.75], [1025, 32712.65], [1024.5, 32557.64], [1024, 32788], [1023.5, 32914.57], [1023, 33140.36], [1022.5, 33242.68], [1022, 33482.97], [1021.5, 33404.31], [1021, 33569.78], [1020.5, 33708.55], [1020, 33699.67], [1019.5, 33412], [1019, 33243.01], [1018.5, 33338.9], [1018, 33319.02], [1017.5, 33617.43], [1017, 33869.72], [1016.5, 33950.17], [1016, 33613.52], [1015.5, 33633.8], [1015, 33575.55], [1014.5, 33362.96], [1014, 32964.67], [1013.5, 32896.35], [1013, 32723.78], [1012.5, 32780.44], [1012, 32741.28], [1011.5, 32800.72], [1011, 32675.8], [1010.5, 32805.69], [1010, 32570.83], [1009.5, 32609.93], [1009, 32960.56], [1008.5, 33477.47], [1008, 33686.02], [1007.5, 33847.72], [1007, 34078.14], [1006.5, 34077.61], [1006, 34294.18], [1005.5, 34595.51], [1005, 34965.83], [1004.5, 35167.56], [1004, 35635.69], [1003.5, 35981.16], [1003, 36371.62], [1002.5, 36779.64], [1002, 36940.48], [1001.5, 37048.04], [1001, 37158.64], [1000.5, 37054.4], [1000, 36483.28], [999.5, 36079.56], [999, 35482.27], [998.5, 34651.71], [998, 33838.84], [997.5, 33504.64], [997, 33214.71], [996.5, 32923.19], [996, 32644.59], [995.5, 32422.85], [995, 32106.34], [994.5, 31607.2], [994, 30988.5], [993.5, 30312.87], [993, 29916.25], [992.5, 29704.18], [992, 29107.75], [991.5, 28668.91], [991, 28112.9], [990.5, 27940.4], [990, 27597.46], [989.5, 27656.24], [989, 27523.23], [988.5, 27539.07], [988, 27641.86], [987.5, 28005.94], [987, 28099.78], [986.5, 28229.01], [986, 28678.45], [985.5, 29645.6], [985, 30894.06], [984.5, 32001.37], [984, 33103.38], [983.5, 34023.34], [983, 35537.41], [982.5, 36793.62], [982, 38138.31], [981.5, 39234.68], [981, 40731.46], [980.5, 41640.29], [980, 41919.29], [979.5, 41576.94], [979, 40757.77], [978.5, 39412.82], [978, 37355.86], [977.5, 35388.3], [977, 33627.97], [976.5, 32626.03], [976, 31898.52], [975.5, 31155.96], [975, 30332.16], [974.5, 29517.5], [974, 28773.68], [973.5, 28034.31], [973, 27194.93], [972.5, 26495.25], [972, 25688.61], [971.5, 24687.93], [971, 23551.6], [970.5, 22823.82], [970, 22358.47], [969.5, 21670.12], [969, 21084.83], [968.5, 20233.79], [968, 19364.79], [967.5, 18768.56], [967, 18510.7], [966.5, 18028.65], [966, 17602.73], [965.5, 17505.91], [965, 17585.63], [964.5, 17553.69], [964, 17491.4], [963.5, 17400.21], [963, 17327.91], [962.5, 17312.93], [962, 17468], [961.5, 17707.9], [961, 17770.2], [960.5, 17567.81], [960, 17357.13], [959.5, 17199.34], [959, 17163.56], [958.5, 17286.42], [958, 17438.31], [957.5, 17418.37], [957, 17452.5], [956.5, 17570.86], [956, 17639.51], [955.5, 17503.86], [955, 17426.52], [954.5, 17252.43], [954, 17259.65], [953.5, 17336], [953, 17459.92], [952.5, 17557.6], [952, 17629.17], [951.5, 17634.14], [951, 17503.59], [950.5, 17650.64], [950, 17615.59], [949.5, 17588.02], [949, 17526.06], [948.5, 17709.1], [948, 17753.89], [947.5, 17674.64], [947, 17666.28], [946.5, 17676.03], [946, 17804.79], [945.5, 17719.7], [945, 17554.62], [944.5, 17505.25], [944, 17736.53], [943.5, 17846.41], [943, 17845.88], [942.5, 17913.74], [942, 17897.17], [941.5, 17768.21], [941, 17794.38], [940.5, 17905.52], [940, 18000.09], [939.5, 18053.57], [939, 18096.91], [938.5, 18277.76], [938, 18325.08], [937.5, 18186.7], [937, 18061.85], [936.5, 18237.73], [936, 18138.26], [935.5, 18186.9], [935, 18252.31], [934.5, 18243.37], [934, 18044.62], [933.5, 18060.06], [933, 18079.88], [932.5, 18154.63], [932, 18257.81], [931.5, 18293.8], [931, 18155.82], [930.5, 18306.12], [930, 18308.57], [929.5, 18398.5], [929, 18316.92], [928.5, 18632.97], [928, 18562.39], [927.5, 18449.46], [927, 18449.13], [926.5, 18535.62], [926, 18540.59], [925.5, 18380.08], [925, 18606.79], [924.5, 18644.23], [924, 18616.4], [923.5, 18375.44], [923, 18388.83], [922.5, 18650.93], [922, 18751.32], [921.5, 18640.26], [921, 18619.98], [920.5, 18724.15], [920, 18829.52], [919.5, 18650.26], [919, 18647.28], [918.5, 18657.22], [918, 18847.22], [917.5, 18899.44], [917, 18882.01], [916.5, 18716.2], [916, 18762.46], [915.5, 18976.97], [915, 19026.48], [914.5, 18891.75], [914, 18895.33], [913.5, 19121.44], [913, 19154.84], [912.5, 19130.99], [912, 19116.74], [911.5, 19130.59], [911, 19100.04], [910.5, 18981.68], [910, 19078.1], [909.5, 18994.47], [909, 18848.21], [908.5, 18964.19], [908, 19252.2], [907.5, 19506.54], [907, 19515.95], [906.5, 19516.74], [906, 19455.58], [905.5, 19371.02], [905, 19305.01], [904.5, 19280.09], [904, 19379.17], [903.5, 19430.66], [903, 19572.54], [902.5, 19685.67], [902, 19528.94], [901.5, 19320.58], [901, 19199.24], [900.5, 19425.69], [900, 19631.26], [899.5, 19883.62], [899, 19834.24], [898.5, 19676.39], [898, 19552.46], [897.5, 19777.32], [897, 19929.54], [896.5, 19786.26], [896, 19600.91], [895.5, 19558.5], [895, 19570.29], [894.5, 19660.28], [894, 19632.78], [893.5, 19486.53], [893, 19657.37], [892.5, 19920.06], [892, 19715.89], [891.5, 19650.15], [891, 19883.15], [890.5, 20023.84], [890, 19835.3], [889.5, 19857.31], [889, 19950.68], [888.5, 19840.14], [888, 19874.67], [887.5, 19973.81], [887, 20170.56], [886.5, 20027.95], [886, 19898.06], [885.5, 19848.43], [885, 20050.35], [884.5, 20238.03], [884, 20280.77], [883.5, 20369.18], [883, 20351.02], [882.5, 20209.8], [882, 20172.22], [881.5, 20198.2], [881, 19899.19], [880.5, 19703.49], [880, 20310.13], [879.5, 20856.92], [879, 20829.29], [878.5, 20484.75], [878, 20303.11], [877.5, 20367.12], [877, 20609.34], [876.5, 20777.67], [876, 20650.36], [875.5, 20539.29], [875, 20519.41], [874.5, 20549.43], [874, 20478.72], [873.5, 20694.1], [873, 20940.96], [872.5, 21058.45], [872, 20787.74], [871.5, 20747.25], [871, 20644.53], [870.5, 20679.26], [870, 20641.61], [869.5, 20674.28], [869, 20756.79], [868.5, 20754.27], [868, 20917.43], [867.5, 20815.31], [867, 20883.04], [866.5, 20730.81], [866, 20839.1], [865.5, 20693.57], [865, 20737.18], [864.5, 20881.58], [864, 21004.24], [863.5, 21068.72], [863, 21164.02], [862.5, 21243.81], [862, 21157.72], [861.5, 21002.32], [861, 20998.08], [860.5, 21206.7], [860, 21518.23], [859.5, 21464.49], [859, 21258.85], [858.5, 21260.38], [858, 21236.45], [857.5, 21153.35], [857, 21087.15], [856.5, 21279.86], [856, 21358.13], [855.5, 21518.1], [855, 21572.64], [854.5, 21401.73], [854, 21114.18], [853.5, 21015.97], [853, 21298.42], [852.5, 21483.11], [852, 21550.24], [851.5, 21547.53], [851, 21514.99], [850.5, 21526.85], [850, 21500.28], [849.5, 21432.08], [849, 21361.37], [848.5, 21386.42], [848, 21428.24], [847.5, 21347.32], [847, 21357.8], [846.5, 21435.6], [846, 21758.66], [845.5, 21901.81], [845, 21836.26], [844.5, 21733.15], [844, 21744.94], [843.5, 21659.06], [843, 21560.05], [842.5, 21618.44], [842, 21848.92], [841.5, 21892.33], [841, 21946.01], [840.5, 21871.19], [840, 21880.07], [839.5, 21701.6], [839, 21878.54], [838.5, 21940.9], [838, 22018.77], [837.5, 22018.57], [837, 22273.91], [836.5, 22389.36], [836, 22526.27], [835.5, 22598.77], [835, 22629.78], [834.5, 22699.7], [834, 22753.84], [833.5, 22617.79], [833, 22459.4], [832.5, 22455.82], [832, 22604.07], [831.5, 22659.14], [831, 22781.21], [830.5, 22637.8], [830, 22549.26], [829.5, 22479.68], [829, 22623.75], [828.5, 22696.98], [828, 22730.98], [827.5, 22522.56], [827, 22385.31], [826.5, 22287.7], [826, 22440.58], [825.5, 22383.86], [825, 22624.81], [824.5, 22722.63], [824, 22906.73], [823.5, 22742.31], [823, 22700.62], [822.5, 22785.78], [822, 22741.98], [821.5, 22742.71], [821, 22767.03], [820.5, 22896.12], [820, 22887.18], [819.5, 22912.36], [819, 22909.64], [818.5, 22981.74], [818, 23145.3], [817.5, 23165.11], [817, 22964.91], [816.5, 22936.75], [816, 23026.74], [815.5, 23131.91], [815, 23154.44], [814.5, 23055.9], [814, 23023.83], [813.5, 23081.35], [813, 23045.43], [812.5, 23007.06], [812, 22882.67], [811.5, 22893.54], [811, 22964.12], [810.5, 23132.64], [810, 23108.32], [809.5, 23198.58], [809, 23308.85], [808.5, 23165.11], [808, 22991.75], [807.5, 23030.78], [807, 23225.15], [806.5, 23319.99], [806, 23431.32], [805.5, 23528.94], [805, 23487.25], [804.5, 23356.17], [804, 23310.38], [803.5, 23486.39], [803, 23721.32], [802.5, 23860.75], [802, 23805.08], [801.5, 23586.52], [801, 23467.11], [800.5, 23442.65], [800, 23561.81], [799.5, 23535.1], [799, 23555.84], [798.5, 23693.29], [798, 23616.88], [797.5, 23846.17], [797, 23986.8], [796.5, 24086.07], [796, 23916.15], [795.5, 23921.45], [795, 23731.99], [794.5, 23572.08], [794, 23723.9], [793.5, 23873.01], [793, 23735.43], [792.5, 23721.92], [792, 23810.12], [791.5, 24017.68], [791, 23945.97], [790.5, 24133.72], [790, 24182.76], [789.5, 24124.7], [789, 24244.12], [788.5, 24386.27], [788, 24338.09], [787.5, 24036.56], [787, 24222.39], [786.5, 24258.84], [786, 24398.07], [785.5, 24247.17], [785, 24287.73], [784.5, 24221.66], [784, 24242.6], [783.5, 24254.73], [783, 24394.82], [782.5, 24656.19], [782, 24782.57], [781.5, 24781.57], [781, 24588], [780.5, 24616.63], [780, 24695.42], [779.5, 24695.22], [779, 24522.26], [778.5, 24589.39], [778, 24714.38], [777.5, 24897.74], [777, 24857.32], [776.5, 24709.94], [776, 24642.8], [775.5, 24815.9], [775, 24848.57], [774.5, 24843.74], [774, 24737.24], [773.5, 24922.2], [773, 24794.1], [772.5, 24761.36], [772, 24632.2], [771.5, 24678.59], [771, 24707.22], [770.5, 24905.7], [770, 25319.29], [769.5, 25308.75], [769, 25093.24], [768.5, 24803.38], [768, 24735.18], [767.5, 24813.78], [767, 24790.98], [766.5, 24791.58], [766, 24804.24], [765.5, 24886.81], [765, 24895.69], [764.5, 25156.2], [764, 25582.84], [763.5, 25537.98], [763, 25532.41], [762.5, 25408.49], [762, 25431.35], [761.5, 25396.76], [761, 25604.45], [760.5, 25512.27], [760, 25280.06], [759.5, 25154.28], [759, 25271.44], [758.5, 25250.96], [758, 25478.34], [757.5, 25682.38], [757, 25578.6], [756.5, 25340.16], [756, 25554.28], [755.5, 25828.84], [755, 25549.64], [754.5, 25514.98], [754, 25546.4], [753.5, 25664.69], [753, 25694.24], [752.5, 25932.62], [752, 25922.94], [751.5, 25899.15], [751, 25695.64], [750.5, 25512], [750, 25436.98], [749.5, 25694.78], [749, 25845.47], [748.5, 25807.83], [748, 25797.03], [747.5, 25828.38], [747, 25902.27], [746.5, 26106.64], [746, 26231.96], [745.5, 26118.97], [745, 26039.58], [744.5, 25978.08], [744, 25882.78], [743.5, 25901.87], [743, 26165.96], [742.5, 26309.96], [742, 26118.31], [741.5, 26128.84], [741, 26164.5], [740.5, 26312.54], [740, 26256.15], [739.5, 26555.69], [739, 26419.24], [738.5, 26060.72], [738, 25861.91], [737.5, 26219.3], [737, 26358.74], [736.5, 26438.32], [736, 26570.14], [735.5, 26586.84], [735, 26534.15], [734.5, 26753.51], [734, 26838.4], [733.5, 26647.8], [733, 26610.89], [732.5, 26667.75], [732, 26555.23], [731.5, 26617.39], [731, 26691.88], [730.5, 26700.36], [730, 26575.04], [729.5, 26632.63], [729, 26304.86], [728.5, 26274.31], [728, 26318.31], [727.5, 26534.62], [727, 26494.72], [726.5, 26799.3], [726, 27072.53], [725.5, 27244.7], [725, 26931.64], [724.5, 26890.82], [724, 26873.92], [723.5, 26928.06], [723, 26633.42], [722.5, 26964.51], [722, 27253.45], [721.5, 27251.39], [721, 27081.68], [720.5, 26972.99], [720, 26914.48], [719.5, 26782.34], [719, 26952.25], [718.5, 27117.2], [718, 27410.77], [717.5, 27388.37], [717, 27273.4], [716.5, 27320.98], [716, 27538.08], [715.5, 27554.12], [715, 27385.99], [714.5, 27342.32], [714, 27474.39], [713.5, 27436.95], [713, 27421.97], [712.5, 27485.33], [712, 27346.16], [711.5, 27303.62], [711, 27586.46], [710.5, 27820.98], [710, 27531.58], [709.5, 27487.12], [709, 27635.1], [708.5, 27715.55], [708, 27699.38], [707.5, 27571.81], [707, 27540.6], [706.5, 27616.81], [706, 27955.32], [705.5, 28037.22], [705, 27862.14], [704.5, 27899.52], [704, 28220], [703.5, 28309.13], [703, 27884.27], [702.5, 27772.14], [702, 27895.28], [701.5, 28027.95], [701, 27842.52], [700.5, 27731.52], [700, 27628.01], [699.5, 27879.77], [699, 28107.47], [698.5, 28264.33], [698, 28261.28], [697.5, 28009.66], [697, 27848.49], [696.5, 27698.25], [696, 27897], [695.5, 28032.72], [695, 28226.56], [694.5, 28184.41], [694, 28162.87], [693.5, 28410.32], [693, 28557.91], [692.5, 28502.11], [692, 28015.75], [691.5, 27889.77], [691, 28009.86], [690.5, 28257.51], [690, 28357.51], [689.5, 28507.14], [689, 28440.08], [688.5, 28447.5], [688, 28775.14], [687.5, 29112.32], [687, 29353.94], [686.5, 29433.73], [686, 29284.89], [685.5, 28921.14], [685, 28982.96], [684.5, 29001.59], [684, 28669.64], [683.5, 28448.56], [683, 28351.21], [682.5, 28525.1], [682, 28617.29], [681.5, 28783.29], [681, 28420.13], [680.5, 28171.75], [680, 28308.34], [679.5, 28708.21], [679, 28885.81], [678.5, 28778.92], [678, 28699.59], [677.5, 28870.64], [677, 28820.07], [676.5, 28520.8], [676, 28491.11], [675.5, 28829.15], [675, 28953.48], [674.5, 28912.39], [674, 29069.91], [673.5, 29123.52], [673, 29178.46], [672.5, 29312.26], [672, 29372.7], [671.5, 29414.85], [671, 29369.65], [670.5, 29385.36], [670, 29107.82], [669.5, 29311.86], [669, 29197.02], [668.5, 29170.24], [668, 29036.51], [667.5, 29170.24], [667, 29343.14], [666.5, 29385.29], [666, 29404.58], [665.5, 29077.8], [665, 29261.5], [664.5, 29366.01], [664, 29625.92], [663.5, 29446.79], [663, 29514.12], [662.5, 29380.19], [662, 29415.58], [661.5, 29219.48], [661, 29245.26], [660.5, 29373.96], [660, 29722.21], [659.5, 29632.68], [659, 29533.07], [658.5, 29584.7], [658, 29607.56], [657.5, 29453.48], [657, 29480.98], [656.5, 29841.83], [656, 29783.84], [655.5, 29880.4], [655, 29762.3], [654.5, 29628.37], [654, 29551.76], [653.5, 29919.56], [653, 30130.83], [652.5, 29883.97], [652, 29965.82], [651.5, 29928.64], [651, 29984.84], [650.5, 29784.5], [650, 29818.17], [649.5, 29747.86], [649, 29788.41], [648.5, 29836.86], [648, 29911.61], [647.5, 29975.23], [647, 30013.86], [646.5, 29930.96], [646, 30055.28], [645.5, 30318.51], [645, 30441.17], [644.5, 30449.99], [644, 30331.3], [643.5, 30432.09], [643, 30404.19], [642.5, 30277.95], [642, 29834.93], [641.5, 29836.26], [641, 30314.46], [640.5, 30745.88], [640, 30798.24], [639.5, 30396.84], [639, 30289.15], [638.5, 30299.95], [638, 30541.37], [637.5, 30330.37], [637, 30318.9], [636.5, 30396.77], [636, 30528.65], [635.5, 30399.36], [635, 30223.34], [634.5, 30520.3], [634, 30688.36], [633.5, 30831.24], [633, 30459.2], [632.5, 30654.96], [632, 30558.6], [631.5, 30487.5], [631, 30130.56], [630.5, 30610.1], [630, 30927.13], [629.5, 31087.11], [629, 30783.06], [628.5, 30906.65], [628, 30922.82], [627.5, 31016.73], [627, 31038.46], [626.5, 31008.84], [626, 30815.33], [625.5, 30645.68], [625, 30920.84], [624.5, 31102.81], [624, 31199.5], [623.5, 30996.58], [623, 31141.52], [622.5, 31251.72], [622, 31341.25], [621.5, 31127.66], [621, 30991.74], [620.5, 30988.23], [620, 31110.17], [619.5, 31261.93], [619, 31302.88], [618.5, 31325.75], [618, 31195.66], [617.5, 31316.4], [617, 31352.45], [616.5, 31488.77], [616, 31298.31], [615.5, 31459.41], [615, 31275.38], [614.5, 31262.72], [614, 31288.17], [613.5, 31504.08], [613, 31594.34], [612.5, 31789.17], [612, 31795], [611.5, 31686.52], [611, 31663.33], [610.5, 31595.73], [610, 31470.15], [609.5, 31560.34], [609, 31639.14], [608.5, 31310.64], [608, 31248.74], [607.5, 31435.82], [607, 31468.23], [606.5, 31302.62], [606, 31292.81], [605.5, 31462.79], [605, 31541.66], [604.5, 31752.72], [604, 31685.66], [603.5, 31625.49], [603, 31725.75], [602.5, 31941.06], [602, 31925.16], [601.5, 31806.01], [601, 31861.87], [600.5, 31720.58], [600, 31763.39], [599.5, 32059.22], [599, 32201.84], [598.5, 31880.16], [598, 31564.25], [597.5, 31609.45], [597, 31773.47], [596.5, 31869.76], [596, 31898.65], [595.5, 31764.65], [595, 31691.16], [594.5, 31680.16], [594, 31712.23], [593.5, 31917.47], [593, 32007.53], [592.5, 31804.94], [592, 31430.12], [591.5, 31726.08], [591, 31858.89], [590.5, 32045.44], [590, 31907.66], [589.5, 31948.68], [589, 31819.46], [588.5, 32003.56], [588, 32168.64], [587.5, 32093.09], [587, 32119.99], [586.5, 32138.02], [586, 32295.01], [585.5, 32394.88], [585, 32409.86], [584.5, 32172.02], [584, 32146.37], [583.5, 32025.62], [583, 32046.9], [582.5, 32195.34], [582, 32741.21], [581.5, 32737.9], [581, 32607.81], [580.5, 32551.54], [580, 32601.91], [579.5, 32671.76], [579, 32433.52], [578.5, 32382.62], [578, 32290.84], [577.5, 32478.71], [577, 32182.95], [576.5, 31929.4], [576, 31924.76], [575.5, 31890.96], [575, 31833.11], [574.5, 31734.83], [574, 31742.65], [573.5, 31413.49], [573, 31401.76], [572.5, 31309.38], [572, 31161.53], [571.5, 30724.28], [571, 30677.09], [570.5, 30557.68], [570, 30548.6], [569.5, 30502.94], [569, 30281.46], [568.5, 29969.99], [568, 29366.6], [567.5, 29539.9], [567, 29594.64], [566.5, 29883.58], [566, 29462.7], [565.5, 29207.16], [565, 29106.69], [564.5, 29570.58], [564, 30085.83], [563.5, 30305.92], [563, 30827.53], [562.5, 31291.55], [562, 31917.34], [561.5, 32334.18], [561, 33259.51], [560.5, 33883.38], [560, 34361.05], [559.5, 34825.4], [559, 35635.42], [558.5, 36242.19], [558, 36863.87], [557.5, 37608.75], [557, 38144.34], [556.5, 38138.18], [556, 37943.94], [555.5, 37688.94], [555, 37196.08], [554.5, 36459.76], [554, 35708.59], [553.5, 34845.02], [553, 33937.18], [552.5, 32761.88], [552, 31649.81], [551.5, 30526.6], [551, 29475.75], [550.5, 28589.39], [550, 27724.89], [549.5, 26760.2], [549, 25885.24], [548.5, 25084.23], [548, 24259.17], [547.5, 23462.14], [547, 22487.37], [546.5, 21485.7], [546, 20552.94], [545.5, 20006.28], [545, 18995.79], [544.5, 18130.18], [544, 17276.95], [543.5, 16594.56], [543, 15866.85], [542.5, 14973.66], [542, 14082], [541.5, 12980.92], [541, 12163.81], [540.5, 11381.56], [540, 10967.7], [539.5, 10326.54], [539, 9929.98], [538.5, 10041.84], [538, 10485.46], [537.5, 11176.85], [537, 12436.31], [536.5, 14968.76], [536, 19492.82], [535.5, 29299.67], [535, 49899], [534.5, 82889.92], [534, 119107.46], [533.5, 144446.96], [533, 150052.55], [532.5, 135487.04], [532, 103864.54], [531.5, 66081.9], [531, 35619.92], [530.5, 19634.84], [530, 13632.42], [529.5, 11458.9], [529, 10179.22], [528.5, 9473.38], [528, 9005.51], [527.5, 8620.48], [527, 8404.37], [526.5, 8256.06], [526, 8059.57], [525.5, 7855.46], [525, 7922.79], [524.5, 7958.77], [524, 7793.89], [523.5, 7622.65], [523, 7594.75], [522.5, 7599.72], [522, 7505.75], [521.5, 7590.84], [521, 7669.37], [520.5, 7742.47], [520, 7692.9], [519.5, 7576.53], [519, 7413.04], [518.5, 7487.53], [518, 7472.62], [517.5, 7584.61], [517, 7660.29], [516.5, 7614.77], [516, 7485.41], [515.5, 7481.56], [515, 7595.61], [514.5, 7560.03], [514, 7494.88], [513.5, 7515.03], [513, 7682.89], [512.5, 7730.94], [512, 7572.88], [511.5, 7546.51], [511, 7568.91], [510.5, 7629.88], [510, 7750.75], [509.5, 7859.9], [509, 7814.17], [508.5, 7718.61], [508, 7684.02], [507.5, 7770.83], [507, 7884.15], [506.5, 7989.59], [506, 7885.74], [505.5, 7773.48], [505, 7706.09], [504.5, 7808.08], [504, 7881.37], [503.5, 7822.72], [503, 7743.4], [502.5, 7778.19], [502, 7860.69], [501.5, 7740.61], [501, 7708.74], [500.5, 7782.56], [500, 8054.73], [499.5, 8295.16], [499, 8448.31], [498.5, 8255.6], [498, 7912.05], [497.5, 7616.49], [497, 7668.45], [496.5, 7788.06], [496, 7806.62], [495.5, 7771.83], [495, 7806.82], [494.5, 7790.65], [494, 7699.99], [493.5, 7692.37], [493, 7754.13], [492.5, 7855.66], [492, 7770.96], [491.5, 7657.44], [491, 7619.94], [490.5, 7714.77], [490, 7753.01], [489.5, 7829.35], [489, 7828.75], [488.5, 7756.98], [488, 7653.87], [487.5, 7680.11], [487, 7700.52], [486.5, 7778.98], [486, 7784.68], [485.5, 7773.55], [485, 7641.27], [484.5, 7603.7], [484, 7643.99], [483.5, 7816.69], [483, 7786.67], [482.5, 7853.74], [482, 7871.3], [481.5, 7909.87], [481, 7843.07], [480.5, 7762.15], [480, 7567.71], [479.5, 7580.64], [479, 7777.92], [478.5, 7838.83], [478, 7816.89], [477.5, 7869.91], [477, 7921.53], [476.5, 7879.58], [476, 7833.86], [475.5, 7790.18], [475, 7853.47], [474.5, 7861.36], [474, 7864.87], [473.5, 7830.94], [473, 7764.74], [472.5, 7675.4], [472, 7712.32], [471.5, 7744.06], [471, 7718.94], [470.5, 7757.31], [470, 7803.84], [469.5, 7786.07], [469, 7710.2], [468.5, 7821.73], [468, 7975.54], [467.5, 7938.83], [467, 7697.34], [466.5, 7619.47], [466, 7778.59], [465.5, 7798.33], [465, 7782.43], [464.5, 7759.63], [464, 7729.61], [463.5, 7685.34], [463, 7867.98], [462.5, 8057.12], [462, 7995.82], [461.5, 7864.74], [461, 7829.68], [460.5, 7948.5], [460, 7957.38], [459.5, 7878.19], [459, 7810.4], [458.5, 7975.87], [458, 7972.23], [457.5, 7780.57], [457, 7687.86], [456.5, 7805.16], [456, 7851.42], [455.5, 7865.86], [455, 7942.54], [454.5, 8022.92], [454, 7904.5], [453.5, 7876], [453, 7868.05], [452.5, 7940.35], [452, 7984.82], [451.5, 7951.62], [451, 7927.1], [450.5, 7973.22], [450, 8095.89], [449.5, 8093.1], [449, 8086.01], [448.5, 8076.93], [448, 8035.71], [447.5, 8089.46], [447, 8129.29], [446.5, 8031.54], [446, 7966.79], [445.5, 7969.11], [445, 8035.52], [444.5, 7957.25], [444, 7938.43], [443.5, 7877.06], [443, 7922.86], [442.5, 7992.44], [442, 7953.21], [441.5, 7871.83], [441, 7794.36], [440.5, 7893.96], [440, 7905.16], [439.5, 8041.35], [439, 8037.83], [438.5, 8128.56], [438, 8056.46], [437.5, 8011.79], [437, 7846.05], [436.5, 7878.92], [436, 8014.77], [435.5, 8159.57], [435, 8161.16], [434.5, 8117.23], [434, 8046.91], [433.5, 8158.18], [433, 8153.54], [432.5, 7984.95], [432, 8008.94], [431.5, 8160.1], [431, 8214.64], [430.5, 8026.37], [430, 8113.12], [429.5, 8168.06], [429, 8233.27], [428.5, 8176.6], [428, 8102.85], [427.5, 8055.66], [427, 8051.15], [426.5, 7969.58], [426, 7965.93], [425.5, 8039.96], [425, 8085.42], [424.5, 8109.94], [424, 8175.68], [423.5, 8198.87], [423, 8060.76], [422.5, 7990.12], [422, 7903.17], [421.5, 7878.26], [421, 7984.62], [420.5, 8112.59], [420, 8182.24], [419.5, 8167.66], [419, 8250.23], [418.5, 8147.18], [418, 8108.08], [417.5, 8082.24], [417, 8183.03], [416.5, 8076.6], [416, 8196.62], [415.5, 8333.4], [415, 8374.62], [414.5, 8248.57], [414, 8195.62], [413.5, 8182.77], [413, 8089.86], [412.5, 8190.06], [412, 8334.19], [411.5, 8438.37], [411, 8299], [410.5, 8074.35], [410, 8211.46], [409.5, 8380.65], [409, 8440.69], [408.5, 8416.57], [408, 8561.5], [407.5, 8442.02], [407, 8347.05], [406.5, 8328.76], [406, 8413.98], [405.5, 8385.09], [405, 8419.75], [404.5, 8400.13], [404, 8296.42], [403.5, 8257.65], [403, 8202.05], [402.5, 8378.2], [402, 8400], [401.5, 8393.84], [401, 8327.57], [400.5, 8369.12], [400, 8432.54], [399.5, 8332.74], [399, 8205.56], [398.5, 8069.58], [398, 8250.76], [397.5, 8477.01], [397, 8468.86], [396.5, 8309.41], [396, 8219.81], [395.5, 8285.82], [395, 8235.52], [394.5, 8303.05], [394, 8207.82], [393.5, 8067.66], [393, 8054.73], [392.5, 8180.58], [392, 8273.56], [391.5, 8270.58], [391, 8322.53], [390.5, 8285.62], [390, 8453.68], [389.5, 8500.2], [389, 8411.86], [388.5, 8297.55], [388, 8303.84], [387.5, 8259.64], [387, 8385.82], [386.5, 8456.2], [386, 8466.4], [385.5, 8334.33], [385, 8517.5], [384.5, 8470.11], [384, 8593.91], [383.5, 8641.09], [383, 8677.74], [382.5, 8516.17], [382, 8589.2], [381.5, 8633.87], [381, 8676.68], [380.5, 8437.31], [380, 8394.5], [379.5, 8299.87], [379, 8487.94], [378.5, 8554.28], [378, 8589.33], [377.5, 8647.85], [377, 8659.98], [376.5, 8627.7], [376, 8456.99], [375.5, 8593.97], [375, 8616.57], [374.5, 8563.22], [374, 8564.62], [373.5, 8824.99], [373, 8869.79], [372.5, 8791.59], [372, 8845.14], [371.5, 8803.92], [371, 8629.23], [370.5, 8504.51], [370, 8650.1], [369.5, 8621.87], [369, 8598.15], [368.5, 8600.53], [368, 8619.35], [367.5, 8612.26], [367, 8634.07], [366.5, 8667.4], [366, 8756.4], [365.5, 8887.82], [365, 8877.01], [364.5, 8726.98], [364, 8781.12], [363.5, 8849.78], [363, 8889.87], [362.5, 8908.56], [362, 8960.12], [361.5, 8882.25], [361, 8820.02], [360.5, 8876.09], [360, 8857.73], [359.5, 8883.04], [359, 8884.37], [358.5, 8976.95], [358, 8954.22], [357.5, 9014.46], [357, 9017.7], [356.5, 9001.27], [356, 8887.88], [355.5, 8882.51], [355, 9055.68], [354.5, 9172.45], [354, 9210.82], [353.5, 9141.56], [353, 9055.94], [352.5, 9063.83], [352, 8903.32], [351.5, 8927.31], [351, 8862.3], [350.5, 9088.94], [350, 9055.01], [349.5, 9126.19], [349, 9272.31], [348.5, 9423.21], [348, 9395.84], [347.5, 9069.79], [347, 9016.51], [346.5, 9116.12], [346, 9288.29], [345.5, 9342.76], [345, 9341.9], [344.5, 9359.39], [344, 9210.95], [343.5, 9130.56], [343, 9015.19], [342.5, 9036.53], [342, 9148.59], [341.5, 9348.39], [341, 9352.44], [340.5, 9399.22], [340, 9436.2], [339.5, 9390.47], [339, 9398.82], [338.5, 9446.6], [338, 9355.88], [337.5, 9299.22], [337, 9479.28], [336.5, 9590.68], [336, 9419.9], [335.5, 9346.21], [335, 9397.3], [334.5, 9519.3], [334, 9656.48], [333.5, 9711.22], [333, 9662.31], [332.5, 9650.72], [332, 9664.17], [331.5, 9667.55], [331, 9688.69], [330.5, 9768.28], [330, 9818.45], [329.5, 9807.25], [329, 9889.62], [328.5, 9890.68], [328, 9950.99], [327.5, 9872.32], [327, 9829.45], [326.5, 9814.2], [326, 9889.75], [325.5, 9897.84], [325, 9910.3], [324.5, 9961.72], [324, 10146.42], [323.5, 10325.88], [323, 10356.96], [322.5, 10283.8], [322, 10235.09], [321.5, 10376.24], [321, 10429.59], [320.5, 10341.38], [320, 10234.75], [319.5, 10352.78], [319, 10441.98], [318.5, 10311.63], [318, 10179.02], [317.5, 10392.21], [317, 10641.39], [316.5, 10633.64], [316, 10606.99], [315.5, 10670.15], [315, 10840.6], [314.5, 10825.49], [314, 10862.2], [313.5, 10865.98], [313, 10785.53], [312.5, 10710.91], [312, 10521.44], [311.5, 10619.78], [311, 10634.56], [310.5, 10781.42], [310, 10591.82], [309.5, 10689.83], [309, 10847.82], [308.5, 11063.13], [308, 11231.66], [307.5, 11139.01], [307, 10957.7], [306.5, 10760.87], [306, 10940.93], [305.5, 10952.06], [305, 11014.75], [304.5, 10962.67], [304, 10872.27], [303.5, 10672.93], [303, 10548.34], [302.5, 10438.14], [302, 10555.37], [301.5, 10513.09], [301, 10338.2], [300.5, 10170.67], [300, 10088.03], [299.5, 10033.09], [299, 9937.87], [298.5, 9921.1], [298, 9689.22], [297.5, 9454.29], [297, 9363.17], [296.5, 9353.16], [296, 9274.43], [295.5, 8967.94], [295, 8943.95], [294.5, 8925.26], [294, 9021.48], [293.5, 9012.67], [293, 9142.49], [292.5, 9481.2], [292, 10106.46], [291.5, 11348.09], [291, 12853.42], [290.5, 13892.67], [290, 13609.76], [289.5, 12709.94], [289, 12499.14], [288.5, 13534.81], [288, 16593.37], [287.5, 24567.59], [287, 38949.86], [286.5, 49519.54], [286, 44159.75], [285.5, 27805.88], [285, 14883.8], [284.5, 10559.41], [284, 9555.62], [283.5, 9148.59], [283, 8693.38], [282.5, 8619.89], [282, 8760.97], [281.5, 8708.42], [281, 8450.37], [280.5, 8454.54], [280, 8521.41], [279.5, 8597.02], [279, 8418.49], [278.5, 8321.4], [278, 8294.76], [277.5, 8422.53], [277, 8418.89], [276.5, 8271.11], [276, 8138.5], [275.5, 8117.09], [275, 8129.95], [274.5, 8173.82], [274, 8345.26], [273.5, 8429.23], [273, 8424.85], [272.5, 8369.78], [272, 8434.4], [271.5, 8602.19], [271, 8852.63], [270.5, 8871.58], [270, 8640.83], [269.5, 8497.95], [269, 8447.38], [268.5, 8419.48], [268, 8349.77], [267.5, 8384.43], [267, 8476.61], [266.5, 8470.78], [266, 8303.45], [265.5, 8235.65], [265, 8341.82], [264.5, 8446.32], [264, 8393.37], [263.5, 8275.68], [263, 8153.48], [262.5, 8175.35], [262, 8340.29], [261.5, 8415.04], [261, 8329.95], [260.5, 8210.27], [260, 8247.18], [259.5, 8269.25], [259, 8268.92], [258.5, 8198.08], [258, 8236.78], [257.5, 8282.84], [257, 8349.3], [256.5, 8393.18], [256, 8500.86], [255.5, 8407.42], [255, 8396.75], [254.5, 8465.48], [254, 8530.95], [253.5, 8523.99], [253, 8451.96], [252.5, 8406.83], [252, 8358.85], [251.5, 8452.09], [251, 8508.15], [250.5, 8449.77], [250, 8276.21], [249.5, 8254.41], [249, 8418.49], [248.5, 8462.1], [248, 8287.41], [247.5, 8247.51], [247, 8311.33], [246.5, 8417.5], [246, 8459.78], [245.5, 8529.29], [245, 8580.72], [244.5, 8595.43], [244, 8578], [243.5, 8446.72], [243, 8482.97], [242.5, 8545.99], [242, 8625.12], [241.5, 8562.5], [241, 8558.06], [240.5, 8546.86], [240, 8540.96], [239.5, 8614.52], [239, 8679.46], [238.5, 8603.25], [238, 8532.01], [237.5, 8499.54], [237, 8595.7], [236.5, 8545.26], [236, 8504.84], [235.5, 8604.25], [235, 8629.83], [234.5, 8639.37], [234, 8517.83], [233.5, 8495.36], [233, 8419.68], [232.5, 8607.29], [232, 8720.75], [231.5, 8716.44], [231, 8626.31], [230.5, 8466.4], [230, 8546.52], [229.5, 8566.27], [229, 8551.56], [228.5, 8486.81], [228, 8652.69], [227.5, 8659.71], [227, 8623.07], [226.5, 8657.53], [226, 8598.08], [225.5, 8582.91], [225, 8616.11], [224.5, 8615.25], [224, 8534.6], [223.5, 8493.51], [223, 8496.49], [222.5, 8522.2], [222, 8638.37], [221.5, 8704.58], [221, 8674.16], [220.5, 8600.93], [220, 8615.84], [219.5, 8662.63], [219, 8642.42], [218.5, 8636.98], [218, 8728.83], [217.5, 8852.1], [217, 8757.79], [216.5, 8837.78], [216, 8767.07], [215.5, 8835], [215, 8698.61], [214.5, 8824.26], [214, 8701.86], [213.5, 8642.81], [213, 8683.9], [212.5, 8938.51], [212, 8933.28], [211.5, 8684.17], [211, 8565.21], [210.5, 8786.02], [210, 8750.11], [209.5, 8619.29], [209, 8643.41], [208.5, 8813.92], [208, 8777.34], [207.5, 8628.83], [207, 8533.8], [206.5, 8643.34], [206, 8756.33], [205.5, 8829.1], [205, 8813.59], [204.5, 8814.65], [204, 8782.98], [203.5, 8770.38], [203, 8809.15], [202.5, 8886.62], [202, 9059.92], [201.5, 9193.25], [201, 9322.22], [200.5, 9506.58], [200, 9657.48], [199.5, 9807.71], [199, 9681.4], [198.5, 9279.27], [198, 8852.63], [197.5, 8742.42], [197, 8854.08], [196.5, 8830.42], [196, 8804.12], [195.5, 8800.07], [195, 8833.14], [194.5, 8633.8], [194, 8570.51], [193.5, 8694.77], [193, 8785.89], [192.5, 8856.34], [192, 8947.52], [191.5, 8967.74], [191, 8756.8], [190.5, 8701.07], [190, 8786.22], [189.5, 8823.4], [189, 8670.18], [188.5, 8649.18], [188, 8735.2], [187.5, 8717.77], [187, 8702.06], [186.5, 8757.2], [186, 8876.02], [185.5, 8877.74], [185, 8934.2], [184.5, 8978.87], [184, 8968.8], [183.5, 9052.5], [183, 9106.51], [182.5, 9079.27], [182, 8910.08], [181.5, 8978.61], [181, 9087.49], [180.5, 9106.04], [180, 9145.94], [179.5, 9138.45], [179, 9161.97], [178.5, 9066.02], [178, 9066.55], [177.5, 9154.55], [177, 9225.86], [176.5, 9085.3], [176, 9044.48], [175.5, 9162.84], [175, 9283.12], [174.5, 9266.02], [174, 9274.24], [173.5, 9327.12], [173, 9259.13], [172.5, 9175.29], [172, 9117.64], [171.5, 9255.88], [171, 9311.88], [170.5, 9382.85], [170, 9361.71], [169.5, 9347.73], [169, 9362.18], [168.5, 9396.11], [168, 9330.96], [167.5, 9370], [167, 9325.86], [166.5, 9232.29], [166, 9119.1], [165.5, 9201.87], [165, 9305.65], [164.5, 9399.75], [164, 9287.22], [163.5, 9067.27], [163, 8978.54], [162.5, 9137.98], [162, 9135.2], [161.5, 9187.02], [161, 9166.88], [160.5, 9204.45], [160, 9108.16], [159.5, 9310.75], [159, 9375.17], [158.5, 9291.47], [158, 9287.03], [157.5, 9373.38], [157, 9425.93], [156.5, 9425.4], [156, 9433.55], [155.5, 9459.86], [155, 9395.78], [154.5, 9319.56], [154, 9157.67], [153.5, 9170.52], [153, 9241.76], [152.5, 9229.84], [152, 9197.96], [151.5, 9190.8], [151, 9321.55], [150.5, 9450.58], [150, 9542.83], [149.5, 9565.89], [149, 9551.38], [148.5, 9572.72], [148, 9783.85], [147.5, 9907.78], [147, 10050.13], [146.5, 10084.79], [146, 10375.25], [145.5, 10461.33], [145, 10521.51], [144.5, 10604.01], [144, 10740.06], [143.5, 10743.64], [143, 10727.08], [142.5, 10833.7], [142, 10813.82], [141.5, 10677.17], [141, 10442.11], [140.5, 10204.54], [140, 10049.2], [139.5, 9933.56], [139, 9791.74], [138.5, 9626.53], [138, 9476.29], [137.5, 9257.93], [137, 9060.18], [136.5, 8995.44], [136, 8965.22], [135.5, 8774.56], [135, 8516.77], [134.5, 8213.05], [134, 7996.48], [133.5, 7810.53], [133, 7714.9], [132.5, 7563.27], [132, 7518.08], [131.5, 7269.37], [131, 6985.07], [130.5, 6817.87], [130, 6858.56], [129.5, 6708.46], [129, 6512.16], [128.5, 6331.05], [128, 6272.47], [127.5, 6188.9], [127, 6142.64], [126.5, 6086.45], [126, 6174.65], [125.5, 6367.96], [125, 6628.14], [124.5, 7065.92], [124, 7752.61], [123.5, 8782.18], [123, 10565.51], [122.5, 13916.52], [122, 20221.46], [121.5, 29163.62], [121, 36788.19], [120.5, 37611.8], [120, 30863.05], [119.5, 21653.76], [119, 14497.51], [118.5, 10682.48], [118, 8733.94], [117.5, 7824.11], [117, 7159.09], [116.5, 6687.52], [116, 6465.78], [115.5, 6214.41], [115, 6012.95], [114.5, 5795.52], [114, 5776.63], [113.5, 5667.62], [113, 5572.52], [112.5, 5468.94], [112, 5404.72], [111.5, 5422.15], [111, 5421.16], [110.5, 5327.19], [110, 5308.57], [109.5, 5394.59], [109, 5533.02], [108.5, 5509.63], [108, 5417.05], [107.5, 5328.85], [107, 5367.75], [106.5, 5495.91], [106, 5570.86], [105.5, 5634.81], [105, 5620.63], [104.5, 5733.69], [104, 5743.56], [103.5, 5813.08], [103, 5909.44], [102.5, 6073.52], [102, 6098.64], [101.5, 6150.26], [101, 6225.02], [100.5, 6291.68], [100, 6406.86], [99.5, 6511.7], [99, 6650.47], [98.5, 6658.16], [98, 6561.73], [97.5, 6383.87], [97, 6226.54], [96.5, 6176.71], [96, 6119.98], [95.5, 5984.39], [95, 5813.41], [94.5, 5820.17], [94, 5778.16], [93.5, 5547.93], [93, 5357.08], [92.5, 5332.03], [92, 5282.46], [91.5, 5111.48], [91, 4915.12], [90.5, 4712.33], [90, 4569.59], [89.5, 4416.44], [89, 4317.7], [88.5, 4065.47], [88, 3894.76], [87.5, 3695.95], [87, 3565.86], [86.5, 3331.99], [86, 3171.42], [85.5, 3080.83], [85, 2961.88], [84.5, 2846.83], [84, 2740.34], [83.5, 2712.37], [83, 2559.42], [82.5, 2355.77], [82, 2294.01], [81.5, 2323.03], [81, 2373.13], [80.5, 2462.46], [80, 2609.72], [79.5, 2849.61], [79, 3169.77], [78.5, 3639.16], [78, 4677.34], [77.5, 7945.45], [77, 15881.36], [76.5, 28204.56], [76, 37201.06], [75.5, 34356.88], [75, 21833.48], [74.5, 10118.38], [74, 4740.3], [73.5, 3368.05], [73, 3027.28], [72.5, 2747.23], [72, 2538.94], [71.5, 2389.04], [71, 2309.38], [70.5, 2185.06], [70, 2086.32], [69.5, 2090.36], [69, 2133.57], [68.5, 2117.06], [68, 2092.94], [67.5, 2117.59], [67, 2215.54], [66.5, 2211.04], [66, 2208.32], [65.5, 2200.9], [65, 2205.14], [64.5, 2102.95], [64, 2084.79], [63.5, 2112.89], [63, 2156.03], [62.5, 2167.3], [62, 2164.91], [61.5, 2168.82], [61, 2199.97], [60.5, 2184.93], [60, 2157.42], [59.5, 2164.45], [59, 2207.52], [58.5, 2172.2], [58, 2158.75], [57.5, 2168.16], [57, 2175.85], [56.5, 2180.55], [56, 2237.54], [55.5, 2358.49], [55, 2398.05], [54.5, 2357.63], [54, 2274.39], [53.5, 2282.21], [53, 2352.06], [52.5, 2416.8], [52, 2516.87], [51.5, 2550.6], [51, 2529.99], [50.5, 2448.15], [50, 2485.92], [49.5, 2531.19], [49, 2564.26], [48.5, 2521.05], [48, 2498.52], [47.5, 2419.06], [47, 2413.42], [46.5, 2387.98], [46, 2426.74], [45.5, 2318], [45, 2208.65], [44.5, 2137.34], [44, 2164.98], [43.5, 2128], [43, 2056.03], [42.5, 1961.13], [42, 1864.11], [41.5, 1778.89], [41, 1786.11], [40.5, 1766.89], [40, 1763.18], [39.5, 1729.72], [39, 1774.18], [38.5, 1766.69], [38, 1658.94], [37.5, 1553.04], [37, 1582.73], [36.5, 1654.5], [36, 1634.68], [35.5, 1611.89], [35, 1588.89], [34.5, 1569.61], [34, 1606.65], [33.5, 1668.15], [33, 1682.33], [32.5, 1755.76], [32, 1871.8], [31.5, 1978.56], [31, 2073.19], [30.5, 2196.19], [30, 2366.9], [29.5, 2602.76], [29, 2864.86], [28.5, 3205.42], [28, 3627.82], [27.5, 4173.49], [27, 4748.58], [26.5, 5245.74], [26, 5688.63], [25.5, 5921.57], [25, 6038.47], [24.5, 5642.83], [24, 4908.23], [23.5, 3907.48], [23, 2891.96], [22.5, 2017], [22, 1418.64], [21.5, 1205.98], [21, 1052.9], [20.5, 929.44], [20, 832.15], [19.5, 785.23], [19, 736.72], [18.5, 668.27], [18, 653.42], [17.5, 630.96], [17, 650.64], [16.5, 659.45], [16, 701.93], [15.5, 761.77], [15, 803.59], [14.5, 888.81], [14, 986.17], [13.5, 1163.84], [13, 1337.79], [12.5, 1598.63], [12, 1778.95], [11.5, 1857.29], [11, 1869.21], [10.5, 1815.73], [10, 1779.62], [9.5, 1819.11], [9, 1923.22], [8.5, 1990.95], [8, 2044.17], [7.5, 2067.43], [7, 2024.09], [6.5, 1719.44], [6, 1264.9], [5.5, 736.46], [5, 382.11], [4.5, 163.49], [4, 125.58], [3.5, 116.3], [3, 85.16], [2.5, 61.56], [2, 64.55], [1.5, 62.63], [1, 48.84], [0.5, 43.34], [0, 60.31]]\r\n}\r\n\r\n\r\nvar datapoint4Peakinfo = {\r\n\"PeakInfo\":[\r\n{\"xval\":1227.00,\"yval\":63467.60, \"lbltext\":\"C KLL\"},\r\n{\"xval\":975.00,\"yval\":83992.00, \"lbltext\":\"O KLL\"},\r\n{\"xval\":931.00,\"yval\":79357.00, \"lbltext\":\"Co 2s\"},\r\n{\"xval\":780.00,\"yval\":64245.70, \"lbltext\":\"Co 2p\"},\r\n{\"xval\":711.00,\"yval\":37088.20, \"lbltext\":\"Fe 2p\"},\r\n{\"xval\":639.50,\"yval\":16481.00, \"lbltext\":\"Ni LMM\"},\r\n{\"xval\":530.00,\"yval\":49274.40, \"lbltext\":\"O 1s\"},\r\n{\"xval\":284.50,\"yval\":33039.80, \"lbltext\":\"C1s\"},\r\n{\"xval\":101.50,\"yval\":11506.10, \"lbltext\":\"Co, Fe 3s\"},\r\n{\"xval\":61.00,\"yval\":9889.54, \"lbltext\":\"Co, Fe 3p\"},\r\n{\"xval\":21.50,\"yval\":3442.19, \"lbltext\":\"O2s\"}\r\n]\r\n}\r\n\r\nvar datapoint4 = { \"label\": \"Kovar sheet, 700C treatment survey\", \"data\": [[1350,50357.8],[1349.5,50948.9],[1349,52165.5],[1348.5,51605],[1348,52457.9],[1347.5,53215.9],[1347,52567.4],[1346.5,52448.9],[1346,52392.2],[1345.5,52294.9],[1345,52942.7],[1344.5,51488.2],[1344,51042.9],[1343.5,51800.4],[1343,52303.6],[1342.5,52938.7],[1342,53474.6],[1341.5,52523.8],[1341,54189.4],[1340.5,52351.5],[1340,52623.9],[1339.5,52179.5],[1339,51626.7],[1338.5,52807.4],[1338,52489.1],[1337.5,50753.6],[1337,52078.4],[1336.5,54561.6],[1336,52389.2],[1335.5,52422],[1335,52515.3],[1334.5,53370.6],[1334,53070.8],[1333.5,52393.5],[1333,52349.3],[1332.5,52181.5],[1332,51055.4],[1331.5,52442.4],[1331,52823.9],[1330.5,52822.6],[1330,54022.3],[1329.5,53259],[1329,53585.7],[1328.5,53541],[1328,52668],[1327.5,53471.1],[1327,51946.5],[1326.5,51733.6],[1326,51999.2],[1325.5,52459.5],[1325,53982],[1324.5,54009.5],[1324,53760.6],[1323.5,53118.7],[1323,53704.4],[1322.5,52952.5],[1322,53034.9],[1321.5,54288.3],[1321,53547.5],[1320.5,52880.2],[1320,53470.4],[1319.5,53655.7],[1319,52952.4],[1318.5,53381.5],[1318,52655.4],[1317.5,52830.4],[1317,53167.9],[1316.5,53145.8],[1316,52379.5],[1315.5,51992.7],[1315,54122.7],[1314.5,53480.7],[1314,53129.2],[1313.5,53975],[1313,53677.1],[1312.5,52859.7],[1312,51979.4],[1311.5,52523.2],[1311,53557.1],[1310.5,54537.4],[1310,53726],[1309.5,54592.3],[1309,54271.5],[1308.5,53078.7],[1308,53059.5],[1307.5,53723.1],[1307,54344.6],[1306.5,54308.2],[1306,53857.4],[1305.5,53107.3],[1305,54098.4],[1304.5,53789.3],[1304,54613.6],[1303.5,54430.7],[1303,52229.8],[1302.5,53568.9],[1302,54602.5],[1301.5,53841.6],[1301,53282.4],[1300.5,54735.8],[1300,54510.8],[1299.5,52934],[1299,53803],[1298.5,54880.2],[1298,54148.5],[1297.5,53136.1],[1297,53153.6],[1296.5,53443.7],[1296,54153.3],[1295.5,52534],[1295,53475.5],[1294.5,54723.4],[1294,54878.6],[1293.5,54765.9],[1293,55105.9],[1292.5,55737.6],[1292,54564],[1291.5,55353.9],[1291,55022],[1290.5,53494.9],[1290,55765.9],[1289.5,54472.7],[1289,55384.7],[1288.5,55533.6],[1288,55220.8],[1287.5,55226.2],[1287,54328],[1286.5,55208.1],[1286,54161.5],[1285.5,54303.8],[1285,54923.7],[1284.5,54806.2],[1284,55142.6],[1283.5,55006.1],[1283,54749.1],[1282.5,55671.7],[1282,55205.7],[1281.5,55423.6],[1281,55064.1],[1280.5,55431.7],[1280,55568.4],[1279.5,55736.5],[1279,56562.7],[1278.5,57012.3],[1278,55933.5],[1277.5,55367],[1277,56482.1],[1276.5,56509.2],[1276,55088.5],[1275.5,55205.2],[1275,55728.7],[1274.5,55977.4],[1274,55560.3],[1273.5,56605.4],[1273,56329.2],[1272.5,55462.3],[1272,55535.3],[1271.5,56546.4],[1271,56984.8],[1270.5,57294.8],[1270,55764.9],[1269.5,56670.4],[1269,55861.1],[1268.5,56011.8],[1268,55938.1],[1267.5,56502.1],[1267,57852],[1266.5,55841.1],[1266,56463.8],[1265.5,56356.8],[1265,57029.9],[1264.5,56989.6],[1264,54648.8],[1263.5,55837.7],[1263,56600.8],[1262.5,56925.9],[1262,56539],[1261.5,57435.3],[1261,57724.9],[1260.5,56814.4],[1260,56422.2],[1259.5,56279.8],[1259,56784.5],[1258.5,58107.4],[1258,58310.8],[1257.5,56930.3],[1257,57339],[1256.5,56884],[1256,59123.1],[1255.5,57553],[1255,56924.3],[1254.5,58218.3],[1254,57939.5],[1253.5,58707],[1253,58024.2],[1252.5,58711.7],[1252,58549.6],[1251.5,58348.5],[1251,58899.2],[1250.5,59356],[1250,59104.6],[1249.5,57884],[1249,58074.9],[1248.5,58730],[1248,59261.9],[1247.5,60209.8],[1247,58985.5],[1246.5,60709.9],[1246,58502.9],[1245.5,59342.7],[1245,59697.2],[1244.5,60764.5],[1244,59644],[1243.5,60971],[1243,60376],[1242.5,59688.4],[1242,59423.8],[1241.5,60037.9],[1241,59450.7],[1240.5,60536.2],[1240,60774],[1239.5,59987.2],[1239,59745.9],[1238.5,59743.9],[1238,59764.2],[1237.5,58146.6],[1237,59289.7],[1236.5,58449.1],[1236,59725.3],[1235.5,60022.7],[1235,60340.7],[1234.5,60657.4],[1234,60809.9],[1233.5,60812.1],[1233,59158.9],[1232.5,60385.6],[1232,60303.3],[1231.5,61826.1],[1231,61184.8],[1230.5,61764.4],[1230,61678.1],[1229.5,61713.9],[1229,62468.7],[1228.5,63096.6],[1228,61623.5],[1227.5,62238.6],[1227,63467.6],[1226.5,63076.3],[1226,62287.4],[1225.5,62570.1],[1225,62697.4],[1224.5,61174],[1224,61331.4],[1223.5,62011.9],[1223,61419.3],[1222.5,62139.4],[1222,62125.1],[1221.5,62478.5],[1221,61157.6],[1220.5,62449.1],[1220,61440.3],[1219.5,60984.2],[1219,61136],[1218.5,61141],[1218,61269.6],[1217.5,59706.8],[1217,60210.3],[1216.5,60969.1],[1216,60842.5],[1215.5,59534.9],[1215,59001.8],[1214.5,59099.1],[1214,58678.5],[1213.5,58457.7],[1213,58967.4],[1212.5,58962.9],[1212,57971.4],[1211.5,57704.3],[1211,57380.3],[1210.5,59028.7],[1210,57573.9],[1209.5,58248.4],[1209,57846.6],[1208.5,59416.7],[1208,57655.6],[1207.5,57933.4],[1207,58079.9],[1206.5,57478.3],[1206,57892.9],[1205.5,57101.6],[1205,57774.1],[1204.5,58675.8],[1204,58739.3],[1203.5,59682.2],[1203,58756.1],[1202.5,58848.2],[1202,57331.1],[1201.5,59447.1],[1201,58650.7],[1200.5,58711],[1200,60496.5],[1199.5,60056.1],[1199,58261.6],[1198.5,57497.3],[1198,58849.1],[1197.5,58523.9],[1197,59299.2],[1196.5,58281.4],[1196,59171.3],[1195.5,58680.7],[1195,59219.9],[1194.5,60367.5],[1194,58536.5],[1193.5,59778.8],[1193,60021.5],[1192.5,58666],[1192,59190.5],[1191.5,59036.6],[1191,57864.2],[1190.5,59785.1],[1190,59861.6],[1189.5,59657.6],[1189,59414.7],[1188.5,59214.9],[1188,59779.5],[1187.5,59199.3],[1187,60365.3],[1186.5,60061.1],[1186,58624.5],[1185.5,59231.1],[1185,59518],[1184.5,59521],[1184,60289.7],[1183.5,61277.1],[1183,60372.5],[1182.5,59951],[1182,61358.4],[1181.5,59903],[1181,59553],[1180.5,60458.4],[1180,61052.6],[1179.5,61643.4],[1179,59269],[1178.5,60158.4],[1178,59127.4],[1177.5,61053.1],[1177,61540.2],[1176.5,61125.4],[1176,61246.2],[1175.5,61057.2],[1175,61389.7],[1174.5,60803],[1174,59960.9],[1173.5,61073.6],[1173,60260],[1172.5,61464],[1172,61344.5],[1171.5,60694.3],[1171,60368.8],[1170.5,61119],[1170,61145.4],[1169.5,61197.3],[1169,61818.1],[1168.5,60980.5],[1168,61675.2],[1167.5,62403.1],[1167,61998.9],[1166.5,60843.1],[1166,60935.9],[1165.5,60564.7],[1165,61655.6],[1164.5,62130.4],[1164,61358.6],[1163.5,62765.6],[1163,62050.9],[1162.5,61449.2],[1162,61998],[1161.5,61237.2],[1161,62405.5],[1160.5,62009.8],[1160,61661],[1159.5,62517.5],[1159,62481.7],[1158.5,61296.9],[1158,62545.2],[1157.5,61871.5],[1157,62143.6],[1156.5,61745.5],[1156,62613.5],[1155.5,61673.7],[1155,63464.2],[1154.5,62038.5],[1154,62492.4],[1153.5,63231],[1153,64465.3],[1152.5,63774.9],[1152,62737.6],[1151.5,62851.3],[1151,62502.1],[1150.5,63033.2],[1150,63711.7],[1149.5,64084],[1149,62983.7],[1148.5,62020.8],[1148,62327.6],[1147.5,63405.5],[1147,63098.4],[1146.5,63216],[1146,64335.7],[1145.5,63466.9],[1145,62278.6],[1144.5,64131.5],[1144,64230],[1143.5,63713.5],[1143,62522.5],[1142.5,63477],[1142,63570.5],[1141.5,63593.7],[1141,63819.1],[1140.5,64420.8],[1140,63437.9],[1139.5,63711.6],[1139,64283.1],[1138.5,64311.3],[1138,64126.1],[1137.5,64659.5],[1137,64354.8],[1136.5,64010.8],[1136,64353.9],[1135.5,65213.5],[1135,65024.5],[1134.5,63737.2],[1134,64529.5],[1133.5,64442.7],[1133,64502.1],[1132.5,64853.6],[1132,64068.5],[1131.5,63518.6],[1131,64088.6],[1130.5,64690.8],[1130,64969.1],[1129.5,64463.3],[1129,65053.4],[1128.5,64690.3],[1128,64556.8],[1127.5,64280.4],[1127,64684.6],[1126.5,65205.9],[1126,65727.6],[1125.5,65062.6],[1125,65200.7],[1124.5,66004.3],[1124,66079.9],[1123.5,65564.6],[1123,66053.3],[1122.5,65629.8],[1122,66008.9],[1121.5,65886.8],[1121,64591.4],[1120.5,65401.1],[1120,65913.9],[1119.5,65169.4],[1119,65631.2],[1118.5,65875.6],[1118,65648.3],[1117.5,66800],[1117,66830.3],[1116.5,65852],[1116,65705.9],[1115.5,65784.9],[1115,66511.9],[1114.5,66785.2],[1114,66117.9],[1113.5,67488.6],[1113,66224.7],[1112.5,66004.2],[1112,67211.9],[1111.5,66194.1],[1111,66836.3],[1110.5,67149.1],[1110,67003.6],[1109.5,67206.2],[1109,65974.8],[1108.5,66710],[1108,66380.9],[1107.5,68189.7],[1107,67716.9],[1106.5,66479.1],[1106,66221.5],[1105.5,68070],[1105,67445],[1104.5,67542.5],[1104,67831.5],[1103.5,67993.8],[1103,65860.3],[1102.5,66370.4],[1102,66862.1],[1101.5,69623.3],[1101,67482.6],[1100.5,67995.6],[1100,67521.7],[1099.5,68890.3],[1099,68080.9],[1098.5,68420.7],[1098,68873],[1097.5,68208.1],[1097,69359.1],[1096.5,68573.6],[1096,67906.7],[1095.5,66878],[1095,67329],[1094.5,67968.5],[1094,67108.8],[1093.5,68308],[1093,69303.1],[1092.5,67354.1],[1092,69132.2],[1091.5,69664.5],[1091,68305.5],[1090.5,68997.8],[1090,68847.4],[1089.5,68398.5],[1089,70050.6],[1088.5,69006],[1088,68678.7],[1087.5,67885.7],[1087,69656.7],[1086.5,69420.9],[1086,71299.9],[1085.5,69551.6],[1085,69604],[1084.5,70401],[1084,69777.3],[1083.5,69170.2],[1083,69796.3],[1082.5,69584.9],[1082,70934],[1081.5,69264.4],[1081,69743.3],[1080.5,69852],[1080,70467.1],[1079.5,70551.4],[1079,70093.7],[1078.5,68430.2],[1078,70542.1],[1077.5,70267.4],[1077,69638.2],[1076.5,70562],[1076,70933.8],[1075.5,71847.6],[1075,71144.3],[1074.5,69247.7],[1074,70241.6],[1073.5,71466.4],[1073,71359.2],[1072.5,70096.2],[1072,72472.2],[1071.5,71820.9],[1071,70547.2],[1070.5,71298.1],[1070,72304.8],[1069.5,71604.1],[1069,72066.9],[1068.5,71459.4],[1068,71381.9],[1067.5,71313.9],[1067,70477.4],[1066.5,71528.7],[1066,71021.4],[1065.5,72118.7],[1065,70641.6],[1064.5,71359.5],[1064,70616.4],[1063.5,71395.2],[1063,72639.1],[1062.5,72678.9],[1062,70835.1],[1061.5,71906.1],[1061,72214],[1060.5,73001.8],[1060,72860.2],[1059.5,72473.4],[1059,72692.2],[1058.5,72885.7],[1058,71831.9],[1057.5,73693.3],[1057,72167.2],[1056.5,72700.1],[1056,72345.4],[1055.5,73822.2],[1055,72769.7],[1054.5,72539.9],[1054,72728.4],[1053.5,73320.5],[1053,73443.5],[1052.5,72515],[1052,72670.2],[1051.5,73818.2],[1051,73194.9],[1050.5,73337],[1050,73074.1],[1049.5,73444.2],[1049,73593.4],[1048.5,73577.7],[1048,73455.3],[1047.5,72618.9],[1047,72345.4],[1046.5,72938],[1046,73712.4],[1045.5,74197.3],[1045,73961.2],[1044.5,72896.6],[1044,73582.7],[1043.5,72731.7],[1043,73455.9],[1042.5,74854.8],[1042,74402.2],[1041.5,73609.6],[1041,74690.4],[1040.5,74232.7],[1040,72925.3],[1039.5,75031.2],[1039,74484.2],[1038.5,73057.1],[1038,74708.5],[1037.5,74598.6],[1037,75547.7],[1036.5,73538],[1036,72786.8],[1035.5,74846.9],[1035,75473.6],[1034.5,74740.1],[1034,74423.9],[1033.5,75697.5],[1033,75374.7],[1032.5,74644.1],[1032,75210.5],[1031.5,76046.7],[1031,76200.8],[1030.5,76961],[1030,75952],[1029.5,76055.3],[1029,75537.9],[1028.5,76918.6],[1028,76906],[1027.5,76352.5],[1027,76604.9],[1026.5,76511.9],[1026,75525.7],[1025.5,75587.4],[1025,75383.9],[1024.5,75762.7],[1024,75594.3],[1023.5,76802.5],[1023,75336.8],[1022.5,76921.9],[1022,77269.4],[1021.5,75444.9],[1021,76556.7],[1020.5,76358.3],[1020,76810],[1019.5,76484.1],[1019,77356],[1018.5,76646.1],[1018,77499.3],[1017.5,77536.8],[1017,78565.7],[1016.5,77369.8],[1016,77150.6],[1015.5,76875.6],[1015,76106.5],[1014.5,78247.4],[1014,77553.9],[1013.5,77758.7],[1013,77339.5],[1012.5,77958.3],[1012,77793.9],[1011.5,77299.3],[1011,77226.7],[1010.5,78449.8],[1010,78983.2],[1009.5,77487.3],[1009,78116.1],[1008.5,78955.4],[1008,78223.1],[1007.5,77814.4],[1007,78807.6],[1006.5,78671.7],[1006,78197.7],[1005.5,78157.2],[1005,77983.9],[1004.5,77759.4],[1004,77628.9],[1003.5,78027.3],[1003,78308.2],[1002.5,77042],[1002,77127.8],[1001.5,80226.8],[1001,78292.2],[1000.5,79270.5],[1000,78867],[999.5,78393.9],[999,79087.5],[998.5,78394.7],[998,77716],[997.5,77794.4],[997,78628.4],[996.5,79406.1],[996,79020.5],[995.5,79360.9],[995,79223.8],[994.5,80503],[994,80348.8],[993.5,80647.4],[993,77843.5],[992.5,78788.1],[992,78126],[991.5,79235.1],[991,80092.5],[990.5,78780.4],[990,79124.8],[989.5,79361.3],[989,78172.4],[988.5,78275.1],[988,77129.7],[987.5,78512.3],[987,78482],[986.5,77539.6],[986,78583.2],[985.5,78444.5],[985,78065],[984.5,76445.4],[984,78257.1],[983.5,77799.4],[983,77012.6],[982.5,77669.2],[982,78488.2],[981.5,77653.4],[981,78169.7],[980.5,76641],[980,76849.7],[979.5,77778.8],[979,77588.2],[978.5,78974],[978,79794.5],[977.5,79905.5],[977,79716.5],[976.5,82000.1],[976,83040.3],[975.5,83102.6],[975,83992],[974.5,83665.1],[974,82567.7],[973.5,82127],[973,82257.3],[972.5,81807.3],[972,81150.9],[971.5,81293.3],[971,79637.2],[970.5,79836.8],[970,79360.5],[969.5,78643.4],[969,77273.2],[968.5,77379.4],[968,77222.5],[967.5,77720.8],[967,76121.7],[966.5,78287.6],[966,77280],[965.5,77637.8],[965,76218.3],[964.5,77353],[964,76794.5],[963.5,75604.6],[963,76834.9],[962.5,76389.8],[962,76156.6],[961.5,75949.8],[961,75155.3],[960.5,74295.8],[960,75979.8],[959.5,74757.7],[959,75417.7],[958.5,75589.7],[958,75340.7],[957.5,76128],[957,75522.2],[956.5,74355.7],[956,75272.8],[955.5,75790],[955,74572.3],[954.5,76399.5],[954,75429.1],[953.5,76266.8],[953,76508.5],[952.5,75744.3],[952,74067.9],[951.5,75540.6],[951,75190],[950.5,75910],[950,75599],[949.5,76601.2],[949,76656.3],[948.5,76600.7],[948,76152.8],[947.5,75691.2],[947,76205.4],[946.5,75231.1],[946,77000.1],[945.5,77559.7],[945,76832.9],[944.5,76987.9],[944,75317.4],[943.5,77184],[943,77809.9],[942.5,77325.5],[942,75678.1],[941.5,75547.4],[941,76662.5],[940.5,74566.4],[940,75622],[939.5,76742.7],[939,78006.8],[938.5,77930.6],[938,77384.5],[937.5,76695.2],[937,76363.8],[936.5,76824.2],[936,77438.7],[935.5,76379.8],[935,77560.5],[934.5,77443.4],[934,76710.7],[933.5,77617.2],[933,77714.5],[932.5,77196.3],[932,77963.9],[931.5,78687.8],[931,79357],[930.5,77448.3],[930,75810.6],[929.5,77878.4],[929,78581.6],[928.5,77053.1],[928,77393.1],[927.5,78538.2],[927,78602],[926.5,78053.5],[926,77874.1],[925.5,77637.6],[925,79314],[924.5,78199.4],[924,76726.2],[923.5,77134.6],[923,78028.2],[922.5,78351.5],[922,76895.3],[921.5,77424.5],[921,77211.7],[920.5,76855.2],[920,76029.6],[919.5,76114.3],[919,76267.7],[918.5,75115.1],[918,74950.3],[917.5,75298.1],[917,76348.6],[916.5,75275.1],[916,75687.6],[915.5,75265],[915,75477],[914.5,76004.5],[914,75437.1],[913.5,75601.1],[913,75262.5],[912.5,75820.5],[912,76060.3],[911.5,75546.5],[911,75871.9],[910.5,74405.1],[910,75501.3],[909.5,76807],[909,74968.6],[908.5,75743.8],[908,75685.9],[907.5,74975.9],[907,76555.1],[906.5,76592],[906,77080.8],[905.5,75953.3],[905,76346.8],[904.5,76333.6],[904,76194.6],[903.5,75134.2],[903,76161.3],[902.5,75867.8],[902,76214.6],[901.5,76031.2],[901,75723.3],[900.5,75796.8],[900,76516.3],[899.5,75550.4],[899,75507],[898.5,75856.2],[898,76404.5],[897.5,75638.6],[897,76573.1],[896.5,76037.9],[896,75613.6],[895.5,74246.5],[895,74540.2],[894.5,75175.2],[894,75411],[893.5,75546.2],[893,76176.5],[892.5,75060.3],[892,75099.4],[891.5,74987.7],[891,73904.6],[890.5,74749.7],[890,75132.5],[889.5,76072.1],[889,74430.1],[888.5,75993.7],[888,74962.5],[887.5,72531.7],[887,72517.3],[886.5,73456.8],[886,73829.5],[885.5,73053.9],[885,73302.5],[884.5,73163.4],[884,72525.3],[883.5,73198.3],[883,73356.3],[882.5,72910.2],[882,71569.2],[881.5,72278.5],[881,73605.1],[880.5,73155.5],[880,72182],[879.5,72771.6],[879,73127.8],[878.5,72144.1],[878,73970],[877.5,74304],[877,72529.4],[876.5,71680.2],[876,72112.1],[875.5,70878.8],[875,70733.7],[874.5,71240],[874,72568.5],[873.5,71298.3],[873,71005.1],[872.5,72715.4],[872,73211],[871.5,72826.6],[871,72470.1],[870.5,71547],[870,72048],[869.5,71978.8],[869,71096.4],[868.5,71349.3],[868,72865.2],[867.5,70148],[867,70384.9],[866.5,70499.8],[866,70616.7],[865.5,70411.1],[865,71033.3],[864.5,70515.4],[864,70996],[863.5,72045.8],[863,71412],[862.5,70899.8],[862,71171.3],[861.5,71195.2],[861,70578.2],[860.5,71608.8],[860,71299.6],[859.5,70881.4],[859,70012.3],[858.5,71255.5],[858,70962.5],[857.5,70231.2],[857,70407.9],[856.5,70397.4],[856,72472.9],[855.5,70041.6],[855,72360.1],[854.5,72367.9],[854,72572.8],[853.5,70943.9],[853,70570.3],[852.5,67482.3],[852,69271.8],[851.5,69260.9],[851,68710.6],[850.5,69418.8],[850,70054],[849.5,68969.7],[849,68410.2],[848.5,68401.6],[848,69519.1],[847.5,70506.1],[847,68318.2],[846.5,68138.4],[846,68281],[845.5,68538.7],[845,68245.8],[844.5,67903.9],[844,68865.3],[843.5,67191.9],[843,68249.7],[842.5,68639.7],[842,68433.6],[841.5,68526],[841,67748.1],[840.5,67906.1],[840,67277.6],[839.5,66960.1],[839,66524],[838.5,67384.6],[838,66201.9],[837.5,67184.5],[837,66426.6],[836.5,65913.8],[836,66506],[835.5,65571.6],[835,66270.9],[834.5,66664],[834,66484.7],[833.5,67049.1],[833,64952.3],[832.5,65476],[832,64049],[831.5,64846.5],[831,63512.7],[830.5,62321],[830,62972.7],[829.5,62091.1],[829,60906.8],[828.5,60251.3],[828,60929.9],[827.5,60538.2],[827,60286.4],[826.5,60620],[826,60879.3],[825.5,60845],[825,59161.1],[824.5,59272.4],[824,59101],[823.5,58615.6],[823,58720.1],[822.5,58136.4],[822,59706.2],[821.5,58841.7],[821,58315.2],[820.5,57781.8],[820,58130.4],[819.5,58918],[819,60176.6],[818.5,59184.9],[818,58902.7],[817.5,59018.1],[817,58585.6],[816.5,58506.2],[816,59215.7],[815.5,58557.3],[815,57977.4],[814.5,58245.5],[814,58720.5],[813.5,57189.7],[813,57088.2],[812.5,57012.7],[812,58027],[811.5,57327.5],[811,57311.7],[810.5,57253.3],[810,57312.5],[809.5,56533.4],[809,56589],[808.5,56396.5],[808,56590.2],[807.5,57209.6],[807,56773.4],[806.5,57464.5],[806,57527.4],[805.5,58138.2],[805,56584],[804.5,57885.1],[804,57958.3],[803.5,58753.2],[803,58211.7],[802.5,58088.8],[802,56452.8],[801.5,58209.5],[801,57374.1],[800.5,56300.1],[800,56396.6],[799.5,54948.3],[799,55133.6],[798.5,55885.7],[798,57123.4],[797.5,56833.2],[797,57107.9],[796.5,57997],[796,60627.2],[795.5,59173.3],[795,58827.5],[794.5,57887.2],[794,56803.9],[793.5,54162.5],[793,53041.3],[792.5,51842.9],[792,51042],[791.5,51874.9],[791,51221.1],[790.5,51354.8],[790,51220.4],[789.5,52570.1],[789,52878.5],[788.5,52628.8],[788,52869.4],[787.5,53126.5],[787,53348.5],[786.5,52848.1],[786,53548],[785.5,54159.9],[785,53864.9],[784.5,54305.8],[784,53890.9],[783.5,55047.9],[783,54683.3],[782.5,55874.6],[782,58013],[781.5,59703.4],[781,63308.7],[780.5,64044.4],[780,64245.7],[779.5,63615],[779,60251.3],[778.5,55059.8],[778,49936.9],[777.5,46484.8],[777,45908.3],[776.5,44472.2],[776,43795.6],[775.5,42505.6],[775,40881.3],[774.5,41702.1],[774,42981.7],[773.5,41216.2],[773,41670.4],[772.5,41946],[772,41497.3],[771.5,41486.3],[771,40669.4],[770.5,40353.8],[770,40996.3],[769.5,41019.4],[769,39589.7],[768.5,38864.4],[768,39196.8],[767.5,39337.8],[767,38235.7],[766.5,37609.5],[766,38314.9],[765.5,36905.9],[765,36407.1],[764.5,37331.6],[764,36832.7],[763.5,37690.7],[763,36811.5],[762.5,36287.7],[762,36385.5],[761.5,35953.2],[761,36026.9],[760.5,35879.4],[760,36561.7],[759.5,36536.5],[759,37018.6],[758.5,35339.6],[758,35445.8],[757.5,36204.2],[757,35397.2],[756.5,36122.2],[756,36686.7],[755.5,35903.6],[755,35368.4],[754.5,35815.7],[754,35741.5],[753.5,35099.1],[753,35341.1],[752.5,35197.1],[752,34853.6],[751.5,36183.5],[751,35461.7],[750.5,34957.9],[750,35277.1],[749.5,35075.3],[749,35059.3],[748.5,35044.6],[748,35477.7],[747.5,34768.4],[747,34691.8],[746.5,34036],[746,34613.8],[745.5,34757.7],[745,35725.5],[744.5,34623],[744,35002.5],[743.5,35410.6],[743,35513.1],[742.5,35738.4],[742,36348.5],[741.5,36148.5],[741,35617.9],[740.5,35559.9],[740,34221],[739.5,34564.3],[739,34790.2],[738.5,34437.3],[738,34836.4],[737.5,34012.4],[737,34495.3],[736.5,34698.3],[736,34494.9],[735.5,34141.2],[735,34373.3],[734.5,34987.9],[734,35149.6],[733.5,34807.1],[733,34830.2],[732.5,34270.9],[732,33513],[731.5,34560.3],[731,34480.2],[730.5,33071.5],[730,33366.4],[729.5,32176.3],[729,33194.9],[728.5,34174.7],[728,34209.7],[727.5,34280.6],[727,34044.4],[726.5,34582.8],[726,34444.4],[725.5,34906.3],[725,35964.1],[724.5,35719.5],[724,35617.8],[723.5,35597.1],[723,34301],[722.5,33413.1],[722,33066.9],[721.5,32111.5],[721,31976.1],[720.5,32146.4],[720,32326.1],[719.5,30686.8],[719,31479.6],[718.5,30910.3],[718,31231.9],[717.5,31190.8],[717,30218.1],[716.5,30101.3],[716,29857.9],[715.5,30448.2],[715,30759.9],[714.5,31117.4],[714,31675.9],[713.5,32943.2],[713,34208.4],[712.5,35053.7],[712,36273],[711.5,36359.3],[711,37088.2],[710.5,36448.9],[710,34700.5],[709.5,32719.5],[709,29375.7],[708.5,25821.5],[708,22862.3],[707.5,20507.2],[707,18537.1],[706.5,18341.9],[706,17422.5],[705.5,16407.8],[705,16320.7],[704.5,16022.8],[704,16303],[703.5,16548.6],[703,16505],[702.5,16074.7],[702,15809.7],[701.5,16122.4],[701,15838.4],[700.5,15981.2],[700,15331.2],[699.5,15829],[699,16022.3],[698.5,15806.3],[698,16498.1],[697.5,16119.5],[697,16050.5],[696.5,15795.7],[696,15049.4],[695.5,15159.4],[695,15048.7],[694.5,15024.4],[694,14985.5],[693.5,14254],[693,14530.4],[692.5,14626],[692,15128.2],[691.5,15291.5],[691,14610.2],[690.5,13976.2],[690,14423.8],[689.5,14490],[689,14713.4],[688.5,14473.3],[688,14690.4],[687.5,14466.1],[687,14516.8],[686.5,13953.4],[686,14790.4],[685.5,14794.9],[685,14761.2],[684.5,14529.2],[684,14632],[683.5,14956.3],[683,14174.4],[682.5,14474],[682,14578.4],[681.5,14570.1],[681,14641.3],[680.5,14514.9],[680,14544.6],[679.5,14632.2],[679,14417.7],[678.5,14654.1],[678,14591.5],[677.5,14652.3],[677,14227.6],[676.5,14765.8],[676,14895.1],[675.5,14812.9],[675,14349.2],[674.5,14240],[674,14256.6],[673.5,14474.7],[673,15106.2],[672.5,14085.8],[672,14403.6],[671.5,15193.1],[671,14629],[670.5,14365.5],[670,13980.1],[669.5,14556.2],[669,15221.3],[668.5,14658.5],[668,14819.7],[667.5,14881.1],[667,14519.5],[666.5,14720.3],[666,15335.3],[665.5,14996.4],[665,14813.6],[664.5,14930.7],[664,14993.3],[663.5,15183.7],[663,15460.7],[662.5,14594.1],[662,15078.2],[661.5,14726.3],[661,14948.3],[660.5,15244.2],[660,15540.8],[659.5,15292.1],[659,15319.6],[658.5,15058],[658,14545.2],[657.5,14431.4],[657,15149.6],[656.5,15079.1],[656,14796.5],[655.5,15026.5],[655,14996],[654.5,14502.4],[654,15216.8],[653.5,15704.1],[653,15551],[652.5,15271.1],[652,15094.8],[651.5,14326],[651,14819.2],[650.5,14965.2],[650,15068.8],[649.5,16012.5],[649,14718.9],[648.5,15058.5],[648,14682.2],[647.5,14952.6],[647,15445.7],[646.5,14913.4],[646,15309.8],[645.5,15181.6],[645,15407.8],[644.5,15638.9],[644,15681.4],[643.5,15548.6],[643,15590],[642.5,16182.5],[642,15435.3],[641.5,15980],[641,15627],[640.5,15654.1],[640,15977.8],[639.5,16481],[639,15984.9],[638.5,15610.9],[638,15153.8],[637.5,15132.9],[637,15020.5],[636.5,15353.8],[636,15086.8],[635.5,14986.5],[635,14435.6],[634.5,14804.8],[634,15158],[633.5,14598.8],[633,14700.7],[632.5,14607.7],[632,14584.7],[631.5,14387.9],[631,15012.1],[630.5,14951.1],[630,14236.7],[629.5,14447.7],[629,14950.8],[628.5,15242.3],[628,14638.3],[627.5,15041.8],[627,14823.7],[626.5,15038.7],[626,14627.1],[625.5,14740.6],[625,15228.6],[624.5,14995.3],[624,14846.7],[623.5,15196.2],[623,14366.8],[622.5,14475.9],[622,14654.4],[621.5,14992.7],[621,14717.9],[620.5,14136.4],[620,14487.8],[619.5,14611.5],[619,14558.4],[618.5,14557.5],[618,14850.7],[617.5,15171.5],[617,15058.2],[616.5,14053.7],[616,14631],[615.5,14633],[615,14558.5],[614.5,14838.8],[614,14380.3],[613.5,14946.2],[613,14563.1],[612.5,14951.2],[612,14448.2],[611.5,14755.3],[611,14341.5],[610.5,14986.8],[610,14938.2],[609.5,15165.6],[609,15533.4],[608.5,14695.7],[608,14959.7],[607.5,14677.3],[607,15312.4],[606.5,15262.9],[606,14840.2],[605.5,14614.3],[605,14779.2],[604.5,15024.4],[604,15615.5],[603.5,15331.7],[603,15142.3],[602.5,15254.7],[602,14699.2],[601.5,14921.5],[601,15513.3],[600.5,14825.2],[600,15443.1],[599.5,15642.7],[599,15730.3],[598.5,15413.8],[598,14813.6],[597.5,14990.7],[597,15578.2],[596.5,15558.6],[596,15182.5],[595.5,15180.1],[595,15450.3],[594.5,15163.7],[594,15399.3],[593.5,15582.4],[593,15792.7],[592.5,15337.7],[592,15710.8],[591.5,15876],[591,15171.2],[590.5,15025.7],[590,15505.9],[589.5,15547.1],[589,15496.4],[588.5,16267.3],[588,15567.8],[587.5,15060.4],[587,15533.2],[586.5,15554.7],[586,15541.2],[585.5,15493.9],[585,15727.4],[584.5,15945.9],[584,15495],[583.5,15861.9],[583,15343],[582.5,15936.8],[582,15998.2],[581.5,15229.4],[581,15491.1],[580.5,14771.1],[580,15396.1],[579.5,15565.3],[579,15624.3],[578.5,15394.3],[578,15657.6],[577.5,15893.6],[577,16108.3],[576.5,15980.4],[576,15577.7],[575.5,16098.2],[575,15347.8],[574.5,15854],[574,15617.7],[573.5,15833.1],[573,16288.7],[572.5,16177],[572,15883.2],[571.5,15508.3],[571,15633.3],[570.5,16232.2],[570,16021.4],[569.5,16245.2],[569,15710.8],[568.5,15386.1],[568,15786.6],[567.5,16184.5],[567,15374.5],[566.5,15829.1],[566,15584.7],[565.5,15875.5],[565,15350.8],[564.5,15021.7],[564,15219.9],[563.5,15234.5],[563,15667.5],[562.5,15502.1],[562,14846.8],[561.5,14624.9],[561,15367.5],[560.5,15457.8],[560,15848.5],[559.5,15907.3],[559,15634.4],[558.5,15719],[558,15671.8],[557.5,15868.3],[557,16851.2],[556.5,16676.9],[556,16257.2],[555.5,15910.9],[555,16921.9],[554.5,17174.8],[554,17123.4],[553.5,17219.4],[553,16447.2],[552.5,16655.8],[552,17328.1],[551.5,16792.7],[551,16672.5],[550.5,15923.4],[550,16143.5],[549.5,15358],[549,15503.5],[548.5,15261.6],[548,15450.2],[547.5,15048.2],[547,14347.4],[546.5,13958.1],[546,14705.2],[545.5,14324.6],[545,13963.3],[544.5,13515],[544,13823.2],[543.5,13640.8],[543,13256],[542.5,12852.7],[542,11957.8],[541.5,11195.1],[541,11770.9],[540.5,11638.3],[540,10593.5],[539.5,11096.9],[539,10868.9],[538.5,10159.3],[538,10490.9],[537.5,10113.8],[537,10254.7],[536.5,10729.1],[536,10135.6],[535.5,10566.5],[535,11100.2],[534.5,12579.8],[534,13643],[533.5,15338.7],[533,18063.4],[532.5,20886.2],[532,25098.8],[531.5,31156.5],[531,38722.3],[530.5,44355.6],[530,49274.4],[529.5,46879.1],[529,39649.8],[528.5,29440.9],[528,19805.9],[527.5,13194.8],[527,8971.5],[526.5,7460.97],[526,6809.48],[525.5,6299.71],[525,6480.46],[524.5,6354.12],[524,6093.05],[523.5,5831.22],[523,5967.93],[522.5,5765.2],[522,5946.08],[521.5,5741.08],[521,5843.07],[520.5,5967.12],[520,5614.58],[519.5,5859.14],[519,6057.73],[518.5,5951.54],[518,5828.92],[517.5,6116.39],[517,5525.48],[516.5,6157.1],[516,6139.53],[515.5,6026.05],[515,6058.56],[514.5,5511.18],[514,6058.45],[513.5,6148.12],[513,6359.95],[512.5,6201.06],[512,5781.18],[511.5,6003.25],[511,5996.89],[510.5,6217.17],[510,6117.02],[509.5,5574.21],[509,6005.84],[508.5,6491.43],[508,6342.79],[507.5,5832.29],[507,5590.62],[506.5,5591.19],[506,5506.22],[505.5,6234.18],[505,6001.79],[504.5,6082.86],[504,6170.22],[503.5,6105.62],[503,5807.31],[502.5,6098.76],[502,6096.32],[501.5,5641.89],[501,5747.94],[500.5,5844.74],[500,6195.38],[499.5,5884.91],[499,5999.12],[498.5,5940],[498,6312.01],[497.5,5840.61],[497,6224.76],[496.5,6099.56],[496,6475.15],[495.5,6224.55],[495,6349.98],[494.5,5940.45],[494,5757.58],[493.5,5767.71],[493,5805.94],[492.5,5555.85],[492,6200.13],[491.5,6383.73],[491,6104.95],[490.5,6164],[490,5979.13],[489.5,5742.14],[489,6110.61],[488.5,5931.96],[488,5996.66],[487.5,6126.89],[487,5993.41],[486.5,6121.82],[486,6285.44],[485.5,6082.81],[485,6371.58],[484.5,5920.62],[484,5838.1],[483.5,5683.09],[483,5759.23],[482.5,5907],[482,6140.85],[481.5,5648.5],[481,6200.15],[480.5,6263.88],[480,5907.77],[479.5,5862.44],[479,5863.44],[478.5,6129.5],[478,5775.52],[477.5,5847.54],[477,6299.81],[476.5,6327.03],[476,5999.96],[475.5,5839.94],[475,6085],[474.5,5964.8],[474,5867.68],[473.5,6123.1],[473,6358.35],[472.5,5911.93],[472,6357.47],[471.5,6203.35],[471,6056.78],[470.5,5866.88],[470,6260.44],[469.5,6109.45],[469,5931.13],[468.5,6046.21],[468,5925.07],[467.5,6427.08],[467,6078.06],[466.5,6050.55],[466,6233.48],[465.5,6219.4],[465,6311.97],[464.5,6524.99],[464,6177.09],[463.5,6045.07],[463,5857.47],[462.5,6377.38],[462,6350.98],[461.5,6292.38],[461,6191.11],[460.5,6028.86],[460,6233.79],[459.5,6653.41],[459,6361.6],[458.5,6124.81],[458,6369.05],[457.5,6268.98],[457,6233.04],[456.5,6562.76],[456,6062.13],[455.5,6443.06],[455,6752.54],[454.5,6207.02],[454,6142.18],[453.5,6146.88],[453,6624.12],[452.5,6250.89],[452,6595.45],[451.5,6741.81],[451,6163.61],[450.5,5967.62],[450,6470.38],[449.5,6468.59],[449,6144.92],[448.5,6319.54],[448,6128.35],[447.5,6153.24],[447,6276.11],[446.5,5918.39],[446,6183.55],[445.5,6129.27],[445,5927.09],[444.5,6214.59],[444,6245.53],[443.5,6446.52],[443,6507.64],[442.5,6558.55],[442,6420.9],[441.5,6311.01],[441,6417.36],[440.5,6446.97],[440,6599.82],[439.5,6261.65],[439,6754.89],[438.5,6009.22],[438,6133.75],[437.5,6250.95],[437,6438.27],[436.5,6227.12],[436,6546.49],[435.5,6247.18],[435,6078.88],[434.5,6543.15],[434,6493.64],[433.5,6659.86],[433,6668.26],[432.5,6192.31],[432,6539.89],[431.5,6541.35],[431,6443.53],[430.5,6016.3],[430,6477.44],[429.5,6449.52],[429,6204.68],[428.5,6447.47],[428,6418.75],[427.5,6426.34],[427,6412.26],[426.5,6705.23],[426,6371.7],[425.5,6655.39],[425,7046.31],[424.5,6343],[424,6624.18],[423.5,6681.89],[423,6751.83],[422.5,6784.8],[422,6800.68],[421.5,6480.86],[421,6402.28],[420.5,6352.32],[420,6804.27],[419.5,7016.01],[419,6563.45],[418.5,6504.37],[418,7009.68],[417.5,6679.73],[417,6704.72],[416.5,6602.54],[416,6307.66],[415.5,6712.46],[415,6650.72],[414.5,6575.25],[414,6840.53],[413.5,6911.89],[413,6907.03],[412.5,7177.79],[412,7331.09],[411.5,6598.86],[411,6851.02],[410.5,6617.82],[410,6481.8],[409.5,6694.86],[409,6763.95],[408.5,6312.21],[408,6469.12],[407.5,6484.36],[407,6660.99],[406.5,6603.41],[406,6447.69],[405.5,6530.18],[405,6479.91],[404.5,6657.95],[404,6814.05],[403.5,6783.68],[403,6677.82],[402.5,6428.27],[402,7100.42],[401.5,6907],[401,6712.38],[400.5,6768.81],[400,7193.91],[399.5,7094.13],[399,6946.5],[398.5,7001.3],[398,6794.74],[397.5,7268.11],[397,6863.33],[396.5,6905.1],[396,7135.28],[395.5,6794.07],[395,6114.96],[394.5,6715.51],[394,6414.97],[393.5,6864.3],[393,7069.51],[392.5,6686.75],[392,6915.03],[391.5,7058.98],[391,6663.05],[390.5,6746.95],[390,6959.77],[389.5,6726.07],[389,6705.14],[388.5,7292.58],[388,6803.66],[387.5,7095.94],[387,7018.7],[386.5,6889.27],[386,7176.14],[385.5,6938.08],[385,7184.46],[384.5,6466.69],[384,6822.18],[383.5,7327.07],[383,7121.27],[382.5,6524],[382,6760.2],[381.5,6961.37],[381,6930.64],[380.5,6981.04],[380,6706.75],[379.5,7277.84],[379,7225.25],[378.5,7125.77],[378,7313.6],[377.5,7470.87],[377,7525.55],[376.5,7603.58],[376,7035.25],[375.5,7020.63],[375,7074.35],[374.5,7461.13],[374,7027.37],[373.5,7093.81],[373,7065.58],[372.5,7060.4],[372,6847.92],[371.5,7131.9],[371,7175.86],[370.5,6835.38],[370,7300.55],[369.5,7079.65],[369,6897.34],[368.5,7206.93],[368,7305.37],[367.5,7241.02],[367,6991.88],[366.5,6949.6],[366,7161.16],[365.5,7481.14],[365,7341.35],[364.5,6912.21],[364,7385.23],[363.5,7254.45],[363,7216.01],[362.5,7335.42],[362,7284.13],[361.5,7501.79],[361,7420.75],[360.5,7620.51],[360,7506.01],[359.5,7284.48],[359,7346.87],[358.5,7380.3],[358,7487.21],[357.5,7098.39],[357,7714.2],[356.5,7299.49],[356,7323.34],[355.5,7838.72],[355,7489.73],[354.5,7351.66],[354,7188.17],[353.5,7568.96],[353,7553.3],[352.5,7682.76],[352,7049.59],[351.5,7314.62],[351,8155.81],[350.5,7746.3],[350,7244.29],[349.5,7380.9],[349,7417.55],[348.5,7605.97],[348,7614.39],[347.5,8151.18],[347,7680.27],[346.5,7515.2],[346,7264.16],[345.5,7361.16],[345,7541.21],[344.5,7609.67],[344,7894.7],[343.5,7528.55],[343,7642.51],[342.5,7600.61],[342,7759.53],[341.5,7811.92],[341,7772.36],[340.5,7800.61],[340,7958.41],[339.5,7552.01],[339,7600.71],[338.5,8010.32],[338,8381.03],[337.5,7828.62],[337,8090.04],[336.5,7903.97],[336,7859.92],[335.5,8171.42],[335,8328.71],[334.5,7715.01],[334,8078.99],[333.5,8243.27],[333,8286.78],[332.5,7752.4],[332,8441.35],[331.5,8104.49],[331,8305.82],[330.5,8217.78],[330,8061.52],[329.5,8537.7],[329,8372.27],[328.5,8525.63],[328,8529.83],[327.5,7884.28],[327,8147.06],[326.5,8306.21],[326,8557.71],[325.5,8326.42],[325,8529.98],[324.5,8131.48],[324,9197.81],[323.5,8415.87],[323,8593.79],[322.5,8805.09],[322,8260.69],[321.5,8736.11],[321,8784.24],[320.5,9090.94],[320,8729.07],[319.5,8681.01],[319,8861.61],[318.5,9159.56],[318,8882.03],[317.5,9328.47],[317,9143.07],[316.5,8872.62],[316,8542.89],[315.5,8902.64],[315,8984.35],[314.5,8784.64],[314,8587.7],[313.5,9352.16],[313,8992.83],[312.5,9764.5],[312,9028.7],[311.5,9336.58],[311,9277.77],[310.5,9099.66],[310,9439.29],[309.5,9156.29],[309,9592.76],[308.5,9118.08],[308,9634.84],[307.5,9393.44],[307,9253.41],[306.5,9350.71],[306,9299.55],[305.5,9115.26],[305,9732.74],[304.5,9511.67],[304,9717.25],[303.5,9870.7],[303,9330.14],[302.5,9271.3],[302,9180.7],[301.5,8794.85],[301,9106.16],[300.5,9186.61],[300,9414.86],[299.5,8958.25],[299,9247.67],[298.5,9234.36],[298,9063.58],[297.5,8933.58],[297,8213.51],[296.5,8359.06],[296,9055.41],[295.5,8972.22],[295,8459.3],[294.5,8133.8],[294,8231.97],[293.5,8095.46],[293,8350.89],[292.5,8365.41],[292,8465.25],[291.5,8125.66],[291,8102.88],[290.5,8564.87],[290,8367.09],[289.5,9207.96],[289,8903.64],[288.5,9407.72],[288,10084.1],[287.5,10876.2],[287,12832],[286.5,16099],[286,22016.1],[285.5,28623.1],[285,32462.3],[284.5,33039.8],[284,27320.7],[283.5,21191.1],[283,15287.1],[282.5,10955.5],[282,9107.06],[281.5,7978.75],[281,7363.81],[280.5,6827.06],[280,6950.7],[279.5,7401.59],[279,7586.85],[278.5,7186.44],[278,6886.74],[277.5,6687.75],[277,7207.34],[276.5,7587.21],[276,7183.7],[275.5,7505.91],[275,7314.14],[274.5,7022.71],[274,7464.68],[273.5,7648.01],[273,7301.54],[272.5,6962.48],[272,7100.01],[271.5,7828.47],[271,7590.27],[270.5,6920.27],[270,7210.63],[269.5,7198.32],[269,7038.37],[268.5,7969.47],[268,7900.06],[267.5,6960.62],[267,7109.09],[266.5,7185.96],[266,7222.71],[265.5,7174.68],[265,7401.1],[264.5,7467.48],[264,7232.68],[263.5,7122.78],[263,7633.06],[262.5,7623.46],[262,7436.85],[261.5,7175.9],[261,7321.4],[260.5,7430.42],[260,7606.11],[259.5,7778.43],[259,7399.1],[258.5,6955.41],[258,7140.69],[257.5,7326.94],[257,7200.78],[256.5,7569.34],[256,6880.92],[255.5,7441.61],[255,7496.32],[254.5,7030.68],[254,7400.39],[253.5,7415.71],[253,7036.32],[252.5,7385.56],[252,7531.22],[251.5,6938.38],[251,7310.36],[250.5,7699.97],[250,7076.89],[249.5,7396.05],[249,7385.92],[248.5,7405.49],[248,7563.4],[247.5,7482.18],[247,7434.84],[246.5,7896.79],[246,7596.77],[245.5,6914.81],[245,7507.08],[244.5,7870.16],[244,7979.82],[243.5,7354.12],[243,7045.91],[242.5,7571.78],[242,7315.76],[241.5,7829.58],[241,7551.57],[240.5,7529.02],[240,7498.35],[239.5,7004.46],[239,7846.55],[238.5,7319.02],[238,7730.35],[237.5,7842.71],[237,7821.04],[236.5,7903.59],[236,7615.07],[235.5,7939.56],[235,8026.75],[234.5,7819.17],[234,7925.55],[233.5,7678.89],[233,8061.28],[232.5,7998.35],[232,8113.52],[231.5,8133.81],[231,8216.59],[230.5,7785.67],[230,7972.69],[229.5,7622.57],[229,7122.23],[228.5,6936.15],[228,7376.1],[227.5,6813.01],[227,7792.86],[226.5,7268.68],[226,7154.72],[225.5,7523.49],[225,7483.09],[224.5,7408.96],[224,7393.11],[223.5,7853.77],[223,7683.59],[222.5,7630.68],[222,8028.19],[221.5,7654.93],[221,8149.81],[220.5,7854.27],[220,7987.17],[219.5,7795.4],[219,7369.01],[218.5,7484.99],[218,7512.28],[217.5,8070.65],[217,8039.05],[216.5,7961.88],[216,7516.82],[215.5,7289.39],[215,7636.87],[214.5,7564.72],[214,7881.1],[213.5,7935.62],[213,7986.64],[212.5,7695.95],[212,7990.3],[211.5,7829.99],[211,7215.65],[210.5,7654.52],[210,7677.05],[209.5,7806.58],[209,8083.57],[208.5,7740.94],[208,7840.4],[207.5,7973.26],[207,7763.25],[206.5,7881.05],[206,7867.98],[205.5,7768.73],[205,7852.32],[204.5,7640.8],[204,7416.88],[203.5,8191.14],[203,7964.26],[202.5,8143.6],[202,8302.56],[201.5,8167.33],[201,8223.9],[200.5,7954.41],[200,7908.23],[199.5,7824.07],[199,8059.36],[198.5,7734.72],[198,7967.09],[197.5,7957.8],[197,7761.21],[196.5,7761.58],[196,7924.1],[195.5,7854.99],[195,7806.66],[194.5,7818.53],[194,8380.81],[193.5,8080.1],[193,7700.31],[192.5,8028.72],[192,8051.07],[191.5,8765.27],[191,8176.8],[190.5,8755.83],[190,7789.86],[189.5,8094.38],[189,8199.4],[188.5,8208.85],[188,7684.47],[187.5,7735.53],[187,8248.69],[186.5,7857.6],[186,8352.29],[185.5,8154.43],[185,8160.32],[184.5,8213.62],[184,8386.84],[183.5,7903.68],[183,8203.92],[182.5,8506.6],[182,8304.01],[181.5,8594.1],[181,8335.03],[180.5,7939.56],[180,7865.46],[179.5,8208.9],[179,8242.19],[178.5,8207.29],[178,7913.79],[177.5,8595.27],[177,8765.51],[176.5,8625.96],[176,8873],[175.5,8596.57],[175,8590.99],[174.5,8781.08],[174,7999.56],[173.5,8370.71],[173,8683.61],[172.5,8379.51],[172,8371.85],[171.5,8856.82],[171,8676.33],[170.5,8282.58],[170,8187.59],[169.5,8392.54],[169,8632.11],[168.5,8701.89],[168,8579.22],[167.5,8321.99],[167,8123.56],[166.5,8495.52],[166,8536.37],[165.5,8657.45],[165,8775.31],[164.5,8491.2],[164,8716.1],[163.5,8454.94],[163,8757.07],[162.5,8558.44],[162,8379.93],[161.5,8249.05],[161,8945.45],[160.5,8268.89],[160,8172.3],[159.5,8652.61],[159,9010.66],[158.5,8612.09],[158,8576.21],[157.5,8350.26],[157,8171.91],[156.5,8427.26],[156,8840.11],[155.5,8729.86],[155,9041.77],[154.5,8911.59],[154,8904.07],[153.5,9054.86],[153,9167.66],[152.5,8671.95],[152,9013.15],[151.5,8750.02],[151,8883.62],[150.5,8825.51],[150,8772.83],[149.5,9137.63],[149,8646.37],[148.5,8702.7],[148,9045.01],[147.5,8694.48],[147,8962.02],[146.5,8900.07],[146,8891.71],[145.5,8695.19],[145,8736.11],[144.5,9181.03],[144,8640.05],[143.5,8765.2],[143,8878.61],[142.5,8748.35],[142,8824.8],[141.5,9213.73],[141,8828.44],[140.5,8536.9],[140,9037.57],[139.5,8720.39],[139,8976.54],[138.5,9066.64],[138,8494.56],[137.5,8678.86],[137,9368.13],[136.5,9355.31],[136,8977.56],[135.5,9538.35],[135,9243.6],[134.5,8708.73],[134,8947.62],[133.5,8717.6],[133,9162.3],[132.5,9217.09],[132,9244.77],[131.5,9506.76],[131,9530.05],[130.5,9303.37],[130,9408.75],[129.5,9512.25],[129,8945.86],[128.5,9630.73],[128,8968.46],[127.5,9050.21],[127,8971.89],[126.5,9008.08],[126,9243.26],[125.5,8810.28],[125,8519.41],[124.5,8993.79],[124,9658.34],[123.5,9551.88],[123,9123.73],[122.5,9338.36],[122,9770.33],[121.5,9155.7],[121,9730.99],[120.5,9569.01],[120,9094.92],[119.5,9388.48],[119,8933.7],[118.5,8965.88],[118,8946.66],[117.5,8564.54],[117,8836.62],[116.5,9204.17],[116,9418.21],[115.5,9352.47],[115,9000.58],[114.5,8898.16],[114,9284.69],[113.5,9009.69],[113,9441],[112.5,9261.18],[112,9254.88],[111.5,9011.13],[111,9071.86],[110.5,9047.08],[110,8847.4],[109.5,9068.14],[109,8884.58],[108.5,9068.44],[108,9592.69],[107.5,9901.11],[107,9686.62],[106.5,9346.2],[106,9707.13],[105.5,9548.97],[105,10241],[104.5,10536.6],[104,10450.4],[103.5,10229.1],[103,10680],[102.5,11169.3],[102,11419.3],[101.5,11506.1],[101,11148.4],[100.5,10350.1],[100,9618.51],[99.5,9009.35],[99,9031.4],[98.5,9417.65],[98,8949.34],[97.5,8943.98],[97,9143.4],[96.5,9232.23],[96,8674.87],[95.5,8605.28],[95,8796.58],[94.5,9240.49],[94,9438.05],[93.5,9707.81],[93,9373.38],[92.5,9523.59],[92,8720.36],[91.5,8374.28],[91,8381.82],[90.5,8170.43],[90,7853.13],[89.5,7555.15],[89,7552.78],[88.5,7778.44],[88,7926.59],[87.5,7371.73],[87,7839.27],[86.5,7994.33],[86,7605.66],[85.5,7792.47],[85,7454.89],[84.5,8056],[84,7726.43],[83.5,7504.49],[83,7929.33],[82.5,7469.97],[82,8446.26],[81.5,8109.07],[81,8045.82],[80.5,8401.13],[80,7999.63],[79.5,8003.58],[79,7696.96],[78.5,7497.58],[78,7479.21],[77.5,7277.57],[77,7160.46],[76.5,7314.11],[76,6828.29],[75.5,7112.51],[75,7229.32],[74.5,7317.63],[74,7618.6],[73.5,7394.5],[73,7216.93],[72.5,7487.44],[72,7540.26],[71.5,7129.37],[71,7228.74],[70.5,6994.98],[70,6922.71],[69.5,6911.32],[69,7567.15],[68.5,7340.6],[68,7197.98],[67.5,7815.41],[67,7669.87],[66.5,7368.94],[66,7464.08],[65.5,7430.51],[65,7401.48],[64.5,7451.52],[64,8406.02],[63.5,8503.9],[63,8414.78],[62.5,9356.21],[62,9025.27],[61.5,9398.65],[61,9889.54],[60.5,9808.08],[60,9359.09],[59.5,8973.47],[59,8266.73],[58.5,7482.65],[58,6795.26],[57.5,6955.69],[57,7484.64],[56.5,7778.23],[56,8413.92],[55.5,8240.4],[55,7550.59],[54.5,6490.33],[54,5013.73],[53.5,3890.54],[53,2936.62],[52.5,2649.37],[52,2412.2],[51.5,2208.77],[51,2148.76],[50.5,2058.57],[50,2235.96],[49.5,2029.92],[49,2092.06],[48.5,2108.85],[48,2111.23],[47.5,2096.03],[47,2232.41],[46.5,2068.16],[46,1851.98],[45.5,2015.55],[45,2060.89],[44.5,1906.16],[44,1871.02],[43.5,2183.81],[43,2225.18],[42.5,2138.93],[42,2233.04],[41.5,2013.47],[41,1974.91],[40.5,1860.66],[40,2022.68],[39.5,1908.13],[39,2119.65],[38.5,1812.59],[38,1720.88],[37.5,1890.71],[37,1799.13],[36.5,1848.32],[36,1748.09],[35.5,1720.23],[35,1737.04],[34.5,1702.63],[34,1826.88],[33.5,1839],[33,1698.46],[32.5,1903.29],[32,1759.8],[31.5,1748.19],[31,1670.6],[30.5,1642.57],[30,1932.81],[29.5,1875.79],[29,1807.43],[28.5,2045.02],[28,1991.94],[27.5,1896.12],[27,1824.36],[26.5,2006.61],[26,2198.8],[25.5,2164.14],[25,2296.05],[24.5,2457.85],[24,2400.71],[23.5,2637.28],[23,2997.81],[22.5,3351.96],[22,3322.06],[21.5,3442.19],[21,3051.48],[20.5,2899.91],[20,2816.86],[19.5,2020.72],[19,1878.15],[18.5,1451.32],[18,1638.38],[17.5,1578.67],[17,1583.54],[16.5,1413.23],[16,1500.08],[15.5,1306.84],[15,1423.63],[14.5,1660.15],[14,1535.39],[13.5,1328.02],[13,1113.68],[12.5,1391.65],[12,1349.48],[11.5,1302.08],[11,1169.72],[10.5,1529.85],[10,1463.31],[9.5,1665.63],[9,1624.52],[8.5,1858.9],[8,1843.42],[7.5,2150.82],[7,2265.22],[6.5,2584.07],[6,2485.81],[5.5,2646.01],[5,2422.31],[4.5,2476.1],[4,2530.44],[3.5,2147.18],[3,2465.1],[2.5,2690.36],[2,2224.99],[1.5,2004.11],[1,1801.12],[0.5,1317.29],[0,669.46]]};\r\n","var chartDataPoints = {\r\n\"SpectraSearchResults\": [\r\n\t{\"ID\":\"1\",\"Compound\":\"Si (100)\",\"SpectralRegion\":\"survey\", \"GraphURL\":\"getsssdataflot.asp?id=1&lbl=Si%20(100)%20survey\",\"Thumbnail\":\"11.20121101.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/20/1/10.1116/11.20121101\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/20/1/10.1116/11.20121101.qa1\",\"CitedBy\":8,\"Discovery Date\":\"08/01/2014\"},\r\n\t{\"ID\":\"2\",\"Compound\":\"Si (100)\", \"SpectralRegion\":\"Si 2p\", \"GraphURL\":\"getsssdataflot.asp?id=2&lbl=Si%20(100)%20Si2p\",\"Thumbnail\":\"11.20121101.figures.online.f2_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/20/1/10.1116/11.20121101\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/20/1/10.1116/11.20121101.qa1\",\"CitedBy\":8,\"Discovery Date\":\"08/02/2014\"},\r\n\t{\"ID\":\"3\",\"Compound\":\"Si (100)\", \"SpectralRegion\":\"valence band\", \"GraphURL\":\"getsssdataflot.asp?id=3&lbl=Si%20(100)%20valence%20band\",\"Thumbnail\":\"11.20121101.figures.online.f3_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/20/1/10.1116/11.20121101\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/20/1/10.1116/11.20121101.qa1\",\"CitedBy\":8,\"Discovery Date\":\"08/03/2014\"},\r\n\t{\"ID\":\"4\",\"Compound\":\"Si (100)\", \"SpectralRegion\":\"0 1s\", \"GraphURL\":\"getsssdataflot.asp?id=4&lbl=Si%20(100)%200%1s\",\"Thumbnail\":\"11.20121101.figures.online.f4_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/20/1/10.1116/11.20121101\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/20/1/10.1116/11.20121101.qa1\",\"CitedBy\":8,\"Discovery Date\":\"08/04/2014\"},\r\n\t{\"ID\":\"5\",\"Compound\":\"Al2O3 thin film\", \"SpectralRegion\":\"survey\", \"GraphURL\":\"getsssdataflot.asp?id=5&lbl=Al2O3%20thin%20film%20survey\",\"Thumbnail\":\"11.20121102.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/20/1/10.1116/11.20121102\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/20/1/10.1116/11.20121102.qa1\",\"CitedBy\":8,\"Discovery Date\":\"06/22/2013\"},\r\n {\"ID\":\"6\",\"Compound\":\"Kovar sheet 700C treatment\", \"SpectralRegion\":\"survey\", \"GraphURL\":\"getsssdataflot.asp?id=6&lbl=Kovar%20sheet,%20700C%20treatment%20survey\",\"Thumbnail\":\"11.20121102.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/22/1/10.1116/11.20150301\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/22/1/10.1116/11.20150301.qa1\",\"CitedBy\":0,\"Discovery Date\":\"01/01/2015\"},\r\n {\"ID\":\"7\",\"Compound\":\"Kovar sheet 700C treatment\", \"SpectralRegion\":\"Fe 2p\", \"GraphURL\":\"getsssdataflot.asp?id=7&lbl=Kovar%20sheet,%20700C%20treatment%20Fe2p\",\"Thumbnail\":\"11.20121102.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/22/1/10.1116/11.20150301\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/22/1/10.1116/11.20150301.qa1\",\"CitedBy\":0,\"Discovery Date\":\"01/01/2015\"},\r\n {\"ID\":\"8\",\"Compound\":\"Kovar sheet 700C treatment\", \"SpectralRegion\":\"Co 2p\", \"GraphURL\":\"getsssdataflot.asp?id=8&lbl=Kovar%20sheet,%20700C%20treatment%20Co2p\",\"Thumbnail\":\"11.20121102.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/22/1/10.1116/11.20150301\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/22/1/10.1116/11.20150301.qa1\",\"CitedBy\":0,\"Discovery Date\":\"01/01/2015\"},\r\n {\"ID\":\"9\",\"Compound\":\"Kovar sheet 700C treatment\", \"SpectralRegion\":\"Ni 2p\", \"GraphURL\":\"getsssdataflot.asp?id=9&lbl=Kovar%20sheet,%20700C%20treatment%20Ni2p\",\"Thumbnail\":\"11.20121102.figures.online.f1_thmb.gif\",\"ArticleID\":\"12345\",\"ArticleURL\":\"http://scitation.aip.org/content/avs/journal/sss/22/1/10.1116/11.20150301\",\"MetaURL\":\"http://scitation.aip.org/content/table/avs/journal/sss/22/1/10.1116/11.20150301.qa1\",\"CitedBy\":0,\"Discovery Date\":\"01/01/2015\"}\r\n]\r\n}","function renderChart(chartId, legendDivId) {\r\n\r\n\r\n\r\n var chartData1 = [];\r\n var chartData2 = [];\r\n var chartData3 = [];\r\n var chartData4 = [];\r\n\r\n function generateChartData() {\r\n var xValueStart = 0;\r\n\r\n\r\n\r\n for (var i = 0; i < 200; i++) {\r\n var newXValue = xValueStart + i;\r\n \r\n if(i==150){var a1 = Math.round(Math.random() * 50) + 300;}\r\n else{var a1 = Math.round(Math.random() * 50) + 50;}\r\n \r\n if(i==150){var a2 = Math.round(Math.random() * 50) + 310;}\r\n else{var a2 = Math.round(Math.random() * 50) + 15;}\r\n \r\n if(i==150){var a3 = Math.round(Math.random() * 50) + 288;}\r\n else{var a3 = Math.round(Math.random() * 50) + 25;}\r\n \r\n if(i==150){var a4 = Math.round(Math.random() * 50) + 320;}\r\n else{var a4 = Math.round(Math.random() * 50) + 40;}\r\n\r\n\r\n chartData1.push({\r\n xValue: i,\r\n yValue1: a1,\r\n yValue2: a2,\r\n yValue3: a3,\r\n yValue4: a4\r\n\r\n\r\n\r\n });\r\n chartData2.push({\r\n xValue: i,\r\n yValue: a2\r\n });\r\n chartData3.push({\r\n xValue: i,\r\n yValue: a3\r\n });\r\n chartData4.push({\r\n xValue: i,\r\n yValue: a4\r\n });\r\n }\r\n }\r\n\r\n generateChartData();\r\n\r\n /* AmCharts.ready(function () {\r\n var chart = new AmCharts.AmSerialChart();\r\n chart.dataProvider = chartData1;\r\n chart.categoryField = \"xValue\";\r\n\r\n var graph = new AmCharts.AmGraph();\r\n graph.valueField = \"yValue\";\r\n graph.type = \"line\";\r\n chart.addGraph(graph);\r\n\r\n chart.write('chartdiv');\r\n });*/\r\n\r\n var chart = AmCharts.makeChart(\r\n chartId, {\r\n \"type\": \"serial\",\r\n \"theme\": \"none\",\r\n \"pathToImages\": \"http://www.amcharts.com/lib/3/images/\",\r\n \"dataDateFormat\": \"YYYY-MM-DD\",\r\n \"valueAxes\": [{\r\n \"id\": \"v1\",\r\n \"axisAlpha\": 0,\r\n \"position\": \"left\"\r\n }],\r\n \"export\": {\r\n \"enabled\": true\r\n },\r\n \"graphs\": [{\r\n \"id\": \"g1\",\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": \"#FFFFFF\",\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 1000,\r\n \"lineThickness\": 2,\r\n \"title\": \"Al2SO4\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"yValue1\"\r\n },\r\n {\r\n \"id\": \"g2\",\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": \"#00FF00\",\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 1000,\r\n \"lineThickness\": 2,\r\n \"title\": \"K2SO4\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"yValue2\"\r\n },\r\n {\r\n \"id\": \"g3\",\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": \"#00FF00\",\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 1000,\r\n \"lineThickness\": 2,\r\n \"title\": \"Na2SO4\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"yValue3\"\r\n },\r\n {\r\n \"id\": \"g4\",\r\n \"bullet\": \"round\",\r\n \"bulletBorderAlpha\": 1,\r\n \"bulletColor\": \"#00FF00\",\r\n \"bulletSize\": 5,\r\n \"hideBulletsCount\": 1000,\r\n \"lineThickness\": 2,\r\n \"title\": \"CaSO4\",\r\n \"useLineColorForBulletBorder\": true,\r\n \"valueField\": \"yValue4\"\r\n }],\r\n \"categoryField\": \"xValue\",\r\n \"categoryAxis\": {\r\n \"parseDates\": false,\r\n \"dashLength\": 1,\r\n \"minorGridEnabled\": true,\r\n \"position\": \"bottom\"\r\n },\r\n exportConfig: {\r\n menuRight: '20px',\r\n menuBottom: '50px',\r\n menuItems: [{\r\n icon: 'http://www.amcharts.com/lib/3/images/export.png',\r\n format: 'png'\r\n }]\r\n },\r\n \"dataProvider\": chartData1,\r\n dataSetSelector: {\r\n position: \"left\"\r\n }\r\n });\r\n var legend = new AmCharts.AmLegend();\r\n legend.position = \"left\";\r\n legend.align = \"center\";\r\n legend.markerType = \"square\";\r\n legend.valueText = \"aa\";\r\n chart.addLegend(legend, legendDivId);\r\n\r\n\r\n\r\n}\r\n","var chart;\r\nvar modalChart;\r\nvar st;\r\nvar getFigure=\"\";\r\nfunction renderChart2(chartId, legendDivId) {\r\n\r\n var chartData = [];\r\n \r\n //changing datapeakinfo 1st graph value to max at left\r\n //datapoint1Peakinfo.PeakInfo[0].xval=20;\r\n var peakinfo1 = datapoint1Peakinfo.PeakInfo;\r\n var peakinfo2 = datapoint4Peakinfo.PeakInfo;\r\n var peakinfo3 = datapoint3Peakinfo.PeakInfo;\r\n\r\n generateChartData();\r\n\r\n function generateChartData() {\r\n var datasetarray1 = datapoint1.data;\r\n for (var i = 0; i < datasetarray1.length; i++) {\r\n var xVal = datasetarray1[i][0];\r\n var yVal = datasetarray1[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo1.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo1[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity\": yVal,\r\n \"label\": peakinfo1[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n var datasetarray2 = datapoint4.data;\r\n for (var i = 0; i < datasetarray2.length; i++) {\r\n var xVal = datasetarray2[i][0];\r\n var yVal = datasetarray2[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo2.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo2[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity2\": yVal,\r\n \"label\": peakinfo2[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity2\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n var datasetarray3 = datapoint3.data;\r\n for (var i = 0; i < datasetarray3.length; i++) {\r\n var xVal = datasetarray3[i][0];\r\n var yVal = datasetarray3[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo3.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo3[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity3\": yVal,\r\n \"label\": peakinfo3[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity3\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n //Set flag for figures\r\n $(\".graph-figures input[type=radio]\").each(function(){\r\n if($(this).prop(\"checked\")==true){\r\n getFigure=$(this).attr(\"graph-figures\");\r\n }\r\n });\r\n \r\n if(getFigure==\"AES\"){\r\n st=true;\r\n }else{\r\n st=false;\r\n }\r\n chart = AmCharts.makeChart(chartId, {\r\n \"type\": \"xy\",\r\n \"zoomOutButtonAlpha\": 1,\r\n /*\"marginRight\": 50,\r\n \"autoMarginOffset\": 20,\r\n \"marginTop\": 7,*/\r\n \"export\": {\r\n \"enabled\": true\r\n },\r\n /* \"chartCursorSettings\": {\r\n \"valueBalloonsEnabled\": true,\r\n \"fullWidth\": true,\r\n \"cursorAlpha\": 0.1,\r\n \"valueLineBalloonEnabled\": true,\r\n \"valueLineEnabled\": true,\r\n \"valueLineAlpha\": 0.5\r\n },*/\r\n \"mouseWheelZoomEnabled\": true,\r\n\t\t/*\"valueAxes\": [{\r\n \"id\": \"v1\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"position\": \"bottom\",\r\n \"tickLength\":0,\r\n \"offset\":50\r\n }, {\r\n \"id\": \"v2\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"position\": \"bottom\",\r\n \"tickLength\":0,\r\n \"offset\":0\r\n }, {\r\n \"id\": \"v3\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"tickLength\":0,\r\n \"position\": \"bottom\",\r\n \"offset\":0\r\n }],\r\n \"valueAxes\": [{\r\n \"axisAlpha\": 0.2,\r\n \"dashLength\": 1,\r\n \"position\": \"left\"\r\n }],*/\r\n \"graphs\": [\r\n {\r\n \"gid\": \"AmGraph-1\",\r\n\t\t\t\t\"valueAxis\": \"v1\",\r\n \"title\": \"Si (100)/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity\",\r\n \"lineColor\": '#FF9E01',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#FF9E01'\r\n\t\t}, {\r\n \"gid\": \"AmGraph-2\",\r\n\t\t\t\t\"valueAxis\": \"v2\",\r\n \"title\": \"Kovar sheet, 700C treatment/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity2\",\r\n \"lineColor\": '#FF0811',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#FF0811'\r\n\t\t}, {\r\n \"gid\": \"AmGraph-3\",\r\n\t\t\t\t\"valueAxis\": \"v3\",\r\n \"title\": \"Al2O3 thin film/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity3\",\r\n \"lineColor\": '#084bff',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#084bff'\r\n \r\n\t\t}\r\n\r\n\t],\r\n \"valueAxes\": [\r\n {\r\n \"title\": \"Binding energy (eV)\",\r\n \"position\": \"bottom\",\r\n \"reversed\":st,\r\n },\r\n {\r\n \"title\": \"Intensity (Counts/s)\",\r\n \"position\": \"left\" \r\n }\r\n ],\r\n\t /*\"chartCursor\": {\r\n \"oneBalloonOnly\": true\r\n },*/\r\n /*\"chartScrollbar\": {\r\n \"autoGridCount\": true,\r\n \"graph\": \"g1\",\r\n \"scrollbarHeight\": 25\r\n },*/\r\n /*\"chartCursor\": {\r\n \"limitToGraph\":\"g1\"\r\n }, */ \r\n /* \"zoomControl\": {\r\n\t\t\"zoomControlEnabled\": true\r\n\t},*/\r\n \"dataProvider\": chartData\r\n });\r\n //Zoom part\r\n/*chart.addListener(\"rendered\", zoomChart);\r\nzoomChart();\r\n\r\n// this method is called when chart is first inited as we listen for \"rendered\" event\r\nfunction zoomChart() {\r\n // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues\r\n chart.zoomToIndexes(chartData.length - 500, chartData.length - 50);\r\n}*/\r\nfunction handleLegendClick( graph ) {\r\n var chartVar = graph.chart;\r\n for( var i = 0; i < chartVar.graphs.length; i++ ) {\r\n if ( graph.id == chartVar.graphs[i].id ){\r\n var graphRow=$(\"#graph-row-\"+i);\r\n if($(graphRow).children().find(\".show-hide-graph\").hasClass(\"fa-eye\")){\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\",\"Show graph\");\r\n chartVar.hideGraph(chartVar.graphs[i]);\r\n var chart1 = modalChart.graphs[i].chart;\r\n chart1.hideGraph(modalChart.graphs[i]);\r\n } else {\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\",\"Hide graph\");\r\n chartVar.showGraph(chartVar.graphs[i]);\r\n var chart1 = modalChart.graphs[i].chart;\r\n chart1.showGraph(modalChart.graphs[i]);\r\n }\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n $(\"#chartModal .modal-body\").find(\".amcharts-chart-div a\").hide();\r\n }\r\n } \r\n \r\n // return false so that default action is canceled\r\n return false;\r\n}\r\n\r\n var legend = new AmCharts.AmLegend();\r\n legend.position = \"left\"\r\n legend.align = \"center\";\r\n legend.markerType = \"square\";\r\n legend.valueText = \"title\";\r\n legend.clickMarker = handleLegendClick;\r\n legend.clickLabel = handleLegendClick\r\n \r\n chart.addLegend(legend, legendDivId);\r\n \r\n //legend.addListener(\"clickLabel\", handleClick)\r\n\r\nfunction handleClick(event){\r\n console.log(event);\r\n}\r\n \r\n \r\n \r\n}\r\n\r\nfunction renderModalChart(chartId, legendDivId) {\r\n\r\n var chartData = [];\r\n \r\n //changing datapeakinfo 1st graph value to max at left\r\n //datapoint1Peakinfo.PeakInfo[0].xval=20;\r\n var peakinfo1 = datapoint1Peakinfo.PeakInfo;\r\n var peakinfo2 = datapoint4Peakinfo.PeakInfo;\r\n var peakinfo3 = datapoint3Peakinfo.PeakInfo;\r\n\r\n generateChartData();\r\n\r\n function generateChartData() {\r\n var datasetarray1 = datapoint1.data;\r\n for (var i = 0; i < datasetarray1.length; i++) {\r\n var xVal = datasetarray1[i][0];\r\n var yVal = datasetarray1[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo1.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo1[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity\": yVal,\r\n \"label\": peakinfo1[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n var datasetarray2 = datapoint4.data;\r\n for (var i = 0; i < datasetarray2.length; i++) {\r\n var xVal = datasetarray2[i][0];\r\n var yVal = datasetarray2[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo2.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo2[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity2\": yVal,\r\n \"label\": peakinfo2[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity2\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n var datasetarray3 = datapoint3.data;\r\n for (var i = 0; i < datasetarray3.length; i++) {\r\n var xVal = datasetarray3[i][0];\r\n var yVal = datasetarray3[i][1];\r\n var flag = 0;\r\n\r\n for (var j = 0; j < peakinfo3.length; j++) {\r\n\r\n if (parseFloat(xVal) == parseFloat(peakinfo3[j].xval)) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity3\": yVal,\r\n \"label\": peakinfo3[j].lbltext\r\n })\r\n flag = 1;\r\n }\r\n }\r\n\r\n if (flag == 0) {\r\n chartData.push({\r\n \"eV\": xVal,\r\n \"intensity3\": yVal\r\n })\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n modalChart = AmCharts.makeChart(chartId, {\r\n \"type\": \"xy\",\r\n \"zoomOutButtonAlpha\": 1,\r\n /*\"marginRight\": 50,\r\n \"autoMarginOffset\": 20,\r\n \"marginTop\": 7,*/\r\n \"export\": {\r\n \"enabled\": true\r\n },\r\n /* \"chartCursorSettings\": {\r\n \"valueBalloonsEnabled\": true,\r\n \"fullWidth\": true,\r\n \"cursorAlpha\": 0.1,\r\n \"valueLineBalloonEnabled\": true,\r\n \"valueLineEnabled\": true,\r\n \"valueLineAlpha\": 0.5\r\n },*/\r\n \"mouseWheelZoomEnabled\": true,\r\n\t\t/*\"valueAxes\": [{\r\n \"id\": \"v1\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"position\": \"bottom\",\r\n \"tickLength\":0,\r\n \"offset\":50\r\n }, {\r\n \"id\": \"v2\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"position\": \"bottom\",\r\n \"tickLength\":0,\r\n \"offset\":0\r\n }, {\r\n \"id\": \"v3\",\r\n \"gridAlpha\": 0,\r\n \"axisAlpha\": 1,\r\n \"tickLength\":0,\r\n \"position\": \"bottom\",\r\n \"offset\":0\r\n }],\r\n \"valueAxes\": [{\r\n \"axisAlpha\": 0.2,\r\n \"dashLength\": 1,\r\n \"position\": \"left\"\r\n }],*/\r\n \"graphs\": [\r\n {\r\n \"gid\": \"AmGraph-1\",\r\n\t\t\t\t\"valueAxis\": \"v1\",\r\n \"title\": \"Si (100)/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity\",\r\n \"lineColor\": '#FF9E01',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#FF9E01'\r\n\t\t}, {\r\n \"gid\": \"AmGraph-2\",\r\n\t\t\t\t\"valueAxis\": \"v2\",\r\n \"title\": \"Kovar sheet, 700C treatment/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity2\",\r\n \"lineColor\": '#FF0811',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#FF0811'\r\n\t\t}, {\r\n \"gid\": \"AmGraph-3\",\r\n\t\t\t\t\"valueAxis\": \"v3\",\r\n \"title\": \"Al2O3 thin film/ survey\",\r\n \"type\": \"line\",\r\n \"lineAlpha\": 1,\r\n \"xField\": \"eV\",\r\n \"yField\": \"intensity3\",\r\n \"lineColor\": '#084bff',\r\n \"labelText\": \"[[label]]\",\r\n \"color\": '#084bff'\r\n \r\n\t\t}\r\n\r\n\t],\r\n \"valueAxes\": [\r\n {\r\n \"title\": \"Binding energy (eV)\",\r\n \"position\": \"bottom\",\r\n \"reversed\":st,\r\n },\r\n {\r\n \"title\": \"Intensity (Counts/s)\",\r\n \"position\": \"left\" \r\n }\r\n ],\r\n\t /*\"chartCursor\": {\r\n \"oneBalloonOnly\": true\r\n },*/\r\n /*\"chartScrollbar\": {\r\n \"autoGridCount\": true,\r\n \"graph\": \"g1\",\r\n \"scrollbarHeight\": 25\r\n },*/\r\n /*\"chartCursor\": {\r\n \"limitToGraph\":\"g1\"\r\n }, */ \r\n /* \"zoomControl\": {\r\n\t\t\"zoomControlEnabled\": true\r\n\t},*/\r\n \"dataProvider\": chartData\r\n });\r\n //Zoom part\r\n/*chart.addListener(\"rendered\", zoomChart);\r\nzoomChart();\r\n\r\n// this method is called when chart is first inited as we listen for \"rendered\" event\r\nfunction zoomChart() {\r\n // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues\r\n chart.zoomToIndexes(chartData.length - 500, chartData.length - 50);\r\n}*/\r\nfunction handleModalLegendClick( graph ) {\r\n //var chart = graph.chart;\r\n for( var i = 0; i < modalChart.graphs.length; i++ ) {\r\n if ( graph.id == modalChart.graphs[i].id ){\r\n var graphRow=$(\"#graph-row-\"+i);\r\n if($(graphRow).children().find(\".show-hide-graph\").hasClass(\"fa-eye\")){\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\",\"Show graph\");\r\n modalChart.hideGraph(modalChart.graphs[i]);\r\n var chart1 = chart.graphs[i].chart;\r\n chart1.hideGraph(chart.graphs[i]);\r\n } else {\r\n $(graphRow).find(\".show-hide-graph\").toggleClass(\"fa-eye-slash fa-eye\");\r\n $(graphRow).find(\".show-hide-graph\").attr(\"title\",\"Hide graph\");\r\n modalChart.showGraph(modalChart.graphs[i]);\r\n var chart1 = chart.graphs[i].chart;\r\n chart1.showGraph(chart.graphs[i]);\r\n }\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n $(\"#chartModal .modal-body\").find(\".amcharts-chart-div a\").hide();\r\n }\r\n } \r\n \r\n // return false so that default action is canceled\r\n return false;\r\n}\r\n\r\n var legend = new AmCharts.AmLegend();\r\n legend.position = \"left\"\r\n legend.align = \"center\";\r\n legend.markerType = \"square\";\r\n legend.valueText = \"title\";\r\n legend.clickMarker = handleModalLegendClick;\r\n legend.clickLabel = handleModalLegendClick\r\n \r\n modalChart.addLegend(legend, legendDivId);\r\n \r\n //legend.addListener(\"clickLabel\", handleClick)\r\n\r\nfunction handleClick(event){\r\n console.log(event);\r\n}\r\n \r\n \r\n \r\n}\r\n \r\nfunction handleClick(event)\r\n{\r\n console.log(\"click\");\r\n console.log(event);\r\n}\r\n\r\nfunction offsetChart(){\r\n \r\n}\r\n","/*!\r\n * classie - class helper functions\r\n * from bonzo https://github.com/ded/bonzo\r\n * \r\n * classie.has( elem, 'my-class' ) -> true/false\r\n * classie.add( elem, 'my-new-class' )\r\n * classie.remove( elem, 'my-unwanted-class' )\r\n * classie.toggle( elem, 'my-class' )\r\n */\r\n\r\n/*jshint browser: true, strict: true, undef: true */\r\n\r\n( function( window ) {\r\n\r\n'use strict';\r\n\r\n// class helper functions from bonzo https://github.com/ded/bonzo\r\n\r\nfunction classReg( className ) {\r\n return new RegExp(\"(^|\\\\s+)\" + className + \"(\\\\s+|$)\");\r\n}\r\n\r\n// classList support for class management\r\n// altho to be fair, the api sucks because it won't accept multiple classes at once\r\nvar hasClass, addClass, removeClass;\r\n\r\nif ( 'classList' in document.documentElement ) {\r\n hasClass = function( elem, c ) {\r\n return elem.classList.contains( c );\r\n };\r\n addClass = function( elem, c ) {\r\n elem.classList.add( c );\r\n };\r\n removeClass = function( elem, c ) {\r\n elem.classList.remove( c );\r\n };\r\n}\r\nelse {\r\n hasClass = function( elem, c ) {\r\n return classReg( c ).test( elem.className );\r\n };\r\n addClass = function( elem, c ) {\r\n if ( !hasClass( elem, c ) ) {\r\n elem.className = elem.className + ' ' + c;\r\n }\r\n };\r\n removeClass = function( elem, c ) {\r\n elem.className = elem.className.replace( classReg( c ), ' ' );\r\n };\r\n}\r\n\r\nfunction toggleClass( elem, c ) {\r\n var fn = hasClass( elem, c ) ? removeClass : addClass;\r\n fn( elem, c );\r\n}\r\n\r\nwindow.classie = {\r\n // full names\r\n hasClass: hasClass,\r\n addClass: addClass,\r\n removeClass: removeClass,\r\n toggleClass: toggleClass,\r\n // short names\r\n has: hasClass,\r\n add: addClass,\r\n remove: removeClass,\r\n toggle: toggleClass\r\n};\r\n\r\n})( window );","/*!\r\n * clipboard.js v1.5.10\r\n * https://zenorocha.github.io/clipboard.js\r\n *\r\n * Licensed MIT © Zeno Rocha\r\n */\r\n!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var e;e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(c,a){if(!n[c]){if(!e[c]){var s=\"function\"==typeof require&&require;if(!a&&s)return s(c,!0);if(r)return r(c,!0);var l=new Error(\"Cannot find module '\"+c+\"'\");throw l.code=\"MODULE_NOT_FOUND\",l}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){var n=e[c][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var r=\"function\"==typeof require&&require,c=0;co;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,c=o.length;c>r;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(i,r){if(\"function\"==typeof t&&t.amd)t([\"module\",\"select\"],r);else if(\"undefined\"!=typeof o)r(n,e(\"select\"));else{var c={exports:{}};r(c,i.select),i.clipboardAction=c.exports}}(this,function(t,e){\"use strict\";function n(t){return t&&t.__esModule?t:{\"default\":t}}function o(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}var i=n(e),r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol?\"symbol\":typeof t},c=function(){function t(t,e){for(var n=0;n 50)\r\n $('#home > .navbar').removeClass('navbar-transparent');\r\n else\r\n $('#home > .navbar').addClass('navbar-transparent');\r\n });\r\n\r\n $(\"a[href='#']\").click(function (e) {\r\n e.preventDefault();\r\n });\r\n\r\n var $button = $(\"
    < >
    \").click(function () {\r\n var html = $(this).parent().html();\r\n html = cleanSource(html);\r\n $(\"#source-modal pre\").text(html);\r\n $(\"#source-modal\").modal();\r\n });\r\n\r\n $('.bs-component [data-toggle=\"popover\"]').popover();\r\n $('.bs-component [data-toggle=\"tooltip\"]').tooltip();\r\n\r\n $(\".bs-component\").hover(function () {\r\n $(this).append($button);\r\n $button.show();\r\n }, function () {\r\n $button.hide();\r\n });\r\n\r\n function cleanSource(html) {\r\n html = html.replace(/×/g, \"&close;\")\r\n .replace(/«/g, \"«\")\r\n .replace(/»/g, \"»\")\r\n .replace(/←/g, \"←\")\r\n .replace(/→/g, \"→\");\r\n\r\n var lines = html.split(/\\n/);\r\n\r\n lines.shift();\r\n lines.splice(-1, 1);\r\n\r\n var indentSize = lines[0].length - lines[0].trim().length,\r\n re = new RegExp(\" {\" + indentSize + \"}\");\r\n\r\n lines = lines.map(function (line) {\r\n if (line.match(re)) {\r\n line = line.substring(indentSize);\r\n }\r\n\r\n return line;\r\n });\r\n\r\n lines = lines.join(\"\\n\");\r\n \r\n //remopving extra datepicker class added\r\n lines = lines.replace(\" hasDatepicker\", \"\");\r\n //remopving extra autocomplete class added\r\n lines = lines.replace(\" ui-autocomplete-input\", \"\");\r\n lines = lines.replace(' autocomplete=\"off\"', \"\");\r\n //removing extra slider classes\r\n lines = lines.replace(' class=\"ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all\"',\"\");\r\n lines = lines.replace('',\"\");\r\n \r\n\r\n return lines;\r\n }\r\n\r\n})();","\r\n/*\r\n *\r\n * More info at [www.dropzonejs.com](http://www.dropzonejs.com)\r\n *\r\n * Copyright (c) 2012, Matias Meno\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n * THE SOFTWARE.\r\n *\r\n */\r\nfunction chemicalsremove(id) {\r\n\r\n //$(\"#addedChemicals\").find(\"#addedChemicalProp-\" + id).fadeOut('fast', function () {\r\n // $(\"#addedChemicals\").find(\"#addedChemicalProp-\" + id).remove();\r\n //});\r\n\r\n ////if the last chemical is removed\r\n //var getParentId = $('.addedChemicals-remove').length;\r\n //var g = getParentId - 1;\r\n //if (g == 0) {\r\n // $('.file_count_text').hide();\r\n //} else {\r\n // $('.file_count_text').show();\r\n //}\r\n ////$('.filecount').html(getParentId - 1);\r\n\r\n //if ($(\"#addedChemicals tbody\").children().length == 1) {\r\n // $(\".plot-chart\").addClass(\"disabled\");\r\n // $(\".plot-chart\").prop(\"disabled\", true);\r\n // $(\".clear-all-datasets\").addClass(\"disabled\");\r\n // $(\".clear-all-datasets\").prop(\"disabled\", true);\r\n // $(\".no-chemical-msg\").fadeIn();\r\n // $(\".added-chemicals-title\").addClass(\"title-border-bottom\");\r\n //}\r\n\r\n\r\n}\r\n\r\nfunction editfilename(id) {\r\n\r\n //var tddata = $('#td-data-' + id).html();\r\n //$('#td-data-' + id).html('');\r\n ////$('#edit-button-'+id).html('Save');\r\n ////$('#edit-button-'+id).attr(\"onclick\",\"savefilename(\"+id+\")\");\r\n //$(\"#edit-text-\" + id).focus();\r\n //$('#edit-button-' + id).hide();\r\n //$('#save-button-' + id).show();\r\n ////Edit\r\n}\r\nfunction savefilename(id) {\r\n\r\n //var textd = $('#edit-text-' + id).val();\r\n //$('#td-data-' + id).html(textd);\r\n ////\t$('#edit-button-'+id).html('Edit');\r\n ////\t$('#edit-button-'+id).attr(\"onclick\",\"editfilename(\"+id+\")\");\r\n //$('#edit-button-' + id).show();\r\n //$('#save-button-' + id).hide();\r\n\r\n}\r\n(function () {\r\n var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,\r\n __slice = [].slice,\r\n __hasProp = {}.hasOwnProperty,\r\n __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };\r\n\r\n noop = function () { };\r\n\r\n Emitter = (function () {\r\n function Emitter() { }\r\n\r\n Emitter.prototype.addEventListener = Emitter.prototype.on;\r\n\r\n Emitter.prototype.on = function (event, fn) {\r\n this._callbacks = this._callbacks || {};\r\n if (!this._callbacks[event]) {\r\n this._callbacks[event] = [];\r\n }\r\n this._callbacks[event].push(fn);\r\n return this;\r\n };\r\n\r\n Emitter.prototype.emit = function () {\r\n var args, callback, callbacks, event, _i, _len;\r\n event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\r\n this._callbacks = this._callbacks || {};\r\n callbacks = this._callbacks[event];\r\n if (callbacks) {\r\n for (_i = 0, _len = callbacks.length; _i < _len; _i++) {\r\n callback = callbacks[_i];\r\n callback.apply(this, args);\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n Emitter.prototype.removeListener = Emitter.prototype.off;\r\n\r\n Emitter.prototype.removeAllListeners = Emitter.prototype.off;\r\n\r\n Emitter.prototype.removeEventListener = Emitter.prototype.off;\r\n\r\n Emitter.prototype.off = function (event, fn) {\r\n var callback, callbacks, i, _i, _len;\r\n if (!this._callbacks || arguments.length === 0) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n callbacks = this._callbacks[event];\r\n if (!callbacks) {\r\n return this;\r\n }\r\n if (arguments.length === 1) {\r\n delete this._callbacks[event];\r\n return this;\r\n }\r\n for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {\r\n callback = callbacks[i];\r\n if (callback === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n };\r\n\r\n return Emitter;\r\n\r\n })();\r\n\r\n Dropzone = (function (_super) {\r\n var extend, resolveOption;\r\n\r\n __extends(Dropzone, _super);\r\n\r\n Dropzone.prototype.Emitter = Emitter;\r\n\r\n\r\n /*\r\n This is a list of all available events you can register on a dropzone object.\r\n \r\n You can register an event handler like this:\r\n \r\n dropzone.on(\"dragEnter\", function() { });\r\n */\r\n\r\n Dropzone.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\r\n\r\n Dropzone.prototype.defaultOptions = {\r\n url: 'http://localhost:58252/upload',\r\n method: \"post\",\r\n withCredentials: false,\r\n parallelUploads: 2,\r\n uploadMultiple: false,\r\n maxFilesize: 256,\r\n paramName: \"file\",\r\n createImageThumbnails: true,\r\n maxThumbnailFilesize: 10,\r\n thumbnailWidth: 120,\r\n thumbnailHeight: 120,\r\n filesizeBase: 1000,\r\n maxFiles: null,\r\n params: {},\r\n clickable: true,\r\n ignoreHiddenFiles: true,\r\n acceptedFiles: null,\r\n acceptedMimeTypes: null,\r\n autoProcessQueue: true,\r\n autoQueue: true,\r\n addRemoveLinks: true,\r\n previewsContainer: null,\r\n hiddenInputContainer: \"body\",\r\n capture: null,\r\n renameFilename: null,\r\n dictDefaultMessage: \"Drop spectra data files (in tab delimited format) here or click to upload\",\r\n dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\r\n dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\r\n dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\r\n dictInvalidFileType: \"You can't upload files of this type.\",\r\n dictResponseError: \"Server responded with {{statusCode}} code.\",\r\n dictCancelUpload: \"Cancel upload\",\r\n dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\r\n dictRemoveFile: \"Remove file\",\r\n dictRemoveFileConfirmation: null,\r\n dictMaxFilesExceeded: \"You can not upload any more files.\",\r\n accept: function (file, done) {\r\n return done();\r\n },\r\n init: function () {\r\n return noop;\r\n },\r\n forceFallback: false,\r\n fallback: function () {\r\n var child, messageElement, span, _i, _len, _ref;\r\n this.element.className = \"\" + this.element.className + \" dz-browser-not-supported\";\r\n _ref = this.element.getElementsByTagName(\"div\");\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n child = _ref[_i];\r\n if (/(^| )dz-message($| )/.test(child.className)) {\r\n messageElement = child;\r\n child.className = \"dz-message\";\r\n continue;\r\n }\r\n }\r\n if (!messageElement) {\r\n messageElement = Dropzone.createElement(\"
    \");\r\n this.element.appendChild(messageElement);\r\n }\r\n span = messageElement.getElementsByTagName(\"span\")[0];\r\n if (span) {\r\n if (span.textContent != null) {\r\n span.textContent = this.options.dictFallbackMessage;\r\n } else if (span.innerText != null) {\r\n span.innerText = this.options.dictFallbackMessage;\r\n }\r\n }\r\n return this.element.appendChild(this.getFallbackForm());\r\n },\r\n resize: function (file) {\r\n var info, srcRatio, trgRatio;\r\n info = {\r\n srcX: 0,\r\n srcY: 0,\r\n srcWidth: file.width,\r\n srcHeight: file.height\r\n };\r\n srcRatio = file.width / file.height;\r\n info.optWidth = this.options.thumbnailWidth;\r\n info.optHeight = this.options.thumbnailHeight;\r\n if ((info.optWidth == null) && (info.optHeight == null)) {\r\n info.optWidth = info.srcWidth;\r\n info.optHeight = info.srcHeight;\r\n } else if (info.optWidth == null) {\r\n info.optWidth = srcRatio * info.optHeight;\r\n } else if (info.optHeight == null) {\r\n info.optHeight = (1 / srcRatio) * info.optWidth;\r\n }\r\n trgRatio = info.optWidth / info.optHeight;\r\n if (file.height < info.optHeight || file.width < info.optWidth) {\r\n info.trgHeight = info.srcHeight;\r\n info.trgWidth = info.srcWidth;\r\n } else {\r\n if (srcRatio > trgRatio) {\r\n info.srcHeight = file.height;\r\n info.srcWidth = info.srcHeight * trgRatio;\r\n } else {\r\n info.srcWidth = file.width;\r\n info.srcHeight = info.srcWidth / trgRatio;\r\n }\r\n }\r\n info.srcX = (file.width - info.srcWidth) / 2;\r\n info.srcY = (file.height - info.srcHeight) / 2;\r\n return info;\r\n },\r\n\r\n /*\r\n Those functions register themselves to the events on init and handle all\r\n the user interface specific stuff. Overwriting them won't break the upload\r\n but can break the way it's displayed.\r\n You can overwrite them if you don't like the default behavior. If you just\r\n want to add an additional event handler, register it on the dropzone object\r\n and don't overwrite those options.\r\n */\r\n drop: function (e) {\r\n return this.element.classList.remove(\"dz-drag-hover\");\r\n },\r\n dragstart: noop,\r\n dragend: function (e) {\r\n return this.element.classList.remove(\"dz-drag-hover\");\r\n },\r\n dragenter: function (e) {\r\n return this.element.classList.add(\"dz-drag-hover\");\r\n },\r\n dragover: function (e) {\r\n return this.element.classList.add(\"dz-drag-hover\");\r\n },\r\n dragleave: function (e) {\r\n return this.element.classList.remove(\"dz-drag-hover\");\r\n },\r\n paste: noop,\r\n reset: function () {\r\n return this.element.classList.remove(\"dz-started\");\r\n },\r\n addedfile: function (file) {\r\n //if (file.type == \"text/plain\" || file.type == \"application/vnd.ms-excel\" || file.type == \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\") {\r\n $(\".no-chemical-msg\").hide();\r\n var getParentId = $('.addedChemicals-remove').length;\r\n var g = getParentId + 1;\r\n if (g == 0) {\r\n $('.file_count_text').hide();\r\n } else {\r\n $('.file_count_text').show();\r\n }\r\n //$('.filecount').html(getParentId + 1);\r\n //var newRow = '' +\r\n // '' + file.name + '' +\r\n // '' +\r\n // '' +\r\n // '' +\r\n // '' +\r\n // '' +\r\n // '';\r\n //$(\"#addedChemicals tbody\").append(newRow);\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-\" + getParentId).fadeIn(function () {\r\n $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-\" + getParentId).removeClass(\"added-row\");\r\n });\r\n var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;\r\n if (this.element === this.previewsContainer) {\r\n this.element.classList.add(\"dz-started\");\r\n }\r\n if (this.previewsContainer) {\r\n //file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());\r\n //file.previewTemplate = file.previewElement;\r\n //this.previewsContainer.appendChild(file.previewElement);\r\n //_ref = file.previewElement.querySelectorAll(\"[data-dz-name]\");\r\n // for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n // node = _ref[_i];\r\n // node.textContent = this._renameFilename(file.name);\r\n // }\r\n //_ref1 = file.previewElement.querySelectorAll(\"[data-dz-size]\");\r\n // for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {\r\n // node = _ref1[_j];\r\n // node.innerHTML = this.filesize(file.size);\r\n // }\r\n // if (this.options.addRemoveLinks) {\r\n // file._removeLink = Dropzone.createElement(\"\" + this.options.dictRemoveFile + \"\");\r\n // file.previewElement.appendChild(file._removeLink);\r\n // }\r\n removeFileEvent = (function (_this) {\r\n //console.log(_this);\r\n return function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (file.status === Dropzone.UPLOADING) {\r\n return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function () {\r\n return _this.removeFile(file);\r\n });\r\n } else {\r\n if (_this.options.dictRemoveFileConfirmation) {\r\n return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function () {\r\n return _this.removeFile(file);\r\n });\r\n } else {\r\n return _this.removeFile(file);\r\n }\r\n }\r\n };\r\n })(this);\r\n //_ref2 = file.previewElement.querySelectorAll(\"[data-dz-remove]\");\r\n _results = [];\r\n // for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\r\n // removeLink = _ref2[_k];\r\n // _results.push(removeLink.addEventListener(\"click\", removeFileEvent));\r\n // }\r\n return _results;\r\n }\r\n //}\r\n //else {\r\n // alert(\"Invalid file format. Please consult the user documentation\");\r\n // return false;\r\n //}\r\n },\r\n removedfile: function (file) {\r\n var _ref;\r\n if (file.previewElement) {\r\n if ((_ref = file.previewElement) != null) {\r\n _ref.parentNode.removeChild(file.previewElement);\r\n }\r\n }\r\n return this._updateMaxFilesReachedClass();\r\n },\r\n thumbnail: function (file, dataUrl) {\r\n var thumbnailElement, _i, _len, _ref;\r\n if (file.previewElement) {\r\n file.previewElement.classList.remove(\"dz-file-preview\");\r\n _ref = file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\");\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n thumbnailElement = _ref[_i];\r\n thumbnailElement.alt = file.name;\r\n thumbnailElement.src = dataUrl;\r\n }\r\n return setTimeout(((function (_this) {\r\n return function () {\r\n return file.previewElement.classList.add(\"dz-image-preview\");\r\n };\r\n })(this)), 1);\r\n }\r\n },\r\n error: function (file, message) {\r\n var node, _i, _len, _ref, _results;\r\n if (file.previewElement) {\r\n file.previewElement.classList.add(\"dz-error\");\r\n if (typeof message !== \"String\" && message.error) {\r\n message = message.error;\r\n }\r\n _ref = file.previewElement.querySelectorAll(\"[data-dz-errormessage]\");\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n node = _ref[_i];\r\n _results.push(node.textContent = message);\r\n }\r\n return _results;\r\n }\r\n },\r\n errormultiple: noop,\r\n processing: function (file) {\r\n if (file.previewElement) {\r\n file.previewElement.classList.add(\"dz-processing\");\r\n if (file._removeLink) {\r\n return file._removeLink.textContent = this.options.dictCancelUpload;\r\n }\r\n }\r\n },\r\n processingmultiple: noop,\r\n uploadprogress: function (file, progress, bytesSent) {\r\n var node, _i, _len, _ref, _results;\r\n if (file.previewElement) {\r\n _ref = file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\");\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n node = _ref[_i];\r\n if (node.nodeName === 'PROGRESS') {\r\n _results.push(node.value = progress);\r\n } else {\r\n _results.push(node.style.width = \"\" + progress + \"%\");\r\n }\r\n }\r\n return _results;\r\n }\r\n },\r\n totaluploadprogress: noop,\r\n sending: noop,\r\n sendingmultiple: noop,\r\n success: function (file) {\r\n if (file.previewElement) {\r\n return file.previewElement.classList.add(\"dz-success\");\r\n }\r\n },\r\n successmultiple: noop,\r\n canceled: function (file) {\r\n return this.emit(\"error\", file, \"Upload canceled.\");\r\n },\r\n canceledmultiple: noop,\r\n complete: function (file) {\r\n if (file._removeLink) {\r\n file._removeLink.textContent = this.options.dictRemoveFile;\r\n }\r\n if (file.previewElement) {\r\n return file.previewElement.classList.add(\"dz-complete\");\r\n }\r\n },\r\n completemultiple: noop,\r\n maxfilesexceeded: noop,\r\n maxfilesreached: noop,\r\n queuecomplete: noop,\r\n addedfiles: noop,\r\n previewTemplate: \"\"\r\n };\r\n\r\n extend = function () {\r\n var key, object, objects, target, val, _i, _len;\r\n target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\r\n for (_i = 0, _len = objects.length; _i < _len; _i++) {\r\n object = objects[_i];\r\n for (key in object) {\r\n val = object[key];\r\n target[key] = val;\r\n }\r\n }\r\n return target;\r\n };\r\n\r\n function Dropzone(element, options) {\r\n var elementOptions, fallback, _ref;\r\n this.element = element;\r\n this.version = Dropzone.version;\r\n this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\\n*/g, \"\");\r\n this.clickableElements = [];\r\n this.listeners = [];\r\n this.files = [];\r\n if (typeof this.element === \"string\") {\r\n this.element = document.querySelector(this.element);\r\n }\r\n if (!(this.element && (this.element.nodeType != null))) {\r\n throw new Error(\"Invalid dropzone element.\");\r\n }\r\n if (this.element.dropzone) {\r\n throw new Error(\"Dropzone already attached.\");\r\n }\r\n Dropzone.instances.push(this);\r\n this.element.dropzone = this;\r\n elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};\r\n this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});\r\n if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {\r\n return this.options.fallback.call(this);\r\n }\r\n if (this.options.url == null) {\r\n this.options.url = this.element.getAttribute(\"action\");\r\n }\r\n if (!this.options.url) {\r\n throw new Error(\"No URL provided.\");\r\n }\r\n if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {\r\n throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\r\n }\r\n if (this.options.acceptedMimeTypes) {\r\n this.options.acceptedFiles = this.options.acceptedMimeTypes;\r\n delete this.options.acceptedMimeTypes;\r\n }\r\n this.options.method = this.options.method.toUpperCase();\r\n if ((fallback = this.getExistingFallback()) && fallback.parentNode) {\r\n fallback.parentNode.removeChild(fallback);\r\n }\r\n if (this.options.previewsContainer !== false) {\r\n if (this.options.previewsContainer) {\r\n this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, \"previewsContainer\");\r\n } else {\r\n this.previewsContainer = this.element;\r\n }\r\n }\r\n if (this.options.clickable) {\r\n if (this.options.clickable === true) {\r\n this.clickableElements = [this.element];\r\n } else {\r\n this.clickableElements = Dropzone.getElements(this.options.clickable, \"clickable\");\r\n }\r\n }\r\n this.init();\r\n }\r\n\r\n Dropzone.prototype.getAcceptedFiles = function () {\r\n var file, _i, _len, _ref, _results;\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (file.accepted) {\r\n _results.push(file);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.getRejectedFiles = function () {\r\n var file, _i, _len, _ref, _results;\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (!file.accepted) {\r\n _results.push(file);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.getFilesWithStatus = function (status) {\r\n var file, _i, _len, _ref, _results;\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (file.status === status) {\r\n _results.push(file);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.getQueuedFiles = function () {\r\n return this.getFilesWithStatus(Dropzone.QUEUED);\r\n };\r\n\r\n Dropzone.prototype.getUploadingFiles = function () {\r\n return this.getFilesWithStatus(Dropzone.UPLOADING);\r\n };\r\n\r\n Dropzone.prototype.getAddedFiles = function () {\r\n return this.getFilesWithStatus(Dropzone.ADDED);\r\n };\r\n\r\n Dropzone.prototype.getActiveFiles = function () {\r\n var file, _i, _len, _ref, _results;\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {\r\n _results.push(file);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.init = function () {\r\n var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;\r\n if (this.element.tagName === \"form\") {\r\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\r\n }\r\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\r\n this.element.appendChild(Dropzone.createElement(\"
    \" + this.options.dictDefaultMessage + \"
    \"));\r\n }\r\n if (this.clickableElements.length) {\r\n setupHiddenFileInput = (function (_this) {\r\n return function () {\r\n if (_this.hiddenFileInput) {\r\n _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);\r\n }\r\n _this.hiddenFileInput = document.createElement(\"input\");\r\n _this.hiddenFileInput.setAttribute(\"type\", \"file\");\r\n if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {\r\n _this.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\r\n }\r\n _this.hiddenFileInput.className = \"dz-hidden-input\";\r\n if (_this.options.acceptedFiles != null) {\r\n _this.hiddenFileInput.setAttribute(\"accept\", _this.options.acceptedFiles);\r\n }\r\n if (_this.options.capture != null) {\r\n _this.hiddenFileInput.setAttribute(\"capture\", _this.options.capture);\r\n }\r\n _this.hiddenFileInput.style.visibility = \"hidden\";\r\n _this.hiddenFileInput.style.position = \"absolute\";\r\n _this.hiddenFileInput.style.top = \"0\";\r\n _this.hiddenFileInput.style.left = \"0\";\r\n _this.hiddenFileInput.style.height = \"0\";\r\n _this.hiddenFileInput.style.width = \"0\";\r\n document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);\r\n return _this.hiddenFileInput.addEventListener(\"change\", function () {\r\n var file, files, _i, _len;\r\n files = _this.hiddenFileInput.files;\r\n if (files.length) {\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n _this.addFile(file);\r\n }\r\n }\r\n _this.emit(\"addedfiles\", files);\r\n return setupHiddenFileInput();\r\n });\r\n };\r\n })(this);\r\n setupHiddenFileInput();\r\n }\r\n this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;\r\n _ref1 = this.events;\r\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\r\n eventName = _ref1[_i];\r\n this.on(eventName, this.options[eventName]);\r\n }\r\n this.on(\"uploadprogress\", (function (_this) {\r\n return function () {\r\n return _this.updateTotalUploadProgress();\r\n };\r\n })(this));\r\n this.on(\"removedfile\", (function (_this) {\r\n return function () {\r\n return _this.updateTotalUploadProgress();\r\n };\r\n })(this));\r\n this.on(\"canceled\", (function (_this) {\r\n return function (file) {\r\n return _this.emit(\"complete\", file);\r\n };\r\n })(this));\r\n this.on(\"complete\", (function (_this) {\r\n return function (file) {\r\n if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {\r\n return setTimeout((function () {\r\n return _this.emit(\"queuecomplete\");\r\n }), 0);\r\n }\r\n };\r\n })(this));\r\n noPropagation = function (e) {\r\n e.stopPropagation();\r\n if (e.preventDefault) {\r\n return e.preventDefault();\r\n } else {\r\n return e.returnValue = false;\r\n }\r\n };\r\n this.listeners = [\r\n {\r\n element: this.element,\r\n events: {\r\n \"dragstart\": (function (_this) {\r\n return function (e) {\r\n return _this.emit(\"dragstart\", e);\r\n };\r\n })(this),\r\n \"dragenter\": (function (_this) {\r\n return function (e) {\r\n noPropagation(e);\r\n return _this.emit(\"dragenter\", e);\r\n };\r\n })(this),\r\n \"dragover\": (function (_this) {\r\n return function (e) {\r\n var efct;\r\n try {\r\n efct = e.dataTransfer.effectAllowed;\r\n } catch (_error) { }\r\n e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';\r\n noPropagation(e);\r\n return _this.emit(\"dragover\", e);\r\n };\r\n })(this),\r\n \"dragleave\": (function (_this) {\r\n return function (e) {\r\n return _this.emit(\"dragleave\", e);\r\n };\r\n })(this),\r\n \"drop\": (function (_this) {\r\n return function (e) {\r\n noPropagation(e);\r\n return _this.drop(e);\r\n };\r\n })(this),\r\n \"dragend\": (function (_this) {\r\n return function (e) {\r\n return _this.emit(\"dragend\", e);\r\n };\r\n })(this)\r\n }\r\n }\r\n ];\r\n this.clickableElements.forEach((function (_this) {\r\n return function (clickableElement) {\r\n return _this.listeners.push({\r\n element: clickableElement,\r\n events: {\r\n \"click\": function (evt) {\r\n if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(\".dz-message\")))) {\r\n _this.hiddenFileInput.click();\r\n }\r\n return true;\r\n }\r\n }\r\n });\r\n };\r\n })(this));\r\n this.enable();\r\n return this.options.init.call(this);\r\n };\r\n\r\n Dropzone.prototype.destroy = function () {\r\n var _ref;\r\n this.disable();\r\n this.removeAllFiles(true);\r\n if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {\r\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\r\n this.hiddenFileInput = null;\r\n }\r\n delete this.element.dropzone;\r\n return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\r\n };\r\n\r\n Dropzone.prototype.updateTotalUploadProgress = function () {\r\n var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;\r\n totalBytesSent = 0;\r\n totalBytes = 0;\r\n activeFiles = this.getActiveFiles();\r\n if (activeFiles.length) {\r\n _ref = this.getActiveFiles();\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n totalBytesSent += file.upload.bytesSent;\r\n totalBytes += file.upload.total;\r\n }\r\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\r\n } else {\r\n totalUploadProgress = 100;\r\n }\r\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\r\n };\r\n\r\n Dropzone.prototype._getParamName = function (n) {\r\n if (typeof this.options.paramName === \"function\") {\r\n return this.options.paramName(n);\r\n } else {\r\n return \"\" + this.options.paramName + (this.options.uploadMultiple ? \"[\" + n + \"]\" : \"\");\r\n }\r\n };\r\n\r\n Dropzone.prototype._renameFilename = function (name) {\r\n if (typeof this.options.renameFilename !== \"function\") {\r\n return name;\r\n }\r\n return this.options.renameFilename(name);\r\n };\r\n\r\n Dropzone.prototype.getFallbackForm = function () {\r\n var existingFallback, fields, fieldsString, form;\r\n if (existingFallback = this.getExistingFallback()) {\r\n return existingFallback;\r\n }\r\n fieldsString = \"
    \";\r\n if (this.options.dictFallbackText) {\r\n fieldsString += \"

    \" + this.options.dictFallbackText + \"

    \";\r\n }\r\n fieldsString += \"
    \";\r\n fields = Dropzone.createElement(fieldsString);\r\n if (this.element.tagName !== \"FORM\") {\r\n form = Dropzone.createElement(\"
    \");\r\n form.appendChild(fields);\r\n } else {\r\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\r\n this.element.setAttribute(\"method\", this.options.method);\r\n }\r\n return form != null ? form : fields;\r\n };\r\n\r\n Dropzone.prototype.getExistingFallback = function () {\r\n var fallback, getFallback, tagName, _i, _len, _ref;\r\n getFallback = function (elements) {\r\n var el, _i, _len;\r\n for (_i = 0, _len = elements.length; _i < _len; _i++) {\r\n el = elements[_i];\r\n if (/(^| )fallback($| )/.test(el.className)) {\r\n return el;\r\n }\r\n }\r\n };\r\n _ref = [\"div\", \"form\"];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n tagName = _ref[_i];\r\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\r\n return fallback;\r\n }\r\n }\r\n };\r\n\r\n Dropzone.prototype.setupEventListeners = function () {\r\n var elementListeners, event, listener, _i, _len, _ref, _results;\r\n _ref = this.listeners;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n elementListeners = _ref[_i];\r\n _results.push((function () {\r\n var _ref1, _results1;\r\n _ref1 = elementListeners.events;\r\n _results1 = [];\r\n for (event in _ref1) {\r\n listener = _ref1[event];\r\n _results1.push(elementListeners.element.addEventListener(event, listener, false));\r\n }\r\n return _results1;\r\n })());\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.removeEventListeners = function () {\r\n var elementListeners, event, listener, _i, _len, _ref, _results;\r\n _ref = this.listeners;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n elementListeners = _ref[_i];\r\n _results.push((function () {\r\n var _ref1, _results1;\r\n _ref1 = elementListeners.events;\r\n _results1 = [];\r\n for (event in _ref1) {\r\n listener = _ref1[event];\r\n _results1.push(elementListeners.element.removeEventListener(event, listener, false));\r\n }\r\n return _results1;\r\n })());\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.disable = function () {\r\n var file, _i, _len, _ref, _results;\r\n this.clickableElements.forEach(function (element) {\r\n return element.classList.remove(\"dz-clickable\");\r\n });\r\n this.removeEventListeners();\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n _results.push(this.cancelUpload(file));\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype.enable = function () {\r\n this.clickableElements.forEach(function (element) {\r\n return element.classList.add(\"dz-clickable\");\r\n });\r\n return this.setupEventListeners();\r\n };\r\n\r\n Dropzone.prototype.filesize = function (size) {\r\n var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;\r\n selectedSize = 0;\r\n selectedUnit = \"b\";\r\n if (size > 0) {\r\n units = ['TB', 'GB', 'MB', 'KB', 'b'];\r\n for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {\r\n unit = units[i];\r\n cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\r\n if (size >= cutoff) {\r\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\r\n selectedUnit = unit;\r\n break;\r\n }\r\n }\r\n selectedSize = Math.round(10 * selectedSize) / 10;\r\n }\r\n return \"\" + selectedSize + \" \" + selectedUnit;\r\n };\r\n\r\n Dropzone.prototype._updateMaxFilesReachedClass = function () {\r\n if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\r\n if (this.getAcceptedFiles().length === this.options.maxFiles) {\r\n this.emit('maxfilesreached', this.files);\r\n }\r\n return this.element.classList.add(\"dz-max-files-reached\");\r\n } else {\r\n return this.element.classList.remove(\"dz-max-files-reached\");\r\n }\r\n };\r\n\r\n Dropzone.prototype.drop = function (e) {\r\n var files, items;\r\n if (!e.dataTransfer) {\r\n return;\r\n }\r\n this.emit(\"drop\", e);\r\n files = e.dataTransfer.files;\r\n this.emit(\"addedfiles\", files);\r\n if (files.length) {\r\n items = e.dataTransfer.items;\r\n if (items && items.length && (items[0].webkitGetAsEntry != null)) {\r\n this._addFilesFromItems(items);\r\n } else {\r\n this.handleFiles(files);\r\n }\r\n }\r\n };\r\n\r\n Dropzone.prototype.paste = function (e) {\r\n var items, _ref;\r\n if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {\r\n return;\r\n }\r\n this.emit(\"paste\", e);\r\n items = e.clipboardData.items;\r\n if (items.length) {\r\n return this._addFilesFromItems(items);\r\n }\r\n };\r\n\r\n Dropzone.prototype.handleFiles = function (files) {\r\n var file, _i, _len, _results;\r\n _results = [];\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n _results.push(this.addFile(file));\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype._addFilesFromItems = function (items) {\r\n var entry, item, _i, _len, _results;\r\n _results = [];\r\n for (_i = 0, _len = items.length; _i < _len; _i++) {\r\n item = items[_i];\r\n if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {\r\n if (entry.isFile) {\r\n _results.push(this.addFile(item.getAsFile()));\r\n } else if (entry.isDirectory) {\r\n _results.push(this._addFilesFromDirectory(entry, entry.name));\r\n } else {\r\n _results.push(void 0);\r\n }\r\n } else if (item.getAsFile != null) {\r\n if ((item.kind == null) || item.kind === \"file\") {\r\n _results.push(this.addFile(item.getAsFile()));\r\n } else {\r\n _results.push(void 0);\r\n }\r\n } else {\r\n _results.push(void 0);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.prototype._addFilesFromDirectory = function (directory, path) {\r\n var dirReader, errorHandler, readEntries;\r\n dirReader = directory.createReader();\r\n errorHandler = function (error) {\r\n return typeof console !== \"undefined\" && console !== null ? typeof console.log === \"function\" ? console.log(error) : void 0 : void 0;\r\n };\r\n readEntries = (function (_this) {\r\n return function () {\r\n return dirReader.readEntries(function (entries) {\r\n var entry, _i, _len;\r\n if (entries.length > 0) {\r\n for (_i = 0, _len = entries.length; _i < _len; _i++) {\r\n entry = entries[_i];\r\n if (entry.isFile) {\r\n entry.file(function (file) {\r\n if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {\r\n return;\r\n }\r\n file.fullPath = \"\" + path + \"/\" + file.name;\r\n return _this.addFile(file);\r\n });\r\n } else if (entry.isDirectory) {\r\n _this._addFilesFromDirectory(entry, \"\" + path + \"/\" + entry.name);\r\n }\r\n }\r\n readEntries();\r\n }\r\n return null;\r\n }, errorHandler);\r\n };\r\n })(this);\r\n return readEntries();\r\n };\r\n\r\n Dropzone.prototype.accept = function (file, done) {\r\n if (file.size > this.options.maxFilesize * 1024 * 1024) {\r\n return done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\r\n } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\r\n return done(this.options.dictInvalidFileType);\r\n } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {\r\n done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\r\n return this.emit(\"maxfilesexceeded\", file);\r\n } else {\r\n return this.options.accept.call(this, file, done);\r\n }\r\n };\r\n\r\n Dropzone.prototype.addFile = function (file) {\r\n file.upload = {\r\n progress: 0,\r\n total: file.size,\r\n bytesSent: 0\r\n };\r\n this.files.push(file);\r\n file.status = Dropzone.ADDED;\r\n this.emit(\"addedfile\", file);\r\n this._enqueueThumbnail(file);\r\n return this.accept(file, (function (_this) {\r\n return function (error) {\r\n if (error) {\r\n file.accepted = false;\r\n _this._errorProcessing([file], error);\r\n } else {\r\n file.accepted = true;\r\n if (_this.options.autoQueue) {\r\n _this.enqueueFile(file);\r\n }\r\n }\r\n return _this._updateMaxFilesReachedClass();\r\n };\r\n })(this));\r\n };\r\n\r\n Dropzone.prototype.enqueueFiles = function (files) {\r\n var file, _i, _len;\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n this.enqueueFile(file);\r\n }\r\n return null;\r\n };\r\n\r\n Dropzone.prototype.enqueueFile = function (file) {\r\n if (file.status === Dropzone.ADDED && file.accepted === true) {\r\n file.status = Dropzone.QUEUED;\r\n if (this.options.autoProcessQueue) {\r\n return setTimeout(((function (_this) {\r\n return function () {\r\n return _this.processQueue();\r\n };\r\n })(this)), 0);\r\n }\r\n } else {\r\n throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\r\n }\r\n };\r\n\r\n Dropzone.prototype._thumbnailQueue = [];\r\n\r\n Dropzone.prototype._processingThumbnail = false;\r\n\r\n Dropzone.prototype._enqueueThumbnail = function (file) {\r\n if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\r\n this._thumbnailQueue.push(file);\r\n return setTimeout(((function (_this) {\r\n return function () {\r\n return _this._processThumbnailQueue();\r\n };\r\n })(this)), 0);\r\n }\r\n };\r\n\r\n Dropzone.prototype._processThumbnailQueue = function () {\r\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\r\n return;\r\n }\r\n this._processingThumbnail = true;\r\n return this.createThumbnail(this._thumbnailQueue.shift(), (function (_this) {\r\n return function () {\r\n _this._processingThumbnail = false;\r\n return _this._processThumbnailQueue();\r\n };\r\n })(this));\r\n };\r\n\r\n Dropzone.prototype.removeFile = function (file) {\r\n if (file.status === Dropzone.UPLOADING) {\r\n this.cancelUpload(file);\r\n }\r\n this.files = without(this.files, file);\r\n this.emit(\"removedfile\", file);\r\n if (this.files.length === 0) {\r\n return this.emit(\"reset\");\r\n }\r\n };\r\n\r\n Dropzone.prototype.removeAllFiles = function (cancelIfNecessary) {\r\n var file, _i, _len, _ref;\r\n if (cancelIfNecessary == null) {\r\n cancelIfNecessary = false;\r\n }\r\n _ref = this.files.slice();\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\r\n this.removeFile(file);\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n Dropzone.prototype.createThumbnail = function (file, callback) {\r\n var fileReader;\r\n fileReader = new FileReader;\r\n fileReader.onload = (function (_this) {\r\n return function () {\r\n if (file.type === \"image/svg+xml\") {\r\n _this.emit(\"thumbnail\", file, fileReader.result);\r\n if (callback != null) {\r\n callback();\r\n }\r\n return;\r\n }\r\n return _this.createThumbnailFromUrl(file, fileReader.result, callback);\r\n };\r\n })(this);\r\n return fileReader.readAsDataURL(file);\r\n };\r\n\r\n Dropzone.prototype.createThumbnailFromUrl = function (file, imageUrl, callback, crossOrigin) {\r\n var img;\r\n img = document.createElement(\"img\");\r\n if (crossOrigin) {\r\n img.crossOrigin = crossOrigin;\r\n }\r\n img.onload = (function (_this) {\r\n return function () {\r\n var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;\r\n file.width = img.width;\r\n file.height = img.height;\r\n resizeInfo = _this.options.resize.call(_this, file);\r\n if (resizeInfo.trgWidth == null) {\r\n resizeInfo.trgWidth = resizeInfo.optWidth;\r\n }\r\n if (resizeInfo.trgHeight == null) {\r\n resizeInfo.trgHeight = resizeInfo.optHeight;\r\n }\r\n canvas = document.createElement(\"canvas\");\r\n ctx = canvas.getContext(\"2d\");\r\n canvas.width = resizeInfo.trgWidth;\r\n canvas.height = resizeInfo.trgHeight;\r\n drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\r\n thumbnail = canvas.toDataURL(\"image/png\");\r\n _this.emit(\"thumbnail\", file, thumbnail);\r\n if (callback != null) {\r\n return callback();\r\n }\r\n };\r\n })(this);\r\n if (callback != null) {\r\n img.onerror = callback;\r\n }\r\n return img.src = imageUrl;\r\n };\r\n\r\n Dropzone.prototype.processQueue = function () {\r\n var i, parallelUploads, processingLength, queuedFiles;\r\n parallelUploads = this.options.parallelUploads;\r\n processingLength = this.getUploadingFiles().length;\r\n i = processingLength;\r\n if (processingLength >= parallelUploads) {\r\n return;\r\n }\r\n queuedFiles = this.getQueuedFiles();\r\n if (!(queuedFiles.length > 0)) {\r\n return;\r\n }\r\n if (this.options.uploadMultiple) {\r\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\r\n } else {\r\n while (i < parallelUploads) {\r\n if (!queuedFiles.length) {\r\n return;\r\n }\r\n this.processFile(queuedFiles.shift());\r\n i++;\r\n }\r\n }\r\n };\r\n\r\n Dropzone.prototype.processFile = function (file) {\r\n return this.processFiles([file]);\r\n };\r\n\r\n Dropzone.prototype.processFiles = function (files) {\r\n var file, _i, _len;\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n file.processing = true;\r\n file.status = Dropzone.UPLOADING;\r\n this.emit(\"processing\", file);\r\n }\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"processingmultiple\", files);\r\n }\r\n return this.uploadFiles(files);\r\n };\r\n\r\n Dropzone.prototype._getFilesWithXhr = function (xhr) {\r\n var file, files;\r\n return files = (function () {\r\n var _i, _len, _ref, _results;\r\n _ref = this.files;\r\n _results = [];\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n file = _ref[_i];\r\n if (file.xhr === xhr) {\r\n _results.push(file);\r\n }\r\n }\r\n return _results;\r\n }).call(this);\r\n };\r\n\r\n Dropzone.prototype.cancelUpload = function (file) {\r\n var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;\r\n if (file.status === Dropzone.UPLOADING) {\r\n groupedFiles = this._getFilesWithXhr(file.xhr);\r\n for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {\r\n groupedFile = groupedFiles[_i];\r\n groupedFile.status = Dropzone.CANCELED;\r\n }\r\n file.xhr.abort();\r\n for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {\r\n groupedFile = groupedFiles[_j];\r\n this.emit(\"canceled\", groupedFile);\r\n }\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"canceledmultiple\", groupedFiles);\r\n }\r\n } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {\r\n file.status = Dropzone.CANCELED;\r\n this.emit(\"canceled\", file);\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"canceledmultiple\", [file]);\r\n }\r\n }\r\n if (this.options.autoProcessQueue) {\r\n return this.processQueue();\r\n }\r\n };\r\n\r\n resolveOption = function () {\r\n var args, option;\r\n option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];\r\n if (typeof option === 'function') {\r\n return option.apply(this, args);\r\n }\r\n return option;\r\n };\r\n\r\n Dropzone.prototype.uploadFile = function (file) {\r\n return this.uploadFiles([file]);\r\n };\r\n\r\n Dropzone.prototype.uploadFiles = function (files) {\r\n var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;\r\n xhr = new XMLHttpRequest();\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n file.xhr = xhr;\r\n }\r\n method = resolveOption(this.options.method, files);\r\n url = resolveOption(this.options.url, files);\r\n xhr.open(method, url, true);\r\n xhr.withCredentials = !!this.options.withCredentials;\r\n response = null;\r\n handleError = (function (_this) {\r\n return function () {\r\n var _j, _len1, _results;\r\n _results = [];\r\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\r\n file = files[_j];\r\n _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr));\r\n }\r\n return _results;\r\n };\r\n })(this);\r\n updateProgress = (function (_this) {\r\n return function (e) {\r\n var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;\r\n if (e != null) {\r\n progress = 100 * e.loaded / e.total;\r\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\r\n file = files[_j];\r\n file.upload = {\r\n progress: progress,\r\n total: e.total,\r\n bytesSent: e.loaded\r\n };\r\n }\r\n } else {\r\n allFilesFinished = true;\r\n progress = 100;\r\n for (_k = 0, _len2 = files.length; _k < _len2; _k++) {\r\n file = files[_k];\r\n if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {\r\n allFilesFinished = false;\r\n }\r\n file.upload.progress = progress;\r\n file.upload.bytesSent = file.upload.total;\r\n }\r\n if (allFilesFinished) {\r\n return;\r\n }\r\n }\r\n _results = [];\r\n for (_l = 0, _len3 = files.length; _l < _len3; _l++) {\r\n file = files[_l];\r\n _results.push(_this.emit(\"uploadprogress\", file, progress, file.upload.bytesSent));\r\n }\r\n return _results;\r\n };\r\n })(this);\r\n xhr.onload = (function (_this) {\r\n return function (e) {\r\n var _ref;\r\n if (files[0].status === Dropzone.CANCELED) {\r\n return;\r\n }\r\n if (xhr.readyState !== 4) {\r\n return;\r\n }\r\n response = xhr.responseText;\r\n if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\r\n try {\r\n response = JSON.parse(response);\r\n } catch (_error) {\r\n e = _error;\r\n response = \"Invalid JSON response from server.\";\r\n }\r\n }\r\n updateProgress();\r\n if (!((200 <= (_ref = xhr.status) && _ref < 300))) {\r\n return handleError();\r\n } else {\r\n return _this._finished(files, response, e);\r\n }\r\n };\r\n })(this);\r\n xhr.onerror = (function (_this) {\r\n return function () {\r\n if (files[0].status === Dropzone.CANCELED) {\r\n return;\r\n }\r\n return handleError();\r\n };\r\n })(this);\r\n progressObj = (_ref = xhr.upload) != null ? _ref : xhr;\r\n progressObj.onprogress = updateProgress;\r\n headers = {\r\n \"Accept\": \"application/json\",\r\n \"Cache-Control\": \"no-cache\",\r\n \"X-Requested-With\": \"XMLHttpRequest\"\r\n };\r\n if (this.options.headers) {\r\n extend(headers, this.options.headers);\r\n }\r\n for (headerName in headers) {\r\n headerValue = headers[headerName];\r\n if (headerValue) {\r\n xhr.setRequestHeader(headerName, headerValue);\r\n }\r\n }\r\n formData = new FormData();\r\n if (this.options.params) {\r\n _ref1 = this.options.params;\r\n for (key in _ref1) {\r\n value = _ref1[key];\r\n formData.append(key, value);\r\n }\r\n }\r\n for (_j = 0, _len1 = files.length; _j < _len1; _j++) {\r\n file = files[_j];\r\n this.emit(\"sending\", file, xhr, formData);\r\n }\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"sendingmultiple\", files, xhr, formData);\r\n }\r\n if (this.element.tagName === \"FORM\") {\r\n _ref2 = this.element.querySelectorAll(\"input, textarea, select, button\");\r\n for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {\r\n input = _ref2[_k];\r\n inputName = input.getAttribute(\"name\");\r\n inputType = input.getAttribute(\"type\");\r\n if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\r\n _ref3 = input.options;\r\n for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {\r\n option = _ref3[_l];\r\n if (option.selected) {\r\n formData.append(inputName, option.value);\r\n }\r\n }\r\n } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== \"checkbox\" && _ref4 !== \"radio\") || input.checked) {\r\n formData.append(inputName, input.value);\r\n }\r\n }\r\n }\r\n for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {\r\n formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name));\r\n }\r\n return this.submitRequest(xhr, formData, files);\r\n };\r\n\r\n Dropzone.prototype.submitRequest = function (xhr, formData, files) {\r\n return xhr.send(formData);\r\n };\r\n\r\n Dropzone.prototype._finished = function (files, responseText, e) {\r\n var file, _i, _len;\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n file.status = Dropzone.SUCCESS;\r\n this.emit(\"success\", file, responseText, e);\r\n this.emit(\"complete\", file);\r\n }\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"successmultiple\", files, responseText, e);\r\n this.emit(\"completemultiple\", files);\r\n }\r\n if (this.options.autoProcessQueue) {\r\n return this.processQueue();\r\n }\r\n };\r\n\r\n Dropzone.prototype._errorProcessing = function (files, message, xhr) {\r\n var file, _i, _len;\r\n for (_i = 0, _len = files.length; _i < _len; _i++) {\r\n file = files[_i];\r\n file.status = Dropzone.ERROR;\r\n this.emit(\"error\", file, message, xhr);\r\n this.emit(\"complete\", file);\r\n }\r\n if (this.options.uploadMultiple) {\r\n this.emit(\"errormultiple\", files, message, xhr);\r\n this.emit(\"completemultiple\", files);\r\n }\r\n if (this.options.autoProcessQueue) {\r\n return this.processQueue();\r\n }\r\n };\r\n\r\n return Dropzone;\r\n\r\n })(Emitter);\r\n\r\n Dropzone.version = \"4.3.0\";\r\n\r\n Dropzone.options = {};\r\n\r\n Dropzone.optionsForElement = function (element) {\r\n if (element.getAttribute(\"id\")) {\r\n return Dropzone.options[camelize(element.getAttribute(\"id\"))];\r\n } else {\r\n return void 0;\r\n }\r\n };\r\n\r\n Dropzone.instances = [];\r\n\r\n Dropzone.forElement = function (element) {\r\n if (typeof element === \"string\") {\r\n element = document.querySelector(element);\r\n }\r\n if ((element != null ? element.dropzone : void 0) == null) {\r\n throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\r\n }\r\n return element.dropzone;\r\n };\r\n\r\n Dropzone.autoDiscover = true;\r\n\r\n Dropzone.discover = function () {\r\n var checkElements, dropzone, dropzones, _i, _len, _results;\r\n if (document.querySelectorAll) {\r\n dropzones = document.querySelectorAll(\".dropzone\");\r\n } else {\r\n dropzones = [];\r\n checkElements = function (elements) {\r\n var el, _i, _len, _results;\r\n _results = [];\r\n for (_i = 0, _len = elements.length; _i < _len; _i++) {\r\n el = elements[_i];\r\n if (/(^| )dropzone($| )/.test(el.className)) {\r\n _results.push(dropzones.push(el));\r\n } else {\r\n _results.push(void 0);\r\n }\r\n }\r\n return _results;\r\n };\r\n checkElements(document.getElementsByTagName(\"div\"));\r\n checkElements(document.getElementsByTagName(\"form\"));\r\n }\r\n _results = [];\r\n for (_i = 0, _len = dropzones.length; _i < _len; _i++) {\r\n dropzone = dropzones[_i];\r\n if (Dropzone.optionsForElement(dropzone) !== false) {\r\n _results.push(new Dropzone(dropzone));\r\n } else {\r\n _results.push(void 0);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\\/12/i];\r\n\r\n Dropzone.isBrowserSupported = function () {\r\n var capableBrowser, regex, _i, _len, _ref;\r\n capableBrowser = true;\r\n if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\r\n if (!(\"classList\" in document.createElement(\"a\"))) {\r\n capableBrowser = false;\r\n } else {\r\n _ref = Dropzone.blacklistedBrowsers;\r\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\r\n regex = _ref[_i];\r\n if (regex.test(navigator.userAgent)) {\r\n capableBrowser = false;\r\n continue;\r\n }\r\n }\r\n }\r\n } else {\r\n capableBrowser = false;\r\n }\r\n return capableBrowser;\r\n };\r\n\r\n without = function (list, rejectedItem) {\r\n var item, _i, _len, _results;\r\n _results = [];\r\n for (_i = 0, _len = list.length; _i < _len; _i++) {\r\n item = list[_i];\r\n if (item !== rejectedItem) {\r\n _results.push(item);\r\n }\r\n }\r\n return _results;\r\n };\r\n\r\n camelize = function (str) {\r\n return str.replace(/[\\-_](\\w)/g, function (match) {\r\n return match.charAt(1).toUpperCase();\r\n });\r\n };\r\n\r\n Dropzone.createElement = function (string) {\r\n var div;\r\n div = document.createElement(\"div\");\r\n div.innerHTML = string;\r\n return div.childNodes[0];\r\n };\r\n\r\n Dropzone.elementInside = function (element, container) {\r\n if (element === container) {\r\n return true;\r\n }\r\n while (element = element.parentNode) {\r\n if (element === container) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n Dropzone.getElement = function (el, name) {\r\n var element;\r\n if (typeof el === \"string\") {\r\n element = document.querySelector(el);\r\n } else if (el.nodeType != null) {\r\n element = el;\r\n }\r\n if (element == null) {\r\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector or a plain HTML element.\");\r\n }\r\n return element;\r\n };\r\n\r\n Dropzone.getElements = function (els, name) {\r\n var e, el, elements, _i, _j, _len, _len1, _ref;\r\n if (els instanceof Array) {\r\n elements = [];\r\n try {\r\n for (_i = 0, _len = els.length; _i < _len; _i++) {\r\n el = els[_i];\r\n elements.push(this.getElement(el, name));\r\n }\r\n } catch (_error) {\r\n e = _error;\r\n elements = null;\r\n }\r\n } else if (typeof els === \"string\") {\r\n elements = [];\r\n _ref = document.querySelectorAll(els);\r\n for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {\r\n el = _ref[_j];\r\n elements.push(el);\r\n }\r\n } else if (els.nodeType != null) {\r\n elements = [els];\r\n }\r\n if (!((elements != null) && elements.length)) {\r\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\");\r\n }\r\n return elements;\r\n };\r\n\r\n Dropzone.confirm = function (question, accepted, rejected) {\r\n if (window.confirm(question)) {\r\n return accepted();\r\n } else if (rejected != null) {\r\n return rejected();\r\n }\r\n };\r\n\r\n Dropzone.isValidFile = function (file, acceptedFiles) {\r\n var baseMimeType, mimeType, validType, _i, _len;\r\n if (!acceptedFiles) {\r\n return true;\r\n }\r\n acceptedFiles = acceptedFiles.split(\",\");\r\n mimeType = file.type;\r\n baseMimeType = mimeType.replace(/\\/.*$/, \"\");\r\n for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {\r\n validType = acceptedFiles[_i];\r\n validType = validType.trim();\r\n if (validType.charAt(0) === \".\") {\r\n if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\r\n return true;\r\n }\r\n } else if (/\\/\\*$/.test(validType)) {\r\n if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\r\n return true;\r\n }\r\n } else {\r\n if (mimeType === validType) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n if (typeof jQuery !== \"undefined\" && jQuery !== null) {\r\n jQuery.fn.dropzone = function (options) {\r\n return this.each(function () {\r\n return new Dropzone(this, options);\r\n });\r\n };\r\n }\r\n\r\n if (typeof module !== \"undefined\" && module !== null) {\r\n module.exports = Dropzone;\r\n } else {\r\n window.Dropzone = Dropzone;\r\n }\r\n\r\n Dropzone.ADDED = \"added\";\r\n\r\n Dropzone.QUEUED = \"queued\";\r\n\r\n Dropzone.ACCEPTED = Dropzone.QUEUED;\r\n\r\n Dropzone.UPLOADING = \"uploading\";\r\n\r\n Dropzone.PROCESSING = Dropzone.UPLOADING;\r\n\r\n Dropzone.CANCELED = \"canceled\";\r\n\r\n Dropzone.ERROR = \"error\";\r\n\r\n Dropzone.SUCCESS = \"success\";\r\n\r\n\r\n /*\r\n \r\n Bugfix for iOS 6 and 7\r\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\r\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\r\n */\r\n\r\n detectVerticalSquash = function (img) {\r\n var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;\r\n iw = img.naturalWidth;\r\n ih = img.naturalHeight;\r\n canvas = document.createElement(\"canvas\");\r\n canvas.width = 1;\r\n canvas.height = ih;\r\n ctx = canvas.getContext(\"2d\");\r\n ctx.drawImage(img, 0, 0);\r\n data = ctx.getImageData(0, 0, 1, ih).data;\r\n sy = 0;\r\n ey = ih;\r\n py = ih;\r\n while (py > sy) {\r\n alpha = data[(py - 1) * 4 + 3];\r\n if (alpha === 0) {\r\n ey = py;\r\n } else {\r\n sy = py;\r\n }\r\n py = (ey + sy) >> 1;\r\n }\r\n ratio = py / ih;\r\n if (ratio === 0) {\r\n return 1;\r\n } else {\r\n return ratio;\r\n }\r\n };\r\n\r\n drawImageIOSFix = function (ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\r\n var vertSquashRatio;\r\n vertSquashRatio = detectVerticalSquash(img);\r\n return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\r\n };\r\n\r\n\r\n /*\r\n * contentloaded.js\r\n *\r\n * Author: Diego Perini (diego.perini at gmail.com)\r\n * Summary: cross-browser wrapper for DOMContentLoaded\r\n * Updated: 20101020\r\n * License: MIT\r\n * Version: 1.2\r\n *\r\n * URL:\r\n * http://javascript.nwbox.com/ContentLoaded/\r\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\r\n */\r\n\r\n contentLoaded = function (win, fn) {\r\n var add, doc, done, init, poll, pre, rem, root, top;\r\n done = false;\r\n top = true;\r\n doc = win.document;\r\n root = doc.documentElement;\r\n add = (doc.addEventListener ? \"addEventListener\" : \"attachEvent\");\r\n rem = (doc.addEventListener ? \"removeEventListener\" : \"detachEvent\");\r\n pre = (doc.addEventListener ? \"\" : \"on\");\r\n init = function (e) {\r\n if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\r\n return;\r\n }\r\n (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\r\n if (!done && (done = true)) {\r\n return fn.call(win, e.type || e);\r\n }\r\n };\r\n poll = function () {\r\n var e;\r\n try {\r\n root.doScroll(\"left\");\r\n } catch (_error) {\r\n e = _error;\r\n setTimeout(poll, 50);\r\n return;\r\n }\r\n return init(\"poll\");\r\n };\r\n if (doc.readyState !== \"complete\") {\r\n if (doc.createEventObject && root.doScroll) {\r\n try {\r\n top = !win.frameElement;\r\n } catch (_error) { }\r\n if (top) {\r\n poll();\r\n }\r\n }\r\n doc[add](pre + \"DOMContentLoaded\", init, false);\r\n doc[add](pre + \"readystatechange\", init, false);\r\n return win[add](pre + \"load\", init, false);\r\n }\r\n };\r\n\r\n Dropzone._autoDiscoverFunction = function () {\r\n if (Dropzone.autoDiscover) {\r\n return Dropzone.discover();\r\n }\r\n };\r\n\r\n contentLoaded(window, Dropzone._autoDiscoverFunction);\r\n\r\n}).call(this);\r\n","var count = 1;\r\nvar savedWorkspaceFlag = false;\r\n\r\nvar menu = $('#nav');\r\nvar origOffsetY = menu.offset() ? menu.offset().top : menu.offset();\r\nfunction searchClick() {\r\n //$(\"#searchCriteriaContainer\").collapse(\"toggle\");\r\n //$(\"#addedFileContainer\").addClass(\"in\");\r\n}\r\n//function to fixed navbar\r\nfunction navbarFixed() {\r\n if ($(window).scrollTop() >= origOffsetY) {\r\n $('#nav').addClass('fixed');\r\n $('.main-container').addClass('menu-padding');\r\n } else {\r\n $('#nav').removeClass('fixed');\r\n $('.main-container').removeClass('menu-padding');\r\n }\r\n}\r\n//function assign changes to make footer fixed\r\nfunction stickyFooterchanges() {\r\n var getFooterHeight = $(\".site-footer\").outerHeight() +8;\r\n $(\".page-wrap\").css(\"margin-bottom\", \"-\" +getFooterHeight + \"px\");\r\n}\r\n//function allign search result with selected results\r\nfunction assignHeightToSelectedResults() {\r\n if ($(window).width() > 991) {\r\n var getTableHeight = $(\"#searchResultsTable\").height() - $(\"#searchResultsTable thead\").height();\r\n var tblHeight = getTableHeight > 424 ? getTableHeight : 424;\r\n $(\".selected-datasets-entry\").css(\"max-height\", tblHeight);\r\n\r\n }\r\n}\r\n$(document).ready(function () {\r\n navbarFixed();\r\n stickyFooterchanges();\r\n //clipboard.js IE11 fix\r\n $.fn.modal.Constructor.prototype.enforceFocus = function () { };\r\n //intialize clipboard.js\r\n var clipboard = new Clipboard('.copy-cite-details');\r\n var clipboardWorkspace = new Clipboard('#copyUrl');\r\n\r\n clipboard.on('success', function (e) {\r\n $(\".cite-action-text\").removeClass(\"hide\");\r\n $(\".cite-action-text\").text(\"Copied!\");\r\n e.clearSelection();\r\n });\r\n\r\n clipboard.on('error', function (e) {\r\n $(\".cite-action-text\").removeClass(\"hide\");\r\n $(\".cite-action-text\").text(\"Press Cmd+C to copy\");\r\n });\r\n clipboardWorkspace.on('success', function (e) {\r\n $(\".copied-url-msg\").removeClass(\"hide\");\r\n $(\".copied-url-msg\").text(\"Copied!\");\r\n e.clearSelection();\r\n });\r\n\r\n clipboardWorkspace.on('error', function (e) {\r\n $(\".copied-url-msg\").removeClass(\"hide\");\r\n $(\".copied-url-msg\").text(\"Press Cmd+C to copy\");\r\n });\r\n ////To avoid scroll in body when modal is open\r\n //$('body').on('show.bs.modal', \".modal\", function () {\r\n // if ($(document).height() > $(window).height()) {\r\n // // no-scroll\r\n // $('body').addClass(\"modal-open-noscroll\");\r\n // }\r\n // else {\r\n // $('body').removeClass(\"modal-open-noscroll\");\r\n // }\r\n //})\r\n //$('body').on('hide.bs.modal', '.modal', function () {\r\n // $('body').removeClass(\"modal-open-noscroll\");\r\n //})\r\n\r\n //Toggle legends click get height\r\n $(\".swipe-wrap\").on('click', '.toggle-legends', function () {\r\n $(this).find(\"i\").toggleClass(\"fa-angle-up fa-angle-down\");\r\n if ($(this).find(\"i\").hasClass(\"fa-angle-up\")) {\r\n $(this).find(\"i\").attr(\"title\", \"Collapse\");\r\n $(this).next().slideDown(function () {\r\n $(\".toggle-legends\").next().css(\"height\", getLegendHeight);\r\n });\r\n } else {\r\n $(this).find(\"i\").attr(\"title\", \"Expand\");\r\n getLegendHeight = $(this).next().css(\"height\");\r\n $(this).next().slideUp();\r\n\r\n }\r\n });\r\n //render chart\r\n //renderChart2(\"chartdiv\", \"legendDivId\");\r\n $(\"#chartModal\").modal(\"show\");\r\n //renderModalChart(\"modalChartDiv\", \"modalLegendDiv\");\r\n $(\"#chartModal\").modal(\"hide\");\r\n\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n $(\"#chartModal .modal-body\").find(\".amcharts-chart-div a\").hide();\r\n\r\n $(\".table-chart-details\").on(\"click\", \".fa-list-alt\", function () {\r\n $(\"html, body\").animate({\r\n scrollTop: 0\r\n }, \"50\");\r\n $(\".expand-graph-icon, .refresh-graph-icon, .share-graph-icon, .save-graph-icon\").hide();\r\n $(\".chart-icon\").show();\r\n setTimeout(function () {\r\n\r\n //mySwipe.slide('5');\r\n\r\n }, 200);\r\n });\r\n\r\n $(\"#dashboardTabsContainer\").on(\"click\", \".fa-times\", function () {\r\n var chartID = $(this).closest(\".chart-tab\").find(\"a\").attr(\"href\");\r\n $(this).closest(\".chart-tab\").remove();\r\n $(chartID).remove();\r\n $('a[href=\"' + \"#dashboardTab\" + '\"]').tab(\"show\");\r\n });\r\n\r\n //Expnad graph\r\n $(\".expand-graph-icon\").on('click', function () {\r\n $(\"#chartModal\").modal(\"show\");\r\n\r\n setTimeout(function () {\r\n $(\"#modalChartDiv\").css(\"min-height\", $(\"#chartModal .modal-content\").height() - 150);\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n $(\"#chartModal .modal-body\").find(\".amcharts-chart-div a\").remove();\r\n if ($(window).width() < 768) {\r\n //$(\"#modalLegendDiv\").removeClass(\"in\");\r\n }\r\n }, 500);\r\n });\r\n //plotting area clicked\r\n $(\".plotting-area\").on('click', function () {\r\n if ($(this).hasClass(\"disabled\")) {\r\n return false;\r\n }\r\n // if($(window).width()<768){\r\n // $(\"#mobileMenuToggle\").trigger('click');\r\n // }\r\n //$(\".back-icon\").show();\r\n //$(\".save-graph-icon\").show();\r\n //$(\".share-graph-icon\").show();\r\n //$(\".refresh-graph-icon\").show();\r\n //$(\".expand-graph-icon\").show();\r\n //$(\".chart-icon\").hide();\r\n ////$(\".save-workspace-link\").parent().removeClass(\"active\");\r\n ////$(\".search-nav-link\").parent().removeClass(\"active\");\r\n //$(this).parent().addClass(\"active\");\r\n ////mySwipe.slide(\"1\")\r\n\r\n });\r\n $(\".back-icon\").on(\"click\", function () {\r\n $(this).hide();\r\n $(\".save-graph-icon\").hide();\r\n $(\".refresh-graph-icon\").hide(); $(\".expand-graph-icon\").hide();\r\n $(\".share-graph-icon\").hide();\r\n //$(\"#showchart\").css(\"margin\",\"0 20px\");\r\n $(\"#searchUploadChemicals\").removeClass(\"no-box-shadow\");\r\n $(\".chart-icon\").hide();\r\n //nav bar class\r\n //$(\".plotting-area\").parent().removeClass(\"active\");\r\n //$(\".save-workspace-link\").parent().removeClass(\"active\");\r\n //$(\".search-nav-link\").parent().addClass(\"active\");\r\n });\r\n $(\".back-arrow-icon\").on(\"click\", function () {\r\n $(\".save-graph-icon\").hide();\r\n $(\".refresh-graph-icon\").hide(); $(\".expand-graph-icon\").hide();\r\n $(\".share-graph-icon\").hide();\r\n //$(\"#showchart\").css(\"margin\",\"0 20px\");\r\n $(\"#searchUploadChemicals\").removeClass(\"no-box-shadow\");\r\n $(\".chart-icon\").hide();\r\n //nav bar class\r\n //$(\".save-workspace-link\").parent().removeClass(\"active\");\r\n //$(\".search-nav-link\").parent().addClass(\"active\");\r\n //mySwipe.slide(\"0\");\r\n });\r\n //var elem = document.getElementById('mySwipe');\r\n //window.mySwipe = Swipe(elem, {\r\n // // startSlide: 4,\r\n // // auto: 3000,\r\n // continuous: false,\r\n // disableTouch: true\r\n // // stopPropagation: true,\r\n // // callback: function(index, element) {},\r\n // // transitionEnd: function(index, element) {}\r\n //});\r\n //$(\".add-search-result\").on('click', function () {\r\n // $(\"#addedChemicals tbody\").children().remove();\r\n // $(\"#searchResultsTable input[type=checkbox]\").each(function () {\r\n // addTr = 'Aluminium Sulphate - Al2SO4 - Simon Trainor - survey - 350 - 2500';\r\n // if ($(this).prop(\"checked\") == true) {\r\n // $(this).closest(\"td\").addClass(\"hide-in\");\r\n // $(\"#addedFileContainer\").show();\r\n // $(\".no-chemical-msg\").hide();\r\n // $(\"#addedFileContainer\").css(\"left\", \"0\");\r\n // $(\".plot-chart\").removeClass(\"disabled\");\r\n // $(\".plot-chart\").prop(\"disabled\", false);\r\n // var newRow = '' + addTr + '';\r\n // $(\"#addedChemicals tbody\").append(newRow);\r\n // //For tablet view scroll to that position\r\n // if ($(window).width() < 992) {\r\n // $(\"html, body\").animate({\r\n // scrollTop: $(\"#addedFileContainer\").offset().top\r\n // }, \"slow\");\r\n // }\r\n\r\n // }\r\n // });\r\n //});\r\n $(\".input-offset\").on('focus', function () {\r\n $(this).siblings().find(\"input[type='checkbox']\").removeClass(\"disabled\");\r\n $(this).siblings().find(\"input[type='checkbox']\").prop(\"disabled\", false);\r\n });\r\n //$(\".input-feild-textbox\").on(\"focusin\", function () {\r\n // $(this).siblings(\"label\").addClass(\"active\");\r\n //}).focusout(function () {\r\n // if (!$(this).val()) {\r\n // $(this).siblings(\"label\").removeClass(\"active\");\r\n // }\r\n //});\r\n /*$(\".input-feild-textbox\").on(\"focusout\",function(){\r\n \r\n });*/\r\n //when clicked on add icon to add chemical\r\n // $(\".add-chemical\").on(\"click\", function () {\r\n // if (!($(this).hasClass(\"remove-chemical\"))) {\r\n // var chemProp = [];\r\n // var createString = \"\";\r\n // //enable plot btn\r\n // $(\".plot-chart\").removeClass(\"disabled\");\r\n // $(\".plot-chart\").prop(\"disabled\", false);\r\n // $(\".no-chemical-msg\").hide();\r\n // $(\".added-chemicals-title\").removeClass(\"title-border-bottom\");\r\n // //assign id equivalent to row which will be added in table\r\n // $(this).attr(\"id\", count);\r\n // count += 1;\r\n // $(this).toggleClass(\"fa-plus fa-minus\");\r\n // $(this).addClass(\"remove-chemical\");\r\n // $(this).addClass(\"color-red\");\r\n // $(this).attr(\"title\", \"Remove\");\r\n\r\n // if($(window).width()>767){\r\n // var getParentId = $(this).closest(\"tr\").attr(\"id\");\r\n // $(\"#\" + getParentId).addClass(\"added-row\");\r\n // $(\"#\" + getParentId).next().addClass(\"added-row\");\r\n // $(\"#\" + getParentId + \" td.hidden-xs\").each(function () {\r\n // if (!($(this).children().hasClass(\"fa-minus\") || $(this).children().hasClass(\"toggle-row-element\"))) {\r\n // chemProp.push($(this).text());\r\n // }\r\n // }); \r\n // } else {\r\n // var getParentId = $(this).closest(\"table\").parents(\"tr\").attr(\"id\");\r\n // var getTable=$(\"#\" + getParentId).find(\".xs-tbody\").attr(\"id\");\r\n // $(\"#\" + getParentId).find(\".xs-tbody\").addClass(\"added-row\")\r\n // $(\"#\" + getTable + \" td.xs-text-td\").each(function () {\r\n // chemProp.push($(this).text());\r\n // });\r\n // }\r\n // var i;\r\n // for (i = 0; i < chemProp.length; i++) {\r\n\r\n // var j = i + 1;\r\n // if (j == chemProp.length) {\r\n // createString += chemProp[i];\r\n // } else {\r\n // createString += chemProp[i].replace(/\\s/g, '-') + ' - ';\r\n // }\r\n\r\n // }\r\n // //Add string to the added chemicals table\r\n // var newRow = '' + createString + '';\r\n // $(\"#addedChemicals tbody\").append(newRow);\r\n // $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-\" + getParentId).fadeIn(function () {\r\n // $(\"#addedChemicals tbody\").find(\"#addedChemicalProp-\" + getParentId).removeClass(\"added-row\");\r\n // });\r\n\r\n // //For tablet view scroll to that position\r\n //// if ($(window).width() < 992) {\r\n //// $(\"html, body\").animate({\r\n //// scrollTop: $(\".selected-datasets-sm\").offset().top\r\n //// }, \"slow\");\r\n //// }\r\n // } else {\r\n // if($(window).width()>768){\r\n // var getParentId = $(this).closest(\"tr\").attr(\"id\");\r\n // $(\"#\" + getParentId).removeClass(\"added-row\");\r\n // $(\"#\" + getParentId).next().removeClass(\"added-row\");\r\n // } else {\r\n // var getParentId = $(this).closest(\"table\").parents(\"tr\").attr(\"id\");\r\n // $(\"#\" + getParentId).find(\".xs-tbody\").removeClass(\"added-row\")\r\n // }\r\n\r\n // $(this).toggleClass(\"fa-plus fa-minus\");\r\n // $(this).removeClass(\"remove-chemical\");\r\n // $(this).removeClass(\"color-red\");\r\n // $(this).attr(\"title\", \"Add\");\r\n // $(\"#addedChemicals\").find(\"#addedChemicalProp-\" + getParentId).fadeOut('fast', function () {\r\n // $(\"#addedChemicals\").find(\"#addedChemicalProp-\" + getParentId).remove();\r\n // });\r\n // //if the last chemical is removed\r\n // if ($(\"#addedChemicals tbody\").children().length == 1) {\r\n // $(\".plot-chart\").addClass(\"disabled\");\r\n // $(\".plot-chart\").prop(\"disabled\", true);\r\n // $(\".no-chemical-msg\").fadeIn();\r\n // $(\".added-chemicals-title\").addClass(\"title-border-bottom\");\r\n // }\r\n // }\r\n // });\r\n //remove chemical when click on remove icon\r\n\r\n //Save workspace link click\r\n //$(\".save-workspace-link\").on('click', function () {\r\n // // if($(window).width()<768){\r\n // // $(\"#mobileMenuToggle\").trigger('click');\r\n // // }\r\n // $(this).parent().siblings().removeClass(\"active\");\r\n // $(this).parent().addClass(\"active\");\r\n // $(\".back-icon\").show();\r\n // $(\".save-graph-icon\").hide();\r\n // $(\".refresh-graph-icon\").hide(); $(\".expand-graph-icon\").hide();\r\n // $(\".share-graph-icon\").hide();\r\n // $(\".refresh-graph-icon\").hide();\r\n\r\n // //mySwipe.slide(\"3\")\r\n //});\r\n $(\".save-arrow-workspace\").on('click', function () {\r\n $(\".back-icon\").show();\r\n $(\".save-graph-icon\").hide();\r\n $(\".refresh-graph-icon\").hide(); $(\".expand-graph-icon\").hide();\r\n $(\".share-graph-icon\").hide();\r\n $(\".refresh-graph-icon\").hide();\r\n\r\n //mySwipe.slide(\"3\")\r\n });\r\n $(\"#saveGraphBtn\").on('click', function () {\r\n var graphName = $(\"#graphName\").val();\r\n var graphChemicals = \"Si (100), Al2O3, Kovar sheet\";\r\n var newGraphToSave = '' + graphName + '' + graphChemicals + ''\r\n $(\"#SavedGraphTable\").prepend(newGraphToSave);\r\n setTimeout(function () {\r\n $(\"#SavedGraphTable\").find(\".newRow\").removeClass(\"added-row\");\r\n //mySwipe.slide(\"1\");\r\n $(\".share-graph-icon\").show();\r\n $(\".save-graph-icon\").show();\r\n $(\".refresh-graph-icon\").show(); $(\".expand-graph-icon\").show();\r\n $(\".chart-icon\").hide();\r\n }, 1000);\r\n $(\"#graphName , #graphOwner\").attr(\"disabled\", \"disabled\");\r\n $(\"#cancelSaveBtn , #saveGraphBtn\").attr(\"disabled\", \"disabled\");\r\n });\r\n\r\n $(\"#cancelSaveBtn\").on('click', function () {\r\n $(\".save-graph-icon\").show();\r\n $(\".share-graph-icon\").show();\r\n $(\".refresh-graph-icon\").show(); $(\".expand-graph-icon\").show();\r\n $(\".chart-icon\").hide();\r\n //mySwipe.prev();\r\n });\r\n $(\".save-graph-icon\").on('click', function () {\r\n $(\"#graphName , #graphOwner\").removeAttr(\"disabled\");\r\n $(\"#cancelSaveBtn , #saveGraphBtn\").removeAttr(\"disabled\");\r\n $(\"#graphName\").val('');\r\n $(\"#graphOwner\").val('');\r\n $(\".share-graph-icon ,.save-graph-icon,.refresh-graph-icon,.expand-graph-icon\").hide();\r\n $(\".chart-icon\").show();\r\n //mySwipe.slide(\"2\");\r\n });\r\n $(\".share-graph-icon\").on('click', function () {\r\n $(\".share-graph-icon ,.save-graph-icon ,.refresh-graph-icon,.expand-graph-icon \").hide();\r\n $(\".chart-icon\").show();\r\n //mySwipe.slide(\"4\");\r\n });\r\n $(\".cancel-share-btn\").on('click', function () {\r\n $(\".save-graph-icon\").show();\r\n $(\".share-graph-icon\").show();\r\n $(\".refresh-graph-icon\").show();\r\n $(\".expand-graph-icon\").show();\r\n $(\".chart-icon\").hide();\r\n //mySwipe.slide(\"1\");\r\n });\r\n $(\"#sendEmail\").on('click', function () {\r\n $(\".email-sent-msg\").show();\r\n setTimeout(function () {\r\n $(\".email-sent-msg\").hide();\r\n //mySwipe.slide(\"1\");\r\n $(\".save-graph-icon\").show();\r\n $(\".share-graph-icon\").show();\r\n $(\".refresh-graph-icon\").show();\r\n $(\".expand-graph-icon\").show();\r\n $(\".chart-icon\").hide();\r\n $(\"#emailIdToShare\").val(\"\");\r\n $(\"#emailIdToShare\").focusout();\r\n }, 1000);\r\n });\r\n $(\".chart-icon\").on(\"click\", function () {\r\n $(\".share-graph-icon ,.save-graph-icon, .back-icon\").show();\r\n $(\".refresh-graph-icon\").show();\r\n $(\".expand-graph-icon\").show();\r\n $(\".chart-icon\").hide();\r\n });\r\n //when clicked on saved workspace link\r\n $(\".saved-workspace-link\").on('click', function () {\r\n //mySwipe.slide(\"1\");\r\n savedWorkspaceFlag = true;\r\n $(\"#searchResultsTable tbody\").find(\".added-row\").removeClass(\"added-row\");\r\n $(\"#searchResultsTable .remove-chemical\").each(function () {\r\n $(this).removeClass(\"color-red\");\r\n $(this).removeClass(\"remove-chemical\").addClass(\"add-chemical\");\r\n $(this).removeClass(\"fa-minus\").addClass(\"fa-plus\");\r\n\r\n });\r\n $(\"#searchResultsContainer\").removeClass(\"in\");\r\n $(\".no-dataset-msg\").show();\r\n $(\".no-chemical-msg\").hide();\r\n $(\".chart-icon\").hide();\r\n $(\".save-graph-icon\").show();\r\n $(\".share-graph-icon\").show();\r\n $(\".search-result-div\").css(\"min-height\", $(\".selected-datasets-div\").height());\r\n $(\"#addedChemicals tbody\").children().remove();\r\n var newRows = 'Silica - Si - survey - 100 - 2500' +\r\n 'Aluminium-Oxide - Al2O3 - thin film - survey - 350 - 2500' +\r\n 'Kovar sheet 700C treatment - survey - 350 - 2500';\r\n $(\"#addedChemicals tbody\").append(newRows);\r\n $(\".selected-datasets-title\").text(\"Si (100), Kovar Sheet, Al2O3\");\r\n });\r\n //remove saved workspaces datasets from searh page added datasets\r\n $(\"#addedChemicals\").on('click', \".remove-saved-datasets\", function () {\r\n $(this).closest(\"tr\").remove();\r\n });\r\n\r\n //search nav link\r\n $(\".search-nav-link\").on('click', function () {\r\n // if($(window).width()<768){\r\n // $(\"#mobileMenuToggle\").trigger('click');\r\n // }\r\n $(\".back-icon\").hide();\r\n $(\".share-graph-icon\").hide();\r\n $(\".save-graph-icon\").hide();\r\n $(\".refresh-graph-icon\").hide();\r\n $(\".expand-graph-icon\").hide();\r\n $(\".share-graph-icon\").hide();\r\n $(\".save-workspace-link\").parent().removeClass(\"active\");\r\n //$(\".plotting-area\").parent().removeClass(\"active\").addClass(\"disabled\");\r\n $(\".search-nav-link\").parent().addClass(\"active\");\r\n //$(\".plotting-area\").addClass(\"disabled\").attr(\"disabled\", true);\r\n //mySwipe.slide('0');\r\n });\r\n\r\n //remove chart chemical\r\n //$(\".remove-charts-chemical\").on('click', function () {\r\n // $(this).toggleClass(\"fa-times fa-check\");\r\n // $(this).toggleClass(\"color-red color-green\");\r\n // if ($(this).hasClass(\"fa-times\")) {\r\n // $(this).attr(\"title\", \"Remove chemical\");\r\n // } else {\r\n // $(this).attr(\"title\", \"Add chemical\");\r\n // }\r\n //});\r\n\r\n //Portrait mode\r\n $(\".exit-message\").on('click', function () {\r\n //$(\"#portraiteMode\").remove();\r\n $(\"#portraiteMode\").modal('hide');\r\n $(body).css(\"padding\", 0)\r\n\r\n });\r\n var flag = 0;\r\n\r\n $(window).on(\"orientationchange\", function (event) {\r\n setTimeout(function () {\r\n\r\n if (window.innerHeight > window.innerWidth && $(\"#dontShowMessage\").prop(\"checked\") != true) {\r\n //alert(\"Please use Landscape!\");\r\n $(\"#portraiteMode\").modal('show');\r\n } else {\r\n $(\"#portraiteMode\").modal('hide');\r\n }\r\n }, 500);\r\n\r\n //alert(\"This device is in \" + OrientationVal + \" mode!\" );\r\n //$(\"#portraiteMode\").modal();\r\n\r\n });\r\n\r\n if (window.innerHeight > window.innerWidth && $(\"#dontShowMessage\").prop(\"checked\") != true) {\r\n if (flag == 0) {\r\n //alert(\"Please use Landscape!\");\r\n if ($(window).width() < 767) {\r\n $(\"#portraiteMode\").modal('show');\r\n //flag=flag+1;\r\n }\r\n }\r\n }\r\n ////Requery search results\r\n //$(\".requery-search\").on('click',function(){\r\n // //make search link as active\r\n // $(\".save-workspace-link\").parent().removeClass(\"active\");\r\n // $(\".plotting-area\").parent().removeClass(\"active\");\r\n // $(\".search-nav-link\").parent().addClass(\"active\");\r\n\r\n // $(\".save-graph-icon\").hide();\r\n // $(\".refresh-graph-icon\").hide();\r\n // $(\".expand-graph-icon\").hide();\r\n // $(\".share-graph-icon\").hide();\r\n // $(\".back-icon\").hide();\r\n // //mySwipe.slide('0');\r\n // //Add vales to text-feild\r\n // $(\"#collapseOne .control-label\").addClass(\"active\");\r\n // $(\"#Keywords\").val(\"Al\");\r\n // $(\"#chemicalName\").val(\"Aluminium Sulphate\");\r\n // $(\"#hostMaterial\").val(\"Al2SO4\");\r\n // $(\"#Author\").val(\"Simon\");\r\n // $(\"#Region\").val(\"survey\");\r\n // $(\"#startValues\").val(\"350\");\r\n // $(\"#endValues\").val(\"2500\");\r\n // //Add chemicals in the selected datasets table\r\n // $(\"#addedChemicals tbody\").children().remove();\r\n // var newRows = 'Silica - Si - survey - 100 - 2500' +\r\n // 'Aluminium-Oxide - Al2O3 - thin film - survey - 350 - 2500' +\r\n // 'Kovar sheet 700C treatment - survey - 350 - 2500';\r\n // $(\"#addedChemicals tbody\").append(newRows);\r\n\r\n // //show only one selected in a selected table\r\n // var getLength=$(\"#searchResultsTable .remove-chemical\").length;\r\n // $(\"#searchResultsTable .remove-chemical\").each(function () {\r\n // getLength-=1;\r\n // if(!(getLength==1)){\r\n // $(this).closest(\"tr\").removeClass(\"added-row\");\r\n // $(this).removeClass(\"color-red\");\r\n // $(this).removeClass(\"remove-chemical\").addClass(\"add-chemical\");\r\n // $(this).removeClass(\"fa-minus\").addClass(\"fa-plus\");\r\n // }\r\n\r\n // });\r\n //});\r\n\r\n\r\n //bact top navigation\r\n\r\n // hide #back-top first\r\n $(\"#back-top\").hide();\r\n\r\n // fade in #back-top\r\n $(function () {\r\n $(window).scroll(function () {\r\n navbarFixed();\r\n if ($(this).scrollTop() > 100) {\r\n $('#back-top').fadeIn();\r\n } else {\r\n $('#back-top').fadeOut();\r\n }\r\n });\r\n // scroll body to 0px on click\r\n $('#back-top a').click(function () {\r\n $('body,html').animate({\r\n scrollTop: 0\r\n }, 300);\r\n return false;\r\n });\r\n });\r\n //Toggle row\r\n $(\".swipe-wrap\").on('click', \".toggle-savedworkspace-element\", function (e) {\r\n e.preventDefault();\r\n //$(this).toggleClass(\"fa-chevron-down fa-chevron-up\");\r\n if ($(this).attr(\"title\") == \"View Selected Datasets\") {\r\n $(this).attr(\"title\", \"Hide Selected Datasets\");\r\n } else {\r\n $(this).attr(\"title\", \"View Selected Datasets\");\r\n }\r\n $(this).find(\"i\").toggleClass(\"fa-angle-up fa-angle-down\");\r\n $(this).closest(\"tr\").next().fadeToggle('slow');\r\n });\r\n\r\n $(\".swipe-wrap\").on('click', \".toggle-sharedworkspace-element\", function (e) {\r\n e.preventDefault();\r\n //$(this).toggleClass(\"fa-chevron-down fa-chevron-up\");\r\n if ($(this).attr(\"title\") == \"View Selected Datasets\") {\r\n $(this).attr(\"title\", \"Hide Selected Datasets\");\r\n } else {\r\n $(this).attr(\"title\", \"View Selected Datasets\");\r\n }\r\n $(this).find(\"i\").toggleClass(\"fa-angle-up fa-angle-down\");\r\n $(this).closest(\"tr\").next().fadeToggle('slow');\r\n });\r\n\r\n $(\".swipe-wrap\").on('click', \".toggle-userLastLogin-details\", function (e) {\r\n e.preventDefault();\r\n\r\n if ($(this).attr(\"title\") == \"View User Details\") {\r\n $(this).attr(\"title\", \"Hide User Details\");\r\n } else {\r\n $(this).attr(\"title\", \"View User Details\");\r\n }\r\n $(this).closest(\"tr\").next().fadeToggle('slow');\r\n });\r\n\r\n //Toggle row\r\n $(\"#searchResultsTable\").on('click', \".toggle-row-element\", function (e) {\r\n e.preventDefault();\r\n //$(this).toggleClass(\"fa-chevron-down fa-chevron-up\");\r\n if ($(this).attr(\"title\") == \"Expand\") {\r\n $(this).attr(\"title\", \"Collapse\");\r\n } else {\r\n $(this).attr(\"title\", \"Expand\");\r\n }\r\n $(this).toggleClass(\"fa-angle-up fa-angle-down\");\r\n $(this).closest(\"tr\").next().fadeToggle('slow');\r\n });\r\n //Toggle all row element\r\n $(\".toggle-all-row-element\").on('click', function (e) {\r\n e.preventDefault();\r\n //$(this).toggleClass(\"fa-chevron-down fa-chevron-up\");\r\n if ($(this).hasClass(\"fa-angle-double-down\")) {\r\n //$(\".toggle-row-element\").fadeIn(\"slow\");\r\n $(\".toggle-row-element\").removeClass(\"fa-angle-down\").addClass(\"fa-angle-up\");\r\n $(\".toggle-row-element\").attr(\"title\", \"Collapse\");\r\n $(this).attr(\"title\", \"Collapse all\");\r\n $(this).addClass(\"fa-angle-double-up\").removeClass(\"fa-angle-double-down\");\r\n $(\".collapsable-table-tr\").fadeIn('slow');\r\n } else {\r\n //$(\".toggle-row-element\").fadeOut(\"slow\");\r\n $(\".toggle-row-element\").removeClass(\"fa-angle-up\").addClass(\"fa-angle-down\");\r\n $(\".toggle-row-element\").attr(\"title\", \"Expand\");\r\n $(this).attr(\"title\", \"Expand all\");\r\n $(this).removeClass(\"fa-angle-double-up\").addClass(\"fa-angle-double-down\");\r\n $(\".collapsable-table-tr\").fadeOut('slow');\r\n }\r\n\r\n });\r\n\r\n //When click on figures radio button\r\n $(\".graph-figures input[type=radio]\").on('click', function () {\r\n var getAttr = $(this).attr(\"graph-figures\");\r\n //checked the other radio button in modal\r\n $(\".modal-graph-figures input[type=radio]\").each(function () {\r\n if ($(this).attr(\"graph-figures\") == getAttr) {\r\n $(this).prop(\"checked\", true);\r\n } else {\r\n $(this).prop(\"checked\", false);\r\n }\r\n });\r\n //renderChart2('chartdiv', 'legendDivId');\r\n //renderModalChart(\"modalChartDiv\", \"modalLegendDiv\");\r\n\r\n });\r\n $(\".modal-graph-figures input[type=radio]\").on('click', function () {\r\n var getAttr = $(this).attr(\"graph-figures\");\r\n //checked the other radio button in modal\r\n $(\".graph-figures input[type=radio]\").each(function () {\r\n if ($(this).attr(\"graph-figures\") == getAttr) {\r\n $(this).prop(\"checked\", true);\r\n } else {\r\n $(this).prop(\"checked\", false);\r\n }\r\n });\r\n //renderChart2('chartdiv', 'legendDivId');\r\n //renderModalChart(\"modalChartDiv\", \"modalLegendDiv\");\r\n\r\n });\r\n function handleDivHeight() {\r\n //var getActiveDivPos = //mySwipe.getPos();\r\n //$(\".swipe-wrap\").children().each(function () {\r\n // if ($(this).attr(\"data-index\") == getActiveDivPos) {\r\n // $(\".swipe-wrap\").css(\"height\", $(this).outerHeight())\r\n // }\r\n //});\r\n }\r\n $(document).on('click', function () {\r\n if ($(window).width() < 768) {\r\n handleDivHeight();\r\n }\r\n })\r\n assignViewportHeightChart();\r\n\r\n var clipboard = new Clipboard('.copyurl-btn', {\r\n target: function () {\r\n return document.getElementById('copyurl');\r\n }\r\n });\r\n\r\n function updateTablesGraphId() {\r\n var graphId = 0;\r\n if ($(window).width() > 768) {\r\n $(\".table-chart-details .lg-tr\").each(function () {\r\n $(this).attr(\"id\", \"graph-row-\" + graphId);\r\n $(this).find(\".show-hide-graph\").attr(\"graph-id\", graphId);\r\n $(this).find(\".remove-charts-chemical\").attr(\"graph-id\", graphId);\r\n graphId += 1;\r\n })\r\n\r\n }\r\n\r\n }\r\n //remove chart chemical\r\n $(\".remove-charts-chemical\").on('click', function () {\r\n var getGraphNo = parseInt($(this).attr(\"graph-id\"));\r\n var chart1 = chart.graphs[getGraphNo].chart;\r\n chart1.removeGraph(chart.graphs[getGraphNo]);\r\n var chart22 = modalChart.graphs[getGraphNo].chart;\r\n chart22.removeGraph(modalChart.graphs[getGraphNo]);\r\n $(this).closest(\"tr\").addClass(\"remove-graph-tr\");\r\n if ($(window).width() > 768) {\r\n $(this).closest(\"tr\").fadeIn(\"slow\", function () {\r\n $(this).closest(\"tr\").remove();\r\n });\r\n } else {\r\n $(this).closest(\"table\").remove()\r\n }\r\n updateTablesGraphId();\r\n });\r\n $(\".remove-all-graph\").on('click', function () {\r\n var noOFGraph = chart.graphs.length;\r\n var j = noOFGraph;\r\n var i = 0;\r\n for (i = 0; i < noOFGraph; i++) {\r\n j -= 1;\r\n var chart1 = chart.graphs[j].chart;\r\n chart1.removeGraph(chart.graphs[j]);\r\n var chart22 = modalChart.graphs[j].chart;\r\n chart22.removeGraph(modalChart.graphs[j]);\r\n }\r\n $(\".table-chart-details tbody\").children().remove();\r\n $(\".hide-show-allgraphs\").hide();\r\n $(this).hide();\r\n });\r\n \r\n //hide show all graphs\r\n $(\".hide-show-allgraphs\").on('click', function () {\r\n if ($(this).hasClass(\"all-hiddden\")) {\r\n $(this).removeClass(\"all-hiddden\");\r\n $(this).text(\"Hide all graphs\");\r\n $(this).attr(\"title\", \"Uncheck to hide all graphs\");\r\n var i = 0;\r\n for (i = 0; i < chart.graphs.length; i++) {\r\n var chart1 = chart.graphs[i].chart;\r\n chart1.showGraph(chart.graphs[i]);\r\n\r\n var chart22 = modalChart.graphs[i].chart;\r\n chart22.showGraph(modalChart.graphs[i]);\r\n }\r\n //change change eye icon in table\r\n $(\".show-hide-graph\").each(function () {\r\n $(this).removeClass(\"fa-eye-slash\").addClass(\"fa-eye\");\r\n $(this).attr(\"title\", \"Hide graph\");\r\n });\r\n } else {\r\n $(this).addClass(\"all-hiddden\");\r\n $(this).text(\"Show all graphs\");\r\n $(this).attr(\"title\", \"Check to show all graphs\");\r\n var i = 0;\r\n for (i = 0; i < chart.graphs.length; i++) {\r\n var chart1 = chart.graphs[i].chart;\r\n chart1.hideGraph(chart.graphs[i]);\r\n\r\n var chart22 = modalChart.graphs[i].chart;\r\n chart22.hideGraph(modalChart.graphs[i]);\r\n }\r\n //change change eye icon in table\r\n $(\".show-hide-graph\").each(function () {\r\n $(this).removeClass(\"fa-eye\").addClass(\"fa-eye-slash\");\r\n $(this).attr(\"title\", \"Show graph\");\r\n });\r\n\r\n }\r\n //Hide amcharts text on graph\r\n $(\"#chartdiv\").find(\".amcharts-chart-div a\").hide();\r\n $(\"#chartModal .modal-body\").find(\".amcharts-chart-div a\").hide();\r\n });\r\n\r\n //$(\".offset-toggle\").on('click', function () {\r\n // $(this).toggleClass(\"fa-toggle-on fa-toggle-off\");\r\n // $(this).parent().find(\".offset-input\").toggleClass(\"input-active\");\r\n //});\r\n //Left menu push function\r\n var showLeftPush = document.getElementById('mobileMenuToggle'),\r\n menuLeft = document.getElementById('cbp-spmenu-s2'),\r\n body = document.body;\r\n if (showLeftPush) {\r\n showLeftPush.onclick = function () {\r\n //if (!$(this).hasClass(\"active\")){\r\n classie.toggle(this, 'active');\r\n classie.toggle(body, 'cbp-spmenu-push-toleft');\r\n classie.toggle(menuLeft, 'cbp-spmenu-open');\r\n if ($('body').hasClass(\"cbp-spmenu-push-toleft\")) {\r\n $(\"#nav\").addClass(\"cbp-spmenu-push-toleft\");\r\n } else {\r\n $(\"#nav\").removeClass(\"cbp-spmenu-push-toleft\");\r\n }\r\n };\r\n }\r\n //function to hide menu when click outside\r\n function CloseMobileMenu(e) {\r\n var containerResource = $(\"#cbp-spmenu-s2\");\r\n var btnTohideMenu = $(\"#mobileMenuToggle\");\r\n var navLi = $(\".right-mobile-menu li\");\r\n if (!containerResource.is(e.target) && containerResource.hasClass('cbp-spmenu-open') && !btnTohideMenu.is(e.target) && !navLi.is(e.target)) {\r\n $(\"#mobileMenuToggle\").trigger('click');\r\n }\r\n\r\n }\r\n $(document).on('click', function (e) {\r\n CloseMobileMenu(e);\r\n });\r\n $(document).ready(function () {\r\n //generateYear();\r\n //function generateYear() {\r\n // var i, yr, now = new Date();\r\n // for (i = 10; i >= 1; i--) {\r\n // yr = now.getFullYear() - i; // or whatever\r\n // $('.year-dropdown').prepend('
  • ' + yr + '
  • ');\r\n\r\n // };\r\n // $('.year-dropdown').prepend('
  • ' + now.getFullYear() + '
  • ');\r\n //}\r\n function reduceChartWidth() {\r\n for (var i = 0; i < AmCharts.charts.length; i++) {\r\n var chart = AmCharts.charts[i];\r\n chart.div.style.width = \"1000px\";\r\n chart.validateNow();\r\n }\r\n }\r\n function assignDefaultWidthToChart() {\r\n for (var i = 0; i < AmCharts.charts.length; i++) {\r\n var chart = AmCharts.charts[i];\r\n chart.div.style.width = \"100%\";\r\n chart.validateNow();\r\n }\r\n }\r\n $(\".swipe-wrap\").on('click', \".print-icon\", function () {\r\n //change the dimension of chart div\r\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\r\n reduceChartWidth();\r\n var contents = $(\"#showchart\").html();\r\n var frame1 = $('