{"version":3,"file":"index-1fa76687.js","sources":["../../../node_modules/@rails/ujs/app/assets/javascripts/rails-ujs.esm.js","../../../node_modules/ahoy.js/dist/ahoy.esm.js","../../../app/frontend/entrypoints/index.ts"],"sourcesContent":["/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/javascript\nReleased under the MIT license\n */\nconst linkClickSelector = \"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]\";\n\nconst buttonClickSelector = {\n  selector: \"button[data-remote]:not([form]), button[data-confirm]:not([form])\",\n  exclude: \"form button\"\n};\n\nconst inputChangeSelector = \"select[data-remote], input[data-remote], textarea[data-remote]\";\n\nconst formSubmitSelector = \"form:not([data-turbo=true])\";\n\nconst formInputClickSelector = \"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])\";\n\nconst formDisableSelector = \"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled\";\n\nconst formEnableSelector = \"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled\";\n\nconst fileInputSelector = \"input[name][type=file]:not([disabled])\";\n\nconst linkDisableSelector = \"a[data-disable-with], a[data-disable]\";\n\nconst buttonDisableSelector = \"button[data-remote][data-disable-with], button[data-remote][data-disable]\";\n\nlet nonce = null;\n\nconst loadCSPNonce = () => {\n  const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n  return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n  if (selector.exclude) {\n    return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n  } else {\n    return m.call(element, selector);\n  }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n  if (!element[EXPANDO]) {\n    element[EXPANDO] = {};\n  }\n  return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n  var isEditable = false;\n  do {\n    if (element.isContentEditable) {\n      isEditable = true;\n      break;\n    }\n    element = element.parentElement;\n  } while (element);\n  return isEditable;\n};\n\nconst csrfToken = () => {\n  const meta = document.querySelector(\"meta[name=csrf-token]\");\n  return meta && meta.content;\n};\n\nconst csrfParam = () => {\n  const meta = document.querySelector(\"meta[name=csrf-param]\");\n  return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n  const token = csrfToken();\n  if (token) {\n    return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n  }\n};\n\nconst refreshCSRFTokens = () => {\n  const token = csrfToken();\n  const param = csrfParam();\n  if (token && param) {\n    return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n  }\n};\n\nconst AcceptHeaders = {\n  \"*\": \"*/*\",\n  text: \"text/plain\",\n  html: \"text/html\",\n  xml: \"application/xml, text/xml\",\n  json: \"application/json, text/javascript\",\n  script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n};\n\nconst ajax = options => {\n  options = prepareOptions(options);\n  var xhr = createXHR(options, (function() {\n    const response = processResponse(xhr.response != null ? xhr.response : xhr.responseText, xhr.getResponseHeader(\"Content-Type\"));\n    if (Math.floor(xhr.status / 100) === 2) {\n      if (typeof options.success === \"function\") {\n        options.success(response, xhr.statusText, xhr);\n      }\n    } else {\n      if (typeof options.error === \"function\") {\n        options.error(response, xhr.statusText, xhr);\n      }\n    }\n    return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : undefined;\n  }));\n  if (options.beforeSend && !options.beforeSend(xhr, options)) {\n    return false;\n  }\n  if (xhr.readyState === XMLHttpRequest.OPENED) {\n    return xhr.send(options.data);\n  }\n};\n\nvar prepareOptions = function(options) {\n  options.url = options.url || location.href;\n  options.type = options.type.toUpperCase();\n  if (options.type === \"GET\" && options.data) {\n    if (options.url.indexOf(\"?\") < 0) {\n      options.url += \"?\" + options.data;\n    } else {\n      options.url += \"&\" + options.data;\n    }\n  }\n  if (!(options.dataType in AcceptHeaders)) {\n    options.dataType = \"*\";\n  }\n  options.accept = AcceptHeaders[options.dataType];\n  if (options.dataType !== \"*\") {\n    options.accept += \", */*; q=0.01\";\n  }\n  return options;\n};\n\nvar createXHR = function(options, done) {\n  const xhr = new XMLHttpRequest;\n  xhr.open(options.type, options.url, true);\n  xhr.setRequestHeader(\"Accept\", options.accept);\n  if (typeof options.data === \"string\") {\n    xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n  }\n  if (!options.crossDomain) {\n    xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n    CSRFProtection(xhr);\n  }\n  xhr.withCredentials = !!options.withCredentials;\n  xhr.onreadystatechange = function() {\n    if (xhr.readyState === XMLHttpRequest.DONE) {\n      return done(xhr);\n    }\n  };\n  return xhr;\n};\n\nvar processResponse = function(response, type) {\n  if (typeof response === \"string\" && typeof type === \"string\") {\n    if (type.match(/\\bjson\\b/)) {\n      try {\n        response = JSON.parse(response);\n      } catch (error) {}\n    } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n      const script = document.createElement(\"script\");\n      script.setAttribute(\"nonce\", cspNonce());\n      script.text = response;\n      document.head.appendChild(script).parentNode.removeChild(script);\n    } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n      const parser = new DOMParser;\n      type = type.replace(/;.+/, \"\");\n      try {\n        response = parser.parseFromString(response, type);\n      } catch (error1) {}\n    }\n  }\n  return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n  const originAnchor = document.createElement(\"a\");\n  originAnchor.href = location.href;\n  const urlAnchor = document.createElement(\"a\");\n  try {\n    urlAnchor.href = url;\n    return !((!urlAnchor.protocol || urlAnchor.protocol === \":\") && !urlAnchor.host || originAnchor.protocol + \"//\" + originAnchor.host === urlAnchor.protocol + \"//\" + urlAnchor.host);\n  } catch (e) {\n    return true;\n  }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n  CustomEvent = function(event, params) {\n    const evt = document.createEvent(\"CustomEvent\");\n    evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n    return evt;\n  };\n  CustomEvent.prototype = window.Event.prototype;\n  ({preventDefault: preventDefault} = CustomEvent.prototype);\n  CustomEvent.prototype.preventDefault = function() {\n    const result = preventDefault.call(this);\n    if (this.cancelable && !this.defaultPrevented) {\n      Object.defineProperty(this, \"defaultPrevented\", {\n        get() {\n          return true;\n        }\n      });\n    }\n    return result;\n  };\n}\n\nconst fire = (obj, name, data) => {\n  const event = new CustomEvent(name, {\n    bubbles: true,\n    cancelable: true,\n    detail: data\n  });\n  obj.dispatchEvent(event);\n  return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n  fire(e.target, \"ujs:everythingStopped\");\n  e.preventDefault();\n  e.stopPropagation();\n  e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n  let {target: target} = e;\n  while (!!(target instanceof Element) && !matches(target, selector)) {\n    target = target.parentNode;\n  }\n  if (target instanceof Element && handler.call(target, e) === false) {\n    e.preventDefault();\n    e.stopPropagation();\n  }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n  let inputs = [ element ];\n  if (matches(element, \"form\")) {\n    inputs = toArray(element.elements);\n  }\n  const params = [];\n  inputs.forEach((function(input) {\n    if (!input.name || input.disabled) {\n      return;\n    }\n    if (matches(input, \"fieldset[disabled] *\")) {\n      return;\n    }\n    if (matches(input, \"select\")) {\n      toArray(input.options).forEach((function(option) {\n        if (option.selected) {\n          params.push({\n            name: input.name,\n            value: option.value\n          });\n        }\n      }));\n    } else if (input.checked || [ \"radio\", \"checkbox\", \"submit\" ].indexOf(input.type) === -1) {\n      params.push({\n        name: input.name,\n        value: input.value\n      });\n    }\n  }));\n  if (additionalParam) {\n    params.push(additionalParam);\n  }\n  return params.map((function(param) {\n    if (param.name) {\n      return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n    } else {\n      return param;\n    }\n  })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n  if (matches(form, \"form\")) {\n    return toArray(form.elements).filter((el => matches(el, selector)));\n  } else {\n    return toArray(form.querySelectorAll(selector));\n  }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n  if (!allowAction(this, rails)) {\n    stopEverything(e);\n  }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n  let callback;\n  const message = element.getAttribute(\"data-confirm\");\n  if (!message) {\n    return true;\n  }\n  let answer = false;\n  if (fire(element, \"confirm\")) {\n    try {\n      answer = rails.confirm(message, element);\n    } catch (error) {}\n    callback = fire(element, \"confirm:complete\", [ answer ]);\n  }\n  return answer && callback;\n};\n\nconst handleDisabledElement = function(e) {\n  const element = this;\n  if (element.disabled) {\n    stopEverything(e);\n  }\n};\n\nconst enableElement = e => {\n  let element;\n  if (e instanceof Event) {\n    if (isXhrRedirect(e)) {\n      return;\n    }\n    element = e.target;\n  } else {\n    element = e;\n  }\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return enableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n    return enableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return enableFormElements(element);\n  }\n};\n\nconst disableElement = e => {\n  const element = e instanceof Event ? e.target : e;\n  if (isContentEditable(element)) {\n    return;\n  }\n  if (matches(element, linkDisableSelector)) {\n    return disableLinkElement(element);\n  } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n    return disableFormElement(element);\n  } else if (matches(element, formSubmitSelector)) {\n    return disableFormElements(element);\n  }\n};\n\nvar disableLinkElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    setData(element, \"ujs:enable-with\", element.innerHTML);\n    element.innerHTML = replacement;\n  }\n  element.addEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableLinkElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    element.innerHTML = originalText;\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.removeEventListener(\"click\", stopEverything);\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n  if (getData(element, \"ujs:disabled\")) {\n    return;\n  }\n  const replacement = element.getAttribute(\"data-disable-with\");\n  if (replacement != null) {\n    if (matches(element, \"button\")) {\n      setData(element, \"ujs:enable-with\", element.innerHTML);\n      element.innerHTML = replacement;\n    } else {\n      setData(element, \"ujs:enable-with\", element.value);\n      element.value = replacement;\n    }\n  }\n  element.disabled = true;\n  return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n  const originalText = getData(element, \"ujs:enable-with\");\n  if (originalText != null) {\n    if (matches(element, \"button\")) {\n      element.innerHTML = originalText;\n    } else {\n      element.value = originalText;\n    }\n    setData(element, \"ujs:enable-with\", null);\n  }\n  element.disabled = false;\n  return setData(element, \"ujs:disabled\", null);\n};\n\nvar isXhrRedirect = function(event) {\n  const xhr = event.detail ? event.detail[0] : undefined;\n  return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n  const link = this;\n  const method = link.getAttribute(\"data-method\");\n  if (!method) {\n    return;\n  }\n  if (isContentEditable(this)) {\n    return;\n  }\n  const href = rails.href(link);\n  const csrfToken$1 = csrfToken();\n  const csrfParam$1 = csrfParam();\n  const form = document.createElement(\"form\");\n  let formContent = `<input name='_method' value='${method}' type='hidden' />`;\n  if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n    formContent += `<input name='${csrfParam$1}' value='${csrfToken$1}' type='hidden' />`;\n  }\n  formContent += '<input type=\"submit\" />';\n  form.method = \"post\";\n  form.action = href;\n  form.target = link.target;\n  form.innerHTML = formContent;\n  form.style.display = \"none\";\n  document.body.appendChild(form);\n  form.querySelector('[type=\"submit\"]').click();\n  stopEverything(e);\n};\n\nconst isRemote = function(element) {\n  const value = element.getAttribute(\"data-remote\");\n  return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n  let data, method, url;\n  const element = this;\n  if (!isRemote(element)) {\n    return true;\n  }\n  if (!fire(element, \"ajax:before\")) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  if (isContentEditable(element)) {\n    fire(element, \"ajax:stopped\");\n    return false;\n  }\n  const withCredentials = element.getAttribute(\"data-with-credentials\");\n  const dataType = element.getAttribute(\"data-type\") || \"script\";\n  if (matches(element, formSubmitSelector)) {\n    const button = getData(element, \"ujs:submit-button\");\n    method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\n    url = getData(element, \"ujs:submit-button-formaction\") || element.getAttribute(\"action\") || location.href;\n    if (method.toUpperCase() === \"GET\") {\n      url = url.replace(/\\?.*$/, \"\");\n    }\n    if (element.enctype === \"multipart/form-data\") {\n      data = new FormData(element);\n      if (button != null) {\n        data.append(button.name, button.value);\n      }\n    } else {\n      data = serializeElement(element, button);\n    }\n    setData(element, \"ujs:submit-button\", null);\n    setData(element, \"ujs:submit-button-formmethod\", null);\n    setData(element, \"ujs:submit-button-formaction\", null);\n  } else if (matches(element, buttonClickSelector) || matches(element, inputChangeSelector)) {\n    method = element.getAttribute(\"data-method\");\n    url = element.getAttribute(\"data-url\");\n    data = serializeElement(element, element.getAttribute(\"data-params\"));\n  } else {\n    method = element.getAttribute(\"data-method\");\n    url = rails.href(element);\n    data = element.getAttribute(\"data-params\");\n  }\n  ajax({\n    type: method || \"GET\",\n    url: url,\n    data: data,\n    dataType: dataType,\n    beforeSend(xhr, options) {\n      if (fire(element, \"ajax:beforeSend\", [ xhr, options ])) {\n        return fire(element, \"ajax:send\", [ xhr ]);\n      } else {\n        fire(element, \"ajax:stopped\");\n        return false;\n      }\n    },\n    success(...args) {\n      return fire(element, \"ajax:success\", args);\n    },\n    error(...args) {\n      return fire(element, \"ajax:error\", args);\n    },\n    complete(...args) {\n      return fire(element, \"ajax:complete\", args);\n    },\n    crossDomain: isCrossDomain(url),\n    withCredentials: withCredentials != null && withCredentials !== \"false\"\n  });\n  stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n  const button = this;\n  const {form: form} = button;\n  if (!form) {\n    return;\n  }\n  if (button.name) {\n    setData(form, \"ujs:submit-button\", {\n      name: button.name,\n      value: button.value\n    });\n  }\n  setData(form, \"ujs:formnovalidate-button\", button.formNoValidate);\n  setData(form, \"ujs:submit-button-formaction\", button.getAttribute(\"formaction\"));\n  return setData(form, \"ujs:submit-button-formmethod\", button.getAttribute(\"formmethod\"));\n};\n\nconst preventInsignificantClick = function(e) {\n  const link = this;\n  const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n  const data = link.getAttribute(\"data-params\");\n  const metaClick = e.metaKey || e.ctrlKey;\n  const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n  const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n  if (nonPrimaryMouseClick || insignificantMetaClick) {\n    e.stopImmediatePropagation();\n  }\n};\n\nconst Rails = {\n  $: $,\n  ajax: ajax,\n  buttonClickSelector: buttonClickSelector,\n  buttonDisableSelector: buttonDisableSelector,\n  confirm: confirm,\n  cspNonce: cspNonce,\n  csrfToken: csrfToken,\n  csrfParam: csrfParam,\n  CSRFProtection: CSRFProtection,\n  delegate: delegate,\n  disableElement: disableElement,\n  enableElement: enableElement,\n  fileInputSelector: fileInputSelector,\n  fire: fire,\n  formElements: formElements,\n  formEnableSelector: formEnableSelector,\n  formDisableSelector: formDisableSelector,\n  formInputClickSelector: formInputClickSelector,\n  formSubmitButtonClick: formSubmitButtonClick,\n  formSubmitSelector: formSubmitSelector,\n  getData: getData,\n  handleDisabledElement: handleDisabledElement,\n  href: href,\n  inputChangeSelector: inputChangeSelector,\n  isCrossDomain: isCrossDomain,\n  linkClickSelector: linkClickSelector,\n  linkDisableSelector: linkDisableSelector,\n  loadCSPNonce: loadCSPNonce,\n  matches: matches,\n  preventInsignificantClick: preventInsignificantClick,\n  refreshCSRFTokens: refreshCSRFTokens,\n  serializeElement: serializeElement,\n  setData: setData,\n  stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n  if (window._rails_loaded) {\n    throw new Error(\"rails-ujs has already been loaded!\");\n  }\n  window.addEventListener(\"pageshow\", (function() {\n    $(formEnableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n    $(linkDisableSelector).forEach((function(el) {\n      if (getData(el, \"ujs:disabled\")) {\n        enableElement(el);\n      }\n    }));\n  }));\n  delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n  delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n  delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n  delegate(document, linkClickSelector, \"click\", handleConfirm);\n  delegate(document, linkClickSelector, \"click\", disableElement);\n  delegate(document, linkClickSelector, \"click\", handleRemote);\n  delegate(document, linkClickSelector, \"click\", handleMethod);\n  delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n  delegate(document, buttonClickSelector, \"click\", handleConfirm);\n  delegate(document, buttonClickSelector, \"click\", disableElement);\n  delegate(document, buttonClickSelector, \"click\", handleRemote);\n  delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n  delegate(document, inputChangeSelector, \"change\", handleConfirm);\n  delegate(document, inputChangeSelector, \"change\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n  delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n  delegate(document, formSubmitSelector, \"submit\", handleRemote);\n  delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n  delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n  delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n  delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n  delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n  delegate(document, formInputClickSelector, \"click\", handleConfirm);\n  delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n  document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n  document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n  return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\n  if (jQuery.rails) {\n    throw new Error(\"If you load both jquery_ujs and rails-ujs, use rails-ujs only.\");\n  }\n  jQuery.rails = Rails;\n  jQuery.ajaxPrefilter((function(options, originalOptions, xhr) {\n    if (!options.crossDomain) {\n      return CSRFProtection(xhr);\n    }\n  }));\n}\n\nexport { Rails as default };\n","/*!\n * Ahoy.js v0.4.3\n * Simple, powerful JavaScript analytics\n * https://github.com/ankane/ahoy.js\n * MIT License\n */\n\n// https://www.quirksmode.org/js/cookies.html\n\nvar Cookies = {\n  set: function (name, value, ttl, domain) {\n    var expires = \"\";\n    var cookieDomain = \"\";\n    if (ttl) {\n      var date = new Date();\n      date.setTime(date.getTime() + (ttl * 60 * 1000));\n      expires = \"; expires=\" + date.toGMTString();\n    }\n    if (domain) {\n      cookieDomain = \"; domain=\" + domain;\n    }\n    document.cookie = name + \"=\" + escape(value) + expires + cookieDomain + \"; path=/; samesite=lax\";\n  },\n  get: function (name) {\n    var i, c;\n    var nameEQ = name + \"=\";\n    var ca = document.cookie.split(';');\n    for (i = 0; i < ca.length; i++) {\n      c = ca[i];\n      while (c.charAt(0) === ' ') {\n        c = c.substring(1, c.length);\n      }\n      if (c.indexOf(nameEQ) === 0) {\n        return unescape(c.substring(nameEQ.length, c.length));\n      }\n    }\n    return null;\n  }\n};\n\nvar config = {\n  urlPrefix: \"\",\n  visitsUrl: \"/ahoy/visits\",\n  eventsUrl: \"/ahoy/events\",\n  page: null,\n  platform: \"Web\",\n  useBeacon: true,\n  startOnReady: true,\n  trackVisits: true,\n  cookies: true,\n  cookieDomain: null,\n  headers: {},\n  visitParams: {},\n  withCredentials: false,\n  visitDuration: 4 * 60, // default 4 hours\n  visitorDuration: 2 * 365 * 24 * 60 // default 2 years\n};\n\nvar ahoy = window.ahoy || window.Ahoy || {};\n\nahoy.configure = function (options) {\n  for (var key in options) {\n    if (Object.prototype.hasOwnProperty.call(options, key)) {\n      config[key] = options[key];\n    }\n  }\n};\n\n// legacy\nahoy.configure(ahoy);\n\nvar $ = window.jQuery || window.Zepto || window.$;\nvar visitId, visitorId, track;\nvar isReady = false;\nvar queue = [];\nvar canStringify = typeof(JSON) !== \"undefined\" && typeof(JSON.stringify) !== \"undefined\";\nvar eventQueue = [];\n\nfunction visitsUrl() {\n  return config.urlPrefix + config.visitsUrl;\n}\n\nfunction eventsUrl() {\n  return config.urlPrefix + config.eventsUrl;\n}\n\nfunction isEmpty(obj) {\n  return Object.keys(obj).length === 0;\n}\n\nfunction canTrackNow() {\n  return (config.useBeacon || config.trackNow) && isEmpty(config.headers) && canStringify && typeof(window.navigator.sendBeacon) !== \"undefined\" && !config.withCredentials;\n}\n\nfunction serialize(object) {\n  var data = new FormData();\n  for (var key in object) {\n    if (Object.prototype.hasOwnProperty.call(object, key)) {\n      data.append(key, object[key]);\n    }\n  }\n  return data;\n}\n\n// cookies\n\nfunction setCookie(name, value, ttl) {\n  Cookies.set(name, value, ttl, config.cookieDomain || config.domain);\n}\n\nfunction getCookie(name) {\n  return Cookies.get(name);\n}\n\nfunction destroyCookie(name) {\n  Cookies.set(name, \"\", -1);\n}\n\nfunction log(message) {\n  if (getCookie(\"ahoy_debug\")) {\n    window.console.log(message);\n  }\n}\n\nfunction setReady() {\n  var callback;\n  while ((callback = queue.shift())) {\n    callback();\n  }\n  isReady = true;\n}\n\nahoy.ready = function (callback) {\n  if (isReady) {\n    callback();\n  } else {\n    queue.push(callback);\n  }\n};\n\nfunction matchesSelector(element, selector) {\n  var matches = element.matches ||\n    element.matchesSelector ||\n    element.mozMatchesSelector ||\n    element.msMatchesSelector ||\n    element.oMatchesSelector ||\n    element.webkitMatchesSelector;\n\n  if (matches) {\n    if (matches.apply(element, [selector])) {\n      return element;\n    } else if (element.parentElement) {\n      return matchesSelector(element.parentElement, selector);\n    }\n    return null;\n  } else {\n    log(\"Unable to match\");\n    return null;\n  }\n}\n\nfunction onEvent(eventName, selector, callback) {\n  document.addEventListener(eventName, function (e) {\n    var matchedElement = matchesSelector(e.target, selector);\n    if (matchedElement) {\n      var skip = getClosest(matchedElement, \"data-ahoy-skip\");\n      if (skip !== null && skip !== \"false\") { return; }\n\n      callback.call(matchedElement, e);\n    }\n  });\n}\n\n// http://beeker.io/jquery-document-ready-equivalent-vanilla-javascript\nfunction documentReady(callback) {\n  if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n    setTimeout(callback, 0);\n  } else {\n    document.addEventListener(\"DOMContentLoaded\", callback);\n  }\n}\n\n// https://stackoverflow.com/a/2117523/1177228\nfunction generateId() {\n  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n    var r = Math.random() * 16 | 0;\n    var v = c === 'x' ? r : (r & 0x3 | 0x8);\n    return v.toString(16);\n  });\n}\n\nfunction saveEventQueue() {\n  if (config.cookies && canStringify) {\n    setCookie(\"ahoy_events\", JSON.stringify(eventQueue), 1);\n  }\n}\n\n// from rails-ujs\n\nfunction csrfToken() {\n  var meta = document.querySelector(\"meta[name=csrf-token]\");\n  return meta && meta.content;\n}\n\nfunction csrfParam() {\n  var meta = document.querySelector(\"meta[name=csrf-param]\");\n  return meta && meta.content;\n}\n\nfunction CSRFProtection(xhr) {\n  var token = csrfToken();\n  if (token) { xhr.setRequestHeader(\"X-CSRF-Token\", token); }\n}\n\nfunction sendRequest(url, data, success) {\n  if (canStringify) {\n    if ($ && $.ajax) {\n      $.ajax({\n        type: \"POST\",\n        url: url,\n        data: JSON.stringify(data),\n        contentType: \"application/json; charset=utf-8\",\n        dataType: \"json\",\n        beforeSend: CSRFProtection,\n        success: success,\n        headers: config.headers,\n        xhrFields: {\n          withCredentials: config.withCredentials\n        }\n      });\n    } else {\n      var xhr = new XMLHttpRequest();\n      xhr.open(\"POST\", url, true);\n      xhr.withCredentials = config.withCredentials;\n      xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n      for (var header in config.headers) {\n        if (Object.prototype.hasOwnProperty.call(config.headers, header)) {\n          xhr.setRequestHeader(header, config.headers[header]);\n        }\n      }\n      xhr.onload = function () {\n        if (xhr.status === 200) {\n          success();\n        }\n      };\n      CSRFProtection(xhr);\n      xhr.send(JSON.stringify(data));\n    }\n  }\n}\n\nfunction eventData(event) {\n  var data = {\n    events: [event]\n  };\n  if (config.cookies) {\n    data.visit_token = event.visit_token;\n    data.visitor_token = event.visitor_token;\n  }\n  delete event.visit_token;\n  delete event.visitor_token;\n  return data;\n}\n\nfunction trackEvent(event) {\n  ahoy.ready(function () {\n    sendRequest(eventsUrl(), eventData(event), function () {\n      // remove from queue\n      for (var i = 0; i < eventQueue.length; i++) {\n        if (eventQueue[i].id === event.id) {\n          eventQueue.splice(i, 1);\n          break;\n        }\n      }\n      saveEventQueue();\n    });\n  });\n}\n\nfunction trackEventNow(event) {\n  ahoy.ready(function () {\n    var data = eventData(event);\n    var param = csrfParam();\n    var token = csrfToken();\n    if (param && token) { data[param] = token; }\n    // stringify so we keep the type\n    data.events_json = JSON.stringify(data.events);\n    delete data.events;\n    window.navigator.sendBeacon(eventsUrl(), serialize(data));\n  });\n}\n\nfunction page() {\n  return config.page || window.location.pathname;\n}\n\nfunction presence(str) {\n  return (str && str.length > 0) ? str : null;\n}\n\nfunction cleanObject(obj) {\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) {\n      if (obj[key] === null) {\n        delete obj[key];\n      }\n    }\n  }\n  return obj;\n}\n\nfunction eventProperties() {\n  return cleanObject({\n    tag: this.tagName.toLowerCase(),\n    id: presence(this.id),\n    \"class\": presence(this.className),\n    page: page(),\n    section: getClosest(this, \"data-section\")\n  });\n}\n\nfunction getClosest(element, attribute) {\n  for (; element && element !== document; element = element.parentNode) {\n    if (element.hasAttribute(attribute)) {\n      return element.getAttribute(attribute);\n    }\n  }\n\n  return null;\n}\n\nfunction createVisit() {\n  isReady = false;\n\n  visitId = ahoy.getVisitId();\n  visitorId = ahoy.getVisitorId();\n  track = getCookie(\"ahoy_track\");\n\n  if (config.cookies === false || config.trackVisits === false) {\n    log(\"Visit tracking disabled\");\n    setReady();\n  } else if (visitId && visitorId && !track) {\n    // TODO keep visit alive?\n    log(\"Active visit\");\n    setReady();\n  } else {\n    if (!visitId) {\n      visitId = generateId();\n      setCookie(\"ahoy_visit\", visitId, config.visitDuration);\n    }\n\n    // make sure cookies are enabled\n    if (getCookie(\"ahoy_visit\")) {\n      log(\"Visit started\");\n\n      if (!visitorId) {\n        visitorId = generateId();\n        setCookie(\"ahoy_visitor\", visitorId, config.visitorDuration);\n      }\n\n      var data = {\n        visit_token: visitId,\n        visitor_token: visitorId,\n        platform: config.platform,\n        landing_page: window.location.href,\n        screen_width: window.screen.width,\n        screen_height: window.screen.height,\n        js: true\n      };\n\n      // referrer\n      if (document.referrer.length > 0) {\n        data.referrer = document.referrer;\n      }\n\n      for (var key in config.visitParams) {\n        if (Object.prototype.hasOwnProperty.call(config.visitParams, key)) {\n          data[key] = config.visitParams[key];\n        }\n      }\n\n      log(data);\n\n      sendRequest(visitsUrl(), data, function () {\n        // wait until successful to destroy\n        destroyCookie(\"ahoy_track\");\n        setReady();\n      });\n    } else {\n      log(\"Cookies disabled\");\n      setReady();\n    }\n  }\n}\n\nahoy.getVisitId = ahoy.getVisitToken = function () {\n  return getCookie(\"ahoy_visit\");\n};\n\nahoy.getVisitorId = ahoy.getVisitorToken = function () {\n  return getCookie(\"ahoy_visitor\");\n};\n\nahoy.reset = function () {\n  destroyCookie(\"ahoy_visit\");\n  destroyCookie(\"ahoy_visitor\");\n  destroyCookie(\"ahoy_events\");\n  destroyCookie(\"ahoy_track\");\n  return true;\n};\n\nahoy.debug = function (enabled) {\n  if (enabled === false) {\n    destroyCookie(\"ahoy_debug\");\n  } else {\n    setCookie(\"ahoy_debug\", \"t\", 365 * 24 * 60); // 1 year\n  }\n  return true;\n};\n\nahoy.track = function (name, properties) {\n  // generate unique id\n  var event = {\n    name: name,\n    properties: properties || {},\n    time: (new Date()).getTime() / 1000.0,\n    id: generateId(),\n    js: true\n  };\n\n  ahoy.ready(function () {\n    if (config.cookies && !ahoy.getVisitId()) {\n      createVisit();\n    }\n\n    ahoy.ready(function () {\n      log(event);\n\n      event.visit_token = ahoy.getVisitId();\n      event.visitor_token = ahoy.getVisitorId();\n\n      if (canTrackNow()) {\n        trackEventNow(event);\n      } else {\n        eventQueue.push(event);\n        saveEventQueue();\n\n        // wait in case navigating to reduce duplicate events\n        setTimeout(function () {\n          trackEvent(event);\n        }, 1000);\n      }\n    });\n  });\n\n  return true;\n};\n\nahoy.trackView = function (additionalProperties) {\n  var properties = {\n    url: window.location.href,\n    title: document.title,\n    page: page()\n  };\n\n  if (additionalProperties) {\n    for (var propName in additionalProperties) {\n      if (Object.prototype.hasOwnProperty.call(additionalProperties, propName)) {\n        properties[propName] = additionalProperties[propName];\n      }\n    }\n  }\n  ahoy.track(\"$view\", properties);\n};\n\nahoy.trackClicks = function (selector) {\n  if (selector === undefined) {\n    throw new Error(\"Missing selector\");\n  }\n  onEvent(\"click\", selector, function (e) {\n    var properties = eventProperties.call(this, e);\n    properties.text = properties.tag === \"input\" ? this.value : (this.textContent || this.innerText || this.innerHTML).replace(/[\\s\\r\\n]+/g, \" \").trim();\n    properties.href = this.href;\n    ahoy.track(\"$click\", properties);\n  });\n};\n\nahoy.trackSubmits = function (selector) {\n  if (selector === undefined) {\n    throw new Error(\"Missing selector\");\n  }\n  onEvent(\"submit\", selector, function (e) {\n    var properties = eventProperties.call(this, e);\n    ahoy.track(\"$submit\", properties);\n  });\n};\n\nahoy.trackChanges = function (selector) {\n  log(\"trackChanges is deprecated and will be removed in 0.5.0\");\n  if (selector === undefined) {\n    throw new Error(\"Missing selector\");\n  }\n  onEvent(\"change\", selector, function (e) {\n    var properties = eventProperties.call(this, e);\n    ahoy.track(\"$change\", properties);\n  });\n};\n\n// push events from queue\ntry {\n  eventQueue = JSON.parse(getCookie(\"ahoy_events\") || \"[]\");\n} catch (e) {\n  // do nothing\n}\n\nfor (var i = 0; i < eventQueue.length; i++) {\n  trackEvent(eventQueue[i]);\n}\n\nahoy.start = function () {\n  createVisit();\n\n  ahoy.start = function () {};\n};\n\ndocumentReady(function () {\n  if (config.startOnReady) {\n    ahoy.start();\n  }\n});\n\nexport { ahoy as default };\n","import Rails from \"@rails/ujs\";\nimport jquery from \"jquery\";\n\nimport \"selectize\";\nimport \"selectize/dist/css/selectize.css\";\n\nimport ahoy from \"ahoy.js\";\n\ndeclare global {\n  interface Window {\n    _rails_loaded: boolean;\n    Rails: typeof Rails;\n    $: typeof jquery;\n    jQuery: typeof jquery;\n  }\n}\n\nwindow.jQuery = jquery;\nwindow.$ = jquery;\n// @ts-ignore\nwindow.ahoy = ahoy;\nahoy.configure({ cookies: false });\n\nif (!window._rails_loaded) {\n  Rails.start();\n}\n\n$(() => {\n  // @ts-expect-error\n  $(\"select.selectize-field\").selectize({ sortField: \"asc\" });\n});\n"],"names":["linkClickSelector","buttonClickSelector","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","nonce","loadCSPNonce","metaTag","cspNonce","m","matches","element","selector","EXPANDO","getData","key","setData","value","$","isContentEditable","isEditable","csrfToken","meta","csrfParam","CSRFProtection","xhr","token","refreshCSRFTokens","param","input","AcceptHeaders","ajax","options","prepareOptions","createXHR","response","processResponse","done","type","script","parser","href","isCrossDomain","url","originAnchor","urlAnchor","preventDefault","CustomEvent","event","params","evt","result","fire","obj","name","data","stopEverything","e","delegate","eventType","handler","target","toArray","serializeElement","additionalParam","inputs","option","formElements","form","el","handleConfirmWithRails","rails","allowAction","confirm","message","callback","answer","handleDisabledElement","enableElement","isXhrRedirect","enableLinkElement","enableFormElement","enableFormElements","disableElement","disableLinkElement","disableFormElement","disableFormElements","replacement","originalText","handleMethodWithRails","link","method","csrfToken$1","csrfParam$1","formContent","isRemote","handleRemoteWithRails","withCredentials","dataType","button","args","formSubmitButtonClick","preventInsignificantClick","insignificantMetaClick","Rails","handleConfirm","handleMethod","handleRemote","start","originalOptions","Cookies","ttl","domain","expires","cookieDomain","date","i","c","nameEQ","ca","config","ahoy","visitId","visitorId","track","isReady","queue","canStringify","eventQueue","visitsUrl","eventsUrl","isEmpty","canTrackNow","serialize","object","setCookie","getCookie","destroyCookie","log","setReady","matchesSelector","onEvent","eventName","matchedElement","skip","getClosest","documentReady","generateId","r","v","saveEventQueue","sendRequest","success","header","eventData","trackEvent","trackEventNow","page","presence","str","cleanObject","eventProperties","attribute","createVisit","enabled","properties","additionalProperties","propName","jquery"],"mappings":"oFAKA,MAAMA,EAAoB,yGAEpBC,EAAsB,CAC1B,SAAU,oEACV,QAAS,aACX,EAEMC,EAAsB,iEAEtBC,EAAqB,8BAErBC,EAAyB,ySAEzBC,EAAsB,sMAEtBC,EAAqB,4MAErBC,GAAoB,yCAEpBC,EAAsB,wCAEtBC,EAAwB,4EAE9B,IAAIC,GAAQ,KAEZ,MAAMC,EAAe,IAAM,CACzB,MAAMC,EAAU,SAAS,cAAc,sBAAsB,EAC7D,OAAOF,GAAQE,GAAWA,EAAQ,OACpC,EAEMC,GAAW,IAAMH,IAASC,IAE1BG,EAAI,QAAQ,UAAU,SAAW,QAAQ,UAAU,iBAAmB,QAAQ,UAAU,oBAAsB,QAAQ,UAAU,mBAAqB,QAAQ,UAAU,kBAAoB,QAAQ,UAAU,sBAE7MC,EAAU,SAASC,EAASC,EAAU,CAC1C,OAAIA,EAAS,QACJH,EAAE,KAAKE,EAASC,EAAS,QAAQ,GAAK,CAACH,EAAE,KAAKE,EAASC,EAAS,OAAO,EAEvEH,EAAE,KAAKE,EAASC,CAAQ,CAEnC,EAEMC,EAAU,WAEVC,EAAU,CAACH,EAASI,IAAQJ,EAAQE,CAAO,EAAIF,EAAQE,CAAO,EAAEE,CAAG,EAAI,OAEvEC,EAAU,SAASL,EAASI,EAAKE,EAAO,CAC5C,OAAKN,EAAQE,CAAO,IAClBF,EAAQE,CAAO,EAAI,IAEdF,EAAQE,CAAO,EAAEE,CAAG,EAAIE,CACjC,EAEMC,EAAIN,GAAY,MAAM,UAAU,MAAM,KAAK,SAAS,iBAAiBA,CAAQ,CAAC,EAE9EO,EAAoB,SAASR,EAAS,CAC1C,IAAIS,EAAa,GACjB,EAAG,CACD,GAA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