@livx.cc/bare-v3 0.1.0-alpha.157 → 0.1.0-alpha.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/board.js +13 -12
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:ct,getOwnPropertyNames:vi,getOwnPropertyDescriptor:wi}=Object,Ei=Object.prototype.hasOwnProperty;function
|
|
1
|
+
var{defineProperty:ct,getOwnPropertyNames:vi,getOwnPropertyDescriptor:wi}=Object,Ei=Object.prototype.hasOwnProperty;function ki(e){return this[e]}var _i=(e)=>{var t=(pr??=new WeakMap).get(e),r;if(t)return t;if(t=ct({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of vi(e))if(!Ei.call(t,n))ct(t,n,{get:ki.bind(e,n),enumerable:!(r=wi(e,n))||r.enumerable})}return pr.set(e,t),t},pr;var Si=(e)=>e;function Ai(e,t){this[e]=Si.bind(null,t)}var Ci=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Ai.bind(t,r)})};var Ti=(e,t)=>()=>(e&&(t=e(e=0)),t);var Xn={};Ci(Xn,{Alpine:()=>Gn,default:()=>aa});function Oi(e){Di(e)}function Li(){Rt=!0}function Ii(){Rt=!1,Or()}function Di(e){if(!z.includes(e)){if(z.push(e),e._x_schedulerPriority!==void 0)qe=!0}Or()}function Ht(e){let t=z.indexOf(e);if(t!==-1&&t>vt)z.splice(t,1)}function Or(){if(!xt&&!yt){if(Rt)return;yt=!0,queueMicrotask(Bi)}}function Bi(){yt=!1,xt=!0;for(let e=0;e<z.length;e++){if(qe)Ni(e);z[e](),vt=e}z.length=0,vt=-1,qe=!1,xt=!1}function Ni(e){let t=new Map,r=z.slice(e).sort((n,i)=>Pi(n,i,t));for(let n=0;n<r.length;n++)z[e+n]=r[n];qe=!1}function Pi(e,t,r){if(!dt(e))return dt(t)?1:0;if(!dt(t))return-1;return gr(e._x_schedulerPriority.el,r)-gr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function dt(e){return e._x_schedulerPriority!==void 0}function gr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function Ri(e){wt=!1,e(),wt=!0}function Hi(e){ue=e.reactive,fe=e.release,oe=(t)=>e.effect(t,{scheduler:(r)=>{if(wt)Oi(r);else r()}}),Lr=e.raw}function yr(e){oe=e}function zi(e){let t=()=>{};return[(n,i)=>{let a=i?.priority==="structural"?$i++:void 0,o=oe(n);if(a!==void 0&&o!==void 0)o._x_schedulerPriority={el:e,order:a};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((s)=>s())};return e._x_effects.add(o),t=()=>{if(o===void 0)return;e._x_effects.delete(o),fe(o)},o},()=>{t()}]}function Ir(e,t){let r=!0,n,i,a=oe(()=>{let o=e(),s=JSON.stringify(o);if(!r){if(typeof o==="object"||o!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(o,l)})}}n=o,i=s,r=!1});return()=>{Ht(a),fe(a)}}async function Ui(e){Li();try{await e(),await Promise.resolve()}finally{Ii()}}function qi(e){Nr.push(e)}function zt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Br.push(t)}function Pr(e){Dr.push(e)}function $r(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Rr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function ji(e){e._x_effects?.forEach(Ht);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function qt(){Je.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ut=!0}function Hr(){Ki(),Je.disconnect(),Ut=!1}function Ki(){let e=Je.takeRecords();Y.push(()=>e.length>0&&Ge(e));let t=Y.length;queueMicrotask(()=>{if(Y.length===t)while(Y.length>0)Y.shift()()})}function Fi(){while(Y.length>0)Y.shift()();let e=Je.takeRecords();if(e.length>0)Ge(e)}function E(e){if(!Ut)return e();Hr();try{return e()}finally{qt()}}function Vi(){jt=!0}function Wi(){jt=!1,Ge(je),je=[]}function Ge(e){if(jt){je=je.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let a=0;a<e.length;a++){if(e[a].target._x_ignoreMutationObserver)continue;if(e[a].type==="childList")e[a].removedNodes.forEach((o)=>{if(o.nodeType!==1)return;if(!o._x_marker)return;r.add(o)}),e[a].addedNodes.forEach((o)=>{if(o.nodeType!==1)return;if(r.has(o)){r.delete(o);return}if(o._x_marker)return;t.push(o)});if(e[a].type==="attributes"){let o=e[a].target,s=e[a].attributeName,l=e[a].oldValue,c=()=>{if(!n.has(o))n.set(o,[]);n.get(o).push({name:s,value:o.getAttribute(s)})},d=()=>{if(!i.has(o))i.set(o,[]);i.get(o).push(s)};if(o.hasAttribute(s)&&l===null)c();else if(o.hasAttribute(s))d(),c();else d()}}i.forEach((a,o)=>{Rr(o,a)}),n.forEach((a,o)=>{Dr.forEach((s)=>s(o,a))});for(let a of r){if(t.some((o)=>o.contains(a)))continue;Br.forEach((o)=>o(a))}for(let a of t){if(!a.isConnected)continue;Nr.forEach((o)=>o(a))}t=null,r=null,n=null,i=null}function zr(e){return ee(de(e))}function Me(e,t,r){return e._x_dataStack=[t,...de(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function de(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return de(e.host);if(!e.parentNode)return[];return de(e.parentNode)}function ee(e){return new Proxy({objects:e},Yi)}function Ur(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ur(Object.getPrototypeOf(e),t)}function Ji(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Kt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,a="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([o,{value:s,enumerable:l}])=>{if(l===!1||s===void 0)return;if(typeof s==="object"&&s!==null&&s.__v_skip)return;let c=a===""?o:`${a}.${o}`;if(typeof s==="object"&&s!==null&&s._x_interceptor)i[o]=s.initialize(e,c,o,t);else if(r(s)&&s!==i&&!(s instanceof Element))n(s,c)})};return n(e)}function qr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,a,o){return e(this.initialValue,()=>Gi(n,i),(s)=>Et(n,i,s),i,a,o)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(a,o,s,l)=>{let c=n.initialize(a,o,s,l);return r.initialValue=c,i(a,o,s,l)}}else r.initialValue=n;return r}}function Gi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function Et(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return Et(e[t[0]],t.slice(1),r);else return e[t[0]]={},Et(e[t[0]],t.slice(1),r)}function D(e,t){jr[e]=t}function Ke(e,t){let r=Xi(t);return Object.entries(jr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Xi(e){let[t,r]=Gr(e),n={interceptor:qr,...t};return zt(e,r),n}function Zi(e,t,r,...n){try{return r(...n)}catch(i){Xe(i,e,t)}}function Xe(...e){return Kr(...e)}function Qi(e){Kr=e}function es(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
|
|
2
2
|
|
|
3
3
|
${r?'Expression: "'+r+`"
|
|
4
4
|
|
|
5
|
-
`:""}`,t),setTimeout(()=>{throw e},0)}function Fr(e){let t=X;X=!1;let r=e();return X=t,r}function Z(e,t,r={}){let n;return T(e,t)((i)=>n=i,r),n}function T(...e){return Vr(...e)}function ts(e){Vr=e}function rs(e){Wr=e}function ns(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!X){_t(r,t,ee([n,...e]),i);return}let o=t.apply(ee([n,...e]),i);_t(r,o)}}function _t(e,t,r,n,i){if(X&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((o)=>_t(e,o,r,n)).catch((o)=>Xe(o,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function is(...e){return Wr(...e)}function he(e=""){return Ft+e}function ss(e){Ft=e}function _(e,t){return Fe[e]=t,{before(r){if(!Fe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=G.indexOf(r);G.splice(n>=0?n:G.indexOf("DEFAULT"),0,e)}}}function os(e){return Object.keys(Fe).includes(e)}function Ze(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([s,l])=>({name:s,value:l})),o=Yr(a);a=a.map((s)=>{if(o.find((l)=>l.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),t=t.concat(a)}let n={};return t.map(Qr((a,o)=>n[a]=o)).filter(tn).map(cs(n,r)).sort(ds).map((a)=>ls(e,a))}function Yr(e){return Array.from(e).map(Qr()).filter((t)=>!tn(t))}function as(e){kt=!0;let t=Symbol();Jr=t,ye.set(t,[]);let r=()=>{while(ye.get(t).length)ye.get(t).shift()();ye.delete(t)},n=()=>{kt=!1,r()};e(r),n()}function Gr(e){let t=[],r=(s)=>t.push(s),[n,i]=zi(e);return t.push(i),[{Alpine:pe,effect:n,cleanup:r,evaluateLater:T.bind(T,e),evaluate:Z.bind(Z,e)},()=>t.forEach((s)=>s())]}function ls(e,t){let r=()=>{},n=Fe[t.type]||r,[i,a]=Gr(e);$r(e,t.original,a);let o=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),kt?ye.get(Jr).push(n):n()};return o.runCleanups=a,o}function Qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=en.reduce((a,o)=>o(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Vt(e){en.push(e)}function tn({name:e}){return rn().test(e)}function cs(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(rn()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),o=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:o.map((l)=>l.replace(".","")),expression:n,original:s}}}function ds(e,t){let r=G.indexOf(e.type)===-1?St:e.type,n=G.indexOf(t.type)===-1?St:t.type;return G.indexOf(r)-G.indexOf(n)}function te(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>te(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)te(n,t,!1),n=n.nextElementSibling}function U(e,t=()=>{}){return(...r)=>F?t(...r):e(...r)}function us(e){return(...t)=>F&&e(...t)}function Oe(e){nn.push(e)}function fs(e,t){nn.forEach((r)=>r(e,t)),F=!0,sn(()=>{P(t,(r,n)=>{n(r,()=>{})})}),F=!1}function hs(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;F=!0,At=!0,sn(()=>{ps(t)}),F=!1,At=!1}function ps(e){let t=!1;P(e,(n,i)=>{te(n,(a,o)=>{if(t&&vs(a))return o();t=!0,i(a,o)})})}function sn(e){let t=oe;yr((r,n)=>{let i=t(r);return fe(i),()=>{}}),e(),yr(t)}function bs(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Qe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Xe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>ms(e,r))}function ms(e,t){if(t.pending--,t.pending>0)return;if(Fi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Qe--,!e.isConnected)return;ys(t),P(e)}function gs(e,t){if(Qe===0)return!1;let r=L(e,(n)=>n._x_deferInit);if(!r)return!1;return on(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function on(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function ys(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=L(r,(a)=>a._x_deferInit);if(n){on(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((a)=>r.hasAttribute(a)).map((a)=>({name:a,value:r.getAttribute(a)}));if(i.length===0)return;Ze(r,i).forEach((a)=>a())})}function xe(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function N(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function xs(){if(xr)N("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(xr=!0,!document.body)N("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");xe(document,"alpine:init"),xe(document,"alpine:initializing"),qt(),qi((t)=>P(t,te)),zt((t)=>ae(t)),Pr((t,r)=>{if(gs(t,r))return;Ze(t,r).forEach((n)=>n())});let e=(t)=>!et(t.parentElement,!0);Array.from(document.querySelectorAll(cn().join(","))).filter(e).forEach((t)=>{P(t)}),xe(document,"alpine:initialized"),setTimeout(()=>{_s()})}function ln(){return Wt.map((e)=>e())}function cn(){return Wt.concat(an).map((e)=>e())}function dn(e){Wt.push(e)}function un(e){an.push(e)}function et(e,t=!1){return L(e,(r)=>{if((t?cn():ln()).some((i)=>r.matches(i)))return!0})}function L(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return L(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return L(e.parentNode.host,t);if(!e.parentElement)return;return L(e.parentElement,t)}function vs(e){return ln().some((t)=>e.matches(t))}function ws(e){fn.push(e)}function P(e,t=te,r=()=>{}){if(L(e,(n)=>n._x_ignore))return;as(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),fn.forEach((a)=>a(n,i)),Ze(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=Es++;n._x_ignore&&i()})})}function ae(e,t=te){t(e,(r)=>{ji(r),Rr(r),delete r._x_marker})}function _s(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(os(r))return;n.some((i)=>{if(document.querySelector(i))return N(`found "${i}", but missing ${t} plugin`),!0})})}function Jt(e=()=>{}){return queueMicrotask(()=>{Yt||setTimeout(()=>{Tt()})}),new Promise((t)=>{Ct.push(()=>{e(),t()})})}function Tt(){Yt=!1;while(Ct.length)Ct.shift()()}function ks(){Yt=!0}function Gt(e,t){if(Array.isArray(t))return vr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return Ss(e,t);else if(typeof t==="function")return Gt(e,t());return vr(e,t)}function Mt(e){return e.split(/\s/).filter(Boolean)}function vr(e,t){let r=(i)=>Mt(i).filter((a)=>!e.classList.contains(a)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function Ss(e,t){let r=Object.entries(t).flatMap(([o,s])=>s?Mt(o):!1).filter(Boolean),n=Object.entries(t).flatMap(([o,s])=>!s?Mt(o):!1).filter(Boolean),i=[],a=[];return n.forEach((o)=>{if(e.classList.contains(o))e.classList.remove(o),a.push(o)}),r.forEach((o)=>{if(!e.classList.contains(o))e.classList.add(o),i.push(o)}),()=>{a.forEach((o)=>e.classList.add(o)),i.forEach((o)=>e.classList.remove(o))}}function tt(e,t){if(typeof t==="object"&&t!==null)return As(e,t);return Cs(e,t)}function As(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=Ts(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{tt(e,r)}}function Cs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Ts(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ot(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function Ms(e,t,r){hn(e,Gt,""),{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 Os(e,t,r){hn(e,tt);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),a=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((y,k)=>k<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((y,k)=>k>t.indexOf("out"));let o=!t.includes("opacity")&&!t.includes("scale"),s=o||t.includes("opacity"),l=o||t.includes("scale"),c=s?0:1,d=l?me(t,"scale",95)/100:1,u=me(t,"delay",0)/1000,f=me(t,"origin","center"),h="opacity, transform",b=me(t,"duration",150)/1000,p=me(t,"duration",75)/1000,m="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${b}s`,transitionTimingFunction:m},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(a)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${p}s`,transitionTimingFunction:m},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function hn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Lt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Lt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function pn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:pn(t)}function Lt(e,t,{during:r,start:n,end:i}={},a=()=>{},o=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){a(),o();return}let s,l,c;Ls(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:a,end(){s(),c=t(e,i)},after:o,cleanup(){l(),c()}})}function Ls(e,t){let r,n,i,a=Ot(()=>{E(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Tt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(o){this.beforeCancels.push(o)},cancel:Ot(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},E(()=>{t.start(),t.during()}),ks(),requestAnimationFrame(()=>{if(r)return;let o=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(o===0)o=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;E(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;E(()=>{t.end()}),Tt(),setTimeout(e._x_transitioning.finish,o+s),i=!0})})}function me(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function bn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=ue({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Hs(t):t,t){case"value":Is(e,r);break;case"style":Bs(e,r);break;case"class":Ds(e,r);break;case"selected":case"checked":Ns(e,t,r);break;default:Xt(e,t,r);break}}function Is(e,t){if(Zt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ve(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>zs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Rs(e,t);else if(e.tagName==="OPTION")Xt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ds(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Gt(e,t)}function Bs(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=tt(e,t)}function Ns(e,t,r){Xt(e,t,r),$s(e,t,r)}function Xt(e,t,r){if([null,void 0,!1].includes(r)&&qs(t))e.removeAttribute(t);else{if(mn(t))r=t;if(js(r))r=JSON.stringify(r);Ps(e,t,r)}}function Ps(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function $s(e,t,r){if(e[t]!==r)e[t]=r}function Rs(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Hs(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function zs(e,t){return e==t}function Ue(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function mn(e){return Us.has(e)}function qs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function js(e){return typeof e==="object"&&e!==null}function Ks(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return gn(e,t,r)}function Fs(e,t,r,n=!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=n,Fr(()=>Z(e,i.expression))}return gn(e,t,r)}function gn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(mn(t))return!![t,"true"].includes(n);return n}function Ve(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Zt(e){return e.type==="radio"||e.localName==="ui-radio"}function yn(e,t){let r;return function(){let n=this,i=arguments,a=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(a,t)}}function xn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function vn({get:e,set:t},{get:r,set:n}){let i=!0,a,o,s=oe(()=>{let l=e(),c=r();if(i)n(ut(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==a)n(ut(l));else if(d!==u)t(ut(c))}a=JSON.stringify(e()),o=JSON.stringify(r())});return()=>{Ht(s),fe(s)}}function ut(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Vs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(pe))}function Ws(e,t){if(!wr)H=ue(H),wr=!0;if(t===void 0)return H[e];if(H[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)H[e]=t.initialize(H,e,e,()=>{});else Kt(H[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")H[e].init()}function Ys(){return H}function Js(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return En(e,r());else wn[e]=r;return()=>{}}function Gs(e){return Object.entries(wn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function En(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([o,s])=>({name:o,value:s})),a=Yr(i);return i=i.map((o)=>{if(a.find((s)=>s.name===o.name))return{name:`x-bind:${o.name}`,value:`"${o.value}"`};return o}),Ze(e,i,r).map((o)=>{n.push(o.runCleanups),o()}),()=>{while(n.length)n.pop()()}}function Xs(e,t){_n[e]=t}function Zs(e,t){return Object.entries(_n).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function Sn(e){try{let r=new to(e).tokenize(),i=new ro(r).parse(),a=new no;return function(o={}){let{scope:s={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=o;return a.evaluate({node:i,scope:s,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function io(e,t,r={}){let n=An(e),i=ee([r.scope??{},...n]),a=r.params??[],s=Sn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof s==="function"&&X)return s.apply(i,a);return s}function so(e,t){let r=An(e);if(typeof t==="function")return ns(r,t);let n=oo(e,t,r);return Zi.bind(null,e,t,n)}function An(e){let t={};return Ke(t,e),[t,...de(e)]}function oo(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:a=[]}={})=>{let o=ee([i,...r]),l=Sn(t)({scope:o,forceBindingRootScopeToFunctions:!0});if(X&&typeof l==="function"){let c=l.apply(l,a);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function Cn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function re(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function po(e,t=!1){if(e.flags|=8,t){e.next=Ee,Ee=e;return}e.next=we,we=e}function er(){Ln++}function tr(){if(--Ln>0)return;if(Ee){let t=Ee;Ee=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(we){let t=we;we=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function In(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;rr(n),mo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Dt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function bo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===We)return;if(e.globalVersion=We,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Dt(e)))return;e.flags|=2;let t=e.dep,r=v,n=I;v=e,I=!0;try{In(e);let i=e.fn(e._value);if(t.version===0||J(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,I=n,Dn(e),e.flags&=-3}}function rr(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let a=r.computed.deps;a;a=a.nextDep)rr(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function mo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function go(e,t){if(e.effect instanceof _r)e=e.effect.fn;let r=new _r(e);if(t)ke(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function yo(e){e.effect.stop()}function xo(){Bn.push(I),I=!1}function vo(){let e=Bn.pop();I=e===void 0?!0:e}function kr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function Nn(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Nn(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function O(e,t,r){if(I&&v){let n=Bt.get(e);if(!n)Bt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new Eo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function K(e,t,r,n,i,a){let o=Bt.get(e);if(!o){We++;return}let s=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(er(),t==="clear")o.forEach(s);else{let l=Se(e),c=l&&Qt(r);if(l&&r==="length"){let d=Number(n);o.forEach((u,f)=>{if(f==="length"||f===Ce||!Le(f)&&f>=d)s(u)})}else{if(r!==void 0||o.has(void 0))s(o.get(r));if(c)s(o.get(Ce));switch(t){case"add":if(!l){if(s(o.get(Q)),ve(e))s(o.get(Nt))}else if(c)s(o.get("length"));break;case"delete":if(!l){if(s(o.get(Q)),ve(e))s(o.get(Nt))}break;case"set":if(ve(e))s(o.get(Q));break}}}tr()}function le(e){let t=w(e);if(t===e)return t;return O(t,"iterate",Ce),ie(e)?t:t.map(se)}function nr(e){return O(e=w(e),"iterate",Ce),e}function B(e,t){if(ne(e))return qn(e)?Te(se(t)):Te(t);return se(t)}function pt(e,t,r){let n=nr(e),i=n[t]();if(n!==e&&!ie(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function R(e,t,r,n,i,a){let o=nr(e),s=o!==e&&!ie(e),l=o[t];if(l!==ko[t]){let u=l.apply(e,a);return s?se(u):u}let c=r;if(o!==e){if(s)c=function(u,f){return r.call(this,B(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(o,c,n);return s&&i?i(d):d}function Sr(e,t,r,n){let i=nr(e),a=i!==e&&!ie(e),o=r,s=!1;if(i!==e){if(a)s=n.length===0,o=function(c,d,u){if(s)s=!1,c=B(e,c);return r.call(this,c,B(e,d),u,e)};else if(r.length>3)o=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](o,...n);return s?B(e,l):l}function bt(e,t,r){let n=w(e);O(n,"iterate",Ce);let i=n[t](...r);if((i===-1||i===!1)&&Ro(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function ge(e,t,r=[]){xo(),er();let n=w(e)[t].apply(e,r);return tr(),vo(),n}function Ao(e){if(!Le(e))e=String(e);let t=w(this);return O(t,"has",e),t.hasOwnProperty(e)}function Lo(e,t,r){return function(...n){let i=this.__v_raw,a=w(i),o=ve(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=i[e](...n),d=r?Pt:t?Te:se;return!t&&O(a,"iterate",l?Nt:Q),ke(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:s?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function He(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";re(`${On(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Io(e,t){let r={get(i){let a=this.__v_raw,o=w(a),s=w(i);if(!e){if(J(i,s))O(o,"get",i);O(o,"get",s)}let{has:l}=Re(o),c=t?Pt:e?Te:se;if(l.call(o,i))return c(a.get(i));else if(l.call(o,s))return c(a.get(s));else if(a!==o)a.get(i)},get size(){let i=this.__v_raw;return!e&&O(w(i),"iterate",Q),i.size},has(i){let a=this.__v_raw,o=w(a),s=w(i);if(!e){if(J(i,s))O(o,"has",i);O(o,"has",s)}return i===s?a.has(i):a.has(i)||a.has(s)},forEach(i,a){let o=this,s=o.__v_raw,l=w(s),c=t?Pt:e?Te:se;return!e&&O(l,"iterate",Q),s.forEach((d,u)=>i.call(a,c(d),c(u),o))}};return ke(r,e?{add:He("add"),set:He("set"),delete:He("delete"),clear:He("clear")}:{add(i){let a=w(this),o=Re(a),s=w(i),l=!t&&!ie(i)&&!ne(i)?s:i;if(!(o.has.call(a,l)||J(i,l)&&o.has.call(a,i)||J(s,l)&&o.has.call(a,s)))a.add(l),K(a,"add",l,l);return this},set(i,a){if(!t&&!ie(a)&&!ne(a))a=w(a);let o=w(this),{has:s,get:l}=Re(o),c=s.call(o,i);if(!c)i=w(i),c=s.call(o,i);else Ar(o,s,i);let d=l.call(o,i);if(o.set(i,a),!c)K(o,"add",i,a);else if(J(a,d))K(o,"set",i,a,d);return this},delete(i){let a=w(this),{has:o,get:s}=Re(a),l=o.call(a,i);if(!l)i=w(i),l=o.call(a,i);else Ar(a,o,i);let c=s?s.call(a,i):void 0,d=a.delete(i);if(l)K(a,"delete",i,void 0,c);return d},clear(){let i=w(this),a=i.size!==0,o=ve(i)?new Map(i):new Set(i),s=i.clear();if(a)K(i,"clear",void 0,void 0,o);return s}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Lo(i,e,t)}),r}function Rn(e,t){let r=Io(e,t);return(n,i,a)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(It(r,i)&&i in n?r:n,i,a)}}function Ar(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Mn(e);re(`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.`)}}function $o(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ir(e){if(ne(e))return e;return Un(e,!1,Mo,Do,Hn)}function $t(e){return Un(e,!0,Oo,Bo,zn)}function Un(e,t,r,n,i){if(!Ae(e))return re(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=$o(Mn(e));if(o===0)return e;let s=new Proxy(e,o===2?n:r);return i.set(e,s),s}function qn(e){if(ne(e))return qn(e.__v_raw);return!!(e&&e.__v_isReactive)}function ne(e){return!!(e&&e.__v_isReadonly)}function ie(e){return!!(e&&e.__v_isShallow)}function Ro(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function _e(e){return e?e.__v_isRef===!0:!1}function Ho(e){let t=[];return L(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function jn(e){if(!mt[e])mt[e]=0;return++mt[e]}function zo(e,t){return L(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Uo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=jn(t)}function qo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Kn(e,t,r){D(t,(n)=>N(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Cr(e){let t=U(()=>document.querySelector(e),()=>jo)();if(!t)N(`Cannot find x-teleport element for selector: "${e}"`);return t}function ce(e,t,r,n){let i=e,a=(l)=>n(l),o={},s=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=Ko(t);if(r.includes("camel"))t=Fo(t);if(r.includes("capture"))o.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))o.passive=r[r.indexOf("passive")+1]!=="false";if(a=Vn(r,a),r.includes("prevent"))a=s(a,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))a=s(a,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))a=s(a,(l,c)=>{l(c),i.removeEventListener(t,a,o)});if(r.includes("away")||r.includes("outside"))i=document,a=s(a,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))a=s(a,(l,c)=>{c.target===e&&l(c)});if(t==="submit")a=s(a,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Wo(t)||Wn(t))a=s(a,(l,c)=>{if(Jo(c,r))return;l(c)});return i.addEventListener(t,a,o),()=>{i.removeEventListener(t,a,o)}}function Vn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=yn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=xn(t,n)}return t}function Ko(e){return e.replace(/-/g,".")}function Fo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ye(e){return!Array.isArray(e)&&!isNaN(e)}function Vo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Wo(e){return["keydown","keyup"].includes(e)}function Wn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Jo(e,t){let r=t.filter((a,o)=>{if(a==="false"&&t[o-1]==="passive")return!1;return!Yo.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Tr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((a)=>r.includes(a));if(r=r.filter((a)=>!i.includes(a)),i.length>0){if(i.filter((o)=>{if(o==="cmd"||o==="super")o="meta";return e[`${o}Key`]}).length===i.length){if(Wn(e.type))return!1;if(Tr(e.key).includes(r[0]))return!1}}return!0}function Tr(e){if(!e)return[];e=Vo(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((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function ze(e,t,r,n){return E(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Ve(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=gt(r.target.value);else if(t.includes("boolean"))i=Ue(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Go(a,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return gt(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return Ue(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Zt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return gt(i);else if(t.includes("boolean"))return Ue(i);else if(t.includes("trim"))return i.trim();else return i}})}function gt(e){let t=e?parseFloat(e):null;return Xo(t)?t:e}function Go(e,t){return e==t}function Xo(e){return!Array.isArray(e)&&!isNaN(e)}function Mr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Zo(e,t){e._x_keyExpression=t}function Qo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function ea(e){if(!F)return!1;if(At)return!0;return e.hasAttribute("data-has-alpine-state")}function ta(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function ra(e,t,r,n){r((i)=>{if(sa(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let a=e._x_lookup,o=new Map;e._x_lookup=o;let s=oa(i),l=Object.entries(i).map(([c,d])=>{if(!s)c=parseInt(c);let u=ia(t,d,c,i),f;return n((h)=>{if(typeof h==="object")N("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(h))o.set(h,a.get(h)),a.delete(h);f=h},{scope:{index:c,...u}}),[f,u]});E(()=>{a.forEach((u)=>{ae(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(o.has(u)){let p=o.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._x_currentIfEl}return}if(e.content.children.length>1)N("x-for templates require a single root element, additional elements will be ignored.",e);let h=document.importNode(e.content,!0).firstElementChild,b=ue(f);Me(h,b,e),h._x_refreshXForScope=ta(b),o.set(u,h),c.add(h),d.after(h),d=h}),c.forEach((u)=>P(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function na(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let a={};a.items=i[2].trim();let o=i[1].replace(r,"").trim(),s=o.match(t);if(s){if(a.item=o.replace(t,"").trim(),a.index=s[1].trim(),s[2])a.collection=s[2].trim()}else a.item=o;return a}function ia(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((o)=>o.trim()).forEach((o,s)=>{i[o]=t[s]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((o)=>o.trim()).forEach((o)=>{i[o]=t[o]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function sa(e){return typeof e!=="object"&&!isNaN(e)}function oa(e){return typeof e==="object"&&!Array.isArray(e)}function Jn(){}function nt(e,t,r){_(t,(n)=>N(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var yt=!1,xt=!1,z,vt=-1,qe=!1,Rt=!1,ue,oe,fe,Lr,$i=0,wt=!0,Dr,Br,Nr,Je,Ut=!1,Y,jt=!1,je,Yi,jr,Kr,X=!0,Vr=()=>{},Wr,Ft="x-",Fe,kt=!1,ye,Jr,Xr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Zr=(e)=>e,en,rn=()=>new RegExp(`^${Ft}([^:^.]+)\\b`),St="DEFAULT",G,F=!1,nn,At=!1,Qe=0,xr=!1,Wt,an,fn,Es=1,Ct,Yt=!1,Us,H,wr=!1,wn,_n,Qs,pe,Er,kn,A=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},eo,to=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new A("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}function Fr(e){let t=X;X=!1;let r=e();return X=t,r}function Z(e,t,r={}){let n;return T(e,t)((i)=>n=i,r),n}function T(...e){return Vr(...e)}function ts(e){Vr=e}function rs(e){Wr=e}function ns(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!X){kt(r,t,ee([n,...e]),i);return}let o=t.apply(ee([n,...e]),i);kt(r,o)}}function kt(e,t,r,n,i){if(X&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((o)=>kt(e,o,r,n)).catch((o)=>Xe(o,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function is(...e){return Wr(...e)}function he(e=""){return Ft+e}function ss(e){Ft=e}function k(e,t){return Fe[e]=t,{before(r){if(!Fe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=G.indexOf(r);G.splice(n>=0?n:G.indexOf("DEFAULT"),0,e)}}}function os(e){return Object.keys(Fe).includes(e)}function Ze(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([s,l])=>({name:s,value:l})),o=Yr(a);a=a.map((s)=>{if(o.find((l)=>l.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),t=t.concat(a)}let n={};return t.map(Qr((a,o)=>n[a]=o)).filter(tn).map(cs(n,r)).sort(ds).map((a)=>ls(e,a))}function Yr(e){return Array.from(e).map(Qr()).filter((t)=>!tn(t))}function as(e){_t=!0;let t=Symbol();Jr=t,ye.set(t,[]);let r=()=>{while(ye.get(t).length)ye.get(t).shift()();ye.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Gr(e){let t=[],r=(s)=>t.push(s),[n,i]=zi(e);return t.push(i),[{Alpine:pe,effect:n,cleanup:r,evaluateLater:T.bind(T,e),evaluate:Z.bind(Z,e)},()=>t.forEach((s)=>s())]}function ls(e,t){let r=()=>{},n=Fe[t.type]||r,[i,a]=Gr(e);$r(e,t.original,a);let o=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?ye.get(Jr).push(n):n()};return o.runCleanups=a,o}function Qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=en.reduce((a,o)=>o(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Vt(e){en.push(e)}function tn({name:e}){return rn().test(e)}function cs(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(rn()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),o=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:o.map((l)=>l.replace(".","")),expression:n,original:s}}}function ds(e,t){let r=G.indexOf(e.type)===-1?St:e.type,n=G.indexOf(t.type)===-1?St:t.type;return G.indexOf(r)-G.indexOf(n)}function te(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>te(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)te(n,t,!1),n=n.nextElementSibling}function U(e,t=()=>{}){return(...r)=>F?t(...r):e(...r)}function us(e){return(...t)=>F&&e(...t)}function Oe(e){nn.push(e)}function fs(e,t){nn.forEach((r)=>r(e,t)),F=!0,sn(()=>{P(t,(r,n)=>{n(r,()=>{})})}),F=!1}function hs(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;F=!0,At=!0,sn(()=>{ps(t)}),F=!1,At=!1}function ps(e){let t=!1;P(e,(n,i)=>{te(n,(a,o)=>{if(t&&vs(a))return o();t=!0,i(a,o)})})}function sn(e){let t=oe;yr((r,n)=>{let i=t(r);return fe(i),()=>{}}),e(),yr(t)}function bs(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Qe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Xe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>ms(e,r))}function ms(e,t){if(t.pending--,t.pending>0)return;if(Fi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Qe--,!e.isConnected)return;ys(t),P(e)}function gs(e,t){if(Qe===0)return!1;let r=L(e,(n)=>n._x_deferInit);if(!r)return!1;return on(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function on(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function ys(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=L(r,(a)=>a._x_deferInit);if(n){on(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((a)=>r.hasAttribute(a)).map((a)=>({name:a,value:r.getAttribute(a)}));if(i.length===0)return;Ze(r,i).forEach((a)=>a())})}function xe(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function N(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function xs(){if(xr)N("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(xr=!0,!document.body)N("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");xe(document,"alpine:init"),xe(document,"alpine:initializing"),qt(),qi((t)=>P(t,te)),zt((t)=>ae(t)),Pr((t,r)=>{if(gs(t,r))return;Ze(t,r).forEach((n)=>n())});let e=(t)=>!et(t.parentElement,!0);Array.from(document.querySelectorAll(cn().join(","))).filter(e).forEach((t)=>{P(t)}),xe(document,"alpine:initialized"),setTimeout(()=>{ks()})}function ln(){return Wt.map((e)=>e())}function cn(){return Wt.concat(an).map((e)=>e())}function dn(e){Wt.push(e)}function un(e){an.push(e)}function et(e,t=!1){return L(e,(r)=>{if((t?cn():ln()).some((i)=>r.matches(i)))return!0})}function L(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return L(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return L(e.parentNode.host,t);if(!e.parentElement)return;return L(e.parentElement,t)}function vs(e){return ln().some((t)=>e.matches(t))}function ws(e){fn.push(e)}function P(e,t=te,r=()=>{}){if(L(e,(n)=>n._x_ignore))return;as(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),fn.forEach((a)=>a(n,i)),Ze(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=Es++;n._x_ignore&&i()})})}function ae(e,t=te){t(e,(r)=>{ji(r),Rr(r),delete r._x_marker})}function ks(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(os(r))return;n.some((i)=>{if(document.querySelector(i))return N(`found "${i}", but missing ${t} plugin`),!0})})}function Jt(e=()=>{}){return queueMicrotask(()=>{Yt||setTimeout(()=>{Tt()})}),new Promise((t)=>{Ct.push(()=>{e(),t()})})}function Tt(){Yt=!1;while(Ct.length)Ct.shift()()}function _s(){Yt=!0}function Gt(e,t){if(Array.isArray(t))return vr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return Ss(e,t);else if(typeof t==="function")return Gt(e,t());return vr(e,t)}function Mt(e){return e.split(/\s/).filter(Boolean)}function vr(e,t){let r=(i)=>Mt(i).filter((a)=>!e.classList.contains(a)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function Ss(e,t){let r=Object.entries(t).flatMap(([o,s])=>s?Mt(o):!1).filter(Boolean),n=Object.entries(t).flatMap(([o,s])=>!s?Mt(o):!1).filter(Boolean),i=[],a=[];return n.forEach((o)=>{if(e.classList.contains(o))e.classList.remove(o),a.push(o)}),r.forEach((o)=>{if(!e.classList.contains(o))e.classList.add(o),i.push(o)}),()=>{a.forEach((o)=>e.classList.add(o)),i.forEach((o)=>e.classList.remove(o))}}function tt(e,t){if(typeof t==="object"&&t!==null)return As(e,t);return Cs(e,t)}function As(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=Ts(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{tt(e,r)}}function Cs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Ts(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ot(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function Ms(e,t,r){hn(e,Gt,""),{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 Os(e,t,r){hn(e,tt);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),a=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((y,_)=>_<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((y,_)=>_>t.indexOf("out"));let o=!t.includes("opacity")&&!t.includes("scale"),s=o||t.includes("opacity"),l=o||t.includes("scale"),c=s?0:1,d=l?me(t,"scale",95)/100:1,u=me(t,"delay",0)/1000,f=me(t,"origin","center"),h="opacity, transform",b=me(t,"duration",150)/1000,p=me(t,"duration",75)/1000,m="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${b}s`,transitionTimingFunction:m},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(a)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${p}s`,transitionTimingFunction:m},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function hn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Lt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Lt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function pn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:pn(t)}function Lt(e,t,{during:r,start:n,end:i}={},a=()=>{},o=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){a(),o();return}let s,l,c;Ls(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:a,end(){s(),c=t(e,i)},after:o,cleanup(){l(),c()}})}function Ls(e,t){let r,n,i,a=Ot(()=>{E(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Tt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(o){this.beforeCancels.push(o)},cancel:Ot(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},E(()=>{t.start(),t.during()}),_s(),requestAnimationFrame(()=>{if(r)return;let o=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(o===0)o=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;E(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;E(()=>{t.end()}),Tt(),setTimeout(e._x_transitioning.finish,o+s),i=!0})})}function me(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function bn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=ue({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Hs(t):t,t){case"value":Is(e,r);break;case"style":Bs(e,r);break;case"class":Ds(e,r);break;case"selected":case"checked":Ns(e,t,r);break;default:Xt(e,t,r);break}}function Is(e,t){if(Zt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ve(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>zs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Rs(e,t);else if(e.tagName==="OPTION")Xt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ds(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Gt(e,t)}function Bs(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=tt(e,t)}function Ns(e,t,r){Xt(e,t,r),$s(e,t,r)}function Xt(e,t,r){if([null,void 0,!1].includes(r)&&qs(t))e.removeAttribute(t);else{if(mn(t))r=t;if(js(r))r=JSON.stringify(r);Ps(e,t,r)}}function Ps(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function $s(e,t,r){if(e[t]!==r)e[t]=r}function Rs(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Hs(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function zs(e,t){return e==t}function Ue(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function mn(e){return Us.has(e)}function qs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function js(e){return typeof e==="object"&&e!==null}function Ks(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return gn(e,t,r)}function Fs(e,t,r,n=!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=n,Fr(()=>Z(e,i.expression))}return gn(e,t,r)}function gn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(mn(t))return!![t,"true"].includes(n);return n}function Ve(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Zt(e){return e.type==="radio"||e.localName==="ui-radio"}function yn(e,t){let r;return function(){let n=this,i=arguments,a=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(a,t)}}function xn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function vn({get:e,set:t},{get:r,set:n}){let i=!0,a,o,s=oe(()=>{let l=e(),c=r();if(i)n(ut(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==a)n(ut(l));else if(d!==u)t(ut(c))}a=JSON.stringify(e()),o=JSON.stringify(r())});return()=>{Ht(s),fe(s)}}function ut(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Vs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(pe))}function Ws(e,t){if(!wr)H=ue(H),wr=!0;if(t===void 0)return H[e];if(H[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)H[e]=t.initialize(H,e,e,()=>{});else Kt(H[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")H[e].init()}function Ys(){return H}function Js(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return En(e,r());else wn[e]=r;return()=>{}}function Gs(e){return Object.entries(wn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function En(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([o,s])=>({name:o,value:s})),a=Yr(i);return i=i.map((o)=>{if(a.find((s)=>s.name===o.name))return{name:`x-bind:${o.name}`,value:`"${o.value}"`};return o}),Ze(e,i,r).map((o)=>{n.push(o.runCleanups),o()}),()=>{while(n.length)n.pop()()}}function Xs(e,t){kn[e]=t}function Zs(e,t){return Object.entries(kn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function Sn(e){try{let r=new to(e).tokenize(),i=new ro(r).parse(),a=new no;return function(o={}){let{scope:s={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=o;return a.evaluate({node:i,scope:s,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function io(e,t,r={}){let n=An(e),i=ee([r.scope??{},...n]),a=r.params??[],s=Sn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof s==="function"&&X)return s.apply(i,a);return s}function so(e,t){let r=An(e);if(typeof t==="function")return ns(r,t);let n=oo(e,t,r);return Zi.bind(null,e,t,n)}function An(e){let t={};return Ke(t,e),[t,...de(e)]}function oo(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:a=[]}={})=>{let o=ee([i,...r]),l=Sn(t)({scope:o,forceBindingRootScopeToFunctions:!0});if(X&&typeof l==="function"){let c=l.apply(l,a);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function Cn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function re(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function po(e,t=!1){if(e.flags|=8,t){e.next=Ee,Ee=e;return}e.next=we,we=e}function er(){Ln++}function tr(){if(--Ln>0)return;if(Ee){let t=Ee;Ee=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(we){let t=we;we=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function In(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;rr(n),mo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Dt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function bo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===We)return;if(e.globalVersion=We,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Dt(e)))return;e.flags|=2;let t=e.dep,r=v,n=I;v=e,I=!0;try{In(e);let i=e.fn(e._value);if(t.version===0||J(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,I=n,Dn(e),e.flags&=-3}}function rr(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let a=r.computed.deps;a;a=a.nextDep)rr(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function mo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function go(e,t){if(e.effect instanceof kr)e=e.effect.fn;let r=new kr(e);if(t)_e(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function yo(e){e.effect.stop()}function xo(){Bn.push(I),I=!1}function vo(){let e=Bn.pop();I=e===void 0?!0:e}function _r(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function Nn(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Nn(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function O(e,t,r){if(I&&v){let n=Bt.get(e);if(!n)Bt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new Eo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function K(e,t,r,n,i,a){let o=Bt.get(e);if(!o){We++;return}let s=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(er(),t==="clear")o.forEach(s);else{let l=Se(e),c=l&&Qt(r);if(l&&r==="length"){let d=Number(n);o.forEach((u,f)=>{if(f==="length"||f===Ce||!Le(f)&&f>=d)s(u)})}else{if(r!==void 0||o.has(void 0))s(o.get(r));if(c)s(o.get(Ce));switch(t){case"add":if(!l){if(s(o.get(Q)),ve(e))s(o.get(Nt))}else if(c)s(o.get("length"));break;case"delete":if(!l){if(s(o.get(Q)),ve(e))s(o.get(Nt))}break;case"set":if(ve(e))s(o.get(Q));break}}}tr()}function le(e){let t=w(e);if(t===e)return t;return O(t,"iterate",Ce),ie(e)?t:t.map(se)}function nr(e){return O(e=w(e),"iterate",Ce),e}function B(e,t){if(ne(e))return qn(e)?Te(se(t)):Te(t);return se(t)}function pt(e,t,r){let n=nr(e),i=n[t]();if(n!==e&&!ie(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function R(e,t,r,n,i,a){let o=nr(e),s=o!==e&&!ie(e),l=o[t];if(l!==_o[t]){let u=l.apply(e,a);return s?se(u):u}let c=r;if(o!==e){if(s)c=function(u,f){return r.call(this,B(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(o,c,n);return s&&i?i(d):d}function Sr(e,t,r,n){let i=nr(e),a=i!==e&&!ie(e),o=r,s=!1;if(i!==e){if(a)s=n.length===0,o=function(c,d,u){if(s)s=!1,c=B(e,c);return r.call(this,c,B(e,d),u,e)};else if(r.length>3)o=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](o,...n);return s?B(e,l):l}function bt(e,t,r){let n=w(e);O(n,"iterate",Ce);let i=n[t](...r);if((i===-1||i===!1)&&Ro(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function ge(e,t,r=[]){xo(),er();let n=w(e)[t].apply(e,r);return tr(),vo(),n}function Ao(e){if(!Le(e))e=String(e);let t=w(this);return O(t,"has",e),t.hasOwnProperty(e)}function Lo(e,t,r){return function(...n){let i=this.__v_raw,a=w(i),o=ve(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=i[e](...n),d=r?Pt:t?Te:se;return!t&&O(a,"iterate",l?Nt:Q),_e(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:s?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function He(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";re(`${On(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Io(e,t){let r={get(i){let a=this.__v_raw,o=w(a),s=w(i);if(!e){if(J(i,s))O(o,"get",i);O(o,"get",s)}let{has:l}=Re(o),c=t?Pt:e?Te:se;if(l.call(o,i))return c(a.get(i));else if(l.call(o,s))return c(a.get(s));else if(a!==o)a.get(i)},get size(){let i=this.__v_raw;return!e&&O(w(i),"iterate",Q),i.size},has(i){let a=this.__v_raw,o=w(a),s=w(i);if(!e){if(J(i,s))O(o,"has",i);O(o,"has",s)}return i===s?a.has(i):a.has(i)||a.has(s)},forEach(i,a){let o=this,s=o.__v_raw,l=w(s),c=t?Pt:e?Te:se;return!e&&O(l,"iterate",Q),s.forEach((d,u)=>i.call(a,c(d),c(u),o))}};return _e(r,e?{add:He("add"),set:He("set"),delete:He("delete"),clear:He("clear")}:{add(i){let a=w(this),o=Re(a),s=w(i),l=!t&&!ie(i)&&!ne(i)?s:i;if(!(o.has.call(a,l)||J(i,l)&&o.has.call(a,i)||J(s,l)&&o.has.call(a,s)))a.add(l),K(a,"add",l,l);return this},set(i,a){if(!t&&!ie(a)&&!ne(a))a=w(a);let o=w(this),{has:s,get:l}=Re(o),c=s.call(o,i);if(!c)i=w(i),c=s.call(o,i);else Ar(o,s,i);let d=l.call(o,i);if(o.set(i,a),!c)K(o,"add",i,a);else if(J(a,d))K(o,"set",i,a,d);return this},delete(i){let a=w(this),{has:o,get:s}=Re(a),l=o.call(a,i);if(!l)i=w(i),l=o.call(a,i);else Ar(a,o,i);let c=s?s.call(a,i):void 0,d=a.delete(i);if(l)K(a,"delete",i,void 0,c);return d},clear(){let i=w(this),a=i.size!==0,o=ve(i)?new Map(i):new Set(i),s=i.clear();if(a)K(i,"clear",void 0,void 0,o);return s}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Lo(i,e,t)}),r}function Rn(e,t){let r=Io(e,t);return(n,i,a)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(It(r,i)&&i in n?r:n,i,a)}}function Ar(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Mn(e);re(`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.`)}}function $o(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ir(e){if(ne(e))return e;return Un(e,!1,Mo,Do,Hn)}function $t(e){return Un(e,!0,Oo,Bo,zn)}function Un(e,t,r,n,i){if(!Ae(e))return re(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=$o(Mn(e));if(o===0)return e;let s=new Proxy(e,o===2?n:r);return i.set(e,s),s}function qn(e){if(ne(e))return qn(e.__v_raw);return!!(e&&e.__v_isReactive)}function ne(e){return!!(e&&e.__v_isReadonly)}function ie(e){return!!(e&&e.__v_isShallow)}function Ro(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function ke(e){return e?e.__v_isRef===!0:!1}function Ho(e){let t=[];return L(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function jn(e){if(!mt[e])mt[e]=0;return++mt[e]}function zo(e,t){return L(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Uo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=jn(t)}function qo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Kn(e,t,r){D(t,(n)=>N(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Cr(e){let t=U(()=>document.querySelector(e),()=>jo)();if(!t)N(`Cannot find x-teleport element for selector: "${e}"`);return t}function ce(e,t,r,n){let i=e,a=(l)=>n(l),o={},s=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=Ko(t);if(r.includes("camel"))t=Fo(t);if(r.includes("capture"))o.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))o.passive=r[r.indexOf("passive")+1]!=="false";if(a=Vn(r,a),r.includes("prevent"))a=s(a,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))a=s(a,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))a=s(a,(l,c)=>{l(c),i.removeEventListener(t,a,o)});if(r.includes("away")||r.includes("outside"))i=document,a=s(a,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))a=s(a,(l,c)=>{c.target===e&&l(c)});if(t==="submit")a=s(a,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Wo(t)||Wn(t))a=s(a,(l,c)=>{if(Jo(c,r))return;l(c)});return i.addEventListener(t,a,o),()=>{i.removeEventListener(t,a,o)}}function Vn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=yn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=xn(t,n)}return t}function Ko(e){return e.replace(/-/g,".")}function Fo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ye(e){return!Array.isArray(e)&&!isNaN(e)}function Vo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Wo(e){return["keydown","keyup"].includes(e)}function Wn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Jo(e,t){let r=t.filter((a,o)=>{if(a==="false"&&t[o-1]==="passive")return!1;return!Yo.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Tr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((a)=>r.includes(a));if(r=r.filter((a)=>!i.includes(a)),i.length>0){if(i.filter((o)=>{if(o==="cmd"||o==="super")o="meta";return e[`${o}Key`]}).length===i.length){if(Wn(e.type))return!1;if(Tr(e.key).includes(r[0]))return!1}}return!0}function Tr(e){if(!e)return[];e=Vo(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((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function ze(e,t,r,n){return E(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Ve(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=gt(r.target.value);else if(t.includes("boolean"))i=Ue(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Go(a,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return gt(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return Ue(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Zt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return gt(i);else if(t.includes("boolean"))return Ue(i);else if(t.includes("trim"))return i.trim();else return i}})}function gt(e){let t=e?parseFloat(e):null;return Xo(t)?t:e}function Go(e,t){return e==t}function Xo(e){return!Array.isArray(e)&&!isNaN(e)}function Mr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Zo(e,t){e._x_keyExpression=t}function Qo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function ea(e){if(!F)return!1;if(At)return!0;return e.hasAttribute("data-has-alpine-state")}function ta(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function ra(e,t,r,n){r((i)=>{if(sa(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let a=e._x_lookup,o=new Map;e._x_lookup=o;let s=oa(i),l=Object.entries(i).map(([c,d])=>{if(!s)c=parseInt(c);let u=ia(t,d,c,i),f;return n((h)=>{if(typeof h==="object")N("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(h))o.set(h,a.get(h)),a.delete(h);f=h},{scope:{index:c,...u}}),[f,u]});E(()=>{a.forEach((u)=>{ae(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(o.has(u)){let p=o.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._x_currentIfEl}return}if(e.content.children.length>1)N("x-for templates require a single root element, additional elements will be ignored.",e);let h=document.importNode(e.content,!0).firstElementChild,b=ue(f);Me(h,b,e),h._x_refreshXForScope=ta(b),o.set(u,h),c.add(h),d.after(h),d=h}),c.forEach((u)=>P(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function na(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let a={};a.items=i[2].trim();let o=i[1].replace(r,"").trim(),s=o.match(t);if(s){if(a.item=o.replace(t,"").trim(),a.index=s[1].trim(),s[2])a.collection=s[2].trim()}else a.item=o;return a}function ia(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((o)=>o.trim()).forEach((o,s)=>{i[o]=t[s]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((o)=>o.trim()).forEach((o)=>{i[o]=t[o]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function sa(e){return typeof e!=="object"&&!isNaN(e)}function oa(e){return typeof e==="object"&&!Array.isArray(e)}function Jn(){}function nt(e,t,r){k(t,(n)=>N(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var yt=!1,xt=!1,z,vt=-1,qe=!1,Rt=!1,ue,oe,fe,Lr,$i=0,wt=!0,Dr,Br,Nr,Je,Ut=!1,Y,jt=!1,je,Yi,jr,Kr,X=!0,Vr=()=>{},Wr,Ft="x-",Fe,_t=!1,ye,Jr,Xr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Zr=(e)=>e,en,rn=()=>new RegExp(`^${Ft}([^:^.]+)\\b`),St="DEFAULT",G,F=!1,nn,At=!1,Qe=0,xr=!1,Wt,an,fn,Es=1,Ct,Yt=!1,Us,H,wr=!1,wn,kn,Qs,pe,Er,_n,A=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},eo,to=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new A("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
6
6
|
`)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new A("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new A("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new A("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new A("UNDEFINED",void 0,e,this.position));else this.tokens.push(new A("KEYWORD",t,e,this.position));else this.tokens.push(new A("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
|
|
7
|
-
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let a=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new A("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new A("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new A("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new A("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new A("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new A(i,t,e,this.position))}}},ro=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return eo.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},no=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let m=t[e.name];if(this.checkForDangerousValues(m),typeof m==="function")return m.bind(t);return m}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let a;if(e.computed)a=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else a=e.property.name;this.checkForDangerousKeywords(a);let o=i[a];if(this.checkForDangerousValues(o),typeof o==="function")if(n)return o.bind(t);else return o.bind(i);return o;case"CallExpression":let s=e.arguments.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let m=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y;if(e.callee.computed)y=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else y=e.callee.property.name;this.checkForDangerousKeywords(y);let k=m[y];if(typeof k!=="function")throw Error("Value is not a function");l=k.apply(m,s)}else if(e.callee.type==="Identifier"){let m=e.callee.name,y;if(m in t)y=t[m];else throw Error(`Undefined variable: ${m}`);if(typeof y!=="function")throw Error("Value is not a function");let k=r!==null?r:t;l=y.apply(k,s)}else{let m=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof m!=="function")throw Error("Value is not a function");l=m.apply(r,s)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let m=e.argument.name;if(!(m in t))throw Error(`Undefined variable: ${m}`);let y=t[m];if(e.operator==="++")t[m]=y+1;else if(e.operator==="--")t[m]=y-1;return e.prefix?t[m]:y}else if(e.argument.type==="MemberExpression"){let m=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(y);let k=m[y];if(e.operator==="++")m[y]=k+1;else if(e.operator==="--")m[y]=k-1;return e.prefix?m[y]:k}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let b=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=b,b;else if(e.left.type==="MemberExpression"){let m=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(y),m[y]=b,b}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let m of e.properties){let y=m.computed?this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):m.key.type==="Identifier"?m.key.name:this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),k=this.evaluate({node:m.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[y]=k}return p;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(Er.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(kn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return Er.set(e,!0),!0}},$a,Ra,ke,ao,It=(e,t)=>ao.call(e,t),Se,ve=(e)=>Tn(e)==="[object Map]",lo=(e)=>typeof e==="string",Le=(e)=>typeof e==="symbol",Ae=(e)=>e!==null&&typeof e==="object",co,Tn=(e)=>co.call(e),Mn=(e)=>Tn(e).slice(8,-1),Qt=(e)=>lo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rt=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},uo,Ha,fo,za,On,Ua,J=(e,t)=>!Object.is(e,t),ho="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qa,ft,v,ht,_r=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft)if(ft.active)ft.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ht.has(this))ht.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))po(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,kr(this),In(this);let e=v,t=I;v=this,I=!0;try{return this.fn()}finally{if(v!==this)re("Active effect was not restored correctly - this is likely a Vue internal bug.");Dn(this),v=e,I=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)rr(e);this.deps=this.depsTail=void 0,kr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ht.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Dt(this))this.run()}get dirty(){return Dt(this)}},Ln=0,we,Ee,I=!0,Bn,We=0,wo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Eo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!v||!I||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new wo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;Nn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(ke({effect:v},e));return t}trigger(e){this.version++,We++,this.notify(e)}notify(e){er();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(ke({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{tr()}}},Bt,Q,Nt,Ce,_o,ko,So,Pn,$n=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Po:zn:i?No:Hn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=Se(e);if(!n){let s;if(a&&(s=_o[t]))return s;if(t==="hasOwnProperty")return Ao}let o=Reflect.get(e,t,_e(e)?e:r);if(Le(t)?Pn.has(t):So(t))return o;if(!n)O(e,"get",t);if(i)return o;if(_e(o)){let s=a&&Qt(t)?o:o.value;return n&&Ae(s)?$t(s):s}if(Ae(o))return n?$t(o):ir(o);return o}},Co,To,Mo,Oo,Pt=(e)=>e,Re=(e)=>Reflect.getPrototypeOf(e),Do,Bo,Hn,No,zn,Po,se=(e)=>Ae(e)?ir(e):e,Te=(e)=>Ae(e)?$t(e):e,mt,jo,Fn=()=>{},Yo,Yn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:o})=>{if(!t){let l={};Gs(l),T(e,n)((d)=>{En(e,d,i)},{scope:l});return}if(t==="key")return Zo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let s=T(e,n);a(()=>s((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";E(()=>bn(e,t,l,r))})),o(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},W,Gn,aa;var Zn=Ti(()=>{z=[];Dr=[],Br=[],Nr=[];Je=new MutationObserver(Ge);Y=[];je=[];Yi={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Ji;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let o of e)if(i=Ur(o,t),i)break;if(!i)i=e[e.length-1];let a=Object.getOwnPropertyDescriptor(i,t);if(a?.set&&a?.get)return a.set.call(n,r)||!0;return Reflect.set(i,t,r)}};jr={};Kr=es;Fe={};ye=new Map,Jr=Symbol();en=[];G=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",St,"teleport"];nn=[];Oe((e,t)=>{if(Qe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(L(e,(r)=>r._x_deferInit))t._x_ignore=!0});Wt=[],an=[];fn=[];Ct=[];_("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")Os(e,r,t);else Ms(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,a=()=>i(r);if(t){if(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(r):a();else e._x_transition?e._x_transition.in(r):a();return}e._x_hidePromise=e._x_transition?new Promise((o,s)=>{e._x_transition.out(()=>{},()=>o(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let o=pn(e);if(o){if(!o._x_hideChildren)o._x_hideChildren=[];o._x_hideChildren.push(e)}else i(()=>{let s=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};s(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Us=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"]);H={};wn={};_n={};Qs={get reactive(){return ue},get release(){return fe},get effect(){return oe},get raw(){return Lr},get transaction(){return Ui},version:"3.17.4",flushAndStopDeferringMutations:Wi,dontAutoEvaluateFunctions:Fr,disableEffectScheduling:Ri,startObservingMutations:qt,stopObservingMutations:Hr,setReactivityEngine:Hi,onAttributeRemoved:$r,onAttributesAdded:Pr,closestDataStack:de,skipDuringClone:U,onlyDuringClone:us,addRootSelector:dn,addInitSelector:un,setErrorHandler:Qi,interceptClone:Oe,addScopeToNode:Me,deferMutations:Vi,mapAttributes:Vt,evaluateLater:T,interceptInit:ws,initInterceptors:Kt,injectMagics:Ke,setEvaluator:ts,setRawEvaluator:rs,mergeProxies:ee,extractProp:Fs,findClosest:L,onElRemoved:zt,closestRoot:et,destroyTree:ae,interceptor:qr,transition:Lt,setStyles:tt,mutateDom:E,deferInit:bs,directive:_,entangle:vn,throttle:xn,debounce:yn,evaluate:Z,evaluateRaw:is,initTree:P,nextTick:Jt,prefixed:he,prefix:ss,plugin:Vs,magic:D,store:Ws,start:xs,clone:hs,cloneNode:fs,bound:Ks,$data:zr,watch:Ir,walk:te,data:Xs,bind:Js},pe=Qs,Er=new WeakMap,kn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}kn.add(t)});eo=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];$a=Object.freeze({}),Ra=Object.freeze([]),ke=Object.assign,ao=Object.prototype.hasOwnProperty,Se=Array.isArray,co=Object.prototype.toString,uo=/-\w/g,Ha=rt((e)=>e.replace(uo,(t)=>t.slice(1).toUpperCase())),fo=/\B([A-Z])/g,za=rt((e)=>e.replace(fo,"-$1").toLowerCase()),On=rt((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Ua=rt((e)=>e?`on${On(e)}`:""),qa=Cn(ho+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ht=new WeakSet;Bn=[];Bt=new WeakMap,Q=Symbol("Object iterate"),Nt=Symbol("Map keys iterate"),Ce=Symbol("Array iterate");_o={__proto__:null,[Symbol.iterator](){return pt(this,Symbol.iterator,(e)=>B(this,e))},concat(...e){return le(this).concat(...e.map((t)=>Se(t)?le(t):t))},entries(){return pt(this,"entries",(e)=>(e[1]=B(this,e[1]),e))},every(e,t){return R(this,"every",e,t,void 0,arguments)},filter(e,t){return R(this,"filter",e,t,(r)=>r.map((n)=>B(this,n)),arguments)},find(e,t){return R(this,"find",e,t,(r)=>B(this,r),arguments)},findIndex(e,t){return R(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return R(this,"findLast",e,t,(r)=>B(this,r),arguments)},findLastIndex(e,t){return R(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return R(this,"forEach",e,t,void 0,arguments)},includes(...e){return bt(this,"includes",e)},indexOf(...e){return bt(this,"indexOf",e)},join(e){return le(this).join(e)},lastIndexOf(...e){return bt(this,"lastIndexOf",e)},map(e,t){return R(this,"map",e,t,void 0,arguments)},pop(){return ge(this,"pop")},push(...e){return ge(this,"push",e)},reduce(e,...t){return Sr(this,"reduce",e,t)},reduceRight(e,...t){return Sr(this,"reduceRight",e,t)},shift(){return ge(this,"shift")},some(e,t){return R(this,"some",e,t,void 0,arguments)},splice(...e){return ge(this,"splice",e)},toReversed(){return le(this).toReversed()},toSorted(e){return le(this).toSorted(e)},toSpliced(...e){return le(this).toSpliced(...e)},unshift(...e){return ge(this,"unshift",e)},values(){return pt(this,"values",(e)=>B(this,e))}};ko=Array.prototype;So=Cn("__proto__,__v_isRef,__isVue"),Pn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Le));Co=class extends $n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=Se(e)&&Qt(t);if(!this._isShallow){let l=ne(i);if(!ie(r)&&!ne(r))i=w(i),r=w(r);if(!a&&_e(i)&&!_e(r))if(l)return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let o=a?Number(t)<e.length:It(e,t),s=Reflect.set(e,t,r,_e(e)?e:n);if(e===w(n)&&s){if(!o)K(e,"add",t,r);else if(J(r,i))K(e,"set",t,r,i)}return s}deleteProperty(e,t){let r=It(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)K(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Le(t)||!Pn.has(t))O(e,"has",t);return r}ownKeys(e){return O(e,"iterate",Se(e)?"length":Q),Reflect.ownKeys(e)}},To=class extends $n{constructor(e=!1){super(!0,e)}set(e,t){return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return re(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Mo=new Co,Oo=new To;Do={get:Rn(!1,!1)},Bo={get:Rn(!0,!1)};Hn=new WeakMap,No=new WeakMap,zn=new WeakMap,Po=new WeakMap;D("nextTick",()=>Jt);D("dispatch",(e)=>xe.bind(xe,e));D("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),s=Ir(()=>{let l;return a((c)=>l=c),l},i);r(s)});D("store",Ys);D("data",(e)=>zr(e));D("root",(e)=>et(e));D("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=ee(Ho(e)),e._x_refs_proxy});mt={};D("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return qo(e,i,t,()=>{let a=zo(e,r),o=a?a._x_ids[r]:jn(r);return n?`${r}-${o}-${n}`:`${r}-${o}`})});Oe((e,t)=>{if(e._x_id)t._x_id=e._x_id});D("el",(e)=>e);Kn("Focus","focus","focus");Kn("Persist","persist","persist");_("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let a=n(t),o=()=>{let d;return a((u)=>d=u),d},s=n(`${t} = __placeholder`),l=(d)=>s(()=>{},{scope:{__placeholder:d}}),c=o();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,f=vn({get(){return d()},set(h){u(h)}},{get(){return o()},set(h){l(h)}});i(f)})});_("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")N("x-teleport can only be used on a <template> tag",e);let i=Cr(r),a=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=a,a._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),a.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((s)=>{a.addEventListener(s,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Me(a,{},e);let o=(s,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(s,l);else if(c.includes("append"))l.parentNode.insertBefore(s,l.nextSibling);else l.appendChild(s)};E(()=>{U(()=>{o(a,i,t),P(a)})()}),e._x_teleportPutBack=()=>{let s=Cr(r);E(()=>{o(e._x_teleport,s,t)})},n(()=>E(()=>{a.remove(),ae(a)}))});jo=document.createElement("div");Fn.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})};_("ignore",Fn);_("effect",U((e,{expression:t},{effect:r})=>{r(T(e,t))}));Yo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];_("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let a=e;if(t.includes("parent"))a=L(e,(p)=>p!==e);let o=T(a,r),s;if(typeof r==="string")s=T(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")s=T(a,`${r()} = __placeholder`);else s=()=>{};let l=()=>{let p;return o((m)=>p=m),Mr(p)?p.get():p},c=(p)=>{let m;if(o((y)=>m=y),Mr(m))m.set(p);else s(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")E(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),h=d||u||f,b;if(F)b=()=>{};else if(h){let p=[],m=(y)=>c(ze(e,t,y,l()));if(d)p.push(ce(e,"change",t,m));if(u){if(p.push(ce(e,"blur",t,m)),e.form){let y=e.form,k=()=>m({target:e});if(!y._x_pendingModelUpdates)y._x_pendingModelUpdates=[];y._x_pendingModelUpdates.push(k),i(()=>{if(y._x_pendingModelUpdates)y._x_pendingModelUpdates.splice(y._x_pendingModelUpdates.indexOf(k),1)})}}if(f)p.push(ce(e,"keydown",t,(y)=>{if(y.key==="Enter")m(y)}));b=()=>p.forEach((y)=>y())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";b=ce(e,p,t,(m)=>{c(ze(e,t,m,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ve(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(ze(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=b,i(()=>e._x_removeModelListeners.default()),e.form){let p=ce(e.form,"reset",[],(m)=>{Jt(()=>e._x_model&&e._x_model.set(ze(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Vn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";E(()=>{if(Ve(e))if(Array.isArray(p))e.checked=p.some((m)=>m==e.value);else e.checked=!!p;else if(Zt(e))if(typeof p==="boolean")e.checked=Ue(e.value)===p;else e.checked=e.value==p;else bn(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});_("cloak",(e)=>queueMicrotask(()=>E(()=>e.removeAttribute(he("cloak")))));un(()=>`[${he("init")}]`);_("init",U((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));_("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{E(()=>{e.textContent=a})})})});_("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{E(()=>{Array.from(e.children).forEach((o)=>ae(o)),e.innerHTML=a??"",e._x_ignoreSelf=!0,P(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Vt(Xr(":",Zr(he("bind:"))));Yn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};_("bind",Yn);dn(()=>`[${he("data")}]`);W=Symbol();_("data",(e,{expression:t},{cleanup:r})=>{if(ea(e))return;let n=e[W];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ke(i,e);let a={};Zs(a,i);let o=Z(e,t,{scope:a});if(o===void 0||o===!0)o={};Ke(o,e);let s;if(n?.reactiveData){s=n.reactiveData,Qo(s,o);let c={expression:t};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})}else s=ue(o);Kt(s,r);let l=Me(e,s);U(()=>{s.init&&Z(e,s.init)})(),r(()=>{s.destroy&&Z(e,s.destroy),l();let c={reactiveData:s};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})})});Oe((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});_("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=T(e,r);if(!e._x_doHide)e._x_doHide=()=>{E(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{E(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let a=()=>{e._x_doHide(),e._x_isShown=!1},o=()=>{e._x_doShow(),e._x_isShown=!0},s=()=>setTimeout(o),l=Ot((u)=>u?o():a(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,o,a);else u?s():a()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?s():a();l(u),c=u,d=!1}))});_("for",U((e,{expression:t},{effect:r,cleanup:n})=>{let i=na(t),a=T(e,i.items),o=T(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>ra(e,i,a,o),{priority:"structural"}),n(()=>{e._x_lookup.forEach((s)=>E(()=>{ae(s),s.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Jn.inline=(e,{expression:t},{cleanup:r})=>{let n=et(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};_("ref",Jn);_("if",U((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")N("x-if can only be used on a <template> tag",e);let i=T(e,t),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Me(s,{},e),E(()=>{e.after(s),P(s)}),e._x_currentIfEl=s,e._x_lastRenderedEl=s,e._x_undoIf=()=>{E(()=>{ae(s),s.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},s},o=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((s)=>{s?a():o()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));_("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Uo(e,i))});Oe((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Vt(Xr("@",Zr(he("on:"))));_("on",U((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?T(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let o=ce(e,t,r,(s)=>{a(()=>{},{scope:{$event:s},params:[s]})});i(()=>o())}));nt("Collapse","collapse","collapse");nt("Intersect","intersect","intersect");nt("Focus","trap","focus");nt("Mask","mask","mask");_("html",(e,{expression:t})=>{Xe(Error("Using the x-html directive is prohibited in the CSP build"),e)});pe.setEvaluator(so);pe.setRawEvaluator(io);pe.setReactivityEngine({reactive:ir,effect:(e,t={})=>{let r;return r=go(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:yo,raw:w});Gn=pe,aa=Gn;/*! Bundled license information:
|
|
7
|
+
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let a=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new A("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new A("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new A("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new A("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new A("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new A(i,t,e,this.position))}}},ro=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return eo.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},no=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let m=t[e.name];if(this.checkForDangerousValues(m),typeof m==="function")return m.bind(t);return m}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let a;if(e.computed)a=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else a=e.property.name;this.checkForDangerousKeywords(a);let o=i[a];if(this.checkForDangerousValues(o),typeof o==="function")if(n)return o.bind(t);else return o.bind(i);return o;case"CallExpression":let s=e.arguments.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let m=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y;if(e.callee.computed)y=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else y=e.callee.property.name;this.checkForDangerousKeywords(y);let _=m[y];if(typeof _!=="function")throw Error("Value is not a function");l=_.apply(m,s)}else if(e.callee.type==="Identifier"){let m=e.callee.name,y;if(m in t)y=t[m];else throw Error(`Undefined variable: ${m}`);if(typeof y!=="function")throw Error("Value is not a function");let _=r!==null?r:t;l=y.apply(_,s)}else{let m=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof m!=="function")throw Error("Value is not a function");l=m.apply(r,s)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let m=e.argument.name;if(!(m in t))throw Error(`Undefined variable: ${m}`);let y=t[m];if(e.operator==="++")t[m]=y+1;else if(e.operator==="--")t[m]=y-1;return e.prefix?t[m]:y}else if(e.argument.type==="MemberExpression"){let m=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(y);let _=m[y];if(e.operator==="++")m[y]=_+1;else if(e.operator==="--")m[y]=_-1;return e.prefix?m[y]:_}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let b=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=b,b;else if(e.left.type==="MemberExpression"){let m=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(y),m[y]=b,b}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let m of e.properties){let y=m.computed?this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):m.key.type==="Identifier"?m.key.name:this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),_=this.evaluate({node:m.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[y]=_}return p;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(Er.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(_n.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return Er.set(e,!0),!0}},$a,Ra,_e,ao,It=(e,t)=>ao.call(e,t),Se,ve=(e)=>Tn(e)==="[object Map]",lo=(e)=>typeof e==="string",Le=(e)=>typeof e==="symbol",Ae=(e)=>e!==null&&typeof e==="object",co,Tn=(e)=>co.call(e),Mn=(e)=>Tn(e).slice(8,-1),Qt=(e)=>lo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rt=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},uo,Ha,fo,za,On,Ua,J=(e,t)=>!Object.is(e,t),ho="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qa,ft,v,ht,kr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft)if(ft.active)ft.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ht.has(this))ht.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))po(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_r(this),In(this);let e=v,t=I;v=this,I=!0;try{return this.fn()}finally{if(v!==this)re("Active effect was not restored correctly - this is likely a Vue internal bug.");Dn(this),v=e,I=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)rr(e);this.deps=this.depsTail=void 0,_r(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ht.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Dt(this))this.run()}get dirty(){return Dt(this)}},Ln=0,we,Ee,I=!0,Bn,We=0,wo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Eo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!v||!I||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new wo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;Nn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(_e({effect:v},e));return t}trigger(e){this.version++,We++,this.notify(e)}notify(e){er();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(_e({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{tr()}}},Bt,Q,Nt,Ce,ko,_o,So,Pn,$n=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Po:zn:i?No:Hn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=Se(e);if(!n){let s;if(a&&(s=ko[t]))return s;if(t==="hasOwnProperty")return Ao}let o=Reflect.get(e,t,ke(e)?e:r);if(Le(t)?Pn.has(t):So(t))return o;if(!n)O(e,"get",t);if(i)return o;if(ke(o)){let s=a&&Qt(t)?o:o.value;return n&&Ae(s)?$t(s):s}if(Ae(o))return n?$t(o):ir(o);return o}},Co,To,Mo,Oo,Pt=(e)=>e,Re=(e)=>Reflect.getPrototypeOf(e),Do,Bo,Hn,No,zn,Po,se=(e)=>Ae(e)?ir(e):e,Te=(e)=>Ae(e)?$t(e):e,mt,jo,Fn=()=>{},Yo,Yn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:o})=>{if(!t){let l={};Gs(l),T(e,n)((d)=>{En(e,d,i)},{scope:l});return}if(t==="key")return Zo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let s=T(e,n);a(()=>s((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";E(()=>bn(e,t,l,r))})),o(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},W,Gn,aa;var Zn=Ti(()=>{z=[];Dr=[],Br=[],Nr=[];Je=new MutationObserver(Ge);Y=[];je=[];Yi={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Ji;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let o of e)if(i=Ur(o,t),i)break;if(!i)i=e[e.length-1];let a=Object.getOwnPropertyDescriptor(i,t);if(a?.set&&a?.get)return a.set.call(n,r)||!0;return Reflect.set(i,t,r)}};jr={};Kr=es;Fe={};ye=new Map,Jr=Symbol();en=[];G=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",St,"teleport"];nn=[];Oe((e,t)=>{if(Qe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(L(e,(r)=>r._x_deferInit))t._x_ignore=!0});Wt=[],an=[];fn=[];Ct=[];k("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")Os(e,r,t);else Ms(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,a=()=>i(r);if(t){if(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(r):a();else e._x_transition?e._x_transition.in(r):a();return}e._x_hidePromise=e._x_transition?new Promise((o,s)=>{e._x_transition.out(()=>{},()=>o(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let o=pn(e);if(o){if(!o._x_hideChildren)o._x_hideChildren=[];o._x_hideChildren.push(e)}else i(()=>{let s=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};s(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Us=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"]);H={};wn={};kn={};Qs={get reactive(){return ue},get release(){return fe},get effect(){return oe},get raw(){return Lr},get transaction(){return Ui},version:"3.17.4",flushAndStopDeferringMutations:Wi,dontAutoEvaluateFunctions:Fr,disableEffectScheduling:Ri,startObservingMutations:qt,stopObservingMutations:Hr,setReactivityEngine:Hi,onAttributeRemoved:$r,onAttributesAdded:Pr,closestDataStack:de,skipDuringClone:U,onlyDuringClone:us,addRootSelector:dn,addInitSelector:un,setErrorHandler:Qi,interceptClone:Oe,addScopeToNode:Me,deferMutations:Vi,mapAttributes:Vt,evaluateLater:T,interceptInit:ws,initInterceptors:Kt,injectMagics:Ke,setEvaluator:ts,setRawEvaluator:rs,mergeProxies:ee,extractProp:Fs,findClosest:L,onElRemoved:zt,closestRoot:et,destroyTree:ae,interceptor:qr,transition:Lt,setStyles:tt,mutateDom:E,deferInit:bs,directive:k,entangle:vn,throttle:xn,debounce:yn,evaluate:Z,evaluateRaw:is,initTree:P,nextTick:Jt,prefixed:he,prefix:ss,plugin:Vs,magic:D,store:Ws,start:xs,clone:hs,cloneNode:fs,bound:Ks,$data:zr,watch:Ir,walk:te,data:Xs,bind:Js},pe=Qs,Er=new WeakMap,_n=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}_n.add(t)});eo=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];$a=Object.freeze({}),Ra=Object.freeze([]),_e=Object.assign,ao=Object.prototype.hasOwnProperty,Se=Array.isArray,co=Object.prototype.toString,uo=/-\w/g,Ha=rt((e)=>e.replace(uo,(t)=>t.slice(1).toUpperCase())),fo=/\B([A-Z])/g,za=rt((e)=>e.replace(fo,"-$1").toLowerCase()),On=rt((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Ua=rt((e)=>e?`on${On(e)}`:""),qa=Cn(ho+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ht=new WeakSet;Bn=[];Bt=new WeakMap,Q=Symbol("Object iterate"),Nt=Symbol("Map keys iterate"),Ce=Symbol("Array iterate");ko={__proto__:null,[Symbol.iterator](){return pt(this,Symbol.iterator,(e)=>B(this,e))},concat(...e){return le(this).concat(...e.map((t)=>Se(t)?le(t):t))},entries(){return pt(this,"entries",(e)=>(e[1]=B(this,e[1]),e))},every(e,t){return R(this,"every",e,t,void 0,arguments)},filter(e,t){return R(this,"filter",e,t,(r)=>r.map((n)=>B(this,n)),arguments)},find(e,t){return R(this,"find",e,t,(r)=>B(this,r),arguments)},findIndex(e,t){return R(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return R(this,"findLast",e,t,(r)=>B(this,r),arguments)},findLastIndex(e,t){return R(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return R(this,"forEach",e,t,void 0,arguments)},includes(...e){return bt(this,"includes",e)},indexOf(...e){return bt(this,"indexOf",e)},join(e){return le(this).join(e)},lastIndexOf(...e){return bt(this,"lastIndexOf",e)},map(e,t){return R(this,"map",e,t,void 0,arguments)},pop(){return ge(this,"pop")},push(...e){return ge(this,"push",e)},reduce(e,...t){return Sr(this,"reduce",e,t)},reduceRight(e,...t){return Sr(this,"reduceRight",e,t)},shift(){return ge(this,"shift")},some(e,t){return R(this,"some",e,t,void 0,arguments)},splice(...e){return ge(this,"splice",e)},toReversed(){return le(this).toReversed()},toSorted(e){return le(this).toSorted(e)},toSpliced(...e){return le(this).toSpliced(...e)},unshift(...e){return ge(this,"unshift",e)},values(){return pt(this,"values",(e)=>B(this,e))}};_o=Array.prototype;So=Cn("__proto__,__v_isRef,__isVue"),Pn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Le));Co=class extends $n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=Se(e)&&Qt(t);if(!this._isShallow){let l=ne(i);if(!ie(r)&&!ne(r))i=w(i),r=w(r);if(!a&&ke(i)&&!ke(r))if(l)return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let o=a?Number(t)<e.length:It(e,t),s=Reflect.set(e,t,r,ke(e)?e:n);if(e===w(n)&&s){if(!o)K(e,"add",t,r);else if(J(r,i))K(e,"set",t,r,i)}return s}deleteProperty(e,t){let r=It(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)K(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Le(t)||!Pn.has(t))O(e,"has",t);return r}ownKeys(e){return O(e,"iterate",Se(e)?"length":Q),Reflect.ownKeys(e)}},To=class extends $n{constructor(e=!1){super(!0,e)}set(e,t){return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return re(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Mo=new Co,Oo=new To;Do={get:Rn(!1,!1)},Bo={get:Rn(!0,!1)};Hn=new WeakMap,No=new WeakMap,zn=new WeakMap,Po=new WeakMap;D("nextTick",()=>Jt);D("dispatch",(e)=>xe.bind(xe,e));D("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),s=Ir(()=>{let l;return a((c)=>l=c),l},i);r(s)});D("store",Ys);D("data",(e)=>zr(e));D("root",(e)=>et(e));D("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=ee(Ho(e)),e._x_refs_proxy});mt={};D("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return qo(e,i,t,()=>{let a=zo(e,r),o=a?a._x_ids[r]:jn(r);return n?`${r}-${o}-${n}`:`${r}-${o}`})});Oe((e,t)=>{if(e._x_id)t._x_id=e._x_id});D("el",(e)=>e);Kn("Focus","focus","focus");Kn("Persist","persist","persist");k("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let a=n(t),o=()=>{let d;return a((u)=>d=u),d},s=n(`${t} = __placeholder`),l=(d)=>s(()=>{},{scope:{__placeholder:d}}),c=o();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,f=vn({get(){return d()},set(h){u(h)}},{get(){return o()},set(h){l(h)}});i(f)})});k("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")N("x-teleport can only be used on a <template> tag",e);let i=Cr(r),a=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=a,a._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),a.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((s)=>{a.addEventListener(s,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Me(a,{},e);let o=(s,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(s,l);else if(c.includes("append"))l.parentNode.insertBefore(s,l.nextSibling);else l.appendChild(s)};E(()=>{U(()=>{o(a,i,t),P(a)})()}),e._x_teleportPutBack=()=>{let s=Cr(r);E(()=>{o(e._x_teleport,s,t)})},n(()=>E(()=>{a.remove(),ae(a)}))});jo=document.createElement("div");Fn.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})};k("ignore",Fn);k("effect",U((e,{expression:t},{effect:r})=>{r(T(e,t))}));Yo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];k("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let a=e;if(t.includes("parent"))a=L(e,(p)=>p!==e);let o=T(a,r),s;if(typeof r==="string")s=T(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")s=T(a,`${r()} = __placeholder`);else s=()=>{};let l=()=>{let p;return o((m)=>p=m),Mr(p)?p.get():p},c=(p)=>{let m;if(o((y)=>m=y),Mr(m))m.set(p);else s(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")E(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),h=d||u||f,b;if(F)b=()=>{};else if(h){let p=[],m=(y)=>c(ze(e,t,y,l()));if(d)p.push(ce(e,"change",t,m));if(u){if(p.push(ce(e,"blur",t,m)),e.form){let y=e.form,_=()=>m({target:e});if(!y._x_pendingModelUpdates)y._x_pendingModelUpdates=[];y._x_pendingModelUpdates.push(_),i(()=>{if(y._x_pendingModelUpdates)y._x_pendingModelUpdates.splice(y._x_pendingModelUpdates.indexOf(_),1)})}}if(f)p.push(ce(e,"keydown",t,(y)=>{if(y.key==="Enter")m(y)}));b=()=>p.forEach((y)=>y())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";b=ce(e,p,t,(m)=>{c(ze(e,t,m,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ve(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(ze(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=b,i(()=>e._x_removeModelListeners.default()),e.form){let p=ce(e.form,"reset",[],(m)=>{Jt(()=>e._x_model&&e._x_model.set(ze(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Vn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";E(()=>{if(Ve(e))if(Array.isArray(p))e.checked=p.some((m)=>m==e.value);else e.checked=!!p;else if(Zt(e))if(typeof p==="boolean")e.checked=Ue(e.value)===p;else e.checked=e.value==p;else bn(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});k("cloak",(e)=>queueMicrotask(()=>E(()=>e.removeAttribute(he("cloak")))));un(()=>`[${he("init")}]`);k("init",U((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));k("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{E(()=>{e.textContent=a})})})});k("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{E(()=>{Array.from(e.children).forEach((o)=>ae(o)),e.innerHTML=a??"",e._x_ignoreSelf=!0,P(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Vt(Xr(":",Zr(he("bind:"))));Yn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};k("bind",Yn);dn(()=>`[${he("data")}]`);W=Symbol();k("data",(e,{expression:t},{cleanup:r})=>{if(ea(e))return;let n=e[W];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ke(i,e);let a={};Zs(a,i);let o=Z(e,t,{scope:a});if(o===void 0||o===!0)o={};Ke(o,e);let s;if(n?.reactiveData){s=n.reactiveData,Qo(s,o);let c={expression:t};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})}else s=ue(o);Kt(s,r);let l=Me(e,s);U(()=>{s.init&&Z(e,s.init)})(),r(()=>{s.destroy&&Z(e,s.destroy),l();let c={reactiveData:s};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})})});Oe((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});k("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=T(e,r);if(!e._x_doHide)e._x_doHide=()=>{E(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{E(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let a=()=>{e._x_doHide(),e._x_isShown=!1},o=()=>{e._x_doShow(),e._x_isShown=!0},s=()=>setTimeout(o),l=Ot((u)=>u?o():a(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,o,a);else u?s():a()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?s():a();l(u),c=u,d=!1}))});k("for",U((e,{expression:t},{effect:r,cleanup:n})=>{let i=na(t),a=T(e,i.items),o=T(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>ra(e,i,a,o),{priority:"structural"}),n(()=>{e._x_lookup.forEach((s)=>E(()=>{ae(s),s.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Jn.inline=(e,{expression:t},{cleanup:r})=>{let n=et(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};k("ref",Jn);k("if",U((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")N("x-if can only be used on a <template> tag",e);let i=T(e,t),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Me(s,{},e),E(()=>{e.after(s),P(s)}),e._x_currentIfEl=s,e._x_lastRenderedEl=s,e._x_undoIf=()=>{E(()=>{ae(s),s.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},s},o=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((s)=>{s?a():o()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));k("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Uo(e,i))});Oe((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Vt(Xr("@",Zr(he("on:"))));k("on",U((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?T(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let o=ce(e,t,r,(s)=>{a(()=>{},{scope:{$event:s},params:[s]})});i(()=>o())}));nt("Collapse","collapse","collapse");nt("Intersect","intersect","intersect");nt("Focus","trap","focus");nt("Mask","mask","mask");k("html",(e,{expression:t})=>{Xe(Error("Using the x-html directive is prohibited in the CSP build"),e)});pe.setEvaluator(so);pe.setRawEvaluator(io);pe.setReactivityEngine({reactive:ir,effect:(e,t={})=>{let r;return r=go(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:yo,raw:w});Gn=pe,aa=Gn;/*! Bundled license information:
|
|
8
8
|
|
|
9
9
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
10
|
(**
|
|
@@ -19,7 +19,7 @@ ${r?'Expression: "'+r+`"
|
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
21
|
**)
|
|
22
|
-
*/});var Pe=typeof HTMLElement==="function"?HTMLElement:class{};function br(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function mr(e,t,r={},n=[]){let i=()=>{for(let o of n)if(!e.classList.contains(o))e.classList.add(o);for(let[o,s]of Object.entries(r))if(!e.hasAttribute(o))e.setAttribute(o,s)};i();let a=new MutationObserver(i);a.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>a.disconnect(),{once:!0})}var Mi=Symbol.for("bare-v3.styles");function $e(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[Mi]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let o=new i.CSSStyleSheet;o.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,o],n.add(t);return}let a=e.createElement("style");a.id=t,a.textContent=r,e.head.append(a)}var Ie=null;function Qn(){if(Ie)return Ie;let e=(Zn(),
|
|
22
|
+
*/});var Pe=typeof HTMLElement==="function"?HTMLElement:class{};function br(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function mr(e,t,r={},n=[]){let i=()=>{for(let o of n)if(!e.classList.contains(o))e.classList.add(o);for(let[o,s]of Object.entries(r))if(!e.hasAttribute(o))e.setAttribute(o,s)};i();let a=new MutationObserver(i);a.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>a.disconnect(),{once:!0})}var Mi=Symbol.for("bare-v3.styles");function $e(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[Mi]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let o=new i.CSSStyleSheet;o.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,o],n.add(t);return}let a=e.createElement("style");a.id=t,a.textContent=r,e.head.append(a)}var Ie=null;function Qn(){if(Ie)return Ie;let e=(Zn(),_i(Xn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Ie=e}var ei=(e)=>Qn().reactive(e),sr=(e)=>Ie?Ie.raw(e):e;function ti(e,t,r){let n=Qn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function la(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},a=null,o=null,s=0,l=null,c=0,d=null,u=new n.MutationObserver((b)=>{if(!a.isConnected||b.some(({target:p})=>o.contains(p)&&!d.contains(p)))f()});function f(){if(!a)return;n.clearTimeout(c),u.disconnect();let b=a.dataset.b3Confirm;if(l&&b&&a.textContent===b)a.replaceChildren(...l);a.removeAttribute("data-b3-armed"),a=o=l=null,d.textContent=""}function h(b){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;a=b,s=n.performance.now(),o=b.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||b.parentElement;let m=b.dataset.b3Confirm;if(m)l=[...b.childNodes],b.replaceChildren(m);b.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(o,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(a===b)p.textContent=m||"Press again to confirm"})}e.addEventListener("click",(b)=>{let p=b.target.closest?.("[data-b3-confirm]");if(a&&p!==a)f();if(!p||p.disabled||!e.contains(p))return;if(p===a&&n.performance.now()-s>=350)return f();if(b.preventDefault(),b.stopImmediatePropagation(),p!==a)h(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:b})=>{if(b===a)n.queueMicrotask(()=>b===a&&f())},i),e.addEventListener("keydown",(b)=>{let p=b;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var ri=Symbol.for("bare-v3.confirm");function ni(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[ri])return;e[ri]=!0,la(document)}var be=1.001,ca=320,da=30,ua=350,fa="b3-image-viewer-style",ha=`
|
|
23
23
|
.b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
|
|
24
24
|
background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
|
|
25
25
|
border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
|
|
@@ -38,9 +38,9 @@ ${r?'Expression: "'+r+`"
|
|
|
38
38
|
min-height:44px;min-width:44px;}
|
|
39
39
|
.b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
|
|
40
40
|
.b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
|
|
41
|
-
`;class or extends Pe{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#d=!1;#a=null;#i=new Map;#u=!1;#g=0;#r=0;#y=0;#w=0;#C=!1;#f=null;#E=null;#_=new WeakSet;#k=null;get scale(){return this.#t}get fitted(){return this.#t<=be}get src(){return this.#k??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#k=e.src??e.default??String(e);else if(this.#k=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#v()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#C)return;if(this.#C=!0,$e(this.ownerDocument,fa,ha),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#S(),this.#v(),this.#M(),this.#E=new MutationObserver(()=>{this.#p(),this.#l()}),this.#E.observe(this,{childList:!0}),this.#p(),this.#l()}disconnectedCallback(){this.#f?.abort(),this.#f=null,this.#E?.disconnect(),this.#E=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#a=null,this.#u=!1,this.#C=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#v(),this.reset();if(e==="alt"){let n=this.#s();if(n)n.alt=this.alt;this.#S()}if(e==="open"){if(this.#p(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#s(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#v(){let e=this.#s(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#S(),e.tagName==="IMG")this.#I(e)}#S(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#I(e){if(this.#_.has(e))return;if(this.#_.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#o(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#o(e)},0)}#o(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#p(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#h(){let e=this.#s();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#d=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#x(e){if(this.#t<=be&&!this.#d){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#l(e){let t=e?.element??this.#s();if(!t)return;let r=this.#t<=be,n=!r||this.#d;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#c(e,t,r,n=this.#h()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let a=(t-this.#e)/this.#t,o=(r-this.#n)/this.#t;if(this.#e=t-a*e,this.#n=r-o*e,this.#t=e,this.#x(n),this.#l(n),i!==this.#t)this.#b()}#b(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#h();if(t)this.#x(t);if(this.#l(t),e)this.#b()}zoomTo(e){let t=this.#h();if(t)this.#c(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#A(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#T(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#f=new AbortController;let e={signal:this.#f.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#s())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#a=this.#h(),this.#i.size>1||this.#t>be||this.#d)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=be&&!this.#d){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#a??=this.#h(),!this.#a)return;n.preventDefault();let a=this.#A(),o=i?this.#T():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let s=this.#A(),l=i?this.#T():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&o>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/o))):this.#t,f=(a.x-c.left-this.#e)/this.#t,h=(a.y-c.top-this.#n)/this.#t;if(this.#e=s.x-c.left-f*u,this.#n=s.y-c.top-h*u,this.#t=u,this.#x(this.#a),this.#l(this.#a),this.#u=!0,d!==this.#t)this.#b()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#a=this.#h();return}if(this.#a=null,this.#u){this.#g=performance.now(),this.#u=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),a=Math.hypot(n.clientX-this.#y,n.clientY-this.#w)<da;if(i-this.#r<ca&&a){this.#r=0;let o=this.getBoundingClientRect();this.#c(this.#t>be?1:2.5,n.clientX-o.left,n.clientY-o.top),this.#g=i}else this.#r=i,this.#y=n.clientX,this.#w=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#g<ua){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#c(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let a=this.#h();if(!a||a.h*this.#t<=a.vh&&!this.#d)return;let o=this.#n;if(this.#n-=n.deltaY,this.#x(a),this.#n===o)return;n.preventDefault(),this.#l(a)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,a=(o,s)=>{let l=this.#h();if(!l||this.fitted)return!1;return this.#e+=o,this.#n+=s,this.#x(l),this.#l(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!a(i,0))return;break;case"ArrowRight":if(!a(-i,0))return;break;case"ArrowUp":if(!a(0,i))return;break;case"ArrowDown":if(!a(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#h();if(n)this.#x(n),this.#l(n)},e)}}var ii=or;function ar(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ii;return ii=class extends or{},customElements.define(e,r),r}ar();var pa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,ba=/(?:\s+(?!#\d+(?:\s|$))[#@][\p{L}\p{N}_-]+)+\s*$/u,ma=350,Be=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),lr=(e)=>JSON.parse(JSON.stringify(sr(e))),x=(e,t)=>e!=null&&String(e)===String(t),it=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],V=(e)=>Array.isArray(e.comments)?e.comments:[];function ga(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,a]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=a)return`${Math.floor(n/a)}${i} ago`;return`${n}m ago`}var hi=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function cr(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Be();t.add(String(n.id))};return e.filter(it).map((n)=>{r(n),n.cards=hi(Array.isArray(n.cards)?n.cards.filter(it):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(it(a))r(a)}if(Array.isArray(i.comments)){for(let a of i.comments)if(it(a))r(a)}}return n})}function si(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((a)=>x(a.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let a of n.cards){let o=C(a),s=o.findIndex((l)=>x(l.id,r));if(s>=0)return void o.splice(s,1)}}}function ya(e,t,r){let{field:n,id:i}=r,a=(o,s,l)=>o.splice(Math.min(l,o.length),0,sr(s));if(n==="name"){let o=e.findIndex((s)=>x(s.id,i));if(o>=0&&!t.some((s)=>x(s.id,i)))a(t,e[o],o);return}for(let o of e){let s=o.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&s>=0){let l=t.find((c)=>x(c.id,o.id));if(l&&!l.cards.some((c)=>x(c.id,i)))a(l.cards,o.cards[s],s);return}if(n==="subtask")for(let l of o.cards){let c=C(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!C(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];a(d.subtasks,C(l)[c],c)}return}}}var pi=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function xa(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...at(e),...V(e).map((t)=>t.text??"")].join(`
|
|
41
|
+
`;class or extends Pe{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#d=!1;#a=null;#i=new Map;#u=!1;#g=0;#r=0;#y=0;#w=0;#C=!1;#f=null;#E=null;#k=new WeakSet;#_=null;get scale(){return this.#t}get fitted(){return this.#t<=be}get src(){return this.#_??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#_=e.src??e.default??String(e);else if(this.#_=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#v()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#C)return;if(this.#C=!0,$e(this.ownerDocument,fa,ha),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#S(),this.#v(),this.#M(),this.#E=new MutationObserver(()=>{this.#p(),this.#l()}),this.#E.observe(this,{childList:!0}),this.#p(),this.#l()}disconnectedCallback(){this.#f?.abort(),this.#f=null,this.#E?.disconnect(),this.#E=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#a=null,this.#u=!1,this.#C=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#v(),this.reset();if(e==="alt"){let n=this.#s();if(n)n.alt=this.alt;this.#S()}if(e==="open"){if(this.#p(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#s(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#v(){let e=this.#s(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#S(),e.tagName==="IMG")this.#I(e)}#S(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#I(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#o(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#o(e)},0)}#o(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#p(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#h(){let e=this.#s();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#d=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#x(e){if(this.#t<=be&&!this.#d){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#l(e){let t=e?.element??this.#s();if(!t)return;let r=this.#t<=be,n=!r||this.#d;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#c(e,t,r,n=this.#h()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let a=(t-this.#e)/this.#t,o=(r-this.#n)/this.#t;if(this.#e=t-a*e,this.#n=r-o*e,this.#t=e,this.#x(n),this.#l(n),i!==this.#t)this.#b()}#b(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#h();if(t)this.#x(t);if(this.#l(t),e)this.#b()}zoomTo(e){let t=this.#h();if(t)this.#c(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#A(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#T(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#f=new AbortController;let e={signal:this.#f.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#s())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#a=this.#h(),this.#i.size>1||this.#t>be||this.#d)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=be&&!this.#d){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#a??=this.#h(),!this.#a)return;n.preventDefault();let a=this.#A(),o=i?this.#T():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let s=this.#A(),l=i?this.#T():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&o>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/o))):this.#t,f=(a.x-c.left-this.#e)/this.#t,h=(a.y-c.top-this.#n)/this.#t;if(this.#e=s.x-c.left-f*u,this.#n=s.y-c.top-h*u,this.#t=u,this.#x(this.#a),this.#l(this.#a),this.#u=!0,d!==this.#t)this.#b()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#a=this.#h();return}if(this.#a=null,this.#u){this.#g=performance.now(),this.#u=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),a=Math.hypot(n.clientX-this.#y,n.clientY-this.#w)<da;if(i-this.#r<ca&&a){this.#r=0;let o=this.getBoundingClientRect();this.#c(this.#t>be?1:2.5,n.clientX-o.left,n.clientY-o.top),this.#g=i}else this.#r=i,this.#y=n.clientX,this.#w=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#g<ua){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#c(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let a=this.#h();if(!a||a.h*this.#t<=a.vh&&!this.#d)return;let o=this.#n;if(this.#n-=n.deltaY,this.#x(a),this.#n===o)return;n.preventDefault(),this.#l(a)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,a=(o,s)=>{let l=this.#h();if(!l||this.fitted)return!1;return this.#e+=o,this.#n+=s,this.#x(l),this.#l(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!a(i,0))return;break;case"ArrowRight":if(!a(-i,0))return;break;case"ArrowUp":if(!a(0,i))return;break;case"ArrowDown":if(!a(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#h();if(n)this.#x(n),this.#l(n)},e)}}var ii=or;function ar(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ii;return ii=class extends or{},customElements.define(e,r),r}ar();var pa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,ba=/(?:\s+(?!#\d+(?:\s|$))[#@][\p{L}\p{N}_-]+)+\s*$/u,ma=350,Be=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),lr=(e)=>JSON.parse(JSON.stringify(sr(e))),x=(e,t)=>e!=null&&String(e)===String(t),it=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],V=(e)=>Array.isArray(e.comments)?e.comments:[];function ga(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,a]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=a)return`${Math.floor(n/a)}${i} ago`;return`${n}m ago`}var hi=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function cr(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Be();t.add(String(n.id))};return e.filter(it).map((n)=>{r(n),n.cards=hi(Array.isArray(n.cards)?n.cards.filter(it):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(it(a))r(a)}if(Array.isArray(i.comments)){for(let a of i.comments)if(it(a))r(a)}}return n})}function si(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((a)=>x(a.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let a of n.cards){let o=C(a),s=o.findIndex((l)=>x(l.id,r));if(s>=0)return void o.splice(s,1)}}}function ya(e,t,r){let{field:n,id:i}=r,a=(o,s,l)=>o.splice(Math.min(l,o.length),0,sr(s));if(n==="name"){let o=e.findIndex((s)=>x(s.id,i));if(o>=0&&!t.some((s)=>x(s.id,i)))a(t,e[o],o);return}for(let o of e){let s=o.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&s>=0){let l=t.find((c)=>x(c.id,o.id));if(l&&!l.cards.some((c)=>x(c.id,i)))a(l.cards,o.cards[s],s);return}if(n==="subtask")for(let l of o.cards){let c=C(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!C(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];a(d.subtasks,C(l)[c],c)}return}}}var pi=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function xa(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...at(e),...V(e).map((t)=>t.text??"")].join(`
|
|
42
42
|
`).toLowerCase()}var oi=(e,t)=>{let r=String(t.text??"").toLowerCase();return pi(e).some((n)=>r.includes(n))},va=/^#\d+$/;function at(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
|
|
43
|
-
`);for(let[,,n]of r.matchAll(pa))t.add(n.toLowerCase());return[...t].filter((n)=>!va.test(n))}var ai=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,wa=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ai}\)|\[([^\]\n]+)\]\(${ai}\)|\[([^[\]\s]*\/[^[\]\s]*\.[a-z][a-z\d]{0,7}|[^[\]\s\/]+\.(?:md|markdown|txt|json|ya?ml|csv|log|pdf|png|jpe?g|gif|webp|svg|html|kanban))\](?![(\[])|\bhttps?:\/\/[^\s<>]+`,"giu"),Ea=new Set(["javascript","data","vbscript","file","blob","about"]),
|
|
43
|
+
`);for(let[,,n]of r.matchAll(pa))t.add(n.toLowerCase());return[...t].filter((n)=>!va.test(n))}var ai=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,wa=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ai}\)|\[([^\]\n]+)\]\(${ai}\)|\[([^[\]\s]*\/[^[\]\s]*\.[a-z][a-z\d]{0,7}|[^[\]\s\/]+\.(?:md|markdown|txt|json|ya?ml|csv|log|pdf|png|jpe?g|gif|webp|svg|html|kanban))\](?![(\[])|\bhttps?:\/\/[^\s<>]+`,"giu"),Ea=new Set(["javascript","data","vbscript","file","blob","about"]),ka=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function _a(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!Ea.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var li=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean),ci=(e)=>(e??"").toLowerCase().split(",").map((t)=>t.trim()).filter(Boolean),dr=(e,t)=>!!t&&e.includes(String(t.name??"").trim().toLowerCase());function fr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(wa)){let a=i[2]!==void 0,[o]=i,s=a?i[1]:i[3]??i[5],l=a?i[2]:i[4]??i[5],c=i.index+o.length;if(!l){let u=o;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=o.length-u.length,o=s=l=u}else l=ka(l);let d=_a(l,t);if(!d||a&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:s,...d,...a?{image:a}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var di=(e,t=[])=>fr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),ur=null;function Sa(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...fr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let a=n.createElement("a");if(a.className="b3-board-ref",a.href=i.href,a.dataset.href=i.href,a.draggable=!1,i.image){let o=n.createElement("img");if(o.src=i.href,o.alt=i.text,o.loading="lazy",o.draggable=!1,a.classList.add("b3-board-image"),a.append(o),i.file)a.dataset.file="";else a.target="_blank",a.rel="noopener noreferrer";return a}if(i.file){if(a.dataset.file="",!ur){let o=n.createElement("template");o.innerHTML=Ma,ur=o.content.firstElementChild}a.append(ur.cloneNode(!0))}else if(/^https?:/i.test(i.href))a.target="_blank",a.rel="noopener noreferrer";return a.append(i.text),a}))}var Aa="b3-board-style",Ca=`
|
|
44
44
|
:where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
|
|
45
45
|
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
46
46
|
--b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
|
|
@@ -88,7 +88,7 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
88
88
|
.b3-board-ref>.b3-board-icon{display:inline;inline-size:.875em;block-size:.875em;margin-inline-end:.2em;vertical-align:-.125em;}
|
|
89
89
|
.b3-board-link{display:inline-flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-chip);padding:0 .375rem;border:0;
|
|
90
90
|
border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);font:inherit;font-size:.8125rem;white-space:nowrap;}
|
|
91
|
-
.b3-board-link:hover{color:var(--b3-color-text);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}
|
|
91
|
+
@media (hover:hover){.b3-board-link:hover{color:var(--b3-color-text);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}}
|
|
92
92
|
.b3-board-link>.b3-board-icon{inline-size:.875rem;block-size:.875rem;}
|
|
93
93
|
/* A height-bounded board scrolls each column's cards on their own; an unbounded one grows. */
|
|
94
94
|
.b3-board-columns{flex:1 1 auto;min-block-size:0;display:flex;align-items:flex-start;gap:var(--b3-space-3,.75rem);overflow-x:auto;
|
|
@@ -128,7 +128,8 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
128
128
|
.b3-board-quiet{flex:none;display:inline-grid;place-items:center;min-inline-size:var(--b3-board-hit);min-block-size:var(--b3-board-hit);
|
|
129
129
|
margin-block:calc((1.45em + .25rem - var(--b3-board-hit)) / 2);padding:0;border:0;border-radius:var(--b3-radius-small,.375rem);
|
|
130
130
|
background:none;color:var(--b3-color-muted);font:inherit;line-height:1;}
|
|
131
|
-
|
|
131
|
+
/* hover tints only where hover exists: iOS keeps :hover stuck after a tap */
|
|
132
|
+
@media (hover:hover){.b3-board-quiet:hover{color:var(--b3-color-text);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}}
|
|
132
133
|
.b3-board-quiet>.b3-board-icon{inline-size:.9375rem;block-size:.9375rem;}
|
|
133
134
|
.b3-board-remove,.b3-board-remove:hover{color:var(--b3-color-danger);}
|
|
134
135
|
.b3-board-star[aria-pressed="true"]{color:var(--b3-board-star);}
|
|
@@ -138,7 +139,7 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
138
139
|
.b3-board-toggle{justify-self:start;display:flex;align-items:center;gap:.375rem;min-inline-size:0;max-inline-size:100%;min-block-size:var(--b3-board-chip);
|
|
139
140
|
margin-inline-start:-.125rem;padding:0 .25rem 0 0;border:0;border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);
|
|
140
141
|
font:inherit;font-size:.75rem;text-align:start;}
|
|
141
|
-
.b3-board-toggle:hover{color:var(--b3-color-text);}
|
|
142
|
+
@media (hover:hover){.b3-board-toggle:hover{color:var(--b3-color-text);}}
|
|
142
143
|
.b3-board-toggle>.b3-board-icon{inline-size:.875rem;block-size:.875rem;transition:rotate var(--b3-duration,.16s);}
|
|
143
144
|
.b3-board-toggle[aria-expanded="true"]>.b3-board-icon{rotate:90deg;}
|
|
144
145
|
.b3-board-toggle:dir(rtl)>.b3-board-icon{scale:-1 1;}
|
|
@@ -336,8 +337,8 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
336
337
|
</template>
|
|
337
338
|
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${st}<span>Add column</span></button>
|
|
338
339
|
</div>
|
|
339
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class bi extends Pe{static observedAttributes=["readonly","search","link-schemes","searchable","expand-in"];#t=null;#e=null;#n=null;#d=null;#a=null;#i=!1;#u=null;#g=null;#r=null;#y=!1;#w=null;#C=0;#f=new Map;#E=Math.random().toString(36).slice(2,8);#
|
|
340
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class bi extends Pe{static observedAttributes=["readonly","search","link-schemes","searchable","expand-in"];#t=null;#e=null;#n=null;#d=null;#a=null;#i=!1;#u=null;#g=null;#r=null;#y=!1;#w=null;#C=0;#f=new Map;#E=Math.random().toString(36).slice(2,8);#k=!1;#_=[];#s={past:[],future:[],now:null,key:"",at:0};#v=!1;get columns(){let e=lr(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)si(e,t);return e}set columns(e){let t=cr(lr(e));if(!this.#e){this.#n=t;return}this.#m();let r=this.#G();if(r)this.#X(r);let n=this.#e;if(n.editing?.fresh)ya(n.columns,t,n.editing);if(n.columns=t,n.editing&&!this.#o(n.editing.id))n.editing=null;if(n.picked.length)n.picked=n.picked.filter((i)=>this.#o(i));if(!this.#v)this.#s={past:[],future:[],now:null,key:"",at:0};this.#s.now=this.columns}undo(){return this.#S(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#S(1)}get canUndo(){return!this.readonly&&(this.#s.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#s.future.length>0}#S(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#s,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let a=new Map(t.columns.flatMap((s)=>s.cards.map((l)=>[String(l.id),l.expanded]))),o=cr(lr(i));for(let s of o)for(let l of s.cards){let c=a.get(String(l.id));if(a.has(String(l.id)))if(c===void 0)delete l.expanded;else l.expanded=c}return this.#m(),t.columns=o,r.now=this.columns,this.#c(e<0?"Undone":"Redone"),this.#I({type:e<0?"undo":"redo"}),!0}#I(e){this.#v=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#v=!1}}get filter(){return[...this.#e?.filter??this.#d??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#d=t}get search(){return this.#e?.search??this.#a??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#a=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}get topColumns(){return this.getAttribute("top-columns")??""}set topColumns(e){if(e)this.setAttribute("top-columns",String(e));else this.removeAttribute("top-columns")}onTop(e){return this.topColumns.split(",").map((t)=>t.trim().toLowerCase()).filter(Boolean).some((t)=>x(e.id,t)||String(e.name??"").trim().toLowerCase()===t)}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((a)=>x(a.id,r))??t.columns.find((a)=>String(a.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#w}set upload(e){this.#w=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if($e(e,Aa,Ca),ni(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=cr(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=ti(this.#t,Da,this.#h(r??[],this.#d??[],this.#a??this.getAttribute("search")??"")),this.#n=this.#d=this.#a=null,this.#s.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#g=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#g.observe(this,{childList:!0}),this.#Z(),mr(this,this.#u.signal,{role:"region"})}disconnectedCallback(){this.#m(),this.#u?.abort(),this.#u=null,this.#H(),this.#g?.disconnect(),this.#g=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=li(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(e==="expand-in")return void(this.#e.expandIn=ci(r));if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#m(),this.#e.editing=null}#o(e){for(let t of this.#e?.columns??[]){if(x(t.id,e))return t;for(let r of t.cards)if(x(r.id,e)||C(r).some((n)=>x(n.id,e)))return r}return null}#p(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#o(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#s,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!this.#A&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#I(e)}#h(e,t,r){let n=this,i=(s)=>this.#p(s),a=(s)=>{for(let l of o.columns){let c=l.cards.findIndex((d)=>x(d.id,s));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},o=ei({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),expandIn:ci(n.getAttribute("expand-in")),searching:!1,schemes:li(n.getAttribute("link-schemes")),viewed:{},selected:null,picked:[],tokensOf:at,subtasksOf:C,commentsOf:V,hits:oi,said(s){return V(s).some((l)=>oi(o.search,l))},now:Date.now(),ago(s){return ga(s,o.now)},label(s){let l=String(s??"");return l.replace(ba,"").trim()||l},pressed(s){return String(o.filter.includes(s))},mention(s){return s.startsWith("@")?"":null},starred(s){return String(!!s.starred)},hasDetails(s){return!!(s.description||C(s).length||V(s).length)},complete(s){let l=C(s).length;return l>0&&o.done(s)===l},preview(s){let l=String(s.description??"");return l.split(`
|
|
340
341
|
`).map((d)=>di(d,o.schemes)).find((d)=>d.trim())?.trim()??(fr(l,o.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(s){return di(o.label(s),o.schemes)},rich(s,l){Sa(s,String(l??""),o.schemes)},keyText(s,l,c,d){if(s.target!==s.currentTarget||s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),o.edit(l,c,d)},isOpen(s){let l=o.viewed[String(s.id)];return o.readonly&&l!==void 0?l:s.expanded??(o.hasDetails(s)&&dr(o.expandIn,o.columns.find((c)=>c.cards.some((d)=>x(d.id,s.id)))))},expanded(s){return String(o.isOpen(s))},isSelected(s){return x(o.selected,s.id)||o.picked.includes(String(s.id))},deleteLabel(s){let l=n.#b(s.id).length;return l>1?`Delete ${l}?`:"Delete?"},isEditing(s,l){return!!o.editing&&o.editing.field===s&&o.editing.id===l},focusEditor(s){queueMicrotask(()=>n.#F(s))},blurEditor(s,l){if(o.isEditing(s,l))o.commit()},tokens(){let s=new Set;for(let l of o.columns)for(let c of l.cards)for(let d of at(c))s.add(d);return[...s].sort()},visible(s){let l=pi(o.search);if(!o.filter.length&&!l.length)return s.cards;let c=o.editing&&n.#o(o.editing.id);return s.cards.filter((d)=>{if(d===c||o.kept.some((h)=>x(d.id,h)))return!0;let u=at(d),f=l.length?xa(d):"";return o.filter.every((h)=>u.includes(h))&&l.every((h)=>f.includes(h))})},count(s){let l=o.visible(s).length;return l===s.cards.length?String(l):`${l}/${s.cards.length}`},done(s){return C(s).filter((l)=>l.done).length},disclosable(s){return!!(o.hasDetails(s)||!o.readonly)},toggleFilter(s){o.kept=[],o.filter=o.filter.includes(s)?o.filter.filter((l)=>l!==s):[...o.filter,s]},setFilter(s){o.kept=[],o.filter=s},searchShown(){return o.searching||!!o.search},openSearch(){o.searching=!0;let s=n.querySelector(".b3-board-search-input");if(!s)return;s.hidden=!1,s.closest(".b3-board-filters").hidden=!1,s.focus(),s.select()},typeSearch(s){n.search=s.target.value},keySearch(s){if(s.isComposing||s.keyCode===229)return;if(s.key!=="Escape"&&s.key!=="Enter")return;s.preventDefault(),s.stopPropagation();let l=s.target;if(s.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){o.searching=!1},toggleStar(s){if(o.readonly)return;if(o.editing)o.commit();let l=a(s.id),c=l?.card;if(!l||!c)return;if(c.starred)delete c.starred;else c.starred=!0;l.column.cards=hi(l.column.cards);let d=!!c.starred;o.announcement=`${c.title??""} ${d?"starred":"unstarred"}`,i({type:"star",card:c.id,starred:d}),n.#D(c.id)},toggle(s){if(o.readonly){o.viewed={...o.viewed,[String(s.id)]:!o.isOpen(s)};return}s.expanded=!o.isOpen(s),i({type:"toggle",card:s.id,expanded:s.expanded})},edit(s,l,c,d=!1,u=!1,f=!1){if(o.readonly||n.#r?.started)return;if(o.editing&&!o.isEditing(s,l))o.commit();o.editing={field:s,id:l,draft:c??"",fresh:d,opened:u,atEnd:f},n.#V()},addDetails(s,l=!1){if(o.readonly)return;let c=!o.isOpen(s);s.expanded=!0,o.edit("description",s.id,String(s.description??""),!1,c,l)},keyEditor(s,l){if(s.stopPropagation(),s.key==="Escape")s.preventDefault(),o.cancel();else if(s.key==="Enter"&&!(l&&s.shiftKey)&&!s.isComposing)s.preventDefault(),o.commit(!0);else if(s.key==="Tab"&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.isComposing&&!n.hasAttribute("compact")){let c=o.editing,d=c?.field==="title"&&!s.shiftKey?"description":c?.field==="description"&&s.shiftKey?"title":null;if(!d)return;s.preventDefault(),o.commit();let u=n.#o(c.id);if(!u||o.readonly)return;if(d==="description")o.addDetails(u,!0);else o.edit("title",u.id,String(u.title??""))}},pasteEditor(s,l,c){let d=[...s.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(o.readonly||!n.upload||!["title","description","comment"].includes(l)||!d.length)return;if(s.clipboardData?.getData("text/plain").trim())return;s.preventDefault();for(let u of d)n.#x(c,u,l==="title"?null:s.target,l==="comment"?"comment":"description")},cancel(){let s=o.editing;if(o.editing=null,s?.fresh)o.discard(s);if(s?.opened)o.close(s);n.#R(s)},close(s){let l=n.#o(s.id);if(l&&!o.hasDetails(l))l.expanded=!1},commit(s=!1){let l=o.editing;if(!l)return;if(o.editing=null,o.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#o(l.id);if(!d)return;if(!c&&l.fresh&&l.field==="title"&&(String(d.description??"").trim()||n.#f.has(String(l.id))))c="Untitled";if(!c&&l.fresh)return o.discard(l);if(!c&&l.opened)o.close(l);let u=null;if(l.field==="comment"){let h=d;if(c){let b={id:Be(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};h.comments=[...V(h),b],u={type:"comment",card:h.id,comment:b.id,op:"add"}}}else if(l.field==="name"){let h=d;if(c&&c!==h.name)h.name=c,u={type:"edit",column:h.id,field:"name"};if(l.fresh)u={type:"add",column:h.id}}else if(l.field==="subtask"){let h=d,b=C(h).find((p)=>x(p.id,l.id));if(!c)return o.removeSubtask(h,b);if(c!==b.title)b.title=c,u={type:"edit",card:h.id,field:"subtask",subtask:b.id};if(l.fresh)u={type:"subtask",card:h.id,subtask:b.id,op:"add"}}else{let h=d,b=l.field;if((c||b==="description")&&c!==(h[b]??""))h[b]=c,u={type:"edit",card:h.id,field:b};if(l.fresh)u={type:"add",card:h.id,column:a(h.id).column.id},o.kept=[...o.kept,h.id]}if(u)i(u);let f=n.#o(l.id)??d;if(l.fresh&&l.field==="subtask"&&s)o.addSubtask(f);else if(l.fresh&&l.field==="title"&&s&&!n.hasAttribute("compact"))o.addDetails(f,!0);else n.#R(l)},discard(s){si(o.columns,s)},settle(){if(o.editing)o.commit()},addCard(s){if(o.readonly)return;o.settle();let l={id:Be(),title:""};if(n.onTop(s)){let c=s.cards.findIndex((d)=>!d.starred);s.cards.splice(c<0?s.cards.length:c,0,l)}else s.cards.push(l);o.edit("title",l.id,"",!0)},addColumn(){if(o.readonly)return;o.settle();let s={id:Be(),name:"",cards:[]};o.columns.push(s),o.edit("name",s.id,"",!0)},addSubtask(s){if(o.readonly)return;o.settle();let l={id:Be(),title:"",done:!1};if(s.expanded=!0,!Array.isArray(s.subtasks))s.subtasks=[];s.subtasks.push(l),o.edit("subtask",l.id,"",!0)},removeCard(s,l){if(o.readonly)return;let c=n.#b(l.id);n.#T(()=>{for(let d of c){let u=a(d);if(!u)continue;u.column.cards=u.column.cards.filter((f)=>f!==u.card),i({type:"remove",card:u.card.id,column:u.column.id})}}),o.picked=[]},removeColumn(s){if(o.readonly)return;o.columns=o.columns.filter((l)=>l!==s),i({type:"remove",column:s.id})},removeSubtask(s,l){if(o.readonly)return;s.subtasks=C(s).filter((c)=>c!==l),i({type:"subtask",card:s.id,subtask:l.id,op:"remove"})},removeComment(s,l){if(o.readonly)return;s.comments=V(s).filter((c)=>c!==l),i({type:"comment",card:s.id,comment:l.id,op:"remove"})},check(s,l,c){if(o.readonly)return;l.done=c,i({type:"check",card:s.id,subtask:l.id,done:c})},keyTags(s){n.#J(s)},keyCard(s,l){if(s.target!==s.currentTarget)return;if(s.key==="Enter")return s.preventDefault(),o.edit("title",l.id,l.title);if(s.metaKey||s.ctrlKey)return;if(s.key==="Escape"&&o.picked.length){s.preventDefault(),s.stopPropagation(),o.picked=[];return}if(!s.altKey)return void n.#W(s,l);if(o.readonly)return;let c=a(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[s.key];if(!u)return;s.preventDefault();let f=n.#b(l.id);if(f.length>1)return void n.#K(s,l,f,u);if(s.key==="ArrowUp"||s.key==="ArrowDown"){let b=o.visible(c.column),p=b[b.indexOf(c.card)+u];if(p&&!p.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(p));else n.#L(s.currentTarget,u,!p?u<0?"Already first":"Already last":l.starred?"Starred cards stay above the others — unstar it to move it lower":"Starred cards stay on top — star it to move it among them");return}let h=o.columns[o.columns.indexOf(c.column)+u];if(h)n.moveCard(l.id,h.id,Math.min(c.index,h.cards.length));else n.#L(s.currentTarget,0,"No column there")},keySubtask(s,l,c){o.keyText(s,"subtask",c.id,c.title);let d=s.key==="ArrowUp"?-1:s.key==="ArrowDown"?1:0;if(!s.altKey||!d||o.readonly)return;s.preventDefault(),s.stopPropagation(),n.#P(l,c.id,C(l).indexOf(c)+d)},keyColumn(s,l){if(s.metaKey||s.ctrlKey||s.shiftKey)return;let c=getComputedStyle(n).direction==="rtl",d=s.key==="ArrowLeft"?c?1:-1:s.key==="ArrowRight"?c?-1:1:0;if(!s.altKey){let f=s.currentTarget.closest(".b3-board-column"),h=[...n.querySelectorAll(".b3-board-column")],b=s.key==="ArrowDown"?f.querySelector(".b3-board-card"):d?h[h.indexOf(f)+d]?.querySelector(".b3-board-column-name"):void 0;if(b===void 0)return;if(s.preventDefault(),b)n.#O(b);return}if(!d||o.readonly)return;s.preventDefault();let u=o.columns.indexOf(l)+d;if(u>=0&&u<o.columns.length)n.moveColumn(l.id,u)}});return o}async#x(e,t,r,n="description"){let i=this.#e,a=()=>i.editing?.field===n&&x(i.editing.id,e)?i.editing:null,o=`![Uploading image ${this.#E}-${++this.#C}…]()`,s="",l=a();if(l&&r){let{selectionStart:g,selectionEnd:S}=r;s=g&&r.value[g-1]!==`
|
|
341
342
|
`?`
|
|
342
|
-
${o}`:o,l.draft=r.value=r.value.slice(0,g)+s+r.value.slice(S),r.setSelectionRange(g+s.length,g+s.length),this.#l(r)}let c=i.columns.find((g)=>g.cards.some((S)=>x(S.id,e))),d=null,u=String(e);this.#f.set(u,(this.#f.get(u)??0)+1);try{d=await this.#w?.(t,{card:e,column:c?.id})}catch(g){console.warn("b3-board: image upload failed",g)}finally{let g=this.#f.get(u)-1;if(g)this.#f.set(u,g);else this.#f.delete(u)}let f=d?`.replace(/[\s()]/g,(g)=>`%${g.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!f)this.#c("Image not added");while(this.#
|
|
343
|
-
${f}`:f:g;let S=h(g);return S?g.slice(0,S[0])+S[2]+g.slice(S[1]):g},p=a();if(p){let g=this.querySelector("textarea.b3-board-editor"),S=g?.value===p.draft&&h(g.value);if(g&&S){let[M,j,lt]=S,{selectionStart:gi,selectionEnd:yi,selectionDirection:xi}=g,hr=(Ne)=>Ne>=j?Ne+lt.length-(j-M):Ne>M?M+lt.length:Ne;g.setRangeText(lt,M,j),g.setSelectionRange(hr(gi),hr(yi),xi??void 0),p.draft=g.value,this.#l(g)}else if(b(p.draft)!==p.draft)p.draft=b(p.draft);else if(f)this.#c("Image not added");return}if(n==="comment"){let g=i.columns.flatMap((M)=>M.cards).find((M)=>V(M).some((j)=>String(j.text??"").includes(o))),S=g&&V(g).find((M)=>String(M.text??"").includes(o));if(!g||!S||this.readonly){if(f)this.#c("Image not added");return}S.text=b(String(S.text)).trim(),this.#p({type:"edit",card:g.id,field:"comment",comment:S.id});return}let m=this.#o(e);if(s&&!String(m?.description??"").includes(o))m=i.columns.flatMap((g)=>g.cards).find((g)=>String(g.description??"").includes(o))??m;let y=String(m?.description??""),k=b(y).trim();if(!m||this.readonly||k===y.trim()){if(f)this.#c("Image not added");return}m.description=k,m.expanded=!0,this.#p({type:"edit",card:m.id,field:"description"});let mi=m.id;requestAnimationFrame(()=>this.#l(this.querySelector(`[data-card="${CSS.escape(String(mi))}"]`)))}#l(e){requestAnimationFrame(()=>e?.isConnected&&e.scrollIntoView({block:"nearest",inline:"nearest"}))}#c(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>x(f.id,e))),a=n.columns.find((u)=>x(u.id,t));if(!i||!a)return!1;let o=i.cards.findIndex((u)=>x(u.id,e)),[s]=i.cards.splice(o,1),l=a.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(a.cards.length,r)),d=s.starred?Math.min(c,l):Math.max(c,l);if(a.cards.splice(d,0,s),i===a&&o===d)return!1;if(dr(n.expandIn,i)!==dr(n.expandIn,a))delete s.expanded;return n.announcement=`${s.title??""} moved to ${a.name??""}, position ${d+1} of ${a.cards.length}`,this.#p({type:"move",card:s.id,from:i.id,to:a.id,index:d}),this.#D(s.id),!0}#b(e){let t=this.#e,r=String(e);if(!t?.picked.length)return[r];let n=new Set([...t.picked,...t.selected!=null?[String(t.selected)]:[]]);if(!n.has(r))return[r];return t.columns.flatMap((i)=>i.cards.map((a)=>String(a.id)).filter((a)=>n.has(a)))}#A=!1;#T(e){let t=this.#s,r=t.now;this.#A=!0;try{e()}finally{this.#A=!1}if(r&&t.now!==r){if(t.past.push(r),t.past.length>100)t.past.shift();t.key=""}}#M(e,t,r){let n=this.#e,i=()=>n.columns.find((o)=>x(o.id,t));if(!i())return;let a=0;if(this.#T(()=>{for(let o of e){let s=i();if(!s)return;let l=n.columns.find((d)=>d.cards.some((u)=>x(u.id,o))),c=r==null?s.cards.length:s.cards.findIndex((d)=>x(d.id,r));if(c<0)c=s.cards.length;if(l===s&&l.cards.findIndex((d)=>x(d.id,o))<c)c-=1;if(this.moveCard(o,s.id,c))a++}}),a)n.announcement=`${e.length} cards moved to ${i()?.name??""}`}#K(e,t,r,n){let i=this.#e,a=e.currentTarget,o=(l)=>i.columns.find((c)=>c.cards.some((d)=>x(d.id,l))),s=o(String(t.id));if(e.key==="ArrowUp"||e.key==="ArrowDown"){if(r.some((h)=>o(h)!==s))return this.#L(a,0,"The selected cards are in different columns");let l=i.visible(s),c=l.findIndex((h)=>x(h.id,n<0?r[0]:r.at(-1))),d=(h)=>l.slice(h).find((b)=>!r.includes(String(b.id))),u=n<0?l.slice(0,c).reverse().find((h)=>!r.includes(String(h.id))):d(c+1);if(!u)return this.#L(a,n,n<0?"Already first":"Already last");let f=n<0?u.id:s.cards[s.cards.indexOf(u)+1]?.id??null;this.#M(r,s.id,f)}else{let l=i.columns[i.columns.indexOf(s)+n];if(!l)return this.#L(a,0,"No column there");let c=o(r[0]).cards.findIndex((d)=>x(d.id,r[0]));this.#M(r,l.id,l.cards.filter((d)=>!r.includes(String(d.id)))[c]?.id??null)}this.#D(t.id)}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((o)=>x(o.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),a=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(a,0,i),n===a)return!1;return r.announcement=`${i.name??""} moved to position ${a+1} of ${r.columns.length}`,this.#p({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#P(e,t,r){let n=this.#e,i=C(e),a=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||a<0)return!1;let o=Math.max(0,Math.min(i.length-1,r));if(a===o)return!1;let[s]=i.splice(a,1);return i.splice(o,0,s),n.announcement=`${s.title??""} moved to position ${o+1} of ${i.length}`,this.#p({type:"subtask",card:e.id,subtask:s.id,op:"move",index:o}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(s.id))}"] .b3-board-title`)?.focus()),!0}#F(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,a=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),o=a(),s=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=a(),c=l.scale===o.scale&&l.height<o.height;if(o=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",s,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#V(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#O(e){e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"})}#W(e,t){let r=this.#e,n=e.currentTarget,i=(c)=>[...c.querySelectorAll(".b3-board-cards > .b3-board-card")],a=n.closest(".b3-board-column"),o=i(a),s=o.indexOf(n),l;if(e.shiftKey&&(e.key==="ArrowUp"||e.key==="ArrowDown")){if(e.preventDefault(),l=o[s+(e.key==="ArrowUp"?-1:1)],!l)return;let c=String(t.id),d=l.dataset.card;return r.picked=r.picked.includes(d)?r.picked.filter((u)=>u!==c&&u!==d):[...r.picked.filter((u)=>u!==c),c],this.#c(`${r.picked.length+1} cards selected`),void this.#O(l)}if(/^(Arrow|Home$|End$)/.test(e.key))r.picked=[];switch(e.key){case"ArrowUp":if(l=o[s-1],!l&&this.#Y())return void e.preventDefault();break;case"ArrowDown":l=o[s+1];break;case"Home":l=o[0];break;case"End":l=o.at(-1);break;case"ArrowLeft":case"ArrowRight":{let c=[...this.querySelectorAll(".b3-board-column")],d=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1;for(let u=c.indexOf(a)+d;u>=0&&u<c.length&&!l;u+=d){let f=i(c[u]);l=f[Math.min(s,f.length-1)]}break}case" ":if(e.preventDefault(),!this.hasAttribute("compact")&&r.disclosable(t))r.toggle(t);return;case"Delete":case"Backspace":{if(r.readonly||e.shiftKey)return;e.preventDefault();let c=this.#b(t.id),d=(f)=>f.find((h)=>!c.includes(h.dataset.card)),u=(d(o.slice(s+1))??d(o.slice(0,s).reverse()))?.dataset.card;n.querySelector(":scope > .b3-board-card-head .b3-board-remove")?.click(),requestAnimationFrame(()=>{if(n.isConnected)return;let f=u!==void 0&&this.querySelector(`[data-card="${CSS.escape(u)}"]`),h=this.querySelector(`[data-column="${CSS.escape(a.dataset.column??"")}"] .b3-board-column-name`),b=f||h;if(b)this.#O(b)});return}default:return}if(e.preventDefault(),l)this.#O(l)}#Y(){let e=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],t=e.find((r)=>r.textContent===this.#B)??e[0];return t?.focus(),!!t}#B=null;#J(e){let t=e.target;if(!t.matches(".b3-board-chip")||e.altKey||e.metaKey||e.ctrlKey)return;let r=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],n=r.indexOf(t);if(this.#B=t.textContent,e.key==="ArrowDown"||e.key==="Escape"){e.preventDefault(),this.focusCard();return}if(e.key===" "||e.key==="Enter"){if(e.preventDefault(),!e.repeat)t.click();return}if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;e.preventDefault();let i=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1,a=r[n+i];if(a)this.#B=a.textContent,a.focus()}focusCard(e){let t=(n)=>n!=null&&this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(n))}"]`),r=t(e)||t(this.#e?.selected)||this.querySelector(".b3-board-cards > .b3-board-card");if(!r)return!1;return this.#O(r),!0}shortcuts=[];showShortcuts(e=!0){let t=this.#t;if(!t)return!1;let r=t.querySelector(":scope > .b3-board-keys");if(!e){if(r)this.focusCard(),r.remove();return!0}if(r)return!0;let n=/Mac|iP(hone|ad|od)/.test(this.ownerDocument.defaultView?.navigator.platform??""),i=n?"⌥":"Alt+",a=n?"⌘":"Ctrl+",o=[["↑ ↓","Previous / next card"],["↑ (top card)","Filter tags: ← → pick, Space toggle, ↓ back"],["← →","Card in the next column"],["Home End","First / last card"],["Space","Expand / collapse"],["Enter","Edit the title"],...this.readonly?[]:[["⇧↑ ⇧↓","Select more cards (moves and Delete act on all; Esc drops)"],[`${a}click ⇧click`,"Select cards with the mouse"],[`${i}↑ ${i}↓`,"Move the card up / down"],[`${i}← ${i}→`,"Move the card to the next column"],["Tab ⇧Tab","Editing: title ⇄ details"],["Delete","Delete the card (press twice)"],[`${a}Z ${n?"⇧⌘Z":"Ctrl+Y"}`,"Undo / redo"]],...this.shortcuts,["Esc","Cancel / close"],["?","This list"]];r=this.ownerDocument.createElement("div"),r.className="b3-board-keys",r.tabIndex=-1,r.setAttribute("role","dialog"),r.setAttribute("aria-label","Keyboard shortcuts");let s=this.ownerDocument.createElement("dl");for(let[l,c]of o){let d=this.ownerDocument.createElement("div"),u=this.ownerDocument.createElement("dt"),f=this.ownerDocument.createElement("dd");for(let h of l.split(" ")){let b=this.ownerDocument.createElement("kbd");b.textContent=h,u.append(b)}f.textContent=c,d.append(u,f),s.append(d)}return r.append(s),r.addEventListener("keydown",(l)=>{if(l.key!=="Escape"&&l.key!=="?")return;l.preventDefault(),l.stopPropagation(),this.showShortcuts(!1)}),r.addEventListener("focusout",(l)=>{if(!r.contains(l.relatedTarget))queueMicrotask(()=>r.remove())}),t.append(r),r.focus({preventScroll:!0}),!0}#G(){let e=this.ownerDocument.activeElement;if(!e?.matches(".b3-board-card")||!this.contains(e))return null;let t=e.closest(".b3-board-column");return{id:e.dataset.card,column:t.dataset.column,index:[...t.querySelectorAll(".b3-board-cards > .b3-board-card")].indexOf(e)}}#X(e){requestAnimationFrame(()=>{let t=this.ownerDocument.activeElement;if(t&&t!==this.ownerDocument.body&&t.isConnected)return;let r=[...this.querySelectorAll(`[data-column="${CSS.escape(e.column)}"] .b3-board-cards > .b3-board-card`)];(this.querySelector(`[data-card="${CSS.escape(e.id)}"]`)??r[Math.min(e.index,r.length-1)])?.focus({preventScroll:!0})})}#L(e,t,r){e.style.setProperty("--b3-board-bump",String(t)),e.removeAttribute("data-b3-bump"),e.offsetWidth,e.setAttribute("data-b3-bump",""),e.addEventListener("animationend",()=>e.removeAttribute("data-b3-bump"),{once:!0}),this.#c(r)}#$(){let e=this.ownerDocument,t=e.activeElement;if(!this.#N||!this.#e?.selected||t&&t!==e.body&&t!==e.documentElement)return;this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(this.#e.selected))}"]`)?.focus({preventScroll:!0})}#D(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#R(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#N=!1;#Z(){this.#u?.abort(),this.#u=new AbortController;let e=this.#u.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(s)=>this.#te(s),{signal:e}),this.addEventListener("mousedown",(s)=>{if(this.#e?.editing&&s.target.closest?.(".b3-board-actions > button, .b3-board-star")&&this.contains(this.ownerDocument.activeElement))s.preventDefault()},{signal:e,capture:!0}),t.addEventListener("pointermove",(s)=>this.#re(s),{signal:e}),t.addEventListener("pointerup",(s)=>this.#ne(s),{signal:e}),this.ownerDocument.addEventListener("selectstart",(s)=>{if(this.#r)s.preventDefault()},{signal:e}),t.addEventListener("pointercancel",(s)=>{if(s.pointerId===this.#r?.pointerId)this.#m()},{signal:e}),t.addEventListener("keydown",(s)=>{if(s.key==="Escape"&&this.#r?.started)s.preventDefault(),this.#m()},{signal:e}),this.addEventListener("touchmove",(s)=>{if(this.#r?.started)s.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(s)=>{if(this.#r)s.preventDefault()},{signal:e}),this.addEventListener("focusin",(s)=>{let l=s.target,c=l.parentElement;if(!c?.matches(".b3-board-filters"))return;c.style.scrollPaddingInlineEnd=`${c.querySelector(":scope > .b3-board-search")?.offsetWidth??0}px`,l.scrollIntoView({inline:"nearest",block:"nearest"})},{signal:e}),this.addEventListener("focusin",(s)=>{this.#N=!0;let l=s.target.closest?.(".b3-board-card"),c=this.#e;if(!l||!c||!this.contains(l))return;let d=l.dataset.card??null;if(d!=null&&c.picked.includes(d)&&c.selected!=null)c.picked=[...c.picked.filter((u)=>u!==d),String(c.selected)];c.selected=d},{signal:e}),this.addEventListener("focusout",(s)=>{let l=s.relatedTarget;if(l&&!this.contains(l)){this.#N=!1;return}if(!l)requestAnimationFrame(()=>requestAnimationFrame(()=>this.#$()))},{signal:e}),t.addEventListener("focus",()=>queueMicrotask(()=>this.#$()),{signal:e}),this.addEventListener("click",(s)=>{let l=this.ownerDocument.getSelection(),c=s.target;if(!this.#y&&l&&!l.isCollapsed&&(c.contains(l.anchorNode)||l.containsNode(c,!0))&&!c.closest?.("button, .b3-board-grip, .b3-board-card-head>.b3-board-title")){s.preventDefault(),s.stopImmediatePropagation();return}if(!this.#y)return;this.#y=!1,s.preventDefault(),s.stopImmediatePropagation()},{signal:e,capture:!0});let n='button, a, input, textarea, select, [contenteditable]:not([contenteditable="false"])',i=(s)=>{let l=s.target,c=l.closest?.(".b3-board-card");return c&&this.contains(c)&&!l.closest(n)&&(s.metaKey||s.ctrlKey||s.shiftKey)&&!s.altKey?c:null};this.addEventListener("mousedown",(s)=>{if(i(s))s.preventDefault()},{signal:e,capture:!0}),this.addEventListener("click",(s)=>{let l=this.#e,c=i(s);if(!l)return;if(!c){if(l.picked.length&&s.target.closest?.(".b3-board-card")&&!s.target.closest(n))l.picked=[];return}s.preventDefault(),s.stopImmediatePropagation();let d=c.dataset.card,u=l.selected!=null?String(l.selected):null,f=new Set(l.picked);if(s.shiftKey&&u!=null){let h=[...c.closest(".b3-board-cards").querySelectorAll(":scope > .b3-board-card")].map((m)=>m.dataset.card),b=h.indexOf(u),p=h.indexOf(d);for(let m of b<0?[u]:h.slice(Math.min(b,p),Math.max(b,p)+1))f.add(m)}else if(d===u||f.has(d)){f.delete(d);let h=[...f].at(-1);if(d===u&&h!==void 0)return f.delete(h),l.picked=[...f],void this.focusCard(h);l.picked=[...f];return}else if(u!=null)f.add(u);f.delete(d),l.picked=[...f],this.#c(`${f.size+1} cards selected`),c.focus({preventScroll:!0})},{signal:e,capture:!0}),this.addEventListener("keydown",(s)=>{if(s.key!=="?"||s.defaultPrevented||s.metaKey||s.ctrlKey||s.altKey||s.isComposing)return;if(s.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"]), .b3-board-keys'))return;s.preventDefault(),this.showShortcuts()},{signal:e}),this.addEventListener("keydown",(s)=>{if(s.defaultPrevented||s.altKey||!(s.metaKey||s.ctrlKey))return;if(s.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let l=s.key.toLowerCase(),c=l==="y"||l==="z"&&s.shiftKey;if(l!=="z"&&l!=="y")return;if(s.preventDefault(),c)this.redo();else this.undo()},{signal:e});let a=(s)=>this.#Q(s);this.addEventListener("click",a,{signal:e,capture:!0}),this.addEventListener("auxclick",(s)=>{if(s.button===1)a(s)},{signal:e,capture:!0});let o=()=>this.#H();this.addEventListener("compositionstart",()=>{this.#_=!0},{signal:e}),this.addEventListener("compositionend",o,{signal:e}),this.addEventListener("focusout",o,{signal:e})}#H(){this.#_=!1;for(let e of this.#k.splice(0))e()}#Q(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),a=i&&C(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),o={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(a)o.subtask=a.id;let s=t.querySelector("img");if(s&&!o.newTab&&e.type==="click"){e.preventDefault(),this.#ee(t,s,o);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:o}))||o.file)e.preventDefault()}#ee(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ar();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=n.createElement("img");a.src=t.currentSrc||t.src,a.alt=t.alt;let o=n.createElement("button");o.type="button",o.className="b3-board-lightbox-open",o.textContent="Open",i.append(a,o);let s=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else s?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),o.addEventListener("pointerdown",(d)=>d.stopPropagation()),o.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#te(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-grip, .b3-board-card-head>.b3-board-title")?t.closest(".b3-board-card"):null;if(!i&&t.closest(".b3-board-card"))return;let a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,o=i??a;if(!o)return;if(n={kind:i?"card":"column",id:i?i.dataset.card:a.dataset.column,node:o,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0},i)n.ids=this.#b(n.id)}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#z(e.clientX,e.clientY)},ma)}#z(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let o of[i,...i.querySelectorAll("[id]")])o.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging","");for(let o of this.#j(r))o.setAttribute("data-b3-dragging","");if((r.ids?.length??0)>1)i.dataset.b3Count=String(r.ids.length);this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let a=()=>{if(this.#r!==r)return;this.#se(r.px,r.py),this.#ie(this.#U(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#re(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let n=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(n>8)this.#m();return}if(n<5)return;this.#z(e.clientX,e.clientY)}e.preventDefault();let r=this.ownerDocument.getSelection();if(r&&!r.isCollapsed)r.removeAllRanges();t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#ne(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#m();let r=this.#U(e.clientX,e.clientY);if(this.#m(),this.#y=!0,setTimeout(()=>{this.#y=!1},0),!r)return;let n=this.#e;if(t.kind==="card")this.#M(t.ids??[t.id],r.column,r.before),this.#D(t.id);else if(t.kind==="subtask"){let i=this.#o(t.card);if(!i)return;let a=C(i),o=r.before?a.findIndex((s)=>x(s.id,r.before)):a.length;if(a.findIndex((s)=>x(s.id,t.id))<o)o-=1;this.#P(i,t.id,o)}else{let i=r.before?n.columns.findIndex((o)=>x(o.id,r.before)):n.columns.length;if(n.columns.findIndex((o)=>x(o.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#U(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#q(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((h)=>{let b=h.getBoundingClientRect();return t<b.top+b.height/2}),f=(h)=>!!(h!=null&&this.#o(h)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((h)=>!f(h.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),a=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],o=getComputedStyle(this).direction==="rtl";return{column:"",before:a.find((l)=>{let c=l.getBoundingClientRect();return o?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#ie(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#q(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#se(e,t){let r=(o,s,l)=>o<s+40?-12:o>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let o=n.getBoundingClientRect();n.scrollLeft+=r(e,o.left,o.right)}let i=this.#r?.kind==="card"?this.#q(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let o=i.getBoundingClientRect();i.scrollTop+=r(t,o.top,o.bottom)}let a=this.ownerDocument.defaultView;a.scrollBy(0,r(t,0,a.innerHeight))}#j(e){return(e.ids??[]).map((t)=>this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(t)}"]`)).filter((t)=>!!t)}#m(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.#j(e))t.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}br("b3-board",bi);export{bi as B3Board};
|
|
343
|
+
${o}`:o,l.draft=r.value=r.value.slice(0,g)+s+r.value.slice(S),r.setSelectionRange(g+s.length,g+s.length),this.#l(r)}let c=i.columns.find((g)=>g.cards.some((S)=>x(S.id,e))),d=null,u=String(e);this.#f.set(u,(this.#f.get(u)??0)+1);try{d=await this.#w?.(t,{card:e,column:c?.id})}catch(g){console.warn("b3-board: image upload failed",g)}finally{let g=this.#f.get(u)-1;if(g)this.#f.set(u,g);else this.#f.delete(u)}let f=d?`.replace(/[\s()]/g,(g)=>`%${g.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!f)this.#c("Image not added");while(this.#k)await new Promise((g)=>this.#_.push(g));let h=(g)=>{if(!s)return null;let S=g.indexOf(s),M=S>=0?S:g.indexOf(o);if(M<0)return null;let j=S>=0?s:o;return[M,M+j.length,f?j.replace(o,f):""]},b=(g)=>{if(!s)return f?g.trim()?`${g.replace(/\s+$/,"")}
|
|
344
|
+
${f}`:f:g;let S=h(g);return S?g.slice(0,S[0])+S[2]+g.slice(S[1]):g},p=a();if(p){let g=this.querySelector("textarea.b3-board-editor"),S=g?.value===p.draft&&h(g.value);if(g&&S){let[M,j,lt]=S,{selectionStart:gi,selectionEnd:yi,selectionDirection:xi}=g,hr=(Ne)=>Ne>=j?Ne+lt.length-(j-M):Ne>M?M+lt.length:Ne;g.setRangeText(lt,M,j),g.setSelectionRange(hr(gi),hr(yi),xi??void 0),p.draft=g.value,this.#l(g)}else if(b(p.draft)!==p.draft)p.draft=b(p.draft);else if(f)this.#c("Image not added");return}if(n==="comment"){let g=i.columns.flatMap((M)=>M.cards).find((M)=>V(M).some((j)=>String(j.text??"").includes(o))),S=g&&V(g).find((M)=>String(M.text??"").includes(o));if(!g||!S||this.readonly){if(f)this.#c("Image not added");return}S.text=b(String(S.text)).trim(),this.#p({type:"edit",card:g.id,field:"comment",comment:S.id});return}let m=this.#o(e);if(s&&!String(m?.description??"").includes(o))m=i.columns.flatMap((g)=>g.cards).find((g)=>String(g.description??"").includes(o))??m;let y=String(m?.description??""),_=b(y).trim();if(!m||this.readonly||_===y.trim()){if(f)this.#c("Image not added");return}m.description=_,m.expanded=!0,this.#p({type:"edit",card:m.id,field:"description"});let mi=m.id;requestAnimationFrame(()=>this.#l(this.querySelector(`[data-card="${CSS.escape(String(mi))}"]`)))}#l(e){requestAnimationFrame(()=>e?.isConnected&&e.scrollIntoView({block:"nearest",inline:"nearest"}))}#c(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>x(f.id,e))),a=n.columns.find((u)=>x(u.id,t));if(!i||!a)return!1;let o=i.cards.findIndex((u)=>x(u.id,e)),[s]=i.cards.splice(o,1),l=a.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(a.cards.length,r)),d=s.starred?Math.min(c,l):Math.max(c,l);if(a.cards.splice(d,0,s),i===a&&o===d)return!1;if(dr(n.expandIn,i)!==dr(n.expandIn,a))delete s.expanded;return n.announcement=`${s.title??""} moved to ${a.name??""}, position ${d+1} of ${a.cards.length}`,this.#p({type:"move",card:s.id,from:i.id,to:a.id,index:d}),this.#D(s.id),!0}#b(e){let t=this.#e,r=String(e);if(!t?.picked.length)return[r];let n=new Set([...t.picked,...t.selected!=null?[String(t.selected)]:[]]);if(!n.has(r))return[r];return t.columns.flatMap((i)=>i.cards.map((a)=>String(a.id)).filter((a)=>n.has(a)))}#A=!1;#T(e){let t=this.#s,r=t.now;this.#A=!0;try{e()}finally{this.#A=!1}if(r&&t.now!==r){if(t.past.push(r),t.past.length>100)t.past.shift();t.key=""}}#M(e,t,r){let n=this.#e,i=()=>n.columns.find((o)=>x(o.id,t));if(!i())return;let a=0;if(this.#T(()=>{for(let o of e){let s=i();if(!s)return;let l=n.columns.find((d)=>d.cards.some((u)=>x(u.id,o))),c=r==null?s.cards.length:s.cards.findIndex((d)=>x(d.id,r));if(c<0)c=s.cards.length;if(l===s&&l.cards.findIndex((d)=>x(d.id,o))<c)c-=1;if(this.moveCard(o,s.id,c))a++}}),a)n.announcement=`${e.length} cards moved to ${i()?.name??""}`}#K(e,t,r,n){let i=this.#e,a=e.currentTarget,o=(l)=>i.columns.find((c)=>c.cards.some((d)=>x(d.id,l))),s=o(String(t.id));if(e.key==="ArrowUp"||e.key==="ArrowDown"){if(r.some((h)=>o(h)!==s))return this.#L(a,0,"The selected cards are in different columns");let l=i.visible(s),c=l.findIndex((h)=>x(h.id,n<0?r[0]:r.at(-1))),d=(h)=>l.slice(h).find((b)=>!r.includes(String(b.id))),u=n<0?l.slice(0,c).reverse().find((h)=>!r.includes(String(h.id))):d(c+1);if(!u)return this.#L(a,n,n<0?"Already first":"Already last");let f=n<0?u.id:s.cards[s.cards.indexOf(u)+1]?.id??null;this.#M(r,s.id,f)}else{let l=i.columns[i.columns.indexOf(s)+n];if(!l)return this.#L(a,0,"No column there");let c=o(r[0]).cards.findIndex((d)=>x(d.id,r[0]));this.#M(r,l.id,l.cards.filter((d)=>!r.includes(String(d.id)))[c]?.id??null)}this.#D(t.id)}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((o)=>x(o.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),a=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(a,0,i),n===a)return!1;return r.announcement=`${i.name??""} moved to position ${a+1} of ${r.columns.length}`,this.#p({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#P(e,t,r){let n=this.#e,i=C(e),a=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||a<0)return!1;let o=Math.max(0,Math.min(i.length-1,r));if(a===o)return!1;let[s]=i.splice(a,1);return i.splice(o,0,s),n.announcement=`${s.title??""} moved to position ${o+1} of ${i.length}`,this.#p({type:"subtask",card:e.id,subtask:s.id,op:"move",index:o}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(s.id))}"] .b3-board-title`)?.focus()),!0}#F(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,a=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),o=a(),s=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=a(),c=l.scale===o.scale&&l.height<o.height;if(o=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",s,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#V(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#O(e){e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"})}#W(e,t){let r=this.#e,n=e.currentTarget,i=(c)=>[...c.querySelectorAll(".b3-board-cards > .b3-board-card")],a=n.closest(".b3-board-column"),o=i(a),s=o.indexOf(n),l;if(e.shiftKey&&(e.key==="ArrowUp"||e.key==="ArrowDown")){if(e.preventDefault(),l=o[s+(e.key==="ArrowUp"?-1:1)],!l)return;let c=String(t.id),d=l.dataset.card;return r.picked=r.picked.includes(d)?r.picked.filter((u)=>u!==c&&u!==d):[...r.picked.filter((u)=>u!==c),c],this.#c(`${r.picked.length+1} cards selected`),void this.#O(l)}if(/^(Arrow|Home$|End$)/.test(e.key))r.picked=[];switch(e.key){case"ArrowUp":if(l=o[s-1],!l&&this.#Y())return void e.preventDefault();break;case"ArrowDown":l=o[s+1];break;case"Home":l=o[0];break;case"End":l=o.at(-1);break;case"ArrowLeft":case"ArrowRight":{let c=[...this.querySelectorAll(".b3-board-column")],d=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1;for(let u=c.indexOf(a)+d;u>=0&&u<c.length&&!l;u+=d){let f=i(c[u]);l=f[Math.min(s,f.length-1)]}break}case" ":if(e.preventDefault(),!this.hasAttribute("compact")&&r.disclosable(t))r.toggle(t);return;case"Delete":case"Backspace":{if(r.readonly||e.shiftKey)return;e.preventDefault();let c=this.#b(t.id),d=(f)=>f.find((h)=>!c.includes(h.dataset.card)),u=(d(o.slice(s+1))??d(o.slice(0,s).reverse()))?.dataset.card;n.querySelector(":scope > .b3-board-card-head .b3-board-remove")?.click(),requestAnimationFrame(()=>{if(n.isConnected)return;let f=u!==void 0&&this.querySelector(`[data-card="${CSS.escape(u)}"]`),h=this.querySelector(`[data-column="${CSS.escape(a.dataset.column??"")}"] .b3-board-column-name`),b=f||h;if(b)this.#O(b)});return}default:return}if(e.preventDefault(),l)this.#O(l)}#Y(){let e=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],t=e.find((r)=>r.textContent===this.#B)??e[0];return t?.focus(),!!t}#B=null;#J(e){let t=e.target;if(!t.matches(".b3-board-chip")||e.altKey||e.metaKey||e.ctrlKey)return;let r=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],n=r.indexOf(t);if(this.#B=t.textContent,e.key==="ArrowDown"||e.key==="Escape"){e.preventDefault(),this.focusCard();return}if(e.key===" "||e.key==="Enter"){if(e.preventDefault(),!e.repeat)t.click();return}if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;e.preventDefault();let i=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1,a=r[n+i];if(a)this.#B=a.textContent,a.focus()}focusCard(e){let t=(n)=>n!=null&&this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(n))}"]`),r=t(e)||t(this.#e?.selected)||this.querySelector(".b3-board-cards > .b3-board-card");if(!r)return!1;return this.#O(r),!0}shortcuts=[];showShortcuts(e=!0){let t=this.#t;if(!t)return!1;let r=t.querySelector(":scope > .b3-board-keys");if(!e){if(r)this.focusCard(),r.remove();return!0}if(r)return!0;let n=/Mac|iP(hone|ad|od)/.test(this.ownerDocument.defaultView?.navigator.platform??""),i=n?"⌥":"Alt+",a=n?"⌘":"Ctrl+",o=[["↑ ↓","Previous / next card"],["↑ (top card)","Filter tags: ← → pick, Space toggle, ↓ back"],["← →","Card in the next column"],["Home End","First / last card"],["Space","Expand / collapse"],["Enter","Edit the title"],...this.readonly?[]:[["⇧↑ ⇧↓","Select more cards (moves and Delete act on all; Esc drops)"],[`${a}click ⇧click`,"Select cards with the mouse"],[`${i}↑ ${i}↓`,"Move the card up / down"],[`${i}← ${i}→`,"Move the card to the next column"],["Tab ⇧Tab","Editing: title ⇄ details"],["Delete","Delete the card (press twice)"],[`${a}Z ${n?"⇧⌘Z":"Ctrl+Y"}`,"Undo / redo"]],...this.shortcuts,["Esc","Cancel / close"],["?","This list"]];r=this.ownerDocument.createElement("div"),r.className="b3-board-keys",r.tabIndex=-1,r.setAttribute("role","dialog"),r.setAttribute("aria-label","Keyboard shortcuts");let s=this.ownerDocument.createElement("dl");for(let[l,c]of o){let d=this.ownerDocument.createElement("div"),u=this.ownerDocument.createElement("dt"),f=this.ownerDocument.createElement("dd");for(let h of l.split(" ")){let b=this.ownerDocument.createElement("kbd");b.textContent=h,u.append(b)}f.textContent=c,d.append(u,f),s.append(d)}return r.append(s),r.addEventListener("keydown",(l)=>{if(l.key!=="Escape"&&l.key!=="?")return;l.preventDefault(),l.stopPropagation(),this.showShortcuts(!1)}),r.addEventListener("focusout",(l)=>{if(!r.contains(l.relatedTarget))queueMicrotask(()=>r.remove())}),t.append(r),r.focus({preventScroll:!0}),!0}#G(){let e=this.ownerDocument.activeElement;if(!e?.matches(".b3-board-card")||!this.contains(e))return null;let t=e.closest(".b3-board-column");return{id:e.dataset.card,column:t.dataset.column,index:[...t.querySelectorAll(".b3-board-cards > .b3-board-card")].indexOf(e)}}#X(e){requestAnimationFrame(()=>{let t=this.ownerDocument.activeElement;if(t&&t!==this.ownerDocument.body&&t.isConnected)return;let r=[...this.querySelectorAll(`[data-column="${CSS.escape(e.column)}"] .b3-board-cards > .b3-board-card`)];(this.querySelector(`[data-card="${CSS.escape(e.id)}"]`)??r[Math.min(e.index,r.length-1)])?.focus({preventScroll:!0})})}#L(e,t,r){e.style.setProperty("--b3-board-bump",String(t)),e.removeAttribute("data-b3-bump"),e.offsetWidth,e.setAttribute("data-b3-bump",""),e.addEventListener("animationend",()=>e.removeAttribute("data-b3-bump"),{once:!0}),this.#c(r)}#$(){let e=this.ownerDocument,t=e.activeElement;if(!this.#N||!this.#e?.selected||t&&t!==e.body&&t!==e.documentElement)return;this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(this.#e.selected))}"]`)?.focus({preventScroll:!0})}#D(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#R(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#N=!1;#Z(){this.#u?.abort(),this.#u=new AbortController;let e=this.#u.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(s)=>this.#te(s),{signal:e}),this.addEventListener("mousedown",(s)=>{if(this.#e?.editing&&s.target.closest?.(".b3-board-actions > button, .b3-board-star")&&this.contains(this.ownerDocument.activeElement))s.preventDefault()},{signal:e,capture:!0}),t.addEventListener("pointermove",(s)=>this.#re(s),{signal:e}),t.addEventListener("pointerup",(s)=>this.#ne(s),{signal:e}),this.ownerDocument.addEventListener("selectstart",(s)=>{if(this.#r)s.preventDefault()},{signal:e}),t.addEventListener("pointercancel",(s)=>{if(s.pointerId===this.#r?.pointerId)this.#m()},{signal:e}),t.addEventListener("keydown",(s)=>{if(s.key==="Escape"&&this.#r?.started)s.preventDefault(),this.#m()},{signal:e}),this.addEventListener("touchmove",(s)=>{if(this.#r?.started)s.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(s)=>{if(this.#r)s.preventDefault()},{signal:e}),this.addEventListener("focusin",(s)=>{let l=s.target,c=l.parentElement;if(!c?.matches(".b3-board-filters"))return;c.style.scrollPaddingInlineEnd=`${c.querySelector(":scope > .b3-board-search")?.offsetWidth??0}px`,l.scrollIntoView({inline:"nearest",block:"nearest"})},{signal:e}),this.addEventListener("focusin",(s)=>{this.#N=!0;let l=s.target.closest?.(".b3-board-card"),c=this.#e;if(!l||!c||!this.contains(l))return;let d=l.dataset.card??null;if(d!=null&&c.picked.includes(d)&&c.selected!=null)c.picked=[...c.picked.filter((u)=>u!==d),String(c.selected)];c.selected=d},{signal:e}),this.addEventListener("focusout",(s)=>{let l=s.relatedTarget;if(l&&!this.contains(l)){this.#N=!1;return}if(!l)requestAnimationFrame(()=>requestAnimationFrame(()=>this.#$()))},{signal:e}),t.addEventListener("focus",()=>queueMicrotask(()=>this.#$()),{signal:e}),this.addEventListener("click",(s)=>{let l=this.ownerDocument.getSelection(),c=s.target;if(!this.#y&&l&&!l.isCollapsed&&(c.contains(l.anchorNode)||l.containsNode(c,!0))&&!c.closest?.("button, .b3-board-grip, .b3-board-card-head>.b3-board-title")){s.preventDefault(),s.stopImmediatePropagation();return}if(!this.#y)return;this.#y=!1,s.preventDefault(),s.stopImmediatePropagation()},{signal:e,capture:!0});let n='button, a, input, textarea, select, [contenteditable]:not([contenteditable="false"])',i=(s)=>{let l=s.target,c=l.closest?.(".b3-board-card");return c&&this.contains(c)&&!l.closest(n)&&(s.metaKey||s.ctrlKey||s.shiftKey)&&!s.altKey?c:null};this.addEventListener("mousedown",(s)=>{if(i(s))s.preventDefault()},{signal:e,capture:!0}),this.addEventListener("click",(s)=>{let l=this.#e,c=i(s);if(!l)return;if(!c){if(l.picked.length&&s.target.closest?.(".b3-board-card")&&!s.target.closest(n))l.picked=[];return}s.preventDefault(),s.stopImmediatePropagation();let d=c.dataset.card,u=l.selected!=null?String(l.selected):null,f=new Set(l.picked);if(s.shiftKey&&u!=null){let h=[...c.closest(".b3-board-cards").querySelectorAll(":scope > .b3-board-card")].map((m)=>m.dataset.card),b=h.indexOf(u),p=h.indexOf(d);for(let m of b<0?[u]:h.slice(Math.min(b,p),Math.max(b,p)+1))f.add(m)}else if(d===u||f.has(d)){f.delete(d);let h=[...f].at(-1);if(d===u&&h!==void 0)return f.delete(h),l.picked=[...f],void this.focusCard(h);l.picked=[...f];return}else if(u!=null)f.add(u);f.delete(d),l.picked=[...f],this.#c(`${f.size+1} cards selected`),c.focus({preventScroll:!0})},{signal:e,capture:!0}),this.addEventListener("keydown",(s)=>{if(s.key!=="?"||s.defaultPrevented||s.metaKey||s.ctrlKey||s.altKey||s.isComposing)return;if(s.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"]), .b3-board-keys'))return;s.preventDefault(),this.showShortcuts()},{signal:e}),this.addEventListener("keydown",(s)=>{if(s.defaultPrevented||s.altKey||!(s.metaKey||s.ctrlKey))return;if(s.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let l=s.key.toLowerCase(),c=l==="y"||l==="z"&&s.shiftKey;if(l!=="z"&&l!=="y")return;if(s.preventDefault(),c)this.redo();else this.undo()},{signal:e});let a=(s)=>this.#Q(s);this.addEventListener("click",a,{signal:e,capture:!0}),this.addEventListener("auxclick",(s)=>{if(s.button===1)a(s)},{signal:e,capture:!0});let o=()=>this.#H();this.addEventListener("compositionstart",()=>{this.#k=!0},{signal:e}),this.addEventListener("compositionend",o,{signal:e}),this.addEventListener("focusout",o,{signal:e})}#H(){this.#k=!1;for(let e of this.#_.splice(0))e()}#Q(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),a=i&&C(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),o={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(a)o.subtask=a.id;let s=t.querySelector("img");if(s&&!o.newTab&&e.type==="click"){e.preventDefault(),this.#ee(t,s,o);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:o}))||o.file)e.preventDefault()}#ee(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ar();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=n.createElement("img");a.src=t.currentSrc||t.src,a.alt=t.alt;let o=n.createElement("button");o.type="button",o.className="b3-board-lightbox-open",o.textContent="Open",i.append(a,o);let s=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else s?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),o.addEventListener("pointerdown",(d)=>d.stopPropagation()),o.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#te(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-grip, .b3-board-card-head>.b3-board-title")?t.closest(".b3-board-card"):null;if(!i&&t.closest(".b3-board-card"))return;let a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,o=i??a;if(!o)return;if(n={kind:i?"card":"column",id:i?i.dataset.card:a.dataset.column,node:o,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0},i)n.ids=this.#b(n.id)}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#z(e.clientX,e.clientY)},ma)}#z(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let o of[i,...i.querySelectorAll("[id]")])o.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging","");for(let o of this.#j(r))o.setAttribute("data-b3-dragging","");if((r.ids?.length??0)>1)i.dataset.b3Count=String(r.ids.length);this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let a=()=>{if(this.#r!==r)return;this.#se(r.px,r.py),this.#ie(this.#U(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#re(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let n=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(n>8)this.#m();return}if(n<5)return;this.#z(e.clientX,e.clientY)}e.preventDefault();let r=this.ownerDocument.getSelection();if(r&&!r.isCollapsed)r.removeAllRanges();t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#ne(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#m();let r=this.#U(e.clientX,e.clientY);if(this.#m(),this.#y=!0,setTimeout(()=>{this.#y=!1},0),!r)return;let n=this.#e;if(t.kind==="card")this.#M(t.ids??[t.id],r.column,r.before),this.#D(t.id);else if(t.kind==="subtask"){let i=this.#o(t.card);if(!i)return;let a=C(i),o=r.before?a.findIndex((s)=>x(s.id,r.before)):a.length;if(a.findIndex((s)=>x(s.id,t.id))<o)o-=1;this.#P(i,t.id,o)}else{let i=r.before?n.columns.findIndex((o)=>x(o.id,r.before)):n.columns.length;if(n.columns.findIndex((o)=>x(o.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#U(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#q(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((h)=>{let b=h.getBoundingClientRect();return t<b.top+b.height/2}),f=(h)=>!!(h!=null&&this.#o(h)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((h)=>!f(h.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),a=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],o=getComputedStyle(this).direction==="rtl";return{column:"",before:a.find((l)=>{let c=l.getBoundingClientRect();return o?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#ie(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#q(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#se(e,t){let r=(o,s,l)=>o<s+40?-12:o>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let o=n.getBoundingClientRect();n.scrollLeft+=r(e,o.left,o.right)}let i=this.#r?.kind==="card"?this.#q(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let o=i.getBoundingClientRect();i.scrollTop+=r(t,o.top,o.bottom)}let a=this.ownerDocument.defaultView;a.scrollBy(0,r(t,0,a.innerHeight))}#j(e){return(e.ids??[]).map((t)=>this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(t)}"]`)).filter((t)=>!!t)}#m(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.#j(e))t.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}br("b3-board",bi);export{bi as B3Board};
|
package/dist/manifest.json
CHANGED