{"version":3,"sources":["src/assets/scripts/custom-app.js","src/auto-proctor.js","src/proctor-edu.js"],"names":[],"mappings":"AAAA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,+CAA+C,UAAU;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,kCAAkC;AAC5C;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,E;CC7KD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA,yD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0B;AACA,gD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;;AAER,sH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;CC/HA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH,GAAG;AACH;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,GAAG;AACH,GAAG;AACH,C","file":"scripts.js","sourcesContent":["function onComponentLoad() {\r\n FormWizard.init();\r\n}\r\n\r\nfunction DatePickerfunc() {\r\n\r\n $('.date').datepicker({\r\n useCurrent: true,\r\n //format: 'mm/dd/yyyy',\r\n format: 'dd/mm/yyyy',\r\n showButtonPanel: true,\r\n changeMonth: true,\r\n changeYear: true,\r\n defaultDate: new Date(),\r\n autoclose: true\r\n });\r\n\r\n //$('.colorpicker').colorpicker();\r\n\r\n // Colorpicker\r\n if ($.isFunction($.fn.colorpicker)) {\r\n $(\".colorpicker\").each(function (i, el) {\r\n var $this = $(el);\r\n var opts = {\r\n //format: attrDefault($this, 'format', false)\r\n };\r\n var $nextEle = $this.next();\r\n var $prevEle = $this.prev();\r\n var $colorPreview = $this.siblings('.input-group-addon').find('.icon-color-preview');\r\n\r\n $this.colorpicker(opts);\r\n\r\n if ($nextEle.is('.input-group-addon') && $nextEle.has('span')) {\r\n $nextEle.on('click', function (ev) {\r\n ev.preventDefault();\r\n $this.colorpicker('show');\r\n });\r\n }\r\n\r\n if ($prevEle.is('.input-group-addon') && $prevEle.has('span')) {\r\n $prevEle.on('click', function (ev) {\r\n ev.preventDefault();\r\n $this.colorpicker('show');\r\n });\r\n }\r\n\r\n if ($colorPreview.length) {\r\n $this.on('changeColor', function (ev) {\r\n\r\n $colorPreview.css('background-color', ev.color.toHex());\r\n });\r\n\r\n if ($this.val()) {\r\n $colorPreview.css('background-color', $this.val());\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction DatePickerfuncAllDates() {\r\n var setStartDate = new Date();\r\n setStartDate.setMonth(setStartDate.getMonth() - 3);\r\n $('.date').datepicker({\r\n //format: 'mm/dd/yyyy',\r\n format: 'dd/mm/yyyy',\r\n showButtonPanel: true,\r\n changeMonth: true,\r\n changeYear: true,\r\n defaultDate: new Date(),\r\n autoclose: true,\r\n startDate: \"01/01/1900\"\r\n });\r\n}\r\n\r\nfunction DatePickerfuncAllDatesddmm() {\r\n var setStartDate = new Date();\r\n setStartDate.setMonth(setStartDate.getMonth() - 3);\r\n $('.date').datepicker({\r\n //format: 'dd/mm/yyyy',\r\n format: 'dd/mm/yyyy',\r\n showButtonPanel: true,\r\n changeMonth: true,\r\n changeYear: true,\r\n defaultDate: new Date(),\r\n autoclose: true,\r\n startDate: \"01/01/1900\"\r\n });\r\n}\r\nfunction DatePickerfuncAllDatesmmdd() {\r\n var setStartDate = new Date();\r\n setStartDate.setMonth(setStartDate.getMonth() - 3);\r\n $('.date').datepicker({\r\n //format: 'dd/mm/yyyy',\r\n format: 'mm/dd/yyyy',\r\n showButtonPanel: true,\r\n changeMonth: true,\r\n changeYear: true,\r\n defaultDate: new Date(),\r\n autoclose: true,\r\n startDate: \"01/01/1900\"\r\n });\r\n}\r\n//Loader Code Starts\r\nvar loaderPresent = true;\r\nfunction manageLoader(action) {\r\n\r\n if (action == null || action == \"\") {\r\n hideLoader();\r\n } else if ($('.loader').is(':visible') && loaderPresent == true) {\r\n //IF Loader already visible then do not repaint it\r\n } else {\r\n showLoader();\r\n }\r\n /* setTimeout(\"$('.loadingWrapper').hide();\", timer);*/\r\n}\r\n\r\nfunction showLoader() {\r\n var body = document.body,\r\n html = document.documentElement;\r\n\r\n var height = Math.max(body.scrollHeight, body.offsetHeight,\r\n html.clientHeight, html.scrollHeight, html.offsetHeight);\r\n //$('.loadingWrapper-custom .loaderCntr-custom').height(height);\r\n $('.loader').show();\r\n loaderPresent = true;\r\n}\r\n\r\nfunction hideLoader() {\r\n $('.loader').hide();\r\n loaderPresent = false;\r\n}\r\n//Loader Code Ends\r\n\r\n//Notification Code Starts\r\nfunction showNotification(status) {\r\n $('#notificationBar').show();\r\n $('#notificationBar').animate({ right: '50px' });\r\n if (status == 'success') {\r\n $('#notificationBar').removeClass('error');\r\n $('#notificationBar').removeClass('warning');\r\n $('#notificationBar').addClass('success');\r\n }\r\n else if (status == 'warning') {\r\n $('#notificationBar').removeClass('error');\r\n $('#notificationBar').removeClass('success');\r\n $('#notificationBar').addClass('warning');\r\n }\r\n else {\r\n $('#notificationBar').removeClass('success');\r\n $('#notificationBar').removeClass('warning');\r\n $('#notificationBar').addClass('error');\r\n }\r\n setTimeout(\"setNotificationWidth()\", 3000);\r\n setTimeout('closeNotication()', 3000);\r\n}\r\nfunction setNotificationWidth() {\r\n if ($('#notificationBar').children()[1].innerHTML.length > 100) {\r\n $('#notificationBar').width(700);\r\n }\r\n else { $('#notificationBar').width(430); }\r\n}\r\nfunction closeNotication() {\r\n $('#notificationBar').animate({ right: '-600px' });\r\n //$('#notificationBar').hide();\r\n setTimeout(\"$('#notificationBar').hide()\", 300);\r\n}\r\n//Notification Code Starts\r\n$(document).on('keydown', function (event) {\r\n if (event.key == \"Escape\") {\r\n //alert('Esc key pressed.');\r\n manageLoader()\r\n }\r\n});","// var clientID = \"osQFCwgd\";\r\n// var clientSecret = \"PgaiDPDJQZ8CXpr\";\r\n// var testAttemptId = CryptoJS.lib.WordArray.random(5).toString();\r\n// var hashedTestAttemptId = CryptoJS.SHA256(testAttemptId + clientSecret).toString();\r\n\r\n// const credentials = {\r\n// clientId: clientID,\r\n// testAttemptId: testAttemptId,\r\n// hashedTestAttemptId: hashedTestAttemptId\r\n// };\r\n// const autoProctorTest = new AutoProctor(credentials);\r\n/*\r\n * testAttemptId identifies each test attempt. This is a unique ID that your own platform generates\r\n */\r\n\r\n// var testAttemptId = CryptoJS.lib.WordArray.random(5).toString();\r\n\r\n/*\r\n * The SHA-256 HMAC of the testAttemptId with your SECRET_KEY\r\n * For more info: https://www.autoproctor.co/developers/docs#authentication\r\n */\r\n// var hashedTestAttemptId = CryptoJS.SHA256(testAttemptId + clientSecret).toString();\r\n\r\n//Configurations which you have to pass in SDK\r\n// alert('calling js ')\r\nvar autoProctorTest =null;\r\n\r\nasync function getReport (clientID,clientSecret,testAttemptId, hashedTestAttemptId) {\r\n const credentials = {\r\n clientId: clientID,\r\n testAttemptId: testAttemptId,\r\n hashedTestAttemptId: hashedTestAttemptId\r\n };\r\n var apSettings = {\r\n trackingOptions: {\r\n audio: true,\r\n numHumans: true,\r\n tabSwitch: true,\r\n captureSwitchedTab: true,\r\n photosAtRandom: true,\r\n detectMultipleScreens: true,\r\n forceFullScreen: false,\r\n testTakerPhoto: true,\r\n numPhotosAtRandom: 10,\r\n },\r\n showHowToVideo: false,\r\n };\r\n autoProctorTest = new AutoProctor(credentials);\r\n await autoProctorTest.setup(apSettings);\r\n const reportOptions = getReportOptions();\r\n autoProctorTest.showReport(reportOptions);\r\n}\r\n\r\nconst getReportOptions = () => {\r\n return {\r\n groupReportsIntoTabs: true,\r\n userDetails: {\r\n name: \"a@b.com\",\r\n email: \"Test@123\"\r\n }\r\n };\r\n};\r\n\r\nasync function inittest(clientID,clientSecret,testAttemptId, hashedTestAttemptId, duration) {\r\n //tID=testAttemptId;\r\n // hTID=hashedTestAttemptId;\r\n\r\n const credentials = {\r\n clientId: clientID,\r\n testAttemptId: testAttemptId,\r\n hashedTestAttemptId: hashedTestAttemptId\r\n };\r\n autoProctorTest = new AutoProctor(credentials);\r\n\r\n var apSettings = {\r\n trackingOptions: {\r\n audio: true,\r\n numHumans: true,\r\n tabSwitch: true,\r\n captureSwitchedTab: true,\r\n photosAtRandom: true,\r\n detectMultipleScreens: true,\r\n forceFullScreen: false,\r\n testTakerPhoto: true,\r\n numPhotosAtRandom: 10,\r\n showCamPreview: true,\r\n testDuration:duration\r\n },\r\n showHowToVideo: false,\r\n };\r\n\r\n // autoProctorTest = await initAutoProctor(apSettings); \r\n await autoProctorTest.setup(apSettings);\r\n autoProctorTest.start();\r\n};\r\n// function startproctor() {\r\n// autoProctorTest.start();\r\n// }\r\nfunction Terminateproctor() {\r\n autoProctorTest.stop();\r\n}\r\nfunction stopproctor() {\r\n autoProctorTest.stop();\r\n // const label = await fetch('https://www.autoproctor.co/tenant/tests/capture-test-submit');\r\n\r\n let testReportUrl = \"https://www.autoproctor.co/tenant/\" + clientID + \"/test-attempts/id/\" + tID + \"/?hashedTestAttemptId=\" + hTID;\r\n return testReportUrl;\r\n // alert(testReportUrl); \r\n // const response= await fetch(testReportUrl); \r\n // const response = autoProctorTest.getEvidenceReport(\r\n // clientID,\r\n // testAttemptId,\r\n // hashedTestAttemptId\r\n // );\r\n // const searchParams = new URLSearchParams({\r\n // \"hashedTestAttemptId\": hashedTestAttemptId\r\n // });\r\n\r\n // let url = \"https://www.autoproctor.co/tests/reports/test-attempt-label/\" + testAttemptId + \"?hide_navbar=true\"; \r\n // url.search = searchParams;\r\n\r\n // await fetch(url);\r\n // const response = autoProctorTest.getEvidenceReport(\r\n // apSettings.clientId,\r\n // apSettings.testAttemptId,\r\n // apSettings.hashedTestAttemptId\r\n // );\r\n}\r\n\r\n\r\n","var supervisor = null;\r\nasync function initProctor(jwtToken) {\r\n supervisor = new Supervisor({\r\n url: 'https://anthern.proctoring.app'\r\n });\r\n supervisor.init({\r\n provider: 'jwt',\r\n token: jwtToken\r\n }).then(function () {\r\n return supervisor.start();\r\n }).then(function () {\r\n }).catch(function (err) {\r\n alert(err.toString());\r\n location.href = '/';\r\n });\r\n}\r\n\r\nasync function startProctor() {\r\n supervisor.on('start', function () {\r\n });\r\n}\r\n\r\nasync function stopProctor() {\r\n supervisor.stop().then(function () {\r\n return supervisor.logout();\r\n }).then(function () {\r\n });\r\n}"],"sourceRoot":"webpack:///"}