{"version":3,"sources":["public_lib.js","nurseslounge_myDashboard_myProfile.js","nurseslounge_myDashboard_accountSettings.js","nurseslounge_lounge_overview.js","public_nurseslounge_lounge_overview.js","public_nurseslounge_job_jobDetail.js","public_nurseslounge_degree_information.js","public_nurseslounge_myDashboard_myCredentialVault.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9jDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtuRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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","file":"script.js","sourcesContent":["var libs = {\n noCacheUrl:function($src){\n var $date = new Date();\n var $random = Math.random();\n var $i = $date.toString().replace(/\\s/g, '')+''+$random;\n var $url = new URL($src);\n if(!$url.searchParams.has('n-o-c-a-c-h-e')){\n $url.searchParams.append('n-o-c-a-c-h-e', $i)\n }else{\n $url.searchParams.set('n-o-c-a-c-h-e', $i);\n }\n return $url.toString();\n },\n refreshBoxFrom:function($element, $data, cback){\n if($($element).length > 0) {\n $($element).each(function ($v, $i) {\n var $that = $(this);\n if (!$that.data('url') || $that.parents('.box').length <= 0) {\n return false;\n }\n $.ajax({\n url: $that.data('url'),\n method: 'POST',\n cache: false,\n data: $data ? $data : null,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n $that.parents('.box').first().html($data).promise().done(function () {\n if (cback != undefined) {\n cback($(this));\n }\n });\n }\n });\n });\n }else{\n if (cback != undefined) {\n cback($(this));\n }\n }\n },\n renderImage:function($input, $target){\n if ($input.files && $input.files[0]) {\n var $reader = new FileReader();\n $reader.onload = function(e) {\n $($target).attr('src', e.target.result);\n };\n $reader.readAsDataURL($input.files[0]);\n }\n },\n imageUrlToBlob:function($url, cback, $outFormat){\n var $img = new Image();\n $img.crossOrigin = 'Anonymous';\n $img.onload = function(){\n var $canvas = document.createElement('CANVAS'),\n $ctx = $canvas.getContext('2d'), $dataURL;\n $canvas.height = $img.height;\n $canvas.width = $img.width;\n $ctx.drawImage($img, 0, 0);\n $dataURL = $canvas.toDataURL($outFormat);\n cback($dataURL);\n $canvas = null;\n };\n $img.src = $url;\n },\n renderFile:function($blobFile, $target){\n var $reader = new FileReader();\n $reader.onload = function(e) {\n $($target).attr('src', e.target.result);\n };\n $reader.readAsDataURL($blobFile);\n },\n getImageWH:function($urlFile, cback){\n var $img = new Image();\n $img.onload = function() {\n cback(this.width, this.height);\n };\n $img.src = $urlFile;\n },\n b64toBlob:function($imageBase64) {\n var $byteString = atob($imageBase64.split(',')[1]);\n var $ab = new ArrayBuffer($byteString.length);\n var $ia = new Uint8Array($ab);\n for (var $i = 0; $i < $byteString.length; $i++) {\n $ia[$i] = $byteString.charCodeAt($i);\n }\n var $type = $imageBase64.split(',')[0];\n $type = $type.split(':')[1];\n $type = $type.split(';')[0];\n return new Blob([$ab], { type: $type});\n },\n toEntities:function ($text){return $(\"
\").html($text).text();},\n base64 : {\n _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\", encode: function (e) {\n var t = \"\";\n var n, r, i, s, o, u, a;\n var f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64\n } else if (isNaN(i)) {\n a = 64\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)\n }\n return t\n }, decode: function (e) {\n var t = \"\";\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u != 64) {\n t = t + String.fromCharCode(r)\n }\n if (a != 64) {\n t = t + String.fromCharCode(i)\n }\n }\n t = Base64._utf8_decode(t);\n return t\n }, _utf8_encode: function (e) {\n e = e.replace(/rn/g, \"n\");\n var t = \"\";\n for (var n = 0; n < e.length; n++) {\n var r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r)\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128)\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128)\n }\n }\n return t\n }, _utf8_decode: function (e) {\n var t = \"\";\n var n = 0;\n var r = c1 = c2 = 0;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3\n }\n }\n return t\n }\n },\n getUrl : $(location).attr(\"href\"),\n getObjForm:function($form){\n var $data = {};\n var $serialize = $($form).serializeArray();\n for (var $attr in $serialize) {\n if($data[$serialize[$attr].name] != undefined){\n if(Array.isArray($data[$serialize[$attr].name]) !== true){\n var $first = $data[$serialize[$attr].name];\n $data[$serialize[$attr].name] = [];\n $data[$serialize[$attr].name].push($first);\n }\n $data[$serialize[$attr].name].push($serialize[$attr].value);\n }else {\n $data[$serialize[$attr].name] = $serialize[$attr].value;\n }\n }\n return $data;\n },\n ajaxSetup : function () {\n $.ajaxSetup({\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n }\n });\n },\n isJson : function($data) {\n try {\n JSON.parse($data);\n } catch (e) {\n return false;\n }\n return true;\n },\n expire:function($data){\n try{\n if(libs.isJson($data)){\n $data = JSON.parse($data);\n }\n if($data.status == 'success'){\n if($data.data && $data.data.msg && $data.data.msg != ''){\n toastr.info($data.data.msg);\n }\n }\n if($data.status == 'error'){\n if($data.data && $data.data.msg && $data.data.msg != ''){\n toastr.error($data.data.msg);\n }\n }\n if($data.status == 'redirect'){\n if($data.data && $data.data.msg && $data.data.msg != ''){\n toastr.error($data.data.msg);\n }\n window.location = $data.redirect;\n }\n if($data.status == 'expire'){\n //window.location = '/logout';\n }\n }catch (error){\n\n }\n },\n memorySave:function($name, $obj){\n if(window.$memory == undefined){\n window.$memory = {};\n }\n window.$memory[$name] = $obj;\n },\n memoryGet:function($name){\n if(window.$memory != undefined && window.$memory[$name] != undefined){\n return window.$memory[$name];\n }else{\n return false;\n }\n },\n resetForm:function($form){\n $($form)[0].reset();\n $($form).find(\"input[type=hidden]\").val(\"\");\n },\n loading:function(){\n $(\"#content\").html('' +\n '
' +\n '
' +\n ' ' +\n '
' +\n '
');\n },\n replaceBreaklines:function($content){\n var $regex = new RegExp('
', 'g');\n return $content.replace($regex, '\\r\\n');\n },\n replacePerBreaklines:function($content){\n var $regex = new RegExp('(?:\\\\r\\\\n|\\\\r|\\\\n)', 'g');\n return $content.replace($regex, '
');\n },\n convertUrlToLink:function($content){\n var $regex = new RegExp('((?!(href))\\\\b(https?|):\\\\/\\\\/[-A-Z0-9+&@#\\\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\\\/%=~_|])', 'gim');\n return $content.replace($regex, \"$1\");\n },\n checkImageLoad:function($imageContainer, cback){\n var $total = $($imageContainer).length;\n var $checked = 0;\n $($imageContainer).each(function(){\n var $img = new Image();\n $img.onload = function() {\n $checked++;\n if($total == $checked){\n cback();\n }\n };\n $img.src = $(this).attr('src');\n });\n if($total == $checked){\n cback();\n }\n },\n renderPDF:function($input, $target, $options){\n if ($input.files && $input.files[0]) {\n var $reader = new FileReader();\n $reader.onload = function(e) {\n PDFObject.embed(e.target.result, $target, $options);\n };\n $reader.readAsDataURL($input.files[0]);\n }\n },\n pdfToImage:function($file, $target, cback){\n pdfjsLib.disableWorker = true;\n pdfjsLib.getDocument($file).then(function($pdf) {\n $pdf.getPage(1).then(function($page) {\n var $scale = 1.5;\n var $viewport = $page.getViewport({ scale: $scale, });\n var $canvas = $('')[0];\n var $context = $canvas.getContext('2d');\n $canvas.height = $viewport.height;\n $canvas.width = $viewport.width;\n var $renderContext = {\n canvasContext: $context,\n viewport: $viewport\n };\n $page.render($renderContext).promise.then(function(){\n var $urlBase64 = $canvas.toDataURL('image/jpeg');\n if($target != null){\n $target.attr('src', $urlBase64);\n }\n if(cback != undefined){\n cback($urlBase64);\n }\n });\n });\n });\n },\n blobToB64: function ($file, cback) {\n var $reader = new FileReader();\n $reader.onload = function(e) {\n cback(e.target.result);\n };\n $reader.readAsDataURL($file);\n },\n hex2rgb: function($hex){\n var $result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec($hex);\n return 'rgb('+parseInt($result[1], 16)+', '+parseInt($result[2], 16)+', '+parseInt($result[3], 16)+')';\n },\n rgb2hex:function($color){\n var $rgb = $color.replace(/\\s/g,'').match(/^rgba?\\((\\d+),(\\d+),(\\d+)/i);\n return ($rgb && $rgb.length === 4) ? \"#\" +\n (\"0\" + parseInt($rgb[1],10).toString(16)).slice(-2) +\n (\"0\" + parseInt($rgb[2],10).toString(16)).slice(-2) +\n (\"0\" + parseInt($rgb[3],10).toString(16)).slice(-2) : $color;\n },\n cmToPixel:function($cm) {\n return $cm * 37.7952755905511;\n },\n isEmptyReturnNull:function($obj){\n if($obj){\n return $obj;\n }else{\n return null;\n }\n },\n extendReplace:function($target, $src){\n $target = $target || {};\n for (var $prop in $src) {\n if (typeof $src[$prop] === 'object') {\n $target[$prop] = $.extend({},$target[$prop], $src[$prop]);\n }\n if (Array.isArray($src[$prop])) {\n $target[$prop] = Object.values($src[$prop]);\n }\n if(typeof $src[$prop] !== 'object' && !Array.isArray($src[$prop])) {\n $target[$prop] = $src[$prop];\n }\n if($src[$prop] == null){\n delete $target[$prop];\n }\n }\n return $target;\n },\n memoryUpdateObj:function($name, $obj){\n libs.memorySave($name, $.extend({},libs.memoryGet($name), $obj));\n },\n arrGroupByObj:function($array, $key) {\n return $array.reduce(function($prev, $new) {\n var $value = $new[$key];\n $prev[$value] = ($prev[$value] || []).concat($new);\n return $prev;\n }, {});\n },\n arrSumObj:function($arr, $key) {\n var $newArr = {};\n return $arr.reduce(function($prev, $new){\n var $prevNum = $prev[$key] || 0;\n var $newNum = $new[$key] || 0;\n var $sum = parseFloat($newNum) + parseFloat($prevNum);\n $newArr[$key]=$sum;\n return $newArr;\n }, []);\n },\n arrSortObj:function($arr, $key, $ascDesc){\n $arr = $arr.sort(function($k1, $k2) {\n return $k1[$key] - $k2[$key];\n });\n return $ascDesc == undefined || $ascDesc == 'asc' ? $arr : $arr.reverse();\n },\n pluck:function($arr, $value){\n return $.map($arr, function($v){\n return $v[$value];\n });\n },\n snakeToCamel:function($i){\n return $i.replace(/(\\_\\w)/g, function (m) {\n return m[1].toUpperCase();\n });\n },\n getUniqueId:function(){\n var $dt = new Date().getTime();\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function($c) {\n var $r = ($dt + Math.random()*16)%16 | 0;\n $dt = Math.floor($dt/16);\n return ($c=='x' ? $r :($r&0x3|0x8)).toString(16);\n });\n },\n isMobile:function(){\n return (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test((navigator.userAgent||navigator.vendor||window.opera))||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test((navigator.userAgent||navigator.vendor||window.opera).substr(0,4)));\n },\n refreshTooltips:function(){\n var $clean = null;\n if(!libs.isMobile()){\n $('div[role=\"tooltip\"]').remove();\n $(\"body .with-tooltip\").not('.with-tooltip-month-event').each(function(){\n var $that = $(this);\n $that.tooltip({\n delay: {\n show: 500,\n hide: 0\n },\n trigger: 'hover'\n }).on('shown.bs.tooltip', function() {\n try{\n clearTimeout($clean);\n }catch ($e) {\n\n }\n $clean = setTimeout(function(){\n $(this).tooltip('hide');\n $('div[role=\"tooltip\"]').remove();\n }, 3000);\n });\n });\n }\n },\n pad:function($pad, $str, $pos){\n if (typeof $str === 'undefined')\n return $pad;\n if($pos == 'l'){\n return ($pad + $str).slice(-$pad.length);\n }else{\n return ($str + $pad).substring(0,$pad.length);\n }\n },\n unlock:function($v){\n var $val = $v.split(\"\");\n var $non = $v.split(\"\");\n $non.reverse();\n var $res = [];\n var $ser = [];\n for(var $r = 0; $r < $val.length ; $r++){\n if(($r+1)%2==0){\n $res.push($val[$r]);\n }else{\n if(($val.length)%2==0){\n $ser.push($non[$r+1]);\n }else{\n $ser.push($non[$r]);\n }\n }\n }\n return atob($res.join(\"\")+\"\"+$ser.join(\"\"));\n },\n lock:function($v){\n $v = btoa($v);\n var $val = $v.split(\"\");\n var $non = $v.split(\"\");\n $non.reverse();\n var $divi = 0;\n if(($val.length)%2 == 0){\n $divi = ($val.length)/2;\n }else{\n $divi = ((($val.length)-1)/2)+1;\n $val = $val.slice(0,$divi);\n $val.pop();\n }\n var $res = [];\n for(var $r = 0 ; $r < $divi ; $r++){\n $res.push($non[$r]);\n if($val[$r] != undefined){\n $res.push($val[$r]);\n }\n }\n return $res.join(\"\");\n },\n ucfirst($str){\n return $str.charAt(0).toUpperCase() + $str.slice(1);\n },\n globalUrl:function(){\n $(\"#topNav .main-nav > li > a\").removeClass('active');\n $(\"#topNav .main-nav > li > a\").each(function(){\n var $that = $(this);\n var $pathname = window.location.pathname;\n if($pathname.includes('public')){\n $pathname = $pathname.split('/');\n $pathname = $pathname.filter(function($v, $i){\n return $v != 'public';\n });\n $pathname = $pathname.join('/');\n }\n $pathname = $pathname.split('/');\n $pathname = $pathname.reverse();\n var $href = $that.attr('href').split('/');\n if($href.includes('public')){\n $href = $href.filter(function($v, $i){\n return $v != 'public';\n });\n }\n $href = $href.join('/');\n if(\n $pathname.includes('continuingEducation') && $href == '/continuingEducation'\n ){\n $that.addClass('active');\n }\n if(\n $pathname.includes('articles') && $href == '/articles' ||\n $pathname.includes('article') && $href == '/articles'\n ){\n $that.addClass('active');\n }\n if(\n $pathname.includes('jobs') && $href == '/jobs' ||\n $pathname.includes('job') && $href == '/jobs'\n ){\n $that.addClass('active');\n }\n if(\n $pathname.includes('degrees') && $href == '/degrees' ||\n $pathname.includes('degree') && $href == '/degrees'\n ){\n $that.addClass('active');\n }\n if(\n $pathname.includes('lounges') && $href == '/lounges' ||\n $pathname.includes('lounge') && $href == '/lounges'\n ){\n if(\n !$pathname.includes('degrees') &&\n !$pathname.includes('degree') &&\n !$pathname.includes('jobs') &&\n !$pathname.includes('job')\n ){\n $that.addClass('active');\n }\n }\n if(\n $pathname.includes('myDashboard') && $href == '/myDashboard'\n ){\n $that.addClass('active');\n }\n if(\n $pathname.includes('thoughtLeaders') && $href == '/thoughtLeaders'\n ){\n $that.addClass('active');\n }\n });\n },\n};\n\n$(document).ready(function(){\n libs.ajaxSetup();\n libs.refreshTooltips();\n libs.globalUrl();\n toastr.options = {\n \"closeButton\": true,\n \"debug\": false,\n \"newestOnTop\": false,\n \"progressBar\": false,\n \"positionClass\": \"toast-bottom-right\",\n \"preventDuplicates\": false,\n \"onclick\": null,\n \"showDuration\": \"300\",\n \"hideDuration\": \"1000\",\n \"timeOut\": \"5000\",\n \"extendedTimeOut\": \"1000\",\n \"showEasing\": \"swing\",\n \"hideEasing\": \"linear\",\n \"showMethod\": \"fadeIn\",\n \"hideMethod\": \"fadeOut\"\n };\n $('[data-toggle=\"offcanvas\"]').on('click', function () {\n $('.offcanvas-collapse').toggleClass('open');\n });\n});\n","var nurseslounge_myDashboard_myProfile = {\n init:function($params){\n //nurseslounge_myDashboard_activity.lounge_follow_request(function($chtml){\n // nurseslounge_myDashboard_myProfile.lounge_follow_container($chtml);\n //});\n nurseslounge_myDashboard_myProfile.banners_location(function($config){\n nurseslounge_myDashboard_myProfile.banners_engine($config);\n });\n nurseslounge_myDashboard_myProfile.connect_with(function($config){\n nurseslounge_myDashboard_myProfile.connect_engine($config);\n });\n nurseslounge_myDashboard_colleagues.recommended_friends(function($chtml){\n nurseslounge_myDashboard_myProfile.recommended_friends_container($chtml);\n });\n nurseslounge_myDashboard_myProfile.profile($params);\n nurseslounge_myDashboard_myProfile.profile_is_complete($params, true);\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, $params);\n });\n nurseslounge_myDashboard_myProfile.preview_profile_container(function($container){\n nurseslounge_myDashboard_myProfile.preview_profile($container, $params);\n });\n nurseslounge_myDashboard_myProfile.download_pdf_container(function($container){\n nurseslounge_myDashboard_myProfile.download_pdf($container, $params);\n });\n nurseslounge_myDashboard_myProfile.notification_link();\n nurseslounge_myDashboard_myProfile.lounge_ads_location(function($config){\n nurseslounge_lounge_overview.lounge_ads_engine($config);\n });\n nurseslounge_myDashboard_myProfile.spotlight_container(function($container){\n nurseslounge_myDashboard_myProfile.spotlight($container, $params);\n });\n //nurseslounge_myDashboard_myProfile.coin_list($params, true, function($eventsIds){\n // nurseslounge_myDashboard_myProfile.coin_events($params, $eventsIds);\n //});\n },\n //General\n general_autocomplete:function($form, $id, $target, $url, $optional, $data){\n if($data == undefined){$data = {};}\n try {\n $($form+\" \"+$id).autocomplete(\"destroy\");\n }catch (e) {\n }\n var $arrId = [];\n var $arrData = [];\n var $value = '';\n $($form+\" \"+$id).autocomplete({\n minLength\t:2,\n search\t\t: function(){\n $(this).addClass(\"ui-autocomplete-loading\");\n },\n open \t\t: function(){\n $(this).removeClass(\"ui-autocomplete-loading\");\n },\n source: function(request, response) {\n $.ajax({\n method: 'POST',\n url:$url,\n data:$.extend({}, $data, {\n value:$($form+\" \"+$id).val()\n }),\n dataType: \"json\",\n success: function($data){\n libs.expire($data);\n response($data);\n /*\n $arrId.length = 0;\n $arrData.length = 0;\n $value = '';\n $.each($data,function($i,$v){\n $arrData.push('\"'+$v.value+'\"');\n $arrId.push([$v.id, $v.value]);\n });\n $arrData = $arrData.sort();\n $arrData = $.unique($arrData);\n response(JSON.parse(\"[\"+$arrData.join(\",\")+\"]\"));\n */\n }\n });\n },\n create:function(){\n $(this).prev().remove();\n $(this).trigger(\"keypress.autocomplete\");\n },\n /*\n select: function (event, ui) {\n $value = ui.item.value;\n $(this).val($value).blur();\n if($optional == 0){\n $($form+\" \"+$target).val('');\n }\n $.each($arrId,function($i,$v){\n if($.trim($v[1]) == $.trim($value)){\n $($form+\" \"+$target).val($v[0]);\n $($form).valid();\n }\n });\n return false;\n },\n focus: function (event, ui) {\n event.preventDefault();\n $value = ui.item.value;\n $(this).val($value);\n if($optional == 0) {\n $($form + \" \" + $target).val('');\n }\n $.each($arrId, function ($i, $v) {\n if ($.trim($v[1]) == $.trim($value)) {\n $($form + \" \" + $target).val($v[0]);\n }\n });\n return false;\n }\n */\n }).blur(function(event){\n if($optional == 0) {\n $($form + \" \" + $id).val($value);\n $($form + \" \" + $target).val('');\n }\n $.each($arrId, function ($i, $v) {\n if ($.trim($v[1]) == $.trim($value)) {\n $($form + \" \" + $target).val($v[0]);\n }\n });\n }).focus(function(){\n $(this).autocomplete(\"search\",\"\");\n $(this).trigger(\"keypress.autocomplete\");\n }).click(function(){\n $(this).autocomplete(\"search\",\"\");\n $(this).trigger($.Event(\"keydown\",{keyCode:40}));\n });\n\n },\n multiple_autocomplete:function($form, $id, $url, $data){\n if($data == undefined){$data = {};}\n try {\n $($form+\" \"+$id).autocomplete(\"destroy\");\n }catch (e) {\n }\n var $arrId = [];\n var $arrData = [];\n var $value = '';\n $($form+\" \"+$id).unbind()\n .on(\"keydown\", function( event ) {\n if (event.keyCode === $.ui.keyCode.TAB && $(this).autocomplete(\"instance\").menu.active) {\n event.preventDefault();\n }\n })\n .autocomplete({\n minLength\t:2,\n search\t\t: function(){\n $(this).addClass(\"ui-autocomplete-loading\");\n },\n open \t\t: function(){\n $(this).removeClass(\"ui-autocomplete-loading\");\n },\n source: function(request, response) {\n $.ajax({\n method: 'POST',\n url:$url,\n data:$.extend(\n {},\n $data,\n {value:$($form+\" \"+$id).val().split(/,\\s*/).pop()}\n ),\n dataType: \"json\",\n success: function($data){\n libs.expire($data);\n $arrId.length = 0;\n $arrData.length = 0;\n $value = '';\n $.each($data,function($i,$v){\n $arrData.push('\"'+$v.value+'\"');\n $arrId.push([$v.id, $v.value]);\n });\n response(JSON.parse(\"[\"+$arrData.join(\",\")+\"]\"));\n }\n });\n },\n select: function (event, ui) {\n var $value = $($form+\" \"+$id).val().split(/,\\s*/);\n $value.pop();\n $value.push(ui.item.value);\n $value.push(\"\");\n this.value = $value.join(\", \");\n return false;\n },\n focus: function (event, ui) {\n event.preventDefault();\n return false;\n }\n });\n },\n //User Degrees\n profile:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $profile = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-info:first');\n $profile.find(\".edit-profile:first\").unbind().click(function(){\n nurseslounge_myDashboard_myProfile.profile_is_complete($params, false, function(){\n nurseslounge_myDashboard_myProfile.user_profile_fill($params, false);\n });\n });\n nurseslounge_myDashboard_myProfile.profile_events($params);\n },\n profile_events:function($params){\n nurseslounge_myDashboard_myProfile.about_my_career($params);\n nurseslounge_myDashboard_myProfile.degree($params);\n nurseslounge_myDashboard_myProfile.specialty($params);\n nurseslounge_myDashboard_myProfile.experience($params);\n nurseslounge_myDashboard_myProfile.education($params);\n nurseslounge_myDashboard_myProfile.license($params);\n nurseslounge_myDashboard_myProfile.certification($params);\n nurseslounge_myDashboard_myProfile.memberships($params);\n nurseslounge_myDashboard_myProfile.volunteer($params);\n nurseslounge_myDashboard_myProfile.research($params);\n nurseslounge_myDashboard_myProfile.publications($params);\n nurseslounge_myDashboard_myProfile.presentations($params);\n nurseslounge_myDashboard_myProfile.awards($params);\n nurseslounge_myDashboard_myProfile.add_cards($params);\n nurseslounge_myDashboard_myProfile.collapse_events();\n libs.refreshTooltips();\n },\n collapse_events:function(){\n $(\".read-more\").unbind().click(function($e){\n $e.stopPropagation();\n var $that = $(this);\n if($that.is(':visible')){\n var $id = $that.parents('.description:first').find('.collapse').attr('id');\n nurseslounge_myDashboard_myProfile.collapse_smooth($that, $id);\n }\n });\n $(\".top-read-more\").unbind().click(function(){\n var $that = $(this).find('.read-more:first');\n if($that.is(':visible')){\n var $id = $that.parents('.description:first').find('.collapse').attr('id');\n nurseslounge_myDashboard_myProfile.collapse_smooth($that, $id);\n }\n });\n },\n collapse_smooth:function($that, $id){\n var $original = $(\"#\"+$id).height();\n var $duration = ($original * 0.8);\n $(\"#\"+$id).height(0);\n $(\"#\"+$id).animate({\n height:$original\n }, $duration,\"linear\", function() {\n $(\"#\"+$id).find('.read-less').unbind().click(function($e) {\n $e.stopPropagation();\n $(\"#\"+$id).removeClass('d-inline');\n $(\"#\"+$id).animate({\n height: '0px'\n }, $duration,\"linear\", function(){\n $that.attr('style', '');\n $(\"#\"+$id).attr('style', '');\n $that.show();\n $(\"#\"+$id).hide();\n nurseslounge_myDashboard_myProfile.collapse_events();\n });\n });\n $that.hide();\n $(\"#\"+$id).addClass('d-inline');\n });\n },\n about_my_career:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $career = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-about-my-career:first');\n var $careerModal = $('#home-my-profile-left-profile-about-my-career-modal');\n $career.find('.edit-aboutMyCareer:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'about'}, {action:'get'}, $params), function($data){\n $careerModal.find(\"textarea[name='aboutMyCareer']\").val($data.data.summary);\n nurseslounge_myDashboard_myProfile.about_my_career_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'about'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $careerModal.modal('hide');\n });\n });\n });\n $careerModal.find('.delete-aboutMyCareer:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'about'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $careerModal.modal('hide');\n });\n });\n });\n $careerModal.modal('show');\n });\n });\n },\n about_my_career_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-about-my-career-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-about-my-career-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n aboutMyCareer: {\n required: true\n }\n },\n messages: {\n aboutMyCareer: {\n required: \"About my career is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-about-my-career-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-about-my-career-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-about-my-career-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n degree:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $degree = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-degrees:first');\n var $degreeModal = $('#home-my-profile-left-profile-degrees-modal');\n $degree.find('.edit-degree').unbind().click(function(){\n var $id = $(this).data('id');\n nurseslounge_myDashboard_myProfile.degree_request($.extend({}, {action:'get'}, {id:$id}, $params), function($data){\n $degreeModal.find(\"label[name='degree']\").html($data.data.user_degree.degree.type);\n $degreeModal.find(\"textarea[name='description']\").val($data.data.user_degree.description);\n $degreeModal.find(\"select[name='startDateMonth']\").val($data.data.user_degree.start_month);\n $degreeModal.find(\"select[name='startDateYear']\").val($data.data.user_degree.start_year);\n $degreeModal.find(\"select[name='endDateMonth']\").val($data.data.user_degree.end_month);\n $degreeModal.find(\"select[name='endDateYear']\").val($data.data.user_degree.end_year);\n $degreeModal.find(\"input[name='currentlyAttending']\").prop('checked', $data.data.user_degree.currently_attending == 1);\n nurseslounge_myDashboard_myProfile.degree_validate(function($form){\n nurseslounge_myDashboard_myProfile.degree_request($.extend({}, {action:'set'}, {id:$id}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $degreeModal.modal('hide');\n });\n });\n });\n $degreeModal.find('.delete-degree').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.degree_request($.extend({}, {action:'delete'}, {id:$id}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $degreeModal.modal('hide');\n });\n });\n });\n $degreeModal.modal('show');\n });\n });\n },\n degree_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-degrees-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $.validator.addMethod(\"compareDates\",\n function($val, $ele, $param) {\n var $sYear = $(\"#home-my-profile-left-profile-degrees-modal form select[name='startDateYear']\").val();\n var $sMonth = $(\"#home-my-profile-left-profile-degrees-modal form select[name='startDateMonth']\").val();\n var $eYear = $(\"#home-my-profile-left-profile-degrees-modal form select[name='endDateYear']\").val();\n var $eMonth = $(\"#home-my-profile-left-profile-degrees-modal form select[name='endDateMonth']\").val();\n if(\n $sYear != '' && $sMonth != '' && $eYear!= '' && $eMonth!='' &&\n !$(\"#home-my-profile-left-profile-degrees-modal form input[name='currentlyAttending']\").is(':checked')\n ){\n return parseInt(new Date($sYear, $sMonth).getTime()) < parseInt(new Date($eYear, $eMonth).getTime());\n }else{\n return true;\n }\n },'Dates error {0}.');\n $validator = $(\"#home-my-profile-left-profile-degrees-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n description: {\n required: true\n },\n startDateMonth: {\n required: true,\n compareDates:true\n },\n startDateYear: {\n required: true,\n compareDates:true\n },\n endDateMonth: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-degrees-modal form input[name='currentlyAttending']\").is(':checked')\n },\n compareDates:true\n },\n endDateYear: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-degrees-modal form input[name='currentlyAttending']\").is(':checked')\n },\n compareDates:true\n },\n },\n messages: {\n description: {\n required: \"Description is required\"\n },\n startDateMonth: {\n required: \"Start month is required\",\n compareDates: \"Start date is higher than end date\"\n },\n startDateYear: {\n required: \"Start year is required\",\n compareDates: \"Start date is higher than end date\"\n },\n endDateMonth: {\n required: \"End month is required\",\n compareDates: \"End date is lower than start date\"\n },\n endDateYear: {\n required: \"End year is required\",\n compareDates: \"End date is lower than start date\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-degrees-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-degrees-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-degrees-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n degree_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/degree/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n specialty:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $specialty = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-specialty:first');\n var $specialtyModal = $('#home-my-profile-left-profile-specialty-modal');\n $specialty.find('.edit-specialty').unbind().click(function(){\n var $id = $(this).data('id');\n nurseslounge_myDashboard_myProfile.specialty_request($.extend({}, {action:'get'}, {id:$id}, $params), function($data){\n $specialtyModal.find(\"label[name='specialty']\").html($data.data.user_specialty.specialty.type);\n $specialtyModal.find(\"textarea[name='description']\").val($data.data.user_specialty.description);\n nurseslounge_myDashboard_myProfile.specialty_validate(function($form){\n nurseslounge_myDashboard_myProfile.specialty_request($.extend({}, {action:'set'}, {id:$id}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $specialtyModal.modal('hide');\n });\n });\n });\n $specialtyModal.find('.delete-specialty').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.specialty_request($.extend({}, {action:'delete'}, {id:$id}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $specialtyModal.modal('hide');\n });\n });\n });\n $specialtyModal.modal('show');\n });\n });\n },\n specialty_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-specialty-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-specialty-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n description: {\n required: true\n },\n },\n messages: {\n description: {\n required: \"Description is required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-specialty-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-specialty-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-specialty-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n specialty_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/specialty/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n experience:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $experience = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-experience:first');\n var $experienceModal = $('#home-my-profile-left-profile-experience-modal');\n var $employerNameInput = $(\"#home-my-profile-left-profile-experience-modal form input[name='employerName']\");\n var $otherEmployer = $(\"#home-my-profile-left-profile-experience-modal form .otherEmployer\");\n var $employerOptions = $(\"#home-my-profile-left-profile-experience-modal form .employerOptions\");\n var $binding;\n $otherEmployer.hide();\n $employerOptions.html('');\n $employerNameInput.unbind();\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#home-my-profile-left-profile-experience-modal form\",\n \"input[name='employerName']\",\n null,\"/myDashboard/myProfile/employers/autocomplete\",\n 1,\n $.extend({}, $params, {type:['employers', 'schools']})\n );\n $employerNameInput.on('blur', function(){\n var $that = $(this);\n var $val = $that.val();\n var $index = $val.indexOf(\"(\");\n if($index > 0){\n $val = $val.substring(0,$index);\n }\n var $newParams = $.extend({}, $params, {employer:$val});\n try{\n clearTimeout($binding);\n }catch (e) {\n }\n $binding = setTimeout(function(){\n $otherEmployer.hide();\n $employerOptions.html('');\n nurseslounge_myDashboard_myProfile.experience_check_lounge($newParams);\n }, 800);\n });\n var $inputAutocomplete = $experienceModal.find('input[name=\"location\"]')[0];\n new google.maps.places.Autocomplete($inputAutocomplete,{\n types: ['(regions)'],\n componentRestrictions: {country: \"us\"}\n });\n $experience.find('.edit-experience').unbind().click(function(){\n $experienceModal.find('.delete-experience').show();\n $experienceModal.find('.save-experience').html('Save');\n var $id = $(this).data('id');\n nurseslounge_myDashboard_myProfile.experience_request($.extend({}, {action:'get'}, {id:$id}, $params), function($data){\n $experienceModal.find(\"input[name='jobTitle']\").val($data.data.user_experience.job_title);\n $experienceModal.find(\"input[name='employerName']\").val($data.data.user_experience.employer_name);\n $experienceModal.find(\"input[name='location']\").val($data.data.user_experience.location);\n $experienceModal.find(\"textarea[name='description']\").val($data.data.user_experience.description);\n $experienceModal.find(\"select[name='startDateMonth']\").val($data.data.user_experience.start_month);\n $experienceModal.find(\"select[name='startDateYear']\").val($data.data.user_experience.start_year);\n $experienceModal.find(\"select[name='endDateMonth']\").val($data.data.user_experience.end_month);\n $experienceModal.find(\"select[name='endDateYear']\").val($data.data.user_experience.end_year);\n $experienceModal.find(\"input[name='presentEmployer']\").prop('checked', $data.data.user_experience.present_employer == 1);\n nurseslounge_myDashboard_myProfile.experience_validate(function($form){\n nurseslounge_myDashboard_myProfile.experience_request($.extend({}, {action:'set'}, {id:$id}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $experienceModal.modal('hide');\n });\n });\n });\n $experienceModal.find('.delete-experience').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.experience_request($.extend({}, {action:'delete'}, {id:$id}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $experienceModal.modal('hide');\n });\n });\n });\n $experienceModal.modal('show');\n });\n });\n $experience.find('.add-experience').unbind().click(function(){\n $experienceModal.find('form')[0].reset();\n $experienceModal.find('.delete-experience').hide();\n $experienceModal.find('.save-experience').html('Create');\n nurseslounge_myDashboard_myProfile.experience_validate(function($form){\n nurseslounge_myDashboard_myProfile.experience_request($.extend({}, {action:'create'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $experienceModal.modal('hide');\n });\n });\n });\n $experienceModal.modal('show');\n });\n $experience.find('.add-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n nurseslounge_myDashboard_myProfile.lounge_review_get_request($params, function($data){\n var $typeId = $data.data.lounge.lounge_type_id;\n var $link = $data.data.lounge.link;\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n router.navigate($link+'/ratingReviews',true);\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n });\n });\n });\n $experience.find('.edit-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n nurseslounge_myDashboard_myProfile.lounge_review_get_request($params, function($data){\n var $typeId = $data.data.lounge.lounge_type_id;\n var $link = $data.data.lounge.link;\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n });\n });\n });\n });\n $experience.find('.delete-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n if(confirm('Are you sure you want to delete your review?')){\n nurseslounge_lounge_overview.information_remove_review($params, function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n });\n });\n }\n });\n },\n lounge_review_get_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/myProfile/getLoungeReview\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n experience_check_lounge:function($params){\n var $employerNameInput = $(\"#home-my-profile-left-profile-experience-modal form input[name='employerName']\");\n var $locationInput = $(\"#home-my-profile-left-profile-experience-modal form input[name='location']\");\n var $otherEmployer = $(\"#home-my-profile-left-profile-experience-modal form .otherEmployer\");\n var $employerOptions = $(\"#home-my-profile-left-profile-experience-modal form .employerOptions\");\n nurseslounge_myDashboard_myProfile.experience_check_lounge_request($params, function($data){\n var $lounges = $data.data.lounges;\n if($data.data.list == 1){\n var $chtml = '';\n $.each($lounges, function($i, $v){\n $chtml += '' +\n '
' +\n ' ' +\n $v.name +\n '
';\n });\n $employerOptions.html($chtml).promise().done(function(){\n var $employerOption = $employerOptions.find('.employer-option');\n $employerOption.unbind().click(function(){\n var $that = $(this);\n var $location = $that.data('location');\n var $name = $that.data('name');\n var $employerNameInputVal = $employerNameInput.val().trim();\n var $index = $employerNameInputVal.indexOf(\" (\");\n if($index > 0){\n $employerNameInputVal = $employerNameInputVal.substring(0,$index);\n }\n $employerNameInput.val($employerNameInputVal+' ('+$name+')');\n $locationInput.val($location);\n $otherEmployer.hide();\n $employerOptions.html('');\n });\n });\n if($lounges.length > 0){\n $otherEmployer.show();\n }\n }else{\n var $employerNameInputVal = $employerNameInput.val().trim();\n var $index = $employerNameInputVal.indexOf(\" (\");\n if($index > 0){\n $employerNameInputVal = $employerNameInputVal.substring(0,$index);\n }\n if($lounges[0].name != $employerNameInputVal){\n $employerNameInput.val($employerNameInputVal+' ('+$lounges[0].name+')');\n }\n $locationInput.val($lounges[0].location.address_state);\n $otherEmployer.hide();\n $employerOptions.html('');\n }\n });\n },\n experience_check_lounge_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/employers/validate\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n experience_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-experience-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $.validator.addMethod(\"compareExperienceDates\",\n function($val, $ele, $param) {\n var $sYear = $(\"#home-my-profile-left-profile-experience-modal form select[name='startDateYear']\").val();\n var $sMonth = $(\"#home-my-profile-left-profile-experience-modal form select[name='startDateMonth']\").val();\n var $eYear = $(\"#home-my-profile-left-profile-experience-modal form select[name='endDateYear']\").val();\n var $eMonth = $(\"#home-my-profile-left-profile-experience-modal form select[name='endDateMonth']\").val();\n if(\n $sYear != '' && $sMonth != '' && $eYear!= '' && $eMonth!='' &&\n !$(\"#home-my-profile-left-profile-experience-modal form input[name='presentEmployer']\").is(':checked')\n ){\n return parseInt(new Date($sYear, $sMonth).getTime()) < parseInt(new Date($eYear, $eMonth).getTime());\n }else{\n return true;\n }\n },'Dates error {0}.');\n $validator = $(\"#home-my-profile-left-profile-experience-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n jobTitle: {\n required: true\n },\n employerName: {\n required: true\n },\n location: {\n required: true\n },\n description: {\n required: false\n },\n startDateMonth: {\n required: true,\n compareExperienceDates:true\n },\n startDateYear: {\n required: true,\n compareExperienceDates:true\n },\n endDateMonth: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-experience-modal form input[name='presentEmployer']\").is(':checked')\n },\n compareExperienceDates:true\n },\n endDateYear: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-experience-modal form input[name='presentEmployer']\").is(':checked')\n },\n compareExperienceDates:true\n },\n },\n messages: {\n jobTitle: {\n required: \"Job title is required\"\n },\n employerName: {\n required: \"Employer name is required\"\n },\n location: {\n required: \"Location is required\"\n },\n description: {\n required: \"Description is not required\"\n },\n startDateMonth: {\n required: \"Start month is required\",\n compareExperienceDates: \"Start date is higher than end date\"\n },\n startDateYear: {\n required: \"Start year is required\",\n compareExperienceDates: \"Start date is higher than end date\"\n },\n endDateMonth: {\n required: \"End month is required\",\n compareExperienceDates: \"End date is lower than start date\"\n },\n endDateYear: {\n required: \"End year is required\",\n compareExperienceDates: \"End date is lower than start date\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-experience-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-experience-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-experience-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n experience_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/experience/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n if($data.data.msg != ''){\n if(window.location.pathname == '/myDashboard/myProfile') {\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n }\n cback($data);\n }\n }\n });\n },\n education:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $education = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-education:first');\n var $educationModal = $('#home-my-profile-left-profile-education-modal');\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#home-my-profile-left-profile-education-modal form\",\n \"input[name='schoolName']\",\n null,\n \"/myDashboard/myProfile/employers/autocomplete\",\n 1,\n $.extend({}, $params, {type:['schools']})\n );\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#home-my-profile-left-profile-education-modal form\",\n \"input[name='degreeName']\",\n null,\n \"/myDashboard/myProfile/degrees/autocomplete\",\n 1,\n $params\n );\n var $inputAutocomplete = $educationModal.find('input[name=\"location\"]')[0];\n new google.maps.places.Autocomplete($inputAutocomplete, {\n types: ['(regions)'],\n componentRestrictions: {country: \"us\"}\n });\n $education.find('.edit-education').unbind().click(function(){\n $educationModal.find('.delete-education').show();\n $educationModal.find('.save-education').html('Save');\n var $id = $(this).data('id');\n nurseslounge_myDashboard_myProfile.education_request($.extend({}, {action:'get'}, {id:$id}, $params), function($data){\n $educationModal.find(\"input[name='schoolName']\").val($data.data.user_education.school_name);\n $educationModal.find(\"input[name='degreeName']\").val($data.data.user_education.other_degree);\n $educationModal.find(\"input[name='location']\").val($data.data.user_education.location);\n $educationModal.find(\"textarea[name='description']\").val($data.data.user_education.description);\n $educationModal.find(\"select[name='startDateMonth']\").val($data.data.user_education.start_month);\n $educationModal.find(\"select[name='startDateYear']\").val($data.data.user_education.start_year);\n $educationModal.find(\"select[name='endDateMonth']\").val($data.data.user_education.end_month);\n $educationModal.find(\"select[name='endDateYear']\").val($data.data.user_education.end_year);\n $educationModal.find(\"input[name='presentStudy']\").prop('checked', $data.data.user_education.present_study == 1);\n nurseslounge_myDashboard_myProfile.education_validate(function($form){\n nurseslounge_myDashboard_myProfile.education_request($.extend({}, {action:'set'}, {id:$id}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $educationModal.modal('hide');\n });\n });\n });\n $educationModal.find('.delete-education').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.education_request($.extend({}, {action:'delete'}, {id:$id}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $educationModal.modal('hide');\n });\n });\n });\n $educationModal.modal('show');\n });\n });\n $education.find('.add-education').unbind().click(function(){\n $educationModal.find('form')[0].reset();\n $educationModal.find('.delete-education').hide();\n $educationModal.find('.save-education').html('Create');\n nurseslounge_myDashboard_myProfile.education_validate(function($form){\n nurseslounge_myDashboard_myProfile.education_request($.extend({}, {action:'create'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $educationModal.modal('hide');\n });\n });\n });\n $educationModal.modal('show');\n });\n $education.find('.add-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n nurseslounge_myDashboard_myProfile.lounge_review_get_request($params, function($data){\n var $typeId = $data.data.lounge.lounge_type_id;\n var $link = $data.data.lounge.link;\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n router.navigate($link+'/ratingReviews',true);\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n });\n });\n });\n $education.find('.edit-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n nurseslounge_myDashboard_myProfile.lounge_review_get_request($params, function($data){\n var $typeId = $data.data.lounge.lounge_type_id;\n var $link = $data.data.lounge.link;\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n });\n });\n });\n });\n $education.find('.delete-review').unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n $params = $.extend({}, $params, {key:$key});\n if(confirm('Are you sure you want to delete your review?')){\n nurseslounge_lounge_overview.information_remove_review($params, function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n });\n });\n }\n });\n },\n education_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-education-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $.validator.addMethod(\"compareEducationDates\",\n function($val, $ele, $param) {\n var $sYear = $(\"#home-my-profile-left-profile-education-modal form select[name='startDateYear']\").val();\n var $sMonth = $(\"#home-my-profile-left-profile-education-modal form select[name='startDateMonth']\").val();\n var $eYear = $(\"#home-my-profile-left-profile-education-modal form select[name='endDateYear']\").val();\n var $eMonth = $(\"#home-my-profile-left-profile-education-modal form select[name='endDateMonth']\").val();\n if(\n $sYear != '' && $sMonth != '' && $eYear!= '' && $eMonth!='' &&\n !$(\"#home-my-profile-left-profile-education-modal form input[name='presentStudy']\").is(':checked')\n ){\n return parseInt(new Date($sYear, $sMonth).getTime()) < parseInt(new Date($eYear, $eMonth).getTime());\n }else{\n return true;\n }\n },'Dates error {0}.');\n $validator = $(\"#home-my-profile-left-profile-education-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n schoolName: {\n required: true\n },\n degreeName: {\n required: true\n },\n location: {\n required: true\n },\n description: {\n required: false\n },\n startDateMonth: {\n required: true,\n compareEducationDates:true\n },\n startDateYear: {\n required: true,\n compareEducationDates:true\n },\n endDateMonth: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-education-modal form input[name='presentStudy']\").is(':checked')\n },\n compareEducationDates:true\n },\n endDateYear: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-education-modal form input[name='presentStudy']\").is(':checked')\n },\n compareEducationDates:true\n },\n },\n messages: {\n schoolName: {\n required: \"School name is required\"\n },\n degreeName: {\n required: \"Degree name is required\"\n },\n location: {\n required: \"Location is required\"\n },\n description: {\n required: \"Description is not required\"\n },\n startDateMonth: {\n required: \"Start month is required\",\n compareEducationDates: \"Start date is higher than end date\"\n },\n startDateYear: {\n required: \"Start year is required\",\n compareEducationDates: \"Start date is higher than end date\"\n },\n endDateMonth: {\n required: \"End month is required\",\n compareEducationDates: \"End date is lower than start date\"\n },\n endDateYear: {\n required: \"End year is required\",\n compareEducationDates: \"End date is lower than start date\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-education-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-education-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-education-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n education_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/education/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n if($data.data.msg != ''){\n if(window.location.pathname == '/myDashboard/myProfile') {\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n }\n cback($data);\n }\n }\n });\n },\n license:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $license = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-license:first');\n var $licenseModal = $('#home-my-profile-left-profile-license-modal');\n $license.find('.edit-license').unbind().click(function(){\n var $id = $(this).data('id');\n nurseslounge_myDashboard_myProfile.license_catalog_request($params, function($data){\n var $chtml = '';\n $chtml+='';\n $.each($data.data.states, function($i, $v){\n $chtml+='';\n });\n $licenseModal.find(\"select[name='stateId']\").html($chtml).promise().done(function(){\n $licenseModal.find('.delete-license').show();\n $licenseModal.find('.save-license').html('Save');\n nurseslounge_myDashboard_myProfile.license_request($.extend({}, {action:'get'}, {id:$id}, $params), function($data){\n $licenseModal.find(\"select[name='stateId']\").val($data.data.user_license.state.id);\n $licenseModal.find(\"select[name='startDateMonth']\").val($data.data.user_license.start_month);\n $licenseModal.find(\"select[name='startDateYear']\").val($data.data.user_license.start_year);\n $licenseModal.find(\"select[name='endDateMonth']\").val($data.data.user_license.end_month);\n $licenseModal.find(\"select[name='endDateYear']\").val($data.data.user_license.end_year);\n nurseslounge_myDashboard_myProfile.license_validate(function($form){\n nurseslounge_myDashboard_myProfile.license_request($.extend({}, {action:'set'}, {id:$id}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $licenseModal.modal('hide');\n });\n });\n });\n $licenseModal.find('.delete-license').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.license_request($.extend({}, {action:'delete'}, {id:$id}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $licenseModal.modal('hide');\n });\n });\n });\n $licenseModal.modal('show');\n });\n });\n });\n });\n $license.find('.add-license').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.license_catalog_request($params, function($data){\n var $chtml = '';\n $chtml+='';\n $.each($data.data.states, function($i, $v){\n $chtml+='';\n });\n $licenseModal.find(\"select[name='stateId']\").html($chtml).promise().done(function() {\n $licenseModal.find('form')[0].reset();\n $licenseModal.find('.delete-license').hide();\n $licenseModal.find('.save-license').html('Create');\n nurseslounge_myDashboard_myProfile.license_validate(function($form){\n nurseslounge_myDashboard_myProfile.license_request($.extend({}, {action:'create'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $licenseModal.modal('hide');\n });\n });\n });\n $licenseModal.modal('show');\n });\n });\n });\n\n },\n license_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-license-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $.validator.addMethod(\"compareLicenseDates\",\n function($val, $ele, $param) {\n var $sYear = $(\"#home-my-profile-left-profile-license-modal form select[name='startDateYear']\").val();\n var $sMonth = $(\"#home-my-profile-left-profile-license-modal form select[name='startDateMonth']\").val();\n var $eYear = $(\"#home-my-profile-left-profile-license-modal form select[name='endDateYear']\").val();\n var $eMonth = $(\"#home-my-profile-left-profile-license-modal form select[name='endDateMonth']\").val();\n return parseInt(new Date($sYear, $sMonth).getTime()) < parseInt(new Date($eYear, $eMonth).getTime());\n },'Dates error {0}.');\n $validator = $(\"#home-my-profile-left-profile-license-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n state: {\n required: true\n },\n startDateMonth: {\n required: true,\n compareLicenseDates:true\n },\n startDateYear: {\n required: true,\n compareLicenseDates:true\n },\n endDateMonth: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-license-modal form input[name='currentlyAttending']\").is(':checked')\n },\n compareLicenseDates:true\n },\n endDateYear: {\n required: function(){\n return !$(\"#home-my-profile-left-profile-license-modal form input[name='currentlyAttending']\").is(':checked')\n },\n compareLicenseDates:true\n },\n },\n messages: {\n state: {\n required: \"State is required\"\n },\n startDateMonth: {\n required: \"Start month is required\",\n compareLicenseDates: \"Start date is higher than end date\"\n },\n startDateYear: {\n required: \"Start year is required\",\n compareLicenseDates: \"Start date is higher than end date\"\n },\n endDateMonth: {\n required: \"End month is required\",\n compareLicenseDates: \"End date is lower than start date\"\n },\n endDateYear: {\n required: \"End year is required\",\n compareLicenseDates: \"End date is lower than start date\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-license-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-license-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-license-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n license_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/license/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n license_catalog_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/licenseCatalog/get\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n certification:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $certification = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-certification:first');\n $certification.find('.edit-certification:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.certification_open($params);\n });\n },\n certification_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-certification-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-certification-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n certification: {\n required: true\n }\n },\n messages: {\n certification: {\n required: \"Licenses & Certifications is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-certification-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-certification-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-certification-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n certification_open:function($params){\n var $certificationModal = $('#home-my-profile-left-profile-certification-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'certification'}, {action:'get'}, $params), function($data){\n $certificationModal.find(\"textarea[name='certification']\").val($data.data.certification);\n nurseslounge_myDashboard_myProfile.certification_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'certification'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $certificationModal.modal('hide');\n });\n });\n });\n $certificationModal.find('.delete-certification:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'certification'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $certificationModal.modal('hide');\n });\n });\n });\n $certificationModal.modal('show');\n });\n },\n memberships:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $memberships = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-memberships:first');\n $memberships.find('.edit-memberships:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.memberships_open($params);\n });\n },\n memberships_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-memberships-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-memberships-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n memberships: {\n required: true\n }\n },\n messages: {\n memberships: {\n required: \"Memberships is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-memberships-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-memberships-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-memberships-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n memberships_open:function($params){\n var $membershipsModal = $('#home-my-profile-left-profile-memberships-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'memberships'}, {action:'get'}, $params), function($data){\n $membershipsModal.find(\"textarea[name='memberships']\").val($data.data.memberships);\n nurseslounge_myDashboard_myProfile.memberships_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'memberships'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $membershipsModal.modal('hide');\n });\n });\n });\n $membershipsModal.find('.delete-memberships:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'memberships'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $membershipsModal.modal('hide');\n });\n });\n });\n $membershipsModal.modal('show');\n });\n },\n volunteer:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $volunteer = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-volunteer:first');\n $volunteer.find('.edit-volunteer:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.volunteer_open($params);\n });\n },\n volunteer_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-volunteer-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-volunteer-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n volunteer: {\n required: true\n }\n },\n messages: {\n volunteer: {\n required: \"Volunteer is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-volunteer-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-volunteer-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-volunteer-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n volunteer_open:function($params){\n var $volunteerModal = $('#home-my-profile-left-profile-volunteer-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'volunteer'}, {action:'get'}, $params), function($data){\n $volunteerModal.find(\"textarea[name='volunteer']\").val($data.data.volunteer);\n nurseslounge_myDashboard_myProfile.volunteer_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'volunteer'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $volunteerModal.modal('hide');\n });\n });\n });\n $volunteerModal.find('.delete-volunteer:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'volunteer'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $volunteerModal.modal('hide');\n });\n });\n });\n $volunteerModal.modal('show');\n });\n },\n research:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $research = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-research:first');\n $research.find('.edit-research:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.research_open($params);\n });\n },\n research_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-research-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-research-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n research: {\n required: true\n }\n },\n messages: {\n research: {\n required: \"Research is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-research-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-research-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-research-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n research_open:function($params){\n var $researchModal = $('#home-my-profile-left-profile-research-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'research'}, {action:'get'}, $params), function($data){\n $researchModal.find(\"textarea[name='research']\").val($data.data.research);\n nurseslounge_myDashboard_myProfile.research_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'research'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $researchModal.modal('hide');\n });\n });\n });\n $researchModal.find('.delete-research:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'research'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $researchModal.modal('hide');\n });\n });\n });\n $researchModal.modal('show');\n });\n },\n publications:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $publications = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-publications:first');\n $publications.find('.edit-publications:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.publications_open($params);\n });\n },\n publications_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-publications-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-publications-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n publications: {\n required: true\n }\n },\n messages: {\n publications: {\n required: \"Publications is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-publications-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-publications-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-publications-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n publications_open:function($params){\n var $publicationsModal = $('#home-my-profile-left-profile-publications-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'publications'}, {action:'get'}, $params), function($data){\n $publicationsModal.find(\"textarea[name='publications']\").val($data.data.publications);\n nurseslounge_myDashboard_myProfile.publications_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'publications'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $publicationsModal.modal('hide');\n });\n });\n });\n $publicationsModal.find('.delete-publications:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'publications'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $publicationsModal.modal('hide');\n });\n });\n });\n $publicationsModal.modal('show');\n });\n },\n presentations:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $presentations = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-presentations:first');\n $presentations.find('.edit-presentations:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.presentations_open($params);\n });\n },\n presentations_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-presentations-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-presentations-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n presentations: {\n required: true\n }\n },\n messages: {\n presentations: {\n required: \"Presentations is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-presentations-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-presentations-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-presentations-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n presentations_open:function($params){\n var $presentationsModal = $('#home-my-profile-left-profile-presentations-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'presentations'}, {action:'get'}, $params), function($data){\n $presentationsModal.find(\"textarea[name='presentations']\").val($data.data.presentations);\n nurseslounge_myDashboard_myProfile.presentations_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'presentations'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $presentationsModal.modal('hide');\n });\n });\n });\n $presentationsModal.find('.delete-presentations:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'presentations'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $presentationsModal.modal('hide');\n });\n });\n });\n $presentationsModal.modal('show');\n });\n },\n awards:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $awards = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-awards:first');\n $awards.find('.edit-awards:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.awards_open($params);\n });\n },\n awards_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#home-my-profile-left-profile-awards-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#home-my-profile-left-profile-awards-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n awards: {\n required: true\n }\n },\n messages: {\n awards: {\n required: \"Awards is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n $(\"#home-my-profile-left-profile-awards-modal form\").find('.invalid-feedback').hide();\n $(\"#home-my-profile-left-profile-awards-modal form\").find('.error').removeClass('error');\n $(\"#home-my-profile-left-profile-awards-modal form\").find('.is-invalid').removeClass('is-invalid');\n },\n awards_open:function($params){\n var $awardsModal = $('#home-my-profile-left-profile-awards-modal');\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'awards'}, {action:'get'}, $params), function($data){\n $awardsModal.find(\"textarea[name='awards']\").val($data.data.awards);\n nurseslounge_myDashboard_myProfile.awards_validate(function($form){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'awards'}, {action:'set'}, $params, libs.getObjForm($form)), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $awardsModal.modal('hide');\n });\n });\n });\n $awardsModal.find('.delete-awards:first').unbind().click(function(){\n nurseslounge_myDashboard_myProfile.info_request($.extend({}, {type:'awards'}, {action:'delete'}, $params), function(){\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile($params);\n $awardsModal.modal('hide');\n });\n });\n });\n $awardsModal.modal('show');\n });\n },\n info_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/info/getSet\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n add_cards:function($params){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $cards = $profileLeft.find('.home-my-profile-left-profile-add-cards:first');\n $cards.find('.add-cards:first').unbind().change(function(){\n var $section = $(this).val();\n if($section != ''){\n switch ($section) {\n case 'certification':\n nurseslounge_myDashboard_myProfile.certification_open($params);\n break;\n case 'memberships':\n nurseslounge_myDashboard_myProfile.memberships_open($params);\n break;\n case 'volunteer':\n nurseslounge_myDashboard_myProfile.volunteer_open($params);\n break;\n case 'research':\n nurseslounge_myDashboard_myProfile.research_open($params);\n break;\n case 'publications':\n nurseslounge_myDashboard_myProfile.publications_open($params);\n break;\n case 'presentations':\n nurseslounge_myDashboard_myProfile.presentations_open($params);\n break;\n case 'awards':\n nurseslounge_myDashboard_myProfile.awards_open($params);\n break;\n }\n }\n $(this).val('');\n });\n },\n //User Profile Settings\n user_profile_fill:function($params, $isDashboardSetting){\n if($isDashboardSetting){\n if(!$(\"#nurseslounge-home-my-profile-edit-modal .state\").hasClass('col-sm-6')){\n $(\"#nurseslounge-home-my-profile-edit-modal .state\").addClass('col-sm-6').removeClass('col-sm-12');\n }\n $(\"#nurseslounge-home-my-profile-edit-modal .profile-type\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .city\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .state\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .email-address\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .postal-code\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .change-password\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .first-name\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .last-name\").hide();\n }else{\n if($(\"#nurseslounge-home-my-profile-edit-modal .state\").hasClass('col-sm-6')){\n $(\"#nurseslounge-home-my-profile-edit-modal .state\").removeClass('col-sm-6').addClass('col-sm-12');\n }\n $(\"#nurseslounge-home-my-profile-edit-modal .profile-type\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .city\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .state\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .email-address\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .postal-code\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .change-password\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .first-name\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .last-name\").show();\n }\n $.ajax({\n url: \"/myDashboard/myProfile/permissions/droplists\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n var $catalog = $data;\n var $inputAutocomplete = $(\"#nurseslounge-home-my-profile-edit-modal form input[name='city']\")[0];\n new google.maps.places.Autocomplete($inputAutocomplete, {\n types: ['(regions)'],\n componentRestrictions: {country: \"us\"}\n });\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='state']\").html($data.data.state);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='profile']\").html($data.data.profile);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingRecruiterEmployerType']\").html($data.data.nursingRecruiterEmployerType);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='organizationRepresentativeOrganizationType']\").html($data.data.organizationRepresentativeOrganizationType);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentDegreeType']\").html($data.data.nursingStudentDegreeType);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentMonth']\").html($data.data.nursingStudentMonth);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentYear']\").html($data.data.nursingStudentYear);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseNursingDegrees']\").html($data.data.nurseNursingDegrees);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyNursingDegrees']\").html($data.data.nurseFacultyNursingDegrees);\n var $nurseFacultySpecialty = '';\n $nurseFacultySpecialty = $nurseFacultySpecialty+$data.data.nurseFacultySpecialty;\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultySpecialty']\").html($nurseFacultySpecialty);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").html($data.data.nurseYearsOfExperience);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyYearsOfExperience']\").html($data.data.nurseFacultyYearsOfExperience);\n $.ajax({\n url: \"/myDashboard/myProfile/permissions/fill\",\n method: \"POST\",\n cache:false,\n data:$params,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success') {\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='firstName']\").val($data.data.first_name);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='lastName']\").val($data.data.last_name);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val($data.data.email);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='systemProfile']\").val($data.data.administrator_profile_id);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='state']\").val($data.data.state_id);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='city']\").val($data.data.city);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='zipCode']\").val($data.data.zip_code);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='profile']\").val($data.data.profile_id).unbind().change(function(){\n var $profile = $(this).val();\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-recruiter\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty\").hide();\n\n $params = $.extend({}, $params, $data.data);\n\n\n var $nurseSpecialty = '';\n if($profile == 6){\n $nurseSpecialty = $nurseSpecialty+$catalog.data.advanceSpecialty;\n }else{\n $nurseSpecialty = $nurseSpecialty+$catalog.data.nurseSpecialty;\n }\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").html($nurseSpecialty);\n\n if($profile == 1){\n nurseslounge_myDashboard_myProfile.user_profile_recruiter_edit_events($params, $isDashboardSetting);\n }else\n if($profile == 2){\n nurseslounge_myDashboard_myProfile.user_profile_organization_representative_edit_events($params, $isDashboardSetting);\n }else\n if($profile == 3 || $profile == 7){\n nurseslounge_myDashboard_myProfile.user_profile_nursing_student_edit_events($params, $isDashboardSetting, $profile);\n }else\n if($profile == 4 || $profile == 6){\n nurseslounge_myDashboard_myProfile.user_profile_nurse_edit_events($params, $isDashboardSetting, $profile);\n }else\n if($profile == 5){\n nurseslounge_myDashboard_myProfile.user_profile_nurse_faculty_edit_events($params, $isDashboardSetting);\n }\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-recruiter\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty\").hide();\n\n var $profile = $data.data.profile_id;\n\n $params = $.extend({}, $params, $data.data);\n\n var $nurseSpecialty = '';\n if($profile == 6){\n $nurseSpecialty = $nurseSpecialty+$catalog.data.advanceSpecialty;\n }else{\n $nurseSpecialty = $nurseSpecialty+$catalog.data.nurseSpecialty;\n }\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").html($nurseSpecialty);\n\n if($profile == 1){\n nurseslounge_myDashboard_myProfile.user_profile_recruiter_edit_events($params, $isDashboardSetting);\n }else\n if($profile == 2){\n nurseslounge_myDashboard_myProfile.user_profile_organization_representative_edit_events($params, $isDashboardSetting);\n }else\n if($profile == 3 || $profile == 7){\n nurseslounge_myDashboard_myProfile.user_profile_nursing_student_edit_events($params, $isDashboardSetting, $profile);\n }else\n if($profile == 4 || $profile == 6){\n nurseslounge_myDashboard_myProfile.user_profile_nurse_edit_events($params, $isDashboardSetting, $profile);\n }else\n if($profile == 5){\n nurseslounge_myDashboard_myProfile.user_profile_nurse_faculty_edit_events($params, $isDashboardSetting);\n }\n }\n $(\"#nurseslounge-home-my-profile-edit-modal\").on('hidden.bs.modal', function () {\n $(\"#nurseslounge-home-my-profile-edit-modal form\")[0].reset();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-recruiter\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty\").hide();\n }).modal('show');\n }\n });\n }\n }\n });\n },\n user_profile_recruiter_edit_events:function($params, $isDashboardSetting){\n\n if(!$isDashboardSetting){\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-recruiter-employer\").hide();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-recruiter-employer\").show();\n }\n\n nurseslounge_myDashboard_myProfile.user_profile_recruiter_validate($params, function($form){\n nurseslounge_myDashboard_myProfile.user_profile_edit_request($.extend({}, $params, {id:$params.id},libs.getObjForm($form)));\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingRecruiterEmployerType']\").val($params.employer_type_id);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nursingRecruiterEmployerName']\").val($params.nursingRecruiterEmployerName.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nursingRecruiterJobTitle']\").val($params.job_title);\n\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nursingRecruiterEmployerName']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['employers']})\n );\n //nurseslounge_myDashboard_myProfile.multiple_autocomplete(\"#nurseslounge-home-my-profile-edit-modal form\",\"input[name='nursingRecruiterEmployerName']\",\"/signup/nursing/recruiter/employer/type\");\n //nurseslounge_myDashboard_myProfile.general_autocomplete(\"#nurseslounge-home-my-profile-edit-modal form\",\"input[name='nursingRecruiterJobTitle']\",\"input[name='nursingRecruiterJobTitleID']\",\"/signup/nursing/recruiter/job/title\", 1);\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-recruiter\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .specialty\").show();\n },\n user_profile_recruiter_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n password: {\n required: false,\n minlength: 8,\n maxlength: 191\n },\n retypePassword: {\n required: false,\n equalTo: \"#nurseslounge-home-my-profile-edit-modal form input[name='password']\"\n },\n firstName: {\n required: true,\n maxlength: 191\n },\n lastName: {\n required: true,\n maxlength: 191\n },\n email: {\n required: function(){\n var $form = $(\"#nurseslounge-home-my-profile-edit-modal form\");\n return $form.find(\".change-password\").is(':visible');\n },\n minlength: 3,\n maxlength: 191,\n email:true,\n remote: {\n url: \"/signup/email/exist\",\n type: \"post\",\n data: {\n email: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val();\n },\n emailSaved: $params.email\n }\n }\n },\n state: {\n required: true\n },\n city: {\n required: false\n },\n zipCode: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .postal-code\").is(':visible');\n },\n minlength: 3,\n maxlength: 191\n },\n profile: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .profile-type\").is(':visible');\n }\n },\n nursingRecruiterEmployerType: {\n required: false\n },\n nursingRecruiterEmployerName: {\n required: false\n },\n nursingRecruiterJobTitle: {\n required: false\n }\n },\n messages: {\n password: {\n required: \"The new password is not required\",\n minlength: \"The new password must have at least 8 characters\",\n maxlength: \"The new password cannot exceed 191 characters\"\n },\n retypePassword: {\n required: \"The retype password is not required\",\n equalTo: \"The retype password must be identical\"\n },\n firstName: {\n required: \"The first name is required\",\n maxlength: \"The first name cannot exceed 191 characters\"\n },\n lastName: {\n required: \"The last name is required\",\n maxlength: \"The last name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\",\n remote:\"The email exist, choose another\"\n },\n state: {\n required: \"The state is required\"\n },\n city: {\n required: \"The city is not required\"\n },\n zipCode: {\n required: \"The zip code is required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n },\n profile: {\n required: \"The profile is required\"\n },\n nursingRecruiterEmployerType: {\n required: \"The employer type is not required\"\n },\n nursingRecruiterEmployerName: {\n required: \"The employer name is not required\"\n },\n nursingRecruiterJobTitle: {\n required: \"The job title is not required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n user_profile_organization_representative_edit_events:function($params, $isDashboardSetting){\n\n if(!$isDashboardSetting){\n $(\"#nurseslounge-home-my-profile-edit-modal .organization-representative-type\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .organization-representative-organization\").hide();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .organization-representative-type\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .organization-representative-organization\").show();\n }\n\n nurseslounge_myDashboard_myProfile.user_profile_organization_representative_validate($params, function($form){\n nurseslounge_myDashboard_myProfile.user_profile_edit_request($.extend({}, $params, {id:$params.id},libs.getObjForm($form)));\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='organizationRepresentativeOrganizationType']\").val($params.organization_type_id);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='organizationRepresentativeOrganization']\").val($params.organizationRepresentativeOrganization.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='organizationRepresentativeJobTitle']\").val($params.job_title);\n\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='organizationRepresentativeOrganization']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['employers', 'schools']})\n );\n //nurseslounge_myDashboard_myProfile.general_autocomplete(\"#nurseslounge-home-my-profile-edit-modal form\",\"input[name='organizationRepresentativeJobTitle']\",\"input[name='organizationRepresentativeJobTitleID']\",\"/signup/organization/representative/job/title\", 1);\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .specialty\").show();\n },\n user_profile_organization_representative_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n password: {\n required: false,\n minlength: 8,\n maxlength: 191\n },\n retypePassword: {\n required: false,\n equalTo: \"#nurseslounge-home-my-profile-edit-modal form input[name='password']\"\n },\n firstName: {\n required: true,\n maxlength: 191\n },\n lastName: {\n required: true,\n maxlength: 191\n },\n email: {\n required: function(){\n var $form = $(\"#nurseslounge-home-my-profile-edit-modal form\");\n return $form.find(\".change-password\").is(':visible');\n },\n minlength: 3,\n maxlength: 191,\n email:true,\n remote: {\n url: \"/signup/email/exist\",\n type: \"post\",\n data: {\n email: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val();\n },\n emailSaved: $params.email\n }\n }\n },\n state: {\n required: true\n },\n city: {\n required: false\n },\n zipCode: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .postal-code\").is(':visible');\n },\n minlength: 3,\n maxlength: 191\n },\n profile: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .profile-type\").is(':visible');\n }\n },\n organizationRepresentativeOrganizationType: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative-type\").is(':visible');\n }\n },\n organizationRepresentativeOrganization: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .organization-representative-organization\").is(':visible');\n }\n },\n organizationRepresentativeJobTitle: {\n required: false\n }\n },\n messages: {\n password: {\n required: \"The new password is not required\",\n minlength: \"The new password must have at least 8 characters\",\n maxlength: \"The new password cannot exceed 191 characters\"\n },\n retypePassword: {\n required: \"The retype password is not required\",\n equalTo: \"The retype password must be identical\"\n },\n firstName: {\n required: \"The first name is required\",\n maxlength: \"The first name cannot exceed 191 characters\"\n },\n lastName: {\n required: \"The last name is required\",\n maxlength: \"The last name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\",\n remote:\"The email exist, choose another\"\n },\n state: {\n required: \"The state is required\"\n },\n city: {\n required: \"The city is not required\"\n },\n zipCode: {\n required: \"The zip code is required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n },\n profile: {\n required: \"The profile is required\"\n },\n organizationRepresentativeOrganizationType: {\n required: \"The organization type is required\"\n },\n organizationRepresentativeOrganization: {\n required: \"The organization is required\"\n },\n organizationRepresentativeJobTitle: {\n required: \"The job title is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n user_profile_nursing_student_edit_events:function($params, $isDashboardSetting, $profile){\n var $additionalDegreesInput = $(\"#nurseslounge-home-my-profile-edit-modal input[name='nursingStudentAdditionalDegrees']\");\n var $tagifyTags = libs.memoryGet('nurseslounge_myDashboard_myProfile_nursing_student_additional_degrees');\n if($tagifyTags){\n try{\n $tagifyTags.DOM.input.classList.remove('tagify__input--outside');\n $tagifyTags.DOM.input.classList.remove('tagify__input');\n $tagifyTags.removeAllTags();\n $tagifyTags.destroy();\n }catch ($e) {\n\n }\n }\n if($profile == 7) {\n $tagifyTags = new Tagify($additionalDegreesInput[0]);\n $tagifyTags.DOM.input.classList.add('tagify__input--outside');\n $tagifyTags.DOM.scope.parentNode.insertBefore($tagifyTags.DOM.input, $tagifyTags.DOM.scope);\n var $designationLevel = $params.designation_level;\n $designationLevel = $designationLevel.filter(function($designation){\n return $designation.profile_id == $profile\n });\n for (var $i in $designationLevel) {\n $tagifyTags.addTags($designationLevel[$i].designation);\n }\n libs.memorySave('nurseslounge_myDashboard_myProfile_nursing_student_additional_degrees', $tagifyTags);\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-additional-degrees\").show();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-additional-degrees\").hide();\n }\n if(!$isDashboardSetting){\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-degree\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-school\").hide();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-degree\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nursing-student-school\").show();\n }\n\n nurseslounge_myDashboard_myProfile.user_profile_nursing_student_validate($params, function($form){\n var $additionalDegrees = [];\n var $additionalDegreesVal = $additionalDegreesInput.val();\n if($additionalDegreesVal != '') {\n var $selectedTags = JSON.parse($additionalDegreesVal);\n for (var $i in $selectedTags) {\n $additionalDegrees.push($selectedTags[$i].value);\n }\n }\n $params = $.extend({}, $params, {additionalDegrees:$additionalDegrees});\n nurseslounge_myDashboard_myProfile.user_profile_edit_request($.extend({}, $params, {id:$params.id},libs.getObjForm($form)));\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentDegreeType']\").val($params.nursingStudentDegreeType);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nursingStudentSchoolAttended']\").val($params.nursingStudentSchoolAttended);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentMonth']\").val($params.month);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentYear']\").val($params.year);\n\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nursingStudentSchoolAttended']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['schools']})\n );\n\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentDegreeType']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentDegreeType']\").chosen();\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .specialty\").hide();\n\n },\n user_profile_nursing_student_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n password: {\n required: false,\n minlength: 8,\n maxlength: 191\n },\n retypePassword: {\n required: false,\n equalTo: \"#nurseslounge-home-my-profile-edit-modal form input[name='password']\"\n },\n firstName: {\n required: true,\n maxlength: 191\n },\n lastName: {\n required: true,\n maxlength: 191\n },\n email: {\n required: function(){\n var $form = $(\"#nurseslounge-home-my-profile-edit-modal form\");\n return $form.find(\".change-password\").is(':visible');\n },\n minlength: 3,\n maxlength: 191,\n email:true,\n remote: {\n url: \"/signup/email/exist\",\n type: \"post\",\n data: {\n email: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val();\n },\n emailSaved: $params.email\n }\n }\n },\n state: {\n required: true\n },\n city: {\n required: false\n },\n zipCode: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .postal-code\").is(':visible');\n },\n minlength: 3,\n maxlength: 191\n },\n profile: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .profile-type\").is(':visible');\n }\n },\n nursingStudentDegreeType: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student-degree\").is(':visible');\n }\n },\n nursingStudentSchoolAttended: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student-school\").is(':visible');\n }\n },\n nursingStudentMonth: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student-expected-graduation\").is(':visible');\n }\n },\n nursingStudentYear: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nursing-student-expected-graduation\").is(':visible');\n }\n }\n },\n messages: {\n password: {\n required: \"The new password is not required\",\n minlength: \"The new password must have at least 8 characters\",\n maxlength: \"The new password cannot exceed 191 characters\"\n },\n retypePassword: {\n required: \"The retype password is not required\",\n equalTo: \"The retype password must be identical\"\n },\n firstName: {\n required: \"The first name is required\",\n maxlength: \"The first name cannot exceed 191 characters\"\n },\n lastName: {\n required: \"The last name is required\",\n maxlength: \"The last name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\",\n remote:\"The email exist, choose another\"\n },\n state: {\n required: \"The state is required\"\n },\n city: {\n required: \"The city is not required\"\n },\n zipCode: {\n required: \"The zip code is required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n },\n profile: {\n required: \"The profile is required\"\n },\n nursingStudentDegreeType: {\n required: \"The degree type is required\"\n },\n nursingStudentSchoolAttended: {\n required: \"The school name is required\"\n },\n nursingStudentMonth: {\n required: \"The month is required\"\n },\n nursingStudentYear: {\n required: \"The year is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n if($(\"#nurseslounge-home-my-profile-edit-modal form select[name='nursingStudentDegreeType']\").val() == null){\n $validator.showErrors({ nursingStudentDegreeType: \"The degree type is required\" });\n return false;\n }\n cback($form);\n return false;\n }\n });\n },\n user_profile_nurse_edit_events:function($params, $isDashboardSetting, $profile){\n var $additionalDegreesInput = $(\"#nurseslounge-home-my-profile-edit-modal input[name='nurseAdditionalDegrees']\");\n var $tagifyTags = libs.memoryGet('nurseslounge_myDashboard_myProfile_nurse_additional_degrees');\n if($tagifyTags){\n try{\n $tagifyTags.DOM.input.classList.remove('tagify__input--outside');\n $tagifyTags.DOM.input.classList.remove('tagify__input');\n $tagifyTags.removeAllTags();\n $tagifyTags.destroy();\n }catch ($e) {\n\n }\n }\n if($profile == 6) {\n $tagifyTags = new Tagify($additionalDegreesInput[0]);\n $tagifyTags.DOM.input.classList.add('tagify__input--outside');\n $tagifyTags.DOM.scope.parentNode.insertBefore($tagifyTags.DOM.input, $tagifyTags.DOM.scope);\n var $designationLevel = $params.designation_level;\n $designationLevel = $designationLevel.filter(function($designation){\n return $designation.profile_id == $profile\n });\n for (var $i in $designationLevel) {\n $tagifyTags.addTags($designationLevel[$i].designation);\n }\n libs.memorySave('nurseslounge_myDashboard_myProfile_nurse_additional_degrees', $tagifyTags);\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-additional-degrees\").show();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-additional-degrees\").hide();\n }\n if(!$isDashboardSetting){\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-school-name\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-specialty\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-years-of-experience\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-employer\").hide();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-school-name\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-specialty\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-years-of-experience\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-employer\").show();\n }\n\n nurseslounge_myDashboard_myProfile.user_profile_nurse_validate($params, function($form){\n var $additionalDegrees = [];\n var $additionalDegreesVal = $additionalDegreesInput.val();\n if($additionalDegreesVal != '') {\n var $selectedTags = JSON.parse($additionalDegreesVal);\n for (var $i in $selectedTags) {\n $additionalDegrees.push($selectedTags[$i].value);\n }\n }\n $params = $.extend({}, $params, {additionalDegrees:$additionalDegrees});\n nurseslounge_myDashboard_myProfile.user_profile_edit_request($.extend({}, $params, {id:$params.id},libs.getObjForm($form)));\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseNursingDegrees']\").val($params.nurseNursingDegrees);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseNursingSchoolAttended']\").val($params.nurseNursingSchoolAttended.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").val($params.nurseSpecialty);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseJobTitle']\").val($params.job_title);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseEmployer']\").val($params.nurseEmployer.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").val($params.nurseYearsOfExperience);\n\n /*\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").chosen();\n */\n\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseNursingDegrees']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseNursingDegrees']\").chosen();\n\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").chosen();\n\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nurseNursingSchoolAttended']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['schools']})\n );\n //nurseslounge_myDashboard_myProfile.general_autocomplete(\"#nurseslounge-home-my-profile-edit-modal form\",\"input[name='nurseJobTitle']\",\"input[name='nurseJobTitleID']\",\"/signup/nurse/job/title\", 1);\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nurseEmployer']\",\n null,\n \"/signup/nurse/employer\",\n 1,\n $.extend({}, $params, {type:['employers']})\n );\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .specialty\").show();\n },\n user_profile_nurse_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n password: {\n required: false,\n minlength: 8,\n maxlength: 191\n },\n retypePassword: {\n required: false,\n equalTo: \"#nurseslounge-home-my-profile-edit-modal form input[name='password']\"\n },\n firstName: {\n required: true,\n maxlength: 191\n },\n lastName: {\n required: true,\n maxlength: 191\n },\n email: {\n required: function(){\n var $form = $(\"#nurseslounge-home-my-profile-edit-modal form\");\n return $form.find(\".change-password\").is(':visible');\n },\n minlength: 3,\n maxlength: 191,\n email:true,\n remote: {\n url: \"/signup/email/exist\",\n type: \"post\",\n data: {\n email: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val();\n },\n emailSaved: $params.email\n }\n }\n },\n state: {\n required: true\n },\n city: {\n required: false\n },\n zipCode: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .postal-code\").is(':visible');\n },\n minlength: 3,\n maxlength: 191\n },\n profile: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .profile-type\").is(':visible');\n }\n },\n nurseNursingDegrees: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-destination-level\").is(':visible');\n }\n },\n nurseNursingSchoolAttended: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-school-name\").is(':visible');\n }\n },\n nurseSpecialty: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-specialty\").is(':visible');\n }\n },\n nurseYearsOfExperience: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-years-of-experience\").is(':visible');\n }\n },\n nurseJobTitle: {\n required: false\n },\n nurseEmployer: {\n required: false\n }\n },\n messages: {\n password: {\n required: \"The new password is not required\",\n minlength: \"The new password must have at least 8 characters\",\n maxlength: \"The new password cannot exceed 191 characters\"\n },\n retypePassword: {\n required: \"The retype password is not required\",\n equalTo: \"The retype password must be identical\"\n },\n firstName: {\n required: \"The first name is required\",\n maxlength: \"The first name cannot exceed 191 characters\"\n },\n lastName: {\n required: \"The last name is required\",\n maxlength: \"The last name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\",\n remote:\"The email exist, choose another\"\n },\n state: {\n required: \"The state is required\"\n },\n city: {\n required: \"The city is not required\"\n },\n zipCode: {\n required: \"The zip code is required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n },\n profile: {\n required: \"The profile is required\"\n },\n nurseNursingDegrees: {\n required: \"The nursing degrees is required\"\n },\n nurseNursingSchoolAttended: {\n required: \"The school name is required\"\n },\n nurseSpecialty: {\n required: \"The specialty is required\"\n },\n nurseYearsOfExperience: {\n required: \"The year of experience is required\"\n },\n nurseJobTitle: {\n required: \"The job title is not required\"\n },\n nurseEmployer: {\n required: \"The employer is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n if($(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseNursingDegrees']\").val() == null){\n $validator.showErrors({ nurseNursingDegrees: \"The nursing degrees is required\" });\n return false;\n }\n if($(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseSpecialty']\").val() == null){\n $validator.showErrors({ nurseSpecialty: \"The specialty is required\" });\n return false;\n }\n cback($form);\n return false;\n }\n });\n },\n user_profile_nurse_faculty_edit_events:function($params, $isDashboardSetting){\n\n if(!$isDashboardSetting){\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-school-name\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-specialty\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-years-of-experience\").hide();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-employer\").hide();\n }else{\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-school-name\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-specialty\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-years-of-experience\").show();\n $(\"#nurseslounge-home-my-profile-edit-modal .nurse-faculty-employer\").show();\n }\n\n nurseslounge_myDashboard_myProfile.user_profile_nurse_faculty_validate($params, function($form){\n nurseslounge_myDashboard_myProfile.user_profile_edit_request($.extend({}, $params, {id:$params.id},libs.getObjForm($form)));\n });\n\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyNursingDegrees']\").val($params.nurseFacultyNursingDegrees);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseFacultyNursingSchoolAttended']\").val($params.nurseFacultyNursingSchoolAttended.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultySpecialty']\").val($params.nurseFacultySpecialty);\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyYearsOfExperience']\").val($params.nurseFacultyYearsOfExperience);\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseFacultyEmployer']\").val($params.nurseFacultyEmployer.join(','));\n $(\"#nurseslounge-home-my-profile-edit-modal form input[name='nurseFacultyJobTitle']\").val($params.job_title);\n\n /*\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseYearsOfExperience']\").chosen();\n */\n\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyNursingDegrees']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyNursingDegrees']\").chosen();\n\n try{\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultySpecialty']\").chosen(\"destroy\");\n }catch (e) {}\n $(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultySpecialty']\").chosen();\n\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nurseFacultyNursingSchoolAttended']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['schools']})\n );\n //nurseslounge_myDashboard_myProfile.general_autocomplete(\"#nurseslounge-home-my-profile-edit-modal form\",\"input[name='nurseJobTitle']\",\"input[name='nurseJobTitleID']\",\"/signup/nurse/job/title\", 1);\n nurseslounge_myDashboard_myProfile.general_autocomplete(\n \"#nurseslounge-home-my-profile-edit-modal form\",\n \"input[name='nurseFacultyEmployer']\",\n null,\n \"/signup/nursing/recruiter/employer/type\",\n 1,\n $.extend({}, $params, {type:['schools']})\n );\n\n $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty\").show();\n },\n user_profile_nurse_faculty_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-my-profile-edit-modal form\").validate({\n onsubmit: true,\n debug: false,\n ignore: \"*:not(.validate)\",\n rules: {\n password: {\n required: false,\n minlength: 8,\n maxlength: 191\n },\n retypePassword: {\n required: false,\n equalTo: \"#nurseslounge-home-my-profile-edit-modal form input[name='password']\"\n },\n firstName: {\n required: true,\n maxlength: 191\n },\n lastName: {\n required: true,\n maxlength: 191\n },\n email: {\n required: function(){\n var $form = $(\"#nurseslounge-home-my-profile-edit-modal form\");\n return $form.find(\".change-password\").is(':visible');\n },\n minlength: 3,\n maxlength: 191,\n email:true,\n remote: {\n url: \"/signup/email/exist\",\n type: \"post\",\n data: {\n email: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form input[name='email']\").val();\n },\n emailSaved: $params.email\n }\n }\n },\n state: {\n required: true\n },\n city: {\n required: false\n },\n zipCode: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .postal-code\").is(':visible');\n },\n minlength: 3,\n maxlength: 191\n },\n profile: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .profile-type\").is(':visible');\n }\n },\n nurseFacultyNursingDegrees: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty-destination-level\").is(':visible');\n }\n },\n nurseFacultyNursingSchoolAttended: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty-school-name\").is(':visible');\n }\n },\n nurseFacultySpecialty: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty-specialty\").is(':visible');\n }\n },\n nurseFacultyYearsOfExperience: {\n required: function(){\n return $(\"#nurseslounge-home-my-profile-edit-modal form .nurse-faculty-years-of-experience\").is(':visible');\n }\n },\n nurseFacultyEmployer: {\n required: false\n },\n nurseFacultyJobTitle: {\n required: false\n },\n },\n messages: {\n password: {\n required: \"The new password is not required\",\n minlength: \"The new password must have at least 8 characters\",\n maxlength: \"The new password cannot exceed 191 characters\"\n },\n retypePassword: {\n required: \"The retype password is not required\",\n equalTo: \"The retype password must be identical\"\n },\n firstName: {\n required: \"The first name is required\",\n maxlength: \"The first name cannot exceed 191 characters\"\n },\n lastName: {\n required: \"The last name is required\",\n maxlength: \"The last name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\",\n remote:\"The email exist, choose another\"\n },\n state: {\n required: \"The state is required\"\n },\n city: {\n required: \"The city is not required\"\n },\n zipCode: {\n required: \"The zip code is required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n },\n profile: {\n required: \"The profile is required\"\n },\n nurseFacultyNursingDegrees: {\n required: \"The nursing faculty degrees is required\"\n },\n nurseFacultyNursingSchoolAttended: {\n required: \"The nursing school i graduate from is required\"\n },\n nurseFacultySpecialty: {\n required: \"The specialty is required\"\n },\n nurseFacultyYearsOfExperience: {\n required: \"The year of experience is required\"\n },\n nurseFacultyEmployer: {\n required: \"The nursing school i currently teach at is not required\"\n },\n nurseFacultyJobTitle: {\n required: \"The job title is not required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n if($(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultyNursingDegrees']\").val() == null){\n $validator.showErrors({ nurseFacultyNursingDegrees: \"The nursing faculty degrees is required\" });\n return false;\n }\n if($(\"#nurseslounge-home-my-profile-edit-modal form select[name='nurseFacultySpecialty']\").val() == null){\n $validator.showErrors({ nurseFacultySpecialty:\"The specialty is required\"});\n return false;\n }\n cback($form);\n return false;\n }\n });\n },\n user_profile_edit_request:function($params){\n var $jobsNearMe = $(\".nav-underline a[data-id='jobs_near_me']\");\n var $degreesForMe = $(\".nav-underline a[data-id='degrees_for_me']\");\n var $preceptors = $(\".nav-underline a[data-id='preceptors']\");\n var $ce = $(\".nav-underline a[data-id='continuing_education']\");\n var $myCalendar = $(\".nav-underline a[data-id='my_calendar']\");\n var $myCredentialVault = $(\".nav-underline a[data-id='my_credentials_vault']\");\n var $myFloatPool = $(\".nav-underline a[data-id='my_float_pool']\");\n var $nursesLounge = $(\"#nurseslounge-lounge\");\n var $scrollerLeft = $nursesLounge.find(\".nav-scroller-left\");\n var $scrollerRight = $nursesLounge.find(\".nav-scroller-right\");\n $.ajax({\n url:\"/myDashboard/myProfile/permissions/addUserRequest\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n var $profile = $data.data.profile_id;\n if($profile == 1 || $profile == 2){\n if(!$jobsNearMe.hasClass('d-none')){\n $jobsNearMe.addClass('d-none');\n }\n if(!$degreesForMe.hasClass('d-none')){\n $degreesForMe.addClass('d-none');\n }\n if(!$ce.hasClass('d-none')){\n $ce.addClass('d-none');\n }\n if(!$myCalendar.hasClass('d-none')){\n $myCalendar.addClass('d-none');\n }\n if(!$myCredentialVault.hasClass('d-none')){\n $myCredentialVault.addClass('d-none');\n }\n if(!$scrollerLeft.hasClass('d-none')){\n $scrollerLeft.addClass('d-none');\n }\n if(!$scrollerRight.hasClass('d-none')){\n $scrollerRight.addClass('d-none');\n }\n }else{\n if($jobsNearMe.hasClass('d-none')){\n $jobsNearMe.removeClass('d-none');\n }\n if($degreesForMe.hasClass('d-none')){\n $degreesForMe.removeClass('d-none');\n }\n if($ce.hasClass('d-none')){\n $ce.removeClass('d-none');\n }\n if($myCalendar.hasClass('d-none')){\n $myCalendar.removeClass('d-none');\n }\n if($myCredentialVault.hasClass('d-none')){\n $myCredentialVault.removeClass('d-none');\n }\n if($scrollerLeft.hasClass('d-none')){\n $scrollerLeft.removeClass('d-none');\n }\n if($scrollerRight.hasClass('d-none')){\n $scrollerRight.removeClass('d-none');\n }\n }\n if($profile == 6 || $profile == 7){\n if($preceptors.hasClass('d-none')){\n $preceptors.removeClass('d-none');\n }\n }else{\n if(!$preceptors.hasClass('d-none')){\n $preceptors.addClass('d-none');\n }\n }\n if($profile == 4 || $profile == 6 || $profile == 7){\n if($myFloatPool.hasClass('d-none')){\n $myFloatPool.removeClass('d-none');\n }\n }else{\n if(!$myFloatPool.hasClass('d-none')){\n $myFloatPool.addClass('d-none');\n }\n }\n $(\".nav.nav-underline\").scrollLeft(0);\n $scrollerLeft.fadeOut();\n $scrollerRight.fadeIn();\n libs.refreshBoxFrom('.box-profile', null, function(){\n nurseslounge_myDashboard_myProfile.profile({user_id:libs.memoryGet('user_id')});\n if(window.location.pathname == '/myDashboard/myProfile'){\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/activity') {\n nurseslounge_myDashboard_activity.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n var nlWall = $(window).nurseslounge_myDashboard_wall_get($params, 'nlWall');\n nlWall.isEmpty({\n wall_container:function(){\n return $(\"#nurseslounge-home-activity .nurseslounge-home-activity-left .wall-container\");\n }\n });\n }\n if(window.location.pathname == '/myDashboard/colleagues') {\n nurseslounge_myDashboard_colleagues.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/degreesForMe') {\n nurseslounge_myDashboard_degreesForMe.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n nurseslounge_myDashboard_activity.lounge_follow_request(function($chtml){\n nurseslounge_myDashboard_myProfile.lounge_follow_container($chtml);\n });\n nurseslounge_lounge_header.followers_reload_last();\n $(\"#nurseslounge-home-my-profile-edit-modal\").modal('hide');\n });\n }\n }\n });\n },\n //Connect With\n connect_with:function(cback){\n cback({\n 'connect':$(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .connect-with\")\n });\n },\n connect_engine:function($config){\n $config.connect.unbind().click(function(){\n var $toUserId = $(this).data('id');\n var $url = $(this).data('url');\n var $name = $(this).data('name');\n nurseslounge_myDashboard_colleagues.colleagues_invitation_modal($url, $name, function($ok){\n if($ok){\n var $params = {user_id:libs.memoryGet('user_id'),to_user_id:$toUserId, status_id:1};\n nurseslounge_myDashboard_colleagues.colleagues_home_set($params, function () {\n router.navigate('/profile/'+$toUserId);\n });\n }\n });\n });\n },\n //Banners\n banners_location:function(cback){\n cback({\n 'banners':$(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .banners\")\n });\n },\n banners_engine:function($config){\n var $userId = libs.memoryGet('user_id');\n var $key = $config.banners.data('key');\n $key = $key == undefined ? '' : $key;\n var $banners = $config.banners.not('.slick-initialized');\n try {\n $banners.slick('unslick');\n } catch (e) {\n }\n var $widget = $banners.parents('.banners-container:first');\n $.ajax({\n url: \"/myDashboard/myProfile/banners\",\n method: \"POST\",\n cache: false,\n dataType: \"json\",\n data: {\n user_id: $userId,\n key: $key\n },\n success: function ($data) {\n libs.expire($data);\n $banners.width($widget.width());\n var $chtml = '';\n if ($data.status == 'success') {\n $.each($data.data.advertisements, function($i, $v){\n $chtml+='
';\n $chtml+=' ';\n $chtml+='
';\n });\n libs.checkImageLoad($($chtml).find('img'), function(){\n $banners.width($widget.width());\n $banners.html($chtml).promise().done(function(){\n $banners.on('init', function () {\n $banners.find('.open-url').unbind().click(function(){\n var $id = $(this).data('id');\n $.ajax({\n url: \"/myDashboard/myProfile/banners/visits\",\n method: \"POST\",\n cache: false,\n dataType: \"json\",\n data: {\n user_id: $userId,\n id:$id\n },\n success: function ($data) {\n if($data.data.advertisement_url){\n window.open($data.data.advertisement_url, '_blank', '');\n }\n }\n });\n });\n }).slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n autoplay: true,\n autoplaySpeed: 5000,\n arrows: false,\n dots: false,\n pauseOnHover: false\n });\n });\n });\n }\n }\n });\n },\n lounge_ads_location:function(cback){\n cback({\n 'ads':$(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .lounge-ads\")\n });\n },\n //Follow Lounges\n lounge_follow_container:function($chtml){\n libs.checkImageLoad($($chtml).find('img'), function(){\n $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .follow-lounges\").html($chtml);\n });\n },\n //Invite Collegues\n invite_colleagues_engine:function($config){\n var $colleagues = $config.colleagues;\n $colleagues.unbind().click(function(){\n $.ajax({\n url: \"/myDashboard/myProfile/invite/preview\",\n method: \"POST\",\n cache: false,\n dataType: \"html\",\n data: {user_id: libs.memoryGet('user_id')},\n success: function ($chtml) {\n libs.expire($chtml);\n nurseslounge_myDashboard_myProfile.invite_colleagues_modal($chtml);\n }\n });\n });\n },\n invite_colleagues_modal:function($chtml){\n var $modal = $(\"#nurseslounge-invite-colleagues-modal\");\n var $colleaguesInput = $modal.find(\"input[name='colleagues']\");\n var $sendInviteList = $modal.find(\".send-invite-list\");\n var $preview = $modal.find(\".preview\");\n var $form = $modal.find(\"form\");\n $colleaguesInput.unbind();\n var $multiEmail = $colleaguesInput.unbind().multiEmail({\n delete: true,\n target:$sendInviteList,\n model:'' +\n '
  • ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
  • ',\n removeEle:'.email-remove',\n emailSend:'.email-send',\n ajax:{\n method:'POST',\n url:'/myDashboard/myProfile/invite/exist',\n data:{\n user_id:libs.memoryGet('user_id')\n },\n dataType:'json'\n },\n callback:function($emails){\n var $userId = libs.memoryGet('user_id');\n nurseslounge_myDashboard_myProfile.invite_colleagues_request($emails, function () {\n if(window.location.pathname == '/myDashboard/activity') {\n nurseslounge_myDashboard_accountSettings.coins({user_id:$userId});\n nurseslounge_myDashboard_activity.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/colleagues') {\n nurseslounge_myDashboard_accountSettings.coins({user_id:$userId});\n nurseslounge_myDashboard_colleagues.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n $multiEmail.delete();\n //$modal.modal('hide');\n });\n }\n });\n $sendInviteList.html('');\n $multiEmail.delete();\n $multiEmail.selector;\n $form.unbind().submit(function ($e) {\n $e.preventDefault();\n if($colleaguesInput.val() != ''){\n var $event = $.Event(\"keydown\",{keyCode:32});\n $colleaguesInput.trigger($event);\n }\n });\n nurseslounge_myDashboard_myProfile.invite_colleagues_autocomplete(\n $colleaguesInput,\n {\n user_id:libs.memoryGet('user_id')\n },\n '/myDashboard/allUsers/get'\n );\n $preview.html($chtml).promise().done(function(){\n $modal.modal('show');\n });\n },\n invite_colleagues_autocomplete:function($target, $data, $url, cback){\n try {\n $($target).autocomplete(\"destroy\");\n }catch (e) {\n }\n var $value = '';\n var $longName = [];\n $($target).autocomplete({\n minLength\t:2,\n search\t\t: function(){\n $(this).addClass(\"ui-autocomplete-loading\");\n },\n open \t\t: function(){\n $(this).removeClass(\"ui-autocomplete-loading\");\n },\n source: function(request, response) {\n $.ajax({\n method: 'POST',\n url:$url,\n data:$.extend({},{\n search:$($target).val()\n }, $data),\n dataType: \"json\",\n success: function($data){\n libs.expire($data);\n $value = '';\n response($data.data.emails);\n }\n });\n },\n create:function(){\n $(this).prev().remove();\n $(this).trigger(\"keypress.autocomplete\");\n },\n select: function (event, ui) {\n $value = ui.item.value;\n $(this).val($value);\n cback($value);\n return false;\n }\n }).keypress(function ($e) {\n if ($e.which == 13) {\n cback($(this).val());\n $(this).autocomplete(\"close\");\n }\n });\n },\n invite_colleagues_request:function($emails, cback){\n $.ajax({\n url: \"/myDashboard/myProfile/invite/colleagues\",\n method: \"POST\",\n cache: false,\n dataType: \"json\",\n data: {\n user_id: libs.memoryGet('user_id'),\n emails: $emails\n },\n success: function ($data) {\n libs.expire($data);\n cback();\n }\n });\n },\n //Recommended Friends\n recommended_friends_container:function($chtml){\n if($chtml == ''){\n $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .invite-colleagues\").parents('.card:first').remove();\n return false;\n }\n libs.checkImageLoad($($chtml).find('img'), function(){\n $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .invite-colleagues\").html($chtml).promise().done(function(){\n $(this).find(\".open-profile\").unbind().click(function(){\n var $guestId = $(this).data('id');\n router.navigate('/profile/'+$guestId);\n });\n $(this).find(\".send-friend-request\").unbind().click(function($e){\n $e.stopPropagation();\n var $li = $(this).parents('li:first');\n var $toUserId = $li.data('id');\n var $name = $li.data('name');\n var $url = $li.data('url');\n nurseslounge_myDashboard_colleagues.colleagues_invitation_modal($url, $name, function($ok){\n if($ok){\n $li.fadeOut().remove();\n var $params = {user_id:libs.memoryGet('user_id'),to_user_id:$toUserId, status_id:1};\n nurseslounge_myDashboard_colleagues.colleagues_home_set($params, function () {\n nurseslounge_myDashboard_colleagues.init($params);\n });\n }\n });\n });\n });\n });\n },\n //Profile Is Complete Engine\n profile_is_complete:function($params, $isDashboardSetting, cback){\n var $chtml = '';\n var $modal = $(\"#nurseslounge-home-my-profile-edit-modal\");\n var $modalTitle = $modal.find('.modal-title');\n nurseslounge_myDashboard_myProfile.profile_is_complete_request($params, function($data){\n nurseslounge_myDashboard_myProfile.previous_pop_up($data, $isDashboardSetting, function(){\n if($isDashboardSetting){\n $modal.unbind().on('hide.bs.modal', function () {\n if($modalTitle.data('tour') == 1){\n nurseslounge_lounges_tour.init({profile_id:$data.data.profile_id});\n }\n });\n $chtml = '' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    Dashboard Settings
    ' +\n '
    ' +\n '
    ' +\n ' This information is private. We will not give or sell this information to a third party. We use this information to deliver accurate and relevant content to your dashboard.' +\n '
    ' +\n '
    ';\n libs.checkImageLoad($($chtml).find('img'), function(){\n $modalTitle.html($chtml).promise().done(function(){\n if(cback != undefined){\n $modalTitle.data('tour', 0);\n cback();\n }else{\n if($data.data.zip_code == null){\n $modalTitle.data('tour', 1);\n nurseslounge_myDashboard_myProfile.user_profile_fill($params, $isDashboardSetting);\n nurseslounge_myDashboard_myProfile.profile_events($params);\n }\n }\n });\n });\n }else{\n $chtml = '' +\n '
    Edit Profile Overview
    ';\n libs.checkImageLoad($($chtml).find('img'), function(){\n $modalTitle.html($chtml).promise().done(function(){\n if(cback != undefined){\n $modalTitle.data('tour', 0);\n cback();\n }\n });\n });\n }\n });\n });\n },\n profile_is_complete_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/isComplete\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Previous PopUp\n previous_pop_up:function($data, $isDashboardSetting, execute){\n var $profileId = $data.data.profile_id;\n var $firstTime = $data.data.first_time;\n var $modal = $(\"#nurseslounge-welcome-modal\");\n var $modalBody = $modal.find('.modal-body');\n var $modalInfo = $modalBody.find('.modal-info');\n var $chtml = '';\n if($firstTime == 1 && $isDashboardSetting){ //Non nurse\n if($profileId == 1 || $profileId == 2){\n $chtml = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '

    Your Privacy is Important to Us

    ' +\n '

    We will never sell or give your information to third parties.' +\n ' No one on Nurses Lounge has access to your information or can contact you directly.' +\n ' We use your information to deliver relevant and accurate content to your dashboard.

    ' +\n '
    ' +\n '

    Own Your Organization’s Lounge Page

    ' +\n '

    If you want to share jobs, events, hiring incentives, news and other information with nurses then you must be an owner of your organization’s Lounge page.' +\n ' Get started and you can search for your organization’s page to complete the form and become an owner.' +\n ' Only schools, employers and professional nurse associations can have Lounge pages.

    ' +\n '
    ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ';\n }else{\n $chtml = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '

    Your Privacy is Important to Us

    ' +\n '

    We will never sell or give your information to third parties.' +\n ' No one on Nurses Lounge has access to your information or can contact you directly.' +\n ' We use your information to deliver relevant and accurate content to your dashboard.

    ' +\n '
    ' +\n '

    Anonymous Ratings & Reviews

    ' +\n '

    Your experiences as a nurse matter.' +\n ' Rate past and present employers as well as nursing programs 1 to 5 stars.' +\n ' Leave an optional review to describe your experiences.' +\n ' Your ratings and reviews are 100% anonymous. Organizations can not see who created them.

    ' +\n '
    ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ';\n }\n $modalInfo.html($chtml).promise().done(function(){\n var $agreeCheckbox = $modalInfo.find('input[name=\"agree\"]');\n var $startBtn = $modalInfo.find('.start-btn');\n $agreeCheckbox.unbind().click(function(){\n if($agreeCheckbox.is(':checked')){\n $startBtn.unbind().click(function(){\n $modal.on('hidden.bs.modal', function ($e) {\n execute();\n }).modal('hide');\n });\n $startBtn.prop('disabled', false);\n }else{\n $startBtn.prop('disabled', true);\n }\n });\n $modal.modal('show');\n });\n }else{\n execute();\n }\n },\n //Task Container\n task_list_container:function(cback){\n var $modal = $(\"#nurseslounge-home-myinbox-no-task\");\n var $container = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right\");\n var $noThank = $container.find(\".no-thank\");\n var $params = {user_id:libs.memoryGet('user_id')};\n $noThank.unbind().click(function(){\n var $keepIt = $modal.find(\".keep-it\");\n var $dissmisIt = $modal.find(\".dismiss-it\");\n $keepIt.unbind().click(function(){\n $modal.modal('hide');\n });\n $dissmisIt.unbind().click(function(){\n nurseslounge_myDashboard_myProfile.task_list_container_request($params, function($data){\n $modal.modal('hide');\n });\n });\n $modal.modal('show');\n });\n cback($container);\n },\n //Task Engine\n task_list_container_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/dismissList\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(window.location.pathname == '/myDashboard/myProfile') {\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/activity') {\n nurseslounge_myDashboard_activity.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/colleagues') {\n nurseslounge_myDashboard_colleagues.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n cback($data);\n }\n });\n },\n task_list:function($container, $params){\n var $taskListContainer = $container.find('.task-list-container:first');\n var $cardTitle = $taskListContainer.find('.card-title:first');\n var $taskListList = $taskListContainer.find('.task-list:first');\n var $forOwners = null;\n var $show = null;\n nurseslounge_myDashboard_myProfile.task_list_request($params, function($data){\n var $chtml = '';\n $forOwners = $data && $data.data && $data.data.task_list && $data.data.task_list[0] ? $data.data.task_list[0].for_owners : 0;\n var $progress = $data.data.progress;\n var $taskList = $data.data.task_list;\n if($taskList.length > 0){\n if($progress != 100){\n $.each($taskList, function($i, $v){\n if($v.status){\n $chtml+= '
  • '+$v.task+'
  • ';\n }else{\n $chtml+= '
  • '+$v.task+'
  • ';\n }\n });\n if($forOwners == 1){\n $cardTitle.html('' +\n 'Monthly Progress' +\n '

    ' +\n ' Complete the tasks to maximize reach to nurse dashboards. Tasks reset each month. ' +\n '

    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n $progress+ '%' +\n ' ' +\n '
    ' +\n '
    ' +\n '');\n $show = true;\n }\n if($forOwners == 0){\n $cardTitle.html('' +\n 'Getting Started' +\n '

    ' +\n ' Here are few tasks to help you get started. Click on the tasks below to watch videos.' +\n '

    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n $progress+ '%' +\n ' ' +\n '
    ' +\n '
    ' +\n '');\n $show = true;\n }\n }else{\n if($forOwners == 1){\n $cardTitle.html(\n 'Congratulations!' +\n '

    ' +\n ' You have completed all monthly tasks. Keep creating content to extend your reach even more! ' +\n '

    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n $progress+ '%' +\n ' ' +\n '
    ' +\n '
    ' +\n '');\n $show = true;\n }\n if($forOwners == 0){\n $show = false;\n }\n }\n $taskListList.html($chtml).promise().done(function(){\n nurseslounge_myDashboard_myProfile.task_list_events($container, $params);\n if($show == true){\n $taskListContainer.fadeIn();\n }\n if($show == false || $chtml == ''){\n $taskListContainer.hide();\n }\n });\n }\n });\n },\n task_list_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/taskList\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n task_list_events:function($container, $params){\n var $taskList = $container.find('.task-list:first');\n var $taskListLi = $taskList.find('li');\n var $modal = $(\"#nurseslounge-home-tasklist-modal\");\n var $modalTitle = $modal.find(\".modal-title\");\n var $try = $modal.find('.try:first');\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $key = $params && $params.key ? $params.key : null;\n $taskListLi.unbind().click(function(){\n var $that = $(this);\n var $title = $that.data('title');\n var $id = $that.data('id');\n var $video = $that.data('video');\n var $loungeKey = $that.data('loungekey');\n var $loungeTypeId = $that.data('loungetypeid');\n switch($id){\n case 1:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id')};\n $modal.modal('hide');\n router.navigate('/myDashboard/myProfile');\n nurseslounge_myDashboard_myProfile.profile_is_complete($params, true, function(){\n nurseslounge_myDashboard_myProfile.user_profile_fill($params, true);\n nurseslounge_myDashboard_myProfile.profile_events($params);\n $(\"#nurseslounge-home-my-profile-edit-modal .change-password\").hide();\n });\n });\n break;\n case 2:\n case 3:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id'), tab:'review_init', key:$loungeKey}; $modal.modal('hide');\n router.navigate('/lounge/'+$loungeKey+'/ratingReviews');\n nurseslounge_lounge_ratingReviews.reviews_get($params, function($data){\n nurseslounge_lounge_overview.information_review($loungeTypeId, $params, $data, function(){\n libs.refreshBoxFrom('.review-box', $params, function(){\n nurseslounge_lounge_ratingReviews.init($params);\n $reviewModal.modal('hide');\n });\n });\n });\n });\n break;\n case 4:\n $try.unbind().click(function(){\n $modal.modal('hide');\n router.navigate('/myDashboard/jobsNearMe');\n });\n break;\n case 5:\n $try.unbind().click(function(){\n $modal.modal('hide');\n router.navigate('/myDashboard/degreesForMe');\n });\n break;\n case 6:\n $try.unbind().click(function(){\n $modal.modal('hide');\n router.navigate('/articles');\n });\n break;\n case 7:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id'), choose:'activity'};\n if($key != null){\n $params = $.extend({}, $params, {key:$key});\n }\n $modal.modal('hide');\n nurseslounge_myDashboard_myProfile.choose_lounge($params, function($loungeKey){\n router.navigate('/lounge/'+$loungeKey+'/activity');\n });\n });\n break;\n case 8:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id'), choose:'jobs'};\n if($key != null){\n $params = $.extend({}, $params, {key:$key});\n }\n $modal.modal('hide');\n nurseslounge_myDashboard_myProfile.choose_lounge($params, function($loungeKey, $loungeSection){\n router.navigate('/lounge/'+$loungeKey+'/'+$loungeSection);\n $params = {\n user_id:libs.memoryGet('user_id'),\n action:'info',\n tab:'jobs',\n key:$loungeKey\n };\n nurseslounge_lounge_nursingJobs.nursing_jobs_up_request($params, function($data){\n var $credential = $data && $data.data && $data.data.user_credential ? $data.data.user_credential : [];\n $credential = $credential.map(function($x){return parseInt($x);});\n var $allowTabs = {\n 'job_information': $.inArray(19, $credential) != -1 ? true : false,\n 'job_location': $.inArray(19, $credential) != -1 ? true : false\n };\n var $allowTabsFiltered = $allowTabs;\n $allowTabs = {};\n $.each($allowTabsFiltered, function($k, $v) {var $newObj = {};$newObj[$k]=$v;if($v){$.extend($allowTabs, $newObj);}});\n var $tab = null;\n $.each($allowTabs, function($i, $v){\n if($v){\n $tab = $i;\n return false;\n }\n });\n nurseslounge_job_jobDetail.information_request_select_tab('create', $tab, $allowTabs, $params, function () {\n $(\"#nurseslounge-job-information-edit-modal\").scrollTop(0);\n $(\"#nurseslounge-job-information-edit-modal\").modal('show');\n });\n });\n });\n });\n break;\n case 9:\n $try.unbind().click(function(){\n $modal.modal('hide');\n nurseslounge_myDashboard_myArticles.section = 'editor';\n router.navigate('/myDashboard/myArticles');\n });\n break;\n case 10:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id'), choose:'invite'};\n if($key != null){\n $params = $.extend({}, $params, {key:$key});\n }\n $modal.modal('hide');\n nurseslounge_myDashboard_myProfile.choose_lounge($params, function($loungeKey){\n router.navigate('/lounge/'+$loungeKey+'/overview');\n $params = {\n user_id:libs.memoryGet('user_id'),\n tab:'init',\n key:$loungeKey\n };\n nurseslounge_lounge_overview.information_lounge_get('init', $params, function($data){\n var $isEmployer = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 1 : false;\n var $isSchool = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 2 : false;\n var $credential = $data && $data.data && $data.data.user_credential ? $data.data.user_credential : [];\n $credential = $credential.map(function($x){return parseInt($x);});\n var $allowTabs = {\n 'information': $.inArray(7, $credential) != -1 ? true : false,\n 'otherNames': $.inArray(62, $credential) != -1 ? true : false,\n 'specialties': $.inArray(80, $credential) != -1 && $isSpecialty ? true : false,\n 'location': $.inArray(8, $credential) != -1 ? true : false,\n 'multimedia': $.inArray(9, $credential) != -1 ? true : false,\n 'virtualTour': $.inArray(83, $credential) != -1 ? true : false,\n 'recruiters': $.inArray(10, $credential) != -1 ? true : false,\n 'owners': $.inArray(11, $credential) != -1 ? true : false,\n 'jobs': $.inArray(12, $credential) != -1 && $isEmployer || $.inArray(12, $credential) != -1 && $isSchool ? true : false,\n 'import': $.inArray(13, $credential) != -1 && $isEmployer || $.inArray(13, $credential) != -1 && $isSchool ? true : false,\n 'api': $.inArray(13, $credential) != -1 && $isEmployer || $.inArray(13, $credential) != -1 && $isSchool ? true : false,\n 'statistics': $.inArray(14, $credential) != -1 ? true : false,\n 'degrees': $.inArray(17, $credential) != -1 && $isSchool ? true : false,\n 'invite': $.inArray(24, $credential) != -1 ? true : false,\n 'inviteStatistics': $.inArray(28, $credential) != -1 ? true : false,\n 'inviteTemplates': $.inArray(66, $credential) != -1 ? true : false,\n 'createLogo': $.inArray(67, $credential) != -1 ? true : false,\n 'buyAds': $.inArray(71, $credential) != -1 && $isSchool ? true : false,\n 'sponsorDegrees': $.inArray(75, $credential) != -1 && $isSchool ? true : false,\n 'spotlightJobs': $.inArray(77, $credential) != -1 && !$isSchool ? true : false,\n };\n var $allowTabsFiltered = $allowTabs;\n $allowTabs = {};\n $.each($allowTabsFiltered, function($k, $v) {var $newObj = {};$newObj[$k]=$v;if($v){$.extend($allowTabs, $newObj);}});\n var $tab = null;\n $.each($allowTabs, function($i, $v){\n if($v && $i == 'invite'){\n $tab = $i;\n return false;\n }\n });\n nurseslounge_lounge_overview.information_administrator_select_tab('edit', $tab, $allowTabs, $params, function () {\n $(\"#nurseslounge-lounge-information-edit-modal\").scrollTop(0);\n $(\"#nurseslounge-lounge-information-edit-modal\").modal('show');\n });\n });\n });\n });\n break;\n case 11:\n $try.unbind().click(function(){\n $modal.modal('hide');\n router.navigate('/myDashboard/colleagues');\n });\n break;\n case 12:\n $try.unbind().click(function(){\n $params = {user_id:libs.memoryGet('user_id'), choose:'needAnswer'};\n if($key != null){\n $params = $.extend({}, $params, {key:$key});\n }\n $modal.modal('hide');\n nurseslounge_myDashboard_myProfile.choose_lounge($params, function($loungeKey){\n router.navigate('/lounge/'+$loungeKey+'/ratingReviews');\n });\n });\n break;\n case 13:\n $try.unbind().click(function(){\n $modal.modal('hide');\n router.navigate('/lounge/'+$key+'/calendar');\n });\n break;\n case 14:\n $try.unbind().click(function(){\n $modal.modal('hide');\n $(\"#content .image-change\").click();\n });\n break;\n case 15:\n $try.unbind().click(function(){\n $modal.modal('hide');\n if(window.location.pathname == '/myDashboard/myProfile'){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $experience = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-experience:first');\n $experience.find(\".add-experience:first\").click();\n }else{\n router.navigate('/myDashboard/myProfile');\n }\n });\n break;\n case 16:\n $try.unbind().click(function(){\n $modal.modal('hide');\n if(window.location.pathname == '/myDashboard/myProfile'){\n var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n var $education = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-education:first');\n $education.find(\".edit-profile:first\").click();\n }else{\n router.navigate('/myDashboard/myProfile');\n }\n });\n break;\n }\n $modalTitle.html($title).promise().done(function(){\n $modal.unbind().on('shown.bs.modal', function(){\n nurseslounge_myDashboard_myProfile.task_list_open_youtube($id, $video);\n });\n $modal.modal('show');\n });\n });\n },\n task_list_open_youtube:function($id, $video){\n var $userId = libs.memoryGet('user_id');\n var $youtubePlayer;\n var $modal = $(\"#nurseslounge-home-tasklist-modal\");\n var $videoDiv = $modal.find('.video:first');\n $videoDiv.replaceWith('
    ');\n $videoDiv = $modal.find('.video:first');\n var $urlVideo = new URL($video);\n var $videoId = $urlVideo.searchParams.get('v');\n var $params = {id:$id, user_id:$userId};\n nurseslounge_myDashboard_myProfile.task_list_open_video_request($params, function(){\n $youtubePlayer = libs.memoryGet('youtubePlayer');\n if($youtubePlayer){\n $youtubePlayer.destroy();\n }\n try{\n $youtubePlayer = new YT.Player($videoDiv[0], {\n height: '360',\n width: '100%',\n videoId: $videoId,\n playerVars: {'autoplay': 1, 'controls': 1},\n events: {\n 'onReady': function () {\n $youtubePlayer.mute();\n $youtubePlayer.playVideoAt(0);\n },\n 'onError': function () {\n $videoDiv.hide();\n libs.memorySave('youtubePlayer', null);\n nurseslounge_myDashboard_myProfile.task_list_open_youtube($id, $video);\n }\n }\n });\n }catch ($e) {\n\n }\n libs.memorySave('youtubePlayer', $youtubePlayer);\n });\n },\n task_list_open_video_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/taskList/viewed\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(window.location.pathname == '/myDashboard/myProfile') {\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/activity') {\n nurseslounge_myDashboard_activity.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/colleagues') {\n nurseslounge_myDashboard_colleagues.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n cback($data);\n }\n });\n },\n choose_lounge:function($params, chosen){\n var $chooseLoungeModal = $(\"#nurseslounge-home-chooselounge-modal\");\n var $chooseLoungeModalBody = $chooseLoungeModal.find('.modal-body:first');\n var $chtml = '';\n nurseslounge_myDashboard_myProfile.choose_lounge_request($params, function($data){\n if($data.data.lounges.length > 1){\n $.each($data.data.lounges, function($i, $v){\n $chtml += '' +\n '
    ' +\n '
    ' +\n ' ' +\n ' \"lounge\"' +\n ' ' +\n '
    ' +\n '
    ' +\n '

    ' +\n ' '+$v.name+'' +\n '

    ' +\n '
    ' +\n '
    ';\n });\n $chooseLoungeModalBody.html($chtml).promise().done(function(){\n var $links = $chooseLoungeModalBody.find('.link');\n $links.unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n var $loungeTypeId = $that.data('loungetypeid');\n var $section = '';\n if($loungeTypeId != ''){\n switch ($loungeTypeId) {\n case 1:\n $section = 'nursingJobs';\n break;\n case 2:\n $section = 'nursingFacultyJobs';\n break;\n }\n }\n $chooseLoungeModal.modal('hide');\n chosen($key, $section);\n });\n $chooseLoungeModal.modal('show');\n });\n }else\n if($data.data.lounges.length == 1){\n var $lounge = $data.data.lounges[0];\n var $key = $lounge.key;\n var $section = '';\n var $loungeTypeId = $lounge.lounge_type_id;\n switch ($loungeTypeId) {\n case 1:\n $section = 'nursingJobs';\n break;\n case 2:\n $section = 'nursingFacultyJobs';\n break;\n }\n chosen($key, $section);\n }\n });\n },\n choose_lounge_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/chooseLounge/get\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(\n $data.status == 'success'\n ){\n cback($data);\n }\n }\n });\n },\n //Preview Profile\n preview_profile_container:function(cback){\n var $container = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right\");\n cback($container);\n },\n preview_profile:function($container, $params){\n var $previewContainer = $container.find('.preview-profile-container');\n var $previewProfile = $previewContainer.find('.preview-profile:first');\n $previewProfile.unbind().click(function(){\n var $that = $(this);\n var $previewProfile = $that.data('preview_profile');\n $params = $.extend({}, $params, {preview_profile:$previewProfile});\n nurseslounge_myDashboard_myProfile.preview_profile_request($params);\n });\n },\n preview_profile_request:function($params){\n $.ajax({\n url:\"/myDashboard/myProfile/setPreviewProfile\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n }\n });\n },\n //Profile Download PDF\n download_pdf_container:function(cback){\n var $container = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-right .download-profile\");\n cback($container);\n },\n download_pdf:function($container, $params){\n var $modal = $(\"#nurseslounge-lounge-myprofile-download-modal\");\n var $pdfContainer = $modal.find('.pdf-container');\n var $download = $modal.find('.download');\n $container.unbind().click(function(){\n $modal.modal('show');\n nurseslounge_myDashboard_myProfile.download_request($params, function($data){\n var $preview = $data.data.preview;\n if(PDFObject.supportsPDFs){\n PDFObject.embed($preview, $pdfContainer, {\n height: \"400px\",\n pdfOpenParams: {\n view:'FitH',\n scrollbars: '0',\n toolbar: '0',\n statusbar: '0',\n navpanes: '0',\n page:'1'\n }\n });\n } else {\n $pdfContainer.html('');\n }\n $download.unbind().click(function(){\n window.open($preview+'?download=1', '_blank');\n });\n });\n });\n },\n download_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/myProfile/preview\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Notification Link\n notification_link:function(){\n var $exist = nurseslounge_myDashboard_accountSettings.readCookie('myDashboardMyProfileLeftWrapper');\n if($exist == 1){\n $(\"#myDashboardMyProfileLeft-wrapper\").remove();\n }else{\n $(\"#myDashboardMyProfileLeft-wrapper .close\").unbind().click(function(){\n $(\"#myDashboardMyProfileLeft-wrapper\").remove();\n nurseslounge_myDashboard_accountSettings.createCookie('myDashboardMyProfileLeftWrapper',1,100);\n });\n }\n },\n //Spotlight\n spotlight_container:function(cback){\n var $container = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left .spotlight-wrapper\");\n cback($container);\n },\n spotlight:function($container, $params){\n var $chtml = '';\n nurseslounge_myDashboard_myProfile.spotlight_request($params, function($data){\n $.each($data.data.spotlight_jobs, function($i, $v){\n $chtml += nurseslounge_myDashboard_myProfile.spotlight_html($v);\n });\n libs.checkImageLoad($($chtml).find('img'), function () {\n $container.html($chtml).promise().done(function () {\n var $item = $container.find('.item');\n $item.unbind().click(function () {\n var $that = $(this);\n var $id = $that.data('id');\n $params = $.extend({}, $params, {'id': $id});\n nurseslounge_myDashboard_myProfile.spotlight_clicks_request($params, function ($data) {\n var $spotlightJob = $data.data.spotlight_job\n var $modal = $(\"#nurseslounge-myDashboard-spotlight-job-modal\");\n var $image = $modal.find('.image');\n var $facilityName = $modal.find('label[name=\"facilityName\"]');\n var $cityState = $modal.find('label[name=\"cityState\"]');\n var $title = $modal.find('label[name=\"title\"]');\n var $shift = $modal.find('label[name=\"shift\"]');\n var $signingBonus = $modal.find('label[name=\"signingBonus\"]');\n var $compensation = $modal.find('label[name=\"compensation\"]');\n var $contactEmailUrl = $modal.find('label[name=\"contactEmailUrl\"]');\n $modal.on('hidden.bs.modal',function($e){\n $image.attr('src', '/bimg/NursesLounge/loader.gif');\n $facilityName.html('');\n $cityState.html('');\n $title.html('');\n $shift.html('');\n $signingBonus.html('');\n $compensation.html('');\n $contactEmailUrl.html('');\n }).modal('hide');\n $image.attr('src', $spotlightJob.lounge.logo_root_lounge);\n $title.html($spotlightJob.title);\n $facilityName.html($spotlightJob.facility_name);\n $cityState.html($spotlightJob.city_state);\n $shift.html($spotlightJob.shift);\n $signingBonus.html($spotlightJob.signing_bonus);\n $compensation.html($spotlightJob.compensation);\n if($spotlightJob.contact_is_email){\n $contactEmailUrl.html(''+$spotlightJob.contact_email_url+'');\n }else{\n $contactEmailUrl.html(''+$spotlightJob.contact_email_url+'');\n }\n $modal.modal('show');\n });\n });\n var $close = $container.find('.close');\n $close.each(function(){\n var $that = $(this);\n var $id = $that.data('id');\n var $exist = nurseslounge_myDashboard_accountSettings.readCookie('spotlight'+$id);\n if($exist == 1){\n $that.parents('.item:first').remove();\n }else{\n $that.unbind().click(function(){\n $that.parents('.item:first').remove();\n nurseslounge_myDashboard_accountSettings.createCookie('spotlight'+$id,1,100);\n });\n }\n });\n });\n });\n });\n },\n spotlight_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/spotlightJobs\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n\n },\n spotlight_html:function($v){\n var $chtml = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' X Close' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n\n return $chtml;\n },\n spotlight_clicks_request:function($params, cback){\n $.ajax({\n url:\"/myDashboard/myProfile/spotlightClicks\",\n method: \"POST\",\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n\n },\n //Coins\n coin_list_original:[],\n coin_list:function($params, $original, cback){\n nurseslounge_myDashboard_myProfile.coin_list_request($params, function($data){\n var $coinsListIds = $data.data.coins_list_ids;\n if($original){\n nurseslounge_myDashboard_myProfile.coin_list_original = $coinsListIds;\n }\n var $coinsEvents = $data.data.coins_events;\n $('.coin-event').each(function($i, $v){\n var $that = $(this);\n var $id = $that.data('id');\n if($.inArray($id, $coinsListIds) == -1){\n $that.show();\n }else{\n $that.hide();\n }\n });\n if(cback != undefined){\n cback($coinsEvents);\n }\n });\n },\n coin_list_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/coin/list\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n coin_events:function($params, $eventsIds){\n $.each($eventsIds, function($i, $v){\n $(\".coin-event[data-id='\"+$v.id+\"']\").click(function(){\n var $that = $(this);\n nurseslounge_myDashboard_myProfile.coin_popup($that, $v, function($that, $event){\n switch($event.id){\n case 3:\n //var $profileLeft = $(\"#nurseslounge-home-my-profile .nurseslounge-home-my-profile-left:first\");\n //var $profile = $profileLeft.find('.nurseslounge-home-my-profile-left-profile-info:first');\n //$profile.find(\".edit-profile:first\").click();\n //var $modal = $(\"#nurseslounge-home-my-profile-edit-modal\");\n //$modal.unbind().on('hidden.bs.modal', function () {\n nurseslounge_myDashboard_myProfile.coin_list($params, false, function(){\n nurseslounge_myDashboard_myProfile.create_coin($params, $that, 1, $event.coins_number, function(){\n alert(\"\");\n });\n });\n //});\n break;\n }\n });\n });\n });\n },\n coin_popup:function($that, $event, cback){\n var $width = $(document).width();\n var $height = $(window).height();\n var $limitTop = ($height/2);\n var $limitLeft = ($width/2) - ($width/4);\n var $limitRight = $limitLeft + ($width/2);\n var $obLeft = $that.offset().left;\n var $obRight = $width - $that.offset().left;\n var $top = $that.offset().top;\n var $windowScrollTop = $(window).scrollTop();\n var $objTop = $top - $windowScrollTop;\n var $zPosition;\n if($limitTop > $objTop){\n $top = $top + 20;\n }else{\n $top = $top - 80;\n }\n //$('body').append('
    ');\n //$('body').append('
    ');\n $(\".show-coin-info\").remove();\n var $limitRightObj = $obLeft - $limitRight;\n var $limitLeftObj = $obLeft - $limitLeft;\n var $cloRight = $limitRightObj < 0 ? ($limitRightObj * -1) : $limitRightObj;\n var $cloLeft = $limitLeftObj < 0 ? ($limitLeftObj * -1) : $limitLeftObj;\n var $xPosition;\n var $position;\n if($cloRight > $cloLeft){\n $xPosition = 'left';\n if($limitRightObj < 0){\n $position = 'left';\n $obLeft = $obLeft + 14;\n }else{\n $position = 'right';\n $obLeft = $obLeft + 14;\n }\n }else{\n $xPosition = 'right';\n if($limitRightObj < 0){\n $position = 'left';\n $obLeft = $obLeft - 100;\n }else{\n $position = 'right';\n $obLeft = $obLeft - 100;\n }\n }\n var $direction = ['right', 'left', 'alternate'];\n var $index = Math.floor(Math.random() * 3);\n var $coinWrapper = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n var $unique = libs.getUniqueId();\n var $chtml = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' +' +\n ' '+$event.coins_number+'' +\n '
    ' +\n '
    ' +\n $coinWrapper +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ';\n $('body').append($chtml).promise().done(function(){\n $(\"#\"+$unique+\" .get-coins\").unbind().click(function(){\n $(\"#\"+$unique).hide();\n if(cback != undefined){\n cback($that, $event);\n }\n });\n });\n },\n coin_exist:function($params, cback){\n $.ajax({\n url: \"/myDashboard/coin/event/get\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n create_coin:function($params, $that, $from, $to, cback){\n var $chtml = ''\n var $direction = ['right', 'left', 'alternate'];\n var $index = Math.floor(Math.random() * 3);\n $chtml += '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n var $unique = libs.getUniqueId();\n var $ele = '
    '+$chtml+'
    ';\n //var $width = $(document).width();\n //var $limitLeft = ($width/2) - ($width/4);\n //var $limitRight = $limitLeft + ($width/2);\n //$('body').append('
    ');\n //$('body').append('
    ');\n //var $target = ($limitRight - $limitLeft);\n //$target = Math.floor(Math.random() * $target);\n //$target = $target + $limitLeft;\n //$('body').append('
    ');\n $that.append($ele).ready(function(){\n var $targetCoins = $(\".target-coins\");\n var $targetTop = $targetCoins.offset().top;\n var $targetLeft = $targetCoins.offset().left;\n $(\"#\"+$unique).animate({\n top: \"-=100\",\n zoom: '1',\n opacity: 0\n }, 1000, function() {\n if($from < $to){\n $from = $from+1;\n setTimeout(function(){\n nurseslounge_myDashboard_myProfile.create_coin($params, $that, $from, $to, cback);\n }, Math.floor(Math.random() * 2) * 500);\n }else{\n if(cback != undefined){\n cback();\n }\n }\n });\n });\n },\n};\n","var nurseslounge_myDashboard_accountSettings = {\n init:function($params){\n $('.offcanvas-collapse').removeClass('open');\n $(\"footer\").show();\n var $userId = libs.memoryGet('user_id');\n $params = $.extend({}, $params, {user_id:$userId});\n if($userId != 'guest') {\n nurseslounge_myDashboard_accountSettings.menu($params);\n nurseslounge_myDashboard_accountSettings.coins($params);\n nurseslounge_myDashboard_accountSettings.shop($params);\n }\n nurseslounge_myDashboard_thoughtLeadersForm.init($params);\n nurseslounge_myDashboard_manageMyCompany.init($params);\n nurseslounge_myDashboard_accountSettings.mobile();\n },\n menu:function($params){\n var $topNav = $(\"#topNav\");\n var $deleteMyAccountModal = $(\"#nurseslounge-home-delete-my-account-modal\");\n var $accountSettingModal = $(\"#nurseslounge-home-configuration-modal\");\n var $password = $accountSettingModal.find('input[name=\"password\"]');\n var $rePassword = $accountSettingModal.find('input[name=\"re_password\"]');\n var $accountSettings = $topNav.find('.account-settings:first');\n var $dashboardSettings = $topNav.find('.dashboard-settings:first');\n var $deleteMyAccount = $topNav.find('.delete-my-account:first');\n var $logoutSettings = $topNav.find('.logout-settings:first');\n var $administratorSettings = $topNav.find('.administrator-settings:first');\n $administratorSettings.unbind().click(function(){\n window.location = '/administrator';\n });\n $logoutSettings.unbind().click(function(){\n window.location = '/logout';\n });\n $dashboardSettings.unbind().click(function(){\n nurseslounge_myDashboard_myProfile.profile_is_complete($params, true, function(){\n nurseslounge_myDashboard_myProfile.user_profile_fill($params, true);\n });\n });\n $accountSettings.unbind().click(function () {\n nurseslounge_myDashboard_accountSettings.configuration_dashboard_getSet($params, function ($data) {\n //var $switchTalentPool = $data.data.switch.talent_pool;\n var $emailNotifications = $data.data.switch.unsubscribe_email_notifications == 0 ? 'On' : 'Off';\n var $notificationsWindow = $data.data.switch.disable_notifications_window == 0 ? 'On' : 'Off';\n var $notificationsSound = $data.data.switch.disable_notifications_sound == 0 ? 'On' : 'Off';\n var $disableDismissList = $data.data.switch.disable_dismiss_list == 0 ? 'Off' : 'On';\n var $digestEmail = $data.data.switch.digest_email == 0 ? 'Off' : 'On';\n //var $talentPool = $data.data.talent_pool;\n var $values = $data.data.values;\n var $catalogsLength = Object.keys($data.data.catalogs).length;\n var $index = 0;\n $.each($data.data.catalogs, function ($i, $v) {\n $index++;\n var $name = libs.snakeToCamel($i);\n var $chtml = '';\n $.each($v, function ($sI, $sV) {\n if ($data.data.selected[$i] == $sI) {\n $chtml += '';\n } else {\n $chtml += '';\n }\n });\n if ($catalogsLength > $index) {\n $accountSettingModal.find('form select[name=\"' + $name + '\"]').html($chtml);\n } else {\n $accountSettingModal.find('form select[name=\"' + $name + '\"]').html($chtml).promise().done(function () {\n $accountSettingModal.find('form input[name=\"email\"]').val($values.email);\n //$accountSettingModal.find('form input[name=\"talentPoolEnable\"]').prop('checked', $switchTalentPool != 0);\n $accountSettingModal.find('#emailNotificationsEnable' + $emailNotifications).prop(\"checked\", true);\n $accountSettingModal.find('#notificationsWindow' + $notificationsWindow).prop('checked', true);\n $accountSettingModal.find('#notificationsSound' + $notificationsSound).prop('checked', true);\n $accountSettingModal.find('#disableDismissList' + $disableDismissList).prop('checked', true);\n $accountSettingModal.find('#digestEmail' + $digestEmail).prop('checked', true);\n var $digestEmailInput = $accountSettingModal.find('input[name=\"digestEmail\"]');\n var $digestEmailSchedulesWrapper = $accountSettingModal.find(\".digest-email-schedules-wrapper\");\n var $digestEmailSchedules = $accountSettingModal.find('select[name=\"digestEmailSchedules\"]');\n var $digestEmailScheduleDaysWrapper = $accountSettingModal.find(\".digest-email-schedule-days-wrapper\");\n var $digestEmailScheduleStartAtWrapper = $accountSettingModal.find(\".digest-email-schedule-start-at-wrapper\");\n var $digestEmailScheduleTimeZone = $accountSettingModal.find('select[name=\"digestEmailScheduleTimeZone\"]');\n var $digestEmailScheduleTimeZoneWrapper = $accountSettingModal.find(\".digest-email-schedule-time-zone-wrapper\");\n var $digestEmailScheduleWeeklyWrapper = $accountSettingModal.find(\".digest-email-schedule-weekly-wrapper\");\n var $digestEmailScheduleWeeklyInput = $digestEmailScheduleWeeklyWrapper.find('input[name=\"digestEmailScheduleWeekly\"]');\n var $weeklyDays = $digestEmailScheduleWeeklyWrapper.find('.weekly_days');\n var $timeZoneChtml = '' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n\n\n var $digestEmailSchedulesVal = $digestEmailSchedules.val();\n $digestEmailInput.unbind().change(function(){\n var $that = $(this);\n $digestEmailSchedulesWrapper.hide();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.hide();\n $digestEmailScheduleStartAtWrapper.hide();\n if($that.val() == 'on'){\n switch($digestEmailSchedulesVal){\n case 'daily':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'weekly':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_2_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_3_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_4_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n }\n }\n });\n\n\n $digestEmailSchedules.unbind().change(function(){\n var $that = $(this);\n $digestEmailSchedulesWrapper.hide();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.hide();\n $digestEmailScheduleStartAtWrapper.hide();\n switch($that.val()){\n case 'daily':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'weekly':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_2_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_3_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_4_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n }\n }).change();\n\n\n var $digestEmailScheduleDays = $values.digest_email_schedule_days ? $values.digest_email_schedule_days : [];\n if($digestEmailScheduleDays){\n $weeklyDays.prop('checked', false);\n $.each($digestEmailScheduleDays, function($i, $v){\n $digestEmailScheduleWeeklyWrapper.find(\".weekly_days[data-value='\"+$v+\"']\").prop('checked', true);\n });\n }else{\n $weeklyDays.prop('checked', false);\n }\n $weeklyDays.unbind().change(function(){\n var $weeklySelectedDays = [];\n $weeklyDays.each(function(){\n var $that = $(this);\n var $val = $that.data('value');\n if($that.prop('checked')){\n $weeklySelectedDays.push($val);\n }\n });\n $digestEmailScheduleWeeklyInput.val($weeklySelectedDays.join(','));\n }).change();\n\n $digestEmailScheduleTimeZone.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n var $now = moment().tz($val);\n $digestEmailScheduleStartAtWrapper.html($timeZoneChtml).promise().done(function(){\n $(\"#digest-email-schedule-start-at-wrapper\").datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n });\n });\n var $digestEmailScheduleStartAt = $values.digest_email_schedule_start_at ? $values.digest_email_schedule_start_at : null;\n var $now = $digestEmailScheduleStartAt == null ? moment() : moment($digestEmailScheduleStartAt, 'H:mm A');\n $digestEmailScheduleStartAtWrapper.html($timeZoneChtml).promise().done(function(){\n $(\"#digest-email-schedule-start-at-wrapper\").datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n });\n\n if($digestEmail == 'On'){\n switch($digestEmailSchedulesVal){\n case 'daily':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'weekly':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_2_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_3_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n case 'every_4_weeks':\n $digestEmailSchedulesWrapper.show();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.show();\n $digestEmailScheduleTimeZoneWrapper.show();\n $digestEmailScheduleStartAtWrapper.show();\n break;\n }\n }else{\n $digestEmailSchedulesWrapper.hide();\n $digestEmailScheduleDaysWrapper.hide();\n $digestEmailScheduleWeeklyWrapper.hide();\n $digestEmailScheduleTimeZoneWrapper.hide();\n $digestEmailScheduleStartAtWrapper.hide();\n }\n //$accountSettingModal.find(\"form input[name='talentPoolPhoneNumber']\").val($talentPool.phone_number);\n //$accountSettingModal.find('form input[name=\"talentPoolZipCode\"]').val($talentPool.zip_code);\n nurseslounge_myDashboard_accountSettings.configuration_dashboard_validate(function ($form) {\n var $params = libs.getObjForm($form);\n $params = $.extend({},\n {action: 'update'},\n {user_id: libs.memoryGet('user_id')},\n $params,\n //{talentPoolEnable:$(\"#nurseslounge-home-configuration-modal form input[name='talentPoolEnable']\").prop('checked')},\n {emailNotificationsEnable: $(\"#emailNotificationsEnableOn\").prop('checked')},\n {notificationsWindow: $(\"#notificationsWindowOn\").prop('checked')},\n {notificationsSound: $(\"#notificationsSoundOn\").prop('checked')},\n {disableDismissList: $(\"#disableDismissListOn\").prop('checked')},\n {digestEmail: $(\"#digestEmailOn\").prop('checked')},\n {password:$password.val()}\n );\n if($password.val() != ''){\n if($password.val() == $rePassword.val()) {\n $params = $.extend({}, $params,\n {password:$password.val()}\n );\n }else{\n alert(\"The passwords not match\");\n return false;\n }\n }\n nurseslounge_myDashboard_accountSettings.configuration_dashboard_getSet($params, function () {\n $accountSettingModal.modal('hide');\n });\n });\n });\n $(\"#nurseslounge-home-configuration-modal form .cancel\").unbind().click(function () {\n $accountSettingModal.modal('hide');\n });\n $(\"#nurseslounge-home-configuration-modal select[name='followMe']\").unbind().change(function () {\n if ($(this).val() == 'all') {\n $(\"#nurseslounge-home-configuration-modal .followMe-txt\").show();\n } else {\n $(\"#nurseslounge-home-configuration-modal .followMe-txt\").hide();\n }\n });\n if ($(\"#nurseslounge-home-configuration-modal select[name='followMe']\").val() == 'all') {\n $(\"#nurseslounge-home-configuration-modal .followMe-txt\").show();\n } else {\n $(\"#nurseslounge-home-configuration-modal .followMe-txt\").hide();\n }\n $(\"#notificationsWindowOn\").unbind().click(function () {\n if ($(this).prop('checked') && \"Notification\" in window) {\n Notification.requestPermission();\n }\n });\n if ($(\"#notificationsWindowOn\").prop('checked') && \"Notification\" in window) {\n Notification.requestPermission();\n }\n $accountSettingModal.modal('show');\n }\n });\n });\n });\n $deleteMyAccount.unbind().click(function (){\n nurseslounge_myDashboard_accountSettings.configuration_delete_my_account_validate(function ($form) {\n var $params = libs.getObjForm($form);\n $params = $.extend({}, $params, {target:'password', user_id: libs.memoryGet('user_id')});\n nurseslounge_myDashboard_accountSettings.configuration_delete_my_account_request($params, function($data){\n var $validator = $(\"#nurseslounge-home-delete-my-account-modal form\").validate();\n var $errors;\n if($data.data.answer == 1){\n if(confirm(\"Changes cannot be reversed if this account is deleted\")) {\n $params = $.extend({}, $params, {target:'erase'});\n nurseslounge_myDashboard_accountSettings.configuration_delete_my_account_request($params, function($data){\n window.location = '/logout';\n });\n }\n } else {\n $errors = {\"password\": \"Invalid Password\"};\n }\n if($errors){\n $validator.showErrors($errors);\n }\n });\n });\n $deleteMyAccountModal.modal('show');\n });\n },\n configuration_dashboard_getSet:function($params, cback){\n $.ajax({\n url: \"/myDashboard/header/configuration/getSet\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if(window.location.pathname == '/myDashboard/myProfile') {\n nurseslounge_myDashboard_myProfile.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/activity') {\n nurseslounge_myDashboard_activity.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n if(window.location.pathname == '/myDashboard/colleagues') {\n nurseslounge_myDashboard_colleagues.task_list_container(function($container){\n nurseslounge_myDashboard_myProfile.task_list($container, {user_id:libs.memoryGet('user_id')});\n });\n }\n cback($data);\n }\n });\n },\n configuration_dashboard_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-configuration-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-configuration-modal form\").validate({\n onsubmit: true,\n ignore: \"*:not(.validate)\",\n debug: true,\n rules: {\n followMe: {\n required: true\n },\n myColleagues: {\n required: true\n },\n emailNotificationsEnable: {\n required: true\n },\n groupNotifications: {\n required: true\n },\n colleaguesNotifications: {\n required: true\n },\n publisherNotifications: {\n required: true\n },\n jobNotifications: {\n required: true\n },\n degreeProgramNotifications: {\n required: true\n },\n notificationsWindow: {\n required: true\n },\n notificationsSound:{\n required: true\n }\n },\n messages: {\n followMe: {\n required: \"The option selected is invalid\"\n },\n myColleagues: {\n required: \"The option selected is invalid\"\n },\n emailNotificationsEnable: {\n required: \"The email notification is required\"\n },\n groupNotifications: {\n required: \"The option selected is invalid\"\n },\n colleaguesNotifications: {\n required: \"The option selected is invalid\"\n },\n publisherNotifications: {\n required: \"The option selected is invalid\"\n },\n jobNotifications: {\n required: \"The option selected is invalid\"\n },\n degreeProgramNotifications: {\n required: \"The option selected is invalid\"\n },\n notificationsWindow: {\n required: \"The desktop notification is required\"\n },\n notificationsSound:{\n required: \"The sound notification is required\"\n }\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n configuration_delete_my_account_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-home-delete-my-account-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-home-delete-my-account-modal form\").validate({\n onsubmit: true,\n ignore: \"*:not(.validate)\",\n debug: true,\n rules: {\n password: {\n required: true\n }\n },\n messages: {\n password: {\n required: \"The password is required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n configuration_delete_my_account_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/header/delete/account\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Notifications\n notificationUpdate:function($notification){\n var $params = {category:'notifications', user_id:libs.memoryGet('user_id')};\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationBell = $notifications.find(\".notifications-bell:first\");\n var $notificationIcon = $notificationBell.find(\".notifications-icon:first\");\n if($notification.listen != $notification.viewed){\n $notificationBell.find(\".notifications-alert\").remove();\n $notificationIcon.after(''+($notification.listen-$notification.viewed)+'').ready(function(){\n nurseslounge_myDashboard_accountSettings.notificationTopNavEvents($params);\n });\n }else{\n $notificationBell.find(\".notifications-alert\").remove();\n nurseslounge_myDashboard_accountSettings.notificationTopNavEvents($params);\n }\n },\n inboxNotificationUpdate:function($notification){\n var $params = {category:'inboxNotifications', user_id:libs.memoryGet('user_id')};\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $inboxNotificationBell = $notifications.find(\".inbox-notifications-bell:first\");\n var $inboxNotificationIcon = $inboxNotificationBell.find(\".inbox-notification-icon:first\");\n if($notification.listen != $notification.viewed){\n $inboxNotificationBell.find(\".notifications-alert\").remove();\n $inboxNotificationIcon.after(''+($notification.listen-$notification.viewed)+'').ready(function(){\n nurseslounge_myDashboard_accountSettings.inboxNotificationTopNavEvents($params);\n });\n }else{\n $inboxNotificationBell.find(\".notifications-alert\").remove();\n nurseslounge_myDashboard_accountSettings.inboxNotificationTopNavEvents($params);\n }\n if(window.location.pathname == '/myDashboard/myInbox'){\n nurseslounge_myDashboard_myInbox.inbox_pagination({user_id:libs.memoryGet('user_id')});\n nurseslounge_myDashboard_myInbox.inbox_groups_pagination({user_id:libs.memoryGet('user_id')});\n }\n },\n\n notificationTopNavEvents:function($params){\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationBell = $notifications.find(\".notifications-bell:first\");\n var $notificationsContainer = $notifications.find(\".notifications-container:first .scroller-height:first\");\n $notificationBell.unbind().click(function(){\n if(!$notifications.hasClass('show') && $notificationsContainer.length == 1){\n $notificationsContainer.scrollTop(0);\n }\n libs.memorySave('needToView', -1);\n $notificationBell.find(\".notifications-alert\").remove();\n nurseslounge_myDashboard_accountSettings.notificationTopNavRequest($params);\n }).tooltip();\n nurseslounge_myDashboard_accountSettings.notificationLoad($params, true);\n },\n inboxNotificationTopNavEvents:function($params){\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $inboxNotificationBell = $notifications.find(\".inbox-notifications-bell:first\");\n var $inboxNotificationsContainer = $notifications.find(\".inbox-notifications-container:first .scroller-height:first\");\n $inboxNotificationBell.unbind().click(function(){\n if(!$notifications.hasClass('show') && $inboxNotificationsContainer.length == 1){\n $inboxNotificationsContainer.scrollTop(0);\n }\n libs.memorySave('needToViewInboxNotifications', -1);\n $inboxNotificationBell.find(\".notifications-alert\").remove();\n nurseslounge_myDashboard_accountSettings.notificationTopNavRequest($params);\n }).tooltip();\n nurseslounge_myDashboard_accountSettings.inboxNotificationLoad($params, true);\n },\n //For Both\n notificationTopNavRequest:function($params){\n $.ajax({\n url: \"/notifications/topNav/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n }\n });\n },\n notificationLoad:function($params, $withSound){\n var $notificationCookies = nurseslounge_myDashboard_accountSettings.readCookie('notificationCookies');\n $notificationCookies = $notificationCookies ? $notificationCookies.split(',') : [];\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationBell = $notifications.find(\".notifications-bell:first\");\n var $notificationsContainer = $notifications.find(\".notifications-container:first\");\n var $scrollerHeight = $notificationsContainer.find(\".scroller-height:first\");\n var $chtml = '';\n nurseslounge_myDashboard_accountSettings.notificationLoadMoreRequest($params, function($data){\n if($notificationsContainer.find('.notification').length == 0){\n var $dropdown = nurseslounge_myDashboard_accountSettings.notificationDropdown($data);\n $notificationBell.after($dropdown).ready(function(){\n var $numberOfNotifications = $($dropdown).find('.notification').length;\n var $firstNotification = $($dropdown).find('.notification:first');\n var $notificationId = $firstNotification.data('id');\n if($withSound && $notificationId != undefined && $numberOfNotifications == 1){\n if($.inArray($notificationId, $notificationCookies) == -1){\n nurseslounge_myDashboard_accountSettings.pushNotificationWithSound($data, $firstNotification[0].outerHTML);\n $notificationCookies.push($notificationId);\n nurseslounge_myDashboard_accountSettings.createCookie('notificationCookies',$notificationCookies.join(','),1);\n }\n }\n nurseslounge_myDashboard_accountSettings.notificationOpen($params);\n });\n }else{\n if($data.data.new_notifications.length > 0){\n var $newNotificationListenArr = [];\n var $newNotificationListenObj = {};\n var $newNotificationTag = $scrollerHeight.find(\".new-tag:first\");\n for(var $i in $data.data.new_notifications){\n $newNotificationListenArr.push($($data.data.new_notifications[$i]).data('id'));\n $newNotificationListenObj[$($data.data.new_notifications[$i]).data('id')] = $data.data.new_notifications[$i];\n }\n if($newNotificationTag.length == 0){\n $chtml = '

    New

    ';\n $scrollerHeight.prepend($chtml);\n $newNotificationTag = $scrollerHeight.find(\".new-tag:first\");\n }\n if($newNotificationTag.nextAll(\".notification\") != undefined) {\n $newNotificationTag.nextAll(\".notification\").each(function () {\n var $id = $(this).data('id');\n var $exist = $.inArray($id, $newNotificationListenArr) != -1;\n if ($exist) {\n delete $newNotificationListenObj[$id];\n }\n });\n }\n nurseslounge_myDashboard_accountSettings.notificationOrder($newNotificationListenObj, \".new-tag:first\", $withSound, $data,function(){\n nurseslounge_myDashboard_accountSettings.notificationOpen($params);\n });\n }\n if($data.data.old_notifications.length > 0){\n var $oldNotificationListenArr = [];\n var $oldNotificationListenObj = {};\n var $oldNotificationTag = $scrollerHeight.find(\".old-tag:first\");\n for(var $i in $data.data.old_notifications){\n $oldNotificationListenArr.push($($data.data.old_notifications[$i]).data('id'));\n $oldNotificationListenObj[$($data.data.old_notifications[$i]).data('id')] = $data.data.old_notifications[$i];\n }\n if($oldNotificationTag.length == 0){\n $chtml = '

    Old

    ';\n $scrollerHeight.append($chtml);\n $oldNotificationTag = $scrollerHeight.find(\".old:first\");\n }\n if($oldNotificationTag.nextAll(\".notification\") != undefined) {\n $oldNotificationTag.nextAll(\".notification\").each(function () {\n var $id = $(this).data('id');\n var $exist = $.inArray($id, $oldNotificationListenArr) != -1;\n if ($exist) {\n delete $oldNotificationListenObj[$id];\n }\n });\n }\n nurseslounge_myDashboard_accountSettings.notificationOrder($oldNotificationListenObj, \".old-tag:first\", false, $data,function(){\n nurseslounge_myDashboard_accountSettings.notificationOpen($params);\n });\n }\n }\n });\n },\n inboxNotificationLoad:function($params, $withSound){\n var $inboxNotificationCookies = nurseslounge_myDashboard_accountSettings.readCookie('inboxNotificationCookies');\n $inboxNotificationCookies = $inboxNotificationCookies ? $inboxNotificationCookies.split(',') : [];\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $inboxNotificationBell = $notifications.find(\".inbox-notifications-bell:first\");\n var $inboxNotificationsContainer = $notifications.find(\".inbox-notifications-container:first .scroller-height:first\");\n var $scrollerHeight = $inboxNotificationsContainer.find(\".scroller-height:first\");\n var $chtml = '';\n nurseslounge_myDashboard_accountSettings.notificationLoadMoreRequest($params, function($data){\n if($inboxNotificationsContainer.find('.notification').length == 0){\n var $dropdown = nurseslounge_myDashboard_accountSettings.inboxNotificationDropdown($data);\n $inboxNotificationBell.after($dropdown).ready(function(){\n var $numberOfNotifications = $($dropdown).find('.notification').length;\n var $firstNotification = $($dropdown).find('.notification:first');\n var $notificationId = $firstNotification.data('id');\n if($withSound && $notificationId != undefined && $numberOfNotifications == 1){\n if($.inArray($notificationId, $inboxNotificationCookies) == -1){\n nurseslounge_myDashboard_accountSettings.pushNotificationWithSound($data, $firstNotification[0].outerHTML);\n $inboxNotificationCookies.push($notificationId);\n nurseslounge_myDashboard_accountSettings.createCookie('inboxNotificationCookies',$inboxNotificationCookies.join(','),1);\n }\n }\n nurseslounge_myDashboard_accountSettings.inboxNotificationOpen($params);\n });\n }else{\n if($data.data.new_notifications.length > 0){\n var $newNotificationListenArr = [];\n var $newNotificationListenObj = {};\n var $newNotificationTag = $scrollerHeight.find(\".new-tag:first\");\n for(var $i in $data.data.new_notifications){\n $newNotificationListenArr.push($($data.data.new_notifications[$i]).data('id'));\n $newNotificationListenObj[$($data.data.new_notifications[$i]).data('id')] = $data.data.new_notifications[$i];\n }\n if($newNotificationTag.length == 0){\n $chtml = '

    New

    ';\n $scrollerHeight.prepend($chtml);\n $newNotificationTag = $scrollerHeight.find(\".new-tag:first\");\n }\n if($newNotificationTag.nextAll(\".notification\") != undefined) {\n $newNotificationTag.nextAll(\".notification\").each(function () {\n var $id = $(this).data('id');\n var $exist = $.inArray($id, $newNotificationListenArr) != -1;\n if ($exist) {\n delete $newNotificationListenObj[$id];\n }\n });\n }\n nurseslounge_myDashboard_accountSettings.inboxNotificationOrder($newNotificationListenObj, \".new-tag:first\", $withSound, $data, function(){\n nurseslounge_myDashboard_accountSettings.inboxNotificationOpen($params);\n });\n }\n if($data.data.old_notifications.length > 0){\n var $oldNotificationListenArr = [];\n var $oldNotificationListenObj = {};\n var $oldNotificationTag = $scrollerHeight.find(\".old-tag:first\");\n for(var $i in $data.data.old_notifications){\n $oldNotificationListenArr.push($($data.data.old_notifications[$i]).data('id'));\n $oldNotificationListenObj[$($data.data.old_notifications[$i]).data('id')] = $data.data.old_notifications[$i];\n }\n if($oldNotificationTag.length == 0){\n $chtml = '

    Old

    ';\n $scrollerHeight.append($chtml);\n $oldNotificationTag = $scrollerHeight.find(\".old:first\");\n }\n if($oldNotificationTag.nextAll(\".notification\") != undefined) {\n $oldNotificationTag.nextAll(\".notification\").each(function () {\n var $id = $(this).data('id');\n var $exist = $.inArray($id, $oldNotificationListenArr) != -1;\n if ($exist) {\n delete $oldNotificationListenObj[$id];\n }\n });\n }\n nurseslounge_myDashboard_accountSettings.inboxNotificationOrder($oldNotificationListenObj, \".old-tag:first\", false, $data,function(){\n nurseslounge_myDashboard_accountSettings.inboxNotificationOpen($params);\n });\n }\n }\n });\n },\n\n notificationOrder:function($obj, $notification, $withSound, $data, cback){\n var $notificationCookies = nurseslounge_myDashboard_accountSettings.readCookie('notificationCookies');\n $notificationCookies = $notificationCookies ? $notificationCookies.split(',') : [];\n for (var $i in $obj) {\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationTag = $notifications.find(\".notifications-container:first .scroller-height:first\").find($notification);\n var $existingNotifications = [];\n $notifications.find('.notification').each(function(){\n var $that = $(this);\n $existingNotifications.push($that.data('id'));\n });\n if($notificationTag.next(\".notification\").data('id') == undefined){\n $notificationTag.after($obj[$i]);\n delete $obj[$i];\n }else{\n $notificationTag.nextAll(\".notification\").each(function() {\n if(\n $i > $(this).data('id')\n ){\n $(this).before($obj[$i]);\n var $notificationId = $($obj[$i]).data('id');\n if(\n $withSound && $notificationId != undefined &&\n $.inArray($notificationId, $existingNotifications) == -1 &&\n $.inArray($notificationId, $notificationCookies) == -1\n ){\n nurseslounge_myDashboard_accountSettings.pushNotificationWithSound($data, $obj[$i]);\n $notificationCookies.push($notificationId);\n nurseslounge_myDashboard_accountSettings.createCookie('notificationCookies',$notificationCookies.join(','),1);\n }\n delete $obj[$i];\n }else{\n if(\n $i < $(this).data('id') &&\n $i > $(this).next(\".notification\").data('id') ||\n $i < $(this).data('id') &&\n $(this).next(\".notification\").data('id') == undefined\n ){\n $(this).after($obj[$i]);\n delete $obj[$i];\n }\n }\n });\n }\n }\n if(cback != undefined){\n cback();\n }\n },\n inboxNotificationOrder:function($obj, $notification, $withSound, $data, cback){\n var $inboxNotificationCookies = nurseslounge_myDashboard_accountSettings.readCookie('inboxNotificationCookies');\n $inboxNotificationCookies = $inboxNotificationCookies ? $inboxNotificationCookies.split(',') : [];\n for (var $i in $obj) {\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $notificationTag = $notifications.find(\".inbox-notifications-container:first .scroller-height:first\").find($notification);\n var $existingNotifications = [];\n $notifications.find('.notification').each(function(){\n var $that = $(this);\n $existingNotifications.push($that.data('id'));\n });\n if($notificationTag.next(\".notification\").data('id') == undefined){\n $notificationTag.after($obj[$i]);\n delete $obj[$i];\n }else{\n $notificationTag.nextAll(\".notification\").each(function() {\n if(\n $i > $(this).data('id')\n ){\n $(this).before($obj[$i]);\n var $notificationId = $($obj[$i]).data('id');\n if(\n $withSound && $notificationId != undefined &&\n $.inArray($notificationId, $existingNotifications) == -1 &&\n $.inArray($notificationId, $inboxNotificationCookies) == -1\n ){\n nurseslounge_myDashboard_accountSettings.pushNotificationWithSound($data, $obj[$i]);\n $inboxNotificationCookies.push($notificationId);\n nurseslounge_myDashboard_accountSettings.createCookie('inboxNotificationCookies',$inboxNotificationCookies.join(','),1);\n }\n delete $obj[$i];\n }else{\n if(\n $i < $(this).data('id') &&\n $i > $(this).next(\".notification\").data('id') ||\n $i < $(this).data('id') &&\n $(this).next(\".notification\").data('id') == undefined\n ){\n $(this).after($obj[$i]);\n delete $obj[$i];\n }\n }\n });\n }\n }\n if(cback != undefined){\n cback();\n }\n },\n\n //For Both\n notificationLoadMoreRequest:function($params, cback){\n $params = $.extend({}, $params, {user_id:libs.memoryGet('user_id')});\n $.ajax({\n url: \"/notifications/get\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n notificationDropdown:function($data){\n var $chtml = '';\n $chtml+='' +\n '
    ' +\n '

    Notifications

    '+\n '
    ';\n if($data.data.new_notifications.length > 0){\n $chtml+='' +\n '

    New

    ' + $data.data.new_notifications.join('');\n }\n if($data.data.old_notifications.length > 0){\n $chtml+='' +\n '

    Old

    ' + $data.data.old_notifications.join('');\n }\n $chtml+='' +\n '
    ' +\n '
    ';\n return $chtml;\n },\n inboxNotificationDropdown:function($data){\n var $chtml = '';\n $chtml+='' +\n '
    ' +\n '

    Messages

    '+\n '
    ';\n if($data.data.new_notifications.length > 0){\n $chtml+='' +\n '

    New

    ' + $data.data.new_notifications.join('');\n }\n if($data.data.old_notifications.length > 0){\n $chtml+='' +\n '

    Old

    ' + $data.data.old_notifications.join('');\n }\n $chtml+='' +\n '
    ' +\n '
    ';\n return $chtml;\n },\n createCookie:function($name,$value,$days) {\n var $expires;\n if ($days) {\n var $date = new Date();\n $date.setTime($date.getTime()+($days*24*60*60*1000));\n $expires = \"; expires=\"+$date.toGMTString();\n }else{\n $expires = \"\";\n }\n document.cookie = $name+\"=\"+$value+$expires+\"; path=/\";\n },\n readCookie:function($name) {\n var $nameEQ = $name + \"=\";\n var $ca = document.cookie.split(';');\n for(var $i=0;$i < $ca.length;$i++) {\n var $c = $ca[$i];\n while ($c.charAt(0)==' '){\n $c = $c.substring(1,$c.length);\n if ($c.indexOf($nameEQ) == 0){\n return $c.substring($nameEQ.length,$c.length);\n }\n }\n }\n return null;\n },\n pushNotificationWithSound:function($data, $pushNotification){\n if($pushNotification) {\n if (!$data.data.windows_disable && Notification.permission === \"granted\") {\n var $title = $($pushNotification).attr('title');\n var $text = $($pushNotification).find('.notify-txt:first').text();\n var $imgSrc = $($pushNotification).find('img:first').attr('src');\n var $url = $($pushNotification).data('url');\n var $notification = new Notification(\n $title,\n {\n body: $text,\n icon: $imgSrc,\n silent: true\n }\n );\n $notification.onclick = function () {\n router.navigate($url,true);\n };\n if(!$data.data.sounds_disable){\n var $audio = new Audio('/sounds/notification.mp3');\n $audio.play();\n }\n }\n }\n },\n\n notificationOpen:function($params){\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notification = $notifications.find(\".notifications-container:first .scroller-height:first .notification\");\n $notification.unbind().click(function(){\n var $that = $(this);\n var $notificationId = $that.data('id');\n var $notificationUrl = $that.data('url');\n $params = $.extend({}, $params, {notification_id:$notificationId});\n nurseslounge_myDashboard_accountSettings.notificationSet($params, function(){\n $that.find('.new-notification').remove();\n $that.addClass('opened');\n //router.navigate($notificationUrl,true);\n window.location = $notificationUrl;\n });\n });\n nurseslounge_myDashboard_accountSettings.notificationRealTime();\n nurseslounge_myDashboard_accountSettings.notificationScroll($params);\n },\n inboxNotificationOpen:function($params){\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $notification = $notifications.find(\".inbox-notifications-container:first .scroller-height:first .notification\");\n $notification.unbind().click(function(){\n var $that = $(this);\n var $notificationId = $that.data('id');\n var $notificationUrl = $that.data('url');\n if(\n window.location.pathname != '/myDashboard/myInbox'\n ) {\n $params = $.extend({}, $params, {notification_id:$notificationId});\n nurseslounge_myDashboard_accountSettings.notificationSet($params, function(){\n $that.find('.new-notification').remove();\n $that.addClass('opened');\n router.navigate($notificationUrl,true);\n });\n }\n });\n nurseslounge_myDashboard_accountSettings.inboxNotificationRealTime();\n nurseslounge_myDashboard_accountSettings.inboxNotificationScroll($params);\n },\n\n notificationRealTime:function(){\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationsContainer = $notifications.find(\".notifications-container:first\");\n var $notificationsIds = [];\n $notificationsContainer.find(\".timestamp\").each(function(){\n var $that = $(this);\n $notificationsIds.push($that.data('id'));\n });\n nurseslounge_myDashboard_accountSettings.setNotificationsDates($notificationsIds);\n nurseslounge_myDashboard_accountSettings.notificationsDate();\n },\n inboxNotificationRealTime:function(){\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $notificationsContainer = $notifications.find(\".inbox-notifications-container:first\");\n var $notificationsIds = [];\n $notificationsContainer.find(\".timestamp\").each(function(){\n var $that = $(this);\n $notificationsIds.push($that.data('id'));\n });\n nurseslounge_myDashboard_accountSettings.setInboxNotificationsDates($notificationsIds);\n nurseslounge_myDashboard_accountSettings.notificationsDate();\n },\n\n notifications_dates:[],\n inbox_notifications_dates:[],\n server_date_helper:null,\n server_date:null,\n notification_dates_binding:null,\n setInboxNotificationsDates:function($notificationsIds){\n this.inbox_notifications_dates = $notificationsIds;\n },\n getInboxNotificationsDates:function(){\n return this.inbox_notifications_dates;\n },\n setNotificationsDates:function($notificationsIds){\n this.notifications_dates = $notificationsIds;\n },\n getNotificationsDates:function(){\n return this.notifications_dates;\n },\n setServerDate:function($serverDate){\n this.server_date_helper = new Date();\n this.server_date = new Date($serverDate);\n },\n getServerDate:function(){\n var $now = new Date().getTime();\n var $diff = $now - this.server_date_helper.getTime();\n var $date = this.server_date.getTime() + $diff;\n return new Date($date);\n },\n notificationsDate:function(){\n $.ajax({\n url:window.location.protocol +'//'+ window.location.hostname + \"/\",\n method: \"GET\",\n cache:false,\n dataType: \"html\",\n success: function ($data, $status, $response) {\n var $dateString = $response.getResponseHeader('date');\n if ($dateString.indexOf('GMT')) {\n $dateString = $dateString.replace('GMT','');\n }\n nurseslounge_myDashboard_accountSettings.setServerDate($dateString);\n nurseslounge_myDashboard_accountSettings.notificationDateUpdate();\n }\n });\n },\n notificationDateUpdate:function(){\n var $refreshEverySeconds = 1;\n //Notifications\n var $now = nurseslounge_myDashboard_accountSettings.getServerDate().getTime();\n var $notificationDates = nurseslounge_myDashboard_accountSettings.getNotificationsDates();\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationsContainer = $notifications.find(\".notifications-container:first\");\n for(var $i in $notificationDates){\n var $key = $notificationDates[$i];\n var $ele = $notificationsContainer.find('.timestamp[data-id=\"'+$key+'\"]');\n var $val = $ele.data('notificationdate');\n if($ele.length > 0 && $val){\n var $newDate = $val.split(' ');\n var $yearMonthDay = $newDate[0];\n $yearMonthDay = $yearMonthDay.split('-');\n var $HourMinuteSecond = $newDate[1];\n $HourMinuteSecond = $HourMinuteSecond.split(':');\n var $date = new Date($yearMonthDay[0], $yearMonthDay[1] - 1, $yearMonthDay[2], $HourMinuteSecond[0], $HourMinuteSecond[1], $HourMinuteSecond[2]);\n var $second = $date.getSeconds();\n $second = $second <= 9 ? '0' + $second : $second;\n var $minute = $date.getMinutes();\n $minute = $minute <= 9 ? '0' + $minute : $minute;\n var $hour = $date.getHours();\n $hour = $hour <= 9 ? '0' + $hour : $hour;\n var $day = $date.getDate();\n $day = $day <= 9 ? '0' + $day : $day;\n var $month = $date.getMonth() + 1;\n $month = $month <= 9 ? '0' + $month : $month;\n var $year = $date.getFullYear();\n var $_notificationDate = $year + '-' + $month + '-' + $day + ' ' + $hour + ':'+ $minute + ':' + $second;\n $date = $date.getTime();\n var $diffSeconds = Math.floor(($now - $date)/1000);\n var $diffMinutes = Math.floor($diffSeconds/60);\n var $diffHours = Math.floor($diffMinutes/60);\n var $diffDays = Math.floor($diffHours/24);\n var $chtml = '';\n if($diffDays == 0 && $diffHours == 0 && $diffMinutes == 0){\n $chtml = $diffSeconds == 1 ? $diffSeconds + ' second ago' : $diffSeconds + ' seconds ago';\n }else\n if ($diffDays == 0 && $diffHours == 0){\n $chtml = $diffMinutes == 1 ? $diffMinutes + ' minute ago' : $diffMinutes + ' minutes ago';\n }else\n if ($diffDays == 0){\n $chtml = $diffHours == 1 ? $diffHours + ' hour ago' : $diffHours + ' hours ago';\n }else\n if($diffDays < 4){\n $chtml = $diffDays == 1 ? $diffDays + ' day ago' : $diffDays + ' days ago';\n }else{\n $date = $notificationsContainer.find('.timestamp[data-id=\"'+$key+'\"]').data('notificationdate');\n $chtml = moment.utc($date, 'YYYY-MM-DD HH:mm:ss').local().format('MMMM, DD YYYY hh:mm A');\n }\n if($ele.html() != $chtml){\n $ele.data('notificationdate', $_notificationDate).html($chtml);\n }\n }\n }\n nurseslounge_myDashboard_accountSettings.inboxNotificationDateUpdate($now);\n try{\n clearTimeout(this.notification_dates_binding);\n }catch($e){}\n this.notification_dates_binding = setTimeout(function(){\n nurseslounge_myDashboard_accountSettings.notificationDateUpdate();\n }, ($refreshEverySeconds * 1000));\n },\n inboxNotificationDateUpdate:function($now){\n //Inbox Notifications\n var $inboxNotificationDates = nurseslounge_myDashboard_accountSettings.getInboxNotificationsDates();\n var $inboxNotifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $inboxNotificationsContainer = $inboxNotifications.find(\".inbox-notifications-container:first\");\n for(var $i in $inboxNotificationDates){\n var $key = $inboxNotificationDates[$i];\n var $ele = $inboxNotificationsContainer.find('.timestamp[data-id=\"'+$key+'\"]');\n var $val = $ele.data('notificationdate');\n if($ele.length > 0 && $val){\n var $newDate = $val.split(' ');\n var $yearMonthDay = $newDate[0];\n $yearMonthDay = $yearMonthDay.split('-');\n var $HourMinuteSecond = $newDate[1];\n $HourMinuteSecond = $HourMinuteSecond.split(':');\n var $date = new Date($yearMonthDay[0], $yearMonthDay[1] - 1, $yearMonthDay[2], $HourMinuteSecond[0], $HourMinuteSecond[1], $HourMinuteSecond[2]);\n var $second = $date.getSeconds();\n $second = $second <= 9 ? '0' + $second : $second;\n var $minute = $date.getMinutes();\n $minute = $minute <= 9 ? '0' + $minute : $minute;\n var $hour = $date.getHours();\n $hour = $hour <= 9 ? '0' + $hour : $hour;\n var $day = $date.getDate();\n $day = $day <= 9 ? '0' + $day : $day;\n var $month = $date.getMonth() + 1;\n $month = $month <= 9 ? '0' + $month : $month;\n var $year = $date.getFullYear();\n var $_notificationDate = $year + '-' + $month + '-' + $day + ' ' + $hour + ':'+ $minute + ':' + $second;\n $date = $date.getTime();\n var $diffSeconds = Math.floor(($now - $date)/1000);\n var $diffMinutes = Math.floor($diffSeconds/60);\n var $diffHours = Math.floor($diffMinutes/60);\n var $diffDays = Math.floor($diffHours/24);\n var $chtml = '';\n if($diffDays == 0 && $diffHours == 0 && $diffMinutes == 0){\n $chtml = $diffSeconds == 1 ? $diffSeconds + ' second ago' : $diffSeconds + ' seconds ago';\n }else\n if ($diffDays == 0 && $diffHours == 0){\n $chtml = $diffMinutes == 1 ? $diffMinutes + ' minute ago' : $diffMinutes + ' minutes ago';\n }else\n if ($diffDays == 0){\n $chtml = $diffHours == 1 ? $diffHours + ' hour ago' : $diffHours + ' hours ago';\n }else\n if($diffDays < 4){\n $chtml = $diffDays == 1 ? $diffDays + ' day ago' : $diffDays + ' days ago';\n }else{\n $date = $inboxNotificationsContainer.find('.timestamp[data-id=\"'+$key+'\"]').data('notificationdate');\n $chtml = moment.utc($date, 'YYYY-MM-DD HH:mm:ss').local().format('MMMM, DD YYYY hh:mm A');\n }\n if($ele.html() != $chtml){\n $ele.data('notificationdate', $_notificationDate).html($chtml);\n }\n }\n }\n },\n //For Both\n notificationSet:function($params, cback){\n $.ajax({\n url: \"/notifications/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n notificationScroll:function($params){\n var $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n var $notificationsContainer = $notifications.find(\".notifications-container:first\");\n var $scrollerHeight = $notificationsContainer.find(\".scroller-height:first\");\n var $loadMoreAfterPercent = 25;\n var $scrollBinding;\n $scrollerHeight.unbind().scroll(function() {\n var $maxScrollTop = $scrollerHeight[0].scrollHeight - $scrollerHeight.height();\n var $actualScroll = $scrollerHeight.scrollTop();\n var $triggerPercent = ($actualScroll * 100) / $maxScrollTop > $loadMoreAfterPercent;\n if ($triggerPercent) {\n try {\n clearTimeout($scrollBinding);\n }catch (e) {\n }\n $scrollBinding = setTimeout(function(){\n $notifications = $(\"#topNav .notifications-menu .notifications:first\");\n $notificationsContainer = $notifications.find(\".notifications-container:first\");\n $scrollerHeight = $notificationsContainer.find(\".scroller-height:first\");\n var $offset = $scrollerHeight.find(\".notification\").length;\n $params = $.extend({}, $params, {offset:$offset});\n nurseslounge_myDashboard_accountSettings.notificationLoad($params, false);\n }, 800);\n }\n });\n },\n inboxNotificationScroll:function($params){\n var $notifications = $(\"#topNav .notifications-menu .inbox-notifications:first\");\n var $inboxNotificationsContainer = $notifications.find(\".inbox-notifications-container:first\");\n var $scrollerHeight = $inboxNotificationsContainer.find(\".scroller-height:first\");\n var $loadMoreAfterPercent = 25;\n var $scrollBinding;\n $scrollerHeight.unbind().scroll(function() {\n var $maxScrollTop = $scrollerHeight[0].scrollHeight - $scrollerHeight.height();\n var $actualScroll = $scrollerHeight.scrollTop();\n var $triggerPercent = ($actualScroll * 100) / $maxScrollTop > $loadMoreAfterPercent;\n if ($triggerPercent) {\n try {\n clearTimeout($scrollBinding);\n }catch (e) {\n }\n $scrollBinding = setTimeout(function(){\n $notifications = $(\"#topNav .notifications-menu .inbox-notifications\");\n $inboxNotificationsContainer = $notifications.find(\".inbox-notifications-container:first\");\n $scrollerHeight = $inboxNotificationsContainer.find(\".scroller-height:first\");\n var $offset = $scrollerHeight.find(\".notification\").length;\n $params = $.extend({}, $params, {offset:$offset});\n nurseslounge_myDashboard_accountSettings.inboxNotificationLoad($params, false);\n }, 800);\n }\n });\n },\n //Coins\n coins:function($params){\n var $savedCoins = nurseslounge_myDashboard_accountSettings.readCookie('COINS');\n nurseslounge_myDashboard_accountSettings.coins_request($params, function($data){\n var $coinsTotal = $data.data.coins_total;\n if($savedCoins != null){\n if($savedCoins != $coinsTotal){\n var $audio = new Audio('/sounds/coins.mp3');\n $audio.play();\n }\n $(\".target-coins\").html($coinsTotal).promise().done(function(){\n nurseslounge_myDashboard_accountSettings.createCookie('COINS', $coinsTotal,100);\n });\n }\n });\n },\n coins_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/header/coins/get\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Shop\n shop:function(){\n var $topNav = $(\"#topNav\");\n var $coinsBasket = $topNav.find('.coins-basket');\n var $modal = $(\"#nurseslounge-shop-modal\");\n $coinsBasket.unbind().click(function(){\n var $allowTabs = {\n 'theShop': true,\n 'dailyQuests': false,\n 'dailyLoginRewards': false,\n };\n var $allowTabsFiltered = $allowTabs;\n $allowTabs = {};\n $.each($allowTabsFiltered, function($k, $v) {var $newObj = {};$newObj[$k]=$v;if($v){$.extend($allowTabs, $newObj);}});\n var $tab = null;\n $.each($allowTabs, function($i, $v){\n if($v){\n $tab = $i;\n return false;\n }\n });\n nurseslounge_myDashboard_accountSettings.select_tab($tab, $allowTabs, function(){\n $modal.scrollTop(0);\n $modal.modal('show');\n });\n });\n },\n select_tab_events:function($tab, $allowTabs, cback){\n //Disable All\n $('#nurseslounge-shop-modal .nav-pills .nav-link').addClass('disabled').removeClass('active');\n $('#nurseslounge-shop-modal .shop-container .tab-pane .container').html('');\n //Events\n $('#nurseslounge-shop-modal .nav-pills a[data-toggle=\"tab\"]').unbind().on('shown.bs.tab', function ($e) {\n var $selectedTab = $e.currentTarget.dataset.target.replace('#','');\n if($.inArray($selectedTab, Object.keys($allowTabs)) > -1){\n nurseslounge_myDashboard_accountSettings.select_tab($selectedTab, $allowTabs, function(){\n $(\"#nurseslounge-shop-modal\").scrollTop(0);\n });\n }\n });\n //Enable selected\n $.each($allowTabs, function ($i, $v) {\n $(\"#\"+$v).removeClass('active').removeClass('show');\n $('#nurseslounge-shop-modal .nav-pills .nav-link[data-target=\"#'+$i+'\"]').removeClass('disabled');\n });\n $('#nurseslounge-shop-modal .nav-pills .nav-link[data-target=\"#'+$tab+'\"]').addClass('active');\n $(\"#\"+$tab).addClass('active').addClass('show');\n if(cback != undefined){\n cback();\n }\n },\n select_tab:function($selectedTab, $allowTabs, cback){\n nurseslounge_myDashboard_accountSettings.select_tab_events($selectedTab, $allowTabs, function(){\n nurseslounge_myDashboard_accountSettings.load_tab($selectedTab,function() {\n switch ($selectedTab) {\n case 'theShop':\n nurseslounge_myDashboard_accountSettings.the_shop(cback);\n break;\n }\n });\n });\n },\n load_tab:function($selectedTab, cback){\n nurseslounge_myDashboard_accountSettings.get_tab($selectedTab, function($chtml){\n var $images = $($chtml).find('img');\n libs.checkImageLoad($images, function(){\n $(\"#\"+$selectedTab+\" .container\").html($chtml).promise().done(function(){\n if(cback != undefined){\n cback();\n }\n });\n });\n });\n },\n get_tab:function($selectedTab, cback){\n var $userId = libs.memoryGet('user_id');\n $.ajax({\n type: 'POST',\n url: '/myDashboard/header/shop',\n data: {user_id:$userId,tab:$selectedTab},\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n the_shop:function(cback){\n var $cards = $(\"#theShop .container .nurseslounge-item-cards\");\n var $chtml = nurseslounge_myDashboard_accountSettings.the_shop_items_preview();\n $cards.html($chtml).promise().done(function(){\n nurseslounge_myDashboard_accountSettings.the_shop_items_request(function($data){\n var $chtml = nurseslounge_myDashboard_accountSettings.the_shop_items_html($data);\n libs.checkImageLoad($($chtml).find('img'), function(){\n $cards.html($chtml).promise().done(function(){\n $cards.find('.carousel').hide();\n nurseslounge_myDashboard_accountSettings.the_shop_events(function(){\n cback();\n });\n });\n });\n });\n });\n },\n the_shop_items_preview:function(){\n var $chtml = '';\n for(var $i=0; $i<2; $i++){\n $chtml += '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '       ' +\n '
    ' +\n '
    ' +\n '       ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ';\n }\n return $chtml;\n },\n the_shop_items_request:function(cback){\n var $userId = libs.memoryGet('user_id');\n $.ajax({\n url: \"/myDashboard/header/shop/items\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data: {user_id:$userId},\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n cback($data);\n }\n }\n });\n },\n the_shop_items_html:function($data){\n var $chtml = '
    ';\n $.each($data.data.items, function($i, $v){\n var $id = $v.id;\n var $title = $v.title;\n var $description = $v.description;\n var $itemImageRoot = $v.item_image_root;\n var $cost = $v.cost;\n $chtml += '' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' \"article' +\n '
    ' +\n '
    ' +\n '

    '+$title+'

    ' +\n '

    '+$description+'

    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ';\n });\n $chtml += '
    ';\n return $chtml;\n },\n the_shop_events:function(cback){\n var $carousels = $(\"#theShop .container .nurseslounge-item-cards .carousel\");\n $carousels.unbind();\n $carousels.slick({\n speed: 300,\n slidesToShow: 2,\n slidesToScroll: 1,\n arrows: true,\n responsive: [\n {\n breakpoint: 1024,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 1,\n }\n },\n {\n breakpoint: 600,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1\n }\n },\n {\n breakpoint: 480,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1\n }\n }\n ]\n });\n setTimeout(function(){\n $carousels.slick('refresh');\n $carousels.find('.item').click(function(){\n var $that = $(this);\n var $id = $that.data('id');\n nurseslounge_myDashboard_accountSettings.the_shop_open_item($id);\n });\n $carousels.fadeIn();\n }, 600);\n cback();\n },\n the_shop_open_item:function($id){\n var $userId = libs.memoryGet('user_id');\n var $params = $.extend({}, {id:$id, user_id:$userId});\n var $cards = $(\"#theShop .container .nurseslounge-item-cards\");\n var $purchaseCards = $(\"#theShop .container .nurseslounge-item-purchase-cards\");\n nurseslounge_myDashboard_accountSettings.the_shop_open_item_purchase_request($params, function($chtml){\n libs.checkImageLoad($($chtml).find('img'), function(){\n $cards.hide();\n $purchaseCards.html($chtml).promise().done(function(){\n $purchaseCards = $(\"#theShop .container .nurseslounge-item-purchase-cards\");\n var $back = $purchaseCards.find('.back');\n $back.unbind().click(function(){\n $purchaseCards.html('');\n $cards.fadeIn();\n });\n var $buy = $purchaseCards.find('.buy');\n $buy.unbind().click(function(){\n nurseslounge_myDashboard_accountSettings.the_shop_open_item_purchase_set_request($params, function($data){\n $params = $.extend({}, $params, {code:$data.data.code});\n nurseslounge_myDashboard_accountSettings.coins({user_id:$userId});\n nurseslounge_myDashboard_accountSettings.the_shop_open_item_purchase_complete_request($params, function($chtml){\n $purchaseCards.html($chtml).promise().done(function(){\n $purchaseCards = $(\"#theShop .container .nurseslounge-item-purchase-cards\");\n var $continue = $purchaseCards.find('.continue');\n $continue.unbind().click(function(){\n $purchaseCards.html('');\n nurseslounge_myDashboard_accountSettings.the_shop(function(){\n $cards.fadeIn();\n });\n });\n });\n });\n });\n });\n });\n });\n });\n },\n the_shop_open_item_purchase_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/myDashboard/header/shop/items/purchase',\n data: $params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n the_shop_open_item_purchase_set_request:function($params, cback){\n $.ajax({\n url: \"/myDashboard/header/shop/items/purchase/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data: $params,\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n cback($data);\n }\n }\n });\n },\n the_shop_open_item_purchase_complete_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/myDashboard/header/shop/items/purchase/complete',\n data: $params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Mobile\n mobile:function(){\n if(libs.isAndroid()){\n var $modal = $(\"#nurseslounge-android-mobile-modal\");\n $modal.modal('show');\n }\n }\n};\n","var nurseslounge_lounge_overview = {\n init:function($params, cback){\n $params = $.extend({},$params, {tab:'init'});\n nurseslounge_lounge_overview.information_lounge_get('init', $params, function($data){\n switch ($data.data.lounge.lounge_type_id){\n case 1:\n $params = $.extend({},$params, {typeName:'employers'});\n break;\n case 2:\n $params = $.extend({},$params, {typeName:'schools'});\n break;\n case 3:\n $params = $.extend({},$params, {typeName:'states'});\n break;\n case 6:\n $params = $.extend({},$params, {typeName:'nurseAssociations'});\n break;\n case 8:\n $params = $.extend({},$params, {typeName:'specialties'});\n break;\n case 9:\n $params = $.extend({},$params, {typeName:'thoughtLeaders'});\n break;\n }\n nurseslounge_lounge_overview.information_administrator_edit($params, $data);\n nurseslounge_lounge_overview.information_location_video($data);\n nurseslounge_lounge_overview.information_virtual_tour($data);\n if(\n $data.data.lounge.lounge_type_id == 1 || //employer\n $data.data.lounge.lounge_type_id == 2 //school\n ){\n nurseslounge_lounge_overview.information_rating($params, $data);\n }\n try{\n google.maps.event.addListener(window, \"load\", nurseslounge_lounge_overview.information_location_map($data));\n }catch (e) {\n\n }\n if(cback != undefined){\n cback($data);\n }\n });\n nurseslounge_lounge_overview.banners_location(function($config){\n nurseslounge_myDashboard_myProfile.banners_engine($config);\n });\n nurseslounge_lounge_overview.task_list_container(function($container){\n $params = $.extend({}, $params, {only:'owners'});\n nurseslounge_myDashboard_myProfile.task_list($container, $params);\n });\n nurseslounge_lounge_overview.claim_lounge_container(function($container){\n nurseslounge_lounge_overview.claim_lounge($container, $params);\n });\n nurseslounge_lounge_overview.information_meet_our_recruiters(function($config){\n nurseslounge_lounge_overview.information_meet_our_recruiters_engine($config);\n });\n nurseslounge_lounge_overview.report_container(function($container){\n nurseslounge_lounge_overview.report($container, $params);\n });\n nurseslounge_lounge_overview.lounge_ads_location(function($config){\n nurseslounge_lounge_overview.lounge_ads_engine($config);\n });\n },\n information_lounge_get:function($action, $params, cback){\n $.ajax({\n url: \"/lounge/get\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$.extend({},$params, {action:$action}),\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'error'){\n $(\"#nurseslounge-lounge-information-edit-modal\").modal('hide');\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n }\n cback($data);\n }\n });\n },\n information_rating:function($params, $data){\n var $typeId = $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id : 0;\n var $nursesloungeLoungeInformation = $(\"#nurseslounge-lounge-information\");\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $loungeInformationRight = $nursesloungeLoungeInformation.find('.nurseslounge-lounge-information-right:first');\n var $ratingFirst = $loungeInformationRight.find('.rating-stars:first');\n var $ratingCount = $loungeInformationRight.find('.rating-count:first');\n var $addReviewFirst = $loungeInformationRight.find('.add-review:first');\n var $deleteReviewFirst = $loungeInformationRight.find('.delete-review:first');\n $ratingFirst.unbind().click(function(){\n router.navigate('/lounge/'+$params.key+'/ratingReviews');\n });\n $ratingCount.unbind().click(function(){\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n libs.refreshBoxFrom('.review-box', $params, function(){\n nurseslounge_lounge_overview.init($params);\n $reviewModal.modal('hide');\n });\n });\n });\n $addReviewFirst.unbind().click(function(){\n nurseslounge_lounge_overview.information_review($typeId, $params, $data, function(){\n libs.refreshBoxFrom('.review-box', $params, function(){\n nurseslounge_lounge_overview.init($params);\n $reviewModal.modal('hide');\n });\n });\n });\n $deleteReviewFirst.unbind().click(function(){\n if(confirm('Are you sure you want to delete your review?')){\n nurseslounge_lounge_overview.information_remove_review($params, function(){\n libs.refreshBoxFrom('.review-box', $params, function(){\n nurseslounge_lounge_overview.init($params);\n $reviewModal.modal('hide');\n });\n });\n }\n });\n },\n information_review:function($typeId, $params, $data, executed){\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $contentDiv = $reviewModal.find('.content:first');\n nurseslounge_lounge_overview.information_review_form($params, 'msg',function($chtml){\n $contentDiv.html($chtml).promise().done(function(){\n var $agreeCheckbox = $reviewModal.find('input[name=\"agree\"]');\n var $startBtn = $reviewModal.find('.start-btn');\n $agreeCheckbox.unbind().click(function(){\n if($agreeCheckbox.is(':checked')){\n nurseslounge_lounge_overview.information_review_count_down(function(){\n var $part;\n switch($typeId){\n case 1:\n $part = 'employer';\n break;\n case 2:\n $part = 'school';\n break;\n }\n $params = $.extend({},$params, {type:$part});\n nurseslounge_lounge_overview.information_review_form($params, $part,function($chtml){\n var $userId = libs.memoryGet('user_id');\n $contentDiv.html($chtml).promise().done(function(){\n if($part == 'employer'){\n nurseslounge_lounge_overview.information_review_employer_events($params, $data, null, function(){\n nurseslounge_myDashboard_accountSettings.coins({user_id:$userId});\n executed();\n });\n }\n if($part == 'school'){\n nurseslounge_lounge_overview.information_review_school_events($params, $data, null, function(){\n nurseslounge_myDashboard_accountSettings.coins({user_id:$userId});\n executed();\n });\n }\n });\n });\n });\n }else{\n $startBtn.prop('disabled', true);\n }\n });\n $reviewModal.modal('show');\n });\n });\n },\n information_remove_review:function($params, cback){\n $.ajax({\n url: \"/lounge/reviews/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'error'){\n $(\"#nurseslounge-lounge-information-edit-modal\").modal('hide');\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n }\n cback($data);\n }\n });\n },\n information_review_count_down:function(cback){\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $startBtn = $reviewModal.find('.start-btn');\n $startBtn.prop('disabled', false);\n $startBtn.unbind().click(function(){\n cback();\n });\n },\n information_review_form:function($params, $part, cback){\n $params = $.extend({},$params, {user_id:libs.memoryGet('user_id'),part:$part});\n $.ajax({\n type: 'POST',\n url: '/lounge/informationReviewView/get',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'error'){\n $(\"#nurseslounge-lounge-information-edit-modal\").modal('hide');\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n }\n cback($data);\n }\n });\n },\n\n information_review_employer_events:function($params, $data, cback, executed){\n var $lounge = $data.data.lounge;\n var $myReview = $lounge.my_review;\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $ratingStars = $reviewModal.find('.rating-stars:first');\n var $ratingCount = $reviewModal.find('.rating-count:first');\n var $overallInput = $reviewModal.find('input[name=\"overallRating\"]');\n var $form = $reviewModal.find('form:first');\n //Fill\n var $loungeReview = libs.memoryGet('review');\n var $overallRatingVal = $loungeReview.overallRating ? $loungeReview.overallRating : $myReview && $myReview.overall_rating ? $myReview.overall_rating : 0;\n var $recommendToFriendVal = $loungeReview.recommendToFriend ? $loungeReview.recommendToFriend : $myReview && $myReview.recommend_to_friend ? $myReview.recommend_to_friend : '';\n var $jobTitle = $loungeReview.jobTitle ? $loungeReview.jobTitle : $myReview && $myReview.job_title ? $myReview.job_title : '';\n var $facility = $loungeReview.facility ? $loungeReview.facility : $myReview && $myReview.facility ? $myReview.facility : '';\n $facility = $facility == 'Other' && $loungeReview.otherFacility ? $loungeReview.otherFacility : $facility;\n var $prosCons = $loungeReview.prosCons ? $loungeReview.prosCons : $myReview && $myReview.pros_cons ? $myReview.pros_cons : '';\n var $otherFacilityDiv = $reviewModal.find('.other-facility');\n var $selectFacility = $reviewModal.find('select[name=\"facility\"]');\n var $otherFacility = $reviewModal.find('input[name=\"otherFacility\"]');\n if($recommendToFriendVal != ''){\n $reviewModal.find('input[name=\"recommendToFriend\"][value='+$recommendToFriendVal+']').attr('checked', 'checked');\n }\n if($jobTitle != ''){\n $reviewModal.find('input[name=\"jobTitle\"]').val($jobTitle);\n }\n if($prosCons != ''){\n $reviewModal.find('textarea[name=\"prosCons\"]').val($prosCons);\n }\n if($facility != ''){\n var $facilityOption = $selectFacility.find('option');\n var $facilities = $.map($facilityOption ,function($option) {\n return $option.value;\n });\n var $facilityExist = $.inArray($facility, $facilities) != -1 ? true : false;\n if($facilityExist){\n if(!$otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.addClass('d-none');\n }\n $selectFacility.val($facility);\n }else{\n if($otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.removeClass('d-none');\n }\n $selectFacility.val('Other');\n $otherFacility.val($facility);\n }\n }\n $selectFacility.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n if($val != ''){\n if($val == 'Other'){\n if($otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.removeClass('d-none');\n }\n }else{\n if(!$otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.addClass('d-none');\n }\n }\n $otherFacility.val('');\n }\n });\n $ratingStars.html(nurseslounge_lounge_overview.add_stars($overallRatingVal));\n $ratingCount.html('

    '+$overallRatingVal+' / 5 Star

    ');\n $overallInput.val($overallRatingVal);\n //Events\n nurseslounge_lounge_overview.information_review_employer_events_validate(function($form){\n $params = $.extend({}, $params, libs.getObjForm($form));\n nurseslounge_lounge_overview.information_form_request($params, function($data){\n executed();\n });\n });\n var $ratingStarsSvg = $ratingStars.find('svg');\n $ratingStarsSvg.unbind().click(function($event){\n var $that = $(this);\n var $left = $event.clientX - $that.offset().left;\n var $width = $that.width();\n var $leftColor = ($left * 100) / $width;\n var $rightColor = 100 - $leftColor;\n var $url = $that.attr('fill');\n $url = $url.replace('url(#','').replace(')','');\n var $percentReviewId = $url.replace('percentReview','');\n var $totalPercent = 500;\n var $actualPercent = 0;\n for(var $x=1;$x<=5;$x++){\n var $chtml = '';\n var $leftPercent;\n var $rightPercent;\n if($x == $percentReviewId){\n //$leftPercent = $leftColor < 15 ? 0 : $leftColor > 85 ? 100 : $leftColor;\n $leftPercent = $leftColor < 15 ? 0 : 100;\n $rightPercent = $rightColor;\n $actualPercent+= $leftPercent;\n }\n if($x < $percentReviewId){\n $leftPercent = 100;\n $rightPercent = 0;\n //$actualPercent+= $leftPercent;\n $actualPercent+= 100;\n }\n if($x > $percentReviewId){\n $leftPercent = 0;\n $rightPercent = 100;\n //$actualPercent+= $leftPercent;\n $actualPercent+= 0;\n }\n if($leftPercent > 10) {\n $chtml += '' +\n '';\n }\n if($rightPercent > 10) {\n $chtml += '' +\n '';\n }\n $(\"#percentReview\"+$x).html($chtml);\n }\n var $selectedPercent = ($actualPercent/$totalPercent) * 5;\n $selectedPercent = Math.ceil($selectedPercent * 10) / 10;\n $selectedPercent > 0 ? $selectedPercent.toFixed(1) : 0;\n $ratingCount.html('

    '+$selectedPercent+' / 5 Star

    ');\n $overallInput.val($selectedPercent);\n $form.find('.invalid-feedback').hide();\n $form.find('.error').removeClass('error');\n $form.find('.is-invalid').removeClass('is-invalid');\n });\n if(cback != undefined){\n cback();\n }\n },\n add_stars:function($rating){\n var $chtml = '';\n for(var $i=1; $i<=5; $i++) {\n var $star = $rating - $i;\n var $offsetOn;\n var $offsetOff;\n if($star >= 0){\n $offsetOn = 100;\n $offsetOff = 0;\n }else if($star < 0 && $star > -1){\n $star = ($star * -1);\n $offsetOff = ($star * 100);\n $offsetOn = (100 - $offsetOff);\n }else{\n $offsetOn = 0;\n $offsetOff = 100;\n }\n $chtml += '' +\n '' +\n ' ' +\n ' ';\n if($offsetOn > 0) {\n $chtml += '' +\n '';\n }\n if($offsetOff > 0){\n $chtml += '' +\n '';\n }\n $chtml += '' +\n ' ' +\n ' ' +\n ' ' +\n '';\n }\n return $chtml;\n },\n information_review_employer_events_validate:function(cback){\n $.validator.addMethod(\"greaterThanZero\", function($val) {\n return parseFloat($val) > 0;\n },'Must be greater than zero.');\n var $validator;\n try {\n $validator = $(\"#nurseslounge-lounge-information-review-modal form:first\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-lounge-information-review-modal form:first\").validate({\n onsubmit: true,\n debug: true,\n ignore: \"*:not(.validate)\",\n rules: {\n overallRating: {\n required: true,\n greaterThanZero: true\n },\n recommendToFriend: {\n required: true\n },\n jobTitle: {\n required: true\n },\n facility: {\n required: true\n },\n otherFacility: {\n required: function(){\n var $form = $(\"#nurseslounge-lounge-information-review-modal form:first\");\n return $form.find('select[name=\"facility\"]').val() == 'Other';\n }\n },\n prosCons: {\n required: false\n }\n },\n messages: {\n overallRating: {\n required: \"The overall rating is not required\",\n greaterThanZero: \"The overall rating must be greater than 0\",\n },\n recommendToFriend: {\n required: \"The recommend to a friend is required\"\n },\n jobTitle: {\n required: \"The job title is required\"\n },\n facility: {\n required: \"The facility is required\"\n },\n otherFacility: {\n required: \"The other facility is required\"\n },\n prosCons: {\n required: \"The pros and cons is not required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_review_school_events:function($params, $data, cback, executed){\n var $userProfileId = $data.data.user_profile_id;\n var $lounge = $data.data.lounge;\n var $myReview = $lounge.my_review;\n var $reviewModal = $(\"#nurseslounge-lounge-information-review-modal\");\n var $ratingStars = $reviewModal.find('.rating-stars:first');\n var $ratingCount = $reviewModal.find('.rating-count:first');\n var $overallInput = $reviewModal.find('input[name=\"overallRating\"]');\n var $form = $reviewModal.find('form:first');\n //Fill\n var $loungeReview = libs.memoryGet('review');\n var $currentProfileId = $loungeReview.currentProfileId ? $loungeReview.currentProfileId : $myReview && $myReview.current_profile_id ? $myReview.current_profile_id : $userProfileId;\n var $jobTitle = $loungeReview.jobTitle ? $loungeReview.jobTitle : $myReview && $myReview.job_title ? $myReview.job_title : '';\n var $overallRatingVal = $loungeReview.overallRating ? $loungeReview.overallRating : $myReview && $myReview.overall_rating ? $myReview.overall_rating : 0;\n var $recommendToFriendVal = $loungeReview.recommendToFriend ? $loungeReview.recommendToFriend : $myReview && $myReview.recommend_to_friend ? $myReview.recommend_to_friend : '';\n var $schoolDegreeVal = $loungeReview.schoolDegree ? $loungeReview.schoolDegree : $myReview && $myReview.school_degree ? $myReview.school_degree : '';\n $schoolDegreeVal = $schoolDegreeVal == 'Other' && $loungeReview.otherSchoolDegree ? $loungeReview.otherSchoolDegree : $schoolDegreeVal;\n var $prosCons = $loungeReview.prosCons ? $loungeReview.prosCons : $myReview && $myReview.pros_cons ? $myReview.pros_cons : '';\n var $otherDegreeDiv = $reviewModal.find('.other-degree');\n var $schoolRelationship = $reviewModal.find('select[name=\"schoolRelationship\"]');\n var $selectDegree = $reviewModal.find('select[name=\"schoolDegree\"]');\n var $otherDegree = $reviewModal.find('input[name=\"otherSchoolDegree\"]');\n var $nurseWrapperDiv = $reviewModal.find('.nurse-wrapper');\n var $nurseFacultyWrapperDiv = $reviewModal.find('.nurse-faculty-wrapper');\n if($recommendToFriendVal != ''){\n $reviewModal.find('input[name=\"recommendToFriend\"][value='+$recommendToFriendVal+']').attr('checked', 'checked');\n }\n if($prosCons != ''){\n $reviewModal.find('textarea[name=\"prosCons\"]').val($prosCons);\n }\n if($jobTitle != ''){\n $reviewModal.find('input[name=\"jobTitle\"]').val($jobTitle);\n }\n if($schoolDegreeVal != ''){\n var $degreeOption = $selectDegree.find('option');\n var $degrees = $.map($degreeOption ,function($option) {\n return $option.value;\n });\n var $degreeExist = $.inArray($schoolDegreeVal, $degrees) != -1 ? true : false;\n if($degreeExist){\n if(!$otherDegreeDiv.hasClass('d-none')){\n $otherDegreeDiv.addClass('d-none');\n }\n $selectDegree.val($schoolDegreeVal);\n }else{\n if($otherDegreeDiv.hasClass('d-none')){\n $otherDegreeDiv.removeClass('d-none');\n }\n $selectDegree.val('Other');\n $otherDegree.val($schoolDegreeVal);\n }\n }\n $selectDegree.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n if($val != ''){\n if($val == 'Other'){\n if($otherDegreeDiv.hasClass('d-none')){\n $otherDegreeDiv.removeClass('d-none');\n }\n }else{\n if(!$otherDegreeDiv.hasClass('d-none')){\n $otherDegreeDiv.addClass('d-none');\n }\n }\n $otherDegree.val('');\n }\n });\n $ratingStars.html(nurseslounge_lounge_overview.add_stars($overallRatingVal));\n $ratingCount.html('

    '+$overallRatingVal+' / 5 Star

    ');\n $overallInput.val($overallRatingVal);\n $schoolRelationship.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n $nurseFacultyWrapperDiv.hide();\n $nurseWrapperDiv.hide();\n switch($val){\n case 'nurse_faculty':\n $nurseFacultyWrapperDiv.show();\n break;\n case 'nurse':\n $nurseWrapperDiv.show();\n break;\n }\n });\n if($currentProfileId == 5){\n $schoolRelationship.val('nurse_faculty').change();\n }else{\n $schoolRelationship.val('nurse').change();\n }\n //Events\n nurseslounge_lounge_overview.information_review_school_events_validate(function($form){\n $params = $.extend({}, $params, libs.getObjForm($form));\n nurseslounge_lounge_overview.information_form_request($params, function($data){\n executed();\n });\n });\n var $ratingStarsSvg = $ratingStars.find('svg');\n $ratingStarsSvg.unbind().click(function($event){\n var $that = $(this);\n var $left = $event.clientX - $that.offset().left;\n var $width = $that.width();\n var $leftColor = ($left * 100) / $width;\n var $rightColor = 100 - $leftColor;\n var $url = $that.attr('fill');\n $url = $url.replace('url(#','').replace(')','');\n var $percentReviewId = $url.replace('percentReview','');\n var $totalPercent = 500;\n var $actualPercent = 0;\n for(var $x=1;$x<=5;$x++){\n var $chtml = '';\n var $leftPercent;\n var $rightPercent;\n if($x == $percentReviewId){\n //$leftPercent = $leftColor < 15 ? 0 : $leftColor > 85 ? 100 : $leftColor;\n $leftPercent = $leftColor < 15 ? 0 : 100;\n $rightPercent = $rightColor;\n $actualPercent+= $leftPercent;\n }\n if($x < $percentReviewId){\n $leftPercent = 100;\n $rightPercent = 0;\n //$actualPercent+= $leftPercent;\n $actualPercent+= 100;\n }\n if($x > $percentReviewId){\n $leftPercent = 0;\n $rightPercent = 100;\n //$actualPercent+= $leftPercent;\n $actualPercent+= 0;\n }\n if($leftPercent > 10) {\n $chtml += '' +\n '';\n }\n if($rightPercent > 10) {\n $chtml += '' +\n '';\n }\n $(\"#percentReview\"+$x).html($chtml);\n }\n var $selectedPercent = ($actualPercent/$totalPercent) * 5;\n $selectedPercent = Math.ceil($selectedPercent * 10) / 10;\n $selectedPercent > 0 ? $selectedPercent.toFixed(1) : 0;\n $ratingCount.html('

    '+$selectedPercent+' / 5 Star

    ');\n $overallInput.val($selectedPercent);\n $form.find('.invalid-feedback').hide();\n $form.find('.error').removeClass('error');\n $form.find('.is-invalid').removeClass('is-invalid');\n });\n if(cback != undefined){\n cback();\n }\n },\n information_review_school_events_validate:function(cback){\n $.validator.addMethod(\"greaterThanZero\", function($val) {\n return parseFloat($val) > 0;\n },'Must be greater than zero.');\n var $validator;\n try {\n $validator = $(\"#nurseslounge-lounge-information-review-modal form:first\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-lounge-information-review-modal form:first\").validate({\n onsubmit: true,\n debug: true,\n ignore: \"*:not(.validate)\",\n rules: {\n overallRating: {\n required: true,\n greaterThanZero: true\n },\n recommendToFriend: {\n required: true\n },\n schoolDegree: {\n required: function(){\n return $(\"#nurseslounge-lounge-information-review-modal form:first .nurse-wrapper:first\").is(':visible');\n }\n },\n otherSchoolDegree: {\n required: function(){\n var $form = $(\"#nurseslounge-lounge-information-review-modal form:first\");\n return $form.find('select[name=\"schoolDegree\"]').val() == 'Other';\n }\n },\n jobTitle:{\n required: function(){\n return $(\"#nurseslounge-lounge-information-review-modal form:first .nurse-faculty-wrapper:first\").is(':visible');\n }\n },\n prosCons: {\n required: false\n },\n },\n messages: {\n overallRating: {\n required: \"The overall rating is required\",\n greaterThanZero: \"The overall rating must be greater than 0\",\n },\n recommendToFriend: {\n required: \"The recommend to a friend is required\"\n },\n schoolDegree: {\n required: \"The school degree is required\"\n },\n otherSchoolDegree: {\n required: \"The other school degree is required\"\n },\n jobTitle: {\n required: \"The job title is required\"\n },\n prosCons: {\n required: \"The pros and cons is not required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n information_form_request:function($params, cback){\n $.ajax({\n url: \"/lounge/reviews/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'error'){\n $(\"#nurseslounge-lounge-information-edit-modal\").modal('hide');\n $(\"#nurseslounge-lounge-information-review-modal\").modal('hide');\n }\n cback($data);\n }\n });\n },\n\n information_location_map:function($data){\n var $location = $data && $data.data && $data.data.lounge && $data.data.lounge.location ? $data.data.lounge.location : null;\n if($location && $location.address_latitude && $location.address_longitude && $location.address_is_unmappable == 0){\n var $position = new google.maps.LatLng(parseFloat($location.address_latitude), parseFloat($location.address_longitude));\n var $iconUrl = './../../bimg/NursesLounge/active.png';\n var $map = new google.maps.Map(document.getElementById('nurseslounge-lounge-information-right-map'), {\n center:$position,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n mapTypeControl: false,\n streetViewControl: false,\n fullscreenControl: false,\n zoom: 15\n });\n $map.setTilt(0);\n var $marker = new google.maps.Marker({\n position:$position,\n map: $map,\n animation: google.maps.Animation.DROP,\n icon: {url:$iconUrl, scaledSize: (new google.maps.Size(20, 35))},\n });\n }\n },\n information_location_video:function($data){\n var $lounge = $data.data.lounge;\n var $nursesloungeLoungeInformation = $(\"#nurseslounge-lounge-information\");\n var $loungeInformationLeft = $nursesloungeLoungeInformation.find('.nurseslounge-lounge-information-left:first');\n var $youtubeVideo = $loungeInformationLeft.find('.youtube-video:first');\n var $myVideo = $loungeInformationLeft.find('.my-video:first');\n var $youtubePlayer;\n var $myPlayer;\n var $vimeoRegex = new RegExp ('(vimeo)','gi');\n var $youtubeRegex = new RegExp ('(youtube)','gi');\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($vimeoRegex)){\n var $url = $lounge.video_url.split('/');\n var $vimeoId = $url[$url.length - 1];\n var $vimeoPlayer = new Vimeo.Player($youtubeVideo[0], {\n id:$vimeoId,\n width: 680,\n loop: false,\n autoplay:true,\n muted:true\n });\n }\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($youtubeRegex)){\n var $url = new URL($lounge.video_url);\n window.YT.ready(function() {\n $youtubePlayer = new YT.Player($youtubeVideo[0], {\n height: '360',\n width: '100%',\n videoId: $url.searchParams.get('v'),\n events: {\n 'onReady': function () {\n $youtubePlayer.mute();\n $youtubePlayer.playVideo();\n },\n 'onError': function () {\n $youtubeVideo.hide();\n }\n }\n });\n });\n }\n if($lounge.video_root_lounge && $lounge.name){\n $myVideo.height(480);\n $myPlayer = new Artplayer({\n width: '100%',\n height: '480px',\n destroy:true,\n container: $myVideo[0],\n title: $lounge.name,\n url: $lounge.video_root_lounge,\n mutex: true,\n muted:true,\n play: true,\n controls: [\n {\n position: 'right',\n html: 'Fullscreen',\n click: function() {\n nurseslounge_lounge_overview.information_location_video_fullscreen($myPlayer, $lounge, true);\n },\n },\n ],\n moreVideoAttr: {\n crossOrigin: 'anonymous'\n }\n }).on('ready', function() {\n $myPlayer.player.pause = true;\n $myPlayer.player.play = true;\n }).on('pause', function(){\n $myPlayer.mask.show = false;\n });\n }\n },\n information_location_video_fullscreen:function($myPlayer, $lounge, $scroll){\n var $gallery;\n var $chtml = '' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n $gallery = new PhotoSwipe($('#nurseslounge-lounge-information-video')[0], PhotoSwipeUI_Default,\n [\n {\n html: $chtml\n }\n ],\n {\n index: 0,\n clickToCloseNonZoomable: false,\n closeOnScroll: false,\n closeOnVerticalDrag:false,\n closeElClasses: [],\n history:false\n }\n );\n $gallery.init();\n if($myPlayer){\n $myPlayer.player.pause = true;\n }\n var $container = $('#nurseslounge-lounge-information-video .preview-video-container');\n var $target = $container.find('.video:first');\n $target.width($(window).width());\n $target.height($(window).height());\n var $previewPlayer = new Artplayer({\n destroy:true,\n container: $target[0],\n title: $lounge.name,\n url: $lounge.video_root_lounge,\n mutex: true,\n muted:true,\n play: true\n }).on('ready', function() {\n $previewPlayer.player.pause = true;\n $previewPlayer.player.play = true;\n $previewPlayer.mask.show = false;\n }).on('pause', function(){\n $previewPlayer.mask.show = false;\n });\n $previewPlayer.mask.show = false;\n var $fullscreen = false;\n //var $api = $gallery.ui.getFullscreenAPI();\n //$api.enter();\n $(\"body\").css('overflowY', 'hidden');\n $gallery.listen('close', function() {\n if($scroll){\n $(\"body\").css('overflowY', 'scroll');\n }\n $container.remove();\n $previewPlayer.player.pause = true;\n $previewPlayer.destroy();\n if($myPlayer) {\n $myPlayer.player.play = true;\n }\n });\n $gallery.listen('beforeResize', function() {\n if($fullscreen){\n $target.height($(window).height());\n }else{\n $target.height($(window).height());\n }\n $fullscreen = !$fullscreen;\n });\n },\n\n information_virtual_tour:function($data){\n $(\".virtualTourOverview\").panorama({\n control_display: 'auto',\n direction: 'left',\n autostar: 1,\n container: $('.virtualTourOverviewContainer'),\n selectionEvent: function ($e, $start) {\n\n }\n });\n },\n\n information_administrator_edit:function($params, $data){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $isEmployer = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 1 : false;\n var $isSchool = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 2 : false;\n var $isSpecialty = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 8 : false;\n var $thoughtLeaders = $data && $data.data && $data.data.lounge && $data.data.lounge.lounge_type_id ? $data.data.lounge.lounge_type_id == 9 : false;\n var $credential = $data && $data.data && $data.data.user_credential ? $data.data.user_credential : [];\n $isEmployer = !$isEmployer ? $params.typeName == 'employers' : $isEmployer;\n $isSchool = !$isSchool ? $params.typeName == 'schools' : $isSchool;\n $isSpecialty = !$isSpecialty ? $params.typeName == 'specialties' : $isSpecialty;\n $thoughtLeaders = !$thoughtLeaders ? $params.typeName == 'thoughtLeaders' : $thoughtLeaders;\n $credential = $credential.map(function($x){return parseInt($x);});\n var $createNewLoungeAccess = $.inArray(5, $credential) != -1 ? true : false;\n var $editNewLoungeAccess = $.inArray(6, $credential) != -1 ? true : false;\n var $deleteNewLoungeAccess = $.inArray(15, $credential) != -1 ? true : false;\n var $helpVideos = $.inArray(37, $credential) != -1 ? true : false;\n var $allowTabs = {\n 'information': $.inArray(7, $credential) != -1 ? true : false,\n 'otherNames': $.inArray(62, $credential) != -1 && !$thoughtLeaders ? true : false,\n 'specialties': $.inArray(80, $credential) != -1 && $isSpecialty || $.inArray(80, $credential) != -1 && $thoughtLeaders ? true : false,\n 'location': $.inArray(8, $credential) != -1 && !$thoughtLeaders ? true : false,\n 'multimedia': $.inArray(9, $credential) != -1 ? true : false,\n 'virtualTour': $.inArray(83, $credential) != -1 && !$thoughtLeaders ? true : false,\n 'recruiters': $.inArray(10, $credential) != -1 && !$thoughtLeaders ? true : false,\n 'owners': $.inArray(11, $credential) != -1 ? true : false,\n 'jobs': $.inArray(12, $credential) != -1 && $isEmployer || $.inArray(12, $credential) != -1 && $isSchool ? true : false,\n 'import': $.inArray(13, $credential) != -1 && $isEmployer || $.inArray(13, $credential) != -1 && $isSchool ? true : false,\n 'api': $.inArray(13, $credential) != -1 && $isEmployer || $.inArray(13, $credential) != -1 && $isSchool ? true : false,\n 'statistics': $.inArray(14, $credential) != -1 ? true : false,\n 'degrees': $.inArray(17, $credential) != -1 && $isSchool ? true : false,\n 'invite': $.inArray(24, $credential) != -1 ? true : false,\n 'inviteStatistics': $.inArray(28, $credential) != -1 ? true : false,\n 'inviteTemplates': $.inArray(66, $credential) != -1 ? true : false,\n 'createLogo': $.inArray(67, $credential) != -1 ? true : false,\n 'buyAds': $.inArray(71, $credential) != -1 && $isSchool ? true : false,\n 'sponsorDegrees': $.inArray(75, $credential) != -1 && $isSchool ? true : false,\n 'spotlightJobs': $.inArray(77, $credential) != -1 && !$isSchool && !$thoughtLeaders ? true : false,\n };\n var $allowTabsFiltered = $allowTabs;\n $allowTabs = {};\n $.each($allowTabsFiltered, function($k, $v) {var $newObj = {};$newObj[$k]=$v;if($v){$.extend($allowTabs, $newObj);}});\n var $information = $(\"#nurseslounge-lounge-information\");\n var $informationRight = $information.find('.nurseslounge-lounge-information-right:first .administrator:first');\n var $options = $informationRight.find('.option');\n $options.each(function(){\n var $that = $(this);\n var $action = $that.data('action');\n if(\n $createNewLoungeAccess && $action == 'create' ||\n $editNewLoungeAccess && $action == 'edit' ||\n $deleteNewLoungeAccess && $action == 'delete' ||\n $helpVideos && $action == 'help-videos' ||\n $helpVideos && $action == 'create-pin-it' ||\n $helpVideos && $action == 'create-event' ||\n $helpVideos && $action == 'send-invitation' ||\n $helpVideos && $action == 'examples-posts'\n ) {\n $that.unbind().click(function () {\n var $tab = null;\n $.each($allowTabs, function($i, $v){\n if($v){\n $tab = $i;\n return false;\n }\n });\n if(\n $tab && $action == 'create' ||\n $tab && $action == 'edit'\n ){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, function () {\n $modal.scrollTop(0);\n $modal.modal('show');\n });\n }else\n if($tab && $action == 'help-videos'){\n window.open('https://www.home.nurseslounge.com/help-center', '_blank', '');\n }else\n if($tab && $action == 'create-pin-it'){\n nurseslounge_lounge_overview.information_administrator_tab_open_video('https://www.youtube.com/watch?v=NedHuxskMV8');\n }else\n if($tab && $action == 'create-event'){\n nurseslounge_lounge_overview.information_administrator_tab_open_video('https://www.youtube.com/watch?v=Dd4XKeHIAo0');\n }else\n if($tab && $action == 'send-invitation'){\n nurseslounge_lounge_overview.information_administrator_tab_open_video('https://www.youtube.com/watch?v=FbQw8gA_KmU');\n }else\n if($tab && $action == 'examples-posts'){\n nurseslounge_lounge_overview.information_administrator_tab_open_images();\n }else\n if($action == 'delete'){\n if(confirm('Are you sure you want to delete this lounge?')){\n $params = $.extend({},$params, {action:$action,tab:$action});\n nurseslounge_lounge_overview.information_administrator_tab_request($params, function($data){\n if($data.status == 'success'){\n router.navigate('/lounges');\n }\n });\n }\n }\n });\n }\n });\n if($isEmployer){\n $modal.find('.nav-pills .nav-link[data-target=\"#otherNames\"]').html(\"Facility Names\");\n }else{\n $modal.find('.nav-pills .nav-link[data-target=\"#otherNames\"]').html(\"Other Names\");\n }\n },\n information_administrator_tab_open_video($video){\n var $modal = $(\"#nurseslounge-overview-menu-modal\");\n var $videoDiv = $modal.find('.video:first');\n $videoDiv.replaceWith('
    ');\n $videoDiv = $modal.find('.video:first');\n var $urlVideo = new URL($video);\n var $videoId = $urlVideo.searchParams.get('v');\n var $youtubePlayer = libs.memoryGet('youtubePlayer');\n if($youtubePlayer){\n $youtubePlayer.destroy();\n }\n try{\n $youtubePlayer = new YT.Player($videoDiv[0], {\n height: '360',\n width: '100%',\n videoId: $videoId,\n playerVars: {'autoplay': 1, 'controls': 1},\n events: {\n 'onReady': function () {\n $youtubePlayer.mute();\n $youtubePlayer.playVideoAt(0);\n },\n 'onError': function () {\n $videoDiv.hide();\n libs.memorySave('youtubePlayer', null);\n nurseslounge_lounge_overview.information_administrator_tab_open_video($video);\n }\n }\n });\n }catch ($e) {\n\n }\n libs.memorySave('youtubePlayer', $youtubePlayer);\n $modal.modal('show');\n },\n information_administrator_tab_open_images(){\n var $modal = $(\"#nurseslounge-overview-menu-modal\");\n var $chtml = '
    ';\n for(var $i=1; $i<9; $i++){\n $chtml+='' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ';\n }\n $chtml+='
    ';\n var $videoDiv = $modal.find('.video:first');\n libs.checkImageLoad($($chtml).find('img'), function(){\n $videoDiv.replaceWith($chtml);\n $modal.modal('show');\n });\n },\n information_administrator_select_tab:function($action, $tab, $allowTabs, $params, cback){\n nurseslounge_lounge_overview.information_administrator_tabs_events($action, $tab, $allowTabs, $params,function(){\n $params = $.extend({},$params, {user_id:libs.memoryGet('user_id'),tab:$tab,action:$action});\n nurseslounge_lounge_overview.information_administrator_load($tab, $params, function(){\n switch ($tab) {\n case 'information':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data){\n if($data.data.purchase_clicks == 0 && $data.data.lounge.lounge_type_id == 1){\n nurseslounge_lounge_overview.information_administrator_tab_information_buy_clicks($params, function(){\n nurseslounge_lounge_overview.information_administrator_tab_information($action, $tab, $allowTabs, $params, $data, cback);\n });\n }else{\n nurseslounge_lounge_overview.information_administrator_tab_information($action, $tab, $allowTabs, $params, $data, cback);\n }\n });\n break;\n case 'otherNames':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data){\n nurseslounge_lounge_overview.information_administrator_tab_otherNames($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'specialties':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data){\n nurseslounge_lounge_overview.information_administrator_tab_specialties($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'location':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_location($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'multimedia':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_multimedia($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'virtualTour':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_virtual_tour($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'recruiters':\n nurseslounge_lounge_overview.information_administrator_tab_recruiters($action, $tab, $allowTabs, $params, null, cback);\n break;\n case 'owners':\n nurseslounge_lounge_overview.information_administrator_tab_owners($action, $tab, $allowTabs, $params, null, cback);\n break;\n case 'jobs':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_jobs($action, $tab, $params, $data, cback);\n });\n break;\n case 'degrees':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_degrees($action, $tab, $params, $data, cback);\n });\n break;\n case 'import':\n nurseslounge_lounge_overview.information_administrator_tab_import($action, $tab, $params, null, cback);\n break;\n case 'api':\n nurseslounge_lounge_overview.information_administrator_tab_api($action, $tab, $params, null, cback);\n break;\n case 'statistics':\n //nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_administrator_tab_statistics($action, $tab, $params, null, cback);\n //});\n break;\n case 'invite':\n nurseslounge_lounge_overview.information_tab_invite($action, $tab, $params, null, cback);\n break;\n case 'inviteStatistics':\n nurseslounge_lounge_overview.information_tab_invite_statistics($action, $tab, $params, null, cback);\n break;\n case 'inviteTemplates':\n nurseslounge_lounge_overview.information_tab_invite_templates($action, $tab, $allowTabs, $params, null, cback);\n break;\n case 'createLogo':\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n nurseslounge_lounge_overview.information_tab_create_logo($action, $tab, $allowTabs, $params, $data, cback);\n });\n break;\n case 'buyAds':\n nurseslounge_lounge_overview.information_tab_buy_ads($action, $tab, $allowTabs, $params, null, cback);\n break;\n case 'sponsorDegrees':\n nurseslounge_lounge_overview.information_tab_sponsor_degrees($action, $tab, $allowTabs, $params, null, cback);\n break;\n case 'spotlightJobs':\n nurseslounge_lounge_overview.information_tab_spotlight_jobs($action, $tab, $allowTabs, $params, null, cback);\n break;\n }\n });\n });\n },\n information_administrator_tabs_events:function($action, $tab, $allowTabs, $params, cback){\n //Disable All\n $('#nurseslounge-lounge-information-edit-modal .nav-pills .nav-link').addClass('disabled').removeClass('active');\n $('#nurseslounge-lounge-information-edit-modal .lounge-information-modal-container .tab-pane .container').html('');\n //Events\n $('#nurseslounge-lounge-information-edit-modal .nav-pills a[data-toggle=\"tab\"]').unbind().on('shown.bs.tab', function ($e) {\n var $selectedTab = $e.currentTarget.dataset.target.replace('#','');\n if($.inArray($selectedTab, Object.keys($allowTabs)) > -1){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $selectedTab, $allowTabs, $params, function(){\n $(\"#nurseslounge-lounge-information-edit-modal\").scrollTop(0);\n });\n }\n });\n //Enable selected\n $.each($allowTabs, function ($i, $v) {\n $(\"#\"+$v).removeClass('active').removeClass('show');\n $('#nurseslounge-lounge-information-edit-modal .nav-pills .nav-link[data-target=\"#'+$i+'\"]').removeClass('disabled');\n });\n $('#nurseslounge-lounge-information-edit-modal .nav-pills .nav-link[data-target=\"#'+$tab+'\"]').addClass('active');\n $(\"#\"+$tab).addClass('active').addClass('show');\n if($action == 'create'){\n $(\"#nurseslounge-lounge-information-edit-modal .modal-title\").html('Create');\n }\n if($action == 'edit'){\n $(\"#nurseslounge-lounge-information-edit-modal .modal-title\").html('Click through the tabs to navigate your Lounge Manager.');\n }\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_load:function($tab, $params, cback){\n nurseslounge_lounge_overview.information_administrator_edit_view_get($tab, $params, function($chtml){\n var $images = $($chtml).find('img');\n libs.checkImageLoad($images, function(){\n $(\"#\"+$tab+\" .container\").html($chtml).promise().done(function(){\n if(cback != undefined){\n cback();\n }\n });\n });\n });\n },\n information_administrator_edit_view_get:function($tab, $params, cback){\n $params = $.extend({},$params,{user_id:libs.memoryGet('user_id'),tab:$tab});\n $.ajax({\n type: 'POST',\n url: '/lounge/informationView/get',\n data: $params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_administrator_tab_information_buy_clicks:function($params, cback){\n var $modal = $(\"#nurseslounge-lounge-overview-buy-clicks-modal\");\n nurseslounge_lounge_overview.information_administrator_tab_information_buy_clicks_request($params, function($chtml){\n var $paymentForm = $modal.find('.payment-form');\n $paymentForm.html($chtml).promise().done(function(){\n nurseslounge_lounge_overview.information_administrator_tab_information_buy_clicks_events($params, cback);\n $modal.modal('show');\n });\n });\n },\n information_administrator_tab_information_buy_clicks_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyClicks/get',\n data: $params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n\n },\n information_administrator_tab_information_buy_clicks_events:function($params, cback){\n try{\n var $cardSaved = libs.memoryGet('nurseslounge_lounge_overview_card');\n if($cardSaved){\n $cardSaved.destroy();\n }\n }catch ($e){\n\n }\n var $modal = $(\"#nurseslounge-lounge-overview-buy-clicks-modal\");\n var $paymentForm = $modal.find(\"form[name='stripe-form-popup']\")\n var $paymentFormWrapper = $paymentForm.find('.payment-form-wrapper');\n var $onProgressWrapper = $paymentForm.find('.on-progress-checkmark-wrapper');\n var $successWrapper = $paymentForm.find('.success-checkmark-wrapper');\n var $inputClicks = $paymentForm.find('input[name=\"clicks\"]');\n var $clicksAmount = $paymentForm.find('.clicks-amount');\n var $btnContinue = $paymentForm.find('.continue');\n var $submitButton = $paymentForm.find('button[type=\"submit\"]');\n $paymentFormWrapper.show();\n $onProgressWrapper.hide();\n $successWrapper.hide();\n $submitButton.prop('disabled', false);\n $inputClicks.unbind().change(function(){\n $clicksAmount.html('clicks = $'+($inputClicks.val() * 3)+'.00');\n });\n var $card = stripe.elements();\n var $style = {\n base: {\n 'lineHeight': '1.5',\n 'fontSize': '1.09em',\n 'color': '#00184A',\n 'fontFamily': \"sans-serif\",\n 'height':'100%',\n 'fontWeight':'100',\n 'opacity': '0.9',\n '::placeholder': {\n 'color':'#636c72',\n 'opacity':'0.9'\n }\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\"\n },\n };\n var $cardDom = $paymentForm.find('.card:first')[0];\n var $cardEle = $card.create('card', {style:$style});\n $cardEle.mount($cardDom);\n libs.memorySave('nurseslounge_lounge_overview_card', $cardEle);\n nurseslounge_lounge_overview.information_administrator_tab_information_buy_clicks_validate(function($form){\n var $objForm = libs.getObjForm($form);\n $submitButton.prop('disabled', true);\n $paymentFormWrapper.hide();\n $onProgressWrapper.show();\n stripe.createToken($cardEle, {\n name:$objForm.name,\n address_country:'US',\n currency:'usd'\n }).then(function($res) {\n if($res.token && $res.token.id){\n var $newParams = $.extend({}, $objForm, $res, $params, {autocharge:0});\n nurseslounge_lounge_overview.information_administrator_tab_jobs_stripe_request($newParams, function($data){\n if($data.status == 'success'){\n $paymentFormWrapper.hide();\n $onProgressWrapper.hide();\n $successWrapper.show();\n $btnContinue.unbind().click(function(){\n $paymentForm[0].reset();\n $inputClicks.change();\n $successWrapper.hide();\n $modal.on('hidden.bs.modal',function($e){\n cback();\n }).modal('hide');\n });\n }else{\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $data.data.msg});\n $paymentForm.find(\"input[name='card']\").val('');\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n }else{\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n });\n $cardEle.on('change', function($e){\n if(!$e.complete && $e.error && $e.error.message){\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $e.error.message});\n $paymentForm.find(\"input[name='card']\").val('');\n $paymentForm.find('.invalid-feedback').hide();\n $paymentForm.find('.error').removeClass('error');\n $paymentForm.find('.is-invalid').removeClass('is-invalid');\n }else{\n $paymentForm.find(\"input[name='card']\").val('complete');\n }\n });\n },\n information_administrator_tab_information_buy_clicks_validate:function(cback){\n $.validator.addMethod('minStrict', function ($val, $el, $par) {\n return $val > $par;\n });\n var $modal = $(\"#nurseslounge-lounge-overview-buy-clicks-modal\");\n var $paymentForm = $modal.find(\"form[name='stripe-form-popup']\")\n var $validator;\n try {\n $validator = $paymentForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $paymentForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n clicks: {\n required: true,\n minStrict: 99,\n number: true\n },\n name: {\n required: true,\n minlength: 3,\n maxlength: 191,\n },\n card: {\n required: true\n }\n },\n messages: {\n clicks:{\n required: \"The clicks is required\",\n minStrict:\"The clicks should be greater than 99\",\n number: \"The clicks should be a number\"\n },\n name:{\n required: \"The name is required\",\n minlength: \"The name must have at least 3 characters\",\n maxlength: \"The name cannot exceed 191 characters\"\n },\n card:{\n required: \"The card is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n information_administrator_tab_information:function($action, $tab, $allowTabs, $params, $data, cback){\n var $loungeSchoolClass = $data && $data.data && $data.data.lounge_school_class ? $data.data.lounge_school_class : null;\n var $loungeSchoolType = $data && $data.data && $data.data.lounge_school_type ? $data.data.lounge_school_type : null;\n var $loungeType = $data && $data.data && $data.data.lounge_type ? $data.data.lounge_type : null;\n var $lounge = $data && $data.data && $data.data.lounge ? $data.data.lounge : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $information = $modal.find(\".lounge-information-modal-container #information .container\");\n var $informationForm = $information.find('form:first');\n var $overview = $informationForm.find('.overview');\n var $schoolClassDiv = $informationForm.find('.lounge-school-class');\n var $schoolTypeDiv = $informationForm.find('.lounge-school-type');\n $informationForm.find(\"input[name='phoneNumber']\").mask('+(00) 000-000-0000');\n var $loungeTypeOptions = '';\n $loungeTypeOptions += '';\n $.each($loungeType, function($i, $v){\n $loungeTypeOptions += '';\n });\n var $loungeClassOptions = '';\n $loungeClassOptions += '';\n var $loungeSchoolClassValue = '';\n $.each($loungeSchoolClass, function($i, $v){\n switch($v){\n case 'Campus Only':\n $loungeSchoolClassValue = 'Campus Only: Degree Programs are only offered for on campus learning.';\n break;\n case 'Online Only':\n $loungeSchoolClassValue = 'Online Only: All Degree Programs offered are 100% online.';\n break;\n case 'Hybrid':\n $loungeSchoolClassValue = 'Both: Degrees offered for both campus learning and distance learning.';\n break;\n }\n $loungeClassOptions += '';\n });\n var $loungeSchoolTypeOptions = '';\n $loungeSchoolTypeOptions += '';\n var $loungeSchoolTypeValue = '';\n $.each($loungeSchoolType, function($i, $v){\n switch($v){\n case 'ADN/ASN School':\n $loungeSchoolTypeValue = 'ADN School: The maximum degree level we offer is a 2-year nursing degree program such as ADN.';\n break;\n case 'BS/BSN School':\n $loungeSchoolTypeValue = 'BS/BSN School: We offer a minimum of a B.S. or Bachelor\\'s Degree in Nursing.';\n break;\n case 'Graduate School Only':\n $loungeSchoolTypeValue = 'Graduate School Only: We only offer graduate degree programs.';\n break;\n }\n $loungeSchoolTypeOptions += '';\n });\n $informationForm.find(\"select[name='loungeType']\").html($loungeTypeOptions).promise().done(function(){\n $(this).unbind().change(function(){\n if($(this).val() == '2'){\n $schoolClassDiv.show();\n $schoolTypeDiv.show();\n $schoolClassDiv.parent().show();\n $schoolTypeDiv.parent().show();\n }else{\n $schoolClassDiv.hide();\n $schoolTypeDiv.hide();\n $schoolClassDiv.parent().hide();\n $schoolTypeDiv.parent().hide();\n }\n });\n });\n $informationForm.find(\"select[name='loungeSchoolClass']\").html($loungeClassOptions);\n $informationForm.find(\"select[name='loungeSchoolType']\").html($loungeSchoolTypeOptions).promise().done(function(){\n nurseslounge_lounge_overview.information_administrator_tab_information_validate(function($form){\n var $formObj = libs.getObjForm($form);\n var $formOverview = $overview.summernote('code');\n var $newParams = $.extend({},$params, $formObj);\n $newParams = $.extend({},$newParams, {overview:$formOverview,action:$action,tab:$tab});\n $information.html('' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ');\n nurseslounge_lounge_overview.information_administrator_tab_request($newParams, function($data){\n var $action = $data.data.action;\n var $key = $data.data.key;\n $params = $.extend({},$params, {key:$key,action:$action});\n if($data.status == 'success'){\n if($newParams.action == 'create'){\n router.navigate($data.data.link,true);\n nurseslounge_lounge_overview.init($params, function ($data) {\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n }\n if($newParams.action == 'edit'){\n libs.refreshBoxFrom('.page-contents', $params, function(){\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n });\n });\n }\n }else{\n $modal.modal('hide');\n }\n });\n });\n try{\n $overview.summernote('destroy');\n }catch (e) {\n\n }\n var $stripTags = function ($context) {\n var $ui = $.summernote.ui;\n var $button = $ui.button({\n contents: 'Remove Formatting',\n tooltip: 'Strip Tags',\n click: function () {\n var $text = [];\n var $code = $overview.summernote(\"code\");\n $($code).each(function(){\n $text.push('

    '+$(this).text()+'

    ');\n });\n $code = $text.join('');\n $overview.summernote(\"code\", $code);\n }\n });\n return $button.render();\n }\n $overview.summernote({\n placeholder: 'Overview ...',\n height: '400px',\n width: '100%',\n focus: true,\n disableResizeEditor: true,\n dialogsInBody: true,\n dialogsFade: true,\n codeviewFilter: true,\n codeviewIframeFilter: true,\n spellCheck: true,\n disableGrammar: false,\n styleTags: [\n 'p',\n 'pre', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'\n ],\n fontNames: ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New'],\n fontSizeUnits: ['pt', 'px'],\n toolbar: [\n ['style', ['style']],\n ['font', ['fontname', 'fontsize', 'fontsizeunit']],\n ['font', ['forecolor', 'backcolor']],\n ['font', ['bold', 'italic', 'underline']],\n ['para', ['ul', 'ol', 'paragraph']],\n ['para', ['height']],\n ['hr', ['hr']],\n ['stripTags', ['stripTags']]\n ],\n buttons: {\n stripTags: $stripTags\n }\n });\n //Set values\n if($lounge.lounge_type_id) {\n $informationForm.find(\"select[name='loungeType']\").val($lounge.lounge_type_id).attr('disabled', 'disabled');\n }\n if($lounge.school_class_id) {\n $informationForm.find(\"select[name='loungeSchoolClass']\").val($lounge.school_class_id);\n }\n if($lounge.school_type_id) {\n $informationForm.find(\"select[name='loungeSchoolType']\").val($lounge.school_type_id);\n }\n if($lounge.lounge_type_id == 2){\n $schoolClassDiv.show();\n $schoolTypeDiv.show();\n $schoolClassDiv.parent().show();\n $schoolTypeDiv.parent().show();\n }else{\n $schoolClassDiv.hide();\n $schoolTypeDiv.hide();\n $schoolClassDiv.parent().hide();\n $schoolTypeDiv.parent().hide();\n }\n if($lounge.name) {\n $informationForm.find(\"input[name='loungeName']\").val($lounge.name);\n }\n if($lounge.description) {\n $overview.summernote('code', $lounge.description);\n }\n if($lounge.tagline) {\n $informationForm.find(\"input[name='tagline']\").val($lounge.tagline);\n }\n if($lounge.url) {\n $informationForm.find(\"input[name='website']\").val($lounge.url);\n }\n if($lounge.website_data){\n var $websiteData = $lounge.website_data;\n $informationForm.find('.website-thumb').hide();\n $informationForm.find(\".website-thumb .logo img\").attr('src', '/bimg/NursesLounge/wa-loader.gif');\n $informationForm.find(\".website-thumb .logo\").hide();\n $informationForm.find(\".website-thumb .title\").hide();\n $informationForm.find(\".website-thumb .description\").hide();\n if ($websiteData != null && $websiteData[1] != '') {\n $informationForm.find(\".website-thumb .logo img\").attr('src', $websiteData[1]);\n $informationForm.find(\".website-thumb .logo\").show();\n }\n if ($websiteData != null && $websiteData[3] != '') {\n $informationForm.find(\".website-thumb .title\").html($websiteData[3]);\n $informationForm.find(\".website-thumb .title\").show();\n }\n if ($websiteData != null && $websiteData[4] != '') {\n $informationForm.find(\".website-thumb .description\").html($websiteData[4]);\n $informationForm.find(\".website-thumb .description\").show();\n }\n if ($websiteData != null && $websiteData[1] != '' ||\n $websiteData != null && $websiteData[3] != '' ||\n $websiteData != null && $websiteData[4] != '') {\n $informationForm.find('.website-thumb').show();\n }\n }\n if($lounge.email) {\n $informationForm.find(\"input[name='email']\").val($lounge.email);\n }\n if($lounge.phone) {\n $informationForm.find(\"input[name='phoneNumber']\").val($lounge.phone);\n }\n });\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_information_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#information form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#information form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n loungeType: {\n required: true\n },\n loungeSchoolClass: {\n required: function(){\n return $(\"#information form select[name='loungeType']\").val() == 2\n }\n },\n loungeSchoolType: {\n required: function(){\n return $(\"#information form select[name='loungeType']\").val() == 2\n }\n },\n loungeName: {\n required: true,\n minlength: 3,\n maxlength: 191\n },\n tagline: {\n required: false,\n minlength: 3,\n maxlength: 191\n },\n website: {\n required: false,\n minlength: 3,\n maxlength: 191\n },\n email: {\n required: false,\n minlength: 3,\n maxlength: 191,\n email:true\n }\n },\n messages: {\n loungeType:{\n required: \"The lounge type is required\"\n },\n loungeSchoolClass: {\n required: \"The lounge school class is required\"\n },\n loungeSchoolType: {\n required: \"The lounge school type is required\"\n },\n loungeName: {\n required: \"The lounge name is required\",\n minlength: \"The lounge name must have at least 3 characters\",\n maxlength: \"The lounge name cannot exceed 191 characters\"\n },\n tagline: {\n required: \"The tagline is not required\",\n minlength: \"The tagline must have at least 3 characters\",\n maxlength: \"The tagline cannot exceed 191 characters\"\n },\n website: {\n required: \"The website is not required\",\n minlength: \"The website must have at least 3 characters\",\n maxlength: \"The website cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is not required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n information_administrator_tab_specialties:function($action, $tab, $allowTabs, $params, $data, cback){\n var $specialtiesVal = $data && $data.data && $data.data.lounge && $data.data.lounge.specialties ? $data.data.lounge.specialties : [];\n $specialtiesVal = libs.pluck($specialtiesVal, 'specialty_id');\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $specialtiesForm = $modal.find(\".lounge-information-modal-container #specialties .container\");\n var $specialties = $specialtiesForm.find(\"select[name='specialties']\");\n try{\n $specialties.chosen('destroy');\n }catch (e) {}\n $specialties.chosen();\n $specialties.val($specialtiesVal).trigger(\"chosen:updated\");\n $specialties.unbind();\n nurseslounge_lounge_overview.information_administrator_tab_specialties_validate(function($form){\n var $formObj = libs.getObjForm($form);\n var $newParams = $.extend({},$params, $formObj);\n nurseslounge_lounge_overview.information_administrator_tab_request($newParams, function($data){\n if($data.status == 'success'){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n }else{\n $modal.modal('hide');\n }\n });\n });\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_specialties_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#specialties form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#specialties form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n specialties: {\n required: false\n }\n },\n messages: {\n specialties:{\n required: \"The specialties is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n information_administrator_tab_otherNames:function($action, $tab, $allowTabs, $params, $data, cback){\n var $lounge = $data && $data.data && $data.data.lounge ? $data.data.lounge : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $otherNamesForm = $modal.find(\".lounge-information-modal-container #otherNames .container\");\n var $otherNames = $otherNamesForm.find(\"input[name='otherNames']\");\n var $tagify = libs.memoryGet('nurseslounge_lounge_overview_tagify');\n if($tagify){\n try{\n $tagify.removeAllTags();\n $tagify.destroy();\n $otherNamesForm.find(\".tagify__input--outside\").remove();\n }catch ($e) {\n\n }\n }\n $tagify = new Tagify($otherNames[0]);\n $tagify.DOM.input.classList.add('tagify__input--outside');\n $tagify.DOM.scope.parentNode.insertBefore($tagify.DOM.input, $tagify.DOM.scope);\n if($lounge.lounge_name){\n if ($lounge.lounge_name.length > 0) {\n $.each($lounge.lounge_name, function ($i, $v) {\n $tagify.addTags($v.name);\n });\n }\n }\n libs.memorySave('nurseslounge_lounge_overview_tagify', $tagify);\n nurseslounge_lounge_overview.information_administrator_tab_otherNames_validate(function($form){\n var $formObj = libs.getObjForm($form);\n if($formObj.otherNames != ''){\n $formObj = JSON.parse($formObj.otherNames);\n }\n var $newParams = $.extend({},$params, {otherNames:$formObj});\n $otherNamesForm.html('' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ');\n nurseslounge_lounge_overview.information_administrator_tab_request($newParams, function($data){\n if($data.status == 'success'){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n }else{\n $modal.modal('hide');\n }\n });\n });\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_otherNames_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#otherNames form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#otherNames form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n otherNames: {\n required: false\n }\n },\n messages: {\n otherNames:{\n required: \"The lounge other names is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n information_administrator_tab_location:function($action, $tab, $allowTabs, $params, $data, cback){\n var $location = $data && $data.data && $data.data.lounge && $data.data.lounge.location ? $data.data.lounge.location : null;\n var $addressStateId = $data && $data.data && $data.data.address_state_id ? $data.data.address_state_id : null;\n var $states = $data && $data.data && $data.data.states ? $data.data.states :null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $locationContainer = $modal.find(\".lounge-information-modal-container #location .container\");\n var $locationForm = $locationContainer.find('form:first');\n nurseslounge_lounge_overview.information_administrator_tab_location_validate(function($form){\n var $formObj = libs.getObjForm($form);\n var $newParams = $.extend({},$params, $formObj);\n $newParams = $.extend({},$newParams, {action:$action,tab:$tab});\n $locationContainer.html('' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ');\n nurseslounge_lounge_overview.information_administrator_tab_request($newParams, function($data){\n if($data.status == 'success'){\n libs.refreshBoxFrom('.page-contents', $params, function(){\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n });\n });\n }else{\n $modal.modal('hide');\n }\n });\n });\n var $stateArr = [];\n $.each($states, function($i, $v){\n $stateArr.push([$i, $v]);\n });\n $stateArr.sort(function($a, $b) {\n if($a[1] < $b[1]) { return -1; }\n if($a[1] > $b[1]) { return 1; }\n return 0;\n });\n var $stateChtml = '';\n $stateChtml += '';\n $.each($stateArr, function($i, $v){\n $stateChtml += '';\n });\n $locationForm.find('select[name=\"state\"]').html($stateChtml).promise().done(function(){\n if($location && $location.address_street) {\n $locationForm.find('input[name=\"street\"]').val($location.address_street);\n }\n if($location && $location.address_city) {\n $locationForm.find('input[name=\"city\"]').val($location.address_city);\n }\n if($addressStateId) {\n $locationForm.find('select[name=\"state\"]').val($addressStateId);\n }\n if($location && $location.address_zip_code) {\n $locationForm.find('input[name=\"zipCode\"]').val($location.address_zip_code);\n }\n if($location && $location.address_latitude && $location.address_longitude) {\n nurseslounge_lounge_overview.information_administrator_tab_location_map($location, function () {\n if ($location.address_is_unmappable == 0) {\n $locationForm.find('.lat').html($location.address_latitude).show();\n $locationForm.find('.lng').html($location.address_longitude).show();\n $locationForm.find('#edit-location-map').show();\n } else {\n $locationForm.find('.lat').hide();\n $locationForm.find('.lng').hide();\n $locationForm.find('#edit-location-map').hide();\n }\n });\n }\n if(cback != undefined){\n cback();\n }\n });\n },\n information_administrator_tab_location_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#location form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#location form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n street: {\n required: false,\n minlength: 3,\n maxlength: 191\n },\n city: {\n required: false,\n minlength: 3,\n maxlength: 191\n },\n state: {\n required: true\n },\n zipCode: {\n required: false,\n minlength: 3,\n maxlength: 191\n }\n },\n messages: {\n street: {\n required: \"The street is not required\",\n minlength: \"The street must have at least 3 characters\",\n maxlength: \"The street cannot exceed 191 characters\"\n },\n city: {\n required: \"The city is not required\",\n minlength: \"The city must have at least 3 characters\",\n maxlength: \"The city cannot exceed 191 characters\"\n },\n state: {\n required: \"The state is required\"\n },\n zipCode: {\n required: \"The zip code is not required\",\n minlength: \"The zip code must have at least 3 characters\",\n maxlength: \"The zip code cannot exceed 191 characters\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_administrator_tab_location_map:function($location, cback){\n if($location && $location.address_latitude && $location.address_longitude && $location.address_is_unmappable == 0){\n try{\n var $position = new google.maps.LatLng(parseFloat($location.address_latitude), parseFloat($location.address_longitude));\n var $iconUrl = './../../bimg/NursesLounge/active.png';\n var $map = new google.maps.Map(document.getElementById('edit-location-map'), {\n center:$position,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n mapTypeControl: false,\n streetViewControl: false,\n fullscreenControl: false,\n zoom: 15\n });\n $map.setTilt(0);\n var $marker = new google.maps.Marker({\n position:$position,\n map: $map,\n animation: google.maps.Animation.DROP,\n icon: {url:$iconUrl, scaledSize: (new google.maps.Size(20, 35))},\n });\n }catch (e) {\n\n }\n }\n if(cback != undefined){\n cback();\n }\n },\n\n information_administrator_tab_multimedia:function($action, $tab, $allowTabs, $params, $data, cback){\n var $lounge = $data && $data.data && $data.data.lounge ? $data.data.lounge : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $multimedia = $modal.find(\".lounge-information-modal-container #multimedia .container\");\n var $form = $multimedia.find('form');\n var $logoFileInput = $multimedia.find('input[name=\"logo\"]');\n var $changeLogoButton = $multimedia.find('.logo-change:first');\n var $logoImage = $multimedia.find('.logo:first');\n var $thumbnailImg = $multimedia.find('.thumbnail-img:first');\n var $photoFileInput = $multimedia.find('input[name=\"photo\"]');\n var $changePhotoButton = $multimedia.find('.photo-change:first');\n var $photoImage = $multimedia.find('.photo:first');\n var $youtubeVideo = $multimedia.find('input[name=\"youtubeVideo\"]');\n var $myVideoFileInput = $multimedia.find('input[name=\"video\"]');\n var $myVideoButton = $multimedia.find('.update-my-video');\n var $myVideoDelete = $multimedia.find('.delete-my-video');\n var $videoRoot = '';\n var $urlBindind;\n var $originalLogoImage = $logoImage;\n $logoFileInput.unbind().change(function(){\n var $that = this;\n $logoImage = $multimedia.find('.logo:first');\n libs.renderImage($that, $logoImage);\n var $image = $logoImage.cropme({\n \"container\": {\n \"width\": $logoImage.width(),\n \"height\": $logoImage.height()\n },\n \"viewport\": {\n \"width\": $logoImage.width(),\n \"height\": $logoImage.width(),\n \"type\": \"circle\",\n \"border\": {\n \"width\": 0,\n \"enable\": true,\n \"color\": \"#ffffff\"\n }\n },\n \"zoom\": {\n \"enable\": true,\n \"mouseWheel\": true,\n \"slider\": false\n },\n \"rotation\": {\n \"slider\": false,\n \"enable\": false,\n \"position\": \"left\"\n },\n \"transformOrigin\": \"viewport\"\n });\n $thumbnailImg.find('.cropme-wrapper').prependTo($thumbnailImg);\n if($($that)[0].files != ''){\n $changeLogoButton.unbind().click(function(){\n $image.cropme('crop', {\n type: 'base64'\n }).then(function($imageBase64) {\n $image.cropme('destroy');\n $thumbnailImg.find('div:first').remove();\n $thumbnailImg.prepend($originalLogoImage);\n $logoImage = $multimedia.find('.logo:first');\n $logoImage.attr('src', $imageBase64);\n $changeLogoButton.unbind().click(function(){\n $logoFileInput.click();\n });\n });\n });\n }else{\n $changeLogoButton.unbind().click(function(){\n $logoFileInput.click();\n });\n }\n\n });\n $changeLogoButton.unbind().click(function(){\n $logoFileInput.click();\n });\n $photoFileInput.unbind().change(function(){\n libs.renderImage(this, $photoImage);\n });\n $changePhotoButton.unbind().click(function(){\n $photoFileInput.click();\n });\n $myVideoDelete.unbind().click(function(){\n var $myVideo = libs.memoryGet('my-video') ? libs.memoryGet('my-video') : false;\n try {\n $myVideo.destroy();\n } catch (e) {\n\n }\n $videoRoot = '';\n $myVideoButton.show();\n $myVideoDelete.hide();\n });\n $myVideoFileInput.unbind().change(function(){\n if(this.files && this.files[0]){\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('user_id', libs.memoryGet('user_id'));\n $formData.append('tab', $tab);\n $formData.append('key', $params.key);\n $formData.append('action', 'previewVideo');\n $formData.append('video', this.files[0]);\n nurseslounge_lounge_overview.information_administrator_tab_request_files($formData, function($data){\n $videoRoot = $data.data.video_root;\n nurseslounge_lounge_overview.information_administrator_tab_multimedia_videos('myVideo', $data.data);\n });\n }\n });\n $myVideoButton.unbind().click(function(){\n $myVideoFileInput.click();\n });\n $youtubeVideo.unbind().on('keypress keyup keydown blur', function(){\n var $text = $(this).val();\n try{\n clearTimeout($urlBindind);\n }catch(e){\n\n }\n $urlBindind = setTimeout(function(){\n nurseslounge_lounge_overview.information_administrator_tab_multimedia_videos('youtubeVideoOrVimeo', {video_url:$text});\n }, 1500);\n });\n $form.unbind().on('submit', function($e){\n $e.preventDefault();\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('user_id', libs.memoryGet('user_id'));\n $formData.append('tab', $tab);\n $formData.append('key', $params.key);\n $formData.append('action', $action);\n if($logoFileInput[0].files[0]){\n $formData.append('logo', $logoFileInput[0].files[0]);\n }\n if($photoFileInput[0].files[0]){\n $formData.append('photo', $photoFileInput[0].files[0]);\n }\n $formData.append('youtube_video', $youtubeVideo.val());\n $formData.append('my_video', $videoRoot);\n nurseslounge_lounge_overview.information_administrator_tab_request_files($formData, function($data){\n if($data.status == 'success') {\n $(\".nav.nav-underline [data-id='overview']\").click();\n libs.refreshBoxFrom(\".top-nav-menu\", $params, function () {\n $(\"#nurseslounge-lounge .nav-underline a:eq(0)\").addClass('active');\n nurseslounge_lounge_header.followers($params);\n libs.refreshBoxFrom(\".page-contents\", $params, function () {\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n });\n });\n });\n }else{\n $modal.modal('hide');\n }\n });\n });\n if ($lounge.video_url) {\n nurseslounge_lounge_overview.information_administrator_tab_multimedia_videos('youtubeVideoOrVimeo', $lounge);\n }\n if ($lounge.video_root_lounge) {\n nurseslounge_lounge_overview.information_administrator_tab_multimedia_videos('myVideo', $lounge);\n }\n if($lounge.video_url) {\n $youtubeVideo.val($lounge.video_url);\n }\n if($lounge.video_root) {\n $videoRoot = libs.isEmptyReturnNull($lounge.video_root) != null ? $lounge.video_root : '';\n }\n if($lounge.logo_root_lounge) {\n $multimedia.find('.logo').attr('src', $lounge.logo_root_lounge);\n }\n if($lounge.photo_root_lounge) {\n $multimedia.find('.photo').attr('src', $lounge.photo_root_lounge);\n }\n libs.checkImageLoad($multimedia.find('img'), function () {\n if (cback != undefined) {\n cback();\n }\n });\n },\n information_administrator_tab_multimedia_videos:function($type, $lounge){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $multimedia = $modal.find(\".lounge-information-modal-container #multimedia .container\");\n var $youtubeVideo = $multimedia.find('.youtube-video:first');\n var $myVideo = $multimedia.find('.my-video:first');\n var $myVideoDelete = $multimedia.find('.delete-my-video');\n var $myVideoButton = $multimedia.find('.update-my-video');\n var $youtubePlayer;\n switch($type){\n case 'youtubeVideoOrVimeo':\n var $vimeoRegex = new RegExp ('(vimeo)','gi');\n var $youtubeRegex = new RegExp ('(youtube)','gi');\n $youtubePlayer = libs.memoryGet('youtube-video') ? libs.memoryGet('youtube-video') : false;\n try {\n $youtubePlayer.destroy();\n } catch (e) {\n\n }\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($vimeoRegex)){\n var $url = $lounge.video_url.split('/');\n var $vimeoId = $url[$url.length - 1];\n var $vimeoPlayer = new Vimeo.Player($youtubeVideo[0], {\n id:$vimeoId,\n height: 360,\n loop: false,\n autoplay:true,\n muted:true\n });\n }\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($youtubeRegex)){\n var $url = new URL($lounge.video_url);\n window.YT.ready(function() {\n $youtubePlayer = new YT.Player($youtubeVideo[0], {\n height: '360',\n width: '100%',\n videoId: $url.searchParams.get('v'),\n events: {\n 'onReady': function () {\n $youtubePlayer.mute();\n $youtubePlayer.playVideo();\n },\n 'onError': function () {\n $youtubeVideo.hide();\n }\n }\n });\n });\n }\n libs.memorySave('youtube-video', $youtubePlayer);\n break;\n case 'myVideo':\n var $myPlayer = libs.memoryGet('my-video') ? libs.memoryGet('my-video') : false;\n try {\n $myPlayer.destroy();\n } catch (e) {\n\n }\n $myPlayer = new Artplayer({\n width: '100%',\n height: '360px',\n destroy:true,\n container: $myVideo[0],\n title: $lounge.name,\n url: $lounge.video_root_lounge,\n mutex: true,\n muted:true,\n play: true,\n controls: [\n {\n position: 'right',\n html: 'Fullscreen',\n click: function() {\n nurseslounge_lounge_overview.information_location_video_fullscreen($myPlayer, $lounge, false);\n },\n },\n ],\n moreVideoAttr: {\n crossOrigin: 'anonymous'\n }\n }).on('ready', function() {\n $myPlayer.player.pause = true;\n $myPlayer.player.play = true;\n $myVideoButton.hide();\n $myVideoDelete.show();\n }).on('pause', function(){\n $myPlayer.mask.show = false;\n });\n libs.memorySave('my-video', $myPlayer);\n break;\n }\n },\n information_administrator_tab_request_files:function($formData, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/set',\n data: $formData,\n cache: false,\n contentType: false,\n processData: false,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_request:function($params, cback){\n $.ajax({\n url: \"/lounge/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_administrator_tab_virtual_tour:function($action, $tab, $allowTabs, $params, $data, cback){\n var $virtualTourTitle = $data.data && $data.data.lounge && $data.data.lounge.virtual_tour ? $data.data.lounge.virtual_tour : null;\n var $virtualTourRootLounge = $data.data && $data.data.lounge && $data.data.lounge.virtual_tour_root_lounge ? $data.data.lounge.virtual_tour_root_lounge : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $virtualTour = $modal.find(\".lounge-information-modal-container #virtualTour .container\");\n var $virtualTourWidget = $virtualTour.find('.virtualTour');\n var $updateImage = $virtualTour.find(\".update-my-image\");\n var $deleteImage = $virtualTour.find(\".delete\");\n var $title = $virtualTour.find(\"input[name='title']\");\n var $file = $virtualTour.find(\"input[name='file']\");\n $deleteImage.hide();\n if($virtualTourTitle && $virtualTourRootLounge) {\n $title.val($virtualTourTitle);\n $virtualTourWidget.html('').promise().done(function () {\n $virtualTourWidget.append('' +\n '')\n .ready(function () {\n $virtualTourWidget.panorama({\n control_display: 'auto',\n direction: 'left',\n autostar: 1,\n container: $('.virtualTourContainer'),\n selectionEvent: function ($e, $start) {\n\n }\n });\n });\n });\n $deleteImage.unbind().click(function(){\n nurseslounge_lounge_overview.information_administrator_tab_virtual_tour_delete($params, function(){\n libs.refreshBoxFrom('.page-contents', $params, function(){\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n });\n });\n });\n });\n $deleteImage.show();\n }\n $title.unbind().on('keyup keydown keypress',function(){\n $(\".virtualTourContainer\").find('.panorama-title').html($title.val());\n });\n $file.unbind().change(function(){\n var $reader = new FileReader();\n $reader.onload = function($e) {\n $virtualTourWidget.html('').append('' +\n '')\n .ready(function(){\n $virtualTourWidget.panorama({\n control_display: 'auto',\n direction:'left',\n autostar: 1,\n container:$('.virtualTourContainer'),\n selectionEvent:function($e, $start){\n\n }\n });\n });\n };\n $reader.readAsDataURL(this.files[0]);\n });\n $updateImage.unbind().click(function(){\n $file.click();\n });\n nurseslounge_lounge_overview.information_administrator_tab_virtual_tour_validate(function($validator){\n if (!$file[0].files[0]) {\n $validator.showErrors({file: \"Update a Panoramic Image\"});\n return false;\n }\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('user_id', $params.user_id);\n $formData.append('key', $params.key);\n $formData.append('title', $title.val());\n $formData.append('file', $file[0].files[0]);\n nurseslounge_lounge_overview.information_administrator_tab_virtual_tour_request($formData, function($data){\n libs.refreshBoxFrom('.page-contents', $params, function(){\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n nurseslounge_lounge_overview.information_administrator_select_tab($action, $tab, $allowTabs, $params, cback);\n });\n });\n });\n });\n });\n cback();\n },\n information_administrator_tab_virtual_tour_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-lounge-information-edit-modal .lounge-information-modal-container #virtualTour .container form\").validate();\n $validator.destroy();\n } catch (e) {\n\n }\n $validator = $(\"#nurseslounge-lounge-information-edit-modal .lounge-information-modal-container #virtualTour .container form\").validate({\n onsubmit: true,\n debug: true,\n rules: {\n title: {\n required: true,\n minlength: 3,\n maxlength: 191\n },\n file: {\n required: false\n }\n },\n messages: {\n title: {\n required: \"The title is required\",\n minlength: \"The title must have at least 3 characters\",\n maxlength: \"The title cannot exceed 191 characters\"\n },\n file: {\n required: \"The image is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function ($form) {\n cback($validator);\n return false;\n }\n });\n },\n information_administrator_tab_virtual_tour_request: function ($data, cback) {\n $.ajax({\n url: \"/lounge/virualTour/update\",\n type: \"POST\",\n cache: false,\n contentType: false,\n processData: false,\n data: $data,\n success: function ($data) {\n libs.expire($data);\n if ($data.status == 'success') {\n cback();\n }\n }\n });\n },\n information_administrator_tab_virtual_tour_delete:function($params, cback){\n $.ajax({\n url: \"/lounge/virualTour/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_administrator_tab_recruiters:function($action, $tab, $allowTabs, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $recruiters = $modal.find(\".lounge-information-modal-container #recruiters .container\");\n var $datatableSearchButton = $recruiters.find('.search');\n var $datatableFollowers = $recruiters.find('.datatable-followers');\n var $datatableRecruiters = $recruiters.find('.datatable-recruiters');\n var $datatableSearch = $recruiters.find(\"input[name='search']\");\n var $datatableSearchBinding;\n nurseslounge_lounge_overview.information_administrator_tab_datatable(\n $datatableFollowers,\n \"/lounge/followersRecruiters/datatable\",\n \"POST\",\n $params,\n function(){\n $datatableFollowers.find('.add').unbind().click(function(){\n var $id = $(this).data('id');\n $params = $.extend({},$params, {action:\"add\",id:$id,tab:'recruiters'});\n nurseslounge_lounge_overview.information_administrator_tab_recruiters_events($params, function($data){\n if($data.status == 'success') {\n libs.refreshBoxFrom(\".page-contents\", $params, function () {\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n dataTable.reload($datatableFollowers);\n dataTable.reload($datatableRecruiters);\n });\n });\n });\n }\n });\n });\n },function($nRow){\n return $nRow;\n }, function($datatableFollowersTable){\n nurseslounge_lounge_overview.information_administrator_tab_datatable(\n $datatableRecruiters,\n \"/lounge/recruiters/datatable\",\n \"POST\",\n $params,\n function(){\n $datatableRecruiters.find('.delete').unbind().click(function(){\n var $id = $(this).data('id');\n $params = $.extend({},$params, {action:\"delete\",id:$id,tab:'recruiters'});\n nurseslounge_lounge_overview.information_administrator_tab_recruiters_events($params, function($data){\n if($data.status == 'success'){\n libs.refreshBoxFrom(\".page-contents\", $params, function () {\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n dataTable.reload($datatableFollowers);\n dataTable.reload($datatableRecruiters);\n });\n });\n });\n }\n });\n });\n },function($nRow){\n return $nRow;\n }, function($datatableRecruitersTable){\n $datatableSearchButton.unbind().click(function () {\n $datatableFollowersTable.search($datatableSearch.val());\n $datatableRecruitersTable.search($datatableSearch.val());\n $datatableFollowersTable.draw();\n $datatableRecruitersTable.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $datatableFollowersTable.search($datatableSearch.val());\n $datatableRecruitersTable.search($datatableSearch.val());\n $datatableFollowersTable.draw();\n $datatableRecruitersTable.draw();\n }, 1000);\n });\n if(cback != undefined){\n cback();\n }\n });\n });\n },\n information_administrator_tab_recruiters_events:function($params, cback){\n $.ajax({\n url: \"/lounge/recruiters/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_administrator_tab_owners:function($action, $tab, $allowTabs, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $owners = $modal.find(\".lounge-information-modal-container #owners .container\");\n var $datatableSearchButton = $owners.find('.search');\n var $datatableFollowers = $owners.find('.datatable-followers');\n var $datatableOwners = $owners.find('.datatable-owners');\n var $datatableSearch = $owners.find(\"input[name='search']\");\n var $datatableSearchBinding;\n nurseslounge_lounge_overview.information_administrator_tab_datatable(\n $datatableFollowers,\n \"/lounge/followersOwners/datatable\",\n \"POST\",\n $params,\n function(){\n $datatableFollowers.find('.add').unbind().click(function(){\n var $id = $(this).data('id');\n $params = $.extend({},$params, {action:\"add\",id:$id,tab:'owners'});\n nurseslounge_lounge_overview.information_administrator_tab_owners_events($params, function($data){\n if($data.status == 'success') {\n libs.refreshBoxFrom(\".page-contents\", $params, function () {\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n dataTable.reload($datatableFollowers);\n dataTable.reload($datatableOwners);\n });\n });\n });\n }\n });\n });\n },function($nRow){\n return $nRow;\n }, function($datatableFollowersTable){\n nurseslounge_lounge_overview.information_administrator_tab_datatable(\n $datatableOwners,\n \"/lounge/owners/datatable\",\n \"POST\",\n $params,\n function(){\n $datatableOwners.find('.delete').unbind().click(function(){\n var $id = $(this).data('id');\n $params = $.extend({},$params, {action:\"delete\",id:$id,tab:'owners'});\n nurseslounge_lounge_overview.information_administrator_tab_owners_events($params, function($data){\n if($data.status == 'success') {\n libs.refreshBoxFrom(\".page-contents\", $params, function () {\n nurseslounge_lounge.submenu($params, function(){\n nurseslounge_lounge_overview.init($params, function($data){\n dataTable.reload($datatableFollowers);\n dataTable.reload($datatableOwners);\n });\n });\n });\n }\n });\n });\n },function($nRow){\n return $nRow;\n }, function($datatableOwnersTable){\n $datatableSearchButton.unbind().click(function () {\n $datatableFollowersTable.search($datatableSearch.val());\n $datatableOwnersTable.search($datatableSearch.val());\n $datatableFollowersTable.draw();\n $datatableOwnersTable.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $datatableFollowersTable.search($datatableSearch.val());\n $datatableOwnersTable.search($datatableSearch.val());\n $datatableFollowersTable.draw();\n $datatableOwnersTable.draw();\n }, 1000);\n });\n if(cback != undefined){\n cback();\n }\n });\n });\n },\n information_administrator_tab_owners_events:function($params, cback){\n $.ajax({\n url: \"/lounge/owners/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n //Datatable for recruiters and owners\n information_administrator_tab_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $table = $($element).DataTable({\n \"dom\": \"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"iDisplayLength\": 3,\n \"aLengthMenu\": [[3],[3]],\n \"sPaginationType\": \"full_numbers\",\n \"bInfo\": false,\n \"bLengthChange\": false,\n \"autoWidth\": false,\n \"responsive\": true,\n \"bDestroy\": true,\n \"cache\": false,\n \"pageLength\": 3,\n \"pagingType\" : \"full_numbers\",\n \"searching\": true,\n \"processing\": true,\n \"stateSave\": false,\n \"serverSide\": true,\n \"initComplete\": function () {\n initComplete($table);\n },\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"ajax\": {\n \"data\":$data,\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n\n information_administrator_tab_jobs:function($action, $tab, $params, $data, cback){\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_control_form($data, $params, function(){\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_graph_form($params, function(){\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_table_form($action, $params, $data, function(){\n cback();\n });\n });\n });\n },\n information_administrator_tab_jobs_payment_control_form:function($data, $params, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $controlForm = $jobs.find(\"form[name='control-form']\");\n var $buyMoreClicks = $controlForm.find(\".buy-more-clicks\");\n var $autoChargeToggleWrapper = $controlForm.find(\".autocharge-toggle-wrapper\");\n var $stripeForm = $jobs.find(\"form[name='stripe-form']\");\n var $paymentFormWrapper = $stripeForm.find(\".payment-form-wrapper\");\n $buyMoreClicks.unbind().click(function(){\n var $that = $(this);\n if(!$paymentFormWrapper.is(':visible')){\n nurseslounge_lounge_overview.information_administrator_tab_jobs_stripe($params, function(){\n $paymentFormWrapper.show();\n $autoChargeToggleWrapper.hide();\n $that.html('Close Payment Form');\n });\n }else{\n $paymentFormWrapper.hide();\n $autoChargeToggleWrapper.show();\n $that.html('Buy More Clicks');\n }\n });\n var $autoChargeToggle = $controlForm.find(\"#autochargeToggle\");\n $autoChargeToggle.unbind().change(function(){\n var $that = $(this);\n var $autocharge = $that.is(':checked') == true ? 1 : 0;\n var $newParams = $.extend({}, $params, {autocharge:$autocharge});\n nurseslounge_lounge_overview.information_administrator_tab_jobs_autopayment_request($newParams, function($data){\n if($data.data.autocharge == 1){\n if(!$controlForm.find('#autochargeToggle').is(':checked')){\n $controlForm.find('#autochargeToggle').prop('checked', true);\n }\n if(!$stripeForm.find('#autocharge').is(':checked')){\n $stripeForm.find('#autocharge').prop('checked', true);\n }\n }else{\n if($controlForm.find('#autochargeToggle').is(':checked')){\n $controlForm.find('#autochargeToggle').prop('checked', false);\n }\n if($stripeForm.find('#autocharge').is(':checked')){\n $stripeForm.find('#autocharge').prop('checked', false);\n }\n }\n });\n });\n if($data.data.lounge.lounge_type_id == 1 || $data.data.lounge.lounge_type_id == 2){\n $autoChargeToggleWrapper.show();\n $buyMoreClicks.show();\n }\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_jobs_autopayment_request:function($params, cback){\n $.ajax({\n url: \"/lounge/jobs/autopayment\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_jobs_stripe:function($params, cback){\n try{\n var $cardSaved = libs.memoryGet('nurseslounge_lounge_overview_card');\n if($cardSaved){\n $cardSaved.destroy();\n }\n }catch ($e){\n\n }\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $stripeForm = $jobs.find(\"form[name='stripe-form']\");\n var $controlForm = $jobs.find(\"form[name='control-form']\");\n var $buyMoreClicks = $controlForm.find(\".buy-more-clicks\");\n var $autoChargeToggleWrapper = $controlForm.find(\".autocharge-toggle-wrapper\");\n var $inputClicks = $stripeForm.find('input[name=\"clicks\"]');\n var $clicksAmount = $stripeForm.find('.clicks-amount');\n var $paymentFormWrapper = $stripeForm.find('.payment-form-wrapper');\n var $onProgressWrapper = $stripeForm.find('.on-progress-checkmark-wrapper');\n var $successWrapper = $stripeForm.find('.success-checkmark-wrapper');\n var $btnContinue = $stripeForm.find('.continue');\n var $submitButton = $stripeForm.find('button[type=\"submit\"]');\n $paymentFormWrapper.show();\n $successWrapper.hide();\n $onProgressWrapper.hide();\n $submitButton.prop('disabled', false);\n $inputClicks.unbind().change(function(){\n $clicksAmount.html('clicks = $'+($inputClicks.val() * 3)+'.00');\n });\n var $card = stripe.elements();\n var $style = {\n base: {\n 'lineHeight': '1.5',\n 'fontSize': '1.09em',\n 'color': '#00184A',\n 'fontFamily': \"sans-serif\",\n 'height':'100%',\n 'fontWeight':'100',\n 'opacity': '0.9',\n '::placeholder': {\n 'color':'#636c72',\n 'opacity':'0.9'\n }\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\"\n },\n };\n var $cardDom = $stripeForm.find('.card:first')[0];\n var $cardEle = $card.create('card', {style:$style});\n $cardEle.mount($cardDom);\n libs.memorySave('nurseslounge_lounge_overview_card', $cardEle);\n nurseslounge_lounge_overview.information_administrator_tab_jobs_stripe_validate(function($form){\n var $objForm = libs.getObjForm($form);\n $buyMoreClicks.prop('disabled', true);\n $submitButton.prop('disabled', true);\n $paymentFormWrapper.hide();\n $onProgressWrapper.show();\n stripe.createToken($cardEle, {\n name:$objForm.name,\n address_country:'US',\n currency:'usd'\n }).then(function($res) {\n if($res.token && $res.token.id){\n var $newParams = $.extend({}, $objForm, $res, $params, {\n autocharge:$stripeForm.find('#autocharge').is(':checked') == true ? 1 : 0\n });\n nurseslounge_lounge_overview.information_administrator_tab_jobs_stripe_request($newParams, function($data){\n if($data.status == 'success'){\n $paymentFormWrapper.hide();\n $onProgressWrapper.hide();\n $successWrapper.show();\n $btnContinue.unbind().click(function(){\n $stripeForm[0].reset();\n $inputClicks.change();\n $buyMoreClicks.html('Buy More Clicks');\n $buyMoreClicks.prop('disabled', false);\n $successWrapper.hide();\n $autoChargeToggleWrapper.show();\n if($data.data.autocharge == 1){\n if(!$controlForm.find('#autochargeToggle').is(':checked')){\n $controlForm.find('#autochargeToggle').prop('checked', true);\n }\n if(!$stripeForm.find('#autocharge').is(':checked')){\n $stripeForm.find('#autocharge').prop('checked', true);\n }\n }else{\n if($controlForm.find('#autochargeToggle').is(':checked')){\n $controlForm.find('#autochargeToggle').prop('checked', false);\n }\n if($stripeForm.find('#autocharge').is(':checked')){\n $stripeForm.find('#autocharge').prop('checked', false);\n }\n }\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_graph_form($params);\n });\n }else{\n var $validator = $stripeForm.validate();\n $validator.showErrors({\"card\": $data.data.msg});\n $stripeForm.find(\"input[name='card']\").val('');\n $submitButton.prop('disabled', false);\n $buyMoreClicks.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n }else{\n $submitButton.prop('disabled', false);\n $buyMoreClicks.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n });\n $cardEle.on('change', function($e){\n if(!$e.complete && $e.error && $e.error.message){\n var $validator = $stripeForm.validate();\n $validator.showErrors({\"card\": $e.error.message});\n $stripeForm.find(\"input[name='card']\").val('');\n $stripeForm.find('.invalid-feedback').hide();\n $stripeForm.find('.error').removeClass('error');\n $stripeForm.find('.is-invalid').removeClass('is-invalid');\n }else{\n $stripeForm.find(\"input[name='card']\").val('complete');\n }\n });\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_jobs_stripe_validate:function(cback){\n $.validator.addMethod('minStrict', function ($val, $el, $par) {\n return $val > $par;\n });\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $stripeForm = $jobs.find(\"form[name='stripe-form']\")\n var $validator;\n try {\n $validator = $stripeForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $stripeForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n clicks: {\n required: true,\n minStrict: 99,\n number: true\n },\n name: {\n required: true,\n minlength: 3,\n maxlength: 191,\n },\n card: {\n required: true\n }\n },\n messages: {\n clicks:{\n required: \"The clicks is required\",\n minStrict:\"The clicks should be greater than 99\",\n number: \"The clicks should be a number\"\n },\n name:{\n required: \"The name is required\",\n minlength: \"The name must have at least 3 characters\",\n maxlength: \"The name cannot exceed 191 characters\"\n },\n card:{\n required: \"The card is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_administrator_tab_jobs_stripe_request:function($params, cback){\n $.ajax({\n url: \"/lounge/jobs/payment\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_jobs_payment_graph_form:function($params, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $graphForm = $jobs.find(\"form[name='graph-form']\");\n var $graphType = $graphForm.find(\"select[name='graphType']\");\n var $filterFromDate = $graphForm.find(\".filter_from_date:first\");\n var $resetFromDate = $graphForm.find(\".reset_from_date:first\");\n var $filterToDate = $graphForm.find(\".filter_to_date:first\");\n var $resetToDate = $graphForm.find(\".reset_to_date:first\");\n var $createJob = $graphForm.find(\".create-job\");\n $graphType.unbind().change(function(){\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n });\n $filterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n });\n $filterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n });\n $resetFromDate.unbind().click(function(){\n $filterFromDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n });\n $resetToDate.unbind().click(function(){\n $filterToDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n });\n $createJob.unbind().click(function(){\n $modal.modal('hide');\n nurseslounge_job_jobDetail.information_request_select_tab('create', 'job_information', {\n 'job_information': true,\n 'job_location': true\n }, $params, function () {\n $(\"#nurseslounge-job-information-edit-modal\").scrollTop(0);\n $(\"#nurseslounge-job-information-edit-modal\").modal('show');\n });\n });\n var $today = new Date();\n var $firstDay = new Date($today.getFullYear(), $today.getMonth(), 1);\n $firstDay = String($firstDay.getDate()).padStart(2, '0');\n var $lastDay = new Date($today.getFullYear(), $today.getMonth() + 1, 0);\n $lastDay = String($lastDay.getDate()).padStart(2, '0');\n var $mm = String($today.getMonth() + 1).padStart(2, '0');\n var $yyyy = $today.getFullYear();\n $filterFromDate.val($mm+'/'+$firstDay+'/'+$yyyy).datepicker(\"update\");\n $filterToDate.val($mm+'/'+$lastDay+'/'+$yyyy).datepicker(\"update\");\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics($params);\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_jobs_payment_statistics:function($params){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $graphForm = $jobs.find(\"form[name='graph-form']\");\n var $graphType = $graphForm.find(\"select[name='graphType']\");\n var $filterFromDate = $graphForm.find(\".filter_from_date:first\");\n var $filterToDate = $graphForm.find(\".filter_to_date:first\");\n var $sqOne = $graphForm.find(\".sq-one\");\n var $sqOneText = $graphForm.find(\".sq-one-text\");\n var $sqOneVal = $graphForm.find(\".sq-one-val\");\n var $sqTwo = $graphForm.find(\".sq-two\");\n var $sqTwoText = $graphForm.find(\".sq-two-text\");\n var $sqTwoVal = $graphForm.find(\".sq-two-val\");\n var $sqThree = $graphForm.find(\".sq-three\");\n var $sqThreeText = $graphForm.find(\".sq-three-text\");\n var $sqThreeVal = $graphForm.find(\".sq-three-val\");\n var $sqFour = $graphForm.find(\".sq-four\");\n var $sqFourText = $graphForm.find(\".sq-four-text\");\n var $sqFourVal = $graphForm.find(\".sq-four-val\");\n var $morrisConfig;\n $params = $.extend({}, $params,\n {\n filter_from_date:$filterFromDate.val(),\n filter_to_date:$filterToDate.val(),\n }\n );\n nurseslounge_lounge_overview.information_administrator_tab_jobs_payment_statistics_request($params, function($data) {\n if($data.data.one_txt != ''){\n $sqOne.show();\n }else{\n $sqOne.hide();\n }\n $sqOneText.html($data.data.one_txt);\n $sqOneVal.html($data.data.one_val);\n if($data.data.two_txt != ''){\n $sqTwo.show();\n }else{\n $sqTwo.hide();\n }\n $sqTwoText.html($data.data.two_txt);\n $sqTwoVal.html($data.data.two_val);\n if($data.data.three_txt != ''){\n $sqThree.show();\n }else{\n $sqThree.hide();\n }\n $sqThreeText.html($data.data.three_txt);\n $sqThreeVal.html($data.data.three_val);\n if($data.data.four_txt != ''){\n $sqFour.show();\n }else{\n $sqFour.hide();\n }\n $sqFourText.html($data.data.four_txt);\n $sqFourVal.html($data.data.four_val);\n try {\n $(\"#nurseslounge-lounge-information-jobs-statistics-graph\").empty();\n } catch (e) {\n\n }\n var $lineColors = ['gray', 'red', 'blue'];\n for(var $s = 0; $s < $data.data.ykeys.length; $s++){\n var $randomColor = '#'+Math.floor(Math.random()*16777215).toString(16);\n $lineColors.push($randomColor);\n }\n $morrisConfig = {\n data: $data.data.graph,\n element: 'nurseslounge-lounge-information-jobs-statistics-graph',\n xkey: 'date',\n ykeys: $data.data.ykeys,\n xLabelAngle: 45,\n parseTime: false,\n labels: $data.data.labels,\n fillOpacity: 0.6,\n hideHover: 'auto',\n behaveLikeLine: true,\n resize: true,\n pointFillColors: ['#ffffff'],\n pointStrokeColors: ['black'],\n lineColors: $lineColors\n };\n $graphType = $graphType.val();\n nurseslounge_lounge_overview.morris_graph_type($graphType, $morrisConfig)\n });\n },\n morris_graph_type:function($graphType, $morrisConfig){\n switch ($graphType) {\n case 'area':\n new Morris.Area($morrisConfig);\n break;\n case 'line':\n new Morris.Line($morrisConfig);\n break;\n case 'bar':\n new Morris.Bar($morrisConfig);\n break;\n case 'tower':\n $morrisConfig.stacked = true;\n new Morris.Bar($morrisConfig);\n break;\n }\n },\n information_administrator_tab_jobs_payment_statistics_request:function($params, cback){\n $.ajax({\n url: \"/lounge/jobs/payment/statistics\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_jobs_payment_table_form:function($action, $params, $data, cback){\n var $jobsCount = $data.data.jobs_count;\n var $jobsVisitsCount = $data.data.jobs_visits_count;\n var $jobsApplicationsCount = $data.data.jobs_applications_count;\n var $jobsRequestsInfoCount = $data.data.jobs_requests_info_count;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $tableForm = $jobs.find(\"form[name='table-form']\");\n var $datatableJobs = $tableForm.find(\".datatable-jobs\");\n var $datatableSearchButton = $tableForm.find(\".search\");\n var $datatableSearch = $tableForm.find(\"input[name='search']\");\n var $datatableSearchBinding;\n var $totalSpan = $tableForm.find(\".total\");\n var $visitsSpan = $tableForm.find(\".visits\");\n var $applicationsSpan = $tableForm.find(\".applications\");\n var $requestsInfoSpan = $tableForm.find(\".request-info\");\n var $filterFromDate = $tableForm.find(\".filter_from_date:first\");\n var $filterToDate = $tableForm.find(\".filter_to_date:first\");\n var $resetFromDate = $tableForm.find(\".reset_from_date:first\");\n var $resetToDate = $tableForm.find(\".reset_to_date:first\");\n var $selectAll = $tableForm.find(\"input[name='selectAll']\");\n var $selectAction = $tableForm.find(\".action\");\n nurseslounge_lounge_overview.information_administrator_tab_jobs_datatable(\n $datatableJobs,\n \"/lounge/jobs/datatable\",\n \"POST\",\n $params,\n function($table){\n $datatableJobs.find('.view').unbind().click(function(){\n var $link = $(this).data('link');\n window.open($link, '_blank', '');\n });\n $selectAll.unbind().click(function(){\n if($selectAll.is(':checked')){\n $datatableJobs.find('.selectRow').prop('checked', true);\n }else{\n $datatableJobs.find('.selectRow').prop('checked', false);\n }\n });\n if($selectAll.is(':checked')){\n $selectAll.prop('checked', false);\n }\n $selectAction.unbind().change(function(){\n var $selectedRows = [];\n $datatableJobs.find('.selectRow').each(function(){\n var $that = $(this);\n if($that.is(':checked')){\n $selectedRows.push($that.data('id'));\n }\n });\n if($selectAction.val() != '') {\n $params = $.extend({},$params, {selected_rows: $selectedRows, selected_action: $selectAction.val()});\n nurseslounge_lounge_overview.information_administrator_tab_jobs_actions($params, function () {\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n $totalSpan.html($data.data.jobs_count);\n $visitsSpan.html($data.data.jobs_visits_count);\n $applicationsSpan.html($data.data.jobs_applications_count);\n $requestsInfoSpan.html($data.data.jobs_requests_info_count);\n dataTable.reload($datatableJobs);\n });\n });\n }\n });\n $selectAction.val('');\n },function($nRow){\n return $nRow;\n }, function($table){\n $datatableSearchButton.unbind().click(function () {\n $table.search($datatableSearch.val());\n $table.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $table.search($datatableSearch.val());\n $table.draw();\n }, 1000);\n });\n $filterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n dataTable.reload($datatableJobs);\n });\n $filterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n dataTable.reload($datatableJobs);\n });\n $resetFromDate.unbind().click(function(){\n $filterFromDate.val(\"\").datepicker(\"update\");\n dataTable.reload($datatableJobs);\n });\n $resetToDate.unbind().click(function(){\n $filterToDate.val(\"\").datepicker(\"update\");\n dataTable.reload($datatableJobs);\n });\n $totalSpan.html($jobsCount);\n $visitsSpan.html($jobsVisitsCount);\n $applicationsSpan.html($jobsApplicationsCount);\n $requestsInfoSpan.html($jobsRequestsInfoCount).promise().done(function(){\n if(cback != undefined){\n cback();\n }\n });\n });\n },\n information_administrator_tab_jobs_actions:function($params, cback){\n $.ajax({\n url: \"/lounge/jobs/action\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_jobs_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $jobs = $modal.find(\".lounge-information-modal-container #jobs .container\");\n var $tableForm = $jobs.find(\"form[name='table-form']\");\n var $filterFromDate = $tableForm.find(\".filter_from_date:first\");\n var $filterToDate = $tableForm.find(\".filter_to_date:first\");\n var $table = $($element).DataTable({\n \"order\": [[1,\"desc\"]],\n \"dom\":\"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sScrollXInner\": \"auto\",\n \"bScrollCollapse\": true,\n \"bAutoWidth\": true,\n \"responsive\": false,\n \"scrollX\": true,\n \"paging\": true,\n \"bDestroy\": true,\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"initComplete\": function () {\n initComplete($table);\n },\n \"cache\": false,\n \"pageLength\": 10,\n \"pagingType\" : \"full_numbers\",\n \"processing\": true,\n \"serverSide\": true,\n \"stateSave\": true,\n \"ajax\": {\n \"data\":function ($d) {\n return $.extend($d, $data, {filter_from_date: $filterFromDate.val()}, {filter_to_date: $filterToDate.val()});\n },\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n\n information_administrator_tab_degrees:function($action, $tab, $params, $data, cback){\n var $degreesCount = $data.data.degrees_count;\n var $degreesVisitsCount = $data.data.degrees_visits_count;\n var $degreesApplicationsCount = $data.data.degrees_applications_count;\n var $degreesRequestsInfoCount = $data.data.degrees_requests_info_count;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $degrees = $modal.find(\".lounge-information-modal-container #degrees .container\");\n var $datatableApplications = $degrees.find(\".datatable-degrees\");\n var $datatableSearchButton = $degrees.find(\".search\");\n var $datatableSearch = $degrees.find(\"input[name='search']\");\n var $datatableSearchBinding;\n var $totalSpan = $degrees.find(\".total\");\n var $visitsSpan = $degrees.find(\".visits\");\n var $applicationsSpan = $degrees.find(\".applications\");\n var $requestsInfoSpan = $degrees.find(\".request-info\");\n var $filterFromDate = $degrees.find(\".filter_from_date:first\");\n var $filterToDate = $degrees.find(\".filter_to_date:first\");\n var $resetFromDate = $degrees.find(\".reset_from_date:first\");\n var $resetToDate = $degrees.find(\".reset_to_date:first\");\n var $selectAll = $degrees.find(\"input[name='selectAll']\");\n var $selectAction = $degrees.find(\".action\");\n var $createDegree = $degrees.find(\".create-degree\");\n nurseslounge_lounge_overview.information_administrator_tab_degrees_datatable(\n $datatableApplications,\n \"/lounge/degrees/datatable\",\n \"POST\",\n $params,\n function($table){\n $datatableApplications.find('.view').unbind().click(function(){\n var $link = $(this).data('link');\n window.open($link, '_blank', '');\n });\n $selectAll.unbind().click(function(){\n if($selectAll.is(':checked')){\n $datatableApplications.find('.selectRow').attr('checked', true).prop('checked',true);\n }else{\n $datatableApplications.find('.selectRow').attr('checked', false).prop('checked',false);\n }\n });\n if($selectAll.is(':checked')){\n $selectAll.attr('checked', false).prop('checked',false);\n }\n $selectAction.unbind().change(function(){\n var $selectedRows = [];\n $datatableApplications.find('.selectRow').each(function(){\n var $that = $(this);\n if($that.is(':checked')){\n $selectedRows.push($that.data('id'));\n }\n });\n if($selectAction.val() != '') {\n $params = $.extend({},$params, {selected_rows: $selectedRows, selected_action: $selectAction.val()});\n nurseslounge_lounge_overview.information_administrator_tab_degrees_actions($params, function () {\n nurseslounge_lounge_overview.information_lounge_get($action, $params, function($data) {\n $totalSpan.html($data.data.degrees_count);\n $visitsSpan.html($data.data.degrees_visits_count);\n $applicationsSpan.html($data.data.degrees_applications_count);\n $requestsInfoSpan.html($data.data.degrees_requests_info_count);\n dataTable.reload($datatableApplications);\n if($selectAll.is(':checked')){\n $selectAll.attr('checked', false).prop('checked',false);\n }\n $selectAction.val('');\n });\n });\n }\n });\n $selectAction.val('');\n },function($nRow){\n return $nRow;\n }, function($table){\n $datatableSearchButton.unbind().click(function () {\n $table.search($datatableSearch.val());\n $table.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $table.search($datatableSearch.val());\n $table.draw();\n }, 1000);\n });\n $filterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n dataTable.reload($datatableApplications);\n });\n $filterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n dataTable.reload($datatableApplications);\n });\n $resetFromDate.unbind().click(function(){\n $filterFromDate.val(\"\").datepicker(\"update\");\n dataTable.reload($datatableApplications);\n });\n $resetToDate.unbind().click(function(){\n $filterToDate.val(\"\").datepicker(\"update\");\n dataTable.reload($datatableApplications);\n });\n $totalSpan.html($degreesCount);\n $visitsSpan.html($degreesVisitsCount);\n $applicationsSpan.html($degreesApplicationsCount);\n $requestsInfoSpan.html($degreesRequestsInfoCount).promise().done(function(){\n $createDegree.unbind().click(function(){\n $modal.modal('hide');\n nurseslounge_degree_information.information_request_select_tab('create', 'degree_information', {\n 'degree_information': true,\n 'degree_sponsor': true\n }, $params, function () {\n $(\"#nurseslounge-degree-information-edit-modal\").scrollTop(0);\n $(\"#nurseslounge-degree-information-edit-modal\").modal('show');\n });\n });\n if(cback != undefined){\n cback();\n }\n });\n });\n },\n information_administrator_tab_degrees_actions:function($params, cback){\n $.ajax({\n url: \"/lounge/degrees/action\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_degrees_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $degrees = $modal.find(\".lounge-information-modal-container #degrees .container\");\n var $filterFromDate = $degrees.find(\".filter_from_date:first\");\n var $filterToDate = $degrees.find(\".filter_to_date:first\");\n var $table = $($element).DataTable({\n \"order\": [[6,\"desc\"]],\n \"dom\":\"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sScrollXInner\": \"auto\",\n \"bScrollCollapse\": true,\n \"bAutoWidth\": true,\n \"responsive\": false,\n \"scrollX\": true,\n \"paging\": true,\n \"bDestroy\": true,\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"initComplete\": function () {\n initComplete($table);\n },\n \"cache\": false,\n \"pageLength\": 10,\n \"pagingType\" : \"full_numbers\",\n \"processing\": true,\n \"serverSide\": true,\n \"stateSave\": true,\n \"ajax\": {\n \"data\":function ($d) {\n return $.extend($d, $data, {filter_from_date: $filterFromDate.val()}, {filter_to_date: $filterToDate.val()});\n },\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n\n information_administrator_tab_import:function($action, $tab, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $import = $modal.find(\".lounge-information-modal-container #import .container\");\n var $wizard = $import.find(\".wizard\");\n var $importDashboard = $wizard.find('#importDashboard');\n $params = $.extend({},$params, {action:$action,tab:'import'});\n libs.memorySave('import-wizard', $params);\n $wizard.smartWizard({\n selected: 0,\n theme: 'arrows',\n justified: true,\n autoAdjustHeight: false,\n backButtonSupport: false,\n cycleSteps: false,\n enableURLhash: false,\n keyboardSettings: {\n keyNavigation: false\n },\n anchorSettings: {\n anchorClickable: false,\n enableAllAnchors: false,\n markDoneStep: false,\n markAllPreviousStepsAsDone: false,\n removeDoneStepOnNavigateBack: false,\n enableAnchorOnDoneStep: false\n },\n toolbarSettings: {\n showNextButton: false,\n showPreviousButton: false\n }\n }).on(\"stepContent\", function($e, $anchorObject, $stepIndex, $stepDirection) {\n if($stepIndex == null){\n $stepIndex = 0;\n }\n libs.memoryUpdateObj('import-wizard', {step_index:($stepIndex+1)});\n return new Promise(function($resolve, $reject){\n nurseslounge_lounge_overview.information_administrator_tab_wizard($wizard, function($data) {\n $resolve($data);\n });\n });\n }).on(\"showStep\", function($e, $anchorObject, $stepIndex, $stepDirection) {\n if($stepDirection == 'forward' && $stepIndex != null){\n $stepIndex = ($stepIndex + 2);\n }\n if($stepIndex == null){\n $stepIndex = 1;\n }\n nurseslounge_lounge_overview.information_administrator_tab_import_events($stepIndex, $params, $wizard);\n });\n libs.memoryUpdateObj('import-wizard', {step_index:1});\n nurseslounge_lounge_overview.information_administrator_tab_wizard($wizard, function($data){\n $importDashboard.html($data).promise().done(function(){\n nurseslounge_lounge_overview.information_administrator_tab_import_events(1, $params, $wizard, function(){\n if(cback != undefined){\n cback();\n }\n });\n });\n });\n },\n information_administrator_tab_wizard:function($wizard, cback){\n $.ajax({\n url: \"/lounge/import/wizard\",\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n data:libs.memoryGet('import-wizard'),\n beforeSend: function($xhr) {\n $wizard.smartWizard(\"loader\", \"show\");\n },\n success: function ($data) {\n libs.expire($data);\n $wizard.smartWizard(\"loader\", \"hide\");\n cback($data);\n }\n });\n },\n information_administrator_tab_import_events:function($index, $params, $wizard, cback){\n var $importWizard = libs.memoryGet('import-wizard');\n switch ($index) {\n case 1:\n var $importDashboard = $wizard.find('#importDashboard');\n var $xmlFeedType = $wizard.find('#importDashboard select[name=\"xml_feed_type\"]');\n var $datatableXmlFeedHistory = $wizard.find('#importDashboard .datatable-xml-feed-history:first');\n var $deleteButton = $wizard.find('#importDashboard .delete:first');\n $xmlFeedType.unbind().change(function(){\n libs.memoryUpdateObj('import-wizard', {xml_feed_type_id:$xmlFeedType.val()});\n $wizard.smartWizard(\"next\");\n });\n nurseslounge_lounge_overview.information_administrator_tab_import_history_datatable(\n $datatableXmlFeedHistory,\n \"/lounge/import/datatable\",\n \"POST\",\n $params,\n function(){\n },function($nRow){\n return $nRow;\n }, function($datatableRecruitersTable) {\n });\n nurseslounge_lounge_overview.information_administrator_tab_import_events_xml_feed_history_tables($datatableXmlFeedHistory);\n $deleteButton.unbind().click(function(){\n if(confirm(\"Delete this configuration\")) {\n nurseslounge_lounge_overview.information_administrator_tab_import_dashboard_get(function () {\n libs.memorySave('import-wizard', $params);\n libs.memoryUpdateObj('import-wizard', {step_index: 1});\n nurseslounge_lounge_overview.information_administrator_tab_wizard($wizard, function ($data) {\n $importDashboard.html($data).promise().done(function () {\n nurseslounge_lounge_overview.information_administrator_tab_import_events(1, $params, $wizard);\n });\n });\n });\n }\n });\n break;\n case 2:\n $importWizard = libs.memoryGet('import-wizard');\n var $backButton = $wizard.find('#source .back:first');\n var $analyzeButton = $wizard.find('#source .analyze:first');\n var $xmlFeedFile = $wizard.find('#source input[name=\"xmlFeedFile\"]');\n var $updateXmlFeedButton = $wizard.find('#source .updateXmlFeed:first');\n if($importWizard.xml_feed_type_id == 1){\n $analyzeButton.unbind().click(function(){\n libs.memoryUpdateObj('import-wizard', {xml_feed_url:$wizard.find('#source input[name=\"link\"]').val()});\n $wizard.smartWizard(\"next\");\n });\n }\n if($importWizard.xml_feed_type_id == 2){\n $xmlFeedFile.unbind().change(function(){\n var $that = $(this);\n nurseslounge_lounge_overview.information_administrator_tab_import_source_update_file($that, $importWizard, function($data){\n if($data.status == 'success'){\n libs.memoryUpdateObj('import-wizard', $data.data);\n $wizard.smartWizard(\"next\");\n }\n });\n });\n $updateXmlFeedButton.unbind().click(function() {\n $xmlFeedFile.click();\n });\n }\n if($importWizard.xml_feed_type_id == 3){\n nurseslounge_lounge_overview.information_administrator_tab_import_ftp_validate(function($form){\n var $formObj = libs.getObjForm($form);\n libs.memoryUpdateObj('import-wizard', $formObj);\n $wizard.smartWizard(\"next\");\n });\n }\n $backButton.unbind().click(function(){\n $wizard.smartWizard(\"prev\");\n });\n break;\n case 3:\n var $labelsFields = $wizard.find('#analyze .labels-fields:first');\n var $commandsDiv = $wizard.find('#analyze .commands:first');\n var $refreshXmlFeed = $wizard.find('#analyze .refresh-xml-feed:first');\n var $deleteXmlFeed = $wizard.find('#analyze .delete-xml-feed:first');\n var $backButton = $wizard.find('#analyze .back:first');\n var $autoconfigurationXmlFeed = $wizard.find('#analyze .autoconfiguration-xml-feed:first');\n var $xmlFeedPeriod = $wizard.find('#analyze select[name=\"xmlFeedPeriod\"]');\n var $monthlyWrapper = $wizard.find('#analyze .xmlFeed_period_monthly_wrapper');\n var $weeklyWrapper = $wizard.find('#analyze .xmlFeed_period_weekly_wrapper');\n var $startAtWrapper = $wizard.find('#analyze .xml_feed_start_at_wrapper');\n var $startAtContainer = $wizard.find('#analyze #xml_feed_start_at_container');\n var $xmlFeedTz = $wizard.find('#analyze select[name=\"xmlFeedTz\"]');\n var $xmlFeedStartAtTimeWrapper = $wizard.find('#analyze .xml_feed_start_at_time_wrapper');\n var $xmlFeedPeriodWeekly = $wizard.find('#analyze input[name=\"xmlFeedPeriodWeekly\"]');\n var $weeklyDays = $wizard.find('#analyze .weekly_days');\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.hide();\n $refreshXmlFeed.unbind().click(function(){\n nurseslounge_lounge_overview.information_administrator_tab_import_analyze_get(function ($data) {\n var $status = $data.status;\n if($status == 'error'){\n $wizard.smartWizard(\"prev\");\n }else{\n var $xmlFeed = $data.data.xml_feed;\n libs.memoryUpdateObj('import-wizard', {root:$xmlFeed.root});\n var $input = {\n \"options\":{\n \"associationMode\": \"oneToOne\",\n \"lineStyle\":\"square-ends\"\n },\n \"Lists\": [\n {\n \"name\": \"XmlFeed\",\n \"list\": $xmlFeed.labels_availables\n },\n {\n \"name\": \"NL Database\",\n \"list\": $xmlFeed.job_labels\n }\n ],\n \"existingLinks\" : $xmlFeed.set_labels\n };\n $labelsFields.fieldsLinker(\"init\",$input);\n $commandsDiv.html(nurseslounge_lounge_overview.information_administrator_tab_import_map_commands_html($xmlFeed.map)).promise().done(function(){});\n }\n });\n });\n $deleteXmlFeed.unbind().click(function(){\n nurseslounge_lounge_overview.information_administrator_tab_import_analyze_delete(function($data){\n $refreshXmlFeed.click();\n });\n });\n $backButton.unbind().click(function(){\n $wizard.smartWizard(\"prev\");\n });\n $autoconfigurationXmlFeed.unbind().click(function(){\n var $map = $labelsFields.fieldsLinker(\"getLinks\");\n var $stripTags = [\n 'Job Id',\n 'Job Title',\n 'Job Signing Bonus',\n 'Job Education Level',\n 'Job Years of Experience',\n 'Job Listing Type Number',\n 'Job Employer Type Number',\n 'Job Shift',\n 'Job Shift Length',\n 'Job Schedule',\n 'Job Compensation',\n //'Job Description',\n 'Job Email Or Url',\n 'Employer Name',\n 'Facility Name',\n 'Facility Address City',\n 'Facility Address State',\n 'Facility Address Street',\n 'Facility Address Zip Code'\n ];\n var $dateParse = [\n 'Job Date Posted'\n ];\n $.each($map.links, function($i, $v){\n var $input = $commandsDiv.find(\"input[name='\"+$v.from+\"']\");\n if($.inArray($v.to, $stripTags) !== -1 && $input.val() == ''){\n $input.val('=>stripTags');\n }\n if($.inArray($v.to, $dateParse) !== -1 && $input.val() == ''){\n $input.val('=>dateParse');\n }\n });\n });\n $weeklyDays.unbind().change(function(){\n var $weeklySelectedDays = [];\n $weeklyDays.each(function(){\n var $that = $(this);\n var $val = $that.data('value');\n if($that.prop('checked')){\n $weeklySelectedDays.push($val);\n }\n });\n $xmlFeedPeriodWeekly.val($weeklySelectedDays.join(','));\n });\n var $xmlFeedPeriodWeeklyVal = $xmlFeedPeriodWeekly.val();\n if($xmlFeedPeriodWeeklyVal != ''){\n var $xmlFeedPeriodWeeklyDays = $xmlFeedPeriodWeeklyVal.split(',');\n $weeklyDays.prop('checked', false);\n $.each($xmlFeedPeriodWeeklyDays, function($i, $v){\n $wizard.find(\"#analyze .weekly_days[data-value='\"+$v+\"']\").prop('checked', true);\n });\n }else{\n $weeklyDays.prop('checked', false);\n }\n $xmlFeedTz.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n if($val != ''){\n var $now = moment().tz($val);\n $startAtContainer.remove();\n $xmlFeedStartAtTimeWrapper.html('' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ').promise().done(function(){\n $startAtContainer = $wizard.find('#analyze #xml_feed_start_at_container');\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n });\n }\n });\n var $xmlFeedTzVal = $xmlFeedTz.val();\n if($xmlFeedTzVal != ''){\n var $val = $startAtContainer.data('value');\n var $utc = moment.utc($val, 'H:mm A')\n var $now = $utc.tz($xmlFeedTzVal);\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT'\n });\n }else{\n var $timezone = moment.tz.guess();\n $xmlFeedTz.val($timezone);\n\n var $now = moment();\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n }\n $xmlFeedPeriod.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n switch($val){\n case 'manually':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.hide();\n break;\n case 'daily':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'monthly':\n $monthlyWrapper.show();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'weekly':\n $monthlyWrapper.hide();\n $weeklyWrapper.show();\n $startAtWrapper.show();\n break;\n }\n });\n var $xmlFeedPeriodVal = $xmlFeedPeriod.val();\n switch($xmlFeedPeriodVal){\n case 'manually':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.hide();\n break;\n case 'daily':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'monthly':\n $monthlyWrapper.show();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'weekly':\n $monthlyWrapper.hide();\n $weeklyWrapper.show();\n $startAtWrapper.show();\n break;\n }\n nurseslounge_lounge_overview.information_administrator_tab_import_analyze_validate(function($validator, $form){\n var $map = {links:{}};\n try{\n $map = $labelsFields.fieldsLinker(\"getLinks\");\n }catch(e){\n }\n var $form = libs.getObjForm($form);\n var $xmlFeedDeleteBeforeUpdate = $form.xmlFeedDeleteBeforeUpdate;\n var $xmlFeedDefaultListingTypeId = $form.xmlFeedDefaultListingTypeId;\n var $xmlFeedDefaultEmployerTypeId = $form.xmlFeedDefaultEmployerTypeId;\n var $xmlFeedPeriod = $form.xmlFeedPeriod;\n var $xmlFeedPeriodMonthly = $form.xmlFeedPeriodMonthly;\n var $xmlFeedPeriodWeekly = $form.xmlFeedPeriodWeekly;\n var $xmlFeedTz = $form.xmlFeedTz;\n var $xmlFeedStartAt = $form.xmlFeedStartAt;\n\n delete $form.xmlFeedDeleteBeforeUpdate;\n delete $form.xmlFeedDefaultListingTypeId;\n delete $form.xmlFeedDefaultEmployerTypeId;\n delete $form.xmlFeedPeriod;\n delete $form.xmlFeedPeriodMonthly;\n delete $form.xmlFeedPeriodWeekly;\n delete $form.xmlFeedTz;\n delete $form.xmlFeedStartAt;\n if($map.links.length == 0){\n $validator.showErrors({\n \"labelFields\": \"The links relation are required\"\n });\n }else{\n libs.memoryUpdateObj('import-wizard', {\n map:{},\n commands:{},\n xmlFeedDeleteBeforeUpdate:null,\n xmlFeedDefaultListingTypeId:null,\n xmlFeedDefaultEmployerTypeId:null,\n xmlFeedPeriod:null,\n xmlFeedPeriodMonthly:null,\n xmlFeedPeriodWeekly:null,\n xmlFeedTz:null,\n xmlFeedStartAt:null,\n });\n libs.memoryUpdateObj('import-wizard', {\n map:$map,\n commands:$form,\n xmlFeedDeleteBeforeUpdate:$xmlFeedDeleteBeforeUpdate,\n xmlFeedDefaultListingTypeId:$xmlFeedDefaultListingTypeId,\n xmlFeedDefaultEmployerTypeId:$xmlFeedDefaultEmployerTypeId,\n xmlFeedPeriod:$xmlFeedPeriod,\n xmlFeedPeriodMonthly:$xmlFeedPeriodMonthly,\n xmlFeedPeriodWeekly:$xmlFeedPeriodWeekly,\n xmlFeedTz:$xmlFeedTz,\n xmlFeedStartAt:$xmlFeedStartAt,\n });\n $wizard.smartWizard(\"next\");\n }\n });\n $refreshXmlFeed.click();\n break;\n case 4:\n var $importDashboard = $wizard.find('#importDashboard');\n var $datatableXmlFeedHistory = $wizard.find('#execute .datatable-xml-feed-history:first');\n var $runButton = $wizard.find('#execute .run:first');\n var $initButton = $wizard.find('#execute .init:first');\n var $backButton = $wizard.find('#execute .back:first');\n var $progressBarFirst = $wizard.find('#execute .progress-bar:first');\n nurseslounge_lounge_overview.information_administrator_tab_import_history_datatable(\n $datatableXmlFeedHistory,\n \"/lounge/import/datatable\",\n \"POST\",\n $params,\n function(){\n },function($nRow){\n return $nRow;\n }, function($datatableRecruitersTable) {\n });\n nurseslounge_lounge_overview.information_administrator_tab_import_events_xml_feed_history_tables($datatableXmlFeedHistory);\n $runButton.unbind().click(function(){\n $progressBarFirst.show();\n $runButton.hide();\n libs.memoryUpdateObj('import-wizard', {progress_bar:true});\n nurseslounge_lounge_overview.information_administrator_tab_import_execute_progress($wizard);\n nurseslounge_lounge_overview.information_administrator_tab_import_execute(function(){\n libs.memoryUpdateObj('import-wizard', {progress_bar:false});\n dataTable.reload($datatableXmlFeedHistory);\n $runButton.show();\n $progressBarFirst.hide();\n });\n });\n $initButton.unbind().click(function(){\n $wizard.smartWizard(\"reset\");\n });\n $backButton.unbind().click(function(){\n $wizard.smartWizard(\"prev\");\n });\n break;\n }\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_import_events_xml_feed_history_tables:function($datatableXmlFeedHistory){\n var $reloadXmlFeedHistoryBinding;\n dataTable.reload($datatableXmlFeedHistory);\n $reloadXmlFeedHistoryBinding = setTimeout(function(){\n if($(\"a[data-target='#import']\").hasClass('active')){\n nurseslounge_lounge_overview.information_administrator_tab_import_events_xml_feed_history_tables($datatableXmlFeedHistory);\n }else{\n try{\n clearTimeout($reloadXmlFeedHistoryBinding);\n }catch ($e){\n\n }\n }\n }, 5000);\n },\n information_administrator_tab_import_history_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $table = $($element).DataTable({\n \"order\": [[0,\"desc\"]],\n \"dom\": \"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sPaginationType\": \"full_numbers\",\n \"bInfo\": true,\n \"bLengthChange\": true,\n \"autoWidth\": false,\n \"responsive\": true,\n \"bDestroy\": true,\n \"cache\": false,\n \"pagingType\" : \"full_numbers\",\n \"searching\": false,\n \"processing\": true,\n \"stateSave\": false,\n \"serverSide\": true,\n \"initComplete\": function () {\n initComplete($table);\n },\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"ajax\": {\n \"data\":$data,\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n information_administrator_tab_import_dashboard_get:function(cback){\n $.ajax({\n url: \"/lounge/import/dashboard/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('import-wizard'),\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n cback($data);\n }\n }\n });\n },\n information_administrator_tab_import_source_update_file:function($fileInput, $params, cback){\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('file', $fileInput[0].files[0]);\n $formData.append('key', $params.key);\n $formData.append('user_id', $params.user_id);\n $formData.append('xml_feed_type_id', $params.xml_feed_type_id);\n $formData.append('step_index', $params.step_index);\n $formData.append('tab', 'import');\n $.ajax({\n type: 'POST',\n url: '/lounge/import/source/update',\n data: $formData,\n cache: false,\n contentType: false,\n processData: false,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_import_ftp_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#source form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#source form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n ftpProtocol: {\n required: true\n },\n ftpHost: {\n required: true,\n minlength: 2,\n maxlength: 600\n },\n ftpPort: {\n required: false,\n minlength: 3,\n maxlength: 8\n },\n ftpUser: {\n required: false,\n minlength: 3,\n maxlength: 600\n },\n ftpPassword: {\n required: false,\n minlength: 3,\n maxlength: 600\n },\n ftpFile: {\n required: true,\n minlength: 3,\n maxlength: 600\n }\n },\n messages: {\n ftpProtocol:{\n required: \"The protocol is required\"\n },\n ftpHost: {\n required: \"The host is required\",\n minlength: \"The host must have at least 3 characters\",\n maxlength: \"The host cannot exceed 600 characters\"\n },\n ftpPort: {\n required: \"The port is not required\",\n minlength: \"The port must have at least 2 characters\",\n maxlength: \"The port cannot exceed 8 characters\"\n },\n ftpUser: {\n required: \"The user is not required\",\n minlength: \"The user must have at least 3 characters\",\n maxlength: \"The user cannot exceed 600 characters\"\n },\n ftpPassword: {\n required: \"The password is not required\",\n minlength: \"The password must have at least 3 characters\",\n maxlength: \"The password cannot exceed 600 characters\"\n },\n ftpFile: {\n required: \"The file is required\",\n minlength: \"The file must have at least 3 characters\",\n maxlength: \"The file cannot exceed 600 characters\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_administrator_tab_import_analyze_get:function(cback){\n $.ajax({\n url: \"/lounge/import/analyze/get\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('import-wizard'),\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_import_analyze_delete:function(cback){\n $.ajax({\n url: \"/lounge/import/analyze/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('import-wizard'),\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n cback($data);\n }\n }\n });\n },\n information_administrator_tab_import_analyze_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#analyze form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#analyze form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n xmlFeedDeleteBeforeUpdate: {\n required: true\n },\n xmlFeedDefaultListingTypeId: {\n required: true\n },\n xmlFeedDefaultEmployerTypeId: {\n required: true\n },\n xmlFeedPeriod:{\n required: true\n },\n xmlFeedPeriodMonthly:{\n required: function(){\n var $val = $(\"#analyze form select[name='xmlFeedPeriod']\").val();\n return $val == 'monthly';\n }\n },\n xmlFeedPeriodWeekly: {\n required: function(){\n var $val = $(\"#analyze form select[name='xmlFeedPeriod']\").val();\n return $val == 'weekly';\n }\n },\n xmlFeedTz:{\n required: function(){\n var $val = $(\"#analyze form select[name='xmlFeedPeriod']\").val();\n return $val != 'manually';\n }\n },\n xmlFeedStartAt:{\n required: function(){\n var $val = $(\"#analyze form select[name='xmlFeedPeriod']\").val();\n return $val != 'manually';\n }\n },\n labelFields:{\n required: false\n }\n },\n messages: {\n xmlFeedDeleteBeforeUpdate:{\n required: \"The default Update Type is required\"\n },\n xmlFeedDefaultListingTypeId:{\n required: \"The default Listing Type is required\"\n },\n xmlFeedDefaultEmployerTypeId: {\n required: \"The default Employer Type is required\"\n },\n xmlFeedPeriod:{\n required: \"The period is required\"\n },\n xmlFeedPeriodMonthly:{\n required: \"The monthly day is required\"\n },\n xmlFeedPeriodWeekly:{\n required: \"The weekly days are required\"\n },\n xmlFeedTz:{\n required: \"The timezone is required\"\n },\n xmlFeedStartAt:{\n required: \"The start time is required\"\n },\n labelFields: {\n required: \"The links relation are required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($validator, $form);\n return false;\n }\n });\n },\n information_administrator_tab_import_map_commands_html:function($data){\n var $chtml = '' +\n '
    ';\n $($data).each(function($i, $v){\n var $command = libs.isEmptyReturnNull($v.filter_command) == null ? '' : $v.filter_command;\n $chtml += '' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ';\n });\n $chtml +='' +\n '
    ';\n return $chtml;\n },\n information_administrator_tab_import_execute:function(cback){\n $.ajax({\n url: \"/lounge/import/execute\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('import-wizard'),\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_import_execute_progress:function($wizard){\n var $progressBarFirst = $wizard.find('#execute .progress-bar:first');\n var $importWizard = libs.memoryGet('import-wizard');\n $.ajax({\n url: \"/lounge/import/execute/progress\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$importWizard,\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success' && $importWizard.progress_bar){\n $progressBarFirst.html($data.data.progress_percent+'%').promise().done(function(){\n $progressBarFirst.attr('aria-valuenow', $data.data.progress_percent);\n $progressBarFirst.width($data.data.progress_percent+'%');\n setTimeout(function(){\n nurseslounge_lounge_overview.information_administrator_tab_import_execute_progress($wizard);\n }, 2500);\n });\n }\n }\n });\n },\n\n information_administrator_tab_api:function($action, $tab, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $import = $modal.find(\".lounge-information-modal-container #api .container\");\n var $wizard = $import.find(\".wizard\");\n var $apiDashboard = $wizard.find('#apiDashboard');\n $params = $.extend({},$params, {action:$action,tab:'api'});\n libs.memorySave('api-wizard', $params);\n $wizard.smartWizard({\n selected: 0,\n theme: 'arrows',\n justified: true,\n autoAdjustHeight: false,\n backButtonSupport: false,\n cycleSteps: false,\n enableURLhash: false,\n keyboardSettings: {\n keyNavigation: false\n },\n anchorSettings: {\n anchorClickable: false,\n enableAllAnchors: false,\n markDoneStep: false,\n markAllPreviousStepsAsDone: false,\n removeDoneStepOnNavigateBack: false,\n enableAnchorOnDoneStep: false\n },\n toolbarSettings: {\n showNextButton: false,\n showPreviousButton: false\n }\n }).on(\"stepContent\", function($e, $anchorObject, $stepIndex, $stepDirection) {\n if($stepIndex == null){\n $stepIndex = 0;\n }\n libs.memoryUpdateObj('api-wizard', {step_index:($stepIndex+1)});\n return new Promise(function($resolve, $reject){\n nurseslounge_lounge_overview.information_administrator_tab_api_wizard($wizard, function($data) {\n $resolve($data);\n });\n });\n }).on(\"showStep\", function($e, $anchorObject, $stepIndex, $stepDirection) {\n if($stepDirection == 'forward' && $stepIndex != null){\n $stepIndex = ($stepIndex + 2);\n }\n if($stepIndex == null){\n $stepIndex = 1;\n }\n nurseslounge_lounge_overview.information_administrator_tab_api_events($stepIndex, $params, $wizard);\n });\n libs.memoryUpdateObj('api-wizard', {step_index:1});\n nurseslounge_lounge_overview.information_administrator_tab_api_wizard($wizard, function($data){\n $apiDashboard.html($data).promise().done(function(){\n nurseslounge_lounge_overview.information_administrator_tab_api_events(1, $params, $wizard, function(){\n if(cback != undefined){\n cback();\n }\n });\n });\n });\n },\n information_administrator_tab_api_wizard:function($wizard, cback){\n $.ajax({\n url: \"/lounge/api/wizard\",\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n data:libs.memoryGet('api-wizard'),\n beforeSend: function($xhr) {\n $wizard.smartWizard(\"loader\", \"show\");\n },\n success: function ($data) {\n libs.expire($data);\n $wizard.smartWizard(\"loader\", \"hide\");\n cback($data);\n }\n });\n },\n information_administrator_tab_api_events:function($index, $params, $wizard, cback){\n var $importWizard = libs.memoryGet('import-wizard');\n switch ($index) {\n case 1:\n var $apiDashboard = $wizard.find('#apiDashboard');\n var $apiType = $wizard.find('#apiDashboard select[name=\"api_type\"]');\n var $datatableApiHistory = $wizard.find('#apiDashboard .datatable-api-history:first');\n var $deleteButton = $wizard.find('#apiDashboard .delete:first');\n $apiType.unbind().change(function(){\n libs.memoryUpdateObj('api-wizard', {api_type_id:$apiType.val()});\n $wizard.smartWizard(\"next\");\n });\n nurseslounge_lounge_overview.information_administrator_tab_api_history_datatable(\n $datatableApiHistory,\n \"/lounge/api/datatable\",\n \"POST\",\n $params,\n function(){\n },function($nRow){\n return $nRow;\n }, function($datatableRecruitersTable) {\n\n });\n nurseslounge_lounge_overview.information_administrator_tab_api_events_api_history_tables($datatableApiHistory);\n $deleteButton.unbind().click(function(){\n if(confirm(\"Delete this configuration\")) {\n nurseslounge_lounge_overview.information_administrator_tab_api_dashboard_get(function () {\n libs.memorySave('api-wizard', $params);\n libs.memoryUpdateObj('api-wizard', {step_index: 1});\n nurseslounge_lounge_overview.information_administrator_tab_api_wizard($wizard, function ($data) {\n $apiDashboard.html($data).promise().done(function () {\n nurseslounge_lounge_overview.information_administrator_tab_api_events(1, $params, $wizard);\n });\n });\n });\n }\n });\n break;\n case 2:\n $importWizard = libs.memoryGet('import-wizard');\n var $backButton = $wizard.find('#source .back:first');\n var $analyzeButton = $wizard.find('#source .analyze:first');\n var $apiPeriodWeekly = $wizard.find('#source input[name=\"apiPeriodWeekly\"]');\n var $weeklyDays = $wizard.find('#source .weekly_days');\n var $apiTz = $wizard.find('#source select[name=\"apiTz\"]');\n var $startAtContainer = $wizard.find('#source #api_start_at_container');\n var $apiStartAtTimeWrapper = $wizard.find('#source .api_start_at_time_wrapper');\n var $apiPeriod = $wizard.find('#source select[name=\"apiPeriod\"]');\n var $monthlyWrapper = $wizard.find('#source .api_period_monthly_wrapper');\n var $weeklyWrapper = $wizard.find('#source .api_period_weekly_wrapper');\n var $startAtWrapper = $wizard.find('#source .api_start_at_wrapper');\n var $apiTypeId = $wizard.find('#source input[name=\"apiTypeId\"]').val();\n\n\n $weeklyDays.unbind().change(function(){\n var $weeklySelectedDays = [];\n $weeklyDays.each(function(){\n var $that = $(this);\n var $val = $that.data('value');\n if($that.prop('checked')){\n $weeklySelectedDays.push($val);\n }\n });\n $apiPeriodWeekly.val($weeklySelectedDays.join(','));\n });\n var $apiPeriodWeeklyVal = $apiPeriodWeekly.val();\n if($apiPeriodWeeklyVal != ''){\n var $apiPeriodWeeklyDays = $apiPeriodWeeklyVal.split(',');\n $weeklyDays.prop('checked', false);\n $.each($apiPeriodWeeklyDays, function($i, $v){\n $wizard.find(\"#source .weekly_days[data-value='\"+$v+\"']\").prop('checked', true);\n });\n }else{\n $weeklyDays.prop('checked', false);\n }\n $apiTz.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n if($val != ''){\n var $now = moment().tz($val);\n $startAtContainer.remove();\n $apiStartAtTimeWrapper.html('' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ').promise().done(function(){\n $startAtContainer = $wizard.find('#source #api_start_at_container');\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n });\n }\n });\n var $apiTzVal = $apiTz.val();\n if($apiTzVal != ''){\n var $val = $startAtContainer.data('value');\n var $utc = moment.utc($val, 'H:mm A')\n var $now = $utc.tz($apiTzVal);\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n }else{\n var $timezone = moment.tz.guess();\n $apiTz.val($timezone);\n\n var $now = moment();\n $startAtContainer.datetimepicker({\n defaultDate: $now,\n format: 'LT',\n });\n }\n $apiPeriod.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n switch($val){\n case 'manually':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.hide();\n break;\n case 'daily':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'monthly':\n $monthlyWrapper.show();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'weekly':\n $monthlyWrapper.hide();\n $weeklyWrapper.show();\n $startAtWrapper.show();\n break;\n }\n });\n var $apiPeriodVal = $apiPeriod.val();\n switch($apiPeriodVal){\n case 'manually':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.hide();\n break;\n case 'daily':\n $monthlyWrapper.hide();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'monthly':\n $monthlyWrapper.show();\n $weeklyWrapper.hide();\n $startAtWrapper.show();\n break;\n case 'weekly':\n $monthlyWrapper.hide();\n $weeklyWrapper.show();\n $startAtWrapper.show();\n break;\n }\n\n nurseslounge_lounge_overview.information_administrator_tab_api_analyze_validate($apiTypeId, function($validator, $form){\n var $form = libs.getObjForm($form);\n libs.memoryUpdateObj('api-wizard', {\n apiConfiguration:$form.apiConfiguration,\n apiDefaultEmployerTypeId:$form.apiDefaultEmployerTypeId,\n apiDefaultListingTypeId:$form.apiDefaultListingTypeId,\n apiDeleteBeforeUpdate:$form.apiDeleteBeforeUpdate,\n apiPeriod:$form.apiPeriod,\n apiPeriodMonthly:$form.apiPeriodMonthly,\n apiPeriodWeekly:$form.apiPeriodWeekly,\n apiStartAt:$form.apiStartAt,\n apiTypeId:$form.apiTypeId,\n apiTz:$form.apiTz,\n companyIdentifier:$form.companyIdentifier,\n });\n $wizard.smartWizard(\"next\");\n });\n $backButton.unbind().click(function(){\n $wizard.smartWizard(\"prev\");\n });\n break;\n case 3:\n var $datatableApiHistory = $wizard.find('#execute .datatable-api-history:first');\n var $runButton = $wizard.find('#execute .run:first');\n var $initButton = $wizard.find('#execute .init:first');\n var $backButton = $wizard.find('#execute .back:first');\n var $progressBarFirst = $wizard.find('#execute .progress-bar:first');\n nurseslounge_lounge_overview.information_administrator_tab_api_history_datatable(\n $datatableApiHistory,\n \"/lounge/api/datatable\",\n \"POST\",\n $params,\n function(){\n },function($nRow){\n return $nRow;\n }, function($datatableRecruitersTable) {\n\n });\n nurseslounge_lounge_overview.information_administrator_tab_api_events_api_history_tables($datatableApiHistory);\n $runButton.unbind().click(function(){\n $progressBarFirst.show();\n $runButton.hide();\n libs.memoryUpdateObj('api-wizard', {progress_bar:true});\n nurseslounge_lounge_overview.information_administrator_tab_api_execute_progress($wizard);\n nurseslounge_lounge_overview.information_administrator_tab_api_execute(function(){\n libs.memoryUpdateObj('api-wizard', {progress_bar:false});\n dataTable.reload($datatableApiHistory);\n $runButton.show();\n $progressBarFirst.hide();\n });\n });\n $initButton.unbind().click(function(){\n $wizard.smartWizard(\"reset\");\n });\n $backButton.unbind().click(function(){\n $wizard.smartWizard(\"prev\");\n });\n break;\n }\n if(cback != undefined){\n cback();\n }\n },\n information_administrator_tab_api_history_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $table = $($element).DataTable({\n \"order\": [[0,\"desc\"]],\n \"dom\": \"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sPaginationType\": \"full_numbers\",\n \"bInfo\": true,\n \"bLengthChange\": true,\n \"autoWidth\": false,\n \"responsive\": true,\n \"bDestroy\": true,\n \"cache\": false,\n \"pagingType\" : \"full_numbers\",\n \"searching\": false,\n \"processing\": true,\n \"stateSave\": false,\n \"serverSide\": true,\n \"initComplete\": function () {\n initComplete($table);\n },\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"ajax\": {\n \"data\":$data,\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n information_administrator_tab_api_events_api_history_tables:function($datatableApiHistory){\n var $reloadApiHistoryBinding;\n dataTable.reload($datatableApiHistory);\n $reloadApiHistoryBinding = setTimeout(function(){\n if($(\"a[data-target='#api']\").hasClass('active')){\n nurseslounge_lounge_overview.information_administrator_tab_api_events_api_history_tables($datatableApiHistory);\n }else{\n try{\n clearTimeout($reloadApiHistoryBinding);\n }catch ($e){\n\n }\n }\n }, 5000);\n },\n information_administrator_tab_api_dashboard_get:function(cback){\n $.ajax({\n url: \"/lounge/api/dashboard/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('api-wizard'),\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success'){\n cback($data);\n }\n }\n });\n },\n information_administrator_tab_api_analyze_validate:function($apiTypeId, cback){\n var $validator;\n try {\n $validator = $(\"#source form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#source form\").validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n companyIdentifier:{\n required: $apiTypeId == 1\n },\n apiConfiguration: {\n required: true\n },\n apiDeleteBeforeUpdate: {\n required: true\n },\n apiDefaultListingTypeId: {\n required: true\n },\n apiDefaultEmployerTypeId: {\n required: true\n },\n apiPeriod:{\n required: true\n },\n apiPeriodMonthly:{\n required: function(){\n var $val = $(\"#source form select[name='apiPeriod']\").val();\n return $val == 'monthly';\n }\n },\n apiPeriodWeekly: {\n required: function(){\n var $val = $(\"#source form select[name='apiPeriod']\").val();\n return $val == 'weekly';\n }\n },\n apiTz:{\n required: function(){\n var $val = $(\"#source form select[name='apiPeriod']\").val();\n return $val != 'manually';\n }\n },\n apiStartAt:{\n required: function(){\n var $val = $(\"#source form select[name='apiPeriod']\").val();\n return $val != 'manually';\n }\n }\n },\n messages: {\n companyIdentifier:{\n required: \"The company identifier is required\"\n },\n apiConfiguration:{\n required: \"The api configuration is required\"\n },\n apiDeleteBeforeUpdate:{\n required: \"The default Update Type is required\"\n },\n apiDefaultListingTypeId:{\n required: \"The default Listing Type is required\"\n },\n apiDefaultEmployerTypeId: {\n required: \"The default Employer Type is required\"\n },\n apiPeriod:{\n required: \"The period is required\"\n },\n apiPeriodMonthly:{\n required: \"The monthly day is required\"\n },\n apiPeriodWeekly:{\n required: \"The weekly days are required\"\n },\n apiTz:{\n required: \"The timezone is required\"\n },\n apiStartAt:{\n required: \"The start time is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($validator, $form);\n return false;\n }\n });\n },\n information_administrator_tab_api_execute:function(cback){\n $.ajax({\n url: \"/lounge/api/execute\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:libs.memoryGet('api-wizard'),\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_administrator_tab_api_execute_progress:function($wizard){\n var $progressBarFirst = $wizard.find('#execute .progress-bar:first');\n var $importWizard = libs.memoryGet('api-wizard');\n $.ajax({\n url: \"/lounge/api/execute/progress\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$importWizard,\n success: function ($data) {\n libs.expire($data);\n if($data.status == 'success' && $importWizard.progress_bar){\n $progressBarFirst.html($data.data.progress_percent+'%').promise().done(function(){\n $progressBarFirst.attr('aria-valuenow', $data.data.progress_percent);\n $progressBarFirst.width($data.data.progress_percent+'%');\n setTimeout(function(){\n nurseslounge_lounge_overview.information_administrator_tab_api_execute_progress($wizard);\n }, 2500);\n });\n }\n }\n });\n },\n\n information_administrator_tab_statistics:function($action, $tab, $params, $data, cback){\n var $statisticReport = $(\"#statistics .statistic-report:first\");\n var $days = $statisticReport.find('select[name=\"days\"]');\n var $userId = libs.memoryGet('user_id');\n $days.unbind().change(function(){\n var $that = $(this);\n var $key = $that.data('key');\n var $days = $that.val();\n $params = $.extend({}, $params,\n {\n user_id:$userId,\n key:$key,\n days:$days\n }\n );\n nurseslounge_lounge_overview.information_administrator_tab_statistics_request($params, function($chtml){\n $statisticReport.html($chtml).promise().done(function(){\n nurseslounge_lounge_overview.information_administrator_tab_statistics($action, $tab, $params, $data, cback);\n });\n });\n });\n if(cback != undefined){\n cback();\n }\n /*\n var $graphSelection = $(\"#statistics select[name='graphSelection']\");\n var $graphType = $(\"#statistics select[name='graphType']\");\n var $acumulate = $(\"#statistics select[name='acumulate']\");\n var $filterFromDate = $(\"#statistics .filter_from_date\");\n var $resetFromDate = $(\"#statistics .reset_from_date\");\n var $filterToDate = $(\"#statistics .filter_to_date\");\n var $resetToDate = $(\"#statistics .reset_to_date\");\n $graphSelection.unbind().change(function(){\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $graphType.unbind().change(function(){\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $acumulate.unbind().change(function(){\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $filterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $filterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $resetFromDate.unbind().click(function(){\n $filterFromDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $resetToDate.unbind().click(function(){\n $filterToDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n });\n $filterFromDate.val($data.data.this_month[0]);\n $filterToDate.val($data.data.this_month[1]);\n nurseslounge_lounge_overview.information_administrator_tab_statistics_event($params);\n if(cback != undefined){\n cback();\n }\n */\n },\n /*\n information_administrator_tab_statistics_event:function($params){\n var $graphSelection = $(\"#statistics select[name='graphSelection']\");\n var $graphType = $(\"#statistics select[name='graphType']\");\n var $acumulate = $(\"#statistics select[name='acumulate']\");\n var $filterFromDate = $(\"#statistics .filter_from_date\");\n var $filterToDate = $(\"#statistics .filter_to_date\");\n var $sqOne = $(\"#statistics .sq-one\");\n var $sqOneText = $(\"#statistics .sq-one-text\");\n var $sqOneVal = $(\"#statistics .sq-one-val\");\n var $sqTwo = $(\"#statistics .sq-two\");\n var $sqTwoText = $(\"#statistics .sq-two-text\");\n var $sqTwoVal = $(\"#statistics .sq-two-val\");\n var $sqThree = $(\"#statistics .sq-three\");\n var $sqThreeText = $(\"#statistics .sq-three-text\");\n var $sqThreeVal = $(\"#statistics .sq-three-val\");\n var $sqFour = $(\"#statistics .sq-four\");\n var $sqFourText = $(\"#statistics .sq-four-text\");\n var $sqFourVal = $(\"#statistics .sq-four-val\");\n var $morrisConfig;\n $params = $.extend({},$params,\n {\n graph_selection:$graphSelection.val(),\n filter_from_date:$filterFromDate.val(),\n filter_to_date:$filterToDate.val(),\n acumulate:$acumulate.val()\n }\n );\n nurseslounge_lounge_overview.information_administrator_tab_statistics_request($params, function($data){\n if($data.data.one_txt != ''){\n $sqOne.show();\n }else{\n $sqOne.hide();\n }\n $sqOneText.html($data.data.one_txt);\n $sqOneVal.html($data.data.one_val);\n if($data.data.two_txt != ''){\n $sqTwo.show();\n }else{\n $sqTwo.hide();\n }\n $sqTwoText.html($data.data.two_txt);\n $sqTwoVal.html($data.data.two_val);\n if($data.data.three_txt != ''){\n $sqThree.show();\n }else{\n $sqThree.hide();\n }\n $sqThreeText.html($data.data.three_txt);\n $sqThreeVal.html($data.data.three_val);\n if($data.data.four_txt != ''){\n $sqFour.show();\n }else{\n $sqFour.hide();\n }\n $sqFourText.html($data.data.four_txt);\n $sqFourVal.html($data.data.four_val);\n try{\n $(\"#statistics-graph\").empty();\n }catch (e) {\n\n }\n $morrisConfig = {\n data:$data.data.graph,\n element:'statistics-graph',\n xkey:'date',\n ykeys:$data.data.ykeys,\n xLabelAngle: 45,\n parseTime: false,\n labels:$data.data.labels,\n fillOpacity:0.6,\n hideHover:'auto',\n behaveLikeLine:true,\n resize:true,\n pointFillColors:['#ffffff'],\n pointStrokeColors: ['black'],\n lineColors:['gray','red']\n };\n switch($graphType.val()){\n case 'area':\n new Morris.Area($morrisConfig);\n break;\n case 'line':\n new Morris.Line($morrisConfig);\n break;\n case 'bar':\n new Morris.Bar($morrisConfig);\n break;\n case 'tower':\n $morrisConfig.stacked = true;\n new Morris.Bar($morrisConfig);\n break;\n }\n });\n },\n */\n information_administrator_tab_statistics_request:function($params, cback){\n $.ajax({\n url: \"/lounge/statistics/get\",\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_tab_invite:function($action, $tab, $params, $data, cback){\n var $invite = $(\"#invite\");\n var $invitationsInput = $invite.find(\"input[name='invitations']\");\n var $checkInvitationButton = $invite.find(\".check-invitations\");\n var $updateInvitationsButton = $invite.find(\".update-invitations\");\n var $updateInvitationsButtonFile = $invite.find(\".file-update-invitations\");\n var $emailsDetected = $invite.find(\".emails-detected\");\n var $sendMassiveInvitations = $invite.find(\".send-massive-invitations\");\n var $sendInviteList = $invite.find(\".send-invite-list\");\n var $previousEmail = $invite.find(\".previous-email\");\n var $previousEmailSubject = $invite.find(\".previous-email-subject\");\n var $previousEmailContent = $invite.find(\".previous-email-content\");\n var $previousEmailWrapper = $invite.find(\".preview-email-wrapper\");\n var $multiEmail = $invitationsInput.unbind().multiEmail({\n delete: true,\n target:$sendInviteList,\n model:'' +\n '
  • ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
  • ',\n removeEle:'.email-remove',\n emailSend:'.email-send',\n ajax:{\n method:'POST',\n url:'/myDashboard/myProfile/invite/exist',\n data:{\n user_id:libs.memoryGet('user_id')\n },\n dataType:'json'\n },\n callback:function($emails){\n nurseslounge_lounge_overview.information_tab_invite_invite($params, $emails, function(){\n setTimeout(function(){\n nurseslounge_lounge_overview.task_list_container(function($container){\n $params = $.extend({}, $params, {only:'owners'});\n nurseslounge_myDashboard_myProfile.task_list($container, $params);\n });\n }, 1000);\n });\n },\n });\n $sendInviteList.html('');\n $multiEmail.delete();\n $multiEmail.selector;\n $checkInvitationButton.unbind().click(function () {\n if($invitationsInput.val() != ''){\n var $event = $.Event(\"keydown\",{keyCode:32});\n $invitationsInput.trigger($event);\n }\n });\n $invitationsInput.keydown(function($e){\n var $code = $e.keyCode || $e.which;\n if($code == 13) {\n if($invitationsInput.val() != ''){\n var $event = $.Event(\"keydown\",{keyCode:32});\n $invitationsInput.trigger($event);\n }\n }\n });\n $updateInvitationsButtonFile.unbind().change(function(){\n $emailsDetected.html('');\n if(this.files && this.files[0]){\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('user_id', libs.memoryGet('user_id'));\n $formData.append('key', $params.key);\n $formData.append('tab', $params.tab);\n $formData.append('file', this.files[0]);\n nurseslounge_lounge_overview.information_tab_invite_massive_update($formData, function($data){\n var $emails = $data.data.emails;\n var $emailsCount = $emails.length;\n if($emailsCount > 0){\n $emailsDetected.html('We detect ' + $data.data.emails.length + ' email(s)').promise().done(function(){\n $updateInvitationsButtonFile.val('');\n $sendMassiveInvitations.unbind().click(function(){\n $(\"body\").append(\n '
    '+\n ''+\n ''+\n ''+\n ''+\n ''+\n '
    '\n );\n var $popUp = window.open(\"\", \"inviteResults\");\n $(\"body\").find(\"form[name='inviteResults']\").submit().remove();\n nurseslounge_lounge_overview.information_tab_invite_invite($params, $emails, function(){\n $updateInvitationsButtonFile.val('');\n $emailsDetected.html('');\n $sendMassiveInvitations.prop('disabled', true);\n setTimeout(function(){\n nurseslounge_lounge_overview.task_list_container(function($container){\n $params = $.extend({}, $params, {only:'owners'});\n nurseslounge_myDashboard_myProfile.task_list($container, $params);\n });\n }, 1000);\n setTimeout(function(){\n $popUp.document.write(\"';\n if($url.split('?')[1] != ''){\n $copyLinkText.val($url);\n }\n var $websitesnames = $data.data.websites_names;\n var $chtml = '';\n $.each($websitesnames, function($i, $v){\n $chtml += '';\n });\n var $logoHashId = $data.data.logoHashId;\n try{\n $websites.chosen(\"destroy\");\n }catch (e) {}\n $websites.html($chtml).promise().done(function(){\n $websites.val($logoHashId);\n $websites.chosen();\n $websites.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n $params = $.extend({}, $params, {logoHashId:$val});\n nurseslounge_lounge_overview.information_tab_create_logo_statistics($params);\n }).change();\n });\n });\n });\n cback();\n },\n information_create_logo_validate:function($params, cback){\n var $validator;\n try {\n $validator = $(\"#createLogo form:first\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#createLogo form:first\").validate({\n onsubmit: true,\n debug: true,\n ignore: \"*:not(.validate)\",\n rules: {\n websiteName: {\n required: true,\n minlength: 3,\n maxlength: 191,\n remote: {\n url: \"/lounge/create/embed/logo/exist\",\n type: \"post\",\n data: {\n key: $params.key,\n user_id: $params.user_id,\n websiteName: function(){ return $(\"#createLogo form:first input[name='websiteName']\").val(); }\n }\n }\n },\n },\n messages: {\n websiteName: {\n required: \"The website name is required\",\n minlength: \"The website name must have at least 3 characters\",\n maxlength: \"The website name cannot exceed 191 characters\",\n remote:\"The website name exist, choose another\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_tab_create_logo_request:function($params, cback){\n $.ajax({\n url: \"/lounge/create/embed/logo\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_tab_create_logo_statistics:function($params){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $createLogo = $modal.find(\"#createLogo\");\n var $visitGraphType = $createLogo.find(\"select[name='visitGraphType']\");\n var $visitsFilterFromDate = $createLogo.find(\".visits_filter_from_date:first\");\n var $visitsResetFromDate = $createLogo.find(\".visits_reset_from_date:first\");\n var $visitsFilterToDate = $createLogo.find(\".visits_filter_to_date:first\");\n var $visitsResetToDate = $createLogo.find(\".visits_reset_to_date:first\");\n\n $visitGraphType.unbind().change(function(){\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $visitsFilterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $visitsResetFromDate.unbind().click(function(){\n $visitsFilterFromDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $visitsFilterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $visitsResetToDate.unbind().click(function(){\n $visitsFilterToDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n\n var $redirectGraphType = $createLogo.find(\"select[name='redirectGraphType']\");\n var $redirectFilterFromDate = $createLogo.find(\".redirect_filter_from_date:first\");\n var $redirectResetFromDate = $createLogo.find(\".redirect_reset_from_date:first\");\n var $redirectFilterToDate = $createLogo.find(\".redirect_filter_to_date:first\");\n var $redirectResetToDate = $createLogo.find(\".redirect_reset_to_date:first\");\n\n $redirectGraphType.unbind().change(function(){\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $redirectFilterFromDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $redirectResetFromDate.unbind().click(function(){\n $redirectFilterFromDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $redirectFilterToDate.datepicker('clearDates').on('changeDate', function ($e) {\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n $redirectResetToDate.unbind().click(function(){\n $redirectFilterToDate.val(\"\").datepicker(\"update\");\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n });\n\n var $today = new Date();\n var $firstDay = new Date($today.getFullYear(), $today.getMonth(), 1);\n $firstDay = String($firstDay.getDate()).padStart(2, '0');\n var $lastDay = new Date($today.getFullYear(), $today.getMonth() + 1, 0);\n $lastDay = String($lastDay.getDate()).padStart(2, '0');\n var $mm = String($today.getMonth() + 1).padStart(2, '0');\n var $yyyy = $today.getFullYear();\n $visitsFilterFromDate.val($mm+'/'+$firstDay+'/'+$yyyy).datepicker(\"update\");\n $visitsFilterToDate.val($mm+'/'+$lastDay+'/'+$yyyy).datepicker(\"update\");\n $redirectFilterFromDate.val($mm+'/'+$firstDay+'/'+$yyyy).datepicker(\"update\");\n $redirectFilterToDate.val($mm+'/'+$lastDay+'/'+$yyyy).datepicker(\"update\");\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph($params);\n },\n graphBinding:null,\n information_tab_create_logo_statistics_graph:function($params){\n //This function was creating because datepickers fire without event\n try{\n clearTimeout(nurseslounge_lounge_overview.graphBinding);\n }catch ($e){\n\n }\n nurseslounge_lounge_overview.graphBinding = setTimeout(function(){\n nurseslounge_lounge_overview.information_tab_create_logo_statistics_graph_binding($params);\n }, 1000);\n },\n information_tab_create_logo_statistics_graph_binding:function($params){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $inviteTemplates = $modal.find(\".lounge-information-modal-container #createLogo .container\");\n var $websites = $inviteTemplates.find('select[name=\"websites\"]');\n var $visits = $inviteTemplates.find('.visits');\n var $uniqueVisits = $inviteTemplates.find('.unique-visits');\n var $redirect = $inviteTemplates.find('.redirect');\n var $uniqueRedirect = $inviteTemplates.find('.unique-redirect');\n var $delete = $inviteTemplates.find('.delete');\n var $copyLinkText = $inviteTemplates.find('textarea[name=\"copyLinkText\"]');\n nurseslounge_lounge_overview.information_tab_get_logo_visits($params, function($data) {\n var $imageSrc = $data.data.imageSrc;\n var $imageSize = $data.data.imageSize;\n var $url = $data.data.url;\n var $oneVal = $data.data.one_val;\n var $twoVal = $data.data.two_val;\n var $threeVal = $data.data.three_val;\n var $fourVal = $data.data.four_val;\n\n var $previousLogo = $(\".previous-logo\");\n try {\n $previousLogo.summernote('destroy');\n } catch (e) {\n\n }\n $previousLogo.summernote({\n disableDragAndDrop: true,\n placeholder: '',\n height: '200px',\n width: '100%',\n focus: false,\n disableResizeEditor: true,\n dialogsInBody: false,\n dialogsFade: false,\n codeviewFilter: true,\n codeviewIframeFilter: true,\n spellCheck: false,\n disableGrammar: true,\n toolbar: [],\n });\n\n\n $visits.html($oneVal);\n $uniqueVisits.html($twoVal);\n $redirect.html($threeVal);\n $uniqueRedirect.html($fourVal);\n\n //Logo And Image\n var $chtml = '
    ' +\n '' +\n '
    ';\n $previousLogo.summernote('code', $chtml);\n $url = '';\n if($url.split('?')[1] != ''){\n $copyLinkText.val($url);\n }\n\n $delete.unbind().click(function(){\n nurseslounge_lounge_overview.information_tab_delete_logo($params, function($data){\n var $url = $data.data.url;\n $url = '';\n if($url.split('?')[1] != ''){\n $copyLinkText.val($url);\n }\n var $websitesnames = $data.data.websites_names;\n var $chtml = '';\n $.each($websitesnames, function($i, $v){\n $chtml += '';\n });\n var $logoHashId = $data.data.logoHashId;\n try{\n $websites.chosen(\"destroy\");\n }catch (e) {}\n $websites.html('');\n $websites.html($chtml).promise().done(function(){\n $websites.val($logoHashId);\n $websites.chosen();\n $websites.unbind().change(function(){\n $previousLogo.summernote('code', '');\n $inviteTemplates.find('.visits').html(0);\n $inviteTemplates.find('.unique-visits').html(0);\n $inviteTemplates.find('.redirect').html(0);\n $inviteTemplates.find('.unique-redirect').html(0);\n var $that = $(this);\n var $val = $that.val();\n $params = $.extend({}, $params, {logoHashId:$val});\n nurseslounge_lounge_overview.information_tab_create_logo_statistics($params);\n }).change();\n });\n });\n });\n });\n },\n information_tab_delete_logo:function($params, cback){\n $.ajax({\n url: \"/lounge/logo/delete\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data: $params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_get_logo_visits:function($params, cback){\n $.ajax({\n url: \"/lounge/logo/statistics\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data: $params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_tab_buy_ads:function($action, $tab, $allowTabs, $params, $data, cback){\n var $userId = $params.user_id;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $buyAds = $modal.find(\".lounge-information-modal-container #buyAds .container\");\n var $newImageForm = $buyAds.find('form[name=\"new-image-form\"]');\n var $dropImage = $newImageForm.find('.drop-image');\n var $defaultItem = $newImageForm.find('.default-item');\n var $degrees = $newImageForm.find('select[name=\"degrees\"]');\n var $buyImpressions = $newImageForm.find('.buy-impressions');\n Dropzone.autoDiscover = false;\n var $dropzone = libs.memoryGet('nurseslounge_lounge_overview_dropzone');\n try{\n $dropzone.destroy();\n }catch ($e) {\n\n }\n $dropzone = new Dropzone($dropImage[0], {\n headers: {\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n },\n createImageThumbnails:false,\n acceptedFiles:'image/png,image/jpg,image/jpeg,image/gif',\n url: '/myDashboard/myArticles/fake',\n params:{user_id:$userId},\n method: 'post',\n clickable:[$dropImage[0], $dropImage.find('img:first')[0]],\n init: function() {\n var $that = this;\n $that.on(\"complete\", function(){\n $dropImage.find('.dz-preview').remove();\n });\n $that.on(\"success\", function($file) {\n var $formData = new FormData();\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\n $formData.append('user_id', $userId);\n $formData.append('key', $params.key);\n $formData.append('file', $file);\n nurseslounge_lounge_overview.information_tab_buy_ads_files_request($formData, function($data){\n var $loungeAdId = $data.data.lounge_ad_id;\n var $publicImageRoot = $data.data.public_image_root;\n $dropImage.find('img:first').attr('src', $publicImageRoot);\n $defaultItem.data('image_id', $loungeAdId);\n $defaultItem.data('src', $publicImageRoot);\n $degrees.prop('disabled', false);\n $buyImpressions.prop('disabled', false);\n try{\n $degrees.chosen('destroy');\n }catch (e) {}\n $degrees.chosen();\n $degrees.unbind();\n $degrees.change(function(){\n var $imageId = $defaultItem.data('image_id');\n $params = $.extend({}, $params, {image_id:$imageId, degrees:$degrees.val()});\n nurseslounge_lounge_overview.information_tab_buy_ads_degree_type_request($params, function($data){\n var $publicImageRoot = $data.data.public_image_root;\n var $loungeAdId = $data.data.lounge_ad_id;\n $defaultItem.data('image_id', $loungeAdId);\n $defaultItem.data('src', $publicImageRoot);\n });\n });\n });\n });\n }\n });\n libs.memorySave('nurseslounge_lounge_overview_dropzone', $dropzone);\n try{\n $degrees.chosen('destroy');\n }catch (e) {}\n $degrees.find('option').prop('selected', false);\n $degrees.prop('disabled', true);\n $degrees.chosen();\n $buyImpressions.prop('disabled', true);\n $buyImpressions.unbind().click(function(){\n var $defaultItem = $newImageForm.find('.default-item')\n var $imageId = $defaultItem.data('image_id');\n var $src = $defaultItem.data('src');\n nurseslounge_lounge_overview.information_tab_buy_ads_impression_form($params, $imageId, $src, function(){\n nurseslounge_lounge_overview.information_tab_buy_ads($action, $tab, $allowTabs, $params, $data);\n });\n });\n $dropImage.find('img:first').attr('src', '/bimg/NursesLounge/dragAndDrop.png');\n nurseslounge_lounge_overview.information_tab_buy_ads_list($params);\n if(cback != undefined){\n cback();\n }\n },\n information_tab_buy_ads_files_request:function($formData, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyAds/updateImage',\n data: $formData,\n cache: false,\n contentType: false,\n processData: false,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_buy_ads_degree_type_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyAds/updateDegrees',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_buy_ads_impression_form:function($params, $imageId, $src, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $buyAds = $modal.find(\".lounge-information-modal-container #buyAds .container\");\n var $adsListForm = $buyAds.find('form[name=\"ads-list-form\"]');\n var $newImageForm = $buyAds.find('form[name=\"new-image-form\"]');\n var $paymentForm = $buyAds.find(\"form[name='stripe-form']\");\n var $paymentFormWrapper = $paymentForm.find('.payment-form-wrapper');\n var $paymentFormImage = $paymentForm.find('.payment-form-image');\n var $onProgressWrapper = $paymentForm.find('.on-progress-checkmark-wrapper');\n var $successWrapper = $paymentForm.find('.success-checkmark-wrapper');\n var $inputImpressions = $paymentForm.find('input[name=\"impressions\"]');\n var $impressionsAmount = $paymentForm.find('.impressions-amount');\n var $btnContinue = $paymentForm.find('.continue');\n var $submitButton = $paymentForm.find('button[type=\"submit\"]');\n var $back = $paymentForm.find('.back');\n var $promo = $paymentForm.find('input[name=\"promo\"]');\n\n $back.unbind().click(function(){\n $adsListForm.show();\n $newImageForm.show();\n $paymentForm.hide();\n });\n\n try{\n var $cardSaved = libs.memoryGet('nurseslounge_lounge_overview_card');\n if($cardSaved){\n $cardSaved.destroy();\n }\n }catch ($e){\n\n }\n $adsListForm.hide();\n $newImageForm.hide();\n $paymentFormImage.attr('src', $src);\n\n $paymentFormWrapper.show();\n $onProgressWrapper.hide();\n $successWrapper.hide();\n\n $submitButton.prop('disabled', false);\n $inputImpressions.unbind().change(function(){\n var $impressions = ((($inputImpressions.val() / 2500) * 50000)/100);\n $impressionsAmount.html('$'+$impressions.toFixed(2));\n $promo.keydown();\n });\n\n var $promoBinding;\n $promo.unbind().on('keyup keydown keypress blur', function(){\n var $code = $(this).val();\n $params = $.extend({}, $params, {code:$code});\n try{\n clearTimeout($promoBinding);\n }catch ($e) {\n\n }\n $promoBinding = setTimeout(function(){\n nurseslounge_lounge_overview.information_tab_buy_ads_promo($params, function($data){\n var $promo = $data.data.promo_code;\n var $discountType = $promo && $promo.discount_type ? $promo.discount_type : null;\n var $discount = $promo && $promo.discount ? $promo.discount : null;\n $params = $.extend({}, $params, {discount_type:$discountType, discount:$discount});\n var $impressions = ((($inputImpressions.val() / 2500) * 50000)/100);\n if($discountType && $discount){\n switch ($discountType){\n case 'percent':\n $discount = ($discount * $impressions)/100;\n $impressions = $impressions - $discount;\n $impressionsAmount.html('$'+$impressions.toFixed(2));\n break;\n case 'money':\n $impressions = $impressions - $discount;\n $impressionsAmount.html('$'+$impressions.toFixed(2));\n break;\n }\n }else{\n $impressionsAmount.html('$'+$impressions.toFixed(2));\n }\n });\n }, 800);\n }).keydown();\n\n var $card = stripe.elements();\n var $style = {\n base: {\n 'lineHeight': '1.5',\n 'fontSize': '1.09em',\n 'color': '#00184A',\n 'fontFamily': \"sans-serif\",\n 'height':'100%',\n 'fontWeight':'100',\n 'opacity': '0.9',\n '::placeholder': {\n 'color':'#636c72',\n 'opacity':'0.9'\n }\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\"\n },\n };\n var $cardDom = $paymentForm.find('.card:first')[0];\n var $cardEle = $card.create('card', {style:$style});\n $cardEle.mount($cardDom);\n libs.memorySave('nurseslounge_lounge_overview_card', $cardEle);\n nurseslounge_lounge_overview.information_tab_buy_ads_validate(function($form){\n var $objForm = libs.getObjForm($form);\n $submitButton.prop('disabled', true);\n $paymentFormWrapper.hide();\n $onProgressWrapper.show();\n stripe.createToken($cardEle, {\n name:$objForm.name,\n address_country:'US',\n currency:'usd'\n }).then(function($res) {\n if($res.token && $res.token.id){\n var $newParams = $.extend({}, $objForm, $res, $params, {image_id:$imageId});\n nurseslounge_lounge_overview.information_tab_buy_ads_impressions_request($newParams, function($data){\n if($data.status == 'success'){\n $paymentFormWrapper.hide();\n $onProgressWrapper.hide();\n $successWrapper.show();\n $btnContinue.unbind().click(function(){\n nurseslounge_lounge_overview.information_tab_buy_ads_list($params);\n $submitButton.prop('disabled', false);\n $paymentForm[0].reset();\n $paymentForm.hide();\n $successWrapper.hide();\n $newImageForm.show();\n $adsListForm.show();\n if(cback != undefined){\n cback();\n }\n });\n }else{\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $data.data.msg});\n $paymentForm.find(\"input[name='card']\").val('');\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n }else{\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n });\n $cardEle.on('change', function($e){\n if(!$e.complete && $e.error && $e.error.message){\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $e.error.message});\n $paymentForm.find(\"input[name='card']\").val('');\n $paymentForm.find('.invalid-feedback').hide();\n $paymentForm.find('.error').removeClass('error');\n $paymentForm.find('.is-invalid').removeClass('is-invalid');\n }else{\n $paymentForm.find(\"input[name='card']\").val('complete');\n }\n });\n $paymentForm.show();\n },\n information_tab_buy_ads_promo:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyAds/promo',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_buy_ads_impressions_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyAds/payment',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_buy_ads_validate:function(cback){\n $.validator.addMethod('minStrict', function ($val, $el, $par) {\n return $val >= $par;\n });\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $buyAds = $modal.find(\".lounge-information-modal-container #buyAds .container\");\n var $paymentForm = $buyAds.find(\"form[name='stripe-form']\")\n var $validator;\n try {\n $validator = $paymentForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $paymentForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n impressions: {\n required: true,\n minStrict: 2500,\n number: true\n },\n name: {\n required: true,\n minlength: 3,\n maxlength: 191,\n },\n card: {\n required: true\n }\n },\n messages: {\n impressions:{\n required: \"The impressions is required\",\n minStrict:\"The impressions should be greater than 5000\",\n number: \"The impressions should be a number\"\n },\n name:{\n required: \"The name is required\",\n minlength: \"The name must have at least 3 characters\",\n maxlength: \"The name cannot exceed 191 characters\"\n },\n card:{\n required: \"The card is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_tab_buy_ads_list:function($params){\n var $reload;\n var $loaded = false;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $buyAds = $modal.find(\".lounge-information-modal-container #buyAds .container\");\n var $adsListWrapper = $buyAds.find('.ads-list-wrapper');\n var $paginationNav = $buyAds.find('.pagination-nav');\n var $resultInfo = $buyAds.find(\".result-info-count:first\");\n var $paginationObj;\n var $saveParams = $params;\n try{\n $paginationObj = libs.memoryGet('lounges_ads_pagination');\n if($paginationObj){\n $paginationObj.pagination('destroy');\n }\n }catch ($e) {\n }\n $paginationObj = $paginationNav.pagination({\n pageSize: 1,\n showPageNumbers: true,\n showPrevious: true,\n showNext: true,\n showNavigator: true,\n showFirstOnEllipsisShow: true,\n showLastOnEllipsisShow: true,\n dataSource:window.location.protocol +'//'+ window.location.hostname + \"/lounge/buyAds/list\",\n locator: 'data.ads',\n ajax:{\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n beforeSend: function() {\n $adsListWrapper.html(nurseslounge_lounge_overview.information_tab_buy_ads_list_item_preview());\n },\n complete:function($data){\n libs.expire($data.responseJSON);\n }\n },\n totalNumberLocator: function($data) {\n return $data.data.total;\n },\n callback: function($data, $pagination) {\n $loaded = true;\n var $pageNumber = $pagination.pageNumber;\n var $pageSize = $pagination.pageSize;\n var $totalNumber = $pagination.totalNumber;\n var $first = $totalNumber > 0 ? (($pageNumber-1) * $pageSize) + 1 : 0;\n var $last = $totalNumber > 0 ? ($first + $data.length - 1) : 0;\n $paginationNav.removeClass('nurseslounge-lounge-ads-preload');\n $resultInfo.removeClass('nurseslounge-lounge-ads-preload').html('Showing '+$first+' - '+$last+' of '+$totalNumber+' results for Ads');\n var $chtml = nurseslounge_lounge_overview.information_tab_buy_ads_list_item_html($data);\n libs.checkImageLoad($($chtml).find('img'), function () {\n $adsListWrapper.html('').html($chtml).promise().done(function () {\n nurseslounge_lounge_overview.information_tab_buy_ads_list_item_events($saveParams);\n });\n });\n }\n });\n libs.memorySave('lounges_ads_pagination', $paginationObj);\n $reload = setTimeout(function(){\n if(!$loaded){\n nurseslounge_lounge_overview.information_tab_buy_ads_list($params);\n }else{\n clearTimeout($reload);\n }\n }, 10000);\n },\n information_tab_buy_ads_list_item_preview:function(){\n var $chtml = '';\n for(var $i=1; $i<=5; $i++){\n $chtml+= '' +\n '
    ' +\n '
    ' +\n '               ' +\n '               ' +\n '               ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '               ' +\n '               ' +\n '               ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '               ' +\n '               ' +\n '               ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '               ' +\n '               ' +\n '               ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '               ' +\n '               ' +\n '               ' +\n '
    ' +\n '
    ';\n }\n return $chtml;\n },\n information_tab_buy_ads_list_item_html:function($loungeAds){\n var $userId = libs.memoryGet('user_id');\n var $chtml = '';\n $.each($loungeAds, function($i, $v){\n var $img = $v.public_image_root;\n var $checked = $v.active == 1 ? 'checked' : '';\n $chtml+='' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '

    Help us prioritize this ad to nurses.
    Which degree(s) should the nurse already have to qualify for this advertised degree?

    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n ' ' +\n '
    Remaining Impressions:'+$v.impressions+'
    Purchase Date:'+$v.created_at+'
    Purchase Amount:'+$v.real_amount+'
    Purchase Quantity:'+$v.quantity+'
    ' +\n ' ' +\n '
    ' +\n '
    ' +\n '
    ' +\n '
    ';\n });\n return $chtml;\n },\n information_tab_buy_ads_list_item_degrees_html:function($allDegrees, $selectedDegrees){\n var $selection = [];\n $.each($selectedDegrees, function($i, $v){\n $selection.push($v.degree.type);\n });\n $selection.sort();\n $selection = $.unique($selection);\n var $chtml = '';\n $.each($allDegrees, function($i, $v){\n if($.inArray($v, $selection) > -1){\n $chtml += '';\n }else{\n $chtml += '';\n }\n });\n return $chtml;\n },\n information_tab_buy_ads_list_item_events:function($params){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $buyAds = $modal.find(\".lounge-information-modal-container #buyAds .container\");\n var $adsListWrapper = $buyAds.find('.ads-list-wrapper');\n var $degrees = $adsListWrapper.find('select[name=\"degrees\"]');\n var $switch = $adsListWrapper.find('.switch');\n var $buyMoreImpressions = $adsListWrapper.find('.buy-more-impressions');\n try{\n $switch.bootstrapToggle('destroy');\n }catch (e) {}\n $switch.bootstrapToggle();\n $switch.unbind();\n $switch.change(function(){\n var $that = $(this);\n var $imageId = $that.parents('.item:first').data('image_id');\n $params = $.extend({}, $params, {image_id:$imageId, active:$that.is(':checked')});\n nurseslounge_lounge_overview.information_tab_buy_ads_active_request($params, function($data){\n if($data.data.active == 0){\n $that.bootstrapToggle('off', true);\n }else{\n $that.bootstrapToggle('on', true);\n }\n });\n });\n try{\n $degrees.chosen('destroy');\n }catch (e) {}\n $degrees.chosen();\n $degrees.unbind();\n $degrees.change(function(){\n var $that = $(this);\n var $imageId = $that.parents('.item:first').data('image_id');\n $params = $.extend({}, $params, {image_id:$imageId, degrees:$degrees.val()});\n nurseslounge_lounge_overview.information_tab_buy_ads_degree_type_request($params, function($data){\n var $loungeAdId = $data.data.lounge_ad_id;\n $that.parents('.item:first').data('image_id', $loungeAdId);\n });\n });\n $buyMoreImpressions.unbind().click(function(){\n var $that = $(this);\n var $imageId = $that.parents('.item:first').data('image_id');\n var $src = $that.parents('.item:first').data('src');\n nurseslounge_lounge_overview.information_tab_buy_ads_impression_form($params, $imageId, $src);\n });\n },\n information_tab_buy_ads_active_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/buyAds/active',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_tab_sponsor_degrees:function($action, $tab, $allowTabs, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $sponsorDegrees = $modal.find(\".lounge-information-modal-container #sponsorDegrees .container\");\n var $datatableApplications = $sponsorDegrees.find(\".datatable-sponsor-degrees\");\n var $datatableSearch = $sponsorDegrees.find(\"input[name='search']\");\n var $datatableSearchButton = $sponsorDegrees.find(\".search\");\n var $datatableSearchBinding;\n nurseslounge_lounge_overview.information_tab_sponsor_degrees_datatable(\n $datatableApplications,\n \"/lounge/sponsorDegrees/datatable\",\n \"POST\",\n $params,\n function($table){\n $datatableApplications.find('.option').unbind().click(function(){\n var $that = $(this);\n var $degreeId = $that.data('id');\n var $degreeName = $that.data('name');\n nurseslounge_lounge_overview.information_tab_sponsor_degrees_buy_form($params, $degreeId, $degreeName);\n });\n },function($nRow){\n return $nRow;\n }, function($table){\n $datatableSearchButton.unbind().click(function () {\n $table.search($datatableSearch.val());\n $table.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $table.search($datatableSearch.val());\n $table.draw();\n }, 1000);\n });\n });\n if(cback != undefined){\n cback();\n }\n },\n information_tab_sponsor_degrees_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $table = $($element).DataTable({\n \"order\": [[1,\"desc\"]],\n \"dom\":\"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sScrollXInner\": \"auto\",\n \"bScrollCollapse\": true,\n \"bAutoWidth\": true,\n \"responsive\": false,\n \"scrollX\": true,\n \"paging\": true,\n \"bDestroy\": true,\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"initComplete\": function () {\n initComplete($table);\n },\n \"cache\": false,\n \"pageLength\": 10,\n \"pagingType\" : \"full_numbers\",\n \"processing\": true,\n \"serverSide\": true,\n \"stateSave\": true,\n \"ajax\": {\n \"data\":function ($d) {\n return $.extend($d, $data);\n },\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n information_tab_sponsor_degrees_buy_form:function($params, $degreeId, $degreeName){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $sponsorDegrees = $modal.find(\".lounge-information-modal-container #sponsorDegrees .container\");\n var $sponsorDegreesList = $sponsorDegrees.find('form[name=\"sponsor-degrees-list-form\"]');\n var $paymentForm = $sponsorDegrees.find(\"form[name='stripe-form']\");\n var $fromDate = $paymentForm.find(\".from_date:first\");\n var $resetFromDate = $paymentForm.find(\".reset_from_date:first\");\n var $paymentFormWrapper = $paymentForm.find('.payment-form-wrapper');\n var $paymentFormImage = $paymentForm.find('.degree-name');\n var $onProgressWrapper = $paymentForm.find('.on-progress-checkmark-wrapper');\n var $successWrapper = $paymentForm.find('.success-checkmark-wrapper');\n var $days = $paymentForm.find('select[name=\"days\"]');\n var $impressionsDays = $paymentForm.find('.impressions-days');\n var $btnContinue = $paymentForm.find('.continue');\n var $submitButton = $paymentForm.find('button[type=\"submit\"]');\n var $back = $paymentForm.find('.back');\n var $promo = $paymentForm.find('input[name=\"promo\"]');\n\n $back.unbind().click(function(){\n $sponsorDegreesList.show();\n $paymentForm.hide();\n });\n\n $fromDate.datepicker();\n $resetFromDate.unbind().click(function(){\n $fromDate.val(\"\").datepicker(\"update\");\n });\n\n try{\n var $cardSaved = libs.memoryGet('nurseslounge_lounge_overview_card');\n if($cardSaved){\n $cardSaved.destroy();\n }\n }catch ($e){\n\n }\n $sponsorDegreesList.hide();\n $paymentFormImage.html($degreeName);\n\n $paymentFormWrapper.show();\n $onProgressWrapper.hide();\n $successWrapper.hide();\n\n $submitButton.prop('disabled', false);\n $days.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n var $impressions;\n if($val == 365){\n $impressions = 6000;\n }else{\n $impressions = Math.round((($val/30) * 500) * 100)/100;\n }\n $impressionsDays.html('$'+$impressions.toFixed(2));\n $promo.keydown();\n });\n\n var $promoBinding;\n $promo.unbind().on('keyup keydown keypress blur', function(){\n var $code = $(this).val();\n $params = $.extend({}, $params, {code:$code});\n try{\n clearTimeout($promoBinding);\n }catch ($e) {\n\n }\n $promoBinding = setTimeout(function(){\n nurseslounge_lounge_overview.information_tab_sponsor_degrees_buy_promo($params, function($data){\n var $promo = $data.data.promo_code;\n var $discountType = $promo && $promo.discount_type ? $promo.discount_type : null;\n var $discount = $promo && $promo.discount ? $promo.discount : null;\n $params = $.extend({}, $params, {discount_type:$discountType, discount:$discount});\n var $_days = $days.val();\n var $impressions;\n if($_days == 365){\n $impressions = 6000;\n }else{\n $impressions = Math.round((($_days/30) * 500) * 100)/100;\n }\n if($discountType && $discount){\n switch ($discountType){\n case 'percent':\n $discount = ($discount * $impressions)/100;\n $impressions = $impressions - $discount;\n $impressionsDays.html('$'+$impressions.toFixed(2));\n break;\n case 'money':\n $impressions = $impressions - $discount;\n $impressionsDays.html('$'+$impressions.toFixed(2));\n break;\n }\n }else{\n $impressionsDays.html('$'+$impressions.toFixed(2));\n }\n });\n }, 800);\n }).keydown();\n\n var $card = stripe.elements();\n var $style = {\n base: {\n 'lineHeight': '1.5',\n 'fontSize': '1.09em',\n 'color': '#00184A',\n 'fontFamily': \"sans-serif\",\n 'height':'100%',\n 'fontWeight':'100',\n 'opacity': '0.9',\n '::placeholder': {\n 'color':'#636c72',\n 'opacity':'0.9'\n }\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\"\n },\n };\n var $cardDom = $paymentForm.find('.card:first')[0];\n var $cardEle = $card.create('card', {style:$style});\n $cardEle.mount($cardDom);\n libs.memorySave('nurseslounge_lounge_overview_card', $cardEle);\n nurseslounge_lounge_overview.information_tab_sponsor_degrees_buy_validate(function($form){\n var $objForm = libs.getObjForm($form);\n $submitButton.prop('disabled', true);\n $paymentFormWrapper.hide();\n $onProgressWrapper.show();\n stripe.createToken($cardEle, {\n name:$objForm.name,\n address_country:'US',\n currency:'usd'\n }).then(function($res) {\n if($res.token && $res.token.id){\n var $newParams = $.extend({}, $objForm, $res, $params, {degree_id:$degreeId});\n nurseslounge_lounge_overview.information_tab_sponsor_degrees_buy_request($newParams, function($data){\n if($data.status == 'success'){\n $paymentFormWrapper.hide();\n $onProgressWrapper.hide();\n $successWrapper.show();\n $btnContinue.unbind().click(function(){\n $submitButton.prop('disabled', false);\n $paymentForm[0].reset();\n $paymentForm.hide();\n $successWrapper.hide();\n $sponsorDegreesList.show();\n $sponsorDegreesList.find(\".search\").click();\n });\n }else{\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $data.data.msg});\n $paymentForm.find(\"input[name='card']\").val('');\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n }else{\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n });\n $cardEle.on('change', function($e){\n if(!$e.complete && $e.error && $e.error.message){\n var $validator = $paymentForm.validate();\n $validator.showErrors({\"card\": $e.error.message});\n $paymentForm.find(\"input[name='card']\").val('');\n $paymentForm.find('.invalid-feedback').hide();\n $paymentForm.find('.error').removeClass('error');\n $paymentForm.find('.is-invalid').removeClass('is-invalid');\n }else{\n $paymentForm.find(\"input[name='card']\").val('complete');\n }\n });\n $paymentForm.show();\n },\n information_tab_sponsor_degrees_buy_promo:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/sponsorDegrees/promo',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_sponsor_degrees_buy_validate:function(cback){\n $.validator.addMethod('minStrict', function ($val, $el, $par) {\n return $val >= $par;\n });\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $sponsorDegrees = $modal.find(\".lounge-information-modal-container #sponsorDegrees .container\");\n var $paymentForm = $sponsorDegrees.find(\"form[name='stripe-form']\")\n var $validator;\n try {\n $validator = $paymentForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $paymentForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n from_date: {\n required: true\n },\n days: {\n required: true,\n },\n name: {\n required: true,\n minlength: 3,\n maxlength: 191,\n },\n card: {\n required: true\n }\n },\n messages: {\n from_date:{\n required: \"The start date is required\"\n },\n days:{\n required: \"The days is required\"\n },\n name:{\n required: \"The name is required\",\n minlength: \"The name must have at least 3 characters\",\n maxlength: \"The name cannot exceed 191 characters\"\n },\n card:{\n required: \"The card is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_tab_sponsor_degrees_buy_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/sponsorDegrees/payment',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n\n information_tab_spotlight_jobs:function($action, $tab, $allowTabs, $params, $data, cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $spotlightJobButton = $spotlightJobs.find(\".spotlight-job\");\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\");\n var $spotlightJobsListForm = $spotlightJobs.find(\"form[name='spotlight-jobs-list-form']\");\n var $spotlightJobsBack = $spotlightJobs.find(\".back\");\n var $datatableApplications = $spotlightJobs.find(\".datatable-spotlight-jobs\");\n var $datatableSearch = $spotlightJobs.find(\"input[name='search']\");\n var $datatableSearchButton = $spotlightJobs.find(\".search\");\n var $datatableSearchBinding;\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_datatable(\n $datatableApplications,\n \"/lounge/spotlightJobs/datatable\",\n \"POST\",\n $params,\n function($table){\n $datatableApplications.find('.option').unbind().click(function(){\n var $that = $(this);\n var $spotlightId = $that.data('id');\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_clicks($params, $spotlightId);\n });\n $datatableApplications.find('.edit').unbind().click(function(){\n var $that = $(this);\n var $spotlightId = $that.data('id');\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_edit($params, $spotlightId);\n });\n var $switch = $datatableApplications.find('.switch');\n $switch.unbind();\n try{\n $switch.bootstrapToggle('destroy');\n }catch (e) {}\n $switch.bootstrapToggle();\n $switch.change(function(){\n var $that = $(this);\n var $spotlightId = $that.data('id');\n var $onOff = $that.is(':checked');\n var $newParams = $.extend({}, $params, {id:$spotlightId, checked:$onOff});\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_active_request($newParams, function($data){\n $that.prop('checked', $data.data.checked);\n });\n });\n },function($nRow){\n return $nRow;\n }, function($table){\n $datatableSearchButton.unbind().click(function () {\n $table.search($datatableSearch.val());\n $table.draw();\n });\n $datatableSearch.unbind().on('keypress keyup keydown blur', function () {\n try{\n clearTimeout($datatableSearchBinding);\n }catch (e) {\n\n }\n $datatableSearchBinding = setTimeout(function(){\n $table.search($datatableSearch.val());\n $table.draw();\n }, 1000);\n });\n });\n $spotlightJobButton.unbind().click(function(){\n $spotlightJobsListForm.hide();\n $stripeForm.show();\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_clicks($params, null);\n });\n $spotlightJobsBack.unbind().click(function(){\n $stripeForm.hide();\n $spotlightJobsListForm.show();\n dataTable.reload($datatableApplications);\n });\n if(cback != undefined){\n cback();\n }\n },\n information_tab_spotlight_jobs_datatable:function($element, $url, $method, $data, drawCallback, fnRowCallback, initComplete){\n var $table = $($element).DataTable({\n \"order\": [[1,\"desc\"]],\n \"dom\":\"<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>\" +\n \"<'row'<'col-sm-12'tr>>\" +\n \"<'row'<'col-sm-5'i><'col-sm-7'p>>\",\n \"sScrollXInner\": \"auto\",\n \"bScrollCollapse\": true,\n \"bAutoWidth\": true,\n \"responsive\": false,\n \"scrollX\": true,\n \"paging\": true,\n \"bDestroy\": true,\n \"drawCallback\": function () {\n drawCallback($table);\n },\n \"fnRowCallback\": function($nRow){\n fnRowCallback($nRow);\n },\n \"initComplete\": function () {\n initComplete($table);\n },\n \"cache\": false,\n \"pageLength\": 10,\n \"pagingType\" : \"full_numbers\",\n \"processing\": true,\n \"serverSide\": true,\n \"stateSave\": true,\n \"ajax\": {\n \"data\":function ($d) {\n return $.extend($d, $data);\n },\n \"url\":$url,\n \"type\":$method,\n \"datatype\":\"json\"\n }\n });\n $table.columns.adjust().draw();\n },\n information_tab_spotlight_jobs_buy_clicks:function($params, $spotlightId){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\");\n var $spotlightJobsListForm = $spotlightJobs.find(\"form[name='spotlight-jobs-list-form']\");\n if($spotlightId){\n $params = $.extend({}, $params, {id:$spotlightId});\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_clicks_request($params, function($data){\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_events($params, $data);\n $spotlightJobsListForm.hide();\n $stripeForm.show();\n });\n }else{\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_clicks_request($params, function($data) {\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_events($params, $data);\n });\n }\n },\n information_tab_spotlight_jobs_buy_clicks_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/spotlightJobs/get',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_spotlight_jobs_events:function($params, $data){\n var $spotlightJobsData = $data && $data.data && $data.data.spotlight_jobs ? $data.data.spotlight_jobs : null;\n var $logoRootLounge = $data && $data.data && $data.data.logo_root_lounge ? $data.data.logo_root_lounge : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $spotlightJobsList = $spotlightJobs.find('form[name=\"spotlight-jobs-list-form\"]');\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\");\n var $paymentFormWrapper = $stripeForm.find('.payment-form-wrapper');\n var $onProgressWrapper = $stripeForm.find('.on-progress-checkmark-wrapper');\n var $successWrapper = $stripeForm.find('.success-checkmark-wrapper');\n var $clicks = $stripeForm.find('input[name=\"clicks\"]');\n var $impressionsDays = $stripeForm.find('.clicks-amount');\n var $btnContinue = $stripeForm.find('.continue');\n var $submitButton = $stripeForm.find('button[type=\"submit\"]');\n var $id = $stripeForm.find('input[name=\"id\"]');\n var $facilityName = $stripeForm.find('input[name=\"facilityName\"]');\n var $cityState = $stripeForm.find('input[name=\"cityState\"]');\n var $title = $stripeForm.find('input[name=\"title\"]');\n var $shift = $stripeForm.find('input[name=\"shift\"]');\n var $signingBonus = $stripeForm.find('input[name=\"signingBonus\"]');\n var $compensation = $stripeForm.find('input[name=\"compensation\"]');\n var $contactEmailUrl = $stripeForm.find('input[name=\"contactEmailUrl\"]');\n var $destinationLevel = $stripeForm.find('select[name=\"destinationLevel\"]');\n var $specialties = $stripeForm.find('select[name=\"specialties\"]');\n var $location = $stripeForm.find('select[name=\"location\"]');\n var $yearsOfExperience = $stripeForm.find('select[name=\"yearsOfExperience\"]');\n var $logo = $stripeForm.find(\".logo\");\n var $previewText = $stripeForm.find(\".preview-text\");\n var $promo = $stripeForm.find('input[name=\"promo\"]');\n\n $id.val(\"\");\n $facilityName.val(\"\");\n $cityState.val(\"\");\n $title.val(\"\");\n $shift.val(\"\");\n $signingBonus.val(\"\");\n $compensation.val(\"\");\n $contactEmailUrl.val(\"\");\n $logo.attr('src', $logoRootLounge);\n\n if($spotlightJobsData){\n $id.val($spotlightJobsData.id);\n $facilityName.val($spotlightJobsData.facility_name);\n $cityState.val($spotlightJobsData.city_state);\n $title.val($spotlightJobsData.title);\n $shift.val($spotlightJobsData.shift);\n $signingBonus.val($spotlightJobsData.signing_bonus);\n $compensation.val($spotlightJobsData.compensation);\n $contactEmailUrl.val($spotlightJobsData.contact_email_url);\n }\n\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n\n $facilityName.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $cityState.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $title.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $shift.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $signingBonus.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $compensation.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n\n try{\n $destinationLevel.chosen('destroy');\n }catch (e) {}\n $destinationLevel.chosen();\n if($spotlightJobsData.target){\n $destinationLevel.val(JSON.parse($spotlightJobsData.target).destinationLevel).trigger(\"chosen:updated\");\n }else{\n $destinationLevel.val('').trigger(\"chosen:updated\");\n }\n $destinationLevel.unbind();\n\n try{\n $specialties.chosen('destroy');\n }catch (e) {}\n $specialties.chosen();\n if($spotlightJobsData.target){\n $specialties.val(JSON.parse($spotlightJobsData.target).specialties).trigger(\"chosen:updated\");\n }else{\n $specialties.val('').trigger(\"chosen:updated\");\n }\n $specialties.unbind();\n\n try{\n $location.chosen('destroy');\n }catch (e) {}\n $location.chosen();\n if($spotlightJobsData.target){\n $location.val(JSON.parse($spotlightJobsData.target).location).trigger(\"chosen:updated\");\n }else{\n $location.val('').trigger(\"chosen:updated\");\n }\n $location.unbind();\n\n try{\n $yearsOfExperience.chosen('destroy');\n }catch (e) {}\n $yearsOfExperience.chosen();\n if($spotlightJobsData.target){\n $yearsOfExperience.val(JSON.parse($spotlightJobsData.target).yearsOfExperience).trigger(\"chosen:updated\");\n }else {\n $yearsOfExperience.val('').trigger(\"chosen:updated\");\n }\n $yearsOfExperience.unbind();\n\n\n try{\n var $cardSaved = libs.memoryGet('nurseslounge_lounge_overview_card');\n if($cardSaved){\n $cardSaved.destroy();\n }\n }catch ($e){\n\n }\n\n $paymentFormWrapper.show();\n $onProgressWrapper.hide();\n $successWrapper.hide();\n\n $submitButton.prop('disabled', false);\n $clicks.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n var $impressions = ($val * 5);\n $impressionsDays.html('$'+$impressions.toFixed(2));\n $promo.keydown();\n });\n\n var $promoBinding;\n $promo.unbind().on('keyup keydown keypress blur', function(){\n var $code = $(this).val();\n $params = $.extend({}, $params, {code:$code});\n try{\n clearTimeout($promoBinding);\n }catch ($e) {\n\n }\n $promoBinding = setTimeout(function(){\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_promo($params, function($data){\n var $promo = $data.data.promo_code;\n var $discountType = $promo && $promo.discount_type ? $promo.discount_type : null;\n var $discount = $promo && $promo.discount ? $promo.discount : null;\n $params = $.extend({}, $params, {discount_type:$discountType, discount:$discount});\n var $impressions = ($clicks.val() * 5);\n if($discountType && $discount){\n switch ($discountType){\n case 'percent':\n $discount = ($discount * $impressions)/100;\n $impressions = $impressions - $discount;\n $impressionsDays.html('$'+$impressions.toFixed(2));\n break;\n case 'money':\n $impressions = $impressions - $discount;\n $impressionsDays.html('$'+$impressions.toFixed(2));\n break;\n }\n }else{\n $impressionsDays.html('$'+$impressions.toFixed(2));\n }\n });\n }, 800);\n }).keydown();\n\n var $card = stripe.elements();\n var $style = {\n base: {\n 'lineHeight': '1.5',\n 'fontSize': '1.09em',\n 'color': '#00184A',\n 'fontFamily': \"sans-serif\",\n 'height':'100%',\n 'fontWeight':'100',\n 'opacity': '0.9',\n '::placeholder': {\n 'color':'#636c72',\n 'opacity':'0.9'\n }\n },\n invalid: {\n color: \"#fa755a\",\n iconColor: \"#fa755a\"\n },\n };\n var $cardDom = $stripeForm.find('.credit-card:first')[0];\n var $cardEle = $card.create('card', {style:$style});\n $cardEle.mount($cardDom);\n libs.memorySave('nurseslounge_lounge_overview_card', $cardEle);\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_validate(function($form){\n var $objForm = libs.getObjForm($form);\n $submitButton.prop('disabled', true);\n $paymentFormWrapper.hide();\n $onProgressWrapper.show();\n stripe.createToken($cardEle, {\n name:$objForm.name,\n address_country:'US',\n currency:'usd'\n }).then(function($res) {\n if($res.token && $res.token.id){\n var $newParams = $.extend({}, $objForm, $res, $params);\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_request($newParams, function($data){\n if($data.status == 'success'){\n $paymentFormWrapper.hide();\n $onProgressWrapper.hide();\n $successWrapper.show();\n $btnContinue.unbind().click(function(){\n $paymentFormWrapper.show();\n $submitButton.prop('disabled', false);\n $stripeForm[0].reset();\n $stripeForm.hide();\n $successWrapper.hide();\n $spotlightJobsList.show();\n $spotlightJobsList.find(\".search\").click();\n });\n }else{\n var $validator = $stripeForm.validate();\n $validator.showErrors({\"card\": $data.data.msg});\n $stripeForm.find(\"input[name='card']\").val('');\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n }else{\n $submitButton.prop('disabled', false);\n $onProgressWrapper.hide();\n $paymentFormWrapper.show();\n }\n });\n });\n $cardEle.on('change', function($e){\n if(!$e.complete && $e.error && $e.error.message){\n var $validator = $stripeForm.validate();\n $validator.showErrors({\"card\": $e.error.message});\n $stripeForm.find(\"input[name='card']\").val('');\n $stripeForm.find('.invalid-feedback').hide();\n $stripeForm.find('.error').removeClass('error');\n $stripeForm.find('.is-invalid').removeClass('is-invalid');\n }else{\n $stripeForm.find(\"input[name='card']\").val('complete');\n }\n });\n },\n information_tab_spotlight_jobs_promo:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/spotlightJobs/promo',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_spotlight_jobs_buy_validate:function(cback){\n $.validator.addMethod('minStrict', function ($val, $el, $par) {\n return $val >= $par;\n });\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\")\n var $validator;\n try {\n $validator = $stripeForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $stripeForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n facilityName: {\n required: true\n },\n cityState: {\n required: true\n },\n title: {\n required: true\n },\n shift: {\n required: false\n },\n signingBonus: {\n required: false\n },\n compensation: {\n required: false\n },\n contactEmailUrl: {\n required: true\n },\n destinationLevel: {\n required: true\n },\n specialties: {\n required: true\n },\n location: {\n required: true\n },\n yearsOfExperience: {\n required: true\n }\n },\n messages: {\n facilityName: {\n required: \"The facility name is required\"\n },\n cityState: {\n required: \"The city, state is required\"\n },\n title:{\n required: \"The title is required\"\n },\n shift:{\n required: \"The shift is not required\"\n },\n signingBonus:{\n required: \"The signing bonus is not required\"\n },\n compensation:{\n required: \"The compensation is not required\"\n },\n contactEmailUrl:{\n required: \"The contact email or url is required\"\n },\n destinationLevel:{\n required: \"The destination level is required\"\n },\n specialties:{\n required: \"The specialties is required\"\n },\n location:{\n required: \"The location is required\"\n },\n yearsOfExperience:{\n required: \"The years of experience is required\"\n },\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_tab_spotlight_jobs_buy_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/spotlightJobs/payment',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_spotlight_jobs_active_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/spotlightJobs/active',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_spotlight_jobs_edit:function($params, $spotlightId){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\");\n var $spotlightJobsListForm = $spotlightJobs.find(\"form[name='spotlight-jobs-list-form']\");\n var $spotlightEditForm = $spotlightJobs.find(\"form[name='spotlight-jobs-edit']\");\n $params = $.extend({}, $params, {id:$spotlightId});\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_buy_clicks_request($params, function($data){\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_edit_events($params, $data);\n $spotlightJobsListForm.hide();\n $stripeForm.hide();\n $spotlightEditForm.show();\n });\n },\n information_tab_spotlight_jobs_edit_events:function($params, $data){\n var $spotlightJobsData = $data && $data.data && $data.data.spotlight_jobs ? $data.data.spotlight_jobs : null;\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $stripeForm = $spotlightJobs.find(\"form[name='stripe-form']\");\n var $spotlightJobsListForm = $spotlightJobs.find(\"form[name='spotlight-jobs-list-form']\");\n var $spotlightJobsEditForm = $spotlightJobs.find('form[name=\"spotlight-jobs-edit\"]');\n var $id = $spotlightJobsEditForm.find('input[name=\"id\"]');\n var $facilityName = $spotlightJobsEditForm.find('input[name=\"facilityName\"]');\n var $cityState = $spotlightJobsEditForm.find('input[name=\"cityState\"]');\n var $title = $spotlightJobsEditForm.find('input[name=\"title\"]');\n var $shift = $spotlightJobsEditForm.find('input[name=\"shift\"]');\n var $signingBonus = $spotlightJobsEditForm.find('input[name=\"signingBonus\"]');\n var $compensation = $spotlightJobsEditForm.find('input[name=\"compensation\"]');\n var $contactEmailUrl = $spotlightJobsEditForm.find('input[name=\"contactEmailUrl\"]');\n var $back = $spotlightJobsEditForm.find('.back');\n var $datatableSearchButton = $spotlightJobs.find(\".search\");\n var $logo = $spotlightJobs.find(\".logo\");\n var $previewText = $spotlightJobs.find(\".preview-text\");\n\n $id.val(\"\");\n $facilityName.val(\"\");\n $cityState.val(\"\");\n $title.val(\"\");\n $shift.val(\"\");\n $signingBonus.val(\"\");\n $compensation.val(\"\");\n $contactEmailUrl.val(\"\");\n $id.val($spotlightJobsData.id);\n $facilityName.val($spotlightJobsData.facility_name);\n $cityState.val($spotlightJobsData.city_state);\n $title.val($spotlightJobsData.title);\n $shift.val($spotlightJobsData.shift);\n $signingBonus.val($spotlightJobsData.signing_bonus);\n $compensation.val($spotlightJobsData.compensation);\n $contactEmailUrl.val($spotlightJobsData.contact_email_url);\n $logo.attr('src', $spotlightJobsData.lounge.logo_root_lounge);\n\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n\n $facilityName.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $cityState.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $title.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $shift.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $signingBonus.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n $compensation.unbind().on('keyup keydown', function(){\n if(\n $title.val() == \"\" &&\n $shift.val() == \"\" &&\n $signingBonus.val() == \"\" &&\n $compensation.val() == \"\" &&\n $facilityName.val() == \"\" &&\n $cityState.val() == \"\"\n ){\n $previewText.html('');\n }else{\n $previewText.html($title.val()+' - '+$shift.val()+' - '+$signingBonus.val()+' - '+$compensation.val()+' - '+$facilityName.val()+' - '+$cityState.val());\n }\n });\n\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_edit_validate(function($form){\n var $objForm = libs.getObjForm($form);\n var $newParams = $.extend({}, $objForm, $params);\n nurseslounge_lounge_overview.information_tab_spotlight_jobs_edit_request($newParams, function(){\n $stripeForm.hide();\n $spotlightJobsEditForm.hide();\n $spotlightJobsListForm.show();\n $datatableSearchButton.click();\n });\n });\n $back.unbind().click(function(){\n $stripeForm.hide();\n $spotlightJobsEditForm.hide();\n $spotlightJobsListForm.show();\n $datatableSearchButton.click();\n });\n },\n information_tab_spotlight_jobs_edit_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/spotlightJobs/set',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_tab_spotlight_jobs_edit_validate:function(cback){\n var $modal = $(\"#nurseslounge-lounge-information-edit-modal\");\n var $spotlightJobs = $modal.find(\".lounge-information-modal-container #spotlightJobs .container\");\n var $stripeForm = $spotlightJobs.find(\"form[name='spotlight-jobs-edit']\")\n var $validator;\n try {\n $validator = $stripeForm.validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $stripeForm.validate({\n onsubmit: true,\n debug: true,\n ignore: '*:not(.validate)',\n rules: {\n facilityName: {\n required: true\n },\n cityState: {\n required: true\n },\n title: {\n required: true\n },\n shift: {\n required: false\n },\n signingBonus: {\n required: false\n },\n compensation: {\n required: false\n },\n contactEmailUrl: {\n required: true\n },\n },\n messages: {\n facilityName: {\n required: \"The facility name is required\"\n },\n cityState: {\n required: \"The city, state is required\"\n },\n title:{\n required: \"The title is required\"\n },\n shift:{\n required: \"The shift is not required\"\n },\n signingBonus:{\n required: \"The signing bonus is not required\"\n },\n compensation:{\n required: \"The compensation is not required\"\n },\n contactEmailUrl:{\n required: \"The contact email or url is required\"\n },\n destinationLevel:{\n required: \"The destination level is required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n\n claim_lounge:function($container, $params){\n var $modal = $(\"#nurseslounge-claim-lounges-modal\");\n var $claimLoungeContainer = $container.find('.claim-lounge-container:first');\n var $claimLoungeButton = $claimLoungeContainer.find('.claim-lounge:first');\n var $modalTitle = $modal.find(\".modal-title\");\n var $modalBody = $modal.find(\".modal-body\");\n $claimLoungeButton.unbind().click(function(){\n nurseslounge_lounge_overview.claim_lounge_form_request($params, function($chtml){\n $modalTitle.html('Contact us to own this Lounge');\n $modalBody.html($chtml).promise().done(function(){\n nurseslounge_lounge_overview.claim_lounge_validate(function($form){\n $params = $.extend({}, $params, libs.getObjForm($form));\n nurseslounge_lounge_overview.claim_lounge_request($params, function(){\n $modal.modal('hide');\n });\n });\n $modal.find(\"form input[name='phone']\").mask('+(00) 000-000-0000');\n $modal.modal('show');\n });\n });\n });\n },\n claim_lounge_form_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/claim/get',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n claim_lounge_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-claim-lounges-modal form:first\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-claim-lounges-modal form:first\").validate({\n onsubmit: true,\n debug: true,\n ignore: \"*:not(.validate)\",\n rules: {\n name: {\n required: true,\n minlength: 3,\n maxlength: 191\n },\n email: {\n required: true,\n minlength: 3,\n maxlength: 191,\n email:true\n },\n phone: {\n required: true,\n minlength: 2,\n maxlength: 18\n },\n company: {\n required: true,\n minlength: 3,\n maxlength: 191\n },\n jobTitle: {\n required: true,\n minlength: 3,\n maxlength: 191\n },\n message: {\n required: false\n }\n },\n messages: {\n name: {\n required: \"The name is required\",\n minlength: \"The name must have at least 3 characters\",\n maxlength: \"The name cannot exceed 191 characters\"\n },\n email: {\n required: \"The email is required\",\n minlength: \"The email must have at least 3 characters\",\n maxlength: \"The email cannot exceed 191 characters\",\n email:\"The email is invalid\"\n },\n phone: {\n required: \"The phone is required\",\n minlength: \"The phone must have at least 3 characters\",\n maxlength: \"The phone cannot exceed 191 characters\",\n },\n company: {\n required: \"The company is required\",\n minlength: \"The company must have at least 3 characters\",\n maxlength: \"The company cannot exceed 191 characters\",\n },\n jobTitle: {\n required: \"The job title is required\",\n minlength: \"The job title must have at least 3 characters\",\n maxlength: \"The job title cannot exceed 191 characters\",\n },\n message: {\n required: \"The message is not required\",\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n claim_lounge_request:function($params, cback){\n $.ajax({\n url: \"/lounge/claim/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Banners\n banners_location:function(cback){\n cback({\n 'banners':$(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .banners\")\n });\n },\n lounge_ads_location:function(cback){\n cback({\n 'ads':$(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .lounge-ads\")\n });\n },\n lounge_ads_engine:function($config){\n var $userId = libs.memoryGet('user_id');\n var $ads = $config.ads.not('.slick-initialized');\n try {\n $ads.slick('unslick');\n } catch (e) {\n }\n var $widget = $ads.parents('.lounge-ads-container:first');\n var $adsName = 'ADS';\n var $adsCookie = nurseslounge_myDashboard_accountSettings.readCookie($adsName);\n $.ajax({\n url: \"/lounge/ads\",\n method: \"POST\",\n cache: false,\n dataType: \"json\",\n data: {\n user_id: $userId,\n lounge_ads:$adsCookie\n },\n success: function ($data) {\n libs.expire($data);\n $ads.width($widget.width());\n var $chtml = '';\n if ($data.status == 'success') {\n $.each($data.data.lounge_ads, function($i, $v){\n if($i == 0){\n $adsCookie = nurseslounge_myDashboard_accountSettings.readCookie($adsName);\n if($adsCookie && $adsCookie != ''){\n $adsCookie = JSON.parse($adsCookie);\n }else{\n $adsCookie = {};\n }\n if($adsCookie && $adsCookie[$v.id] && parseInt($adsCookie[$v.id]) > 0){\n $adsCookie[$v.id] = 1 + parseInt($adsCookie[$v.id]);\n }else{\n $adsCookie[$v.id] = 1;\n }\n nurseslounge_myDashboard_accountSettings.createCookie($adsName,JSON.stringify($adsCookie),1);\n }\n $chtml+='
    ';\n $chtml+=' ';\n $chtml+='
    ';\n });\n libs.checkImageLoad($($chtml).find('img'), function(){\n $ads.width($widget.width());\n $ads.html($chtml).promise().done(function(){\n if($data.data.lounge_ads.length > 0){\n $config.ads.parent().show();\n }else{\n $config.ads.parent().hide();\n }\n $ads.on('init', function () {\n $ads.find('.open-url').unbind().click(function(){\n var $key = $(this).data('key');\n window.open(window.location.protocol +'//'+ window.location.hostname + \"/lounge/\"+$key, '_blank', '');\n });\n }).on('beforeChange', function($e, $slick, $cS, $nS){\n var $slickSlide = $(\".slick-slide[data-slick-index='\"+$nS+\"'\");\n var $id = $slickSlide.find('.open-url').data('id');\n $adsCookie = nurseslounge_myDashboard_accountSettings.readCookie($adsName);\n if($adsCookie && $adsCookie != ''){\n $adsCookie = JSON.parse($adsCookie);\n }else{\n $adsCookie = {};\n }\n if($adsCookie && $adsCookie[$id] && parseInt($adsCookie[$id]) > 0){\n $adsCookie[$id] = 1 + parseInt($adsCookie[$id]);\n }else{\n $adsCookie[$id] = 1;\n }\n nurseslounge_myDashboard_accountSettings.createCookie($adsName,JSON.stringify($adsCookie),10);\n }).slick({\n slidesToShow: 1,\n slidesToScroll: 1,\n autoplay: true,\n autoplaySpeed: 5000,\n arrows: false,\n dots: false,\n pauseOnHover: false\n });\n });\n });\n }\n }\n });\n },\n //Task List Container\n task_list_container:function(cback){\n var $container = $(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right\");\n cback($container);\n },\n //Claim Lounge\n claim_lounge_container:function(cback){\n var $container = $(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right\");\n cback($container);\n },\n //Meet our recruiters\n information_meet_our_recruiters:function(cback){\n cback({\n 'container':$(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .meet-our-recruiters\")\n });\n },\n information_meet_our_recruiters_engine:function($config){\n var $modal = $(\"#nurseslounge-meet-recruiters-modal\");\n var $recruiter = $config.container.find('.recruiter');\n $recruiter.unbind().click(function(){\n var $that = $(this);\n var $key = $that.data('key');\n var $recruiterUserId = $that.data('recruiteruserid');\n var $params = $.extend({}, {key:$key, user_id:libs.memoryGet('user_id'), recruiter_user_id:$recruiterUserId});\n nurseslounge_lounge_overview.information_meet_our_recruiters_request($params, function($chtml){\n var $requestInfoModal = $modal.find(\".request-info-modal-container\");\n $requestInfoModal.html($chtml).promise().done(function(){\n var $otherFacilityDiv = $modal.find('.other-facility');\n var $selectFacility = $modal.find('select[name=\"facility\"]');\n var $otherFacility = $modal.find('input[name=\"otherFacility\"]');\n $selectFacility.unbind().change(function(){\n var $that = $(this);\n var $val = $that.val();\n if($val != ''){\n if($val == 'Other'){\n if($otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.removeClass('d-none');\n }\n }else{\n if(!$otherFacilityDiv.hasClass('d-none')){\n $otherFacilityDiv.addClass('d-none');\n }\n }\n $otherFacility.val('');\n }\n });\n $modal.find(\"form\").find(\"input[name='phone']\").mask('+(00) 000-000-0000');\n nurseslounge_lounge_overview.information_meet_our_recruiters_validate(function($form){\n $params = $.extend({}, $params, libs.getObjForm($form));\n nurseslounge_lounge_overview.information_meet_our_recruiters_request_set($params, function($data){\n $modal.modal('hide');\n });\n });\n $modal.modal('show');\n });\n });\n });\n libs.refreshTooltips();\n },\n information_meet_our_recruiters_validate:function(cback){\n var $validator;\n try {\n $validator = $(\"#nurseslounge-meet-recruiters-modal form\").validate();\n $validator.destroy();\n }catch (e) {\n\n }\n $validator = $(\"#nurseslounge-meet-recruiters-modal form\").validate({\n onsubmit: true,\n debug: true,\n ignore: \"*:not(.validate)\",\n rules: {\n name:{\n required: true\n },\n email:{\n required: true,\n email: true\n },\n phone:{\n required: false\n },\n jobTitle:{\n required: false\n },\n facility:{\n required: false\n },\n otherFacility:{\n required: false\n },\n message:{\n required: false\n }\n },\n messages: {\n name:{\n required: \"The name is required\"\n },\n email:{\n required: \"The email is required\",\n email: \"The email is invalid\"\n },\n phone:{\n required: \"The phone is not required\"\n },\n jobTitle:{\n required: \"The job title is not required\"\n },\n facility:{\n required: \"The facility is not required\"\n },\n otherFacility: {\n required: \"The other facility is not required\"\n },\n message: {\n required: \"The message is not required\"\n }\n },\n errorPlacement: function($error, $element){\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if(!$ele.hasClass('is-invalid')){\n $ele.addClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\n },\n success: function($error, $element) {\n var $ele = $($element);\n var $name = $ele.attr(\"name\");\n if($ele.hasClass('is-invalid')){\n $ele.removeClass('is-invalid');\n }\n $(\".\"+$name+\"_validate\").html('').hide();\n },\n submitHandler: function($form) {\n cback($form);\n return false;\n }\n });\n },\n information_meet_our_recruiters_request:function($params, cback){\n $.ajax({\n url:'/lounge/requestRecruiterInfo/get',\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n information_meet_our_recruiters_request_set:function($params, cback){\n $.ajax({\n url: \"/lounge/requestRecruiterInfo/set\",\n method: \"POST\",\n cache:false,\n dataType: \"json\",\n data:$params,\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n //Report\n report_container:function(cback){\n var $container = $(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .report\");\n cback($container);\n },\n report:function($container, $params){\n nurseslounge_lounge_overview.report_request($params, function($chtml){\n $container.html($chtml).promise().done(function(){\n libs.refreshTooltips();\n });\n });\n },\n report_request:function($params, cback){\n $.ajax({\n type: 'POST',\n url: '/lounge/report/get',\n data:$params,\n method: \"POST\",\n cache:false,\n dataType: \"html\",\n success: function ($data) {\n libs.expire($data);\n cback($data);\n }\n });\n },\n};\n","var public_nurseslounge_lounge_overview = {\r\n init:function($params){\r\n var $lounge = JSON.parse(libs.unlock($params));\r\n var $userId = libs.memoryGet('user_id');\r\n public_nurseslounge_lounge_overview.information_events();\r\n public_nurseslounge_lounge_overview.information_location_video($lounge);\r\n try{\r\n google.maps.event.addListener(window, \"load\", public_nurseslounge_lounge_overview.information_location_map($lounge));\r\n }catch (e) {\r\n\r\n }\r\n public_nurseslounge_lounge_overview.banners_location(function($config){\r\n nurseslounge_myDashboard_myProfile.banners_engine($config);\r\n });\r\n public_nurseslounge_lounge_overview.claim_lounge_container(function($container){\r\n var $nav = $(\".nav-underline\");\r\n var $key = $nav.data('key');\r\n var $params = {key:$key, user_id:$userId};\r\n nurseslounge_lounge_overview.claim_lounge($container, $params);\r\n });\r\n public_nurseslounge_lounge_overview.lounge_ads_location(function($config){\r\n nurseslounge_lounge_overview.lounge_ads_engine($config);\r\n });\r\n },\r\n information_events:function(){\r\n $(\".nav-underline a:eq(0)\").addClass('active');\r\n var $loungeInformation = $(\"#nurseslounge-lounge-information\");\r\n var $loungeInformationRight = $loungeInformation.find('.nurseslounge-lounge-information-right');\r\n var $activityInfo = $loungeInformationRight.find('.activity-info');\r\n var $discoverMoreDegrees = $loungeInformationRight.find('.discover-more-degrees');\r\n var $discoverMoreJobs = $loungeInformationRight.find('.discover-more-jobs');\r\n var $addReview = $loungeInformationRight.find('.add-review');\r\n var $joinEvent = $loungeInformationRight.find('.join-event');\r\n var $joinCommunity = $loungeInformationRight.find('.join-community');\r\n var $nav = $(\".nav-underline\");\r\n var $key = $nav.data('key');\r\n var $params = {key:$key};\r\n $activityInfo.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'activity'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreDegrees.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degrees'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreJobs.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'nursingJobs'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $addReview.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'ratingReviews'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $joinEvent.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'calendar'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $joinCommunity.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'followers'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $(\".nav-underline a\").unbind().click(function(){\r\n var $that = $(this);\r\n var $id = $that.data('id');\r\n $params = $.extend({}, $params, {id:$id});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n },\r\n login_popup:function($params){\r\n var $modal = $(\"#nurseslounge-login-modal\");\r\n var $modalBody = $modal.find('.modal-body');\r\n public_nurseslounge_lounge_overview.login_request($params, function($chtml){\r\n $modalBody.html($chtml).promise().done(function(){\r\n libs.checkImageLoad($($chtml).find('img'), function(){\r\n var $backToLogin = $modalBody.find('.back-to-login');\r\n $backToLogin.unbind().click(function(){\r\n window.location = '/login';\r\n });\r\n public_nurseslounge_lounge_overview.signup_validate(function($form){\r\n $modal.modal('hide');\r\n public_nurseslounge_lounge_overview.signup_request(libs.getObjForm($form));\r\n $(\".form-signup form\")[0].reset();\r\n });\r\n $(\".form-signup form .create\").unbind().click(function(){\r\n $(this).submit();\r\n });\r\n $modal.modal('show');\r\n });\r\n });\r\n });\r\n },\r\n login_request:function($params, cback){\r\n $.ajax({\r\n type: 'POST',\r\n url: '/public/login',\r\n data:$params,\r\n method: \"POST\",\r\n cache:false,\r\n dataType: \"html\",\r\n success: function ($data) {\r\n libs.expire($data);\r\n cback($data);\r\n }\r\n });\r\n },\r\n signup_validate:function(cback){\r\n var $validator;\r\n try {\r\n $validator = $(\".form-signup form\").validate();\r\n $validator.destroy();\r\n }catch (e) {\r\n\r\n }\r\n $validator = $(\".form-signup form\").validate({\r\n onsubmit: true,\r\n ignore: \"*:not(.validate)\",\r\n debug: true,\r\n rules: {\r\n email: {\r\n required: true,\r\n minlength: 3,\r\n maxlength: 191,\r\n email:true,\r\n remote: {\r\n url: \"/signup/email/exist\",\r\n type: \"post\",\r\n data: {\r\n email: function(){ return $(\".form-signup form input[name='email']\").val(); }\r\n }\r\n }\r\n },\r\n firstName: {\r\n required: true,\r\n maxlength: 191\r\n },\r\n lastName: {\r\n required: true,\r\n maxlength: 191\r\n },\r\n password: {\r\n required: true,\r\n minlength: 8,\r\n maxlength: 191\r\n },\r\n profile: {\r\n required: true\r\n }\r\n },\r\n messages: {\r\n email: {\r\n required: \"The email is required\",\r\n maxlength: \"The email cannot exceed 191 characters\",\r\n email:\"The email is invalid\",\r\n remote:\"The email exist, choose another\"\r\n },\r\n firstName: {\r\n required: \"The first name is required\",\r\n maxlength: \"The first name cannot exceed 191 characters\"\r\n },\r\n lastName: {\r\n required: \"The last name is required\",\r\n maxlength: \"The last name cannot exceed 191 characters\"\r\n },\r\n password: {\r\n required: \"The password is required\",\r\n minlength: \"The password must have at least 8 characters\",\r\n maxlength: \"The password cannot exceed 191 characters\"\r\n },\r\n profile: {\r\n required: \"The profile is required\"\r\n }\r\n },\r\n errorPlacement: function($error, $element){\r\n var $ele = $($element);\r\n var $name = $ele.attr(\"name\");\r\n if(!$ele.hasClass('is-invalid')){\r\n $ele.addClass('is-invalid');\r\n }\r\n $(\".\"+$name+\"_validate\").html($($error).text()).show();\r\n },\r\n success: function($error, $element) {\r\n var $ele = $($element);\r\n var $name = $ele.attr(\"name\");\r\n if($ele.hasClass('is-invalid')){\r\n $ele.removeClass('is-invalid');\r\n }\r\n $(\".\"+$name+\"_validate\").html('').hide();\r\n },\r\n submitHandler: function($form) {\r\n cback($form);\r\n return false;\r\n }\r\n });\r\n },\r\n signup_request:function($data){\r\n $.ajax({\r\n url:\"/signup/request\",\r\n method: \"POST\",\r\n dataType: \"json\",\r\n data:$data,\r\n success: function ($data) {\r\n libs.expire($data);\r\n if(\r\n $data.status == 'success'\r\n ){\r\n var $newWindow = window.open('/login');\r\n var $script = document.createElement('script');\r\n $script.innerHTML = \"var public_nurseslounge_lounge_overview = {\" +\r\n \"openWelcome:function($data){\" +\r\n \"$data = JSON.parse($data);\" +\r\n \"libs.render('/signup/welcome', 'login', 'signup_welcome', $data.data, 'POST') \"+\r\n \"}\" +\r\n \"};public_nurseslounge_lounge_overview.openWelcome('\"+JSON.stringify($data)+\"');\";\r\n $newWindow.onload = function(){\r\n this.document.body.appendChild($script);\r\n };\r\n }\r\n }\r\n });\r\n },\r\n information_location_map:function($lounge){\r\n var $location = $lounge.location;\r\n if($location && $location.address_latitude && $location.address_longitude && $location.address_is_unmappable == 0){\r\n var $position = new google.maps.LatLng(parseFloat($location.address_latitude), parseFloat($location.address_longitude));\r\n var $iconUrl = './../../bimg/NursesLounge/active.png';\r\n var $map = new google.maps.Map(document.getElementById('nurseslounge-lounge-information-right-map'), {\r\n center:$position,\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n mapTypeControl: false,\r\n streetViewControl: false,\r\n fullscreenControl: false,\r\n zoom: 15\r\n });\r\n $map.setTilt(0);\r\n var $marker = new google.maps.Marker({\r\n position:$position,\r\n map: $map,\r\n animation: google.maps.Animation.DROP,\r\n icon: {url:$iconUrl, scaledSize: (new google.maps.Size(20, 35))},\r\n });\r\n }\r\n },\r\n information_location_video:function($lounge){\r\n var $nursesloungeLoungeInformation = $(\"#nurseslounge-lounge-information\");\r\n var $loungeInformationLeft = $nursesloungeLoungeInformation.find('.nurseslounge-lounge-information-left:first');\r\n var $youtubeVideo = $loungeInformationLeft.find('.youtube-video:first');\r\n var $myVideo = $loungeInformationLeft.find('.my-video:first');\r\n var $youtubePlayer;\r\n var $myPlayer;\r\n var $vimeoRegex = new RegExp ('(vimeo)','gi');\r\n var $youtubeRegex = new RegExp ('(youtube)','gi');\r\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($vimeoRegex)){\r\n var $url = $lounge.video_url.split('/');\r\n var $vimeoId = $url[$url.length - 1];\r\n const $vimeoPlayer = new Vimeo.Player($youtubeVideo[0], {\r\n id:$vimeoId,\r\n width: 680,\r\n loop: false,\r\n autoplay:true,\r\n muted:true\r\n });\r\n }\r\n if($lounge.video_url && $lounge.video_url != '' && $lounge.video_url.match($youtubeRegex)){\r\n var $url = new URL($lounge.video_url);\r\n window.YT.ready(function() {\r\n $youtubePlayer = new YT.Player($youtubeVideo[0], {\r\n height: '360',\r\n width: '100%',\r\n videoId: $url.searchParams.get('v'),\r\n events: {\r\n 'onReady': function () {\r\n $youtubePlayer.mute();\r\n $youtubePlayer.playVideo();\r\n },\r\n 'onError': function () {\r\n $youtubeVideo.hide();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n if($lounge.video_root_lounge && $lounge.name){\r\n $myVideo.height(480);\r\n $myPlayer = new Artplayer({\r\n width: '100%',\r\n height: '480px',\r\n destroy:true,\r\n container: $myVideo[0],\r\n title: $lounge.name,\r\n url: $lounge.video_root_lounge,\r\n mutex: true,\r\n muted:true,\r\n play: true,\r\n controls: [\r\n {\r\n position: 'right',\r\n html: 'Fullscreen',\r\n click: function() {\r\n public_nurseslounge_lounge_overview.information_location_video_fullscreen($myPlayer, $lounge, true);\r\n },\r\n },\r\n ],\r\n moreVideoAttr: {\r\n crossOrigin: 'anonymous'\r\n }\r\n }).on('ready', function() {\r\n $myPlayer.player.pause = true;\r\n $myPlayer.player.play = true;\r\n }).on('pause', function(){\r\n $myPlayer.mask.show = false;\r\n });\r\n }\r\n },\r\n information_location_video_fullscreen:function($myPlayer, $lounge, $scroll){\r\n var $gallery;\r\n var $chtml = '' +\r\n '
    ' +\r\n '
    ' +\r\n '
    ' +\r\n '
    ';\r\n $gallery = new PhotoSwipe($('#nurseslounge-lounge-information-video')[0], PhotoSwipeUI_Default,\r\n [\r\n {\r\n html: $chtml\r\n }\r\n ],\r\n {\r\n index: 0,\r\n clickToCloseNonZoomable: false,\r\n closeOnScroll: false,\r\n closeOnVerticalDrag:false,\r\n closeElClasses: [],\r\n history:false\r\n }\r\n );\r\n $gallery.init();\r\n if($myPlayer){\r\n $myPlayer.player.pause = true;\r\n }\r\n var $container = $('#nurseslounge-lounge-information-video .preview-video-container');\r\n var $target = $container.find('.video:first');\r\n $target.width($(window).width());\r\n $target.height($(window).height());\r\n var $previewPlayer = new Artplayer({\r\n destroy:true,\r\n container: $target[0],\r\n title: $lounge.name,\r\n url: $lounge.video_root_lounge,\r\n mutex: true,\r\n muted:true,\r\n play: true\r\n }).on('ready', function() {\r\n $previewPlayer.player.pause = true;\r\n $previewPlayer.player.play = true;\r\n $previewPlayer.mask.show = false;\r\n }).on('pause', function(){\r\n $previewPlayer.mask.show = false;\r\n });\r\n $previewPlayer.mask.show = false;\r\n var $fullscreen = false;\r\n //var $api = $gallery.ui.getFullscreenAPI();\r\n //$api.enter();\r\n $(\"body\").css('overflowY', 'hidden');\r\n $gallery.listen('close', function() {\r\n if($scroll){\r\n $(\"body\").css('overflowY', 'scroll');\r\n }\r\n $container.remove();\r\n $previewPlayer.player.pause = true;\r\n $previewPlayer.destroy();\r\n if($myPlayer) {\r\n $myPlayer.player.play = true;\r\n }\r\n });\r\n $gallery.listen('beforeResize', function() {\r\n if($fullscreen){\r\n $target.height($(window).height());\r\n }else{\r\n $target.height($(window).height());\r\n }\r\n $fullscreen = !$fullscreen;\r\n });\r\n },\r\n //Banners\r\n banners_location:function(cback){\r\n cback({\r\n 'banners':$(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .banners\")\r\n });\r\n },\r\n lounge_ads_location:function(cback){\r\n cback({\r\n 'ads':$(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right .lounge-ads\")\r\n });\r\n },\r\n //Claim Lounge\r\n claim_lounge_container:function(cback){\r\n var $container = $(\"#nurseslounge-lounge-information .nurseslounge-lounge-information-right\");\r\n cback($container);\r\n }\r\n};\r\n","var public_nurseslounge_job_jobDetail = {\r\n init:function($params){\r\n var $job = JSON.parse(libs.unlock($params));\r\n public_nurseslounge_job_jobDetail.information_events($job);\r\n try{\r\n google.maps.event.addListener(window, \"load\", public_nurseslounge_job_jobDetail.information_location_map($job));\r\n }catch (e) {\r\n\r\n }\r\n public_nurseslounge_job_jobDetail.banners_location(function($config){\r\n nurseslounge_myDashboard_myProfile.banners_engine($config);\r\n });\r\n },\r\n information_events:function($job){\r\n $(\".nav-underline a:eq(0)\").addClass('active');\r\n var $loungeInformation = $(\"#nurseslounge-job-information\");\r\n var $loungeInformationRight = $loungeInformation.find('.nurseslounge-job-information-right');\r\n var $loungeInformationLeft = $loungeInformation.find('.nurseslounge-job-information-left');\r\n var $applyOnWebsite = $loungeInformationLeft.find('.apply-on-website');\r\n var $whyWorkHere = $loungeInformationLeft.find('.why-work-here');\r\n var $readMore = $loungeInformationLeft.find('.read-more');\r\n var $addReview = $loungeInformationRight.find('.add-review');\r\n var $discoverMoreJobs = $loungeInformationRight.find('.discover-more-jobs');\r\n var $discoverMoreDegrees = $loungeInformationRight.find('.discover-more-degrees');\r\n var $nav = $(\".nav-underline\");\r\n var $key = $nav.data('key');\r\n var $jobKey = $nav.data('job_key');\r\n var $params = {key:$key, job_key:$jobKey};\r\n $whyWorkHere.unbind().click(function(){\r\n window.open($job.lounge.public_link, '_blank');\r\n });\r\n $readMore.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'jobDetail'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $applyOnWebsite.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'nursingJobs'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $addReview.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'jobRatingReviews'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreJobs.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'nursingJobs'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreDegrees.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degrees'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $(\".nav-underline a\").unbind().click(function(){\r\n var $that = $(this);\r\n var $id = $that.data('id');\r\n $params = $.extend({}, $params, {id:$id});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n },\r\n information_location_map:function($job){\r\n var $location = $job.location && $job.location ? $job.location : null;\r\n if($location && $location.address_latitude && $location.address_longitude && $location.address_is_unmappable == 0){\r\n var $position = new google.maps.LatLng(parseFloat($location.address_latitude), parseFloat($location.address_longitude));\r\n var $iconUrl = './../../../../bimg/NursesLounge/active.png';\r\n var $map = new google.maps.Map(document.getElementById('nurseslounge-job-information-right-map'), {\r\n center:$position,\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n mapTypeControl: false,\r\n streetViewControl: false,\r\n fullscreenControl: false,\r\n zoom: 15\r\n });\r\n $map.setTilt(0);\r\n var $marker = new google.maps.Marker({\r\n position:$position,\r\n map: $map,\r\n animation: google.maps.Animation.DROP,\r\n icon: {url:$iconUrl, scaledSize: (new google.maps.Size(20, 35))},\r\n });\r\n }\r\n },\r\n //Banners\r\n banners_location:function(cback){\r\n cback({\r\n 'banners':$(\"#nurseslounge-job-information .nurseslounge-job-information-right .banners\")\r\n });\r\n }\r\n};\r\n","var public_nurseslounge_degree_information = {\r\n init:function($params){\r\n var $degree = JSON.parse(libs.unlock($params));\r\n public_nurseslounge_degree_information.information_events($degree);\r\n try{\r\n google.maps.event.addListener(window, \"load\", public_nurseslounge_degree_information.information_location_map($degree));\r\n }catch (e) {\r\n\r\n }\r\n public_nurseslounge_degree_information.banners_location(function($config){\r\n nurseslounge_myDashboard_myProfile.banners_engine($config);\r\n });\r\n },\r\n information_events:function($degree){\r\n $(\".nav-underline a:eq(0)\").addClass('active');\r\n var $degreeInformation = $(\"#nurseslounge-degree-information\");\r\n var $degreeInformationRight = $degreeInformation.find('.nurseslounge-degree-information-right');\r\n var $degreeInformationLeft = $degreeInformation.find('.nurseslounge-degree-information-left');\r\n var $activityInfo = $degreeInformationRight.find('a[data-action=\"why-study-here\"]');\r\n var $requestInfo = $degreeInformationRight.find('a[data-action=\"request-info\"]');\r\n var $addReview = $degreeInformationRight.find('.add-review');\r\n var $discoverMoreDegrees = $degreeInformationRight.find('.discover-more-degrees');\r\n var $discoverMoreJobs = $degreeInformationRight.find('.discover-more-jobs');\r\n var $detail = $degreeInformationLeft.find('.detail');\r\n var $readMore = $degreeInformationLeft.find('.read-more');\r\n var $nav = $(\".nav-underline\");\r\n var $key = $nav.data('key');\r\n var $degreeKey = $nav.data('degree_key');\r\n var $params = {key:$key, degree_key:$degreeKey};\r\n $activityInfo.unbind().click(function(){\r\n window.open($degree.lounge.public_link, '_blank');\r\n });\r\n $requestInfo.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degreeRequestInfo'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $addReview.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degreeReviews'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreDegrees.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degreeInformation'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $discoverMoreJobs.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'nursingJobs'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $detail.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degreeRequestInfo'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $readMore.unbind().click(function(){\r\n $params = $.extend({}, $params, {id:'degreeReadMore'});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n $(\".nav-underline a\").unbind().click(function(){\r\n var $that = $(this);\r\n var $id = $that.data('id');\r\n $params = $.extend({}, $params, {id:'degree'+ libs.ucfirst($id)});\r\n public_nurseslounge_lounge_overview.login_popup($params);\r\n });\r\n },\r\n information_location_map:function($degree){\r\n var $location = $degree.lounge.location ? $degree.lounge.location : null;\r\n if($location && $location.address_latitude && $location.address_longitude && $location.address_is_unmappable == 0){\r\n var $position = new google.maps.LatLng(parseFloat($location.address_latitude), parseFloat($location.address_longitude));\r\n var $iconUrl = './../../../../bimg/NursesLounge/active.png';\r\n var $map = new google.maps.Map(document.getElementById('nurseslounge-degree-information-right-map'), {\r\n center:$position,\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n mapTypeControl: false,\r\n streetViewControl: false,\r\n fullscreenControl: false,\r\n zoom: 15\r\n });\r\n $map.setTilt(0);\r\n var $marker = new google.maps.Marker({\r\n position:$position,\r\n map: $map,\r\n animation: google.maps.Animation.DROP,\r\n icon: {url:$iconUrl, scaledSize: (new google.maps.Size(20, 35))},\r\n });\r\n }\r\n },\r\n //Banners\r\n banners_location:function(cback){\r\n cback({\r\n 'banners':$(\"#nurseslounge-degree-information .nurseslounge-degree-information-right .banners\")\r\n });\r\n },\r\n};\r\n","var public_nurseslounge_myDashboard_myCredentialVault = {\r\n init:function($params){\r\n var $qrWrapper = $(\"#nurseslounge-home-my-credential-vault-center-qrWrapper\");\r\n $qrWrapper.find(\".image-buttons\").fadeIn();\r\n $qrWrapper.find(\".save-image-picture\").unbind().hide();\r\n $qrWrapper.find(\".my-camera\").html('').promise().done(function(){\r\n $qrWrapper.find(\".storage-file\").val('').unbind().change(function(){\r\n var $that = this;\r\n $qrWrapper.find(\".my-camera\").html('').promise().done(function(){\r\n libs.renderImage($that, $qrWrapper.find(\".my-camera img:first\")[0]);\r\n $qrWrapper.find(\".take-image-picture\").html('Reset').unbind().click(function(){\r\n public_nurseslounge_myDashboard_myCredentialVault.init($params);\r\n });\r\n $qrWrapper.find(\".save-image-picture\").click(function(){\r\n var $files = $($that)[0].files;\r\n if($files != ''){\r\n $qrWrapper.find(\".my-camera\").hide();\r\n $qrWrapper.find(\".take-image-picture\").hide();\r\n $qrWrapper.find(\".save-image-picture\").hide();\r\n $qrWrapper.find(\".loader-image\").show();\r\n libs.blobToB64($files[0], function($picture){\r\n var $formData = new FormData();\r\n $formData.append('_token', $('meta[name=\"csrf-token\"]').attr('content'));\r\n $formData.append('user_id', libs.memoryGet('user_id'));\r\n $formData.append('hash', $params.hash);\r\n $formData.append('picture', $picture);\r\n $.ajax({\r\n type: 'POST',\r\n url: '/public/myDashboard/myCredentialsVault/'+$params.hash+'/set',\r\n data: $formData,\r\n cache: false,\r\n contentType: false,\r\n processData: false,\r\n success: function ($data) {\r\n libs.expire($data);\r\n }\r\n });\r\n });\r\n }\r\n }).show();\r\n });\r\n }).click();\r\n $qrWrapper.find(\".take-image-picture\").html('Select New Picture').unbind().click(function(){\r\n $qrWrapper.find(\".storage-file\").click();\r\n }).show();\r\n });\r\n }\r\n};\r\n"]}