{"version":3,"file":"application-yzwUO3MD.js","sources":["../../../node_modules/theme-change/index.js","../../../app/javascript/entrypoints/application.js"],"sourcesContent":["function themeToggle(){var toggleEl=document.querySelector(\"[data-toggle-theme]\");var dataKey=toggleEl?toggleEl.getAttribute(\"data-key\"):null;(function(theme=localStorage.getItem(dataKey?dataKey:\"theme\")){if(localStorage.getItem(dataKey?dataKey:\"theme\")){document.documentElement.setAttribute(\"data-theme\",theme);if(toggleEl){[...document.querySelectorAll(\"[data-toggle-theme]\")].forEach(el=>{el.classList.add(toggleEl.getAttribute(\"data-act-class\"))})}}})();if(toggleEl){[...document.querySelectorAll(\"[data-toggle-theme]\")].forEach(el=>{el.addEventListener(\"click\",function(){var themesList=el.getAttribute(\"data-toggle-theme\");if(themesList){var themesArray=themesList.split(\",\");if(document.documentElement.getAttribute(\"data-theme\")==themesArray[0]){if(themesArray.length==1){document.documentElement.removeAttribute(\"data-theme\");localStorage.removeItem(dataKey?dataKey:\"theme\")}else{document.documentElement.setAttribute(\"data-theme\",themesArray[1]);localStorage.setItem(dataKey?dataKey:\"theme\",themesArray[1])}}else{document.documentElement.setAttribute(\"data-theme\",themesArray[0]);localStorage.setItem(dataKey?dataKey:\"theme\",themesArray[0])}}[...document.querySelectorAll(\"[data-toggle-theme]\")].forEach(el=>{el.classList.toggle(this.getAttribute(\"data-act-class\"))})})})}}function themeBtn(){var btnEl=document.querySelector(\"[data-set-theme='']\");var dataKey=btnEl?btnEl.getAttribute(\"data-key\"):null;(function(theme=localStorage.getItem(dataKey?dataKey:\"theme\")){if(theme!=undefined&&theme!=\"\"){if(localStorage.getItem(dataKey?dataKey:\"theme\")&&localStorage.getItem(dataKey?dataKey:\"theme\")!=\"\"){document.documentElement.setAttribute(\"data-theme\",theme);var btnEl=document.querySelector(\"[data-set-theme='\"+theme.toString()+\"']\");if(btnEl){[...document.querySelectorAll(\"[data-set-theme]\")].forEach(el=>{el.classList.remove(el.getAttribute(\"data-act-class\"))});if(btnEl.getAttribute(\"data-act-class\")){btnEl.classList.add(btnEl.getAttribute(\"data-act-class\"))}}}else{var btnEl=document.querySelector(\"[data-set-theme='']\");if(btnEl.getAttribute(\"data-act-class\")){btnEl.classList.add(btnEl.getAttribute(\"data-act-class\"))}}}})();[...document.querySelectorAll(\"[data-set-theme]\")].forEach(el=>{el.addEventListener(\"click\",function(){document.documentElement.setAttribute(\"data-theme\",this.getAttribute(\"data-set-theme\"));localStorage.setItem(dataKey?dataKey:\"theme\",document.documentElement.getAttribute(\"data-theme\"));[...document.querySelectorAll(\"[data-set-theme]\")].forEach(el=>{el.classList.remove(el.getAttribute(\"data-act-class\"))});if(el.getAttribute(\"data-act-class\")){el.classList.add(el.getAttribute(\"data-act-class\"))}})})}function themeSelect(){var selectEl=document.querySelector(\"select[data-choose-theme]\");var dataKey=selectEl?selectEl.getAttribute(\"data-key\"):null;(function(theme=localStorage.getItem(dataKey?dataKey:\"theme\")){if(localStorage.getItem(dataKey?dataKey:\"theme\")){document.documentElement.setAttribute(\"data-theme\",theme);var optionToggler=document.querySelector(\"select[data-choose-theme] [value='\"+theme.toString()+\"']\");if(optionToggler){[...document.querySelectorAll(\"select[data-choose-theme] [value='\"+theme.toString()+\"']\")].forEach(el=>{el.selected=true})}}})();if(selectEl){[...document.querySelectorAll(\"select[data-choose-theme]\")].forEach(el=>{el.addEventListener(\"change\",function(){document.documentElement.setAttribute(\"data-theme\",this.value);localStorage.setItem(dataKey?dataKey:\"theme\",document.documentElement.getAttribute(\"data-theme\"));[...document.querySelectorAll(\"select[data-choose-theme] [value='\"+localStorage.getItem(dataKey?dataKey:\"theme\")+\"']\")].forEach(el=>{el.selected=true})})})}}function themeChange(attach=true){if(attach===true){document.addEventListener(\"DOMContentLoaded\",function(event){themeToggle();themeSelect();themeBtn()})}else{themeToggle();themeSelect();themeBtn()}}if(typeof exports!=\"undefined\"){module.exports={themeChange:themeChange}}else{themeChange()}","// 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('Visit the guide for more information: ', 'https://vite-ruby.netlify.app/guide/rails')\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\nimport { themeChange } from 'theme-change'\nthemeChange()\n"],"names":["themeToggle","toggleEl","dataKey","theme","el","themesList","themesArray","themeBtn","btnEl","themeSelect","selectEl","optionToggler","themeChange","attach","event","module"],"mappings":"kCAAA,SAASA,GAAa,CAAC,IAAIC,EAAS,SAAS,cAAc,qBAAqB,EAAMC,EAAQD,EAASA,EAAS,aAAa,UAAU,EAAE,MAAM,SAASE,EAAM,aAAa,QAAQD,GAAgB,OAAO,EAAE,CAAI,aAAa,QAAQA,GAAgB,OAAO,IAAG,SAAS,gBAAgB,aAAa,aAAaC,CAAK,EAAKF,GAAU,CAAC,GAAG,SAAS,iBAAiB,qBAAqB,CAAC,EAAE,QAAQG,GAAI,CAACA,EAAG,UAAU,IAAIH,EAAS,aAAa,gBAAgB,CAAC,CAAC,CAAC,EAAG,GAAC,EAAOA,GAAU,CAAC,GAAG,SAAS,iBAAiB,qBAAqB,CAAC,EAAE,QAAQG,GAAI,CAACA,EAAG,iBAAiB,QAAQ,UAAU,CAAC,IAAIC,EAAWD,EAAG,aAAa,mBAAmB,EAAE,GAAGC,EAAW,CAAC,IAAIC,EAAYD,EAAW,MAAM,GAAG,EAAK,SAAS,gBAAgB,aAAa,YAAY,GAAGC,EAAY,CAAC,EAAMA,EAAY,QAAQ,GAAG,SAAS,gBAAgB,gBA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