{"version":3,"file":"js/contests/show-34c1270608dde55fa1f3.js","mappings":"gGAaA,SAASA,IAIPC,EAAE,qBAAqBC,GAAG,UAAU,SAAUC,GAC5CA,EAAEC,iBAESC,QACT,kFAGAC,KAAKC,QAET,GACF,CAvB4B,aAAxBC,SAASC,YAEXT,IAEFQ,SAASE,iBAAiB,cAAc,WAEtCV,GACF,G","sources":["webpack://app/./app/javascript/packs/contests/show.js"],"sourcesContent":["/**\n * Should be refactored without jQuery. Can be included in the Contests/Leaderboard component, if we include this functionality in that component.\n */\n\nif (document.readyState === 'complete') {\n // The page is already loaded before this script runs, which means turbo:load won't trigger on this page load. Trigger it manually.\n loaded();\n}\ndocument.addEventListener('turbo:load', function () {\n // This event will be fired every time a page is loaded (after the file is included in the document).\n loaded();\n});\n\nfunction loaded() {\n /**\n * Delete challenge\n */\n $('#delete-challenge').on('submit', function (e) {\n e.preventDefault();\n\n const ok = confirm(\n 'Are you sure you want to delete this challenge? This action cannot be undone.'\n );\n if (ok) {\n this.submit();\n }\n });\n}\n"],"names":["loaded","$","on","e","preventDefault","confirm","this","submit","document","readyState","addEventListener"],"sourceRoot":""}