Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alpinejs

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpinejs - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

4

dist/cdn.min.js

@@ -1,5 +0,5 @@

(()=>{var Me=!1,ke=!1,J=[];function ht(e){Tr(e)}function Tr(e){J.includes(e)||J.push(e),Rr()}function Rr(){!ke&&!Me&&(Me=!0,queueMicrotask(Cr))}function Cr(){Me=!1,ke=!0;for(let e=0;e<J.length;e++)J[e]();J.length=0,ke=!1}var b,T,j,De,Pe=!0;function gt(e){Pe=!1,e(),Pe=!0}function _t(e){b=e.reactive,j=e.release,T=t=>e.effect(t,{scheduler:r=>{Pe?ht(r):r()}}),De=e.raw}function Ie(e){T=e}function xt(e){let t=()=>{};return[n=>{let i=T(n);e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),j(i))}},()=>{t()}]}var yt=[],bt=[],vt=[];function wt(e){vt.push(e)}function Et(e){bt.push(e)}function St(e){yt.push(e)}function At(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Le(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&n.forEach(i=>i()),delete e._x_attributeCleanups[r]})}var Fe=new MutationObserver(Ot),$e=!1;function Ke(){Fe.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),$e=!0}function Nr(){Fe.disconnect(),$e=!1}var Q=[],je=!1;function kr(){Q=Q.concat(Fe.takeRecords()),Q.length&&!je&&(je=!0,queueMicrotask(()=>{Mr(),je=!1}))}function Mr(){Ot(Q),Q.length=0}function m(e){if(!$e)return e();kr(),Nr();let t=e();return Ke(),t}function Ot(e){let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(s=>s.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,c=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&c===null?l():s.hasAttribute(a)?(u(),l()):u()}i.forEach((o,s)=>{Le(s,o)}),n.forEach((o,s)=>{yt.forEach(a=>a(s,o))});for(let o of t)r.includes(o)||vt.forEach(s=>s(o));for(let o of r)t.includes(o)||bt.forEach(s=>s(o));t=null,r=null,n=null,i=null}function z(e,t,r){return e._x_dataStack=[t,...Z(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function ze(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function Z(e){return e._x_dataStack?e._x_dataStack:e instanceof ShadowRoot?Z(e.host):e.parentNode?Z(e.parentNode):[]}function Ve(e){return new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(t=>Object.keys(t)))),has:(t,r)=>e.some(n=>n.hasOwnProperty(r)),get:(t,r)=>(e.find(n=>n.hasOwnProperty(r))||{})[r],set:(t,r,n)=>{let i=e.find(o=>o.hasOwnProperty(r));return i?i[r]=n:e[e.length-1][r]=n,!0}})}function Tt(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(n).forEach(([o,s])=>{let a=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,a,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,a)})};return r(e)}function fe(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Dr(n,i),s=>He(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let c=n.initialize(o,s,a);return r.initialValue=c,i(o,s,a)}}else r.initialValue=n;return r}}function Dr(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function He(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),He(e[t[0]],t.slice(1),r)}}var Rt={};function y(e,t){Rt[e]=t}function X(e,t){return Object.entries(Rt).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){return n(t,{Alpine:E,interceptor:fe})},enumerable:!1})}),e}function R(e,t,r={}){let n;return h(e,t)(i=>n=i,r),n}function h(...e){return Ct(...e)}var Ct=Be;function Nt(e){Ct=e}function Be(e,t){let r={};X(r,e);let n=[r,...Z(e)];if(typeof t=="function")return Pr(n,t);let i=Ir(n,t);return Lr.bind(null,e,t,i)}function Pr(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Ve([n,...e]),i);de(r,o)}}var qe={};function Fr(e){if(qe[e])return qe[e];let t=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)/.test(e)?`(() => { ${e} })()`:e,n=new t(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return qe[e]=n,n}function Ir(e,t){let r=Fr(t);return(n=()=>{},{scope:i={},params:o=[]}={})=>{r.result=void 0,r.finished=!1;let s=Ve([i,...e]),a=r(r,s);r.finished?de(n,r.result,s,o):a.then(c=>{de(n,c,s,o)})}}function de(e,t,r,n){if(typeof t=="function"){let i=t.apply(r,n);i instanceof Promise?i.then(o=>de(e,o,r,n)):e(i)}else e(t)}function Lr(e,t,r,...n){try{return r(...n)}catch(i){throw console.warn(`Alpine Expression Error: ${i.message}
(()=>{var Me=!1,De=!1,G=[];function mt(e){Or(e)}function Or(e){G.includes(e)||G.push(e),Rr()}function Rr(){!De&&!Me&&(Me=!0,queueMicrotask(Cr))}function Cr(){Me=!1,De=!0;for(let e=0;e<G.length;e++)G[e]();G.length=0,De=!1}var b,O,z,Pe,Ie=!0;function ht(e){Ie=!1,e(),Ie=!0}function gt(e){b=e.reactive,z=e.release,O=t=>e.effect(t,{scheduler:r=>{Ie?mt(r):r()}}),Pe=e.raw}function Le(e){O=e}function _t(e){let t=()=>{};return[n=>{let i=O(n);e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),z(i))}},()=>{t()}]}var yt=[],xt=[],bt=[];function vt(e){bt.push(e)}function wt(e){xt.push(e)}function Et(e){yt.push(e)}function St(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Fe(e,t){!e._x_attributeCleanups||Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&n.forEach(i=>i()),delete e._x_attributeCleanups[r]})}var $e=new MutationObserver(At),je=!1;function Ke(){$e.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),je=!0}function kr(){$e.disconnect(),je=!1}var Y=[],ze=!1;function Mr(){Y=Y.concat($e.takeRecords()),Y.length&&!ze&&(ze=!0,queueMicrotask(()=>{Nr(),ze=!1}))}function Nr(){At(Y),Y.length=0}function m(e){if(!je)return e();Mr(),kr();let t=e();return Ke(),t}function At(e){let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(s=>s.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,c=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},f=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&c===null?l():s.hasAttribute(a)?(f(),l()):f()}i.forEach((o,s)=>{Fe(s,o)}),n.forEach((o,s)=>{yt.forEach(a=>a(s,o))});for(let o of t)r.includes(o)||bt.forEach(s=>s(o));for(let o of r)t.includes(o)||xt.forEach(s=>s(o));t=null,r=null,n=null,i=null}function V(e,t,r){return e._x_dataStack=[t,...J(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function Ve(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function J(e){return e._x_dataStack?e._x_dataStack:e instanceof ShadowRoot?J(e.host):e.parentNode?J(e.parentNode):[]}function He(e){return new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(t=>Object.keys(t)))),has:(t,r)=>e.some(n=>n.hasOwnProperty(r)),get:(t,r)=>(e.find(n=>n.hasOwnProperty(r))||{})[r],set:(t,r,n)=>{let i=e.find(o=>o.hasOwnProperty(r));return i?i[r]=n:e[e.length-1][r]=n,!0}})}function Tt(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(n).forEach(([o,s])=>{let a=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,a,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,a)})};return r(e)}function fe(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Dr(n,i),s=>Be(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let c=n.initialize(o,s,a);return r.initialValue=c,i(o,s,a)}}else r.initialValue=n;return r}}function Dr(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Be(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Be(e[t[0]],t.slice(1),r)}}var Ot={};function x(e,t){Ot[e]=t}function Q(e,t){return Object.entries(Ot).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){return n(t,{Alpine:E,interceptor:fe})},enumerable:!1})}),e}function R(e,t,r={}){let n;return h(e,t)(i=>n=i,r),n}function h(...e){return Rt(...e)}var Rt=qe;function Ct(e){Rt=e}function qe(e,t){let r={};Q(r,e);let n=[r,...J(e)];if(typeof t=="function")return Pr(n,t);let i=Ir(n,t);return Lr.bind(null,e,t,i)}function Pr(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(He([n,...e]),i);de(r,o)}}var Ue={};function Fr(e){if(Ue[e])return Ue[e];let t=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)/.test(e)?`(() => { ${e} })()`:e,n=new t(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Ue[e]=n,n}function Ir(e,t){let r=Fr(t);return(n=()=>{},{scope:i={},params:o=[]}={})=>{r.result=void 0,r.finished=!1;let s=He([i,...e]),a=r(r,s);r.finished?de(n,r.result,s,o):a.then(c=>{de(n,c,s,o)})}}function de(e,t,r,n){if(typeof t=="function"){let i=t.apply(r,n);i instanceof Promise?i.then(o=>de(e,o,r,n)):e(i)}else e(t)}function Lr(e,t,r,...n){try{return r(...n)}catch(i){throw console.warn(`Alpine Expression Error: ${i.message}
Expression: "${t}"
`,e),i}}var Ue="x-";function S(e=""){return Ue+e}function Mt(e){Ue=e}var kt={};function p(e,t){kt[e]=t}function ee(e,t,r){let n={};return Array.from(t).map(Kr((o,s)=>n[o]=s)).filter(jr).map(zr(n,r)).sort(Vr).map(o=>$r(e,o))}var We=!1,Ge=[];function Dt(e){We=!0;let t=()=>{for(;Ge.length;)Ge.shift()()},r=()=>{We=!1,t()};e(t),r()}function $r(e,t){let r=()=>{},n=kt[t.type]||r,i=[],o=d=>i.push(d),[s,a]=xt(e);i.push(a);let c={Alpine:E,effect:s,cleanup:o,evaluateLater:h.bind(h,e),evaluate:R.bind(R,e)},l=()=>i.forEach(d=>d());At(e,t.original,l);let u=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,c),n=n.bind(n,e,t,c),We?Ge.push(n):n())};return u.runCleanups=l,u}var pe=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),me=e=>e;function Kr(e){return({name:t,value:r})=>{let{name:n,value:i}=Pt.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Pt=[];function V(e){Pt.push(e)}function jr({name:e}){return It().test(e)}var It=()=>new RegExp(`^${Ue}([^:^.]+)\\b`);function zr(e,t){return({name:r,value:n})=>{let i=r.match(It()),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(c=>c.replace(".","")),expression:n,original:a}}}var Ye="DEFAULT",he=["ignore","ref","data","bind","init","for","model","transition","show","if",Ye,"element"];function Vr(e,t){let r=he.indexOf(e.type)===-1?Ye:e.type,n=he.indexOf(t.type)===-1?Ye:t.type;return he.indexOf(r)-he.indexOf(n)}function F(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var Je=[],Qe=!1;function H(e){Je.push(e),queueMicrotask(()=>{Qe||setTimeout(()=>{ge()})})}function ge(){for(Qe=!1;Je.length;)Je.shift()()}function Lt(){Qe=!0}function M(e,t){if(e instanceof ShadowRoot){Array.from(e.children).forEach(i=>M(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)M(n,t,!1),n=n.nextElementSibling}function Ft(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function $t(){document.body||Ft("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),F(document,"alpine:init"),F(document,"alpine:initializing"),Ke(),wt(t=>k(t,M)),Et(t=>H(()=>Hr(t))),St((t,r)=>{ee(t,r).forEach(n=>n())});let e=t=>!C(t.parentNode||C(t));Array.from(document.querySelectorAll(Ze())).filter(e).forEach(t=>{k(t)}),F(document,"alpine:initialized")}var Kt=[];function Ze(){return Kt.map(e=>e())}function B(e){Kt.push(e)}function C(e){if(Ze().some(t=>e.matches(t)))return e;if(!!e.parentElement)return C(e.parentElement)}function jt(e){return Ze().some(t=>e.matches(t))}function k(e,t=M){Dt(()=>{t(e,(r,n)=>{ee(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Hr(e){M(e,t=>Le(t))}function zt(e){e(E)}var q={},Vt=!1;function Ht(e,t){if(Vt||(q=b(q),Vt=!0),t===void 0)return q[e];q[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&q[e].init()}function Bt(){return q}var Xe=!1;function U(e){return(...t)=>Xe||e(...t)}function qt(e,t){t._x_dataStack=e._x_dataStack,Xe=!0,qr(()=>{Br(t)}),Xe=!1}function Br(e){let t=!1;k(e,(n,i)=>{M(n,(o,s)=>{if(t&&jt(o))return s();t=!0,i(o,s)})})}function qr(e){let t=T;Ie((r,n)=>{let i=t(r);return j(i),()=>{}}),e(),Ie(t)}var Ut={};function Wt(e,t){Ut[e]=t}function Gt(e){return Ut[e]}var Ur={get reactive(){return b},get release(){return j},get effect(){return T},get raw(){return De},version:"3.1.1",disableEffectScheduling:gt,setReactivityEngine:_t,addRootSelector:B,mapAttributes:V,evaluateLater:h,setEvaluator:Nt,closestRoot:C,interceptor:fe,mutateDom:m,directive:p,evaluate:R,nextTick:H,prefix:Mt,plugin:zt,magic:y,store:Ht,start:$t,clone:qt,data:Wt},E=Ur;function et(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var Yi={[1]:"TEXT",[2]:"CLASS",[4]:"STYLE",[8]:"PROPS",[16]:"FULL_PROPS",[32]:"HYDRATE_EVENTS",[64]:"STABLE_FRAGMENT",[128]:"KEYED_FRAGMENT",[256]:"UNKEYED_FRAGMENT",[512]:"NEED_PATCH",[1024]:"DYNAMIC_SLOTS",[2048]:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},Ji={[1]:"STABLE",[2]:"DYNAMIC",[3]:"FORWARDED"};var Wr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var Qi=et(Wr+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Yt=Object.freeze({}),Zi=Object.freeze([]);var tt=Object.assign;var Gr=Object.prototype.hasOwnProperty,te=(e,t)=>Gr.call(e,t),D=Array.isArray,W=e=>Jt(e)==="[object Map]";var Yr=e=>typeof e=="string",_e=e=>typeof e=="symbol",re=e=>e!==null&&typeof e=="object";var Jr=Object.prototype.toString,Jt=e=>Jr.call(e),rt=e=>Jt(e).slice(8,-1);var xe=e=>Yr(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var ye=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},Qr=/-(\w)/g,Xi=ye(e=>e.replace(Qr,(t,r)=>r?r.toUpperCase():"")),Zr=/\B([A-Z])/g,eo=ye(e=>e.replace(Zr,"-$1").toLowerCase()),nt=ye(e=>e.charAt(0).toUpperCase()+e.slice(1)),to=ye(e=>e?`on${nt(e)}`:""),it=(e,t)=>e!==t&&(e===e||t===t);var ot=new WeakMap,ne=[],A,$=Symbol("iterate"),st=Symbol("Map key iterate");function Xr(e){return e&&e._isEffect===!0}function Qt(e,t=Yt){Xr(e)&&(e=e.raw);let r=en(e,t);return t.lazy||r(),r}function Xt(e){e.active&&(Zt(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var tn=0;function en(e,t){let r=function(){if(!r.active)return e();if(!ne.includes(r)){Zt(r);try{return rn(),ne.push(r),A=r,e()}finally{ne.pop(),er(),A=ne[ne.length-1]}}};return r.id=tn++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function Zt(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var G=!0,at=[];function nn(){at.push(G),G=!1}function rn(){at.push(G),G=!0}function er(){let e=at.pop();G=e===void 0?!0:e}function v(e,t,r){if(!G||A===void 0)return;let n=ot.get(e);n||ot.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(A)||(i.add(A),A.deps.push(i),A.options.onTrack&&A.options.onTrack({effect:A,target:e,type:t,key:r}))}function P(e,t,r,n,i,o){let s=ot.get(e);if(!s)return;let a=new Set,c=u=>{u&&u.forEach(d=>{(d!==A||d.allowRecurse)&&a.add(d)})};if(t==="clear")s.forEach(c);else if(r==="length"&&D(e))s.forEach((u,d)=>{(d==="length"||d>=n)&&c(u)});else switch(r!==void 0&&c(s.get(r)),t){case"add":D(e)?xe(r)&&c(s.get("length")):(c(s.get($)),W(e)&&c(s.get(st)));break;case"delete":D(e)||(c(s.get($)),W(e)&&c(s.get(st)));break;case"set":W(e)&&c(s.get($));break}let l=u=>{u.options.onTrigger&&u.options.onTrigger({effect:u,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),u.options.scheduler?u.options.scheduler(u):u()};a.forEach(l)}var on=et("__proto__,__v_isRef,__isVue"),tr=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(_e)),sn=be(),an=be(!1,!0),cn=be(!0),ln=be(!0,!0),ve={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];ve[e]=function(...r){let n=g(this);for(let o=0,s=this.length;o<s;o++)v(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(g)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];ve[e]=function(...r){nn();let n=t.apply(this,r);return er(),n}});function be(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?fn:nr:t?un:rr).get(n))return n;let s=D(n);if(!e&&s&&te(ve,i))return Reflect.get(ve,i,o);let a=Reflect.get(n,i,o);return(_e(i)?tr.has(i):on(i))||(e||v(n,"get",i),t)?a:ct(a)?!s||!xe(i)?a.value:a:re(a)?e?ir(a):we(a):a}}var dn=or(),pn=or(!0);function or(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=g(i),s=g(s),!D(r)&&ct(s)&&!ct(i)))return s.value=i,!0;let a=D(r)&&xe(n)?Number(n)<r.length:te(r,n),c=Reflect.set(r,n,i,o);return r===g(o)&&(a?it(i,s)&&P(r,"set",n,i,s):P(r,"add",n,i)),c}}function mn(e,t){let r=te(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&P(e,"delete",t,void 0,n),i}function hn(e,t){let r=Reflect.has(e,t);return(!_e(t)||!tr.has(t))&&v(e,"has",t),r}function gn(e){return v(e,"iterate",D(e)?"length":$),Reflect.ownKeys(e)}var sr={get:sn,set:dn,deleteProperty:mn,has:hn,ownKeys:gn},ar={get:cn,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},ao=tt({},sr,{get:an,set:pn}),co=tt({},ar,{get:ln}),lt=e=>re(e)?we(e):e,ut=e=>re(e)?ir(e):e,ft=e=>e,Ee=e=>Reflect.getPrototypeOf(e);function Se(e,t,r=!1,n=!1){e=e.__v_raw;let i=g(e),o=g(t);t!==o&&!r&&v(i,"get",t),!r&&v(i,"get",o);let{has:s}=Ee(i),a=n?ft:r?ut:lt;if(s.call(i,t))return a(e.get(t));if(s.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function Ae(e,t=!1){let r=this.__v_raw,n=g(r),i=g(e);return e!==i&&!t&&v(n,"has",e),!t&&v(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Oe(e,t=!1){return e=e.__v_raw,!t&&v(g(e),"iterate",$),Reflect.get(e,"size",e)}function cr(e){e=g(e);let t=g(this);return Ee(t).has.call(t,e)||(t.add(e),P(t,"add",e,e)),this}function ur(e,t){t=g(t);let r=g(this),{has:n,get:i}=Ee(r),o=n.call(r,e);o?lr(r,n,e):(e=g(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?it(t,s)&&P(r,"set",e,t,s):P(r,"add",e,t),this}function fr(e){let t=g(this),{has:r,get:n}=Ee(t),i=r.call(t,e);i?lr(t,r,e):(e=g(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,s=t.delete(e);return i&&P(t,"delete",e,void 0,o),s}function dr(){let e=g(this),t=e.size!==0,r=W(e)?new Map(e):new Set(e),n=e.clear();return t&&P(e,"clear",void 0,void 0,r),n}function Te(e,t){return function(n,i){let o=this,s=o.__v_raw,a=g(s),c=t?ft:e?ut:lt;return!e&&v(a,"iterate",$),s.forEach((l,u)=>n.call(i,c(l),c(u),o))}}function Re(e,t,r){return function(...n){let i=this.__v_raw,o=g(i),s=W(o),a=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,l=i[e](...n),u=r?ft:t?ut:lt;return!t&&v(o,"iterate",c?st:$),{next(){let{value:d,done:w}=l.next();return w?{value:d,done:w}:{value:a?[u(d[0]),u(d[1])]:u(d),done:w}},[Symbol.iterator](){return this}}}}function I(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${nt(e)} operation ${r}failed: target is readonly.`,g(this))}return e==="delete"?!1:this}}var pr={get(e){return Se(this,e)},get size(){return Oe(this)},has:Ae,add:cr,set:ur,delete:fr,clear:dr,forEach:Te(!1,!1)},mr={get(e){return Se(this,e,!1,!0)},get size(){return Oe(this)},has:Ae,add:cr,set:ur,delete:fr,clear:dr,forEach:Te(!1,!0)},hr={get(e){return Se(this,e,!0)},get size(){return Oe(this,!0)},has(e){return Ae.call(this,e,!0)},add:I("add"),set:I("set"),delete:I("delete"),clear:I("clear"),forEach:Te(!0,!1)},gr={get(e){return Se(this,e,!0,!0)},get size(){return Oe(this,!0)},has(e){return Ae.call(this,e,!0)},add:I("add"),set:I("set"),delete:I("delete"),clear:I("clear"),forEach:Te(!0,!0)},_n=["keys","values","entries",Symbol.iterator];_n.forEach(e=>{pr[e]=Re(e,!1,!1),hr[e]=Re(e,!0,!1),mr[e]=Re(e,!1,!0),gr[e]=Re(e,!0,!0)});function Ce(e,t){let r=t?e?gr:mr:e?hr:pr;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(te(r,i)&&i in n?r:n,i,o)}var xn={get:Ce(!1,!1)},lo={get:Ce(!1,!0)},yn={get:Ce(!0,!1)},uo={get:Ce(!0,!0)};function lr(e,t,r){let n=g(r);if(n!==r&&t.call(e,n)){let i=rt(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var rr=new WeakMap,un=new WeakMap,nr=new WeakMap,fn=new WeakMap;function bn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vn(e){return e.__v_skip||!Object.isExtensible(e)?0:bn(rt(e))}function we(e){return e&&e.__v_isReadonly?e:_r(e,!1,sr,xn,rr)}function ir(e){return _r(e,!0,ar,yn,nr)}function _r(e,t,r,n,i){if(!re(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let s=vn(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function g(e){return e&&g(e.__v_raw)||e}function ct(e){return Boolean(e&&e.__v_isRef===!0)}y("nextTick",()=>H);y("dispatch",e=>F.bind(F,e));y("watch",e=>(t,r)=>{let n=h(e,t),i=!0,o;T(()=>n(s=>{let a=document.createElement("div");a.dataset.throwAway=s,i||r(s,o),o=s,i=!1}))});y("store",Bt);y("refs",e=>C(e)._x_refs||{});y("el",e=>e);function Ne(e,t){return Array.isArray(t)?xr(e,t.join(" ")):typeof t=="object"&&t!==null?wn(e,t):xr(e,t)}function xr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function wn(e,t){let r=a=>a.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([a,c])=>c?r(a):!1).filter(Boolean),i=Object.entries(t).flatMap(([a,c])=>c?!1:r(a)).filter(Boolean),o=[],s=[];return i.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),n.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),o.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),o.forEach(a=>e.classList.remove(a))}}function ie(e,t){return typeof t=="object"&&t!==null?En(e,t):Sn(e,t)}function En(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],e.style[n]=i}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{ie(e,r)}}function Sn(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r)}}function oe(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}p("transition",(e,{value:t,modifiers:r,expression:n})=>{n?An(e,n,t):On(e,r,t)});function An(e,t,r){yr(e,Ne,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function On(e,t,r){yr(e,ie);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((_,x)=>x<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((_,x)=>x>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),c=s||t.includes("scale"),l=a?0:1,u=c?se(t,"scale",95)/100:1,d=se(t,"delay",0),w=se(t,"origin","center"),L="opacity, transform",K=se(t,"duration",150)/1e3,le=se(t,"duration",75)/1e3,f="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:w,transitionDelay:d,transitionProperty:L,transitionDuration:`${K}s`,transitionTimingFunction:f},e._x_transition.enter.start={opacity:l,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:w,transitionDelay:d,transitionProperty:L,transitionDuration:`${le}s`,transitionTimingFunction:f},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:l,transform:`scale(${u})`})}function yr(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){br(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end,entering:!0},n,i)},out(n=()=>{},i=()=>{}){br(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end,entering:!1},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=()=>requestAnimationFrame(r);if(t){e._x_transition?e._x_transition.in(r):i();return}e._x_hidePromise=e._x_transition?new Promise((o,s)=>{e._x_transition.out(()=>{},()=>o(n)),e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let o=vr(e);o?(o._x_hideChildren||(o._x_hideChildren=[]),o._x_hideChildren.push(e)):queueMicrotask(()=>{let s=a=>{let c=Promise.all([a._x_hidePromise,...(a._x_hideChildren||[]).map(s)]).then(([l])=>l());return delete a._x_hidePromise,delete a._x_hideChildren,c};s(e).catch(a=>{if(!a.isFromCancelledTransition)throw a})})})};function vr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:vr(t)}function br(e,t,{during:r,start:n,end:i,entering:o}={},s=()=>{},a=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){s(),a();return}let c,l,u;Tn(e,{start(){c=t(e,n)},during(){l=t(e,r)},before:s,end(){c(),u=t(e,i)},after:a,cleanup(){l(),u()}},o)}function Tn(e,t,r){let n,i,o,s=oe(()=>{m(()=>{n=!0,i||t.before(),o||(t.end(),ge()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:oe(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();s()}),finish:s,entering:r},m(()=>{t.start(),t.during()}),Lt(),requestAnimationFrame(()=>{if(n)return;let a=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,c=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;a===0&&(a=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),m(()=>{t.before()}),i=!0,requestAnimationFrame(()=>{n||(m(()=>{t.end()}),ge(),setTimeout(e._x_transitioning.finish,a+c),o=!0)})})}function se(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var wr=()=>{};wr.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};p("ignore",wr);p("effect",(e,{expression:t},{effect:r})=>r(h(e,t)));function ae(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=b({})),e._x_bindings[t]=r,t=n.includes("camel")?kn(t):t,t){case"value":Rn(e,r);break;case"style":Nn(e,r);break;case"class":Cn(e,r);break;default:Mn(e,t,r);break}}function Rn(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=Er(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>Er(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Dn(e,t);else{if(e.value===t)return;e.value=t}}function Cn(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Ne(e,t)}function Nn(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=ie(e,t)}function Mn(e,t,r){[null,void 0,!1].includes(r)&&Ln(t)?e.removeAttribute(t):(In(t)&&(r=t),Pn(e,t,r))}function Pn(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Dn(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function kn(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Er(e,t){return e==t}function In(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function Ln(e){return!["aria-pressed","aria-checked"].includes(e)}function ce(e,t,r,n){let i=e,o=c=>n(c),s={},a=(c,l)=>u=>l(c,u);if(r.includes("camel")&&(t=Fn(t)),r.includes("passive")&&(s.passive=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=a(o,(c,l)=>{l.preventDefault(),c(l)})),r.includes("stop")&&(o=a(o,(c,l)=>{l.stopPropagation(),c(l)})),r.includes("self")&&(o=a(o,(c,l)=>{l.target===e&&c(l)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=a(o,(c,l)=>{e.contains(l.target)||e.offsetWidth<1&&e.offsetHeight<1||c(l)})),o=a(o,(c,l)=>{jn(t)&&zn(l,r)||c(l)}),r.includes("debounce")){let c=r[r.indexOf("debounce")+1]||"invalid-wait",l=dt(c.split("ms")[0])?Number(c.split("ms")[0]):250;o=$n(o,l,this)}if(r.includes("throttle")){let c=r[r.indexOf("throttle")+1]||"invalid-wait",l=dt(c.split("ms")[0])?Number(c.split("ms")[0]):250;o=Kn(o,l,this)}return r.includes("once")&&(o=a(o,(c,l)=>{c(l),i.removeEventListener(t,o,s)})),i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Fn(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function $n(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function Kn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function dt(e){return!Array.isArray(e)&&!isNaN(e)}function Vn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function jn(e){return["keydown","keyup"].includes(e)}function zn(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,dt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&r[0]===Sr(e.key))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===i.length&&r[0]===Sr(e.key))}function Sr(e){switch(e){case"/":return"slash";case" ":case"Spacebar":return"space";default:return e&&Vn(e)}}p("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=h(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=h(e,s);var c=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let l=Hn(e,t,r),u=ce(e,c,t,d=>{a(()=>{},{scope:{$event:d,rightSideOfExpression:l}})});i(()=>u()),e._x_forceModelUpdate=()=>{o(d=>{d===void 0&&r.match(/\./)&&(d=""),window.fromModel=!0,m(()=>ae(e,"value",d)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function Hn(e,t,r){return e.type==="radio"&&m(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>m(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?pt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!Bn(s,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let s=o.value||o.text;return pt(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?pt(o):t.includes("trim")?o.trim():o}}})}function pt(e){let t=e?parseFloat(e):null;return qn(t)?t:e}function Bn(e,t){return e==t}function qn(e){return!Array.isArray(e)&&!isNaN(e)}p("cloak",e=>queueMicrotask(()=>m(()=>e.removeAttribute(S("cloak")))));B(()=>`[${S("init")}]`);p("init",U((e,{expression:t})=>R(e,t,{},!1)));p("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{m(()=>{e.textContent=o})})})});p("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{m(()=>{e.innerHTML=o})})})});V(pe(":",me(S("bind:"))));p("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t)return Un(e,n,i,o);if(t==="key")return Wn(e,n);let s=h(e,n);o(()=>s(a=>{a===void 0&&n.match(/\./)&&(a=""),m(()=>ae(e,t,a,r))}))});function Un(e,t,r,n){let i=h(e,t),o=[];n(()=>{for(;o.length;)o.pop()();i(s=>{let a=Object.entries(s).map(([c,l])=>({name:c,value:l}));ee(e,a,r).map(c=>{o.push(c.runCleanups),c()})})})}function Wn(e,t){e._x_keyExpression=t}B(()=>`[${S("data")}]`);p("data",U((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n=Gt(t),i={};if(n){let a=X({},e);i=n.bind(a)()}else i=R(e,t);X(i,e);let o=b(i);Tt(o);let s=z(e,o);o.init&&o.init(),r(()=>{s(),o.destroy&&o.destroy()})}));p("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=h(e,r),o=()=>m(()=>{e.style.display="none",e._x_isShown=!1}),s=()=>m(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display"),e._x_isShown=!0}),a=()=>setTimeout(s),c=oe(d=>d?s():o(),d=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,d,s,o):d?a():o()}),l,u=!0;n(()=>i(d=>{!u&&d===l||(t.includes("immediate")&&(d?a():o()),c(d),l=d,u=!1)}))});p("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Yn(t),o=h(e,i.items),s=h(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Gn(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Gn(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{Jn(s)&&s>=0&&(s=Array.from(Array(s).keys(),f=>f+1));let a=e._x_lookup,c=e._x_prevKeys,l=[],u=[];if(i(s))s=Object.entries(s).map(([f,_])=>{let x=Ar(t,_,f,s);n(O=>u.push(O),{scope:{index:f,...x}}),l.push(x)});else for(let f=0;f<s.length;f++){let _=Ar(t,s[f],f,s);n(x=>u.push(x),{scope:{index:f,..._}}),l.push(_)}let d=[],w=[],L=[],K=[];for(let f=0;f<c.length;f++){let _=c[f];u.indexOf(_)===-1&&L.push(_)}c=c.filter(f=>!L.includes(f));let le="template";for(let f=0;f<u.length;f++){let _=u[f],x=c.indexOf(_);if(x===-1)c.splice(f,0,_),d.push([le,f]);else if(x!==f){let O=c.splice(f,1)[0],N=c.splice(x-1,1)[0];c.splice(f,0,N),c.splice(x,0,O),w.push([O,N])}else K.push(_);le=_}for(let f=0;f<L.length;f++){let _=L[f];a[_].remove(),a[_]=null,delete a[_]}for(let f=0;f<w.length;f++){let[_,x]=w[f],O=a[_],N=a[x],Y=document.createElement("div");m(()=>{N.after(Y),O.after(N),Y.before(O),Y.remove()}),ze(N,l[u.indexOf(x)])}for(let f=0;f<d.length;f++){let[_,x]=d[f],O=_==="template"?o:a[_],N=l[x],Y=u[x],ue=document.importNode(o.content,!0).firstElementChild;z(ue,b(N),o),m(()=>{O.after(ue),k(ue)}),a[Y]=ue}for(let f=0;f<K.length;f++)ze(a[K[f]],l[u.indexOf(K[f])]);o._x_prevKeys=u})}function Yn(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);return a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function Ar(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{i[s]=t[a]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function Jn(e){return!Array.isArray(e)&&!isNaN(e)}function Or(){}Or.inline=(e,{expression:t},{cleanup:r})=>{let n=C(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};p("ref",Or);p("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=h(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return z(a,{},e),m(()=>{e.after(a),k(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{a.remove(),delete e._x_currentIfEl},a},s=()=>{!e._x_undoIf||(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(a=>{a?o():s()})),n(()=>e._x_undoIf&&e._x_undoIf())});V(pe("@",me(S("on:"))));p("on",U((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?h(e,n):()=>{},s=ce(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));E.setEvaluator(Be);E.setReactivityEngine({reactive:we,effect:Qt,release:Xt,raw:g});var mt=E;window.Alpine=mt;queueMicrotask(()=>{mt.start()});})();
`,e),i}}var We="x-";function S(e=""){return We+e}function kt(e){We=e}var Nt={};function p(e,t){Nt[e]=t}function Z(e,t,r){let n={};return Array.from(t).map(jr((o,s)=>n[o]=s)).filter(Kr).map(zr(n,r)).sort(Vr).map(o=>$r(e,o))}var Ge=!1,Ye=[];function Mt(e){Ge=!0;let t=()=>{for(;Ye.length;)Ye.shift()()},r=()=>{Ge=!1,t()};e(t),r()}function $r(e,t){let r=()=>{},n=Nt[t.type]||r,i=[],o=d=>i.push(d),[s,a]=_t(e);i.push(a);let c={Alpine:E,effect:s,cleanup:o,evaluateLater:h.bind(h,e),evaluate:R.bind(R,e)},l=()=>i.forEach(d=>d());St(e,t.original,l);let f=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,c),n=n.bind(n,e,t,c),Ge?Ye.push(n):n())};return f.runCleanups=l,f}var pe=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),me=e=>e;function jr(e){return({name:t,value:r})=>{let{name:n,value:i}=Dt.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Dt=[];function H(e){Dt.push(e)}function Kr({name:e}){return Pt().test(e)}var Pt=()=>new RegExp(`^${We}([^:^.]+)\\b`);function zr(e,t){return({name:r,value:n})=>{let i=r.match(Pt()),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(c=>c.replace(".","")),expression:n,original:a}}}var Je="DEFAULT",he=["ignore","ref","data","bind","init","for","model","transition","show","if",Je,"element"];function Vr(e,t){let r=he.indexOf(e.type)===-1?Je:e.type,n=he.indexOf(t.type)===-1?Je:t.type;return he.indexOf(r)-he.indexOf(n)}function L(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var Qe=[],Ze=!1;function B(e){Qe.push(e),queueMicrotask(()=>{Ze||setTimeout(()=>{ge()})})}function ge(){for(Ze=!1;Qe.length;)Qe.shift()()}function It(){Ze=!0}function N(e,t){if(e instanceof ShadowRoot){Array.from(e.children).forEach(i=>N(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)N(n,t,!1),n=n.nextElementSibling}function _e(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Lt(){document.body||_e("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),L(document,"alpine:init"),L(document,"alpine:initializing"),Ke(),vt(t=>A(t,N)),wt(t=>B(()=>Br(t))),Et((t,r)=>{Z(t,r).forEach(n=>n())});let e=t=>!C(t.parentNode||C(t));Array.from(document.querySelectorAll(Hr())).filter(e).forEach(t=>{A(t)}),L(document,"alpine:initialized")}var Xe=[],Ft=[];function $t(){return Xe.map(e=>e())}function Hr(){return Xe.concat(Ft).map(e=>e())}function ye(e){Xe.push(e)}function jt(e){Ft.push(e)}function C(e){if($t().some(t=>e.matches(t)))return e;if(!!e.parentElement)return C(e.parentElement)}function Kt(e){return $t().some(t=>e.matches(t))}function A(e,t=N){Mt(()=>{t(e,(r,n)=>{Z(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Br(e){N(e,t=>Fe(t))}function zt(e){e(E)}var q={},Vt=!1;function Ht(e,t){if(Vt||(q=b(q),Vt=!0),t===void 0)return q[e];q[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&q[e].init()}function Bt(){return q}var et=!1;function U(e){return(...t)=>et||e(...t)}function qt(e,t){t._x_dataStack=e._x_dataStack,et=!0,Ur(()=>{qr(t)}),et=!1}function qr(e){let t=!1;A(e,(n,i)=>{N(n,(o,s)=>{if(t&&Kt(o))return s();t=!0,i(o,s)})})}function Ur(e){let t=O;Le((r,n)=>{let i=t(r);return z(i),()=>{}}),e(),Le(t)}var Ut={};function Wt(e,t){Ut[e]=t}function Gt(e,t){return Object.entries(Ut).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var Wr={get reactive(){return b},get release(){return z},get effect(){return O},get raw(){return Pe},version:"3.1.1",disableEffectScheduling:ht,setReactivityEngine:gt,addRootSelector:ye,mapAttributes:H,evaluateLater:h,setEvaluator:Ct,closestRoot:C,interceptor:fe,mutateDom:m,directive:p,evaluate:R,initTree:A,nextTick:B,prefix:kt,plugin:zt,magic:x,store:Ht,start:Lt,clone:qt,data:Wt},E=Wr;function tt(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var Qi={[1]:"TEXT",[2]:"CLASS",[4]:"STYLE",[8]:"PROPS",[16]:"FULL_PROPS",[32]:"HYDRATE_EVENTS",[64]:"STABLE_FRAGMENT",[128]:"KEYED_FRAGMENT",[256]:"UNKEYED_FRAGMENT",[512]:"NEED_PATCH",[1024]:"DYNAMIC_SLOTS",[2048]:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},Zi={[1]:"STABLE",[2]:"DYNAMIC",[3]:"FORWARDED"};var Gr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var Xi=tt(Gr+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Yt={};var rt=Object.assign;var Yr=Object.prototype.hasOwnProperty,X=(e,t)=>Yr.call(e,t),M=Array.isArray,ee=e=>Jt(e)==="[object Map]";var Jr=e=>typeof e=="string",xe=e=>typeof e=="symbol",te=e=>e!==null&&typeof e=="object";var Qr=Object.prototype.toString,Jt=e=>Qr.call(e),Qt=e=>Jt(e).slice(8,-1);var be=e=>Jr(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var ve=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},Zr=/-(\w)/g,eo=ve(e=>e.replace(Zr,(t,r)=>r?r.toUpperCase():"")),Xr=/\B([A-Z])/g,to=ve(e=>e.replace(Xr,"-$1").toLowerCase()),en=ve(e=>e.charAt(0).toUpperCase()+e.slice(1)),ro=ve(e=>e?`on${en(e)}`:""),nt=(e,t)=>e!==t&&(e===e||t===t);var it=new WeakMap,re=[],F,$=Symbol(""),ot=Symbol("");function tn(e){return e&&e._isEffect===!0}function Zt(e,t=Yt){tn(e)&&(e=e.raw);let r=rn(e,t);return t.lazy||r(),r}function er(e){e.active&&(Xt(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var nn=0;function rn(e,t){let r=function(){if(!r.active)return e();if(!re.includes(r)){Xt(r);try{return on(),re.push(r),F=r,e()}finally{re.pop(),tr(),F=re[re.length-1]}}};return r.id=nn++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function Xt(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var W=!0,st=[];function sn(){st.push(W),W=!1}function on(){st.push(W),W=!0}function tr(){let e=st.pop();W=e===void 0?!0:e}function v(e,t,r){if(!W||F===void 0)return;let n=it.get(e);n||it.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(F)||(i.add(F),F.deps.push(i))}function D(e,t,r,n,i,o){let s=it.get(e);if(!s)return;let a=new Set,c=f=>{f&&f.forEach(d=>{(d!==F||d.allowRecurse)&&a.add(d)})};if(t==="clear")s.forEach(c);else if(r==="length"&&M(e))s.forEach((f,d)=>{(d==="length"||d>=n)&&c(f)});else switch(r!==void 0&&c(s.get(r)),t){case"add":M(e)?be(r)&&c(s.get("length")):(c(s.get($)),ee(e)&&c(s.get(ot)));break;case"delete":M(e)||(c(s.get($)),ee(e)&&c(s.get(ot)));break;case"set":ee(e)&&c(s.get($));break}let l=f=>{f.options.scheduler?f.options.scheduler(f):f()};a.forEach(l)}var an=tt("__proto__,__v_isRef,__isVue"),rr=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(xe)),cn=we(),ln=we(!1,!0),un=we(!0),fn=we(!0,!0),Ee={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Ee[e]=function(...r){let n=_(this);for(let o=0,s=this.length;o<s;o++)v(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(_)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];Ee[e]=function(...r){sn();let n=t.apply(this,r);return tr(),n}});function we(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?pn:ir:t?dn:nr).get(n))return n;let s=M(n);if(!e&&s&&X(Ee,i))return Reflect.get(Ee,i,o);let a=Reflect.get(n,i,o);return(xe(i)?rr.has(i):an(i))||(e||v(n,"get",i),t)?a:at(a)?!s||!be(i)?a.value:a:te(a)?e?or(a):Se(a):a}}var mn=sr(),hn=sr(!0);function sr(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=_(i),s=_(s),!M(r)&&at(s)&&!at(i)))return s.value=i,!0;let a=M(r)&&be(n)?Number(n)<r.length:X(r,n),c=Reflect.set(r,n,i,o);return r===_(o)&&(a?nt(i,s)&&D(r,"set",n,i,s):D(r,"add",n,i)),c}}function gn(e,t){let r=X(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&D(e,"delete",t,void 0,n),i}function _n(e,t){let r=Reflect.has(e,t);return(!xe(t)||!rr.has(t))&&v(e,"has",t),r}function yn(e){return v(e,"iterate",M(e)?"length":$),Reflect.ownKeys(e)}var ar={get:cn,set:mn,deleteProperty:gn,has:_n,ownKeys:yn},cr={get:un,set(e,t){return!0},deleteProperty(e,t){return!0}},lo=rt({},ar,{get:ln,set:hn}),uo=rt({},cr,{get:fn}),ct=e=>te(e)?Se(e):e,lt=e=>te(e)?or(e):e,ut=e=>e,Ae=e=>Reflect.getPrototypeOf(e);function Te(e,t,r=!1,n=!1){e=e.__v_raw;let i=_(e),o=_(t);t!==o&&!r&&v(i,"get",t),!r&&v(i,"get",o);let{has:s}=Ae(i),a=n?ut:r?lt:ct;if(s.call(i,t))return a(e.get(t));if(s.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function Oe(e,t=!1){let r=this.__v_raw,n=_(r),i=_(e);return e!==i&&!t&&v(n,"has",e),!t&&v(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Re(e,t=!1){return e=e.__v_raw,!t&&v(_(e),"iterate",$),Reflect.get(e,"size",e)}function lr(e){e=_(e);let t=_(this);return Ae(t).has.call(t,e)||(t.add(e),D(t,"add",e,e)),this}function ur(e,t){t=_(t);let r=_(this),{has:n,get:i}=Ae(r),o=n.call(r,e);o||(e=_(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?nt(t,s)&&D(r,"set",e,t,s):D(r,"add",e,t),this}function fr(e){let t=_(this),{has:r,get:n}=Ae(t),i=r.call(t,e);i||(e=_(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,s=t.delete(e);return i&&D(t,"delete",e,void 0,o),s}function dr(){let e=_(this),t=e.size!==0,r=void 0,n=e.clear();return t&&D(e,"clear",void 0,void 0,r),n}function Ce(e,t){return function(n,i){let o=this,s=o.__v_raw,a=_(s),c=t?ut:e?lt:ct;return!e&&v(a,"iterate",$),s.forEach((l,f)=>n.call(i,c(l),c(f),o))}}function ke(e,t,r){return function(...n){let i=this.__v_raw,o=_(i),s=ee(o),a=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,l=i[e](...n),f=r?ut:t?lt:ct;return!t&&v(o,"iterate",c?ot:$),{next(){let{value:d,done:w}=l.next();return w?{value:d,done:w}:{value:a?[f(d[0]),f(d[1])]:f(d),done:w}},[Symbol.iterator](){return this}}}}function P(e){return function(...t){return e==="delete"?!1:this}}var pr={get(e){return Te(this,e)},get size(){return Re(this)},has:Oe,add:lr,set:ur,delete:fr,clear:dr,forEach:Ce(!1,!1)},mr={get(e){return Te(this,e,!1,!0)},get size(){return Re(this)},has:Oe,add:lr,set:ur,delete:fr,clear:dr,forEach:Ce(!1,!0)},hr={get(e){return Te(this,e,!0)},get size(){return Re(this,!0)},has(e){return Oe.call(this,e,!0)},add:P("add"),set:P("set"),delete:P("delete"),clear:P("clear"),forEach:Ce(!0,!1)},gr={get(e){return Te(this,e,!0,!0)},get size(){return Re(this,!0)},has(e){return Oe.call(this,e,!0)},add:P("add"),set:P("set"),delete:P("delete"),clear:P("clear"),forEach:Ce(!0,!0)},xn=["keys","values","entries",Symbol.iterator];xn.forEach(e=>{pr[e]=ke(e,!1,!1),hr[e]=ke(e,!0,!1),mr[e]=ke(e,!1,!0),gr[e]=ke(e,!0,!0)});function Ne(e,t){let r=t?e?gr:mr:e?hr:pr;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(X(r,i)&&i in n?r:n,i,o)}var bn={get:Ne(!1,!1)},fo={get:Ne(!1,!0)},vn={get:Ne(!0,!1)},po={get:Ne(!0,!0)};var nr=new WeakMap,dn=new WeakMap,ir=new WeakMap,pn=new WeakMap;function wn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function En(e){return e.__v_skip||!Object.isExtensible(e)?0:wn(Qt(e))}function Se(e){return e&&e.__v_isReadonly?e:_r(e,!1,ar,bn,nr)}function or(e){return _r(e,!0,cr,vn,ir)}function _r(e,t,r,n,i){if(!te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let s=En(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function _(e){return e&&_(e.__v_raw)||e}function at(e){return Boolean(e&&e.__v_isRef===!0)}x("nextTick",()=>B);x("dispatch",e=>L.bind(L,e));x("watch",e=>(t,r)=>{let n=h(e,t),i=!0,o;O(()=>n(s=>{let a=document.createElement("div");a.dataset.throwAway=s,i?o=s:queueMicrotask(()=>{r(s,o),o=s}),i=!1}))});x("store",Bt);x("refs",e=>C(e)._x_refs||{});x("el",e=>e);function ne(e,t){return Array.isArray(t)?yr(e,t.join(" ")):typeof t=="object"&&t!==null?Sn(e,t):typeof t=="function"?ne(e,t()):yr(e,t)}function yr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(s=>!e.classList.contains(s)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function Sn(e,t){let r=a=>a.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([a,c])=>c?r(a):!1).filter(Boolean),i=Object.entries(t).flatMap(([a,c])=>c?!1:r(a)).filter(Boolean),o=[],s=[];return i.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),n.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),o.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),o.forEach(a=>e.classList.remove(a))}}function ie(e,t){return typeof t=="object"&&t!==null?An(e,t):Tn(e,t)}function An(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],e.style[n]=i}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{ie(e,r)}}function Tn(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r)}}function oe(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}p("transition",(e,{value:t,modifiers:r,expression:n})=>{n?On(e,n,t):Rn(e,r,t)});function On(e,t,r){xr(e,ne,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Rn(e,t,r){xr(e,ie);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((g,y)=>y<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((g,y)=>y>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),c=s||t.includes("scale"),l=a?0:1,f=c?se(t,"scale",95)/100:1,d=se(t,"delay",0),w=se(t,"origin","center"),I="opacity, transform",j=se(t,"duration",150)/1e3,le=se(t,"duration",75)/1e3,u="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:w,transitionDelay:d,transitionProperty:I,transitionDuration:`${j}s`,transitionTimingFunction:u},e._x_transition.enter.start={opacity:l,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:w,transitionDelay:d,transitionProperty:I,transitionDuration:`${le}s`,transitionTimingFunction:u},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:l,transform:`scale(${f})`})}function xr(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){br(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end,entering:!0},n,i)},out(n=()=>{},i=()=>{}){br(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end,entering:!1},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=()=>requestAnimationFrame(r);if(t){e._x_transition?e._x_transition.in(r):i();return}e._x_hidePromise=e._x_transition?new Promise((o,s)=>{e._x_transition.out(()=>{},()=>o(n)),e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let o=vr(e);o?(o._x_hideChildren||(o._x_hideChildren=[]),o._x_hideChildren.push(e)):queueMicrotask(()=>{let s=a=>{let c=Promise.all([a._x_hidePromise,...(a._x_hideChildren||[]).map(s)]).then(([l])=>l());return delete a._x_hidePromise,delete a._x_hideChildren,c};s(e).catch(a=>{if(!a.isFromCancelledTransition)throw a})})})};function vr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:vr(t)}function br(e,t,{during:r,start:n,end:i,entering:o}={},s=()=>{},a=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){s(),a();return}let c,l,f;Cn(e,{start(){c=t(e,n)},during(){l=t(e,r)},before:s,end(){c(),f=t(e,i)},after:a,cleanup(){l(),f()}},o)}function Cn(e,t,r){let n,i,o,s=oe(()=>{m(()=>{n=!0,i||t.before(),o||(t.end(),ge()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:oe(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();s()}),finish:s,entering:r},m(()=>{t.start(),t.during()}),It(),requestAnimationFrame(()=>{if(n)return;let a=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,c=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;a===0&&(a=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),m(()=>{t.before()}),i=!0,requestAnimationFrame(()=>{n||(m(()=>{t.end()}),ge(),setTimeout(e._x_transitioning.finish,a+c),o=!0)})})}function se(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var wr=()=>{};wr.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};p("ignore",wr);p("effect",(e,{expression:t},{effect:r})=>r(h(e,t)));function ae(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=b({})),e._x_bindings[t]=r,t=n.includes("camel")?Pn(t):t,t){case"value":kn(e,r);break;case"style":Mn(e,r);break;case"class":Nn(e,r);break;default:Dn(e,t,r);break}}function kn(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=Er(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>Er(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")In(e,t);else{if(e.value===t)return;e.value=t}}function Nn(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=ne(e,t)}function Mn(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=ie(e,t)}function Dn(e,t,r){[null,void 0,!1].includes(r)&&$n(t)?e.removeAttribute(t):(Fn(t)&&(r=t),Ln(e,t,r))}function Ln(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function In(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Pn(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Er(e,t){return e==t}function Fn(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function $n(e){return!["aria-pressed","aria-checked"].includes(e)}function ce(e,t,r,n){let i=e,o=c=>n(c),s={},a=(c,l)=>f=>l(c,f);if(r.includes("camel")&&(t=jn(t)),r.includes("passive")&&(s.passive=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=a(o,(c,l)=>{l.preventDefault(),c(l)})),r.includes("stop")&&(o=a(o,(c,l)=>{l.stopPropagation(),c(l)})),r.includes("self")&&(o=a(o,(c,l)=>{l.target===e&&c(l)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=a(o,(c,l)=>{e.contains(l.target)||e.offsetWidth<1&&e.offsetHeight<1||c(l)})),o=a(o,(c,l)=>{Vn(t)&&Hn(l,r)||c(l)}),r.includes("debounce")){let c=r[r.indexOf("debounce")+1]||"invalid-wait",l=ft(c.split("ms")[0])?Number(c.split("ms")[0]):250;o=Kn(o,l,this)}if(r.includes("throttle")){let c=r[r.indexOf("throttle")+1]||"invalid-wait",l=ft(c.split("ms")[0])?Number(c.split("ms")[0]):250;o=zn(o,l,this)}return r.includes("once")&&(o=a(o,(c,l)=>{c(l),i.removeEventListener(t,o,s)})),i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function jn(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Kn(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function zn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function ft(e){return!Array.isArray(e)&&!isNaN(e)}function Bn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Vn(e){return["keydown","keyup"].includes(e)}function Hn(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,ft((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&r[0]===Sr(e.key))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===i.length&&r[0]===Sr(e.key))}function Sr(e){switch(e){case"/":return"slash";case" ":case"Spacebar":return"space";default:return e&&Bn(e)}}p("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=h(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=h(e,s);var c=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let l=qn(e,t,r),f=ce(e,c,t,d=>{a(()=>{},{scope:{$event:d,rightSideOfExpression:l}})});i(()=>f()),e._x_forceModelUpdate=()=>{o(d=>{d===void 0&&r.match(/\./)&&(d=""),window.fromModel=!0,m(()=>ae(e,"value",d)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function qn(e,t,r){return e.type==="radio"&&m(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>m(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?dt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!Un(s,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let s=o.value||o.text;return dt(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?dt(o):t.includes("trim")?o.trim():o}}})}function dt(e){let t=e?parseFloat(e):null;return Wn(t)?t:e}function Un(e,t){return e==t}function Wn(e){return!Array.isArray(e)&&!isNaN(e)}p("cloak",e=>queueMicrotask(()=>m(()=>e.removeAttribute(S("cloak")))));jt(()=>`[${S("init")}]`);p("init",U((e,{expression:t})=>R(e,t,{},!1)));p("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{m(()=>{e.textContent=o})})})});p("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{e.innerHTML=o})})});H(pe(":",me(S("bind:"))));p("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t)return Gn(e,n,i,o);if(t==="key")return Yn(e,n);let s=h(e,n);o(()=>s(a=>{a===void 0&&n.match(/\./)&&(a=""),m(()=>ae(e,t,a,r))}))});function Gn(e,t,r,n){let i=h(e,t),o=[];n(()=>{for(;o.length;)o.pop()();i(s=>{let a=Object.entries(s).map(([c,l])=>({name:c,value:l}));Z(e,a,r).map(c=>{o.push(c.runCleanups),c()})})})}function Yn(e,t){e._x_keyExpression=t}ye(()=>`[${S("data")}]`);p("data",U((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Q(n,e);let i={};Gt(i,n),data=R(e,t,{scope:i}),Q(data,e);let o=b(data);Tt(o);let s=V(e,o);o.init&&o.init(),r(()=>{s(),o.destroy&&o.destroy()})}));p("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=h(e,r),o=()=>m(()=>{e.style.display="none",e._x_isShown=!1}),s=()=>m(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display"),e._x_isShown=!0}),a=()=>setTimeout(s),c=oe(d=>d?s():o(),d=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,d,s,o):d?a():o()}),l,f=!0;n(()=>i(d=>{!f&&d===l||(t.includes("immediate")&&(d?a():o()),c(d),l=d,f=!1)}))});p("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Qn(t),o=h(e,i.items),s=h(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Jn(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Jn(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{Zn(s)&&s>=0&&(s=Array.from(Array(s).keys(),u=>u+1));let a=e._x_lookup,c=e._x_prevKeys,l=[],f=[];if(i(s))s=Object.entries(s).map(([u,g])=>{let y=Ar(t,g,u,s);n(T=>f.push(T),{scope:{index:u,...y}}),l.push(y)});else for(let u=0;u<s.length;u++){let g=Ar(t,s[u],u,s);n(y=>f.push(y),{scope:{index:u,...g}}),l.push(g)}let d=[],w=[],I=[],j=[];for(let u=0;u<c.length;u++){let g=c[u];f.indexOf(g)===-1&&I.push(g)}c=c.filter(u=>!I.includes(u));let le="template";for(let u=0;u<f.length;u++){let g=f[u],y=c.indexOf(g);if(y===-1)c.splice(u,0,g),d.push([le,u]);else if(y!==u){let T=c.splice(u,1)[0],k=c.splice(y-1,1)[0];c.splice(u,0,k),c.splice(y,0,T),w.push([T,k])}else j.push(g);le=g}for(let u=0;u<I.length;u++){let g=I[u];a[g].remove(),a[g]=null,delete a[g]}for(let u=0;u<w.length;u++){let[g,y]=w[u],T=a[g],k=a[y],K=document.createElement("div");m(()=>{k.after(K),T.after(k),K.before(T),K.remove()}),Ve(k,l[f.indexOf(y)])}for(let u=0;u<d.length;u++){let[g,y]=d[u],T=g==="template"?o:a[g],k=l[y],K=f[y],ue=document.importNode(o.content,!0).firstElementChild;V(ue,b(k),o),m(()=>{T.after(ue),A(ue)}),typeof K=="object"&&_e("x-for key cannot be an object, it must be a string or an integer",o),a[K]=ue}for(let u=0;u<j.length;u++)Ve(a[j[u]],l[f.indexOf(j[u])]);o._x_prevKeys=f})}function Qn(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);return a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function Ar(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{i[s]=t[a]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function Zn(e){return!Array.isArray(e)&&!isNaN(e)}function Tr(){}Tr.inline=(e,{expression:t},{cleanup:r})=>{let n=C(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};p("ref",Tr);p("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=h(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return V(a,{},e),m(()=>{e.after(a),A(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{a.remove(),delete e._x_currentIfEl},a},s=()=>{!e._x_undoIf||(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(a=>{a?o():s()})),n(()=>e._x_undoIf&&e._x_undoIf())});H(pe("@",me(S("on:"))));p("on",U((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?h(e,n):()=>{},s=ce(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));E.setEvaluator(qe);E.setReactivityEngine({reactive:Se,effect:Zt,release:er,raw:_});var pt=E;window.Alpine=pt;queueMicrotask(()=>{pt.start()});})();
{
"name": "alpinejs",
"version": "3.1.1",
"version": "3.2.0",
"description": "The rugged, minimal JavaScript framework",

@@ -5,0 +5,0 @@ "author": "Caleb Porzio",

import { setReactivityEngine, disableEffectScheduling, reactive, effect, release, raw } from './reactivity'
import { mapAttributes, directive, setPrefix as prefix } from './directives'
import { setEvaluator, evaluate, evaluateLater } from './evaluator'
import { start, addRootSelector, closestRoot } from './lifecycle'
import { start, addRootSelector, closestRoot, initTree } from './lifecycle'
import { interceptor } from './interceptor'

@@ -32,2 +32,3 @@ import { mutateDom } from './mutation'

evaluate,
initTree,
nextTick,

@@ -34,0 +35,0 @@ prefix,

@@ -8,4 +8,16 @@

export function getNamedDataProvider(name) {
return datas[name]
export function injectDataProviders(obj, context) {
Object.entries(datas).forEach(([name, callback]) => {
Object.defineProperty(obj, name, {
get() {
return (...args) => {
return callback.bind(context)(...args)
}
},
enumerable: false,
})
})
return obj
}
import { directive, prefix } from '../directives'
import { initInterceptors } from '../interceptor'
import { getNamedDataProvider } from '../datas'
import { injectDataProviders } from '../datas'
import { addRootSelector } from '../lifecycle'
import { skipDuringClone } from '../clone'
import { addScopeToNode } from '../scope'
import { injectMagics } from '../magics'
import { injectMagics, magic } from '../magics'
import { reactive } from '../reactivity'

@@ -16,14 +16,10 @@ import { evaluate } from '../evaluator'

let dataProvider = getNamedDataProvider(expression)
let magicContext = {}
injectMagics(magicContext, el)
let data = {}
let dataProviderContext = {}
injectDataProviders(dataProviderContext, magicContext)
if (dataProvider) {
let magics = injectMagics({}, el)
data = evaluate(el, expression, { scope: dataProviderContext })
data = dataProvider.bind(magics)()
} else {
data = evaluate(el, expression)
}
injectMagics(data, el)

@@ -30,0 +26,0 @@

@@ -8,2 +8,3 @@ import { addScopeToNode, refreshScope } from '../scope'

import { flushJobs } from '../scheduler'
import { warn } from '../utils/warn'

@@ -181,2 +182,6 @@ directive('for', (el, { expression }, { effect, cleanup }) => {

if (typeof key === 'object') {
warn('x-for key cannot be an object, it must be a string or an integer', templateEl)
}
lookup[key] = clone

@@ -183,0 +188,0 @@ }

@@ -10,7 +10,5 @@ import { evaluateLater } from '../evaluator'

evaluate(value => {
mutateDom(() => {
el.innerHTML = value
})
el.innerHTML = value
})
})
})
import { directive, prefix } from "../directives";
import { addRootSelector } from "../lifecycle";
import { addInitSelector } from "../lifecycle";
import { skipDuringClone } from "../clone";
import { evaluate } from "../evaluator";
addRootSelector(() => `[${prefix('init')}]`)
addInitSelector(() => `[${prefix('init')}]`)
directive('init', skipDuringClone((el, { expression }) => evaluate(el, expression, {}, false)))

@@ -25,3 +25,3 @@ import { startObservingMutations, onAttributesAdded, onElAdded, onElRemoved, cleanupAttributes } from "./mutation"

Array.from(document.querySelectorAll(rootSelectors()))
Array.from(document.querySelectorAll(allSelectors()))
.filter(outNestedComponents)

@@ -36,2 +36,3 @@ .forEach(el => {

let rootSelectorCallbacks = []
let initSelectorCallbacks = []

@@ -42,3 +43,8 @@ export function rootSelectors() {

export function allSelectors() {
return rootSelectorCallbacks.concat(initSelectorCallbacks).map(fn => fn())
}
export function addRootSelector(selectorCallback) { rootSelectorCallbacks.push(selectorCallback) }
export function addInitSelector(selectorCallback) { initSelectorCallbacks.push(selectorCallback) }

@@ -45,0 +51,0 @@ export function closestRoot(el) {

@@ -17,5 +17,13 @@ import { evaluateLater } from '../evaluator'

if (! firstTime) callback(value, oldValue)
if (! firstTime) {
// We have to queue this watcher as a microtask so that
// the watcher doesn't pick up its own dependancies.
queueMicrotask(() => {
callback(value, oldValue)
oldValue = value
oldValue = value
})
} else {
oldValue = value
}

@@ -22,0 +30,0 @@ firstTime = false

@@ -7,2 +7,4 @@

return setClassesFromObject(el, value)
} else if (typeof value === 'function') {
return setClasses(el, value())
}

@@ -9,0 +11,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc