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G/CN,KAAK,KAGV,EACD1M,EAxDQ+E,QAAU,CACf,QACA,WACD/E,EAEMwG,UAAY,CACjB,CAAEC,KAAM,QAASC,KAAM,K,uDCV3B,wBAA6BvB,EAAAA,GAC3BjF,OAAAA,GACEC,KAAKE,QAAQ+S,gBACf,E","sources":["webpack:///./app/javascript/controllers/taxt_editor_controller.js","webpack:///./app/javascript/controllers/copy_field_controller.js","webpack:///./app/javascript/controllers/hover_preview_controller.js","webpack:///./app/javascript/controllers/revisions_table_controller.js","webpack:///./app/javascript/hotwire_app.js","webpack:///./app/javascript/controllers/clipboard_controller.js","webpack:///./app/javascript/controllers/picker_controller.js","webpack:///./app/javascript/controllers/stimulus_test_controller.js","webpack:///./app/javascript/controllers/highlight_controller.js","webpack:///./app/javascript/controllers/reorder_controller.js","webpack:///./app/javascript/controllers/application_controller.js","webpack:///./app/javascript/controllers/tablesort_controller.js","webpack:///./app/javascript/controllers/ sync \\.js$","webpack:///./app/javascript/controllers/notify_controller.js","webpack:///./app/javascript/controllers/external_preview_controller.js","webpack:///./app/javascript/controllers/checkbox_select_all_controller.js","webpack:///./app/javascript/controllers/history_item_form_controller.js","webpack:///./app/javascript/controllers/disco_controller.js","webpack:///./app/javascript/controllers/dev_controller.js","webpack:///./app/javascript/controllers/toggler_controller.js","webpack:///./app/javascript/controllers/check_name_conflicts_controller.js","webpack:///./app/javascript/controllers/scroll_controller.js"],"sourcesContent":["import ApplicationController from \"./application_controller\"\n\n// TODO: Cleanup/DRY.\n\nexport default class extends ApplicationController {\n static targets = [\n \"editor\",\n \"presenter\",\n \"textarea\",\n \"content\", // TODO: Naming?\n \"editSummaryInput\",\n ]\n\n static values = {\n url: String,\n }\n\n connect() {\n this.container = this.element\n\n document.body.setAttribute('data-test-taxt-editors-loaded', \"true\") // HACK.\n }\n\n saveHistoryItem() {\n const jsonData = {\n history_item: {\n taxt: this.container.querySelector('textarea#taxt')?.value,\n subtype: this.container.querySelector('select[name=subtype]')?.value,\n picked_value: this.container.querySelector('select[name=picked_value]')?.value,\n text_value: this.container.querySelector('input[name=text_value]')?.value,\n object_protonym_id: this.container.querySelector('[name=object_protonym_id]')?.value,\n object_taxon_id: this.container.querySelector('[name=object_taxon_id]')?.value,\n reference_id: this.container.querySelector('[name=reference_id]')?.value,\n pages: this.container.querySelector('input[name=pages]')?.value,\n },\n edit_summary: this.editSummary,\n }\n\n fetch(this.urlValue, {\n method: \"PUT\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken(),\n },\n body: JSON.stringify(jsonData),\n }).\n then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP status ${response.status}`)\n }\n return response.json()\n }).\n then((json) => {\n AntCat.notifySuccess(\"Updated history item\")\n this.container.outerHTML = json.content\n window.setupLinkables()\n }).\n catch((error) => { alert(error) })\n }\n\n saveReferenceSection() {\n const jsonData = {\n reference_section: {\n title_taxt: this.container.querySelector('textarea#title_taxt').value,\n subtitle_taxt: this.container.querySelector('textarea#subtitle_taxt').value,\n references_taxt: this.container.querySelector('textarea#references_taxt').value,\n },\n edit_summary: this.editSummary,\n }\n\n fetch(this.urlValue, {\n method: \"PUT\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken(),\n },\n body: JSON.stringify(jsonData),\n }).\n then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP status ${response.status}`)\n }\n return response.json()\n }).\n then((json) => {\n AntCat.notifySuccess(\"Updated reference section\")\n this.container.outerHTML = json.content\n window.setupLinkables()\n }).\n catch((error) => { alert(error) })\n }\n\n // TODO: This leaves empty HTML elements in some places.\n delete(event) {\n event.preventDefault()\n\n if (!confirm(\"Are you sure?\")) { // eslint-disable-line no-restricted-globals\n return\n }\n\n const jsonData = {\n edit_summary: this.editSummary,\n }\n\n fetch(this.urlValue, {\n method: \"DELETE\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken(),\n },\n body: JSON.stringify(jsonData),\n }).\n then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP status ${response.status}`)\n }\n return response\n }).\n then((_response) => {\n AntCat.notifySuccess(\"Deleted item\")\n this.container.remove()\n }).\n catch((error) => { alert(error) })\n }\n\n cancel() {\n this.exitEditMode()\n }\n\n // TODO: This does not take into account `format_type_fields` after pressing \"OK\".`\n ok(event) {\n event.preventDefault()\n\n const jsonData = {\n text: this.textareaTarget.value,\n }\n\n fetch(\"/markdown/preview\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": this.csrfToken(),\n },\n body: JSON.stringify(jsonData),\n }).\n then((response) => {\n if (!response.ok) {\n throw new Error(`HTTP status ${response.status}`)\n }\n return response.text()\n }).\n then((renderedMarkdown) => {\n this.contentTarget.innerHTML = renderedMarkdown\n this.exitEditMode()\n }).\n catch((error) => { alert(error) })\n }\n\n enterEditMode(event) {\n event.preventDefault()\n\n this.editorTarget.classList.remove(\"hidden\")\n this.presenterTarget.classList.add(\"hidden\")\n\n const textareas = this.container.querySelectorAll(\"textarea\")\n textareas.forEach((textarea) => {\n // Render preview.\n // TODO: Remove jQuery.\n $(textarea).renderUnrenderedPreviewableHack() // eslint-disable-line no-undef\n\n // Resize textareas according to content.\n textarea.style.height = `${textarea.scrollHeight}px`\n })\n }\n\n exitEditMode() {\n this.editorTarget.classList.add(\"hidden\")\n this.presenterTarget.classList.remove(\"hidden\")\n }\n\n get editSummary() {\n return this.editSummaryInputTarget.value\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static targets = [\n \"copyFrom\",\n \"copyTo\",\n ]\n\n copy(event) {\n event.preventDefault()\n\n this.copyToTarget.value = this.copyFromTarget.value\n\n // To trigger the name conflict check.\n this.copyToTarget.dispatchEvent(new Event('input'))\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { useDebounce, useHover } from 'stimulus-use'\n\nexport default class extends Controller {\n static values = { url: String }\n\n static debounces = [\n { name: 'show', wait: 250 },\n { name: 'hide', wait: 100 },\n ]\n\n connect() {\n this.isVisible = false\n useDebounce(this)\n useHover(this, { element: this.element })\n\n this.container = document.createElement('span')\n this.container.classList.add('stimulus-hover-preview')\n this.container.classList.add('hidden')\n this.element.appendChild(this.container)\n this.previewContent = null\n }\n\n disconnect() {\n if (this.container) {\n this.container.remove()\n }\n }\n\n mouseEnter() {\n this.isVisible = true\n this.show()\n }\n\n mouseLeave() {\n this.isVisible = false\n this.hide()\n }\n\n show() {\n if (this.previewContent) {\n if (this.isVisible) {\n this.container.classList.remove(\"hidden\")\n }\n } else {\n fetch(this.urlValue).\n then((response) => response.text()).\n then((html) => {\n this.previewContent = document.createElement('span')\n this.previewContent.innerHTML = JSON.parse(html).preview\n\n // NOTE: Hacky way to prevent previews from having previewable links themselves;\n // this will not work if the same element has more than one controller.\n this.previewContent.\n querySelectorAll(\"[data-controller^='hover-preview']\").\n forEach((element) => element.removeAttribute(\"data-controller\"))\n\n this.container.appendChild(this.previewContent)\n\n if (this.isVisible) {\n this.container.classList.remove(\"hidden\")\n }\n })\n }\n }\n\n hide() {\n this.container.classList.add(\"hidden\")\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// This is for hiding unavailable radio options in the revision history table.\n// See https://en.wikipedia.org/w/index.php?title=Example&action=history for how it is supposed to work.\n\nexport default class extends Controller {\n static targets = [\"leftRadio\", \"rightRadio\"]\n\n connect() {\n if (!this.leftRadioTargets.some((radio) => radio.checked)) {\n const checkLeftRadioIndex = this.rightRadioIndex + 1\n this.leftRadioTargets.find((radio) => parseInt(radio.dataset.radioIndex) === checkLeftRadioIndex).checked = true\n }\n\n this.updateAvailable()\n }\n\n updateAvailable() {\n const rightIndex = this.rightRadioIndex\n const leftIndex = this.leftRadioIndex\n\n this._showAllRadios()\n\n this.leftRadioTargets.\n filter((radio) => radio.dataset.radioIndex <= rightIndex).\n forEach((radio) => { radio.classList.add(\"hidden\") })\n\n this.rightRadioTargets.\n filter((radio) => radio.dataset.radioIndex >= leftIndex).\n forEach((radio) => { radio.classList.add(\"hidden\") })\n }\n\n _showAllRadios() {\n this.leftRadioTargets.forEach((radio) => { radio.classList.remove(\"hidden\") })\n this.rightRadioTargets.forEach((radio) => { radio.classList.remove(\"hidden\") })\n }\n\n get leftRadioIndex() {\n return parseInt(this.leftRadioTargets.find((radio) => radio.checked).dataset.radioIndex)\n }\n\n get rightRadioIndex() {\n return parseInt(this.rightRadioTargets.find((radio) => radio.checked).dataset.radioIndex)\n }\n}\n","import { Application } from \"@hotwired/stimulus\"\nimport { Turbo } from \"@hotwired/turbo-rails\"\nimport { definitionsFromContext } from \"@hotwired/stimulus-webpack-helpers\"\n\nimport AWN from \"awesome-notifications\"\n\nwindow.AntCat = window.AntCat || {}\nwindow.AntCat.notifier = new AWN({\n position: \"top-right\",\n labels: { success: \"\", alert: \"\" },\n})\n\nwindow.AntCat.notifySuccess = (message) => { window.AntCat.notifier.success(message, {}) }\nwindow.AntCat.notifyError = (message) => { window.AntCat.notifier.alert(message, {}) }\n\nwindow.Turbo = Turbo\n\nconst application = Application.start()\n\napplication.debug = false\nwindow.Stimulus = application\n\nconst context = require.context(\"./controllers\", true, /\\.js$/)\nStimulus.load(definitionsFromContext(context)) // eslint-disable-line no-undef\n\nTurbo.setProgressBarDelay(50)\n\nTurbo.session.drive = false\nconst DEV_LOG_TURBO_EVENTS = false\n// const DEV_LOG_TURBO_EVENTS = true // Uncomment for debugging.\n\nif (DEV_LOG_TURBO_EVENTS) {\n [\n 'turbo:click',\n 'turbo:before-visit',\n 'turbo:visit',\n 'turbo:before-fetch-request',\n 'turbo:before-fetch-response',\n 'turbo:submit-start',\n 'turbo:submit-end',\n 'turbo:before-cache',\n 'turbo:before-render',\n 'turbo:before-stream-render',\n 'turbo:render',\n 'turbo:load',\n 'turbo:frame-render',\n 'turbo:frame-load',\n ].forEach((eventName) => {\n document.addEventListener(eventName, () => {\n console.log(`DEV_LOG_TURBO_EVENTS: ${eventName}`)\n })\n })\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { stringToCopy: String }\n\n copy(event) {\n event.preventDefault()\n event.stopPropagation()\n\n navigator.clipboard.writeText(this.stringToCopyValue)\n AntCat.notifySuccess(`Copied \"${this.stringToCopyValue}\" to clipboard`)\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nconst SELECTED_PICKABLE_DATA_ATTRIBUTE = \"data-picker-selected-pickable\"\n\nexport default class extends Controller {\n static targets = [\n \"modalWrapper\",\n \"clearButton\",\n \"fakeInput\",\n \"hiddenInput\",\n \"searchInput\",\n \"searchResults\",\n \"pickable\",\n ]\n\n static values = {\n url: String,\n allowClear: Boolean,\n }\n\n connect() {\n this._handleClearButtonVisibility()\n }\n\n open(event) {\n event.preventDefault()\n event.stopPropagation()\n\n this.modalWrapperTarget.classList.remove('hidden')\n\n this.searchInputTarget.focus()\n this.onSearch()\n }\n\n close(event) {\n if (event) {\n event.preventDefault()\n }\n this.modalWrapperTarget.classList.add('hidden')\n }\n\n backdropClickClose(event) {\n if (event.target !== this.modalWrapperTarget) {\n return\n }\n this.close()\n }\n\n clear(event) {\n event.preventDefault()\n event.stopPropagation()\n\n this.hiddenInputTarget.value = ''\n this._handleClearButtonVisibility()\n this.fakeInputTarget.innerHTML = '(none)'\n }\n\n onSearch = () => {\n this._setSearchResults(this.searchInputTarget.value)\n }\n\n pickCurrentTarget(event) {\n this._pick(event.currentTarget)\n }\n\n onKeydown = (event) => {\n switch (event.key) {\n case 'Escape': {\n this.close()\n\n event.stopPropagation()\n event.preventDefault()\n break\n }\n case 'ArrowDown': {\n const selected = this._nextPickable()\n\n if (selected) {\n this._select(selected)\n }\n event.preventDefault()\n break\n }\n case 'ArrowUp': {\n const selected = this._previousPickable()\n\n if (selected) {\n this._select(selected)\n }\n event.preventDefault()\n break\n }\n case 'Enter': {\n const selected = this._currentlySelected()\n\n if (selected) {\n this._pick(selected)\n event.preventDefault()\n }\n break\n }\n default: {\n break\n }\n }\n }\n\n // Private functions.\n\n _select(selected) {\n const currentlySelected = this._currentlySelected()\n if (currentlySelected) {\n currentlySelected.removeAttribute(SELECTED_PICKABLE_DATA_ATTRIBUTE)\n }\n\n selected.setAttribute(SELECTED_PICKABLE_DATA_ATTRIBUTE, \"true\")\n }\n\n _currentlySelected() {\n return this.searchResultsTarget.querySelector(`[${SELECTED_PICKABLE_DATA_ATTRIBUTE}]`)\n }\n\n _nextPickable() {\n return this._sibling(1)\n }\n\n _previousPickable() {\n return this._sibling(-1)\n }\n\n _sibling(offset) {\n const pickables = this.pickableTargets\n const selected = this._currentlySelected()\n const index = pickables.indexOf(selected)\n return pickables[index + offset]\n }\n\n _pick(selected) {\n const value = selected.getAttribute(\"data-pickable-value\")\n this.hiddenInputTarget.value = value\n\n const fakeInputLabel = selected.querySelector(\"[data-pickable-fake-input-label-template]\")\n this.fakeInputTarget.innerHTML = ''\n this.fakeInputTarget.insertAdjacentHTML(\"beforeend\", fakeInputLabel.innerHTML)\n\n this._handleClearButtonVisibility()\n this.close()\n }\n\n _setSearchResults = async (query) => {\n const url = `${this.urlValue}&q=${encodeURIComponent(query)}`\n const response = await fetch(url)\n const html = await response.text()\n\n this.searchResultsTarget.innerHTML = html\n }\n\n _handleClearButtonVisibility() {\n if (this.allowClearValue && this.hiddenInputTarget.value) {\n this.clearButtonTarget.classList.remove(\"hidden\")\n } else {\n this.clearButtonTarget.classList.add(\"hidden\")\n }\n }\n}\n","import { Controller } from '@hotwired/stimulus'\n\nexport default class extends Controller {\n connect() {\n this.element.innerHTML = \"Stimulus works!\"\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = { href: String }\n\n connect() {\n if (this.hasHrefValue) {\n this.element.querySelectorAll(`a[href*=\"${this.hrefValue}\"]`).\n forEach((element) => element.classList.add('bg-yellow-200'))\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport Sortable from \"sortablejs\"\n\nexport default class extends Controller {\n static targets = [\n \"hiddenInput\",\n \"sortableList\",\n ]\n\n connect () {\n this.sortable = new Sortable(this.sortableListTarget, { dataIdAttr: 'data-sortable-id', onSort: () => this._onSort() })\n }\n\n _onSort() {\n this.hiddenInputTarget.value = this.sortable.toArray().join(',')\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n csrfToken() {\n const element = document.head.querySelector('meta[name=\"csrf-token\"]')\n\n if (element) {\n return element.getAttribute(\"content\")\n } else {\n // This should only happen in the test env. Use the RSpec meta tag `:protect_from_forgery` to enable CSRF in specs.\n throw new Error(\"cannot read csrf-token\")\n }\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport Tablesort from \"tablesort\"\n\nexport default class extends Controller {\n connect() {\n new Tablesort(this.element) // eslint-disable-line no-new\n }\n}\n","var map = {\n\t\"./application_controller.js\": 370,\n\t\"./check_name_conflicts_controller.js\": 890,\n\t\"./checkbox_select_all_controller.js\": 582,\n\t\"./clipboard_controller.js\": 222,\n\t\"./copy_field_controller.js\": 54,\n\t\"./dev_controller.js\": 789,\n\t\"./disco_controller.js\": 786,\n\t\"./external_preview_controller.js\": 540,\n\t\"./highlight_controller.js\": 300,\n\t\"./history_item_form_controller.js\": 767,\n\t\"./hover_preview_controller.js\": 75,\n\t\"./notify_controller.js\": 495,\n\t\"./picker_controller.js\": 234,\n\t\"./reorder_controller.js\": 349,\n\t\"./revisions_table_controller.js\": 175,\n\t\"./scroll_controller.js\": 939,\n\t\"./stimulus_test_controller.js\": 275,\n\t\"./tablesort_controller.js\": 428,\n\t\"./taxt_editor_controller.js\": 31,\n\t\"./toggler_controller.js\": 866,\n\t\"controllers/application_controller.js\": 370,\n\t\"controllers/check_name_conflicts_controller.js\": 890,\n\t\"controllers/checkbox_select_all_controller.js\": 582,\n\t\"controllers/clipboard_controller.js\": 222,\n\t\"controllers/copy_field_controller.js\": 54,\n\t\"controllers/dev_controller.js\": 789,\n\t\"controllers/disco_controller.js\": 786,\n\t\"controllers/external_preview_controller.js\": 540,\n\t\"controllers/highlight_controller.js\": 300,\n\t\"controllers/history_item_form_controller.js\": 767,\n\t\"controllers/hover_preview_controller.js\": 75,\n\t\"controllers/notify_controller.js\": 495,\n\t\"controllers/picker_controller.js\": 234,\n\t\"controllers/reorder_controller.js\": 349,\n\t\"controllers/revisions_table_controller.js\": 175,\n\t\"controllers/scroll_controller.js\": 939,\n\t\"controllers/stimulus_test_controller.js\": 275,\n\t\"controllers/tablesort_controller.js\": 428,\n\t\"controllers/taxt_editor_controller.js\": 31,\n\t\"controllers/toggler_controller.js\": 866\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 461;","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n success(event) {\n AntCat.notifySuccess(event.params.message)\n }\n}\n","import { Controller } from \"@hotwired/stimulus\"\nimport { useDebounce, useHover } from 'stimulus-use'\n\nexport default class extends Controller {\n static targets = [\"link\"]\n\n static values = {\n url: String,\n }\n\n static debounces = [\n { name: 'show', wait: 400 },\n { name: 'hide', wait: 100 },\n ]\n\n connect() {\n this.isVisible = false\n useDebounce(this)\n useHover(this, { element: this.element })\n\n this.url = this.linkTarget.href\n\n this.container = this._createContainer(this.url)\n this.iframe = this._createIframe()\n\n this.container.appendChild(this.iframe)\n this.element.appendChild(this.container)\n }\n\n disconnect() {\n if (this.container) {\n this.container.remove()\n }\n }\n\n mouseEnter() {\n this.isVisible = true\n this.show()\n }\n\n mouseLeave() {\n this.isVisible = false\n this.hide()\n }\n\n show() {\n if (!this.iframe.hasAttribute(\"src\")) {\n this.iframe.src = this.url\n }\n\n if (this.isVisible) {\n this.container.classList.remove(\"hidden\")\n }\n }\n\n hide() {\n this.container.classList.add(\"hidden\")\n }\n\n _createContainer(url) {\n const element = document.createElement('div')\n element.classList.add('hidden')\n element.classList.add('external-preview-modal')\n element.innerHTML = `