{"version":3,"file":"stimulus_reflex-d28UyhZB.js","sources":["../../../../../shared/node_modules/stimulus_reflex/node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","../../../../../shared/node_modules/stimulus_reflex/dist/stimulus_reflex.js"],"sourcesContent":["var adapters = {\n logger: self.console,\n WebSocket: self.WebSocket\n};\n\nvar logger = {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now());\n adapters.logger.log(\"[ActionCable]\", ...messages);\n }\n }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this);\n this.connection = connection;\n this.reconnectAttempts = 0;\n }\n start() {\n if (!this.isRunning()) {\n this.startedAt = now();\n delete this.stoppedAt;\n this.startPolling();\n addEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n }\n }\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now();\n this.stopPolling();\n removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(\"ConnectionMonitor stopped\");\n }\n }\n isRunning() {\n return this.startedAt && !this.stoppedAt;\n }\n recordPing() {\n this.pingedAt = now();\n }\n recordConnect() {\n this.reconnectAttempts = 0;\n this.recordPing();\n delete this.disconnectedAt;\n logger.log(\"ConnectionMonitor recorded connect\");\n }\n recordDisconnect() {\n this.disconnectedAt = now();\n logger.log(\"ConnectionMonitor recorded disconnect\");\n }\n startPolling() {\n this.stopPolling();\n this.poll();\n }\n stopPolling() {\n clearTimeout(this.pollTimeout);\n }\n poll() {\n this.pollTimeout = setTimeout((() => {\n this.reconnectIfStale();\n this.poll();\n }), this.getPollInterval());\n }\n getPollInterval() {\n const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n const jitter = jitterMax * Math.random();\n return staleThreshold * 1e3 * backoff * (1 + jitter);\n }\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n this.reconnectAttempts++;\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n } else {\n logger.log(\"ConnectionMonitor reopening\");\n this.connection.reopen();\n }\n }\n }\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt;\n }\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n }\n disconnectedRecently() {\n return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n }\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout((() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n this.connection.reopen();\n }\n }), 200);\n }\n }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n message_types: {\n welcome: \"welcome\",\n disconnect: \"disconnect\",\n ping: \"ping\",\n confirmation: \"confirm_subscription\",\n rejection: \"reject_subscription\"\n },\n disconnect_reasons: {\n unauthorized: \"unauthorized\",\n invalid_request: \"invalid_request\",\n server_restart: \"server_restart\",\n remote: \"remote\"\n },\n default_mount_path: \"/cable\",\n protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this);\n this.consumer = consumer;\n this.subscriptions = this.consumer.subscriptions;\n this.monitor = new ConnectionMonitor(this);\n this.disconnected = true;\n }\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data));\n return true;\n } else {\n return false;\n }\n }\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n return false;\n } else {\n const socketProtocols = [ ...protocols, ...this.consumer.subprotocols || [] ];\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${socketProtocols}`);\n if (this.webSocket) {\n this.uninstallEventHandlers();\n }\n this.webSocket = new adapters.WebSocket(this.consumer.url, socketProtocols);\n this.installEventHandlers();\n this.monitor.start();\n return true;\n }\n }\n close({allowReconnect: allowReconnect} = {\n allowReconnect: true\n }) {\n if (!allowReconnect) {\n this.monitor.stop();\n }\n if (this.isOpen()) {\n return this.webSocket.close();\n }\n }\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n if (this.isActive()) {\n try {\n return this.close();\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error);\n } finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n setTimeout(this.open, this.constructor.reopenDelay);\n }\n } else {\n return this.open();\n }\n }\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol;\n }\n }\n isOpen() {\n return this.isState(\"open\");\n }\n isActive() {\n return this.isState(\"open\", \"connecting\");\n }\n triedToReconnect() {\n return this.monitor.reconnectAttempts > 0;\n }\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n }\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0;\n }\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase();\n }\n }\n }\n return null;\n }\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this);\n this.webSocket[`on${eventName}`] = handler;\n }\n }\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {};\n }\n }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) {\n return;\n }\n const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n switch (type) {\n case message_types.welcome:\n if (this.triedToReconnect()) {\n this.reconnectAttempted = true;\n }\n this.monitor.recordConnect();\n return this.subscriptions.reload();\n\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`);\n return this.close({\n allowReconnect: reconnect\n });\n\n case message_types.ping:\n return this.monitor.recordPing();\n\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier);\n if (this.reconnectAttempted) {\n this.reconnectAttempted = false;\n return this.subscriptions.notify(identifier, \"connected\", {\n reconnected: true\n });\n } else {\n return this.subscriptions.notify(identifier, \"connected\", {\n reconnected: false\n });\n }\n\n case message_types.rejection:\n return this.subscriptions.reject(identifier);\n\n default:\n return this.subscriptions.notify(identifier, \"received\", message);\n }\n },\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n this.disconnected = false;\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n return this.close({\n allowReconnect: false\n });\n }\n },\n close(event) {\n logger.log(\"WebSocket onclose event\");\n if (this.disconnected) {\n return;\n }\n this.disconnected = true;\n this.monitor.recordDisconnect();\n return this.subscriptions.notifyAll(\"disconnected\", {\n willAttemptReconnect: this.monitor.isRunning()\n });\n },\n error() {\n logger.log(\"WebSocket onerror event\");\n }\n};\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key];\n object[key] = value;\n }\n }\n return object;\n};\n\nclass Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer;\n this.identifier = JSON.stringify(params);\n extend(this, mixin);\n }\n perform(action, data = {}) {\n data.action = action;\n return this.send(data);\n }\n send(data) {\n return this.consumer.send({\n command: \"message\",\n identifier: this.identifier,\n data: JSON.stringify(data)\n });\n }\n unsubscribe() {\n return this.consumer.subscriptions.remove(this);\n }\n}\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions;\n this.pendingSubscriptions = [];\n }\n guarantee(subscription) {\n if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n this.pendingSubscriptions.push(subscription);\n } else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n }\n this.startGuaranteeing();\n }\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n }\n startGuaranteeing() {\n this.stopGuaranteeing();\n this.retrySubscribing();\n }\n stopGuaranteeing() {\n clearTimeout(this.retryTimeout);\n }\n retrySubscribing() {\n this.retryTimeout = setTimeout((() => {\n if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n this.pendingSubscriptions.map((subscription => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n this.subscriptions.subscribe(subscription);\n }));\n }\n }), 500);\n }\n}\n\nclass Subscriptions {\n constructor(consumer) {\n this.consumer = consumer;\n this.guarantor = new SubscriptionGuarantor(this);\n this.subscriptions = [];\n }\n create(channelName, mixin) {\n const channel = channelName;\n const params = typeof channel === \"object\" ? channel : {\n channel: channel\n };\n const subscription = new Subscription(this.consumer, params, mixin);\n return this.add(subscription);\n }\n add(subscription) {\n this.subscriptions.push(subscription);\n this.consumer.ensureActiveConnection();\n this.notify(subscription, \"initialized\");\n this.subscribe(subscription);\n return subscription;\n }\n remove(subscription) {\n this.forget(subscription);\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\");\n }\n return subscription;\n }\n reject(identifier) {\n return this.findAll(identifier).map((subscription => {\n this.forget(subscription);\n this.notify(subscription, \"rejected\");\n return subscription;\n }));\n }\n forget(subscription) {\n this.guarantor.forget(subscription);\n this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n return subscription;\n }\n findAll(identifier) {\n return this.subscriptions.filter((s => s.identifier === identifier));\n }\n reload() {\n return this.subscriptions.map((subscription => this.subscribe(subscription)));\n }\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n }\n notify(subscription, callbackName, ...args) {\n let subscriptions;\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription);\n } else {\n subscriptions = [ subscription ];\n }\n return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n }\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription);\n }\n }\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`);\n this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n }\n sendCommand(subscription, command) {\n const {identifier: identifier} = subscription;\n return this.consumer.send({\n command: command,\n identifier: identifier\n });\n }\n}\n\nclass Consumer {\n constructor(url) {\n this._url = url;\n this.subscriptions = new Subscriptions(this);\n this.connection = new Connection(this);\n this.subprotocols = [];\n }\n get url() {\n return createWebSocketURL(this._url);\n }\n send(data) {\n return this.connection.send(data);\n }\n connect() {\n return this.connection.open();\n }\n disconnect() {\n return this.connection.close({\n allowReconnect: false\n });\n }\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open();\n }\n }\n addSubProtocol(subprotocol) {\n this.subprotocols = [ ...this.subprotocols, subprotocol ];\n }\n}\n\nfunction createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url();\n }\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\");\n a.href = url;\n a.href = a.href;\n a.protocol = a.protocol.replace(\"http\", \"ws\");\n return a.href;\n } else {\n return url;\n }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url);\n}\n\nfunction getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n if (element) {\n return element.getAttribute(\"content\");\n }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n","import { Controller } from \"@hotwired/stimulus\";\n\nimport CableReady, { Utils } from \"cable_ready\";\n\nimport { createConsumer } from \"@rails/actioncable\";\n\n/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */ class Toastify {\n defaults={\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3e3,\n selector: undefined,\n callback: function() {},\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: \"\",\n backgroundColor: \"\",\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function() {},\n offset: {\n x: 0,\n y: 0\n },\n escapeMarkup: true,\n ariaLive: \"polite\",\n style: {\n background: \"\"\n }\n };\n constructor(options) {\n this.version = \"1.12.0\";\n this.options = {};\n this.toastElement = null;\n this._rootElement = document.body;\n this._init(options);\n }\n showToast() {\n this.toastElement = this._buildToast();\n if (typeof this.options.selector === \"string\") {\n this._rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || this.options.selector instanceof ShadowRoot) {\n this._rootElement = this.options.selector;\n } else {\n this._rootElement = document.body;\n }\n if (!this._rootElement) {\n throw \"Root element is not defined\";\n }\n this._rootElement.insertBefore(this.toastElement, this._rootElement.firstChild);\n this._reposition();\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout((() => {\n this._removeElement(this.toastElement);\n }), this.options.duration);\n }\n return this;\n }\n hideToast() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this._removeElement(this.toastElement);\n }\n _init(options) {\n this.options = Object.assign(this.defaults, options);\n if (this.options.backgroundColor) {\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n this.toastElement = null;\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : \"toastify-top\";\n this.options.stopOnFocus = options.stopOnFocus === undefined ? true : options.stopOnFocus;\n if (options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n }\n _buildToast() {\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n let divElement = document.createElement(\"div\");\n divElement.className = `toastify on ${this.options.className}`;\n divElement.className += ` toastify-${this.options.position}`;\n divElement.className += ` ${this.options.gravity}`;\n for (const property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n if (this.options.ariaLive) {\n divElement.setAttribute(\"aria-live\", this.options.ariaLive);\n }\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n divElement.appendChild(this.options.node);\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n if (this.options.avatar !== \"\") {\n let avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n avatarElement.className = \"toastify-avatar\";\n if (this.options.position == \"left\") {\n divElement.appendChild(avatarElement);\n } else {\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n if (this.options.close === true) {\n let closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"✖\";\n closeElement.addEventListener(\"click\", (event => {\n event.stopPropagation();\n this._removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }));\n const width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n if (this.options.position == \"left\" && width > 360) {\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n divElement.appendChild(closeElement);\n }\n }\n if (this.options.stopOnFocus && this.options.duration > 0) {\n divElement.addEventListener(\"mouseover\", (event => {\n window.clearTimeout(divElement.timeOutValue);\n }));\n divElement.addEventListener(\"mouseleave\", (() => {\n divElement.timeOutValue = window.setTimeout((() => {\n this._removeElement(divElement);\n }), this.options.duration);\n }));\n }\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\"click\", (event => {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }));\n }\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\"click\", (event => {\n event.stopPropagation();\n this.options.onClick();\n }));\n }\n if (typeof this.options.offset === \"object\") {\n const x = this._getAxisOffsetAValue(\"x\", this.options);\n const y = this._getAxisOffsetAValue(\"y\", this.options);\n const xOffset = this.options.position == \"left\" ? x : `-${x}`;\n const yOffset = this.options.gravity == \"toastify-top\" ? y : `-${y}`;\n divElement.style.transform = `translate(${xOffset},${yOffset})`;\n }\n return divElement;\n }\n _removeElement(toastElement) {\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n window.setTimeout((() => {\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n this.options.callback.call(toastElement);\n this._reposition();\n }), 400);\n }\n _reposition() {\n let topLeftOffsetSize = {\n top: 15,\n bottom: 15\n };\n let topRightOffsetSize = {\n top: 15,\n bottom: 15\n };\n let offsetSize = {\n top: 15,\n bottom: 15\n };\n let allToasts = this._rootElement.querySelectorAll(\".toastify\");\n let classUsed;\n for (let i = 0; i < allToasts.length; i++) {\n if (allToasts[i].classList.contains(\"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n let height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length - 1);\n let offset = 15;\n let width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n if (width <= 360) {\n allToasts[i].style[classUsed] = `${offsetSize[classUsed]}px`;\n offsetSize[classUsed] += height + offset;\n } else {\n if (allToasts[i].classList.contains(\"toastify-left\") === true) {\n allToasts[i].style[classUsed] = `${topLeftOffsetSize[classUsed]}px`;\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n allToasts[i].style[classUsed] = `${topRightOffsetSize[classUsed]}px`;\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n }\n _getAxisOffsetAValue(axis, options) {\n if (options.offset[axis]) {\n if (isNaN(options.offset[axis])) {\n return options.offset[axis];\n } else {\n return `${options.offset[axis]}px`;\n }\n }\n return \"0px\";\n }\n}\n\nfunction StartToastifyInstance(options) {\n return new Toastify(options);\n}\n\nCableReady.operations.stimulusReflexVersionMismatch = operation => {\n const levels = {\n info: {},\n success: {\n background: \"#198754\",\n color: \"white\"\n },\n warn: {\n background: \"#ffc107\",\n color: \"black\"\n },\n error: {\n background: \"#dc3545\",\n color: \"white\"\n }\n };\n const defaults = {\n selector: setupToastify(),\n close: true,\n duration: 30 * 1e3,\n gravity: \"bottom\",\n position: \"right\",\n newWindow: true,\n style: levels[operation.level || \"info\"]\n };\n StartToastifyInstance({\n ...defaults,\n ...operation\n }).showToast();\n};\n\nfunction setupToastify() {\n const id = \"stimulus-reflex-toast-element\";\n let element = document.querySelector(`#${id}`);\n if (!element) {\n element = document.createElement(\"div\");\n element.id = id;\n document.documentElement.appendChild(element);\n const styles = document.createElement(\"style\");\n styles.innerHTML = `\\n #${id} .toastify {\\n padding: 12px 20px;\\n color: #ffffff;\\n display: inline-block;\\n background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\\n background: linear-gradient(135deg, #73a5ff, #5477f5);\\n position: fixed;\\n opacity: 0;\\n transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\\n border-radius: 2px;\\n cursor: pointer;\\n text-decoration: none;\\n max-width: calc(50% - 20px);\\n z-index: 2147483647;\\n bottom: -150px;\\n right: 15px;\\n }\\n\\n #${id} .toastify.on {\\n opacity: 1;\\n }\\n\\n #${id} .toast-close {\\n background: transparent;\\n border: 0;\\n color: white;\\n cursor: pointer;\\n font-family: inherit;\\n font-size: 1em;\\n opacity: 0.4;\\n padding: 0 5px;\\n }\\n `;\n document.head.appendChild(styles);\n }\n return element;\n}\n\nlet deprecationWarnings = true;\n\nvar Deprecate = {\n get enabled() {\n return deprecationWarnings;\n },\n get disabled() {\n return !deprecationWarnings;\n },\n get value() {\n return deprecationWarnings;\n },\n set(value) {\n deprecationWarnings = !!value;\n },\n set deprecate(value) {\n deprecationWarnings = !!value;\n }\n};\n\nlet debugging = false;\n\nvar Debug$1 = {\n get enabled() {\n return debugging;\n },\n get disabled() {\n return !debugging;\n },\n get value() {\n return debugging;\n },\n set(value) {\n debugging = !!value;\n },\n set debug(value) {\n debugging = !!value;\n }\n};\n\nconst defaultSchema = {\n reflexAttribute: \"data-reflex\",\n reflexPermanentAttribute: \"data-reflex-permanent\",\n reflexRootAttribute: \"data-reflex-root\",\n reflexSuppressLoggingAttribute: \"data-reflex-suppress-logging\",\n reflexDatasetAttribute: \"data-reflex-dataset\",\n reflexDatasetAllAttribute: \"data-reflex-dataset-all\",\n reflexSerializeFormAttribute: \"data-reflex-serialize-form\",\n reflexFormSelectorAttribute: \"data-reflex-form-selector\",\n reflexIncludeInnerHtmlAttribute: \"data-reflex-include-inner-html\",\n reflexIncludeTextContentAttribute: \"data-reflex-include-text-content\"\n};\n\nlet schema = {};\n\nvar Schema = {\n set(application) {\n schema = {\n ...defaultSchema,\n ...application.schema\n };\n for (const attribute in schema) {\n const attributeName = attribute.slice(0, -9);\n Object.defineProperty(this, attributeName, {\n get: () => schema[attribute],\n configurable: true\n });\n }\n }\n};\n\nconst {debounce: debounce, dispatch: dispatch, xpathToElement: xpathToElement, xpathToElementArray: xpathToElementArray} = Utils;\n\nconst uuidv4 = () => {\n const crypto = window.crypto || window.msCrypto;\n return ([ 1e7 ] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)));\n};\n\nconst serializeForm = (form, options = {}) => {\n if (!form) return \"\";\n const w = options.w || window;\n const {element: element} = options;\n const formData = new w.FormData(form);\n const data = Array.from(formData, (e => e.map(encodeURIComponent).join(\"=\")));\n const submitButton = form.querySelector(\"input[type=submit]\");\n if (element && element.name && element.nodeName === \"INPUT\" && element.type === \"submit\") {\n data.push(`${encodeURIComponent(element.name)}=${encodeURIComponent(element.value)}`);\n } else if (submitButton && submitButton.name) {\n data.push(`${encodeURIComponent(submitButton.name)}=${encodeURIComponent(submitButton.value)}`);\n }\n return Array.from(data).join(\"&\");\n};\n\nconst camelize = (value, uppercaseFirstLetter = true) => {\n if (typeof value !== \"string\") return \"\";\n value = value.replace(/[\\s_](.)/g, ($1 => $1.toUpperCase())).replace(/[\\s_]/g, \"\").replace(/^(.)/, ($1 => $1.toLowerCase()));\n if (uppercaseFirstLetter) value = value.substr(0, 1).toUpperCase() + value.substr(1);\n return value;\n};\n\nconst XPathToElement = xpathToElement;\n\nconst XPathToArray = xpathToElementArray;\n\nconst emitEvent = (name, detail = {}) => dispatch(document, name, detail);\n\nconst extractReflexName = reflexString => {\n const match = reflexString.match(/(?:.*->)?(.*?)(?:Reflex)?#/);\n return match ? match[1] : \"\";\n};\n\nconst elementToXPath = element => {\n if (element.id !== \"\") return \"//*[@id='\" + element.id + \"']\";\n if (element === document.body) return \"/html/body\";\n if (element.nodeName === \"HTML\") return \"/html\";\n let ix = 0;\n const siblings = element && element.parentNode ? element.parentNode.childNodes : [];\n for (var i = 0; i < siblings.length; i++) {\n const sibling = siblings[i];\n if (sibling === element) {\n const computedPath = elementToXPath(element.parentNode);\n const tagName = element.tagName.toLowerCase();\n const ixInc = ix + 1;\n return `${computedPath}/${tagName}[${ixInc}]`;\n }\n if (sibling.nodeType === 1 && sibling.tagName === element.tagName) {\n ix++;\n }\n }\n};\n\nconst elementInvalid = element => element.type === \"number\" && element.validity && element.validity.badInput;\n\nconst getReflexElement = (args, element) => args[0] && args[0].nodeType === Node.ELEMENT_NODE ? args.shift() : element;\n\nconst getReflexOptions = args => {\n const options = {};\n if (args[0] && typeof args[0] === \"object\" && Object.keys(args[0]).filter((key => [ \"id\", \"attrs\", \"selectors\", \"reflexId\", \"resolveLate\", \"serializeForm\", \"suppressLogging\", \"includeInnerHTML\", \"includeTextContent\" ].includes(key))).length) {\n const opts = args.shift();\n Object.keys(opts).forEach((o => {\n if (o === \"reflexId\") {\n if (Deprecate.enabled) console.warn(\"reflexId option will be removed in v4. Use id instead.\");\n options[\"id\"] = opts[\"reflexId\"];\n } else options[o] = opts[o];\n }));\n }\n return options;\n};\n\nconst getReflexRoots = element => {\n let list = [];\n while (list.length === 0 && element) {\n let reflexRoot = element.getAttribute(Schema.reflexRoot);\n if (reflexRoot) {\n if (reflexRoot.length === 0 && element.id) reflexRoot = `#${element.id}`;\n const selectors = reflexRoot.split(\",\").filter((s => s.trim().length));\n if (Debug$1.enabled && selectors.length === 0) {\n console.error(`No value found for ${Schema.reflexRoot}. Add an #id to the element or provide a value for ${Schema.reflexRoot}.`, element);\n }\n list = list.concat(selectors.filter((s => document.querySelector(s))));\n }\n element = element.parentElement ? element.parentElement.closest(`[${Schema.reflexRoot}]`) : null;\n }\n return list;\n};\n\nconst reflexNameToControllerIdentifier = reflexName => reflexName.replace(/([a-z0–9])([A-Z])/g, \"$1-$2\").replace(/(::)/g, \"--\").replace(/-reflex$/gi, \"\").toLowerCase();\n\nconst stages = [ \"created\", \"before\", \"delivered\", \"queued\", \"after\", \"finalized\", \"success\", \"error\", \"halted\", \"forbidden\" ];\n\nlet lastReflex;\n\nconst reflexes = new Proxy({}, {\n get: function(target, prop) {\n if (stages.includes(prop)) return Object.fromEntries(Object.entries(target).filter((([_, reflex]) => reflex.stage === prop))); else if (prop === \"last\") return lastReflex; else if (prop === \"all\") return target;\n return Reflect.get(...arguments);\n },\n set: function(target, prop, value) {\n target[prop] = value;\n lastReflex = value;\n return true;\n }\n});\n\nconst invokeLifecycleMethod = (reflex, stage) => {\n const specificLifecycleMethod = reflex.controller[[ \"before\", \"after\", \"finalize\" ].includes(stage) ? `${stage}${camelize(reflex.action)}` : `${camelize(reflex.action, false)}${camelize(stage)}`];\n const genericLifecycleMethod = reflex.controller[[ \"before\", \"after\", \"finalize\" ].includes(stage) ? `${stage}Reflex` : `reflex${camelize(stage)}`];\n if (typeof specificLifecycleMethod === \"function\") {\n specificLifecycleMethod.call(reflex.controller, reflex.element, reflex.target, reflex.error, reflex.id, reflex.payload);\n }\n if (typeof genericLifecycleMethod === \"function\") {\n genericLifecycleMethod.call(reflex.controller, reflex.element, reflex.target, reflex.error, reflex.id, reflex.payload);\n }\n};\n\nconst dispatchLifecycleEvent = (reflex, stage) => {\n if (!reflex.controller.element.parentElement) {\n if (Debug$1.enabled && !reflex.warned) {\n console.warn(`StimulusReflex was not able execute callbacks or emit events for \"${stage}\" or later life-cycle stages for this Reflex. The StimulusReflex Controller Element is no longer present in the DOM. Could you move the StimulusReflex Controller to an element higher in your DOM?`);\n reflex.warned = true;\n }\n return;\n }\n reflex.stage = stage;\n reflex.lifecycle.push(stage);\n const event = `stimulus-reflex:${stage}`;\n const action = `${event}:${reflex.action}`;\n const detail = {\n reflex: reflex.target,\n controller: reflex.controller,\n id: reflex.id,\n element: reflex.element,\n payload: reflex.payload\n };\n const options = {\n bubbles: true,\n cancelable: false,\n detail: detail\n };\n reflex.controller.element.dispatchEvent(new CustomEvent(event, options));\n reflex.controller.element.dispatchEvent(new CustomEvent(action, options));\n if (window.jQuery) {\n window.jQuery(reflex.controller.element).trigger(event, detail);\n window.jQuery(reflex.controller.element).trigger(action, detail);\n }\n};\n\ndocument.addEventListener(\"stimulus-reflex:before\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"before\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:queued\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"queued\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:delivered\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"delivered\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:success\", (event => {\n const reflex = reflexes[event.detail.id];\n invokeLifecycleMethod(reflex, \"success\");\n dispatchLifecycleEvent(reflex, \"after\");\n}), true);\n\ndocument.addEventListener(\"stimulus-reflex:nothing\", (event => dispatchLifecycleEvent(reflexes[event.detail.id], \"success\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:error\", (event => {\n const reflex = reflexes[event.detail.id];\n invokeLifecycleMethod(reflex, \"error\");\n dispatchLifecycleEvent(reflex, \"after\");\n}), true);\n\ndocument.addEventListener(\"stimulus-reflex:halted\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"halted\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:forbidden\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"forbidden\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:after\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"after\")), true);\n\ndocument.addEventListener(\"stimulus-reflex:finalize\", (event => invokeLifecycleMethod(reflexes[event.detail.id], \"finalize\")), true);\n\nlet app = {};\n\nvar App = {\n get app() {\n return app;\n },\n set(application) {\n app = application;\n }\n};\n\nlet isolationMode = false;\n\nvar IsolationMode = {\n get disabled() {\n return !isolationMode;\n },\n set(value) {\n isolationMode = value;\n if (Deprecate.enabled && !isolationMode) {\n document.addEventListener(\"DOMContentLoaded\", (() => console.warn(\"Deprecation warning: the next version of StimulusReflex will standardize isolation mode, and the isolate option will be removed.\\nPlease update your applications to assume that every tab will be isolated. Use CableReady operations to broadcast updates to other tabs and users.\")), {\n once: true\n });\n }\n }\n};\n\nclass Reflex {\n constructor(data, controller) {\n this.data = data.valueOf();\n this.controller = controller;\n this.element = data.reflexElement;\n this.id = data.id;\n this.error = null;\n this.payload = null;\n this.stage = \"created\";\n this.lifecycle = [ \"created\" ];\n this.warned = false;\n this.target = data.target;\n this.action = data.target.split(\"#\")[1];\n this.selector = null;\n this.morph = null;\n this.operation = null;\n this.timestamp = new Date;\n this.cloned = false;\n }\n get getPromise() {\n const promise = new Promise(((resolve, reject) => {\n this.promise = {\n resolve: resolve,\n reject: reject,\n data: this.data\n };\n }));\n promise.id = this.id;\n Object.defineProperty(promise, \"reflexId\", {\n get() {\n if (Deprecate.enabled) console.warn(\"reflexId is deprecated and will be removed from v4. Use id instead.\");\n return this.id;\n }\n });\n promise.reflex = this;\n if (Debug$1.enabled) promise.catch((() => {}));\n return promise;\n }\n}\n\nconst received = data => {\n if (!data.cableReady) return;\n if (data.version.replace(\".pre\", \"-pre\").replace(\".rc\", \"-rc\") !== CableReady.version) {\n const mismatch = `CableReady failed to execute your reflex action due to a version mismatch between your gem and JavaScript version. Package versions must match exactly.\\n\\ncable_ready gem: ${data.version}\\ncable_ready npm: ${CableReady.version}`;\n console.error(mismatch);\n if (Debug$1.enabled) {\n CableReady.operations.stimulusReflexVersionMismatch({\n text: mismatch,\n level: \"error\"\n });\n }\n return;\n }\n let reflexOperations = [];\n for (let i = data.operations.length - 1; i >= 0; i--) {\n if (data.operations[i].stimulusReflex) {\n reflexOperations.push(data.operations[i]);\n data.operations.splice(i, 1);\n }\n }\n if (reflexOperations.some((operation => operation.stimulusReflex.url !== location.href))) {\n if (Debug$1.enabled) {\n console.error(\"Reflex failed due to mismatched URL.\");\n return;\n }\n }\n let reflexData;\n if (reflexOperations.length) {\n reflexData = reflexOperations[0].stimulusReflex;\n reflexData.payload = reflexOperations[0].payload;\n }\n if (reflexData) {\n const {id: id, payload: payload} = reflexData;\n let reflex;\n if (!reflexes[id] && IsolationMode.disabled) {\n const controllerElement = XPathToElement(reflexData.xpathController);\n const reflexElement = XPathToElement(reflexData.xpathElement);\n controllerElement.reflexController = controllerElement.reflexController || {};\n controllerElement.reflexData = controllerElement.reflexData || {};\n controllerElement.reflexError = controllerElement.reflexError || {};\n const controller = App.app.getControllerForElementAndIdentifier(controllerElement, reflexData.reflexController);\n controllerElement.reflexController[id] = controller;\n controllerElement.reflexData[id] = reflexData;\n reflex = new Reflex(reflexData, controller);\n reflexes[id] = reflex;\n reflex.cloned = true;\n reflex.element = reflexElement;\n controller.lastReflex = reflex;\n dispatchLifecycleEvent(reflex, \"before\");\n reflex.getPromise;\n } else {\n reflex = reflexes[id];\n }\n if (reflex) {\n reflex.payload = payload;\n reflex.totalOperations = reflexOperations.length;\n reflex.pendingOperations = reflexOperations.length;\n reflex.completedOperations = 0;\n reflex.piggybackOperations = data.operations;\n CableReady.perform(reflexOperations);\n }\n } else {\n if (data.operations.length && reflexes[data.operations[0].reflexId]) {\n CableReady.perform(data.operations);\n }\n }\n};\n\nlet consumer;\n\nlet params;\n\nlet subscription;\n\nlet active;\n\nconst initialize$1 = (consumerValue, paramsValue) => {\n consumer = consumerValue;\n params = paramsValue;\n document.addEventListener(\"DOMContentLoaded\", (() => {\n active = false;\n connectionStatusClass();\n if (Deprecate.enabled && consumerValue) console.warn(\"Deprecation warning: the next version of StimulusReflex will obtain a reference to consumer via the Stimulus application object.\\nPlease add 'application.consumer = consumer' to your index.js after your Stimulus application has been established, and remove the consumer key from your StimulusReflex initialize() options object.\");\n }));\n document.addEventListener(\"turbolinks:load\", connectionStatusClass);\n document.addEventListener(\"turbo:load\", connectionStatusClass);\n};\n\nconst subscribe = controller => {\n if (subscription) return;\n consumer = consumer || controller.application.consumer || createConsumer();\n const {channel: channel} = controller.StimulusReflex;\n const request = {\n channel: channel,\n ...params\n };\n const identifier = JSON.stringify(request);\n subscription = consumer.subscriptions.findAll(identifier)[0] || consumer.subscriptions.create(request, {\n received: received,\n connected: connected,\n rejected: rejected,\n disconnected: disconnected\n });\n};\n\nconst connected = () => {\n active = true;\n connectionStatusClass();\n emitEvent(\"stimulus-reflex:connected\");\n Object.values(reflexes.queued).forEach((reflex => {\n subscription.send(reflex.data);\n dispatchLifecycleEvent(reflex, \"delivered\");\n }));\n};\n\nconst rejected = () => {\n active = false;\n connectionStatusClass();\n emitEvent(\"stimulus-reflex:rejected\");\n if (Debug.enabled) console.warn(\"Channel subscription was rejected.\");\n};\n\nconst disconnected = willAttemptReconnect => {\n active = false;\n connectionStatusClass();\n emitEvent(\"stimulus-reflex:disconnected\", willAttemptReconnect);\n};\n\nconst deliver = reflex => {\n if (active) {\n subscription.send(reflex.data);\n dispatchLifecycleEvent(reflex, \"delivered\");\n } else dispatchLifecycleEvent(reflex, \"queued\");\n};\n\nconst connectionStatusClass = () => {\n const list = document.body.classList;\n if (!(list.contains(\"stimulus-reflex-connected\") || list.contains(\"stimulus-reflex-disconnected\"))) {\n list.add(active ? \"stimulus-reflex-connected\" : \"stimulus-reflex-disconnected\");\n return;\n }\n if (active) {\n list.replace(\"stimulus-reflex-disconnected\", \"stimulus-reflex-connected\");\n } else {\n list.replace(\"stimulus-reflex-connected\", \"stimulus-reflex-disconnected\");\n }\n};\n\nvar ActionCableTransport = {\n subscribe: subscribe,\n deliver: deliver,\n initialize: initialize$1\n};\n\nconst request = reflex => {\n if (Debug$1.disabled || reflex.data.suppressLogging) return;\n console.log(`↑ stimulus ↑ ${reflex.target}`, {\n id: reflex.id,\n args: reflex.data.args,\n controller: reflex.controller.identifier,\n element: reflex.element,\n controllerElement: reflex.controller.element\n });\n};\n\nconst success = reflex => {\n if (Debug$1.disabled || reflex.data.suppressLogging) return;\n const output = {\n id: reflex.id,\n morph: reflex.morph,\n payload: reflex.payload\n };\n if (reflex.operation !== \"dispatch_event\") output.operation = reflex.operation;\n console.log(`↓ reflex ↓ ${reflex.target} → ${reflex.selector || \"∞\"}${progress(reflex)} ${duration(reflex)}`, output);\n};\n\nconst halted$1 = reflex => {\n if (Debug$1.disabled || reflex.data.suppressLogging) return;\n console.log(`↓ reflex ↓ ${reflex.target} ${duration(reflex)} %cHALTED`, \"color: #ffa500;\", {\n id: reflex.id,\n payload: reflex.payload\n });\n};\n\nconst forbidden$1 = reflex => {\n if (Debug$1.disabled || reflex.data.suppressLogging) return;\n console.log(`↓ reflex ↓ ${reflex.target} ${duration(reflex)} %cFORBIDDEN`, \"color: #BF40BF;\", {\n id: reflex.id,\n payload: reflex.payload\n });\n};\n\nconst error$1 = reflex => {\n if (Debug$1.disabled || reflex.data.suppressLogging) return;\n console.log(`↓ reflex ↓ ${reflex.target} ${duration(reflex)} %cERROR: ${reflex.error}`, \"color: #f00;\", {\n id: reflex.id,\n payload: reflex.payload\n });\n};\n\nconst duration = reflex => !reflex.cloned ? `in ${new Date - reflex.timestamp}ms` : \"CLONED\";\n\nconst progress = reflex => reflex.totalOperations > 1 ? ` ${reflex.completedOperations}/${reflex.totalOperations}` : \"\";\n\nvar Log = {\n request: request,\n success: success,\n halted: halted$1,\n forbidden: forbidden$1,\n error: error$1\n};\n\nconst multipleInstances = element => {\n if ([ \"checkbox\", \"radio\" ].includes(element.type)) {\n return document.querySelectorAll(`input[type=\"${element.type}\"][name=\"${element.name}\"]`).length > 1;\n }\n return false;\n};\n\nconst collectCheckedOptions = element => Array.from(element.querySelectorAll(\"option:checked\")).concat(Array.from(document.querySelectorAll(`input[type=\"${element.type}\"][name=\"${element.name}\"]`)).filter((elem => elem.checked))).map((o => o.value));\n\nconst attributeValue = (values = []) => {\n const value = Array.from(new Set(values.filter((v => v && String(v).length)).map((v => v.trim())))).join(\" \").trim();\n return value.length > 0 ? value : null;\n};\n\nconst attributeValues = value => {\n if (!value) return [];\n if (!value.length) return [];\n return value.split(\" \").filter((v => v.trim().length));\n};\n\nconst extractElementAttributes = element => {\n let attrs = Array.from(element.attributes).reduce(((memo, attr) => {\n memo[attr.name] = attr.value;\n return memo;\n }), {});\n attrs.checked = !!element.checked;\n attrs.selected = !!element.selected;\n attrs.tag_name = element.tagName;\n if (element.tagName.match(/select/i) || multipleInstances(element)) {\n const collectedOptions = collectCheckedOptions(element);\n attrs.values = collectedOptions;\n attrs.value = collectedOptions.join(\",\");\n } else {\n attrs.value = element.value;\n }\n return attrs;\n};\n\nconst getElementsFromTokens = (element, tokens) => {\n if (!tokens || tokens.length === 0) return [];\n let elements = [ element ];\n const xPath = elementToXPath(element);\n tokens.forEach((token => {\n try {\n switch (token) {\n case \"combined\":\n if (Deprecate.enabled) console.warn(\"In the next version of StimulusReflex, the 'combined' option to data-reflex-dataset will become 'ancestors'.\");\n elements = [ ...elements, ...XPathToArray(`${xPath}/ancestor::*`, true) ];\n break;\n\n case \"ancestors\":\n elements = [ ...elements, ...XPathToArray(`${xPath}/ancestor::*`, true) ];\n break;\n\n case \"parent\":\n elements = [ ...elements, ...XPathToArray(`${xPath}/parent::*`) ];\n break;\n\n case \"siblings\":\n elements = [ ...elements, ...XPathToArray(`${xPath}/preceding-sibling::*|${xPath}/following-sibling::*`) ];\n break;\n\n case \"children\":\n elements = [ ...elements, ...XPathToArray(`${xPath}/child::*`) ];\n break;\n\n case \"descendants\":\n elements = [ ...elements, ...XPathToArray(`${xPath}/descendant::*`) ];\n break;\n\n default:\n elements = [ ...elements, ...document.querySelectorAll(token) ];\n }\n } catch (error) {\n if (Debug$1.enabled) console.error(error);\n }\n }));\n return elements;\n};\n\nconst extractElementDataset = element => {\n const dataset = element.attributes[Schema.reflexDataset];\n const allDataset = element.attributes[Schema.reflexDatasetAll];\n const tokens = dataset && dataset.value.split(\" \") || [];\n const allTokens = allDataset && allDataset.value.split(\" \") || [];\n const datasetElements = getElementsFromTokens(element, tokens);\n const datasetAllElements = getElementsFromTokens(element, allTokens);\n const datasetAttributes = datasetElements.reduce(((acc, ele) => ({\n ...extractDataAttributes(ele),\n ...acc\n })), {});\n const reflexElementAttributes = extractDataAttributes(element);\n const elementDataset = {\n dataset: {\n ...reflexElementAttributes,\n ...datasetAttributes\n },\n datasetAll: {}\n };\n datasetAllElements.forEach((element => {\n const elementAttributes = extractDataAttributes(element);\n Object.keys(elementAttributes).forEach((key => {\n const value = elementAttributes[key];\n if (elementDataset.datasetAll[key] && Array.isArray(elementDataset.datasetAll[key])) {\n elementDataset.datasetAll[key].push(value);\n } else {\n elementDataset.datasetAll[key] = [ value ];\n }\n }));\n }));\n return elementDataset;\n};\n\nconst extractDataAttributes = element => {\n let attrs = {};\n if (element && element.attributes) {\n Array.from(element.attributes).forEach((attr => {\n if (attr.name.startsWith(\"data-\")) {\n attrs[attr.name] = attr.value;\n }\n }));\n }\n return attrs;\n};\n\nvar name = \"stimulus_reflex\";\n\nvar version = \"3.5.3\";\n\nvar description = \"Build reactive applications with the Rails tooling you already know and love.\";\n\nvar keywords = [ \"ruby\", \"rails\", \"websockets\", \"actioncable\", \"turbolinks\", \"reactive\", \"cable\", \"ujs\", \"ssr\", \"stimulus\", \"reflex\", \"stimulus_reflex\", \"dom\", \"morphdom\" ];\n\nvar homepage = \"https://docs.stimulusreflex.com\";\n\nvar bugs = \"https://github.com/stimulusreflex/stimulus_reflex/issues\";\n\nvar repository = \"https://github.com/stimulusreflex/stimulus_reflex\";\n\nvar license = \"MIT\";\n\nvar author = \"Nathan Hopkins \";\n\nvar contributors = [ \"Andrew Mason \", \"Julian Rubisch \", \"Marco Roth \", \"Nathan Hopkins \" ];\n\nvar main = \"./dist/stimulus_reflex.js\";\n\nvar module = \"./dist/stimulus_reflex.js\";\n\nvar browser = \"./dist/stimulus_reflex.js\";\n\nvar unpkg = \"./dist/stimulus_reflex.umd.js\";\n\nvar umd = \"./dist/stimulus_reflex.umd.js\";\n\nvar files = [ \"dist/*\", \"javascript/*\" ];\n\nvar scripts = {\n lint: \"yarn run format --check\",\n format: \"yarn run prettier-standard ./javascript/**/*.js rollup.config.mjs\",\n build: \"yarn rollup -c\",\n \"build:watch\": \"yarn rollup -wc\",\n watch: \"yarn build:watch\",\n test: \"web-test-runner javascript/test/**/*.test.js\",\n \"test:watch\": \"yarn test --watch\",\n \"docs:dev\": \"vitepress dev docs\",\n \"docs:build\": \"vitepress build docs && cp docs/_redirects docs/.vitepress/dist\",\n \"docs:preview\": \"vitepress preview docs\"\n};\n\nvar peerDependencies = {\n \"@hotwired/stimulus\": \">= 3.0\"\n};\n\nvar dependencies = {\n \"@hotwired/stimulus\": \"^3\",\n \"@rails/actioncable\": \"^6 || ^7\",\n cable_ready: \"^5.0.6\"\n};\n\nvar devDependencies = {\n \"@open-wc/testing\": \"^4.0.0\",\n \"@rollup/plugin-json\": \"^6.1.0\",\n \"@rollup/plugin-node-resolve\": \"^15.3.0\",\n \"@rollup/plugin-terser\": \"^0.4.4\",\n \"@web/dev-server-esbuild\": \"^1.0.2\",\n \"@web/dev-server-rollup\": \"^0.6.4\",\n \"@web/test-runner\": \"^0.19.0\",\n \"prettier-standard\": \"^16.4.1\",\n rollup: \"^4.22.4\",\n \"toastify-js\": \"^1.12.0\",\n vitepress: \"^1.0.0-beta.1\"\n};\n\nvar packageInfo = {\n name: name,\n version: version,\n description: description,\n keywords: keywords,\n homepage: homepage,\n bugs: bugs,\n repository: repository,\n license: license,\n author: author,\n contributors: contributors,\n main: main,\n module: module,\n browser: browser,\n import: \"./dist/stimulus_reflex.js\",\n unpkg: unpkg,\n umd: umd,\n files: files,\n scripts: scripts,\n peerDependencies: peerDependencies,\n dependencies: dependencies,\n devDependencies: devDependencies\n};\n\nclass ReflexData {\n constructor(options, reflexElement, controllerElement, reflexController, permanentAttributeName, target, args, url, tabId) {\n this.options = options;\n this.reflexElement = reflexElement;\n this.controllerElement = controllerElement;\n this.reflexController = reflexController;\n this.permanentAttributeName = permanentAttributeName;\n this.target = target;\n this.args = args;\n this.url = url;\n this.tabId = tabId;\n }\n get attrs() {\n this._attrs = this._attrs || this.options[\"attrs\"] || extractElementAttributes(this.reflexElement);\n return this._attrs;\n }\n get id() {\n this._id = this._id || this.options[\"id\"] || uuidv4();\n return this._id;\n }\n get selectors() {\n this._selectors = this._selectors || this.options[\"selectors\"] || getReflexRoots(this.reflexElement);\n return typeof this._selectors === \"string\" ? [ this._selectors ] : this._selectors;\n }\n get resolveLate() {\n return this.options[\"resolveLate\"] || false;\n }\n get dataset() {\n this._dataset = this._dataset || extractElementDataset(this.reflexElement);\n return this._dataset;\n }\n get innerHTML() {\n return this.includeInnerHtml ? this.reflexElement.innerHTML : \"\";\n }\n get textContent() {\n return this.includeTextContent ? this.reflexElement.textContent : \"\";\n }\n get xpathController() {\n return elementToXPath(this.controllerElement);\n }\n get xpathElement() {\n return elementToXPath(this.reflexElement);\n }\n get formSelector() {\n const attr = this.reflexElement.attributes[Schema.reflexFormSelector] ? this.reflexElement.attributes[Schema.reflexFormSelector].value : undefined;\n return this.options[\"formSelector\"] || attr;\n }\n get includeInnerHtml() {\n const attr = this.reflexElement.attributes[Schema.reflexIncludeInnerHtml] || false;\n return this.options[\"includeInnerHTML\"] || attr ? attr.value !== \"false\" : false;\n }\n get includeTextContent() {\n const attr = this.reflexElement.attributes[Schema.reflexIncludeTextContent] || false;\n return this.options[\"includeTextContent\"] || attr ? attr.value !== \"false\" : false;\n }\n get suppressLogging() {\n return this.options[\"suppressLogging\"] || this.reflexElement.attributes[Schema.reflexSuppressLogging] || false;\n }\n valueOf() {\n return {\n attrs: this.attrs,\n dataset: this.dataset,\n selectors: this.selectors,\n id: this.id,\n resolveLate: this.resolveLate,\n suppressLogging: this.suppressLogging,\n xpathController: this.xpathController,\n xpathElement: this.xpathElement,\n inner_html: this.innerHTML,\n text_content: this.textContent,\n formSelector: this.formSelector,\n reflexController: this.reflexController,\n permanentAttributeName: this.permanentAttributeName,\n target: this.target,\n args: this.args,\n url: this.url,\n tabId: this.tabId,\n version: packageInfo.version\n };\n }\n}\n\nlet transport = {};\n\nvar Transport = {\n get plugin() {\n return transport;\n },\n set(newTransport) {\n transport = newTransport;\n }\n};\n\nconst beforeDOMUpdate = event => {\n const {stimulusReflex: stimulusReflex} = event.detail || {};\n if (!stimulusReflex) return;\n const reflex = reflexes[stimulusReflex.id];\n reflex.pendingOperations--;\n if (reflex.pendingOperations > 0) return;\n if (!stimulusReflex.resolveLate) setTimeout((() => reflex.promise.resolve({\n element: reflex.element,\n event: event,\n data: reflex.data,\n payload: reflex.payload,\n id: reflex.id,\n toString: () => \"\"\n })));\n setTimeout((() => dispatchLifecycleEvent(reflex, \"success\")));\n};\n\nconst afterDOMUpdate = event => {\n const {stimulusReflex: stimulusReflex} = event.detail || {};\n if (!stimulusReflex) return;\n const reflex = reflexes[stimulusReflex.id];\n reflex.completedOperations++;\n reflex.selector = event.detail.selector;\n reflex.morph = event.detail.stimulusReflex.morph;\n reflex.operation = event.type.split(\":\")[1].split(\"-\").slice(1).join(\"_\");\n Log.success(reflex);\n if (reflex.completedOperations < reflex.totalOperations) return;\n if (stimulusReflex.resolveLate) setTimeout((() => reflex.promise.resolve({\n element: reflex.element,\n event: event,\n data: reflex.data,\n payload: reflex.payload,\n id: reflex.id,\n toString: () => \"\"\n })));\n setTimeout((() => dispatchLifecycleEvent(reflex, \"finalize\")));\n if (reflex.piggybackOperations.length) CableReady.perform(reflex.piggybackOperations);\n};\n\nconst routeReflexEvent = event => {\n const {stimulusReflex: stimulusReflex, name: name} = event.detail || {};\n const eventType = name.split(\"-\")[2];\n const eventTypes = {\n nothing: nothing,\n halted: halted,\n forbidden: forbidden,\n error: error\n };\n if (!stimulusReflex || !Object.keys(eventTypes).includes(eventType)) return;\n const reflex = reflexes[stimulusReflex.id];\n reflex.completedOperations++;\n reflex.pendingOperations--;\n reflex.selector = event.detail.selector;\n reflex.morph = event.detail.stimulusReflex.morph;\n reflex.operation = event.type.split(\":\")[1].split(\"-\").slice(1).join(\"_\");\n if (eventType === \"error\") reflex.error = event.detail.error;\n eventTypes[eventType](reflex, event);\n setTimeout((() => dispatchLifecycleEvent(reflex, eventType)));\n if (reflex.piggybackOperations.length) CableReady.perform(reflex.piggybackOperations);\n};\n\nconst nothing = (reflex, event) => {\n Log.success(reflex);\n setTimeout((() => reflex.promise.resolve({\n data: reflex.data,\n element: reflex.element,\n event: event,\n payload: reflex.payload,\n id: reflex.id,\n toString: () => \"\"\n })));\n};\n\nconst halted = (reflex, event) => {\n Log.halted(reflex, event);\n setTimeout((() => reflex.promise.resolve({\n data: reflex.data,\n element: reflex.element,\n event: event,\n payload: reflex.payload,\n id: reflex.id,\n toString: () => \"\"\n })));\n};\n\nconst forbidden = (reflex, event) => {\n Log.forbidden(reflex, event);\n setTimeout((() => reflex.promise.resolve({\n data: reflex.data,\n element: reflex.element,\n event: event,\n payload: reflex.payload,\n id: reflex.id,\n toString: () => \"\"\n })));\n};\n\nconst error = (reflex, event) => {\n Log.error(reflex, event);\n setTimeout((() => reflex.promise.reject({\n data: reflex.data,\n element: reflex.element,\n event: event,\n payload: reflex.payload,\n id: reflex.id,\n error: reflex.error,\n toString: () => reflex.error\n })));\n};\n\nconst localReflexControllers = element => {\n const potentialIdentifiers = attributeValues(element.getAttribute(Schema.controller));\n const potentialControllers = potentialIdentifiers.map((identifier => App.app.getControllerForElementAndIdentifier(element, identifier)));\n return potentialControllers.filter((controller => controller && controller.StimulusReflex));\n};\n\nconst allReflexControllers = element => {\n let controllers = [];\n while (element) {\n controllers = controllers.concat(localReflexControllers(element));\n element = element.parentElement;\n }\n return controllers;\n};\n\nconst findControllerByReflexName = (reflexName, controllers) => {\n const controller = controllers.find((controller => {\n if (!controller || !controller.identifier) return;\n const identifier = reflexNameToControllerIdentifier(extractReflexName(reflexName));\n return identifier === controller.identifier;\n }));\n return controller;\n};\n\nconst scanForReflexes = debounce((() => {\n const reflexElements = document.querySelectorAll(`[${Schema.reflex}]`);\n reflexElements.forEach((element => scanForReflexesOnElement(element)));\n}), 20);\n\nconst scanForReflexesOnElement = (element, controller = null) => {\n const controllerAttribute = element.getAttribute(Schema.controller);\n const controllers = attributeValues(controllerAttribute).filter((controller => controller !== \"stimulus-reflex\"));\n const reflexAttribute = element.getAttribute(Schema.reflex);\n const reflexAttributeNames = attributeValues(reflexAttribute);\n const actionAttribute = element.getAttribute(Schema.action);\n const actions = attributeValues(actionAttribute).filter((action => !action.includes(\"#__perform\")));\n reflexAttributeNames.forEach((reflexName => {\n const potentialControllers = [ controller ].concat(allReflexControllers(element));\n controller = findControllerByReflexName(reflexName, potentialControllers);\n const controllerName = controller ? controller.identifier : \"stimulus-reflex\";\n actions.push(`${reflexName.split(\"->\")[0]}->${controllerName}#__perform`);\n const parentControllerElement = element.closest(`[data-controller~=${controllerName}]`);\n const elementPreviouslyHadStimulusReflexController = element === parentControllerElement && controllerName === \"stimulus-reflex\";\n if (!parentControllerElement || elementPreviouslyHadStimulusReflexController) {\n controllers.push(controllerName);\n }\n }));\n const controllerValue = attributeValue(controllers);\n const actionValue = attributeValue(actions);\n let emitReadyEvent = false;\n if (controllerValue && element.getAttribute(Schema.controller) != controllerValue) {\n element.setAttribute(Schema.controller, controllerValue);\n emitReadyEvent = true;\n }\n if (actionValue && element.getAttribute(Schema.action) != actionValue) {\n element.setAttribute(Schema.action, actionValue);\n emitReadyEvent = true;\n }\n if (emitReadyEvent) {\n dispatch(element, \"stimulus-reflex:ready\", {\n reflex: reflexAttribute,\n controller: controllerValue,\n action: actionValue,\n element: element\n });\n }\n};\n\nclass StimulusReflexController extends Controller {\n constructor(...args) {\n super(...args);\n register(this);\n }\n}\n\nconst tabId = uuidv4();\n\nconst initialize = (application, {controller: controller, consumer: consumer, debug: debug, params: params, isolate: isolate, deprecate: deprecate, transport: transport} = {}) => {\n Transport.set(transport || ActionCableTransport);\n Transport.plugin.initialize(consumer, params);\n IsolationMode.set(!!isolate);\n App.set(application);\n Schema.set(application);\n App.app.register(\"stimulus-reflex\", controller || StimulusReflexController);\n Debug$1.set(!!debug);\n if (typeof deprecate !== \"undefined\") Deprecate.set(deprecate);\n const observer = new MutationObserver(scanForReflexes);\n observer.observe(document.documentElement, {\n attributeFilter: [ Schema.reflex, Schema.action ],\n childList: true,\n subtree: true\n });\n emitEvent(\"stimulus-reflex:initialized\");\n};\n\nconst register = (controller, options = {}) => {\n const channel = \"StimulusReflex::Channel\";\n controller.StimulusReflex = {\n ...options,\n channel: channel\n };\n Transport.plugin.subscribe(controller);\n Object.assign(controller, {\n stimulate() {\n const url = location.href;\n const controllerElement = this.element;\n const args = Array.from(arguments);\n const target = args.shift() || \"StimulusReflex::Reflex#default_reflex\";\n const reflexElement = getReflexElement(args, controllerElement);\n if (elementInvalid(reflexElement)) {\n if (Debug$1.enabled) console.warn(\"Reflex aborted: invalid numeric input\");\n return;\n }\n const options = getReflexOptions(args);\n const reflexData = new ReflexData(options, reflexElement, controllerElement, this.identifier, Schema.reflexPermanent, target, args, url, tabId);\n const id = reflexData.id;\n controllerElement.reflexController = controllerElement.reflexController || {};\n controllerElement.reflexData = controllerElement.reflexData || {};\n controllerElement.reflexError = controllerElement.reflexError || {};\n controllerElement.reflexController[id] = this;\n controllerElement.reflexData[id] = reflexData.valueOf();\n const reflex = new Reflex(reflexData, this);\n reflexes[id] = reflex;\n this.lastReflex = reflex;\n dispatchLifecycleEvent(reflex, \"before\");\n setTimeout((() => {\n const {params: params} = controllerElement.reflexData[id] || {};\n const check = reflexElement.attributes[Schema.reflexSerializeForm];\n if (check) {\n options[\"serializeForm\"] = check.value !== \"false\";\n }\n const form = reflexElement.closest(reflexData.formSelector) || document.querySelector(reflexData.formSelector) || reflexElement.closest(\"form\");\n if (Deprecate.enabled && options[\"serializeForm\"] === undefined && form) console.warn(`Deprecation warning: the next version of StimulusReflex will not serialize forms by default.\\nPlease set ${Schema.reflexSerializeForm}=\"true\" on your Reflex Controller Element or pass { serializeForm: true } as an option to stimulate.`);\n const formData = options[\"serializeForm\"] === false ? \"\" : serializeForm(form, {\n element: reflexElement\n });\n reflex.data = {\n ...reflexData.valueOf(),\n params: params,\n formData: formData\n };\n controllerElement.reflexData[id] = reflex.data;\n Transport.plugin.deliver(reflex);\n }));\n Log.request(reflex);\n return reflex.getPromise;\n },\n __perform(event) {\n let element = event.target;\n let reflex;\n while (element && !reflex) {\n reflex = element.getAttribute(Schema.reflex);\n if (!reflex || !reflex.trim().length) element = element.parentElement;\n }\n const match = attributeValues(reflex).find((reflex => reflex.split(\"->\")[0] === event.type));\n if (match) {\n event.preventDefault();\n event.stopPropagation();\n this.stimulate(match.split(\"->\")[1], element);\n }\n }\n });\n if (!controller.reflexes) Object.defineProperty(controller, \"reflexes\", {\n get() {\n return new Proxy(reflexes, {\n get: function(target, prop) {\n if (prop === \"last\") return this.lastReflex;\n return Object.fromEntries(Object.entries(target[prop]).filter((([_, reflex]) => reflex.controller === this)));\n }.bind(this)\n });\n }\n });\n scanForReflexesOnElement(controller.element, controller);\n emitEvent(\"stimulus-reflex:controller-registered\", {\n detail: {\n controller: controller\n }\n });\n};\n\nconst useReflex = (controller, options = {}) => {\n register(controller, options);\n};\n\ndocument.addEventListener(\"cable-ready:after-dispatch-event\", routeReflexEvent);\n\ndocument.addEventListener(\"cable-ready:before-inner-html\", beforeDOMUpdate);\n\ndocument.addEventListener(\"cable-ready:before-morph\", beforeDOMUpdate);\n\ndocument.addEventListener(\"cable-ready:after-inner-html\", afterDOMUpdate);\n\ndocument.addEventListener(\"cable-ready:after-morph\", afterDOMUpdate);\n\ndocument.addEventListener(\"readystatechange\", (() => {\n if (document.readyState === \"complete\") {\n scanForReflexes();\n }\n}));\n\nvar StimulusReflex = Object.freeze({\n __proto__: null,\n StimulusReflexController: StimulusReflexController,\n initialize: initialize,\n reflexes: reflexes,\n register: register,\n scanForReflexes: scanForReflexes,\n scanForReflexesOnElement: scanForReflexesOnElement,\n useReflex: useReflex\n});\n\nconst global = {\n version: packageInfo.version,\n ...StimulusReflex,\n get debug() {\n return Debug$1.value;\n },\n set debug(value) {\n Debug$1.set(!!value);\n },\n get deprecate() {\n return Deprecate.value;\n },\n set deprecate(value) {\n Deprecate.set(!!value);\n }\n};\n\nwindow.StimulusReflex = global;\n\nexport { StimulusReflexController, global as default, initialize, reflexes, register, scanForReflexes, scanForReflexesOnElement, useReflex };\n"],"names":["adapters","logger","messages","now","secondsSince","time","ConnectionMonitor","connection","staleThreshold","reconnectionBackoffRate","backoff","jitter","INTERNAL","message_types","protocols","supportedProtocols","indexOf","Connection","consumer","data","socketProtocols","allowReconnect","error","states","state","eventName","handler","event","identifier","message","reason","reconnect","type","extend","object","properties","key","value","Subscription","params","mixin","action","SubscriptionGuarantor","subscriptions","subscription","s","Subscriptions","channelName","channel","callbackName","args","command","Consumer","url","createWebSocketURL","subprotocol","a","createConsumer","getConfig","name","element","Toastify","options","__publicField","divElement","property","avatarElement","closeElement","width","x","y","xOffset","yOffset","toastElement","topLeftOffsetSize","topRightOffsetSize","offsetSize","allToasts","classUsed","i","height","offset","axis","StartToastifyInstance","CableReady","operation","levels","defaults","setupToastify","id","styles","deprecationWarnings","Deprecate","debugging","Debug$1","defaultSchema","schema","Schema","application","attribute","attributeName","debounce","dispatch","xpathToElement","xpathToElementArray","Utils","uuidv4","crypto","c","serializeForm","form","w","formData","e","submitButton","camelize","uppercaseFirstLetter","$1","XPathToElement","XPathToArray","emitEvent","detail","extractReflexName","reflexString","match","elementToXPath","ix","siblings","sibling","computedPath","tagName","ixInc","elementInvalid","getReflexElement","getReflexOptions","opts","o","getReflexRoots","list","reflexRoot","selectors","reflexNameToControllerIdentifier","reflexName","stages","lastReflex","reflexes","target","prop","_","reflex","invokeLifecycleMethod","stage","specificLifecycleMethod","genericLifecycleMethod","dispatchLifecycleEvent","app","App","isolationMode","IsolationMode","Reflex","controller","promise","resolve","reject","received","mismatch","reflexOperations","reflexData","payload","controllerElement","reflexElement","active","initialize$1","consumerValue","paramsValue","connectionStatusClass","subscribe","request","connected","rejected","disconnected","willAttemptReconnect","deliver","ActionCableTransport","success","output","progress","duration","halted$1","forbidden$1","error$1","Log","multipleInstances","collectCheckedOptions","elem","attributeValue","values","v","attributeValues","extractElementAttributes","attrs","memo","attr","collectedOptions","getElementsFromTokens","tokens","elements","xPath","token","extractElementDataset","dataset","allDataset","allTokens","datasetElements","datasetAllElements","datasetAttributes","acc","ele","extractDataAttributes","elementDataset","elementAttributes","version","description","keywords","homepage","bugs","repository","license","author","contributors","main","module","browser","unpkg","umd","files","scripts","peerDependencies","dependencies","devDependencies","packageInfo","ReflexData","reflexController","permanentAttributeName","tabId","transport","Transport","newTransport","beforeDOMUpdate","stimulusReflex","afterDOMUpdate","routeReflexEvent","eventType","eventTypes","nothing","halted","forbidden","localReflexControllers","allReflexControllers","controllers","findControllerByReflexName","scanForReflexes","scanForReflexesOnElement","controllerAttribute","reflexAttribute","reflexAttributeNames","actionAttribute","actions","potentialControllers","controllerName","parentControllerElement","controllerValue","actionValue","emitReadyEvent","StimulusReflexController","Controller","register","initialize","debug","isolate","deprecate","check","useReflex","StimulusReflex","global"],"mappings":"2QAAA,IAAIA,EAAW,CACb,OAAQ,KAAK,QACb,UAAW,KAAK,SAClB,EAEIC,EAAS,CACX,OAAOC,EAAU,CACX,KAAK,UACPA,EAAS,KAAK,KAAK,KAAK,EACxBF,EAAS,OAAO,IAAI,gBAAiB,GAAGE,CAAQ,EAEtD,CACA,EAEA,MAAMC,EAAM,IAAO,IAAI,OAAM,QAAS,EAEhCC,EAAeC,IAASF,EAAK,EAAGE,GAAQ,IAE9C,MAAMC,CAAkB,CACtB,YAAYC,EAAY,CACtB,KAAK,oBAAsB,KAAK,oBAAoB,KAAK,IAAI,EAC7D,KAAK,WAAaA,EAClB,KAAK,kBAAoB,CAC7B,CACE,OAAQ,CACD,KAAK,cACR,KAAK,UAAYJ,EAAK,EACtB,OAAO,KAAK,UACZ,KAAK,aAAc,EACnB,iBAAiB,mBAAoB,KAAK,mBAAmB,EAC7DF,EAAO,IAAI,gDAAgD,KAAK,YAAY,cAAc,IAAI,EAEpG,CACE,MAAO,CACD,KAAK,cACP,KAAK,UAAYE,EAAK,EACtB,KAAK,YAAa,EAClB,oBAAoB,mBAAoB,KAAK,mBAAmB,EAChEF,EAAO,IAAI,2BAA2B,EAE5C,CACE,WAAY,CACV,OAAO,KAAK,WAAa,CAAC,KAAK,SACnC,CACE,YAAa,CACX,KAAK,SAAWE,EAAK,CACzB,CACE,eAAgB,CACd,KAAK,kBAAoB,EACzB,KAAK,WAAY,EACjB,OAAO,KAAK,eACZF,EAAO,IAAI,oCAAoC,CACnD,CACE,kBAAmB,CACjB,K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