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C,gBAAgBjC,MAAQ,KAC7BC,KAAKiC,kBAAkB9B,UAAU+B,OAAO,aAG5C,GCpBFtD,EAAYuD,SAAS,SAAUC,GAG/BxD,EAAYuD,SAAS,aAAcE,GCLnCC,EAAAA,EAAAA,OAAAA,gBAAAA,QAAAA,QAA8C,IAC9CA,EAAAA,EAAAA,OAAAA,gBAAAA,QAAAA,eAAoD,EACpDA,EAAAA,EAAAA,OAAAA,eAAAA,KAAkC,CAAEC,QAAS,KAE7C,IAAIC,EAA0BC,EAAAA,KACVA,EAAQ,MACdC,WAAWF,E","sources":["webpack://app/./app/javascript/controllers/application.js","webpack://app/./app/javascript/controllers/editor_controller.js","webpack://app/./app/javascript/controllers/work_email_controller.js","webpack://app/./app/javascript/controllers/index.js","webpack://app/./app/javascript/packs/application.js"],"sourcesContent":["import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus = application\n\nexport { application }\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"editor\"\nexport default class extends Controller {\n static targets = [\"trix\", \"templateBody\", \"form\", \"notification\"];\n initialize() {\n // this.trixTarget.addEventListener(\"paste\", this.pasteToken);\n }\n async copyToken(event) {\n try {\n const tokenNumber = event.target.dataset.tokenNumber;\n const tokenField = document.querySelector(`#token-${tokenNumber}`);\n await navigator.clipboard.writeText(\n // tokenField.value\n `${tokenField.value}`\n ); // will only work on localhost or https://\n this.notificationTarget.textContent =\"Token copied!\";\n this.notificationTarget.classList.add(\"text-emerald-600\");\n this.notificationTarget.classList.add(\"font-semibold\");\n setTimeout(this.reset(this.notificationTarget), 4000);\n } catch (err) {}\n }\n pasteToken(event) {\n const text = (event.clipboardData || window.clipboardData)?.getData(\"text\");\n const selectedRange = this.trixTarget.editor.getSelectedRange();\n this.trixTarget.editor.setSelectedRange(selectedRange);\n this.trixTarget.editor.insertHTML(text);\n event.preventDefault();\n }\n\n reset(reponseText) {\n return function () {\n reponseText.textContent = \"\";\n };\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"work-email\"\nexport default class extends Controller {\n static targets = [\"provider\", \"identifier\", 'workEmail', 'personalEmail', 'providerDiv'];\n initialize() {\n let self = this;\n this.setEmailProviderField();\n }\n\n setEmailProviderField() { \n let p = this.providerTarget;\n let identifier = p.options[p.selectedIndex].dataset.info;\n this.identifierTarget.value = identifier;\n }\n\n setWorkEmailToPersonalEmail(){\n let personalEmail = this.personalEmailTarget;\n if (personalEmail.checked){\n this.workEmailTarget.value = personalEmail.value;\n this.providerDivTarget.classList.add('invisible');\n this.providerTarget.value = null;\n } else {\n this.workEmailTarget.value = null;\n this.providerDivTarget.classList.remove('invisible');\n }\n\n }\n}\n","// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from \"./application\"\n\nimport EditorController from \"./editor_controller\"\napplication.register(\"editor\", EditorController)\n\nimport WorkEmailController from \"./work_email_controller.js\"\napplication.register(\"work-email\", WorkEmailController)","import \"trix\"\nimport \"@rails/actiontext\"\nimport \"controllers\"\nimport Trix from \"trix\";\n\nTrix.config.blockAttributes.default.tagName = \"p\";\nTrix.config.blockAttributes.default.breakOnReturn = true;\nTrix.config.textAttributes.bold = { tagName: \"b\" };\n// Support component names relative to this directory:\nvar componentRequireContext = require.context(\"components\", true);\nvar ReactRailsUJS = require(\"react_ujs\");\nReactRailsUJS.useContext(componentRequireContext);\n"],"names":["application","Application","debug","window","Stimulus","Controller","static","initialize","async","event","tokenNumber","target","dataset","tokenField","document","querySelector","navigator","clipboard","writeText","value","this","notificationTarget","textContent","classList","add","setTimeout","reset","err","pasteToken","text","clipboardData","getData","selectedRange","trixTarget","editor","getSelectedRange","setSelectedRange","insertHTML","preventDefault","reponseText","setEmailProviderField","p","providerTarget","identifier","options","selectedIndex","info","identifierTarget","setWorkEmailToPersonalEmail","personalEmail","personalEmailTarget","checked","workEmailTarget","providerDivTarget","remove","register","EditorController","WorkEmailController","Trix","tagName","componentRequireContext","require","useContext"],"sourceRoot":""}