vare={};constt={start(){if(!window.Alpine)thrownewError("Alpine is required for `alpine-clipboard` to work.");Alpine.addMagicProperty("clipboard",()=>function(e){lett=e;if("string"!=typeoft)try{t=JSON.stringify(t)}catch(e){console.warn(e)}constn=document.createElement("textarea");if(n.value=t,n.setAttribute("readonly",""),n.style.cssText="position:fixed;pointer-events:none;z-index:-9999;opacity:0;",document.body.appendChild(n),navigator.userAgent&&navigator.userAgent.match(/ipad|ipod|iphone/i)){n.contentEditable=!0,n.readOnly=!0;conste=document.createRange();e.selectNodeContents(n);constt=window.getSelection();t.removeAllRanges(),t.addRange(e),n.setSelectionRange(0,999999)}elsen.select();try{document.execCommand("copy")}catch(e){console.warn(err)}document.body.removeChild(n)})}},n=window.deferLoadingAlpine||(e=>e());window.deferLoadingAlpine=function(e){t.start(),n(e)},e=t;varo=e;exportdefaulto;
functionisValidVersion(e,t){varr=e.split(".");vara=t.split(".");for(vari=0;i<r.length;i++)if(a[i]&&a[i]>r[i])returntrue;returna[r.length-1]===r[r.length-1]}functiondispatch(e,t){varr=arguments.length>2&&void0!==arguments[2]?arguments[2]:{};e.dispatchEvent(newCustomEvent(t,{detail:r,bubbles:true,composed:true,cancelable:true}))}classBridge{init(){if(!window.Alpine.version||!isValidVersion("3.0.0",window.Alpine.version))thrownewError("Invalid Alpine version. Please use Alpine 3.0.0 or above");window.Alpine.mutateDom((()=>{document.body.querySelectorAll("[x-cloak]").forEach((e=>{vart;e.setAttribute("data-alpine-was-cloaked",null!==(t=e.getAttribute("x-cloak"))&&void0!==t?t:"")}))}));this.configureEventHandlers()}configureEventHandlers(){varrenderCallback=e=>{if(!document.documentElement.hasAttribute("data-turbo-preview")){dispatch(document,"alpine:init");dispatch(document,"alpine:initializing");window.Alpine.flushAndStopDeferringMutations();dispatch(document,"alpine:initialised");window.Alpine.mutateDom((()=>{document.querySelectorAll("[data-alpine-ignored]").forEach((e=>{e.removeAttribute("x-ignore");e.removeAttribute("data-alpine-ignored")}))}))}};varbeforeRenderCallback=e=>{window.Alpine.mutateDom((()=>{document.documentElement.hasAttribute("data-turbo-preview")||e.detail.newBody.querySelectorAll("[data-alpine-generated-me],[x-cloak]").forEach((e=>{if(e.hasAttribute("x-cloak")){vart;e.setAttribute("data-alpine-was-cloaked",null!==(t=e.getAttribute("x-cloak"))&&void0!==t?t:"")}if(e.hasAttribute("data-alpine-generated-me")){e.removeAttribute("data-alpine-generated-me");e.remove()}}))}));window.Alpine.deferMutations()};varbeforeCacheCallback=e=>{window.Alpine.mutateDom((()=>{document.body.querySelectorAll("[x-for],[x-if],[x-teleport],[data-alpine-was-cloaked]").forEach((e=>{if(e.hasAttribute("data-alpine-was-cloaked")){vart;e.setAttribute("x-cloak",null!==(t=e.getAttribute("data-alpine-was-cloaked"))&&void0!==t?t:"");e.removeAttribute("data-alpine-was-cloaked")}e.hasAttribute("x-for")&&e._x_lookup&&Object.values(e._x_lookup).forEach((e=>e.setAttribute("data-alpine-generated-me",true)));e.hasAttribute("x-if")&&e._x_currentIfEl&&e._x_currentIfEl.setAttribute("data-alpine-generated-me",true);e.hasAttribute("x-teleport")&&e._x_teleport&&e._x_teleport.setAttribute("data-alpine-generated-me",true)}))}));document.querySelectorAll("[data-turbo-permanent]").forEach((e=>{window.Alpine.mutateDom((()=>{if(!e.hasAttribute("x-ignore")){e.setAttribute("x-ignore",true);e.setAttribute("data-alpine-ignored",true)}e.querySelectorAll("[data-alpine-generated-me]").forEach((e=>{e.removeAttribute("data-alpine-generated-me")}))}))}))};document.addEventListener("turbo:render",renderCallback);document.addEventListener("turbo:before-render",beforeRenderCallback);document.addEventListener("turbo:before-cache",beforeCacheCallback)}}window.Alpine&&console.error("Alpine-turbo-drive-adapter must be included before AlpineJs");Object.getOwnPropertyDescriptor(NodeList.prototype,"forEach")||Object.defineProperty(NodeList.prototype,"forEach",Object.getOwnPropertyDescriptor(Array.prototype,"forEach"));document.addEventListener("alpine:init",(()=>{vare=newBridge;e.init()}),{once:true});vare={};export{easdefault};