punkfairie-site/dist/js/main.js

6 lines
41 KiB
JavaScript
Raw Normal View History

2023-06-05 20:09:30 -07:00
(()=>{var Te=!1,Re=!1,N=[],Pe=-1;function Kr(e){Br(e)}function Br(e){N.includes(e)||N.push(e),Hr()}function bt(e){let t=N.indexOf(e);t!==-1&&t>Pe&&N.splice(t,1)}function Hr(){!Re&&!Te&&(Te=!0,queueMicrotask(zr))}function zr(){Te=!1,Re=!0;for(let e=0;e<N.length;e++)N[e](),Pe=e;N.length=0,Pe=-1,Re=!1}var H,z,Q,wt,Ie=!0;function kr(e){Ie=!1,e(),Ie=!0}function qr(e){H=e.reactive,Q=e.release,z=t=>e.effect(t,{scheduler:r=>{Ie?Kr(r):r()}}),wt=e.raw}function pt(e){z=e}function Wr(e){let t=()=>{};return[n=>{let i=z(n);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),Q(i))},i},()=>{t()}]}var Et=[],At=[],St=[];function Ur(e){St.push(e)}function Ot(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,At.push(t))}function Vr(e){Et.push(e)}function Yr(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Ct(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 Ue=new MutationObserver(Je),Ve=!1;function Ye(){Ue.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ve=!0}function Mt(){Gr(),Ue.disconnect(),Ve=!1}var Y=[],Se=!1;function Gr(){Y=Y.concat(Ue.takeRecords()),Y.length&&!Se&&(Se=!0,queueMicrotask(()=>{Jr(),Se=!1}))}function Jr(){Je(Y),Y.length=0}function x(e){if(!Ve)return e();Mt();let t=e();return Ye(),t}var Ge=!1,ae=[];function Xr(){Ge=!0}function Zr(){Ge=!1,Je(ae),ae=[]}function Je(e){if(Ge){ae=ae.concat(e);return}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,u=e[o].oldValue,l=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},c=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&u===null?l():s.hasAttribute(a)?(c(),l()):c()}i.forEach((o,s)=>{Ct(s,o)}),n.forEach((o,s)=>{Et.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(At.forEach(s=>s(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.includes(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,St.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,r=null,n=null,i=null}function Tt(e){return te(K(e))}function ee(e,t,r){return e._x_dataStack=[t,...K(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function K(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?K(e.host):e.parentNode?K(e.parentNode):[]}function te(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,n)=>e.some(i=>i.hasOwnProperty(n)),get:(r,n)=>(e.find(i=>{if(i.hasOwnProperty(n)){let o=Object.getOwnPropertyDescriptor(i,n);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,a=o.set,u=o;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(i,n,{...u,get:s,set:a})}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(s=>s.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function Rt(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0)return;let u=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,u,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,u)})};return r(e)}function Pt(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Qr(
${r?'Expression: "'+r+`"
2023-06-05 20:09:30 -07:00
`:""}`,t),setTimeout(()=>{throw e},0)}var se=!0;function tn(e){let t=se;se=!1,e(),se=t}function D(e,t,r={}){let n;return b(e,t)(i=>n=i,r),n}function b(...e){return $t(...e)}var $t=Nt;function rn(e){$t=e}function Nt(e,t){let r={};Ne(r,e);let n=[r,...K(e)],i=typeof t=="function"?nn(n,t):sn(n,t,e);return en.bind(null,e,t,i)}function nn(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(te([n,...e]),i);ue(r,o)}}var Oe={};function on(e,t){if(Oe[e])return Oe[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(async()=>{ ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(s){return X(s,t,e),Promise.resolve()}})();return Oe[e]=o,o}function sn(e,t,r){let n=on(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=te([o,...e]);if(typeof n=="function"){let u=n(n,a).catch(l=>X(l,r,t));n.finished?(ue(i,n.result,a,s,r),n.result=void 0):u.then(l=>{ue(i,l,a,s,r)}).catch(l=>X(l,r,t)).finally(()=>n.result=void 0)}}}function ue(e,t,r,n,i){if(se&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>ue(e,s,r,n)).catch(s=>X(s,i,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var Xe="x-";function k(e=""){return Xe+e}function an(e){Xe=e}var Le={};function g(e,t){return Le[e]=t,{before(r){if(!Le[r]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}let n=$.indexOf(r);$.splice(n>=0?n:$.indexOf("DEFAULT"),0,e)}}}function Ze(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,u])=>({name:a,value:u})),s=Lt(o);o=o.map(a=>s.find(u=>u.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(Bt((o,s)=>n[o]=s)).filter(zt).map(cn(n,r)).sort(fn).map(o=>ln(e,o))}function Lt(e){return Array.from(e).map(Bt()).filter(t=>!zt(t))}var Fe=!1,V=new Map,Ft=Symbol();function un(e){Fe=!0;let t=Symbol();Ft=t,V.set(t,[]);let r=()=>{for(;V.get(t).length;)V.get(t).shift()();V.delete(t)},n=()=>{Fe=!1,r()};e(r),n()}function jt(e){let t=[],r=a=>t.push(a),[n,i]=Wr(e);return t.push(i),[{Alpine:ne,effect:n,cleanup:r,evaluateLater:b.bind(b,e),evaluate:D.bind(D,e)},()=>t.forEach(a=>a())]}function ln(e,t){let r=()=>{},n=Le[t.type]||r,[i,o]=jt(e);Yr(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),Fe?V.get(Ft).push(n):n())};return s.runCleanups=o,s}var Dt=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Kt=e=>e;function Bt(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Ht.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Ht=[];function Qe(e){Ht.push(e)}function zt({name:e}){return kt().test(e)}var kt=()=>new RegExp(`^${Xe}([^:^.]+)\\b`);function cn(e,t){return({name:r,value:n})=>{let i=r.match(kt()),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(u=>u.replace(".","")),expression:n,original:a}}}var je="DEFAULT",$=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",je,"teleport"];function fn(e,t){let r=$.indexOf(e.type)===-1?je:e.type,n=$.indexOf(t.type)===-1?je:t.type;return $.indexOf(r)-$.indexOf(n)}function G(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function M(e,t){if(typeof ShadowRoot=="function"&&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 T(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var _t=!1;function dn(){_t&&T("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),_t=!0,document.body||T("Unable to initialize. Trying to load Alpine before `<body>` is avail