{"version":3,"file":"application-DLqiBgXB.js","sources":["../../../app/javascript/channels/license_channel.js","../../../app/javascript/entrypoints/application.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", () => {\n let session_id = document.getElementById(\"session-id\");\n\n // May not exist - because this JS loads on every page, ugh.\n //\n // TODO: Figure out how to only load this on the page that needs it,\n // probably with a <%= vite_javascript_tag %> on the page instead of\n // including this JS in application.js -> channels -> this\n if (!session_id) {\n return;\n }\n\n // The ActionCable stuff below is cool and all, but for whatever reason it\n // does not work during rspec/Capybara tests. So we're just going to force\n // a refresh here, and that'll be a fine fallback for production too.\n // The URL that this page is on will just re-check for success, and render the\n // same page again (and refresh again) if it's not ready.\n setTimeout(() => {\n window.location.reload();\n }, 2000);\n});\n","import \"../channels\";\n\n// Add this to handle confirmations\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n document.addEventListener(\"submit\", (event) => {\n const confirmationMessage = event.target\n .querySelector(\"[data-confirm]\")\n ?.getAttribute(\"data-confirm\");\n if (confirmationMessage && !window.confirm(confirmationMessage)) {\n event.preventDefault();\n }\n });\n});\n\n// To see this message, add the following to the `` section in your\n// views/layouts/application.html.erb\n//\n// <%= vite_client_tag %>\n// <%= vite_javascript_tag 'application' %>\n// console.log(\"Vite ⚡️ Rails\");\n\n// If using a TypeScript entrypoint file:\n// <%= vite_typescript_tag 'application' %>\n//\n// If you want to use .jsx or .tsx, add the extension:\n// <%= vite_javascript_tag 'application.jsx' %>\n\n// console.log(\n// \"Visit the guide for more information: \",\n// \"https://vite-ruby.netlify.app/guide/rails\",\n// );\n\n// Example: Load Rails libraries in Vite.\n//\n// import * as Turbo from '@hotwired/turbo'\n// Turbo.start()\n//\n// import ActiveStorage from '@rails/activestorage'\n// ActiveStorage.start()\n//\n// // Import all channels.\n// const channels = import.meta.globEager('./**/*_channel.js')\n\n// Example: Import a stylesheet in app/frontend/index.css\n// import '~/index.css'\n"],"names":["event","_a","confirmationMessage"],"mappings":"AAAA,SAAS,iBAAiB,mBAAoB,IAAM,CACjC,SAAS,eAAe,YAAY,GAgBrD,WAAW,IAAM,CACf,OAAO,SAAS,QACjB,EAAE,GAAI,CACT,CAAC,ECjBD,SAAS,iBAAiB,mBAAoB,IAAM,CAClD,SAAS,iBAAiB,SAAWA,GAAU,CDJjD,IAAAC,ECKI,MAAMC,GAAsBD,EAAAD,EAAM,OAC/B,cAAc,gBAAgB,IADL,YAAAC,EAExB,aAAa,gBACbC,GAAuB,CAAC,OAAO,QAAQA,CAAmB,GAC5DF,EAAM,eAAc,CAE1B,CAAG,CACH,CAAC"}