/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/crudlfap@0.7.45/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{Application}from"@hotwired/stimulus";import{definitionsFromContext}from"@hotwired/stimulus-webpack-helpers";import init from"./init.js";import M from"@materializecss/materialize";import"./style.sass";import loader from"./loader.js";(()=>{if(void 0===window.Turbo){var e=require("@hotwired/turbo");e.start(),e.setProgressBarDelay(250)}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document||!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!=t&&1===t.nodeType);return t})}).bind(window)();const application=Application.start(),context=require.context("./controllers",!0,/\.js$/);application.load(definitionsFromContext(context)),document.addEventListener("turbo:load",(function(){application.controllers.forEach((function(e){"function"==typeof e.teardown&&e.teardown()}))})),document.addEventListener("turbo:before-cache",(function(e){for(var t of e.target.querySelectorAll("[data-tooltip]"))M.Tooltip.getInstance(t).destroy();for(var o of e.target.querySelectorAll("select"))M.FormSelect.getInstance(o).destroy()})),document.addEventListener("turbo:load",(function(e){init(e.target.body)})),document.addEventListener("click",(function(e){var t=document.getElementById("toast-container");t&&!t.contains(e.target)&&M.Toast.dismissAll();var o=document.querySelectorAll(".dropdown-trigger");for(var r of o){var n=M.Dropdown.getInstance(r);n&&n.isOpen&&!r.parentElement.contains(e.target)&&n.close()}}));const fetchers={};function prefetchCleanup(e){clearTimeout(fetchers[e.target.href]),e.target.removeEventListener("mouseleave",prefetchCleanup)}document.addEventListener("turbo:click",loader.show),document.addEventListener("turbo:render",loader.hide);export default application;
//# sourceMappingURL=/sm/566ef52e03ae61163e6cdf31741b255674250bb359e52a44d33733f020fea42e.map