snipe-it/public/vendor/livewire/livewire.min.js

104 lines
139 KiB
JavaScript
Raw Normal View History

2024-05-29 12:04:06 -07:00
(()=>{var el=Object.create;var ti=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty;var ol=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var sl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rl(t))!il.call(e,i)&&i!==r&&ti(e,i,{get:()=>t[i],enumerable:!(n=tl(t,i))||n.enumerable});return e};var al=(e,t,r)=>(r=e!=null?el(nl(e)):{},sl(t||!e||!e.__esModule?ti(r,"default",{value:e,enumerable:!0}):r,e));var ua=ol((Dn,la)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof Dn=="object"?la.exports=t():e.NProgress=t()})(Dn,function(){var e={};e.version="0.2.0";var t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};e.configure=function(c){var f,m;for(f in c)m=c[f],m!==void 0&&c.hasOwnProperty(f)&&(t[f]=m);return this},e.status=null,e.set=function(c){var f=e.isStarted();c=r(c,t.minimum,1),e.status=c===1?null:c;var m=e.render(!f),v=m.querySelector(t.barSelector),g=t.speed,x=t.easing;return m.offsetWidth,o(function(b){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),s(v,i(c,g,x)),c===1?(s(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){s(m,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){e.remove(),b()},g)},g)):setTimeout(b,g)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var c=function(){setTimeout(function(){!e.status||(e.trickle(),c())},t.trickleSpeed)};return t.trickle&&c(),this},e.done=function(c){return!c&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(c){var f=e.status;return f?(typeof c!="number"&&(c=(1-f)*r(Math.random()*f,.1,.95)),f=r(f+c,0,.994),e.set(f)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var c=0,f=0;e.promise=function(m){return!m||m.state()==="resolved"?this:(f===0&&e.start(),c++,f++,m.always(function(){f--,f===0?(c=0,e.done()):e.set((c-f)/c)}),this)}}(),e.render=function(c){if(e.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var f=document.createElement("div");f.id="nprogress",f.innerHTML=t.template;var m=f.querySelector(t.barSelector),v=c?"-100":n(e.status||0),g=document.querySelector(t.parent),x;return s(m,{transition:"all 0 linear",transform:"translate3d("+v+"%,0,0)"}),t.showSpinner||(x=f.querySelector(t.spinnerSelector),x&&p(x)),g!=document.body&&l(g,"nprogress-custom-parent"),g.appendChild(f),f},e.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(t.parent),"nprogress-custom-parent");var c=document.getElementById("nprogress");c&&p(c)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var c=document.body.style,f="WebkitTransform"in c?"Webkit":"MozTransform"in c?"Moz":"msTransform"in c?"ms":"OTransform"in c?"O":"";return f+"Perspective"in c?"translate3d":f+"Transform"in c?"translate":"margin"};function r(c,f,m){return c<f?f:c>m?m:c}function n(c){return(-1+c)*100}function i(c,f,m){var v;return t.positionUsing==="translate3d"?v={transform:"translate3d("+n(c)+"%,0,0)"}:t.positionUsing==="translate"?v={transform:"translate("+n(c)+"%,0)"}:v={"margin-left":n(c)+"%"},v.transition="all "+f+"ms "+m,v}var o=function(){var c=[];function f(){var m=c.shift();m&&m(f)}return function(m){c.push(m),c.length==1&&f()}}(),s=function(){var c=["Webkit","O","Moz","ms"],f={};function m(b){return b.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(_,T){return T.toUpperCase()})}function v(b){var _=document.body.style;if(b in _)return b;for(var T=c.length,O=b.charAt(0).toUpperCase()+b.slice(1),w;T--;)if(w=c[T]+O,w in _)return w;return b}function g(b){return b=m(b),f[b]||(f[
${r?'Expression: "'+r+`"
`:""}`,t),setTimeout(()=>{throw e},0)}var Lt=!0;function Hi(e){let t=Lt;Lt=!1;let r=e();return Lt=t,r}function Ae(e,t,r={}){let n;return H(e,t)(i=>n=i,r),n}function H(...e){return ji(...e)}var ji=qi;function El(e){ji=e}function qi(e,t){let r={};Nr(r,e);let n=[r,...$e(e)],i=typeof t=="function"?Al(n,t):Ol(n,t,e);return Sl.bind(null,e,t,i)}function Al(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(ut([n,...e]),i);Pt(r,o)}}var xr={};function Cl(e,t){if(xr[e])return xr[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let s=new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`);return Object.defineProperty(s,"name",{value:`[Alpine] ${e}`}),s}catch(s){return at(s,t,e),Promise.resolve()}})();return xr[e]=o,o}function Ol(e,t,r){let n=Cl(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=ut([o,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>at(u,r,t));n.finished?(Pt(i,n.result,a,s,r),n.result=void 0):l.then(u=>{Pt(i,u,a,s,r)}).catch(u=>at(u,r,t)).finally(()=>n.result=void 0)}}}function Pt(e,t,r,n,i){if(Lt&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Pt(e,s,r,n)).catch(s=>at(s,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var Gr="x-";function He(e=""){return Gr+e}function Tl(e){Gr=e}var Mt={};function F(e,t){return Mt[e]=t,{before(r){if(!Mt[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=Se.indexOf(r);Se.splice(n>=0?n:Se.indexOf("DEFAULT"),0,e)}}}function kl(e){return Object.keys(Mt).includes(e)}function Xr(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Wi(o);o=o.map(a=>s.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(Gi((o,s)=>n[o]=s)).filter(Yi).map(Rl(n,r)).sort(Pl).map(o=>Nl(e,o))}function Wi(e){return Array.from(e).map(Gi()).filter(t=>!Yi(t))}var Rr=!1,it=new Map,Ki=Symbol();function Ll(e){Rr=!0;let t=Symbol();Ki=t,it.set(t,[]);let r=()=>{for(;it.get(t).length;)it.get(t).shift()();it.delete(t)},n=()=>{Rr=!1,r()};e(r),n()}function zi(e){let t=[],r=a=>t.push(a),[n,i]=hl(e);return t.push(i),[{Alpine:ft,effect:n,cleanup:r,evaluateLater:H.bind(H,e),evaluate:Ae.bind(Ae,e)},()=>t.forEach(a=>a())]}function Nl(e,t){let r=()=>{},n=Mt[t.type]||r,[i,o]=zi(e);Mi(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),Rr?it.get(Ki).push(n):n())};return s.runCleanups=o,s}var Vi=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Ji=e=>e;function Gi(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Xi.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Xi=[];function Yr(e){Xi.push(e)}function Yi({name:e}){return Qi().test(e)}var Qi=()=>new RegExp(`^${Gr}([^:^.]+)\\b`);function Rl(e,t){return({name:r,value:n})=>{let i=r.match(Qi()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:n,original:a}}}var Pr="DEFAULT",Se=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Pr,"teleport"];function Pl(e,t){let r=Se.indexOf(e.type)===-1?Pr:e.type,n=Se.indexOf(t.type)===-1?Pr:t.type;return Se.indexOf(r)-Se.indexOf(n)}function ot(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function de(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>de(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)de(n,t,!1),n=n.nextElementSibling}function V(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var hi=!1;function Ml(){hi&&V("Alpine has already
Would you like to refresh the page?`)&&window.location.reload()}function bc(e){fn(e)}var mn={},Go;function $(e,t,r=null){mn[e]=t}function wc(e){Go=e}var Vo={on:"$on",el:"$el",id:"$id",get:"$get",set:"$set",call:"$call",commit:"$commit",watch:"$watch",entangle:"$entangle",dispatch:"$dispatch",dispatchTo:"$dispatchTo",dispatchSelf:"$dispatchSelf",upload:"$upload",uploadMultiple:"$uploadMultiple",removeUpload:"$removeUpload",cancelUpload:"$cancelUpload"};function Xo(e,t){return new Proxy({},{get(r,n){if(n==="__instance")return e;if(n in Vo)return Jo(e,Vo[n]);if(n in mn)return Jo(e,n);if(n in t)return t[n];if(!["then"].includes(n))return yc(e)(n)},set(r,n,i){return n in t&&(t[n]=i),!0}})}function Jo(e,t){return mn[t](e)}function yc(e){return Go(e)}S.magic("wire",(e,{cleanup:t})=>{let r;return new Proxy({},{get(n,i){return r||(r=K(e)),["$entangle","entangle"].includes(i)?cn(r,t):r.$wire[i]},set(n,i,o){return r||(r=K(e)),r.$wire[i]=o,!0}})});$("__instance",e=>e);$("$get",e=>(t,r=!0)=>W(r?e.reactive:e.ephemeral,t));$("$el",e=>e.el);$("$id",e=>e.id);$("$set",e=>async(t,r,n=!0)=>(ye(e.reactive,t,r),n?(e.queueUpdate(t,r),await pn(e)):Promise.resolve()));$("$call",e=>async(t,...r)=>await e.$wire[t](...r));$("$entangle",e=>(t,r=!1)=>cn(e)(t,r));$("$toggle",e=>(t,r=!0)=>e.$wire.set(t,!e.$wire.get(t),r));$("$watch",e=>(t,r)=>{let n=()=>W(e.reactive,t),i=S.watch(n,r);e.addCleanup(i)});$("$refresh",e=>e.$wire.$commit);$("$commit",e=>async()=>await pn(e));$("$on",e=>(...t)=>Qo(e,...t));$("$dispatch",e=>(...t)=>Jt(e,...t));$("$dispatchSelf",e=>(...t)=>oe(e,...t));$("$dispatchTo",()=>(...e)=>qe(...e));$("$upload",e=>(...t)=>ui(e,...t));$("$uploadMultiple",e=>(...t)=>ci(e,...t));$("$removeUpload",e=>(...t)=>fi(e,...t));$("$cancelUpload",e=>(...t)=>di(e,...t));var hn=new WeakMap;$("$parent",e=>{if(hn.has(e))return hn.get(e).$wire;let t=e.parent;return hn.set(e,t),t.$wire});var je=new WeakMap;function Yo(e,t,r){je.has(e)||je.set(e,{});let n=je.get(e);n[t]=r,je.set(e,n)}wc(e=>t=>async(...r)=>{if(r.length===1&&r[0]instanceof Event&&(r=[]),je.has(e)){let n=je.get(e);if(typeof n[t]=="function")return n[t](r)}return await zo(e,t,r)});var Gt=class{constructor(t){if(t.__livewire)throw"Component already initialized";if(t.__livewire=this,this.el=t,this.id=t.getAttribute("wire:id"),this.__livewireId=this.id,this.snapshotEncoded=t.getAttribute("wire:snapshot"),this.snapshot=JSON.parse(this.snapshotEncoded),!this.snapshot)throw"Snapshot missing on Livewire component with id: "+this.id;this.name=this.snapshot.memo.name,this.effects=JSON.parse(t.getAttribute("wire:effects")),this.originalEffects=ce(this.effects),this.canonical=xe(ce(this.snapshot.data)),this.ephemeral=xe(ce(this.snapshot.data)),this.reactive=Alpine.reactive(this.ephemeral),this.queuedUpdates={},this.$wire=Xo(this,this.reactive),this.cleanups=[],this.processEffects(this.effects)}mergeNewSnapshot(t,r,n={}){let i=JSON.parse(t),o=ce(this.canonical),s=this.applyUpdates(o,n),a=xe(ce(i.data)),l=Qe(s,a);this.snapshotEncoded=t,this.snapshot=i,this.effects=r,this.canonical=xe(ce(i.data));let u=xe(ce(i.data));return Object.entries(l).forEach(([d,p])=>{let c=d.split(".")[0];this.reactive[c]=u[c]}),l}queueUpdate(t,r){this.queuedUpdates[t]=r}mergeQueuedUpdates(t){return Object.entries(this.queuedUpdates).forEach(([r,n])=>{Object.entries(t).forEach(([i,o])=>{i.startsWith(n)&&delete t[i]}),t[r]=n}),this.queuedUpdates=[],t}applyUpdates(t,r){for(let n in r)ye(t,n,r[n]);return t}replayUpdate(t,r){let n={...this.effects,html:r};this.mergeNewSnapshot(JSON.stringify(t),n),this.processEffects({html:r})}processEffects(t){R("effects",this,t),R("effect",{component:this,effects:t,cleanup:r=>this.addCleanup(r)})}get children(){let t=this.snapshot.memo;return Object.values(t.children).map(n=>n[1]).map(n=>Zo(n))}get parent(){return K(this.el.parentElement)}inscribeSnapshotAndEffectsOnElement(){let t=this.el;t.setAttribute("wire:snapshot",this.snapshotEncoded);let r=this.originalEffects.listeners?{listeners:this.originalEffects.listeners}:{};this.originalEffects.url&&(r.url=this.originalEffects.url),t.setAttribute("wir
for (var l=arguments.length, p=new Array(l), k=0; k<l; k++) {
p[k] = arguments[k];
}
return [].concat(p);
})(${i[2]})`)(this.eventContext)),{method:r,params:n}}};function xc(e){e.directive("collapse",t),t.inline=(r,{modifiers:n})=>{!n.includes("min")||(r._x_doShow=()=>{},r._x_doHide=()=>{})};function t(r,{modifiers:n}){let i=us(n,"duration",250)/1e3,o=us(n,"min",0),s=!n.includes("min");r._x_isShown||(r.style.height=`${o}px`),!r._x_isShown&&s&&(r.hidden=!0),r._x_isShown||(r.style.overflow="hidden");let a=(u,d)=>{let p=e.setStyles(u,d);return d.height?()=>{}:p},l={transitionProperty:"height",transitionDuration:`${i}s`,transitionTimingFunction:"cubic-bezier(0.4, 0.0, 0.2, 1)"};r._x_transition={in(u=()=>{},d=()=>{}){s&&(r.hidden=!1),s&&(r.style.display=null);let p=r.getBoundingClientRect().height;r.style.height="auto";let c=r.getBoundingClientRect().height;p===c&&(p=o),e.transition(r,e.setStyles,{during:l,start:{height:p+"px"},end:{height:c+"px"}},()=>r._x_isShown=!0,()=>{Math.abs(r.getBoundingClientRect().height-c)<1&&(r.style.overflow=null)})},out(u=()=>{},d=()=>{}){let p=r.getBoundingClientRect().height;e.transition(r,a,{during:l,start:{height:p+"px"},end:{height:o+"px"}},()=>r.style.overflow="hidden",()=>{r._x_isShown=!1,r.style.height==`${o}px`&&s&&(r.style.display="none",r.hidden=!0)})}}}}function us(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="min"){let i=n.match(/([0-9]+)px/);if(i)return i[1]}return n}var cs=xc;var bs=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],tr=bs.join(","),ws=typeof Element>"u",Le=ws?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,yn=!ws&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},ys=function(t,r,n){var i=Array.prototype.slice.apply(t.querySelectorAll(tr));return r&&Le.call(t,tr)&&i.unshift(t),i=i.filter(n),i},xs=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var s=o.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,n);n.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{var d=Le.call(s,tr);d&&n.filter(s)&&(r||!t.includes(s))&&i.push(s);var p=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),c=!n.shadowRootFilter||n.shadowRootFilter(s);if(p&&c){var f=e(p===!0?s.children:p.children,!0,n);n.flatten?i.push.apply(i,f):i.push({scope:s,candidates:f})}else o.unshift.apply(o,s.children)}}return i},_s=function(t,r){return t.tabIndex<0&&(r||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},_c=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Ss=function(t){return t.tagName==="INPUT"},Sc=function(t){return Ss(t)&&t.type==="hidden"},Ec=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},Ac=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},Cc=function(t){if(!t.name)return!0;var r=t.form||yn(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=Ac(i,t.form);return!o||o===t},Oc=function(t){return Ss(t)&&t.type==="radio"},Tc=function(t){return Oc(t)&&!Cc(t)},fs=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},kc=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Le.call(t,"details>summary:first-of-type"),s=o?t.parentElement:t;if(Le.call(s,"details:not([open
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: var(--livewire-progress-bar-color, #29d);
position: fixed;
z-index: 1031;
top: 0;
left: 0;
width: 100%;
height: 2px;
}
/* Fancy blur effect */
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px var(--livewire-progress-bar-color, #29d), 0 0 5px var(--livewire-progress-bar-color, #29d);
opacity: 1.0;
-webkit-transform: rotate(3deg) translate(0px, -4px);
-ms-transform: rotate(3deg) translate(0px, -4px);
transform: rotate(3deg) translate(0px, -4px);
}
/* Remove these to get rid of the spinner */
#nprogress .spinner {
display: block;
position: fixed;
z-index: 1031;
top: 15px;
right: 15px;
}
#nprogress .spinner-icon {
width: 18px;
height: 18px;
box-sizing: border-box;
border: solid 2px transparent;
border-top-color: var(--livewire-progress-bar-color, #29d);
border-left-color: var(--livewire-progress-bar-color, #29d);
border-radius: 50%;
-webkit-animation: nprogress-spinner 400ms linear infinite;
animation: nprogress-spinner 400ms linear infinite;
}
.nprogress-custom-parent {
overflow: hidden;
position: relative;
}
.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
position: absolute;
}
@-webkit-keyframes nprogress-spinner {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes nprogress-spinner {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`;let t=oi();t&&(e.nonce=t),document.head.appendChild(e)}var Un=[],ma=["data-csrf","aria-hidden"];function Hn(e,t){let r=new DOMParser().parseFromString(e,"text/html"),n=document.adoptNode(r.body),i=document.adoptNode(r.head);Un=Un.concat(Array.from(document.body.querySelectorAll("script")).map(a=>wa(ya(a.outerHTML,ma))));let o=()=>{};Lf(i).finally(()=>{o()}),kf(n,Un);let s=document.body;document.body.replaceWith(n),Alpine.destroyTree(s),t(a=>o=a)}function kf(e,t){e.querySelectorAll("script").forEach(r=>{if(r.hasAttribute("data-navigate-once")){let n=wa(ya(r.outerHTML,ma));if(t.includes(n))return}r.replaceWith(ga(r))})}function Lf(e){let t=Array.from(document.head.children),r=t.map(s=>s.outerHTML),n=document.createDocumentFragment(),i=[],o=[];for(let s of Array.from(e.children))if(ha(s)){if(r.includes(s.outerHTML))n.appendChild(s);else if(va(s)&&Rf(s,t)&&setTimeout(()=>window.location.reload()),ba(s))try{o.push(Nf(ga(s)))}catch{}else document.head.appendChild(s);i.push(s)}for(let s of Array.from(document.head.children))ha(s)||s.remove();for(let s of Array.from(e.children))document.head.appendChild(s);return Promise.all(o)}async function Nf(e){return new Promise((t,r)=>{e.src?(e.onload=()=>t(),e.onerror=()=>r()):t(),document.head.appendChild(e)})}function ga(e){let t=document.createElement("script");t.textContent=e.textContent,t.async=e.async;for(let r of e.attributes)t.setAttribute(r.name,r.value);return t}function va(e){return e.hasAttribute("data-navigate-track")}function Rf(e,t){let[r,n]=pa(e);return t.some(i=>{if(!va(i))return!1;let[o,s]=pa(i);if(o===r&&n!==s)return!0})}function pa(e){return(ba(e)?e.src:e.href).split("?")}function ha(e){return e.tagName.toLowerCase()==="link"&&e.getAttribute("rel").toLowerCase()==="stylesheet"||e.tagName.toLowerCase()==="style"||e.tagName.toLowerCase()==="script"}function ba(e){return e.tagName.toLowerCase()==="script"}function wa(e){return e.split("").reduce((t,r)=>(t=(t<<5)-t+r.charCodeAt(0),t&t),0)}function ya(e,t){let r=e;return t.forEach(n=>{let i=new RegExp(`${n}="[^"]*"|${n}='[^']*'`,"g");r=r.replace(i,"")}),r=r.replaceAll(" ",""),r.trim()}var pr=!0,jn=!0,Pf=!0,xa=!1;function Aa(e){e.navigate=r=>{let n=be(r);ue("alpine:navigate",{url:n,history:!1,cached:!1})||t(n)},e.navigate.disableProgressBar=()=>{jn=!1},e.addInitSelector(()=>`[${e.prefixed("navigate")}]`),e.directive("navigate",(r,{modifiers:n})=>{n.includes("hover")&&na(r,60,()=>{let o=On(r);kn(o,(s,a)=>{Ln(s,o,a)})}),ra(r,o=>{let s=On(r);kn(s,(a,l)=>{Ln(a,s,l)}),o(()=>{ue("alpine:navigate",{url:s,history:!1,cached:!1})||t(s)})})});function t(r,n=!0){jn&&ca(),Mf(r,(i,o)=>{ue("alpine:navigating"),Pf&&Mn(),jn&&fa(),If(),Ys(),_a(e,s=>{pr&&Fn(a=>{Nn(a)}),n?ea(i,o):Cn(o,i),Hn(i,a=>{Rn(document.body),pr&&$n((l,u)=>{Pn(l)}),In(),a(()=>{s(()=>{setTimeout(()=>{xa&&Ea()}),Sa(e),ue("alpine:navigated")})})})})})}Zs(r=>{r(n=>{let i=be(n);if(ue("alpine:navigate",{url:i,history:!0,cached:!1}))return;t(i,!1)})},(r,n,i,o)=>{let s=be(n);ue("alpine:navigate",{url:s,history:!0,cached:!0})||(Mn(),ue("alpine:navigating"),Qs(i,o),_a(e,l=>{pr&&Fn(u=>{Nn(u)}),Hn(r,()=>{da(),Rn(document.body),pr&&$n((u,d)=>{Pn(u)}),In(),l(()=>{xa&&Ea(),Sa(e),ue("alpine:navigated")})})}))}),setTimeout(()=>{ue("alpine:navigated")})}function Mf(e,t){oa(e,t,()=>{ia(e,t)})}function _a(e,t){e.stopObservingMutations(),t(r=>{e.startObservingMutations(),queueMicrotask(()=>{r()})})}function ue(e,t){let r=new CustomEvent(e,{cancelable:!0,bubbles:!0,detail:t});return document.dispatchEvent(r),r.defaultPrevented}function Sa(e){e.initTree(document.body,void 0,(t,r)=>{t._x_wasPersisted&&r()})}function Ea(){document.querySelector("[autofocus]")&&document.querySelector("[autofocus]").focus()}function If(){let e=function(t,r){Alpine.walk(t,(n,i)=>{aa(n)&&i(),sa(n)?i():r(n,i)})};Alpine.destroyTree(document.body,e)}function qn(e){e.magic("queryString",(t,{interceptor:r})=>{let n,i=!1,o=!1;return r((s,a,l,u,d)=>{let p=n||u,{initial:c,replace:f,push:m,pop:v}=mr(p,s,i);return l(c),o?(e.effect(()=>m(a())),v(async g=>{l(g),await(()=>Promise.resolve())()})):e.effect(()=>f(a())),c},s=>{
`),r===""&&(r="Are you sure?"),e.__livewire_confirm=(i,o)=>{if(n){let[s,a]=r.split("|");a?prompt(s)===a?i():o():console.warn("Livewire: Must provide expectation with wire:confirm.prompt")}else confirm(r)?i():o()}});function ne(e,t,r,n=null){if(r=t.modifiers.includes("remove")?!r:r,t.modifiers.includes("class")){let i=t.expression.split(" ").filter(String);r?e.classList.add(...i):e.classList.remove(...i)}else if(t.modifiers.includes("attr"))r?e.setAttribute(t.expression,!0):e.removeAttribute(t.expression);else{let i=n??window.getComputedStyle(e,null).getPropertyValue("display"),o=["inline","block","table","flex","grid","inline-flex"].filter(s=>t.modifiers.includes(s))[0]||"inline-block";o=t.modifiers.includes("remove")&&!r?i:o,e.style.display=r?o:"none"}}var Yn=new Set,Qn=new Set;window.addEventListener("offline",()=>Yn.forEach(e=>e()));window.addEventListener("online",()=>Qn.forEach(e=>e()));I("offline",({el:e,directive:t,cleanup:r})=>{let n=()=>ne(e,t,!0),i=()=>ne(e,t,!1);Yn.add(n),Qn.add(i),r(()=>{Yn.delete(n),Qn.delete(i)})});I("loading",({el:e,directive:t,component:r,cleanup:n})=>{let{targets:i,inverted:o}=wd(e),[s,a]=md(t),l=gd(r,i,o,[()=>s(()=>ne(e,t,!0)),()=>a(()=>ne(e,t,!1))]),u=vd(r,i,[()=>s(()=>ne(e,t,!0)),()=>a(()=>ne(e,t,!1))]);n(()=>{l(),u()})});function md(e){if(!e.modifiers.includes("delay")||e.modifiers.includes("none"))return[o=>o(),o=>o()];let t=200,r={shortest:50,shorter:100,short:150,default:200,long:300,longer:500,longest:1e3};Object.keys(r).some(o=>{if(e.modifiers.includes(o))return t=r[o],!0});let n,i=!1;return[o=>{n=setTimeout(()=>{o(),i=!0},t)},async o=>{i?(await o(),i=!1):clearTimeout(n)}]}function gd(e,t,r,[n,i]){return k("commit",({component:o,commit:s,respond:a})=>{o===e&&(t.length>0&&bd(s,t)===r||(n(),a(()=>{i()})))})}function vd(e,t,[r,n]){let i=l=>{let{id:u,property:d}=l.detail;return u!==e.id||t.length>0&&!t.map(p=>p.target).includes(d)},o=xt(window,"livewire-upload-start",l=>{i(l)||r()}),s=xt(window,"livewire-upload-finish",l=>{i(l)||n()}),a=xt(window,"livewire-upload-error",l=>{i(l)||n()});return()=>{o(),s(),a()}}function bd(e,t){let{updates:r,calls:n}=e;return t.some(({target:i,params:o})=>{if(o)return n.some(({method:a,params:l})=>i===a&&o===Wa(JSON.stringify(l)));if(Object.keys(r).some(a=>a.includes(".")&&a.split(".")[0]===i?!0:a===i)||n.map(a=>a.method).includes(i))return!0})}function wd(e){let t=Ke(e),r=[],n=!1;if(t.has("target")){let i=t.get("target"),o=i.expression;i.modifiers.includes("except")&&(n=!0),o.includes("(")&&o.includes(")")?r.push({target:i.method,params:Wa(JSON.stringify(i.params))}):o.includes(",")?o.split(",").map(s=>s.trim()).forEach(s=>{r.push({target:s})}):r.push({target:o})}else{let i=["init","dirty","offline","target","loading","poll","ignore","key","id"];t.all().filter(o=>!i.includes(o.value)).map(o=>o.expression.split("(")[0]).forEach(o=>r.push({target:o}))}return{targets:r,inverted:n}}function Wa(e){return btoa(encodeURIComponent(e))}I("stream",({el:e,directive:t,cleanup:r})=>{let{expression:n,modifiers:i}=t,o=k("stream",({name:s,content:a,replace:l})=>{s===n&&(i.includes("replace")||l?e.innerHTML=a:e.innerHTML=e.innerHTML+a)});r(o)});k("request",({respond:e})=>{e(t=>{let r=t.response;!r.headers.has("X-Livewire-Stream")||(t.response={ok:!0,redirected:!1,status:200,async text(){let n=await yd(r,i=>{R("stream",i)});return Et(n)&&(this.ok=!1),n}})})});async function yd(e,t){let r=e.body.getReader(),n="";for(;;){let{done:i,value:o}=await r.read(),a=new TextDecoder().decode(o),[l,u]=xd(n+a);if(l.forEach(d=>{t(d)}),n=u,i)return n}}function xd(e){let t=/({"stream":true.*?"endStream":true})/g,r=e.match(t),n=[];if(r)for(let o=0;o<r.length;o++)n.push(JSON.parse(r[o]).body);let i=e.replace(t,"");return[n,i]}I("replace",({el:e,directive:t})=>{t.modifiers.includes("self")?e.__livewire_replace_self=!0:e.__livewire_replace=!0});I("ignore",({el:e,directive:t})=>{t.modifiers.includes("self")?e.__livewire_ignore_self=!0:e.__livewire_ignore=!0});var Ka=new Fe;k("commit",({component:e,respond:t})=>{t(()=>{setTimeout(()=>{Ka.each(e,r=>r(!1))})})});I("dirty",({el:e,directive:t,
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */
/*! Bundled license information:
tabbable/dist/index.esm.js:
(*!
* tabbable 5.3.3
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*)
focus-trap/dist/focus-trap.esm.js:
(*!
* focus-trap 6.9.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*)
*/
//# sourceMappingURL=livewire.min.js.map