Files
theme-earth/templates/assets/dist/main.iife.js
Ryan Wang 14f8fbdb8e chore: bump dependencies
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-11-16 10:23:12 +08:00

6 lines
61 KiB
JavaScript

var main=function(P){"use strict";var He=!1,Re=!1,U=[],qe=-1;function or(e){sr(e)}function sr(e){U.includes(e)||U.push(e),lr()}function ar(e){let t=U.indexOf(e);t!==-1&&t>qe&&U.splice(t,1)}function lr(){!Re&&!He&&(He=!0,queueMicrotask(cr))}function cr(){He=!1,Re=!0;for(let e=0;e<U.length;e++)U[e](),qe=e;U.length=0,qe=-1,Re=!1}var te,W,ne,$t,Fe=!0;function ur(e){Fe=!1,e(),Fe=!0}function fr(e){te=e.reactive,ne=e.release,W=t=>e.effect(t,{scheduler:n=>{Fe?or(n):n()}}),$t=e.raw}function kt(e){W=e}function dr(e){let t=()=>{};return[r=>{let i=W(r);return 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),ne(i))},i},()=>{t()}]}function Nt(e,t){let n=!0,r,i=W(()=>{let o=e();JSON.stringify(o),n?r=o:queueMicrotask(()=>{t(o,r),r=o}),n=!1});return()=>ne(i)}var It=[],Mt=[],Pt=[];function pr(e){Pt.push(e)}function De(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Mt.push(t))}function jt(e){It.push(e)}function Ht(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function Rt(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([n,r])=>{(t===void 0||t.includes(n))&&(r.forEach(i=>i()),delete e._x_attributeCleanups[n])})}function hr(e){var t,n;for((t=e._x_effects)==null||t.forEach(ar);(n=e._x_cleanups)!=null&&n.length;)e._x_cleanups.pop()()}var Be=new MutationObserver(We),ze=!1;function Ke(){Be.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),ze=!0}function qt(){_r(),Be.disconnect(),ze=!1}var ae=[];function _r(){let e=Be.takeRecords();ae.push(()=>e.length>0&&We(e));let t=ae.length;queueMicrotask(()=>{if(ae.length===t)for(;ae.length>0;)ae.shift()()})}function w(e){if(!ze)return e();qt();let t=e();return Ke(),t}var Ue=!1,ve=[];function gr(){Ue=!0}function mr(){Ue=!1,We(ve),ve=[]}function We(e){if(Ue){ve=ve.concat(e);return}let t=new Set,n=new Set,r=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.add(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&n.add(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{r.has(s)||r.set(s,[]),r.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&l===null?c():s.hasAttribute(a)?(u(),c()):u()}i.forEach((o,s)=>{Rt(s,o)}),r.forEach((o,s)=>{It.forEach(a=>a(s,o))});for(let o of n)t.has(o)||Mt.forEach(s=>s(o));t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)n.has(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,Pt.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,n=null,r=null,i=null}function Ft(e){return ce(re(e))}function le(e,t,n){return e._x_dataStack=[t,...re(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter(r=>r!==t)}}function re(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?re(e.host):e.parentNode?re(e.parentNode):[]}function ce(e){return new Proxy({objects:e},yr)}var yr={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(t=>Object.keys(t))))},has({objects:e},t){return t==Symbol.unscopables?!1:e.some(n=>Object.prototype.hasOwnProperty.call(n,t)||Reflect.has(n,t))},get({objects:e},t,n){return t=="toJSON"?vr:Reflect.get(e.find(r=>Reflect.has(r,t))||{},t,n)},set({objects:e},t,n,r){const i=e.find(s=>Object.prototype.hasOwnProperty.call(s,t))||e[e.length-1],o=Object.getOwnPropertyDescriptor(i,t);return o!=null&&o.set&&(o!=null&&o.get)?o.set.call(r,n)||!0:Reflect.set(i,t,n)}};function vr(){return Reflect.ownKeys(this).reduce((t,n)=>(t[n]=Reflect.get(this,n),t),{})}function Dt(e){let t=r=>typeof r=="object"&&!Array.isArray(r)&&r!==null,n=(r,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(r)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0||typeof s=="object"&&s!==null&&s.__v_skip)return;let l=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?r[o]=s.initialize(e,l,o):t(s)&&s!==r&&!(s instanceof Element)&&n(s,l)})};return n(e)}function Bt(e,t=()=>{}){let n={initialValue:void 0,_x_interceptor:!0,initialize(r,i,o){return e(this.initialValue,()=>xr(r,i),s=>Ve(r,i,s),i,o)}};return t(n),r=>{if(typeof r=="object"&&r!==null&&r._x_interceptor){let i=n.initialize.bind(n);n.initialize=(o,s,a)=>{let l=r.initialize(o,s,a);return n.initialValue=l,i(o,s,a)}}else n.initialValue=r;return n}}function xr(e,t){return t.split(".").reduce((n,r)=>n[r],e)}function Ve(e,t,n){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=n;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Ve(e[t[0]],t.slice(1),n)}}var zt={};function k(e,t){zt[e]=t}function Je(e,t){let n=br(t);return Object.entries(zt).forEach(([r,i])=>{Object.defineProperty(e,`$${r}`,{get(){return i(t,n)},enumerable:!1})}),e}function br(e){let[t,n]=Yt(e),r={interceptor:Bt,...t};return De(e,n),r}function wr(e,t,n,...r){try{return n(...r)}catch(i){ue(i,e,t)}}function ue(e,t,n=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:n}),console.warn(`Alpine Expression Error: ${e.message}
${n?'Expression: "'+n+`"
`:""}`,t),setTimeout(()=>{throw e},0)}var xe=!0;function Kt(e){let t=xe;xe=!1;let n=e();return xe=t,n}function V(e,t,n={}){let r;return L(e,t)(i=>r=i,n),r}function L(...e){return Ut(...e)}var Ut=Wt;function Sr(e){Ut=e}function Wt(e,t){let n={};Je(n,e);let r=[n,...re(e)],i=typeof t=="function"?Cr(r,t):Ar(r,t,e);return wr.bind(null,e,t,i)}function Cr(e,t){return(n=()=>{},{scope:r={},params:i=[]}={})=>{let o=t.apply(ce([r,...e]),i);be(n,o)}}var Ye={};function Er(e,t){if(Ye[e])return Ye[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,o=(()=>{try{let s=new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Object.defineProperty(s,"name",{value:`[Alpine] ${e}`}),s}catch(s){return ue(s,t,e),Promise.resolve()}})();return Ye[e]=o,o}function Ar(e,t,n){let r=Er(t,n);return(i=()=>{},{scope:o={},params:s=[]}={})=>{r.result=void 0,r.finished=!1;let a=ce([o,...e]);if(typeof r=="function"){let l=r(r,a).catch(c=>ue(c,n,t));r.finished?(be(i,r.result,a,s,n),r.result=void 0):l.then(c=>{be(i,c,a,s,n)}).catch(c=>ue(c,n,t)).finally(()=>r.result=void 0)}}}function be(e,t,n,r,i){if(xe&&typeof t=="function"){let o=t.apply(n,r);o instanceof Promise?o.then(s=>be(e,s,n,r)).catch(s=>ue(s,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var Xe="x-";function ie(e=""){return Xe+e}function Or(e){Xe=e}var we={};function O(e,t){return we[e]=t,{before(n){if(!we[n]){console.warn(String.raw`Cannot find directive \`${n}\`. \`${e}\` will use the default order of execution`);return}const r=J.indexOf(n);J.splice(r>=0?r:J.indexOf("DEFAULT"),0,e)}}}function Tr(e){return Object.keys(we).includes(e)}function Ge(e,t,n){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Vt(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 r={};return t.map(Qt((o,s)=>r[o]=s)).filter(en).map(kr(r,n)).sort(Nr).map(o=>$r(e,o))}function Vt(e){return Array.from(e).map(Qt()).filter(t=>!en(t))}var Qe=!1,fe=new Map,Jt=Symbol();function Lr(e){Qe=!0;let t=Symbol();Jt=t,fe.set(t,[]);let n=()=>{for(;fe.get(t).length;)fe.get(t).shift()();fe.delete(t)},r=()=>{Qe=!1,n()};e(n),r()}function Yt(e){let t=[],n=a=>t.push(a),[r,i]=dr(e);return t.push(i),[{Alpine:_e,effect:r,cleanup:n,evaluateLater:L.bind(L,e),evaluate:V.bind(V,e)},()=>t.forEach(a=>a())]}function $r(e,t){let n=()=>{},r=we[t.type]||n,[i,o]=Yt(e);Ht(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(r.inline&&r.inline(e,t,i),r=r.bind(r,e,t,i),Qe?fe.get(Jt).push(r):r())};return s.runCleanups=o,s}var Xt=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r}),Gt=e=>e;function Qt(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:i}=Zt.reduce((o,s)=>s(o),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:i}}}var Zt=[];function Ze(e){Zt.push(e)}function en({name:e}){return tn().test(e)}var tn=()=>new RegExp(`^${Xe}([^:^.]+)\\b`);function kr(e,t){return({name:n,value:r})=>{let i=n.match(tn()),o=n.match(/:([a-zA-Z0-9\-_:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[n]||n;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:r,original:a}}}var et="DEFAULT",J=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",et,"teleport"];function Nr(e,t){let n=J.indexOf(e.type)===-1?et:e.type,r=J.indexOf(t.type)===-1?et:t.type;return J.indexOf(n)-J.indexOf(r)}function de(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function Y(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>Y(i,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)Y(r,t),r=r.nextElementSibling}function $(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var nn=!1;function Ir(){nn&&$("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),nn=!0,document.body||$("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),de(document,"alpine:init"),de(document,"alpine:initializing"),Ke(),pr(t=>R(t,Y)),De(t=>oe(t)),jt((t,n)=>{Ge(t,n).forEach(r=>r())});let e=t=>!Se(t.parentElement,!0);Array.from(document.querySelectorAll(sn().join(","))).filter(e).forEach(t=>{R(t)}),de(document,"alpine:initialized"),setTimeout(()=>{jr()})}var tt=[],rn=[];function on(){return tt.map(e=>e())}function sn(){return tt.concat(rn).map(e=>e())}function an(e){tt.push(e)}function ln(e){rn.push(e)}function Se(e,t=!1){return pe(e,n=>{if((t?sn():on()).some(i=>n.matches(i)))return!0})}function pe(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return pe(e.parentElement,t)}}function Mr(e){return on().some(t=>e.matches(t))}var cn=[];function Pr(e){cn.push(e)}function R(e,t=Y,n=()=>{}){Lr(()=>{t(e,(r,i)=>{n(r,i),cn.forEach(o=>o(r,i)),Ge(r,r.attributes).forEach(o=>o()),r._x_ignore&&i()})})}function oe(e,t=Y){t(e,n=>{hr(n),Rt(n)})}function jr(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,n,r])=>{Tr(n)||r.some(i=>{if(document.querySelector(i))return $(`found "${i}", but missing ${t} plugin`),!0})})}var nt=[],rt=!1;function it(e=()=>{}){return queueMicrotask(()=>{rt||setTimeout(()=>{ot()})}),new Promise(t=>{nt.push(()=>{e(),t()})})}function ot(){for(rt=!1;nt.length;)nt.shift()()}function Hr(){rt=!0}function st(e,t){return Array.isArray(t)?un(e,t.join(" ")):typeof t=="object"&&t!==null?Rr(e,t):typeof t=="function"?st(e,t()):un(e,t)}function un(e,t){let n=i=>i.split(" ").filter(o=>!e.classList.contains(o)).filter(Boolean),r=i=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",r(n(t))}function Rr(e,t){let n=a=>a.split(" ").filter(Boolean),r=Object.entries(t).flatMap(([a,l])=>l?n(a):!1).filter(Boolean),i=Object.entries(t).flatMap(([a,l])=>l?!1:n(a)).filter(Boolean),o=[],s=[];return i.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),r.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 Ce(e,t){return typeof t=="object"&&t!==null?qr(e,t):Fr(e,t)}function qr(e,t){let n={};return Object.entries(t).forEach(([r,i])=>{n[r]=e.style[r],r.startsWith("--")||(r=Dr(r)),e.style.setProperty(r,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ce(e,n)}}function Fr(e,t){let n=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",n||"")}}function Dr(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function at(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}O("transition",(e,{value:t,modifiers:n,expression:r},{evaluate:i})=>{typeof r=="function"&&(r=i(r)),r!==!1&&(!r||typeof r=="boolean"?zr(e,n,t):Br(e,r,t))});function Br(e,t,n){fn(e,st,""),{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}}[n](t)}function zr(e,t,n){fn(e,Ce);let r=!t.includes("in")&&!t.includes("out")&&!n,i=r||t.includes("in")||["enter"].includes(n),o=r||t.includes("out")||["leave"].includes(n);t.includes("in")&&!r&&(t=t.filter((v,S)=>S<t.indexOf("out"))),t.includes("out")&&!r&&(t=t.filter((v,S)=>S>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,u=l?he(t,"scale",95)/100:1,p=he(t,"delay",0)/1e3,f=he(t,"origin","center"),g="opacity, transform",C=he(t,"duration",150)/1e3,M=he(t,"duration",75)/1e3,h="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${p}s`,transitionProperty:g,transitionDuration:`${C}s`,transitionTimingFunction:h},e._x_transition.enter.start={opacity:c,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${p}s`,transitionProperty:g,transitionDuration:`${M}s`,transitionTimingFunction:h},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${u})`})}function fn(e,t,n={}){e._x_transition||(e._x_transition={enter:{during:n,start:n,end:n},leave:{during:n,start:n,end:n},in(r=()=>{},i=()=>{}){lt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},r,i)},out(r=()=>{},i=()=>{}){lt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},r,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,n,r){const i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let o=()=>i(n);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(n):o():e._x_transition?e._x_transition.in(n):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(r)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(r),queueMicrotask(()=>{let s=dn(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):i(()=>{let a=l=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([u])=>u==null?void 0:u());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function dn(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:dn(t)}function lt(e,t,{during:n,start:r,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(n).length===0&&Object.keys(r).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;Kr(e,{start(){a=t(e,r)},during(){l=t(e,n)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Kr(e,t){let n,r,i,o=at(()=>{w(()=>{n=!0,r||t.before(),i||(t.end(),ot()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:at(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},w(()=>{t.start(),t.during()}),Hr(),requestAnimationFrame(()=>{if(n)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),w(()=>{t.before()}),r=!0,requestAnimationFrame(()=>{n||(w(()=>{t.end()}),ot(),setTimeout(e._x_transitioning.finish,s+a),i=!0)})})}function he(e,t,n){if(e.indexOf(t)===-1)return n;const r=e[e.indexOf(t)+1];if(!r||t==="scale"&&isNaN(r))return n;if(t==="duration"||t==="delay"){let i=r.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[r,e[e.indexOf(t)+2]].join(" "):r}var q=!1;function F(e,t=()=>{}){return(...n)=>q?t(...n):e(...n)}function Ur(e){return(...t)=>q&&e(...t)}var pn=[];function Ee(e){pn.push(e)}function Wr(e,t){pn.forEach(n=>n(e,t)),q=!0,hn(()=>{R(t,(n,r)=>{r(n,()=>{})})}),q=!1}var ct=!1;function Vr(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),q=!0,ct=!0,hn(()=>{Jr(t)}),q=!1,ct=!1}function Jr(e){let t=!1;R(e,(r,i)=>{Y(r,(o,s)=>{if(t&&Mr(o))return s();t=!0,i(o,s)})})}function hn(e){let t=W;kt((n,r)=>{let i=t(n);return ne(i),()=>{}}),e(),kt(t)}function _n(e,t,n,r=[]){switch(e._x_bindings||(e._x_bindings=te({})),e._x_bindings[t]=n,t=r.includes("camel")?ni(t):t,t){case"value":Yr(e,n);break;case"style":Gr(e,n);break;case"class":Xr(e,n);break;case"selected":case"checked":Qr(e,t,n);break;default:gn(e,t,n);break}}function Yr(e,t){if(xn(e))e.attributes.value===void 0&&(e.value=t),window.fromModel&&(typeof t=="boolean"?e.checked=Ae(e.value)===t:e.checked=mn(e.value,t));else if(ut(e))Number.isInteger(t)?e.value=t:!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(n=>mn(n,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")ti(e,t);else{if(e.value===t)return;e.value=t===void 0?"":t}}function Xr(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=st(e,t)}function Gr(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ce(e,t)}function Qr(e,t,n){gn(e,t,n),ei(e,t,n)}function gn(e,t,n){[null,void 0,!1].includes(n)&&ii(t)?e.removeAttribute(t):(yn(t)&&(n=t),Zr(e,t,n))}function Zr(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}function ei(e,t,n){e[t]!==n&&(e[t]=n)}function ti(e,t){const n=[].concat(t).map(r=>r+"");Array.from(e.options).forEach(r=>{r.selected=n.includes(r.value)})}function ni(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function mn(e,t){return e==t}function Ae(e){return[1,"1","true","on","yes",!0].includes(e)?!0:[0,"0","false","off","no",!1].includes(e)?!1:e?!!e:null}var ri=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function yn(e){return ri.has(e)}function ii(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function oi(e,t,n){return e._x_bindings&&e._x_bindings[t]!==void 0?e._x_bindings[t]:vn(e,t,n)}function si(e,t,n,r=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=r,Kt(()=>V(e,i.expression))}return vn(e,t,n)}function vn(e,t,n){let r=e.getAttribute(t);return r===null?typeof n=="function"?n():n:r===""?!0:yn(t)?!![t,"true"].includes(r):r}function ut(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function xn(e){return e.type==="radio"||e.localName==="ui-radio"}function bn(e,t){var n;return function(){var r=this,i=arguments,o=function(){n=null,e.apply(r,i)};clearTimeout(n),n=setTimeout(o,t)}}function wn(e,t){let n;return function(){let r=this,i=arguments;n||(e.apply(r,i),n=!0,setTimeout(()=>n=!1,t))}}function Sn({get:e,set:t},{get:n,set:r}){let i=!0,o,s=W(()=>{let a=e(),l=n();if(i)r(ft(a)),i=!1;else{let c=JSON.stringify(a),u=JSON.stringify(l);c!==o?r(ft(a)):c!==u&&t(ft(l))}o=JSON.stringify(e()),JSON.stringify(n())});return()=>{ne(s)}}function ft(e){return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function ai(e){(Array.isArray(e)?e:[e]).forEach(n=>n(_e))}var X={},Cn=!1;function li(e,t){if(Cn||(X=te(X),Cn=!0),t===void 0)return X[e];X[e]=t,Dt(X[e]),typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&X[e].init()}function ci(){return X}var En={};function ui(e,t){let n=typeof t!="function"?()=>t:t;return e instanceof Element?An(e,n()):(En[e]=n,()=>{})}function fi(e){return Object.entries(En).forEach(([t,n])=>{Object.defineProperty(e,t,{get(){return(...r)=>n(...r)}})}),e}function An(e,t,n){let r=[];for(;r.length;)r.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Vt(i);return i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Ge(e,i,n).map(s=>{r.push(s.runCleanups),s()}),()=>{for(;r.length;)r.pop()()}}var On={};function di(e,t){On[e]=t}function pi(e,t){return Object.entries(On).forEach(([n,r])=>{Object.defineProperty(e,n,{get(){return(...i)=>r.bind(t)(...i)},enumerable:!1})}),e}var hi={get reactive(){return te},get release(){return ne},get effect(){return W},get raw(){return $t},version:"3.14.3",flushAndStopDeferringMutations:mr,dontAutoEvaluateFunctions:Kt,disableEffectScheduling:ur,startObservingMutations:Ke,stopObservingMutations:qt,setReactivityEngine:fr,onAttributeRemoved:Ht,onAttributesAdded:jt,closestDataStack:re,skipDuringClone:F,onlyDuringClone:Ur,addRootSelector:an,addInitSelector:ln,interceptClone:Ee,addScopeToNode:le,deferMutations:gr,mapAttributes:Ze,evaluateLater:L,interceptInit:Pr,setEvaluator:Sr,mergeProxies:ce,extractProp:si,findClosest:pe,onElRemoved:De,closestRoot:Se,destroyTree:oe,interceptor:Bt,transition:lt,setStyles:Ce,mutateDom:w,directive:O,entangle:Sn,throttle:wn,debounce:bn,evaluate:V,initTree:R,nextTick:it,prefixed:ie,prefix:Or,plugin:ai,magic:k,store:li,start:Ir,clone:Vr,cloneNode:Wr,bound:oi,$data:Ft,watch:Nt,walk:Y,data:di,bind:ui},_e=hi;function _i(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return i=>!!n[i]}var gi=Object.freeze({}),mi=Object.prototype.hasOwnProperty,Oe=(e,t)=>mi.call(e,t),G=Array.isArray,ge=e=>Tn(e)==="[object Map]",yi=e=>typeof e=="string",dt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",vi=Object.prototype.toString,Tn=e=>vi.call(e),Ln=e=>Tn(e).slice(8,-1),pt=e=>yi(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xi=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},bi=xi(e=>e.charAt(0).toUpperCase()+e.slice(1)),$n=(e,t)=>e!==t&&(e===e||t===t),ht=new WeakMap,me=[],j,Q=Symbol("iterate"),_t=Symbol("Map key iterate");function wi(e){return e&&e._isEffect===!0}function Si(e,t=gi){wi(e)&&(e=e.raw);const n=Ai(e,t);return t.lazy||n(),n}function Ci(e){e.active&&(kn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var Ei=0;function Ai(e,t){const n=function(){if(!n.active)return e();if(!me.includes(n)){kn(n);try{return Ti(),me.push(n),j=n,e()}finally{me.pop(),Nn(),j=me[me.length-1]}}};return n.id=Ei++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}function kn(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}var se=!0,gt=[];function Oi(){gt.push(se),se=!1}function Ti(){gt.push(se),se=!0}function Nn(){const e=gt.pop();se=e===void 0?!0:e}function N(e,t,n){if(!se||j===void 0)return;let r=ht.get(e);r||ht.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=new Set),i.has(j)||(i.add(j),j.deps.push(i),j.options.onTrack&&j.options.onTrack({effect:j,target:e,type:t,key:n}))}function D(e,t,n,r,i,o){const s=ht.get(e);if(!s)return;const a=new Set,l=u=>{u&&u.forEach(p=>{(p!==j||p.allowRecurse)&&a.add(p)})};if(t==="clear")s.forEach(l);else if(n==="length"&&G(e))s.forEach((u,p)=>{(p==="length"||p>=r)&&l(u)});else switch(n!==void 0&&l(s.get(n)),t){case"add":G(e)?pt(n)&&l(s.get("length")):(l(s.get(Q)),ge(e)&&l(s.get(_t)));break;case"delete":G(e)||(l(s.get(Q)),ge(e)&&l(s.get(_t)));break;case"set":ge(e)&&l(s.get(Q));break}const c=u=>{u.options.onTrigger&&u.options.onTrigger({effect:u,target:e,key:n,type:t,newValue:r,oldValue:i,oldTarget:o}),u.options.scheduler?u.options.scheduler(u):u()};a.forEach(c)}var Li=_i("__proto__,__v_isRef,__isVue"),In=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(dt)),$i=Pn(),ki=Pn(!0),Mn=Ni();function Ni(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=b(this);for(let o=0,s=this.length;o<s;o++)N(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(b)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Oi();const r=b(this)[t].apply(this,n);return Nn(),r}}),e}function Pn(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?Wi:zn:t?Ui:Bn).get(r))return r;const s=G(r);if(!e&&s&&Oe(Mn,i))return Reflect.get(Mn,i,o);const a=Reflect.get(r,i,o);return(dt(i)?In.has(i):Li(i))||(e||N(r,"get",i),t)?a:bt(a)?!s||!pt(i)?a.value:a:Te(a)?e?Kn(a):xt(a):a}}var Ii=Mi();function Mi(e=!1){return function(n,r,i,o){let s=n[r];if(!e&&(i=b(i),s=b(s),!G(n)&&bt(s)&&!bt(i)))return s.value=i,!0;const a=G(n)&&pt(r)?Number(r)<n.length:Oe(n,r),l=Reflect.set(n,r,i,o);return n===b(o)&&(a?$n(i,s)&&D(n,"set",r,i,s):D(n,"add",r,i)),l}}function Pi(e,t){const n=Oe(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&D(e,"delete",t,void 0,r),i}function ji(e,t){const n=Reflect.has(e,t);return(!dt(t)||!In.has(t))&&N(e,"has",t),n}function Hi(e){return N(e,"iterate",G(e)?"length":Q),Reflect.ownKeys(e)}var Ri={get:$i,set:Ii,deleteProperty:Pi,has:ji,ownKeys:Hi},qi={get:ki,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}},mt=e=>Te(e)?xt(e):e,yt=e=>Te(e)?Kn(e):e,vt=e=>e,Le=e=>Reflect.getPrototypeOf(e);function $e(e,t,n=!1,r=!1){e=e.__v_raw;const i=b(e),o=b(t);t!==o&&!n&&N(i,"get",t),!n&&N(i,"get",o);const{has:s}=Le(i),a=r?vt:n?yt:mt;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 ke(e,t=!1){const n=this.__v_raw,r=b(n),i=b(e);return e!==i&&!t&&N(r,"has",e),!t&&N(r,"has",i),e===i?n.has(e):n.has(e)||n.has(i)}function Ne(e,t=!1){return e=e.__v_raw,!t&&N(b(e),"iterate",Q),Reflect.get(e,"size",e)}function jn(e){e=b(e);const t=b(this);return Le(t).has.call(t,e)||(t.add(e),D(t,"add",e,e)),this}function Hn(e,t){t=b(t);const n=b(this),{has:r,get:i}=Le(n);let o=r.call(n,e);o?Dn(n,r,e):(e=b(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?$n(t,s)&&D(n,"set",e,t,s):D(n,"add",e,t),this}function Rn(e){const t=b(this),{has:n,get:r}=Le(t);let i=n.call(t,e);i?Dn(t,n,e):(e=b(e),i=n.call(t,e));const o=r?r.call(t,e):void 0,s=t.delete(e);return i&&D(t,"delete",e,void 0,o),s}function qn(){const e=b(this),t=e.size!==0,n=ge(e)?new Map(e):new Set(e),r=e.clear();return t&&D(e,"clear",void 0,void 0,n),r}function Ie(e,t){return function(r,i){const o=this,s=o.__v_raw,a=b(s),l=t?vt:e?yt:mt;return!e&&N(a,"iterate",Q),s.forEach((c,u)=>r.call(i,l(c),l(u),o))}}function Me(e,t,n){return function(...r){const i=this.__v_raw,o=b(i),s=ge(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...r),u=n?vt:t?yt:mt;return!t&&N(o,"iterate",l?_t:Q),{next(){const{value:p,done:f}=c.next();return f?{value:p,done:f}:{value:a?[u(p[0]),u(p[1])]:u(p),done:f}},[Symbol.iterator](){return this}}}}function B(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${bi(e)} operation ${n}failed: target is readonly.`,b(this))}return e==="delete"?!1:this}}function Fi(){const e={get(o){return $e(this,o)},get size(){return Ne(this)},has:ke,add:jn,set:Hn,delete:Rn,clear:qn,forEach:Ie(!1,!1)},t={get(o){return $e(this,o,!1,!0)},get size(){return Ne(this)},has:ke,add:jn,set:Hn,delete:Rn,clear:qn,forEach:Ie(!1,!0)},n={get(o){return $e(this,o,!0)},get size(){return Ne(this,!0)},has(o){return ke.call(this,o,!0)},add:B("add"),set:B("set"),delete:B("delete"),clear:B("clear"),forEach:Ie(!0,!1)},r={get(o){return $e(this,o,!0,!0)},get size(){return Ne(this,!0)},has(o){return ke.call(this,o,!0)},add:B("add"),set:B("set"),delete:B("delete"),clear:B("clear"),forEach:Ie(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Me(o,!1,!1),n[o]=Me(o,!0,!1),t[o]=Me(o,!1,!0),r[o]=Me(o,!0,!0)}),[e,n,t,r]}var[Di,Bi,Ro,qo]=Fi();function Fn(e,t){const n=e?Bi:Di;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(Oe(n,i)&&i in r?n:r,i,o)}var zi={get:Fn(!1)},Ki={get:Fn(!0)};function Dn(e,t,n){const r=b(n);if(r!==n&&t.call(e,r)){const i=Ln(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 Bn=new WeakMap,Ui=new WeakMap,zn=new WeakMap,Wi=new WeakMap;function Vi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ji(e){return e.__v_skip||!Object.isExtensible(e)?0:Vi(Ln(e))}function xt(e){return e&&e.__v_isReadonly?e:Un(e,!1,Ri,zi,Bn)}function Kn(e){return Un(e,!0,qi,Ki,zn)}function Un(e,t,n,r,i){if(!Te(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=Ji(e);if(s===0)return e;const a=new Proxy(e,s===2?r:n);return i.set(e,a),a}function b(e){return e&&b(e.__v_raw)||e}function bt(e){return!!(e&&e.__v_isRef===!0)}k("nextTick",()=>it),k("dispatch",e=>de.bind(de,e)),k("watch",(e,{evaluateLater:t,cleanup:n})=>(r,i)=>{let o=t(r),a=Nt(()=>{let l;return o(c=>l=c),l},i);n(a)}),k("store",ci),k("data",e=>Ft(e)),k("root",e=>Se(e)),k("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=ce(Yi(e))),e._x_refs_proxy));function Yi(e){let t=[];return pe(e,n=>{n._x_refs&&t.push(n._x_refs)}),t}var wt={};function Wn(e){return wt[e]||(wt[e]=0),++wt[e]}function Xi(e,t){return pe(e,n=>{if(n._x_ids&&n._x_ids[t])return!0})}function Gi(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Wn(t))}k("id",(e,{cleanup:t})=>(n,r=null)=>{let i=`${n}${r?`-${r}`:""}`;return Qi(e,i,t,()=>{let o=Xi(e,n),s=o?o._x_ids[n]:Wn(n);return r?`${n}-${s}-${r}`:`${n}-${s}`})}),Ee((e,t)=>{e._x_id&&(t._x_id=e._x_id)});function Qi(e,t,n,r){if(e._x_id||(e._x_id={}),e._x_id[t])return e._x_id[t];let i=r();return e._x_id[t]=i,n(()=>{delete e._x_id[t]}),i}k("el",e=>e),Vn("Focus","focus","focus"),Vn("Persist","persist","persist");function Vn(e,t,n){k(t,r=>$(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,r))}O("modelable",(e,{expression:t},{effect:n,evaluateLater:r,cleanup:i})=>{let o=r(t),s=()=>{let u;return o(p=>u=p),u},a=r(`${t} = __placeholder`),l=u=>a(()=>{},{scope:{__placeholder:u}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,p=e._x_model.set,f=Sn({get(){return u()},set(g){p(g)}},{get(){return s()},set(g){l(g)}});i(f)})}),O("teleport",(e,{modifiers:t,expression:n},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&$("x-teleport can only be used on a <template> tag",e);let i=Jn(n),o=e.content.cloneNode(!0).firstElementChild;e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents&&e._x_forwardEvents.forEach(a=>{o.addEventListener(a,l=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})}),le(o,{},e);let s=(a,l,c)=>{c.includes("prepend")?l.parentNode.insertBefore(a,l):c.includes("append")?l.parentNode.insertBefore(a,l.nextSibling):l.appendChild(a)};w(()=>{s(o,i,t),F(()=>{R(o),o._x_ignore=!0})()}),e._x_teleportPutBack=()=>{let a=Jn(n);w(()=>{s(e._x_teleport,a,t)})},r(()=>w(()=>{o.remove(),oe(o)}))});var Zi=document.createElement("div");function Jn(e){let t=F(()=>document.querySelector(e),()=>Zi)();return t||$(`Cannot find x-teleport element for selector: "${e}"`),t}var Yn=()=>{};Yn.inline=(e,{modifiers:t},{cleanup:n})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,n(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})},O("ignore",Yn),O("effect",F((e,{expression:t},{effect:n})=>{n(L(e,t))}));function St(e,t,n,r){let i=e,o=l=>r(l),s={},a=(l,c)=>u=>c(l,u);if(n.includes("dot")&&(t=eo(t)),n.includes("camel")&&(t=to(t)),n.includes("passive")&&(s.passive=!0),n.includes("capture")&&(s.capture=!0),n.includes("window")&&(i=window),n.includes("document")&&(i=document),n.includes("debounce")){let l=n[n.indexOf("debounce")+1]||"invalid-wait",c=Pe(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=bn(o,c)}if(n.includes("throttle")){let l=n[n.indexOf("throttle")+1]||"invalid-wait",c=Pe(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=wn(o,c)}return n.includes("prevent")&&(o=a(o,(l,c)=>{c.preventDefault(),l(c)})),n.includes("stop")&&(o=a(o,(l,c)=>{c.stopPropagation(),l(c)})),n.includes("once")&&(o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)})),(n.includes("away")||n.includes("outside"))&&(i=document,o=a(o,(l,c)=>{e.contains(c.target)||c.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(c))})),n.includes("self")&&(o=a(o,(l,c)=>{c.target===e&&l(c)})),(ro(t)||Xn(t))&&(o=a(o,(l,c)=>{io(c,n)||l(c)})),i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function eo(e){return e.replace(/-/g,".")}function to(e){return e.toLowerCase().replace(/-(\w)/g,(t,n)=>n.toUpperCase())}function Pe(e){return!Array.isArray(e)&&!isNaN(e)}function no(e){return[" ","_"].includes(e)?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ro(e){return["keydown","keyup"].includes(e)}function Xn(e){return["contextmenu","click","mouse"].some(t=>e.includes(t))}function io(e,t){let n=t.filter(o=>!["window","document","prevent","stop","once","capture","self","away","outside","passive"].includes(o));if(n.includes("debounce")){let o=n.indexOf("debounce");n.splice(o,Pe((n[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.includes("throttle")){let o=n.indexOf("throttle");n.splice(o,Pe((n[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(n.length===0||n.length===1&&Gn(e.key).includes(n[0]))return!1;const i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>n.includes(o));return n=n.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===i.length&&(Xn(e.type)||Gn(e.key).includes(n[0])))}function Gn(e){if(!e)return[];e=no(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map(n=>{if(t[n]===e)return n}).filter(n=>n)}O("model",(e,{modifiers:t,expression:n},{effect:r,cleanup:i})=>{let o=e;t.includes("parent")&&(o=e.parentNode);let s=L(o,n),a;typeof n=="string"?a=L(o,`${n} = __placeholder`):typeof n=="function"&&typeof n()=="string"?a=L(o,`${n()} = __placeholder`):a=()=>{};let l=()=>{let f;return s(g=>f=g),Qn(f)?f.get():f},c=f=>{let g;s(C=>g=C),Qn(g)?g.set(f):a(()=>{},{scope:{__placeholder:f}})};typeof n=="string"&&e.type==="radio"&&w(()=>{e.hasAttribute("name")||e.setAttribute("name",n)});var u=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let p=q?()=>{}:St(e,u,t,f=>{c(Ct(e,t,f,l()))});if(t.includes("fill")&&([void 0,null,""].includes(l())||ut(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)&&c(Ct(e,t,{target:e},l())),e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=p,i(()=>e._x_removeModelListeners.default()),e.form){let f=St(e.form,"reset",[],g=>{it(()=>e._x_model&&e._x_model.set(Ct(e,t,{target:e},l())))});i(()=>f())}e._x_model={get(){return l()},set(f){c(f)}},e._x_forceModelUpdate=f=>{f===void 0&&typeof n=="string"&&n.match(/\./)&&(f=""),window.fromModel=!0,w(()=>_n(e,"value",f)),delete window.fromModel},r(()=>{let f=l();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(f)})});function Ct(e,t,n,r){return w(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail!==null&&n.detail!==void 0?n.detail:n.target.value;if(ut(e))if(Array.isArray(r)){let i=null;return t.includes("number")?i=Et(n.target.value):t.includes("boolean")?i=Ae(n.target.value):i=n.target.value,n.target.checked?r.includes(i)?r:r.concat([i]):r.filter(o=>!oo(o,i))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(i=>{let o=i.value||i.text;return Et(o)}):t.includes("boolean")?Array.from(n.target.selectedOptions).map(i=>{let o=i.value||i.text;return Ae(o)}):Array.from(n.target.selectedOptions).map(i=>i.value||i.text);{let i;return xn(e)?n.target.checked?i=n.target.value:i=r:i=n.target.value,t.includes("number")?Et(i):t.includes("boolean")?Ae(i):t.includes("trim")?i.trim():i}}})}function Et(e){let t=e?parseFloat(e):null;return so(t)?t:e}function oo(e,t){return e==t}function so(e){return!Array.isArray(e)&&!isNaN(e)}function Qn(e){return e!==null&&typeof e=="object"&&typeof e.get=="function"&&typeof e.set=="function"}O("cloak",e=>queueMicrotask(()=>w(()=>e.removeAttribute(ie("cloak"))))),ln(()=>`[${ie("init")}]`),O("init",F((e,{expression:t},{evaluate:n})=>typeof t=="string"?!!t.trim()&&n(t,{},!1):n(t,{},!1))),O("text",(e,{expression:t},{effect:n,evaluateLater:r})=>{let i=r(t);n(()=>{i(o=>{w(()=>{e.textContent=o})})})}),O("html",(e,{expression:t},{effect:n,evaluateLater:r})=>{let i=r(t);n(()=>{i(o=>{w(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,R(e),delete e._x_ignoreSelf})})})}),Ze(Xt(":",Gt(ie("bind:"))));var Zn=(e,{value:t,modifiers:n,expression:r,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};fi(l),L(e,r)(u=>{An(e,u,i)},{scope:l});return}if(t==="key")return ao(e,r);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=L(e,r);o(()=>a(l=>{l===void 0&&typeof r=="string"&&r.match(/\./)&&(l=""),w(()=>_n(e,t,l,n))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})};Zn.inline=(e,{value:t,modifiers:n,expression:r})=>{t&&(e._x_inlineBindings||(e._x_inlineBindings={}),e._x_inlineBindings[t]={expression:r,extract:!1})},O("bind",Zn);function ao(e,t){e._x_keyExpression=t}an(()=>`[${ie("data")}]`),O("data",(e,{expression:t},{cleanup:n})=>{if(lo(e))return;t=t===""?"{}":t;let r={};Je(r,e);let i={};pi(i,r);let o=V(e,t,{scope:i});(o===void 0||o===!0)&&(o={}),Je(o,e);let s=te(o);Dt(s);let a=le(e,s);s.init&&V(e,s.init),n(()=>{s.destroy&&V(e,s.destroy),a()})}),Ee((e,t)=>{e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0))});function lo(e){return q?ct?!0:e.hasAttribute("data-has-alpine-state"):!1}O("show",(e,{modifiers:t,expression:n},{effect:r})=>{let i=L(e,n);e._x_doHide||(e._x_doHide=()=>{w(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{w(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=at(p=>p?s():o(),p=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,p,s,o):p?a():o()}),c,u=!0;r(()=>i(p=>{!u&&p===c||(t.includes("immediate")&&(p?a():o()),l(p),c=p,u=!1)}))}),O("for",(e,{expression:t},{effect:n,cleanup:r})=>{let i=uo(t),o=L(e,i.items),s=L(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},n(()=>co(e,i,o,s)),r(()=>{Object.values(e._x_lookup).forEach(a=>w(()=>{oe(a),a.remove()})),delete e._x_prevKeys,delete e._x_lookup})});function co(e,t,n,r){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;n(s=>{fo(s)&&s>=0&&(s=Array.from(Array(s).keys(),h=>h+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,c=[],u=[];if(i(s))s=Object.entries(s).map(([h,v])=>{let S=er(t,v,h,s);r(A=>{u.includes(A)&&$("Duplicate key on x-for",e),u.push(A)},{scope:{index:h,...S}}),c.push(S)});else for(let h=0;h<s.length;h++){let v=er(t,s[h],h,s);r(S=>{u.includes(S)&&$("Duplicate key on x-for",e),u.push(S)},{scope:{index:h,...v}}),c.push(v)}let p=[],f=[],g=[],C=[];for(let h=0;h<l.length;h++){let v=l[h];u.indexOf(v)===-1&&g.push(v)}l=l.filter(h=>!g.includes(h));let M="template";for(let h=0;h<u.length;h++){let v=u[h],S=l.indexOf(v);if(S===-1)l.splice(h,0,v),p.push([M,h]);else if(S!==h){let A=l.splice(h,1)[0],T=l.splice(S-1,1)[0];l.splice(h,0,T),l.splice(S,0,A),f.push([A,T])}else C.push(v);M=v}for(let h=0;h<g.length;h++){let v=g[h];v in a&&(w(()=>{oe(a[v]),a[v].remove()}),delete a[v])}for(let h=0;h<f.length;h++){let[v,S]=f[h],A=a[v],T=a[S],z=document.createElement("div");w(()=>{T||$('x-for ":key" is undefined or invalid',o,S,a),T.after(z),A.after(T),T._x_currentIfEl&&T.after(T._x_currentIfEl),z.before(A),A._x_currentIfEl&&A.after(A._x_currentIfEl),z.remove()}),T._x_refreshXForScope(c[u.indexOf(S)])}for(let h=0;h<p.length;h++){let[v,S]=p[h],A=v==="template"?o:a[v];A._x_currentIfEl&&(A=A._x_currentIfEl);let T=c[S],z=u[S],d=document.importNode(o.content,!0).firstElementChild,m=te(T);le(d,m,o),d._x_refreshXForScope=x=>{Object.entries(x).forEach(([E,y])=>{m[E]=y})},w(()=>{A.after(d),F(()=>R(d))()}),typeof z=="object"&&$("x-for key cannot be an object, it must be a string or an integer",o),a[z]=d}for(let h=0;h<C.length;h++)a[C[h]]._x_refreshXForScope(c[u.indexOf(C[h])]);o._x_prevKeys=u})}function uo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,n=/^\s*\(|\)\s*$/g,r=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(r);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(n,"").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 er(e,t,n,r){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]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{i[s]=t[s]}):i[e.item]=t,e.index&&(i[e.index]=n),e.collection&&(i[e.collection]=r),i}function fo(e){return!Array.isArray(e)&&!isNaN(e)}function tr(){}tr.inline=(e,{expression:t},{cleanup:n})=>{let r=Se(e);r._x_refs||(r._x_refs={}),r._x_refs[t]=e,n(()=>delete r._x_refs[t])},O("ref",tr),O("if",(e,{expression:t},{effect:n,cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&$("x-if can only be used on a <template> tag",e);let i=L(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return le(a,{},e),w(()=>{e.after(a),F(()=>R(a))()}),e._x_currentIfEl=a,e._x_undoIf=()=>{w(()=>{oe(a),a.remove()}),delete e._x_currentIfEl},a},s=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};n(()=>i(a=>{a?o():s()})),r(()=>e._x_undoIf&&e._x_undoIf())}),O("id",(e,{expression:t},{evaluate:n})=>{n(t).forEach(i=>Gi(e,i))}),Ee((e,t)=>{e._x_ids&&(t._x_ids=e._x_ids)}),Ze(Xt("@",Gt(ie("on:")))),O("on",F((e,{value:t,modifiers:n,expression:r},{cleanup:i})=>{let o=r?L(e,r):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=St(e,t,n,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())})),je("Collapse","collapse","collapse"),je("Intersect","intersect","intersect"),je("Focus","trap","focus"),je("Mask","mask","mask");function je(e,t,n){O(t,r=>$(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${n}`,r))}_e.setEvaluator(Wt),_e.setReactivityEngine({reactive:xt,effect:Si,release:Ci,raw:b});var po=_e,Z=po;function ho(e){const t=[].forEach,n=[].some,r=typeof window<"u"&&document.body,i=" ";let o,s=!0;function a(d,m){const x=m.appendChild(c(d));if(d.children.length){const E=u(d.isCollapsed);d.children.forEach(y=>{a(y,E)}),x.appendChild(E)}}function l(d,m){const E=u(!1);if(m.forEach(y=>{a(y,E)}),o=d||o,o!==null)return o.firstChild&&o.removeChild(o.firstChild),m.length===0?o:o.appendChild(E)}function c(d){const m=document.createElement("li"),x=document.createElement("a");return e.listItemClass&&m.setAttribute("class",e.listItemClass),e.onClick&&(x.onclick=e.onClick),e.includeTitleTags&&x.setAttribute("title",d.textContent),e.includeHtml&&d.childNodes.length?t.call(d.childNodes,E=>{x.appendChild(E.cloneNode(!0))}):x.textContent=d.textContent,x.setAttribute("href",`${e.basePath}#${d.id}`),x.setAttribute("class",`${e.linkClass+i}node-name--${d.nodeName}${i}${e.extraLinkClasses}`),m.appendChild(x),m}function u(d){const m=e.orderedList?"ol":"ul",x=document.createElement(m);let E=e.listClass+i+e.extraListClasses;return d&&(E=E+i+e.collapsibleClass,E=E+i+e.isCollapsedClass),x.setAttribute("class",E),x}function p(){const d=A(),m=document.querySelector(e.positionFixedSelector);e.fixedSidebarOffset==="auto"&&(e.fixedSidebarOffset=o.offsetTop),d>e.fixedSidebarOffset?m.className.indexOf(e.positionFixedClass)===-1&&(m.className+=i+e.positionFixedClass):m.className=m.className.replace(i+e.positionFixedClass,"")}function f(d){let m=0;return d!==null&&(m=d.offsetTop,e.hasInnerContainers&&(m+=f(d.offsetParent))),m}function g(d,m){return d&&d.className!==m&&(d.className=m),d}function C(d){e.positionFixedSelector&&p();const m=d;if(s&&o&&m.length>0){const x=T(m),E=o.querySelector(`.${e.activeLinkClass}`),y=o.querySelector(`.${e.linkClass}.node-name--${x.nodeName}[href="${e.basePath}#${x.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")}"]`);if(E===y)return;const Tt=o.querySelectorAll(`.${e.linkClass}`);t.call(Tt,K=>{g(K,K.className.replace(i+e.activeLinkClass,""))});const jo=o.querySelectorAll(`.${e.listItemClass}`);t.call(jo,K=>{g(K,K.className.replace(i+e.activeListItemClass,""))}),y&&y.className.indexOf(e.activeLinkClass)===-1&&(y.className+=i+e.activeLinkClass);const Lt=y==null?void 0:y.parentNode;Lt&&Lt.className.indexOf(e.activeListItemClass)===-1&&(Lt.className+=i+e.activeListItemClass);const Ho=o.querySelectorAll(`.${e.listClass}.${e.collapsibleClass}`);t.call(Ho,K=>{K.className.indexOf(e.isCollapsedClass)===-1&&(K.className+=i+e.isCollapsedClass)}),y!=null&&y.nextSibling&&y.nextSibling.className.indexOf(e.isCollapsedClass)!==-1&&g(y.nextSibling,y.nextSibling.className.replace(i+e.isCollapsedClass,"")),M(y==null?void 0:y.parentNode.parentNode)}}function M(d){return d&&d.className.indexOf(e.collapsibleClass)!==-1&&d.className.indexOf(e.isCollapsedClass)!==-1?(g(d,d.className.replace(i+e.isCollapsedClass,"")),M(d.parentNode.parentNode)):d}function h(d){const m=d.target||d.srcElement;typeof m.className!="string"||m.className.indexOf(e.linkClass)===-1||(s=!1)}function v(){s=!0}function S(){return s}function A(){let d;return e.scrollContainer&&document.querySelector(e.scrollContainer)?d=document.querySelector(e.scrollContainer).scrollTop:d=document.documentElement.scrollTop||r.scrollTop,d}function T(d,m=A()){let x;return n.call(d,(E,y)=>{if(f(E)>m+e.headingsOffset+10){const Tt=y===0?y:y-1;return x=d[Tt],!0}if(y===d.length-1)return x=d[d.length-1],!0}),x}function z(d){const m=A(),x=T(d,m);if(!x||m<5)window.location.hash==="#"||window.location.hash===""||window.history.pushState(null,null,"#");else if(x){const E=`#${x.id}`;window.location.hash!==E&&window.history.pushState(null,null,E)}}return{enableTocAnimation:v,disableTocAnimation:h,render:l,updateToc:C,getCurrentlyHighlighting:S,getTopHeader:T,getScrollTop:A,updateUrlHashForHeader:z}}const _o={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,enableUrlHashUpdateOnScroll:!1};function go(e){const t=[].reduce;function n(c){return c[c.length-1]}function r(c){return+c.nodeName.toUpperCase().replace("H","")}function i(c){try{return c instanceof window.HTMLElement||c instanceof window.parent.HTMLElement}catch{return c instanceof window.HTMLElement}}function o(c){if(!i(c))return c;if(e.ignoreHiddenElements&&(!c.offsetHeight||!c.offsetParent))return null;const u=c.getAttribute("data-heading-label")||(e.headingLabelCallback?String(e.headingLabelCallback(c.innerText)):(c.innerText||c.textContent).trim()),p={id:c.id,children:[],nodeName:c.nodeName,headingLevel:r(c),textContent:u};return e.includeHtml&&(p.childNodes=c.childNodes),e.headingObjectCallback?e.headingObjectCallback(p,c):p}function s(c,u){const p=o(c),f=p.headingLevel;let g=u,C=n(g);const M=C?C.headingLevel:0;let h=f-M;for(;h>0&&(C=n(g),!(C&&f===C.headingLevel));)C&&C.children!==void 0&&(g=C.children),h--;return f>=e.collapseDepth&&(p.isCollapsed=!0),g.push(p),g}function a(c,u){let p=u;e.ignoreSelector&&(p=u.split(",").map(function(g){return`${g.trim()}:not(${e.ignoreSelector})`}));try{return c.querySelectorAll(p)}catch{return console.warn(`Headers not found with selector: ${p}`),null}}function l(c){return t.call(c,function(p,f){const g=o(f);return g&&s(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:l,selectHeadings:a}}function mo(e){var t=e.duration,n=e.offset;if(typeof window>"u"||typeof location>"u")return;var r=location.hash?s(location.href):location.href;i();function i(){document.body.addEventListener("click",l,!1);function l(c){!o(c.target)||c.target.className.indexOf("no-smooth-scroll")>-1||c.target.href.charAt(c.target.href.length-2)==="#"&&c.target.href.charAt(c.target.href.length-1)==="!"||c.target.className.indexOf(e.linkClass)===-1||yo(c.target.hash,{duration:t,offset:n,callback:function(){a(c.target.hash)}})}}function o(l){return l.tagName.toLowerCase()==="a"&&(l.hash.length>0||l.href.charAt(l.href.length-1)==="#")&&(s(l.href)===r||s(l.href)+"#"===r)}function s(l){return l.slice(0,l.lastIndexOf("#"))}function a(l){var c=document.getElementById(l.substring(1));c&&(/^(?:a|select|input|button|textarea)$/i.test(c.tagName)||(c.tabIndex=-1),c.focus())}}function yo(e,t){var n=window.pageYOffset,r={duration:t.duration,offset:t.offset||0,callback:t.callback,easing:t.easing||p},i=document.querySelector('[id="'+decodeURI(e).split("#").join("")+'"]')||document.querySelector('[id="'+e.split("#").join("")+'"]'),o=typeof e=="string"?r.offset+(e?i&&i.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):e,s=typeof r.duration=="function"?r.duration(o):r.duration,a,l;requestAnimationFrame(function(f){a=f,c(f)});function c(f){l=f-a,window.scrollTo(0,r.easing(l,n,o,s)),l<s?requestAnimationFrame(c):u()}function u(){window.scrollTo(0,n+o),typeof r.callback=="function"&&r.callback()}function p(f,g,C,M){return f/=M/2,f<1?C/2*f*f+g:(f--,-C/2*(f*(f-2)-1)+g)}}function vo(e){const t=e.tocScrollingWrapper||e.tocElement||document.querySelector(e.tocSelector);if(t&&t.scrollHeight>t.clientHeight){const n=t.querySelector(`.${e.activeListItemClass}`);if(n){const i=n.offsetTop-e.tocScrollOffset;t.scrollTop=i>0?i:0}}}let _={},I,At,ee,H,ye;function xo(e){_=So(_o,e||{}),_.scrollSmooth&&(_.duration=_.scrollSmoothDuration,_.offset=_.scrollSmoothOffset,mo(_)),I=ho(_),At=go(_),bo();const t=Co(_);if(t===null)return;const n=rr(_);if(n===null||(ee=At.selectHeadings(t,_.headingSelector),ee===null))return;const i=At.nestHeadingsArray(ee).nest;if(!_.skipRendering)I.render(n,i);else return this;let o=!1;H=nr(a=>{var c;I.updateToc(ee),!_.disableTocScrollSync&&!o&&vo(_),_.enableUrlHashUpdateOnScroll&&I.getCurrentlyHighlighting()&&I.updateUrlHashForHeader(ee);const l=((c=a==null?void 0:a.target)==null?void 0:c.scrollingElement)&&a.target.scrollingElement.scrollTop===0;(a&&(a.eventPhase===0||a.currentTarget===null)||l)&&(I.updateToc(ee),_.scrollEndCallback&&_.scrollEndCallback(a))},_.throttleTimeout),H(),_.scrollContainer&&document.querySelector(_.scrollContainer)?(document.querySelector(_.scrollContainer).addEventListener("scroll",H,!1),document.querySelector(_.scrollContainer).addEventListener("resize",H,!1)):(document.addEventListener("scroll",H,!1),document.addEventListener("resize",H,!1));let s=null;ye=nr(a=>{o=!0,_.scrollSmooth&&I.disableTocAnimation(a),I.updateToc(ee),s&&clearTimeout(s),s=setTimeout(()=>{I.enableTocAnimation()},_.scrollSmoothDuration),setTimeout(()=>{o=!1},_.scrollSmoothDuration+100)},_.throttleTimeout),_.scrollContainer&&document.querySelector(_.scrollContainer)?document.querySelector(_.scrollContainer).addEventListener("click",ye,!1):document.addEventListener("click",ye,!1)}function bo(){const e=rr(_);e!==null&&(_.skipRendering||e&&(e.innerHTML=""),_.scrollContainer&&document.querySelector(_.scrollContainer)?(document.querySelector(_.scrollContainer).removeEventListener("scroll",H,!1),document.querySelector(_.scrollContainer).removeEventListener("resize",H,!1),I&&document.querySelector(_.scrollContainer).removeEventListener("click",ye,!1)):(document.removeEventListener("scroll",H,!1),document.removeEventListener("resize",H,!1),I&&document.removeEventListener("click",ye,!1)))}const wo=Object.prototype.hasOwnProperty;function So(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)wo.call(r,i)&&(t[i]=r[i])}return t}function nr(e,t,n){t||(t=250);let r,i;return function(...o){const s=this,a=+new Date;r&&a<r+t?(clearTimeout(i),i=setTimeout(()=>{r=a,e.apply(s,o)},t)):(r=a,e.apply(s,o))}}function Co(e){try{return e.contentElement||document.querySelector(e.contentSelector)}catch{return console.warn(`Contents element not found: ${e.contentSelector}`),null}}function rr(e){try{return e.tocElement||document.querySelector(e.tocSelector)}catch{return console.warn(`TOC element not found: ${e.tocSelector}`),null}}const Eo=()=>({show:!1,timer:0,open:function(){this.timer&&window.clearTimeout(this.timer),this.show=!0},close:function(){this.timer=window.setTimeout(()=>this.show=!1,300)}}),Ao=()=>({colorSchemes:[{label:"暗色",value:"dark",icon:"i-gg-moon"},{label:"亮色",value:"light",icon:"i-gg-sun"},{label:"跟随系统",value:"system",icon:"i-gg-dark-mode"}],currentValue:P.currentColorScheme,get colorScheme(){return this.colorSchemes.find(e=>e.value===this.currentValue)},get nextColorScheme(){const e=this.colorSchemes.findIndex(t=>t.value===this.currentValue);return this.colorSchemes[(e+1)%this.colorSchemes.length]}}),Oo=(e,t,n)=>({upvotedNames:[],init(){this.upvotedNames=JSON.parse(localStorage.getItem(`halo.upvoted.${e}.names`)||"[]")},upvoted(r){return this.upvotedNames.includes(r)},async handleUpvote(r){if(this.upvoted(r))return;const i=new XMLHttpRequest;i.open("POST","/apis/api.halo.run/v1alpha1/trackers/upvote"),i.setRequestHeader("Content-Type","application/json"),i.onload=()=>{this.upvotedNames=[...this.upvotedNames,r],localStorage.setItem(`halo.upvoted.${e}.names`,JSON.stringify(this.upvotedNames));const o=document.querySelector("[data-upvote-"+e+'-name="'+r+'"]');if(!o)return;const s=parseInt(o.textContent||"0");o.textContent=s+1+""},i.onerror=function(){alert("网络请求失败,请稍后再试")},i.send(JSON.stringify({group:t,plural:n,name:r}))}}),ir=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function To(e,...t){if(typeof e=="string")return ir(e);let n=e[0];for(const[r,i]of t.entries())n=n+ir(String(i))+e[r+1];return n}class Lo extends Error{constructor(t){super(`Missing a value for ${t?`the placeholder: ${t}`:"a placeholder"}`,t),this.name="MissingValueError",this.key=t}}function $o(e,t,{ignoreMissing:n=!1,transform:r=({value:i})=>i}={}){if(typeof e!="string")throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);if(typeof t!="object")throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof t}\``);const i=(l,c)=>{let u=t;for(const f of c.split("."))u=u?u[f]:void 0;const p=r({value:u,key:c});if(p===void 0){if(n)return l;throw new Lo(c)}return String(p)},o=l=>(...c)=>To(l(...c)),s=/{{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}}/gi;s.test(e)&&(e=e.replace(s,o(i)));const a=/{(\d+|[a-z$_][\w\-$]*?(?:\.[\w\-$]*?)*?)}/gi;return e.replace(a,i)}const ko=(e,t)=>({permalink:window.location.href,title:document.title,shareModal:!1,copied:!1,presetShareItems:[{id:"x",name:"X",icon:"i-simple-icons-x",type:"url",url:"http://x.com/share?url={url}&text={title}"},{id:"telegram",name:"Telegram",icon:"i-simple-icons-telegram",type:"url",url:"https://telegram.me/share/url?url={url}&text={title}"},{id:"facebook",name:"Facebook",icon:"i-simple-icons-facebook",type:"url",url:"https://facebook.com/sharer/sharer.php?u={url}"},{id:"qq",name:"QQ",icon:"i-simple-icons-tencentqq",type:"url",url:"https://connect.qq.com/widget/shareqq/iframe_index.html?url={url}&title={title}"},{id:"qzone",name:"QQ空间",icon:"i-simple-icons-qzone",type:"url",url:"https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}&title={title}"},{id:"weibo",name:"微博",icon:"i-simple-icons-sinaweibo",type:"url",url:"http://service.weibo.com/share/share.php?url={url}&title={title}"},{id:"douban",name:"豆瓣",icon:"i-simple-icons-douban",type:"url",url:"https://www.douban.com/share/service?href={url}&name={title}"},{id:"wechat",name:"微信",icon:"i-simple-icons-wechat",type:"url",url:"/themes/theme-earth/assets/qrcode-share.html?url={url}"},{id:"native",name:"系统分享",icon:"i-tabler-device-desktop",type:"native"}],get getShareIds(){return t!=null&&t.length?t:e.map(n=>n.id)},get activeShareItems(){return t.map(n=>this.presetShareItems.find(r=>r.id===n)).filter(Boolean).filter(n=>{var r;return(n==null?void 0:n.type)!=="native"||((r=navigator.canShare)==null?void 0:r.call(navigator,{title:this.title,url:this.permalink}))})},handleShare(n){const r=this.activeShareItems.find(c=>(c==null?void 0:c.id)===n);if(!r)return;if(r.type==="native"){if(navigator.share){navigator.share({title:this.title,url:this.permalink});return}alert("您的浏览器不支持系统分享");return}const i=1e3,o=500,s=window.innerHeight/2-o/2,a=window.innerWidth/2-i/2,l=`width=${i}, height= ${o}, top=${s}, left=${a}, status=no, scrollbars=no, resizable=no`;window.open($o(r.url||"",{url:this.permalink,title:this.title}),`分享:${this.title}`,l)},handleCopy(){navigator.clipboard.writeText(this.permalink),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}}),No=(e,t)=>({userPermission:void 0,init(){this.fetchUserPermission()},get shouldDisplay(){return e==="anonymousUser"||!this.userPermission?!1:!!this.userPermission.uiPermissions.includes(t)},async fetchUserPermission(){const n=await fetch("/apis/api.console.halo.run/v1alpha1/users/-/permissions");n.ok&&(this.userPermission=await n.json())}});window.Alpine=Z,Z.data("dropdown",Eo),Z.data("colorSchemeSwitcher",Ao),Z.data("upvote",Oo),Z.data("share",ko),Z.data("uiPermission",No),Z.start();const Io=()=>{const e=document.getElementById("header-menu");window.scrollY>0?e==null||e.classList.add("menu-sticky"):e==null||e.classList.remove("menu-sticky")};window.addEventListener("scroll",Io);function Mo(){const e=document.getElementById("content"),t=e==null?void 0:e.querySelectorAll("h1, h2, h3, h4");if(!t||t.length===0){const n=document.querySelector(".toc-container");n==null||n.remove();return}xo({tocSelector:".toc",contentSelector:"#content",headingSelector:"h1, h2, h3, h4",extraListClasses:"space-y-1 dark:border-slate-500",extraLinkClasses:"group flex items-center justify-between rounded py-1 px-1.5 transition-all hover:bg-gray-100 text-sm opacity-80 dark:hover:bg-slate-700 dark:text-slate-50",collapseDepth:6,headingsOffset:100,scrollSmooth:!0,scrollSmoothOffset:-100,tocScrollOffset:50})}P.currentColorScheme="system";function Po(e,t){let n=e;t&&(n=localStorage.getItem("color-scheme")||e),P.currentColorScheme=n,Ot(n,!1)}function Ot(e,t){if(e==="system"){const n=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.add(n?"dark":"light"),document.documentElement.classList.remove(n?"light":"dark")}else document.documentElement.classList.add(e),document.documentElement.classList.remove(e==="dark"?"light":"dark");P.currentColorScheme=e,t&&localStorage.setItem("color-scheme",e)}return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(){P.currentColorScheme==="system"&&Ot("system",!1)}),document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("btn-scroll-to-top");if(!e)return;e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})}),window.addEventListener("scroll",t);function t(){if(!e)return;window.scrollY>300?e.style.opacity="1":e.style.opacity="0"}}),P.generateToc=Mo,P.initColorScheme=Po,P.setColorScheme=Ot,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),P}({});