@livx.cc/bare-v3 0.1.0-alpha.77 → 0.1.0-alpha.79
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.d.ts +17 -2
- package/dist/components/board.js +51 -27
- package/dist/manifest.json +1 -1
- package/dist/references/board.md +20 -4
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* <script type="application/json"> child holding the array) and listen for `b3-change`, whose
|
|
6
6
|
* detail carries the full, plain `columns` after every user edit plus the `action` that made it.
|
|
7
7
|
* `#tag` and `@mention` words in a title or description become filter labels; a trailing run of
|
|
8
|
-
* them is shown as labels instead of title text.
|
|
8
|
+
* them is shown as labels instead of title text. `search` narrows the cards to those whose text holds every word typed;
|
|
9
|
+
* `addCard()` starts a new card in the `default-column`. Starred cards stay above the rest of their column. Opt-in entry: `@livx.cc/bare-v3/components/board`.
|
|
9
10
|
*/
|
|
10
11
|
import { Base } from './base';
|
|
11
12
|
/** Ids are kept as given (a number stays a number); missing ones are generated as strings. */
|
|
@@ -129,6 +130,20 @@ export declare class B3Board extends Base {
|
|
|
129
130
|
/** Active filter tokens (e.g. `#bug`, `@dana`); a card shows when it carries all of them. */
|
|
130
131
|
get filter(): string[];
|
|
131
132
|
set filter(value: string[]);
|
|
133
|
+
/**
|
|
134
|
+
* Text search: only cards whose title, description, subtasks or tags hold every word (case-insensitive, any order)
|
|
135
|
+
* are shown; counts read shown/total. Works with `filter`. The `search` attribute sets it too.
|
|
136
|
+
*/
|
|
137
|
+
get search(): string;
|
|
138
|
+
set search(value: string);
|
|
139
|
+
/** The column `addCard()` adds to when given none (`default-column`): an id, or a name (case-insensitive); else the first. */
|
|
140
|
+
get defaultColumn(): string;
|
|
141
|
+
set defaultColumn(value: string);
|
|
142
|
+
/**
|
|
143
|
+
* Start a new card, its title editor focused and in view, at the end of `column` (an id or name) or the default
|
|
144
|
+
* column. Reported by `b3-change` once it has a title. False when readonly or there is no such column.
|
|
145
|
+
*/
|
|
146
|
+
addCard(column?: BoardId): boolean;
|
|
132
147
|
/** Pasting images into a card needs this hook: the host stores the file (see `BoardUpload`). */
|
|
133
148
|
get upload(): BoardUpload | null;
|
|
134
149
|
set upload(value: BoardUpload | null);
|
|
@@ -136,7 +151,7 @@ export declare class B3Board extends Base {
|
|
|
136
151
|
set readonly(value: boolean);
|
|
137
152
|
connectedCallback(): void;
|
|
138
153
|
disconnectedCallback(): void;
|
|
139
|
-
attributeChangedCallback():
|
|
154
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): undefined;
|
|
140
155
|
/**
|
|
141
156
|
* Move a card to `index` among ALL of a column's cards (filters do not shift positions). The
|
|
142
157
|
* index is kept within the card's group: a starred card stays among the starred ones at the top,
|
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:it,getOwnPropertyNames:di,getOwnPropertyDescriptor:ui}=Object,fi=Object.prototype.hasOwnProperty;function hi(e){return this[e]}var pi=(e)=>{var t=(ar??=new WeakMap).get(e),r;if(t)return t;if(t=it({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of di(e))if(!fi.call(t,n))it(t,n,{get:hi.bind(e,n),enumerable:!(r=ui(e,n))||r.enumerable})}return ar.set(e,t),t},ar;var bi=(e)=>e;function mi(e,t){this[e]=bi.bind(null,t)}var gi=(e,t)=>{for(var r in t)it(e,r,{get:t[r],enumerable:!0,configurable:!0,set:mi.bind(t,r)})};var vi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fn={};gi(Fn,{Alpine:()=>qn,default:()=>Xo});function yi(e){Ei(e)}function wi(){Dt=!0}function _i(){Dt=!1,Er()}function Ei(e){if(!B.includes(e)){if(B.push(e),e._x_schedulerPriority!==void 0)Re=!0}Er()}function Nt(e){let t=B.indexOf(e);if(t!==-1&&t>bt)B.splice(t,1)}function Er(){if(!pt&&!ht){if(Dt)return;ht=!0,queueMicrotask(ki)}}function ki(){ht=!1,pt=!0;for(let e=0;e<B.length;e++){if(Re)Ai(e);B[e](),bt=e}B.length=0,bt=-1,Re=!1,pt=!1}function Ai(e){let t=new Map,r=B.slice(e).sort((n,i)=>Si(n,i,t));for(let n=0;n<r.length;n++)B[e+n]=r[n];Re=!1}function Si(e,t,r){if(!st(e))return st(t)?1:0;if(!st(t))return-1;return dr(e._x_schedulerPriority.el,r)-dr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function st(e){return e._x_schedulerPriority!==void 0}function dr(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 Ti(e){mt=!1,e(),mt=!0}function Oi(e){le=e.reactive,ce=e.release,te=(t)=>e.effect(t,{scheduler:(r)=>{if(mt)yi(r);else r()}}),kr=e.raw}function ur(e){te=e}function Mi(e){let t=()=>{};return[(n,i)=>{let a=i?.priority==="structural"?Ci++:void 0,s=te(n);if(a!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:a};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((o)=>o())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Ar(e,t){let r=!0,n,i,a=te(()=>{let s=e(),o=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=o,r=!1});return()=>{Nt(a),ce(a)}}async function Ii(e){wi();try{await e(),await Promise.resolve()}finally{_i()}}function Li(e){Tr.push(e)}function Pt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Cr.push(t)}function Or(e){Sr.push(e)}function Mr(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 Ir(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 Di(e){e._x_effects?.forEach(Nt);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Rt(){Fe.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Bt=!0}function Lr(){Ni(),Fe.disconnect(),Bt=!1}function Ni(){let e=Fe.takeRecords();q.push(()=>e.length>0&&Ve(e));let t=q.length;queueMicrotask(()=>{if(q.length===t)while(q.length>0)q.shift()()})}function Pi(){while(q.length>0)q.shift()();let e=Fe.takeRecords();if(e.length>0)Ve(e)}function _(e){if(!Bt)return e();Lr();try{return e()}finally{Rt()}}function Bi(){$t=!0}function Ri(){$t=!1,Ve($e),$e=[]}function Ve(e){if($t){$e=$e.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((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[a].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[a].type==="attributes"){let s=e[a].target,o=e[a].attributeName,l=e[a].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:o,value:s.getAttribute(o)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(o)};if(s.hasAttribute(o)&&l===null)c();else if(s.hasAttribute(o))d(),c();else d()}}i.forEach((a,s)=>{Ir(s,a)}),n.forEach((a,s)=>{Sr.forEach((o)=>o(s,a))});for(let a of r){if(t.some((s)=>s.contains(a)))continue;Cr.forEach((s)=>s(a))}for(let a of t){if(!a.isConnected)continue;Tr.forEach((s)=>s(a))}t=null,r=null,n=null,i=null}function Dr(e){return J(ae(e))}function Se(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function J(e){return new Proxy({objects:e},$i)}function Nr(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Nr(Object.getPrototypeOf(e),t)}function zi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function zt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,a="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:o,enumerable:l}])=>{if(l===!1||o===void 0)return;if(typeof o==="object"&&o!==null&&o.__v_skip)return;let c=a===""?s:`${a}.${s}`;if(typeof o==="object"&&o!==null&&o._x_interceptor)i[s]=o.initialize(e,c,s,t);else if(r(o)&&o!==i&&!(o instanceof Element))n(o,c)})};return n(e)}function Pr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,a,s){return e(this.initialValue,()=>Hi(n,i),(o)=>gt(n,i,o),i,a,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(a,s,o,l)=>{let c=n.initialize(a,s,o,l);return r.initialValue=c,i(a,s,o,l)}}else r.initialValue=n;return r}}function Hi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function gt(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 gt(e[t[0]],t.slice(1),r);else return e[t[0]]={},gt(e[t[0]],t.slice(1),r)}function M(e,t){Br[e]=t}function ze(e,t){let r=Ui(t);return Object.entries(Br).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Ui(e){let[t,r]=qr(e),n={interceptor:Pr,...t};return Pt(e,r),n}function ji(e,t,r,...n){try{return r(...n)}catch(i){Ke(i,e,t)}}function Ke(...e){return Rr(...e)}function qi(e){Rr=e}function Fi(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 Pr(e){let t=V;V=!1;let r=e();return V=t,r}function W(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Rr(...e)}function ji(e){Rr=e}function zi(e){$r=e}function qi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!V){ht(r,t,Y([n,...e]),i);return}let s=t.apply(Y([n,...e]),i);ht(r,s)}}function ht(e,t,r,n,i){if(V&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>ht(e,s,r,n)).catch((s)=>qe(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Fi(...e){return $r(...e)}function ce(e=""){return Rt+e}function Ki(e){Rt=e}function E(e,t){return $e[e]=t,{before(r){if(!$e[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=K.indexOf(r);K.splice(n>=0?n:K.indexOf("DEFAULT"),0,e)}}}function Vi(e){return Object.keys($e).includes(e)}function Fe(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Br(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(qr((o,s)=>n[o]=s)).filter(Kr).map(Yi(n,r)).sort(Gi).map((o)=>Ji(e,o))}function Br(e){return Array.from(e).map(qr()).filter((t)=>!Kr(t))}function Wi(e){bt=!0;let t=Symbol();Ur=t,he.set(t,[]);let r=()=>{while(he.get(t).length)he.get(t).shift()();he.delete(t)},n=()=>{bt=!1,r()};e(r),n()}function Hr(e){let t=[],r=(a)=>t.push(a),[n,i]=Si(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:W.bind(W,e)},()=>t.forEach((a)=>a())]}function Ji(e,t){let r=()=>{},n=$e[t.type]||r,[i,o]=Hr(e);Tr(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),bt?he.get(Ur).push(n):n()};return s.runCleanups=o,s}function qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Fr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function $t(e){Fr.push(e)}function Kr({name:e}){return Vr().test(e)}function Yi(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Vr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:a}}}function Gi(e,t){let r=K.indexOf(e.type)===-1?mt:e.type,n=K.indexOf(t.type)===-1?mt:t.type;return K.indexOf(r)-K.indexOf(n)}function G(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>G(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)G(n,t,!1),n=n.nextElementSibling}function B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function Xi(e){return(...t)=>j&&e(...t)}function Se(e){Wr.push(e)}function Zi(e,t){Wr.forEach((r)=>r(e,t)),j=!0,Jr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Qi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,gt=!0,Jr(()=>{es(t)}),j=!1,gt=!1}function es(e){let t=!1;D(e,(n,i)=>{G(n,(o,s)=>{if(t&&os(o))return s();t=!0,i(o,s)})})}function Jr(e){let t=te;lr((r,n)=>{let i=t(r);return de(i),()=>{}}),e(),lr(t)}function ts(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;Ke++}r.pending++,Promise.resolve(t).catch((n)=>{try{qe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>rs(e,r))}function rs(e,t){if(t.pending--,t.pending>0)return;if(Ii(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ke--,!e.isConnected)return;is(t),D(e)}function ns(e,t){if(Ke===0)return!1;let r=C(e,(n)=>n._x_deferInit);if(!r)return!1;return Yr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Yr(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 is(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=C(r,(o)=>o._x_deferInit);if(n){Yr(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Fe(r,i).forEach((o)=>o())})}function be(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ss(){if(dr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(dr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");be(document,"alpine:init"),be(document,"alpine:initializing"),Dt(),Ci((t)=>D(t,G)),It((t)=>re(t)),Sr((t,r)=>{if(ns(t,r))return;Fe(t,r).forEach((n)=>n())});let e=(t)=>!Ve(t.parentElement,!0);Array.from(document.querySelectorAll(Zr().join(","))).filter(e).forEach((t)=>{D(t)}),be(document,"alpine:initialized"),setTimeout(()=>{ds()})}function Xr(){return Bt.map((e)=>e())}function Zr(){return Bt.concat(Gr).map((e)=>e())}function Qr(e){Bt.push(e)}function en(e){Gr.push(e)}function Ve(e,t=!1){return C(e,(r)=>{if((t?Zr():Xr()).some((i)=>r.matches(i)))return!0})}function C(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return C(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return C(e.parentNode.host,t);if(!e.parentElement)return;return C(e.parentElement,t)}function os(e){return Xr().some((t)=>e.matches(t))}function as(e){tn.push(e)}function D(e,t=G,r=()=>{}){if(C(e,(n)=>n._x_ignore))return;Wi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),tn.forEach((o)=>o(n,i)),Fe(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=ls++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Oi(r),Cr(r),delete r._x_marker})}function ds(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Vi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Ht(e=()=>{}){return queueMicrotask(()=>{Ut||setTimeout(()=>{vt()})}),new Promise((t)=>{xt.push(()=>{e(),t()})})}function vt(){Ut=!1;while(xt.length)xt.shift()()}function cs(){Ut=!0}function jt(e,t){if(Array.isArray(t))return cr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return us(e,t);else if(typeof t==="function")return jt(e,t());return cr(e,t)}function yt(e){return e.split(/\s/).filter(Boolean)}function cr(e,t){let r=(i)=>yt(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function us(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?yt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?yt(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function We(e,t){if(typeof t==="object"&&t!==null)return fs(e,t);return ps(e,t)}function fs(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=hs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{We(e,r)}}function ps(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function hs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _t(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function bs(e,t,r){rn(e,jt,""),{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 ms(e,t,r){rn(e,We);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((f,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,x)=>x>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),d=a?0:1,c=l?fe(t,"scale",95)/100:1,u=fe(t,"delay",0)/1000,p=fe(t,"origin","center"),g="opacity, transform",m=fe(t,"duration",150)/1000,h=fe(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:d,transform:`scale(${c})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${h}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:d,transform:`scale(${c})`}}function rn(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=()=>{}){wt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){wt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function nn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:nn(t)}function wt(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,d;gs(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),d=t(e,i)},after:s,cleanup(){l(),d()}})}function gs(e,t){let r,n,i,o=_t(()=>{w(()=>{if(r=!0,!n)t.before();if(!i)t.end(),vt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:_t(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},w(()=>{t.start(),t.during()}),cs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;w(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;w(()=>{t.end()}),vt(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function fe(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 sn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?As(t):t,t){case"value":xs(e,r);break;case"style":ys(e,r);break;case"class":vs(e,r);break;case"selected":case"checked":_s(e,t,r);break;default:zt(e,t,r);break}}function xs(e,t){if(qt(e)){if(e.attributes.value===void 0)e.value=t}else if(Be(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)=>Ss(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")ks(e,t);else if(e.tagName==="OPTION")zt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function vs(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=jt(e,t)}function ys(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=We(e,t)}function _s(e,t,r){zt(e,t,r),Es(e,t,r)}function zt(e,t,r){if([null,void 0,!1].includes(r)&&Cs(t))e.removeAttribute(t);else{if(on(t))r=t;if(Os(r))r=JSON.stringify(r);ws(e,t,r)}}function ws(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Es(e,t,r){if(e[t]!==r)e[t]=r}function ks(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function As(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ss(e,t){return e==t}function De(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 on(e){return Ts.has(e)}function Cs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Os(e){return typeof e==="object"&&e!==null}function Ms(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return an(e,t,r)}function Is(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,Pr(()=>W(e,i.expression))}return an(e,t,r)}function an(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(on(t))return!![t,"true"].includes(n);return n}function Be(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function qt(e){return e.type==="radio"||e.localName==="ui-radio"}function ln(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function dn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function cn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=te(()=>{let l=e(),d=r();if(i)n(rt(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==o)n(rt(l));else if(c!==u)t(rt(d))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Mt(a),de(a)}}function rt(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Ls(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Ds(e,t){if(!ur)P=le(P),ur=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else Pt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function Ns(){return P}function Ps(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return fn(e,r());else un[e]=r;return()=>{}}function Rs(e){return Object.entries(un).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function fn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Br(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Fe(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function $s(e,t){pn[e]=t}function Bs(e,t){return Object.entries(pn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function bn(e){try{let r=new js(e).tokenize(),i=new zs(r).parse(),o=new qs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:d=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:d})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Fs(e,t,r={}){let n=mn(e),i=Y([r.scope??{},...n]),o=r.params??[],a=bn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&V)return a.apply(i,o);return a}function Ks(e,t){let r=mn(e);if(typeof t==="function")return qi(r,t);let n=Vs(e,t,r);return Bi.bind(null,e,t,n)}function mn(e){let t={};return Re(t,e),[t,...ae(e)]}function Vs(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:o=[]}={})=>{let s=Y([i,...r]),l=bn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(V&&typeof l==="function"){let d=l.apply(l,o);if(d instanceof Promise)d.then((c)=>n(c));else n(d)}else if(typeof l==="object"&&l instanceof Promise)l.then((d)=>n(d));else n(l)}}function gn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function X(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function Qs(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ge,ge=e}function Kt(){_n++}function Vt(){if(--_n>0)return;if(xe){let t=xe;xe=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ge){let t=ge;ge=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 wn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function En(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;Wt(n),to(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function kt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function eo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ue)return;if(e.globalVersion=Ue,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!kt(e)))return;e.flags|=2;let t=e.dep,r=v,n=O;v=e,O=!0;try{wn(e);let i=e.fn(e._value);if(t.version===0||F(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,O=n,En(e),e.flags&=-3}}function Wt(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 o=r.computed.deps;o;o=o.nextDep)Wt(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function to(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 ro(e,t){if(e.effect instanceof pr)e=e.effect.fn;let r=new pr(e);if(t)ye(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function no(e){e.effect.stop()}function io(){kn.push(O),O=!1}function so(){let e=kn.pop();O=e===void 0?!0:e}function hr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function An(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)An(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 S(e,t,r){if(O&&v){let n=At.get(e);if(!n)At.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new ao),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,o){let s=At.get(e);if(!s){Ue++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Kt(),t==="clear")s.forEach(a);else{let l=_e(e),d=l&&Ft(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ee||!Te(p)&&p>=c)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(d)a(s.get(Ee));switch(t){case"add":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}else if(d)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}break;case"set":if(me(e))a(s.get(J));break}}}Vt()}function se(e){let t=y(e);if(t===e)return t;return S(t,"iterate",Ee),Q(e)?t:t.map(ee)}function Jt(e){return S(e=y(e),"iterate",Ee),e}function I(e,t){if(Z(e))return Ln(e)?ke(ee(t)):ke(t);return ee(t)}function st(e,t,r){let n=Jt(e),i=n[t]();if(n!==e&&!Q(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=Jt(e),a=s!==e&&!Q(e),l=s[t];if(l!==co[t]){let u=l.apply(e,o);return a?ee(u):u}let d=r;if(s!==e){if(a)d=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)d=function(u,p){return r.call(this,u,p,e)}}let c=l.call(s,d,n);return a&&i?i(c):c}function br(e,t,r,n){let i=Jt(e),o=i!==e&&!Q(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(d,c,u){if(a)a=!1,d=I(e,d);return r.call(this,d,I(e,c),u,e)};else if(r.length>3)s=function(d,c,u){return r.call(this,d,c,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ot(e,t,r){let n=y(e);S(n,"iterate",Ee);let i=n[t](...r);if((i===-1||i===!1)&&ko(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){io(),Kt();let n=y(e)[t].apply(e,r);return Vt(),so(),n}function fo(e){if(!Te(e))e=String(e);let t=y(this);return S(t,"has",e),t.hasOwnProperty(e)}function go(e,t,r){return function(...n){let i=this.__v_raw,o=y(i),s=me(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Tt:t?ke:ee;return!t&&S(o,"iterate",l?St:J),ye(Object.create(d),{next(){let{value:u,done:p}=d.next();return p?{value:u,done:p}:{value:a?[c(u[0]),c(u[1])]:c(u),done:p}}})}}function Ie(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";X(`${yn(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function xo(e,t){let r={get(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(F(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Me(s),d=t?Tt:e?ke:ee;if(l.call(s,i))return d(o.get(i));else if(l.call(s,a))return d(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(y(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(F(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=y(a),d=t?Tt:e?ke:ee;return!e&&S(l,"iterate",J),a.forEach((c,u)=>i.call(o,d(c),d(u),s))}};return ye(r,e?{add:Ie("add"),set:Ie("set"),delete:Ie("delete"),clear:Ie("clear")}:{add(i){let o=y(this),s=Me(o),a=y(i),l=!t&&!Q(i)&&!Z(i)?a:i;if(!(s.has.call(o,l)||F(i,l)&&s.has.call(o,i)||F(a,l)&&s.has.call(o,a)))o.add(l),H(o,"add",l,l);return this},set(i,o){if(!t&&!Q(o)&&!Z(o))o=y(o);let s=y(this),{has:a,get:l}=Me(s),d=a.call(s,i);if(!d)i=y(i),d=a.call(s,i);else mr(s,a,i);let c=l.call(s,i);if(s.set(i,o),!d)H(s,"add",i,o);else if(F(o,c))H(s,"set",i,o,c);return this},delete(i){let o=y(this),{has:s,get:a}=Me(o),l=s.call(o,i);if(!l)i=y(i),l=s.call(o,i);else mr(o,s,i);let d=a?a.call(o,i):void 0,c=o.delete(i);if(l)H(o,"delete",i,void 0,d);return c},clear(){let i=y(this),o=i.size!==0,s=me(i)?new Map(i):new Set(i),a=i.clear();if(o)H(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=go(i,e,t)}),r}function Cn(e,t){let r=xo(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Et(r,i)&&i in n?r:n,i,o)}}function mr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=vn(e);X(`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 Eo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yt(e){if(Z(e))return e;return In(e,!1,bo,vo,On)}function Ct(e){return In(e,!0,mo,yo,Mn)}function In(e,t,r,n,i){if(!we(e))return X(`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 o=i.get(e);if(o)return o;let s=Eo(vn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Ln(e){if(Z(e))return Ln(e.__v_raw);return!!(e&&e.__v_isReactive)}function Z(e){return!!(e&&e.__v_isReadonly)}function Q(e){return!!(e&&e.__v_isShallow)}function ko(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ve(e){return e?e.__v_isRef===!0:!1}function Ao(e){let t=[];return C(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Dn(e){if(!at[e])at[e]=0;return++at[e]}function So(e,t){return C(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function To(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Dn(t)}function Co(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 Nn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function gr(e){let t=B(()=>document.querySelector(e),()=>Oo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,d)=>(c)=>d(l,c);if(r.includes("dot"))t=Mo(t);if(r.includes("camel"))t=Io(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=Rn(r,o),r.includes("prevent"))o=a(o,(l,d)=>{d.preventDefault(),l(d)});if(r.includes("stop"))o=a(o,(l,d)=>{d.stopPropagation(),l(d)});if(r.includes("once"))o=a(o,(l,d)=>{l(d),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,d)=>{if(e.contains(d.target))return;if(d.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(d)});if(r.includes("self"))o=a(o,(l,d)=>{d.target===e&&l(d)});if(t==="submit")o=a(o,(l,d)=>{if(d.target._x_pendingModelUpdates)d.target._x_pendingModelUpdates.forEach((c)=>c());l(d)});if(Do(t)||$n(t))o=a(o,(l,d)=>{if(Po(d,r))return;l(d)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Rn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=ln(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=dn(t,n)}return t}function Mo(e){return e.replace(/-/g,".")}function Io(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function He(e){return!Array.isArray(e)&&!isNaN(e)}function Lo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Do(e){return["keydown","keyup"].includes(e)}function $n(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Po(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!No.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,He((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,He((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&xr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if($n(e.type))return!1;if(xr(e.key).includes(r[0]))return!1}}return!0}function xr(e){if(!e)return[];e=Lo(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 Le(e,t,r,n){return w(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Be(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=lt(r.target.value);else if(t.includes("boolean"))i=De(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Ro(o,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 o=i.value||i.text;return lt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return De(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(qt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return lt(i);else if(t.includes("boolean"))return De(i);else if(t.includes("trim"))return i.trim();else return i}})}function lt(e){let t=e?parseFloat(e):null;return $o(t)?t:e}function Ro(e,t){return e==t}function $o(e){return!Array.isArray(e)&&!isNaN(e)}function vr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Bo(e,t){e._x_keyExpression=t}function Uo(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 Ho(e){if(!j)return!1;if(gt)return!0;return e.hasAttribute("data-has-alpine-state")}function jo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function zo(e,t,r,n){r((i)=>{if(Ko(i))i=Array.from({length:i},(d,c)=>c+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 o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Vo(i),l=Object.entries(i).map(([d,c])=>{if(!a)d=parseInt(d);let u=Fo(t,c,d,i),p;return n((g)=>{if(typeof g==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(g))s.set(g,o.get(g)),o.delete(g);p=g},{scope:{index:d,...u}}),[p,u]});w(()=>{o.forEach((u)=>{re(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),c.nextElementSibling!==h){if(c.nextElementSibling)h.replaceWith(c.nextElementSibling);c.after(h)}if(c=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)c.after(h._x_currentIfEl);c=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let g=document.importNode(e.content,!0).firstElementChild,m=le(p);Ae(g,m,e),g._x_refreshXForScope=jo(m),s.set(u,g),d.add(g),c.after(g),c=g}),d.forEach((u)=>D(u)),c!==e)e._x_lastRenderedEl=c;else delete e._x_lastRenderedEl})})}function qo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Fo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Ko(e){return typeof e!=="object"&&!isNaN(e)}function Vo(e){return typeof e==="object"&&!Array.isArray(e)}function Un(){}function Ye(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var dt=!1,ct=!1,R,ut=-1,Ne=!1,Ot=!1,le,te,de,_r,Ei=0,ft=!0,Er,kr,Ar,je,Lt=!1,q,Nt=!1,Pe,Ni,Dr,Nr,V=!0,Rr=()=>{},$r,Rt="x-",$e,bt=!1,he,Ur,jr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},zr=(e)=>e,Fr,Vr=()=>new RegExp(`^${Rt}([^:^.]+)\\b`),mt="DEFAULT",K,j=!1,Wr,gt=!1,Ke=0,dr=!1,Bt,Gr,tn,ls=1,xt,Ut=!1,Ts,P,ur=!1,un,pn,Us,ue,fr,hn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Hs,js=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 k("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 $r(e){let t=K;K=!1;let r=e();return K=t,r}function W(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return zr(...e)}function Vi(e){zr=e}function Ki(e){Hr=e}function Wi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!K){vt(r,t,J([n,...e]),i);return}let s=t.apply(J([n,...e]),i);vt(r,s)}}function vt(e,t,r,n,i){if(K&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((s)=>vt(e,s,r,n)).catch((s)=>Ke(s,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function Yi(...e){return Hr(...e)}function de(e=""){return Ht+e}function Ji(e){Ht=e}function E(e,t){return He[e]=t,{before(r){if(!He[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function Gi(e){return Object.keys(He).includes(e)}function We(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([o,l])=>({name:o,value:l})),s=Ur(a);a=a.map((o)=>{if(s.find((l)=>l.name===o.name))return{name:`x-bind:${o.name}`,value:`"${o.value}"`};return o}),t=t.concat(a)}let n={};return t.map(Kr((a,s)=>n[a]=s)).filter(Yr).map(Qi(n,r)).sort(es).map((a)=>Zi(e,a))}function Ur(e){return Array.from(e).map(Kr()).filter((t)=>!Yr(t))}function Xi(e){xt=!0;let t=Symbol();jr=t,be.set(t,[]);let r=()=>{while(be.get(t).length)be.get(t).shift()();be.delete(t)},n=()=>{xt=!1,r()};e(r),n()}function qr(e){let t=[],r=(o)=>t.push(o),[n,i]=Mi(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:W.bind(W,e)},()=>t.forEach((o)=>o())]}function Zi(e,t){let r=()=>{},n=He[t.type]||r,[i,a]=qr(e);Mr(e,t.original,a);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),xt?be.get(jr).push(n):n()};return s.runCleanups=a,s}function Kr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Wr.reduce((a,s)=>s(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ut(e){Wr.push(e)}function Yr({name:e}){return Jr().test(e)}function Qi(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Jr()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],o=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:o}}}function es(e,t){let r=V.indexOf(e.type)===-1?yt:e.type,n=V.indexOf(t.type)===-1?yt:t.type;return V.indexOf(r)-V.indexOf(n)}function G(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>G(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)G(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>U?t(...r):e(...r)}function ts(e){return(...t)=>U&&e(...t)}function Ce(e){Gr.push(e)}function rs(e,t){Gr.forEach((r)=>r(e,t)),U=!0,Xr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),U=!1}function ns(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;U=!0,wt=!0,Xr(()=>{is(t)}),U=!1,wt=!1}function is(e){let t=!1;D(e,(n,i)=>{G(n,(a,s)=>{if(t&&ds(a))return s();t=!0,i(a,s)})})}function Xr(e){let t=te;ur((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),ur(t)}function ss(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;Ye++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ke(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>os(e,r))}function os(e,t){if(t.pending--,t.pending>0)return;if(Pi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ye--,!e.isConnected)return;ls(t),D(e)}function as(e,t){if(Ye===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return Zr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Zr(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 ls(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(a)=>a._x_deferInit);if(n){Zr(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;We(r,i).forEach((a)=>a())})}function me(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function cs(){if(fr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(fr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");me(document,"alpine:init"),me(document,"alpine:initializing"),Rt(),Li((t)=>D(t,G)),Pt((t)=>re(t)),Or((t,r)=>{if(as(t,r))return;We(t,r).forEach((n)=>n())});let e=(t)=>!Je(t.parentElement,!0);Array.from(document.querySelectorAll(tn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{hs()})}function en(){return jt.map((e)=>e())}function tn(){return jt.concat(Qr).map((e)=>e())}function rn(e){jt.push(e)}function nn(e){Qr.push(e)}function Je(e,t=!1){return T(e,(r)=>{if((t?tn():en()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function ds(e){return en().some((t)=>e.matches(t))}function us(e){sn.push(e)}function D(e,t=G,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;Xi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),sn.forEach((a)=>a(n,i)),We(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=fs++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Di(r),Ir(r),delete r._x_marker})}function hs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Gi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Ft(e=()=>{}){return queueMicrotask(()=>{qt||setTimeout(()=>{Et()})}),new Promise((t)=>{_t.push(()=>{e(),t()})})}function Et(){qt=!1;while(_t.length)_t.shift()()}function ps(){qt=!0}function Vt(e,t){if(Array.isArray(t))return hr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return bs(e,t);else if(typeof t==="function")return Vt(e,t());return hr(e,t)}function kt(e){return e.split(/\s/).filter(Boolean)}function hr(e,t){let r=(i)=>kt(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 bs(e,t){let r=Object.entries(t).flatMap(([s,o])=>o?kt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,o])=>!o?kt(s):!1).filter(Boolean),i=[],a=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),a.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{a.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Ge(e,t){if(typeof t==="object"&&t!==null)return ms(e,t);return gs(e,t)}function ms(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=vs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ge(e,r)}}function gs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function vs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function At(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function xs(e,t,r){on(e,Vt,""),{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 ys(e,t,r){on(e,Ge);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((h,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((h,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),o=s||t.includes("opacity"),l=s||t.includes("scale"),c=o?0:1,d=l?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,f=he(t,"origin","center"),m="opacity, transform",g=he(t,"duration",150)/1000,p=he(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},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:m,transitionDuration:`${p}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function on(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=()=>{}){St(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){St(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function an(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:an(t)}function St(e,t,{during:r,start:n,end:i}={},a=()=>{},s=()=>{}){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(),s();return}let o,l,c;ws(e,{start(){o=t(e,n)},during(){l=t(e,r)},before:a,end(){o(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function ws(e,t){let r,n,i,a=At(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Et();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:At(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},_(()=>{t.start(),t.during()}),ps(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,o=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),Et(),setTimeout(e._x_transitioning.finish,s+o),i=!0})})}function he(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 ln(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Os(t):t,t){case"value":_s(e,r);break;case"style":ks(e,r);break;case"class":Es(e,r);break;case"selected":case"checked":As(e,t,r);break;default:Kt(e,t,r);break}}function _s(e,t){if(Wt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ue(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)=>Ms(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ts(e,t);else if(e.tagName==="OPTION")Kt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Es(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Vt(e,t)}function ks(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ge(e,t)}function As(e,t,r){Kt(e,t,r),Cs(e,t,r)}function Kt(e,t,r){if([null,void 0,!1].includes(r)&&Ls(t))e.removeAttribute(t);else{if(cn(t))r=t;if(Ds(r))r=JSON.stringify(r);Ss(e,t,r)}}function Ss(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Cs(e,t,r){if(e[t]!==r)e[t]=r}function Ts(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Os(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ms(e,t){return e==t}function Be(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 cn(e){return Is.has(e)}function Ls(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Ds(e){return typeof e==="object"&&e!==null}function Ns(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return dn(e,t,r)}function Ps(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,$r(()=>W(e,i.expression))}return dn(e,t,r)}function dn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(cn(t))return!![t,"true"].includes(n);return n}function Ue(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Wt(e){return e.type==="radio"||e.localName==="ui-radio"}function un(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 fn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function hn({get:e,set:t},{get:r,set:n}){let i=!0,a,s,o=te(()=>{let l=e(),c=r();if(i)n(ot(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==a)n(ot(l));else if(d!==u)t(ot(c))}a=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Nt(o),ce(o)}}function ot(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Bs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Rs(e,t){if(!pr)P=le(P),pr=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else zt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function $s(){return P}function zs(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return bn(e,r());else pn[e]=r;return()=>{}}function Hs(e){return Object.entries(pn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function bn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,o])=>({name:s,value:o})),a=Ur(i);return i=i.map((s)=>{if(a.find((o)=>o.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),We(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Us(e,t){mn[e]=t}function js(e,t){return Object.entries(mn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function vn(e){try{let r=new Vs(e).tokenize(),i=new Ks(r).parse(),a=new Ws;return function(s={}){let{scope:o={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return a.evaluate({node:i,scope:o,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Ys(e,t,r={}){let n=xn(e),i=J([r.scope??{},...n]),a=r.params??[],o=vn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof o==="function"&&K)return o.apply(i,a);return o}function Js(e,t){let r=xn(e);if(typeof t==="function")return Wi(r,t);let n=Gs(e,t,r);return ji.bind(null,e,t,n)}function xn(e){let t={};return ze(t,e),[t,...ae(e)]}function Gs(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 s=J([i,...r]),l=vn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(K&&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 yn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function X(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function no(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ve,ve=e}function Jt(){kn++}function Gt(){if(--kn>0)return;if(xe){let t=xe;xe=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ve){let t=ve;ve=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 An(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Sn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;Xt(n),so(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Tt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(io(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function io(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===je)return;if(e.globalVersion=je,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Tt(e)))return;e.flags|=2;let t=e.dep,r=x,n=O;x=e,O=!0;try{An(e);let i=e.fn(e._value);if(t.version===0||F(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,O=n,Sn(e),e.flags&=-3}}function Xt(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)Xt(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function so(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 oo(e,t){if(e.effect instanceof mr)e=e.effect.fn;let r=new mr(e);if(t)we(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function ao(e){e.effect.stop()}function lo(){Cn.push(O),O=!1}function co(){let e=Cn.pop();O=e===void 0?!0:e}function gr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function Tn(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)Tn(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 C(e,t,r){if(O&&x){let n=Ot.get(e);if(!n)Ot.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new fo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,a){let s=Ot.get(e);if(!s){je++;return}let o=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(Jt(),t==="clear")s.forEach(o);else{let l=_e(e),c=l&&Yt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===ke||!Te(f)&&f>=d)o(u)})}else{if(r!==void 0||s.has(void 0))o(s.get(r));if(c)o(s.get(ke));switch(t){case"add":if(!l){if(o(s.get(Y)),ge(e))o(s.get(Mt))}else if(c)o(s.get("length"));break;case"delete":if(!l){if(o(s.get(Y)),ge(e))o(s.get(Mt))}break;case"set":if(ge(e))o(s.get(Y));break}}}Gt()}function se(e){let t=y(e);if(t===e)return t;return C(t,"iterate",ke),Q(e)?t:t.map(ee)}function Zt(e){return C(e=y(e),"iterate",ke),e}function I(e,t){if(Z(e))return Pn(e)?Ae(ee(t)):Ae(t);return ee(t)}function ct(e,t,r){let n=Zt(e),i=n[t]();if(n!==e&&!Q(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function N(e,t,r,n,i,a){let s=Zt(e),o=s!==e&&!Q(e),l=s[t];if(l!==po[t]){let u=l.apply(e,a);return o?ee(u):u}let c=r;if(s!==e){if(o)c=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(s,c,n);return o&&i?i(d):d}function vr(e,t,r,n){let i=Zt(e),a=i!==e&&!Q(e),s=r,o=!1;if(i!==e){if(a)o=n.length===0,s=function(c,d,u){if(o)o=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return o?I(e,l):l}function dt(e,t,r){let n=y(e);C(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&To(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){lo(),Jt();let n=y(e)[t].apply(e,r);return Gt(),co(),n}function mo(e){if(!Te(e))e=String(e);let t=y(this);return C(t,"has",e),t.hasOwnProperty(e)}function wo(e,t,r){return function(...n){let i=this.__v_raw,a=y(i),s=ge(a),o=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?It:t?Ae:ee;return!t&&C(a,"iterate",l?Mt:Y),we(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:o?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Ne(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";X(`${En(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function _o(e,t){let r={get(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"get",i);C(s,"get",o)}let{has:l}=De(s),c=t?It:e?Ae:ee;if(l.call(s,i))return c(a.get(i));else if(l.call(s,o))return c(a.get(o));else if(a!==s)a.get(i)},get size(){let i=this.__v_raw;return!e&&C(y(i),"iterate",Y),i.size},has(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"has",i);C(s,"has",o)}return i===o?a.has(i):a.has(i)||a.has(o)},forEach(i,a){let s=this,o=s.__v_raw,l=y(o),c=t?It:e?Ae:ee;return!e&&C(l,"iterate",Y),o.forEach((d,u)=>i.call(a,c(d),c(u),s))}};return we(r,e?{add:Ne("add"),set:Ne("set"),delete:Ne("delete"),clear:Ne("clear")}:{add(i){let a=y(this),s=De(a),o=y(i),l=!t&&!Q(i)&&!Z(i)?o:i;if(!(s.has.call(a,l)||F(i,l)&&s.has.call(a,i)||F(o,l)&&s.has.call(a,o)))a.add(l),H(a,"add",l,l);return this},set(i,a){if(!t&&!Q(a)&&!Z(a))a=y(a);let s=y(this),{has:o,get:l}=De(s),c=o.call(s,i);if(!c)i=y(i),c=o.call(s,i);else xr(s,o,i);let d=l.call(s,i);if(s.set(i,a),!c)H(s,"add",i,a);else if(F(a,d))H(s,"set",i,a,d);return this},delete(i){let a=y(this),{has:s,get:o}=De(a),l=s.call(a,i);if(!l)i=y(i),l=s.call(a,i);else xr(a,s,i);let c=o?o.call(a,i):void 0,d=a.delete(i);if(l)H(a,"delete",i,void 0,c);return d},clear(){let i=y(this),a=i.size!==0,s=ge(i)?new Map(i):new Set(i),o=i.clear();if(a)H(i,"clear",void 0,void 0,s);return o}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=wo(i,e,t)}),r}function In(e,t){let r=_o(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(Ct(r,i)&&i in n?r:n,i,a)}}function xr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=_n(e);X(`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 Co(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qt(e){if(Z(e))return e;return Nn(e,!1,xo,Eo,Ln)}function Lt(e){return Nn(e,!0,yo,ko,Dn)}function Nn(e,t,r,n,i){if(!Ee(e))return X(`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 s=Co(_n(e));if(s===0)return e;let o=new Proxy(e,s===2?n:r);return i.set(e,o),o}function Pn(e){if(Z(e))return Pn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Z(e){return!!(e&&e.__v_isReadonly)}function Q(e){return!!(e&&e.__v_isShallow)}function To(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ye(e){return e?e.__v_isRef===!0:!1}function Oo(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Bn(e){if(!ut[e])ut[e]=0;return++ut[e]}function Mo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Io(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Bn(t)}function Lo(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 Rn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function yr(e){let t=R(()=>document.querySelector(e),()=>Do)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,a=(l)=>n(l),s={},o=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=No(t);if(r.includes("camel"))t=Po(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(a=zn(r,a),r.includes("prevent"))a=o(a,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))a=o(a,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))a=o(a,(l,c)=>{l(c),i.removeEventListener(t,a,s)});if(r.includes("away")||r.includes("outside"))i=document,a=o(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=o(a,(l,c)=>{c.target===e&&l(c)});if(t==="submit")a=o(a,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Ro(t)||Hn(t))a=o(a,(l,c)=>{if(zo(c,r))return;l(c)});return i.addEventListener(t,a,s),()=>{i.removeEventListener(t,a,s)}}function zn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=qe(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=un(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=qe(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=fn(t,n)}return t}function No(e){return e.replace(/-/g,".")}function Po(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function qe(e){return!Array.isArray(e)&&!isNaN(e)}function Bo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ro(e){return["keydown","keyup"].includes(e)}function Hn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function zo(e,t){let r=t.filter((a,s)=>{if(a==="false"&&t[s-1]==="passive")return!1;return!$o.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,qe((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,qe((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&wr(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((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Hn(e.type))return!1;if(wr(e.key).includes(r[0]))return!1}}return!0}function wr(e){if(!e)return[];e=Bo(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 Pe(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Ue(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=ft(r.target.value);else if(t.includes("boolean"))i=Be(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Ho(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 ft(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return Be(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Wt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return ft(i);else if(t.includes("boolean"))return Be(i);else if(t.includes("trim"))return i.trim();else return i}})}function ft(e){let t=e?parseFloat(e):null;return Uo(t)?t:e}function Ho(e,t){return e==t}function Uo(e){return!Array.isArray(e)&&!isNaN(e)}function _r(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function jo(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 Fo(e){if(!U)return!1;if(wt)return!0;return e.hasAttribute("data-has-alpine-state")}function Vo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Ko(e,t,r,n){r((i)=>{if(Jo(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,s=new Map;e._x_lookup=s;let o=Go(i),l=Object.entries(i).map(([c,d])=>{if(!o)c=parseInt(c);let u=Yo(t,d,c,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(m))s.set(m,a.get(m)),a.delete(m);f=m},{scope:{index:c,...u}}),[f,u]});_(()=>{a.forEach((u)=>{re(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.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)L("x-for templates require a single root element, additional elements will be ignored.",e);let m=document.importNode(e.content,!0).firstElementChild,g=le(f);Se(m,g,e),m._x_refreshXForScope=Vo(g),s.set(u,m),c.add(m),d.after(m),d=m}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Wo(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 s=i[1].replace(r,"").trim(),o=s.match(t);if(o){if(a.item=s.replace(t,"").trim(),a.index=o[1].trim(),o[2])a.collection=o[2].trim()}else a.item=s;return a}function Yo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,o)=>{i[s]=t[o]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Jo(e){return typeof e!=="object"&&!isNaN(e)}function Go(e){return typeof e==="object"&&!Array.isArray(e)}function jn(){}function Ze(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var ht=!1,pt=!1,B,bt=-1,Re=!1,Dt=!1,le,te,ce,kr,Ci=0,mt=!0,Sr,Cr,Tr,Fe,Bt=!1,q,$t=!1,$e,$i,Br,Rr,K=!0,zr=()=>{},Hr,Ht="x-",He,xt=!1,be,jr,Fr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Vr=(e)=>e,Wr,Jr=()=>new RegExp(`^${Ht}([^:^.]+)\\b`),yt="DEFAULT",V,U=!1,Gr,wt=!1,Ye=0,fr=!1,jt,Qr,sn,fs=1,_t,qt=!1,Is,P,pr=!1,pn,mn,qs,ue,br,gn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Fs,Vs=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 k("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 k("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 k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("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 o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,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 k("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 k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},zs=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 Hs.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}}},qs=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 b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}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 o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let x=b[f];if(typeof x!=="function")throw Error("Value is not a function");l=x.apply(b,a)}else if(e.callee.type==="Identifier"){let b=e.callee.name,f;if(b in t)f=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof f!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=f.apply(x,a)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let d=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!d;case"-":return-d;case"+":return+d;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let f=t[b];if(e.operator==="++")t[b]=f+1;else if(e.operator==="--")t[b]=f-1;return e.prefix?t[b]:f}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let x=b[f];if(e.operator==="++")b[f]=x+1;else if(e.operator==="--")b[f]=x-1;return e.prefix?b[f]:x}throw Error("Invalid update expression target");case"BinaryExpression":let c=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 c&&u();if(e.operator==="||")return c||u();let p=u();switch(e.operator){case"+":return c+p;case"-":return c-p;case"*":return c*p;case"/":return c/p;case"%":return c%p;case"==":return c==p;case"!=":return c!=p;case"===":return c===p;case"!==":return c!==p;case"<":return c<p;case">":return c>p;case"<=":return c<=p;case">=":return c>=p;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 m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),b[f]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let b of e.properties){let f=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),x=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=x}return h;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(fr.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(hn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return fr.set(e,!0),!0}},ua,fa,ye,Ws,Et=(e,t)=>Ws.call(e,t),_e,me=(e)=>xn(e)==="[object Map]",Js=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",we=(e)=>e!==null&&typeof e==="object",Ys,xn=(e)=>Ys.call(e),vn=(e)=>xn(e).slice(8,-1),Ft=(e)=>Js(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Je=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Gs,pa,Xs,ha,yn,ba,F=(e,t)=>!Object.is(e,t),Zs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ma,nt,v,it,pr=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,nt)if(nt.active)nt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,it.has(this))it.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Qs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hr(this),wn(this);let e=v,t=O;v=this,O=!0;try{return this.fn()}finally{if(v!==this)X("Active effect was not restored correctly - this is likely a Vue internal bug.");En(this),v=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Wt(e);this.deps=this.depsTail=void 0,hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)it.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(kt(this))this.run()}get dirty(){return kt(this)}},_n=0,ge,xe,O=!0,kn,Ue=0,oo=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}},ao=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||!O||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new oo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;An(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(ye({effect:v},e));return t}trigger(e){this.version++,Ue++,this.notify(e)}notify(e){Kt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(ye({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Vt()}}},At,J,St,Ee,lo,co,uo,Sn,Tn=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?wo:Mn:i?_o:On).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=lo[t]))return a;if(t==="hasOwnProperty")return fo}let s=Reflect.get(e,t,ve(e)?e:r);if(Te(t)?Sn.has(t):uo(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ve(s)){let a=o&&Ft(t)?s:s.value;return n&&we(a)?Ct(a):a}if(we(s))return n?Ct(s):Yt(s);return s}},po,ho,bo,mo,Tt=(e)=>e,Me=(e)=>Reflect.getPrototypeOf(e),vo,yo,On,_o,Mn,wo,ee=(e)=>we(e)?Yt(e):e,ke=(e)=>we(e)?Ct(e):e,at,Oo,Pn=()=>{},No,Bn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Rs(l),A(e,n)((c)=>{fn(e,c,i)},{scope:l});return}if(t==="key")return Bo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";w(()=>sn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},z,Hn,Wo;var zn=hi(()=>{R=[];Er=[],kr=[],Ar=[];je=new MutationObserver(ze);q=[];Pe=[];Ni={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 Pi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Ir(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Dr={};Nr=Hi;$e={};he=new Map,Ur=Symbol();Fr=[];K=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",mt,"teleport"];Wr=[];Se((e,t)=>{if(Ke===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(C(e,(r)=>r._x_deferInit))t._x_ignore=!0});Bt=[],Gr=[];tn=[];xt=[];E("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")ms(e,r,t);else bs(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>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):o();else e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=nn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let d=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([c])=>c?.());return delete l._x_hidePromise,delete l._x_hideChildren,d};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ts=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"]);P={};un={};pn={};Us={get reactive(){return le},get release(){return de},get effect(){return te},get raw(){return _r},get transaction(){return Ti},version:"3.17.4",flushAndStopDeferringMutations:Di,dontAutoEvaluateFunctions:Pr,disableEffectScheduling:ki,startObservingMutations:Dt,stopObservingMutations:Or,setReactivityEngine:Ai,onAttributeRemoved:Tr,onAttributesAdded:Sr,closestDataStack:ae,skipDuringClone:B,onlyDuringClone:Xi,addRootSelector:Qr,addInitSelector:en,setErrorHandler:Ui,interceptClone:Se,addScopeToNode:Ae,deferMutations:Li,mapAttributes:$t,evaluateLater:A,interceptInit:as,initInterceptors:Pt,injectMagics:Re,setEvaluator:ji,setRawEvaluator:zi,mergeProxies:Y,extractProp:Is,findClosest:C,onElRemoved:It,closestRoot:Ve,destroyTree:re,interceptor:Lr,transition:wt,setStyles:We,mutateDom:w,deferInit:ts,directive:E,entangle:cn,throttle:dn,debounce:ln,evaluate:W,evaluateRaw:Fi,initTree:D,nextTick:Ht,prefixed:ce,prefix:Ki,plugin:Ls,magic:M,store:Ds,start:ss,clone:Qi,cloneNode:Zi,bound:Ms,$data:Mr,watch:wr,walk:G,data:$s,bind:Ps},ue=Us,fr=new WeakMap,hn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}hn.add(t)});Hs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];ua=Object.freeze({}),fa=Object.freeze([]),ye=Object.assign,Ws=Object.prototype.hasOwnProperty,_e=Array.isArray,Ys=Object.prototype.toString,Gs=/-\w/g,pa=Je((e)=>e.replace(Gs,(t)=>t.slice(1).toUpperCase())),Xs=/\B([A-Z])/g,ha=Je((e)=>e.replace(Xs,"-$1").toLowerCase()),yn=Je((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ba=Je((e)=>e?`on${yn(e)}`:""),ma=gn(Zs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");it=new WeakSet;kn=[];At=new WeakMap,J=Symbol("Object iterate"),St=Symbol("Map keys iterate"),Ee=Symbol("Array iterate");lo={__proto__:null,[Symbol.iterator](){return st(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return st(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ot(this,"includes",e)},indexOf(...e){return ot(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ot(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return br(this,"reduce",e,t)},reduceRight(e,...t){return br(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return st(this,"values",(e)=>I(this,e))}};co=Array.prototype;uo=gn("__proto__,__v_isRef,__isVue"),Sn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));po=class extends Tn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Ft(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!o&&ve(i)&&!ve(r))if(l)return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Et(e,t),a=Reflect.set(e,t,r,ve(e)?e:n);if(e===y(n)&&a){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Et(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!Sn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},ho=class extends Tn{constructor(e=!1){super(!0,e)}set(e,t){return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return X(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},bo=new po,mo=new ho;vo={get:Cn(!1,!1)},yo={get:Cn(!0,!1)};On=new WeakMap,_o=new WeakMap,Mn=new WeakMap,wo=new WeakMap;M("nextTick",()=>Ht);M("dispatch",(e)=>be.bind(be,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=wr(()=>{let l;return o((d)=>l=d),l},i);r(a)});M("store",Ns);M("data",(e)=>Mr(e));M("root",(e)=>Ve(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=Y(Ao(e)),e._x_refs_proxy});at={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Co(e,i,t,()=>{let o=So(e,r),s=o?o._x_ids[r]:Dn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Se((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Nn("Focus","focus","focus");Nn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let c;return o((u)=>c=u),c},a=n(`${t} = __placeholder`),l=(c)=>a(()=>{},{scope:{__placeholder:c}}),d=s();l(d),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let c=e._x_model.get,u=e._x_model.setWithModifiers,p=cn({get(){return c()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=gr(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ae(o,{},e);let s=(a,l,d)=>{if(d.includes("prepend"))l.parentNode.insertBefore(a,l);else if(d.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};w(()=>{B(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=gr(r);w(()=>{s(e._x_teleport,a,t)})},n(()=>w(()=>{o.remove(),re(o)}))});Oo=document.createElement("div");Pn.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})};E("ignore",Pn);E("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));No=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=C(e,(h)=>h!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((b)=>h=b),vr(h)?h.get():h},d=(h)=>{let b;if(s((f)=>b=f),vr(b))b.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")w(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let c=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),g=c||u||p,m;if(j)m=()=>{};else if(g){let h=[],b=(f)=>d(Le(e,t,f,l()));if(c)h.push(oe(e,"change",t,b));if(u){if(h.push(oe(e,"blur",t,b)),e.form){let f=e.form,x=()=>b({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(x),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(x),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")b(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(b)=>{d(Le(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Be(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)d(Le(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(b)=>{Ht(()=>e._x_model&&e._x_model.set(Le(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){d(h)},setWithModifiers:Rn(t,d)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";w(()=>{if(Be(e))if(Array.isArray(h))e.checked=h.some((b)=>b==e.value);else e.checked=!!h;else if(qt(e))if(typeof h==="boolean")e.checked=De(e.value)===h;else e.checked=e.value==h;else sn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>w(()=>e.removeAttribute(ce("cloak")))));en(()=>`[${ce("init")}]`);E("init",B((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{w(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{w(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});$t(jr(":",zr(ce("bind:"))));Bn.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}};E("bind",Bn);Qr(()=>`[${ce("data")}]`);z=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Ho(e))return;let n=e[z];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Re(i,e);let o={};Bs(o,i);let s=W(e,t,{scope:o});if(s===void 0||s===!0)s={};Re(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Uo(a,s);let d={expression:t};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})}else a=le(s);Pt(a,r);let l=Ae(e,a);B(()=>{a.init&&W(e,a.init)})(),r(()=>{a.destroy&&W(e,a.destroy),l();let d={reactiveData:a};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})})});Se((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{w(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{w(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=_t((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),d,c=!0;n(()=>i((u)=>{if(!c&&u===d)return;if(t.includes("immediate"))u?a():o();l(u),d=u,c=!1}))});E("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=qo(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>zo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>w(()=>{re(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Un.inline=(e,{expression:t},{cleanup:r})=>{let n=Ve(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Un);E("if",B((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ae(a,{},e),w(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{w(()=>{re(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>To(e,i))});Se((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});$t(jr("@",zr(ce("on:"))));E("on",B((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(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 s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));Ye("Collapse","collapse","collapse");Ye("Intersect","intersect","intersect");Ye("Focus","trap","focus");Ye("Mask","mask","mask");E("html",(e,{expression:t})=>{qe(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Ks);ue.setRawEvaluator(Fs);ue.setReactivityEngine({reactive:Yt,effect:(e,t={})=>{let r;return r=ro(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:no,raw:y});Hn=ue,Wo=Hn;/*! 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 k("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 k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Ks=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 Fs.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}}},Ws=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 b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}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 s=i[a];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let o=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h;if(e.callee.computed)h=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else h=e.callee.property.name;this.checkForDangerousKeywords(h);let v=b[h];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(b,o)}else if(e.callee.type==="Identifier"){let b=e.callee.name,h;if(b in t)h=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof h!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=h.apply(v,o)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.apply(r,o)}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 b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let h=t[b];if(e.operator==="++")t[b]=h+1;else if(e.operator==="--")t[b]=h-1;return e.prefix?t[b]:h}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(h);let v=b[h];if(e.operator==="++")b[h]=v+1;else if(e.operator==="--")b[h]=v-1;return e.prefix?b[h]:v}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 g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(h),b[h]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let b of e.properties){let h=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[h]=v}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(br.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(gn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return br.set(e,!0),!0}},_a,Ea,we,Xs,Ct=(e,t)=>Xs.call(e,t),_e,ge=(e)=>wn(e)==="[object Map]",Zs=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",Qs,wn=(e)=>Qs.call(e),_n=(e)=>wn(e).slice(8,-1),Yt=(e)=>Zs(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},eo,ka,to,Aa,En,Sa,F=(e,t)=>!Object.is(e,t),ro="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ca,at,x,lt,mr=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,at)if(at.active)at.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,lt.has(this))lt.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))no(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gr(this),An(this);let e=x,t=O;x=this,O=!0;try{return this.fn()}finally{if(x!==this)X("Active effect was not restored correctly - this is likely a Vue internal bug.");Sn(this),x=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Xt(e);this.deps=this.depsTail=void 0,gr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)lt.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Tt(this))this.run()}get dirty(){return Tt(this)}},kn=0,ve,xe,O=!0,Cn,je=0,uo=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}},fo=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(!x||!O||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new uo(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;Tn(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=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(we({effect:x},e));return t}trigger(e){this.version++,je++,this.notify(e)}notify(e){Jt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(we({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Gt()}}},Ot,Y,Mt,ke,ho,po,bo,On,Mn=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?So:Dn:i?Ao:Ln).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=_e(e);if(!n){let o;if(a&&(o=ho[t]))return o;if(t==="hasOwnProperty")return mo}let s=Reflect.get(e,t,ye(e)?e:r);if(Te(t)?On.has(t):bo(t))return s;if(!n)C(e,"get",t);if(i)return s;if(ye(s)){let o=a&&Yt(t)?s:s.value;return n&&Ee(o)?Lt(o):o}if(Ee(s))return n?Lt(s):Qt(s);return s}},go,vo,xo,yo,It=(e)=>e,De=(e)=>Reflect.getPrototypeOf(e),Eo,ko,Ln,Ao,Dn,So,ee=(e)=>Ee(e)?Qt(e):e,Ae=(e)=>Ee(e)?Lt(e):e,ut,Do,$n=()=>{},$o,Un=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:s})=>{if(!t){let l={};Hs(l),A(e,n)((d)=>{bn(e,d,i)},{scope:l});return}if(t==="key")return jo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let o=A(e,n);a(()=>o((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>ln(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},j,qn,Xo;var Vn=vi(()=>{B=[];Sr=[],Cr=[],Tr=[];Fe=new MutationObserver(Ve);q=[];$e=[];$i={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 zi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Nr(s,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)}};Br={};Rr=Fi;He={};be=new Map,jr=Symbol();Wr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",yt,"teleport"];Gr=[];Ce((e,t)=>{if(Ye===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});jt=[],Qr=[];sn=[];_t=[];E("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")ys(e,r,t);else xs(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((s,o)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>o({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=an(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let o=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(o)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};o(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Is=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"]);P={};pn={};mn={};qs={get reactive(){return le},get release(){return ce},get effect(){return te},get raw(){return kr},get transaction(){return Ii},version:"3.17.4",flushAndStopDeferringMutations:Ri,dontAutoEvaluateFunctions:$r,disableEffectScheduling:Ti,startObservingMutations:Rt,stopObservingMutations:Lr,setReactivityEngine:Oi,onAttributeRemoved:Mr,onAttributesAdded:Or,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:ts,addRootSelector:rn,addInitSelector:nn,setErrorHandler:qi,interceptClone:Ce,addScopeToNode:Se,deferMutations:Bi,mapAttributes:Ut,evaluateLater:A,interceptInit:us,initInterceptors:zt,injectMagics:ze,setEvaluator:Vi,setRawEvaluator:Ki,mergeProxies:J,extractProp:Ps,findClosest:T,onElRemoved:Pt,closestRoot:Je,destroyTree:re,interceptor:Pr,transition:St,setStyles:Ge,mutateDom:_,deferInit:ss,directive:E,entangle:hn,throttle:fn,debounce:un,evaluate:W,evaluateRaw:Yi,initTree:D,nextTick:Ft,prefixed:de,prefix:Ji,plugin:Bs,magic:M,store:Rs,start:cs,clone:ns,cloneNode:rs,bound:Ns,$data:Dr,watch:Ar,walk:G,data:Us,bind:zs},ue=qs,br=new WeakMap,gn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}gn.add(t)});Fs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];_a=Object.freeze({}),Ea=Object.freeze([]),we=Object.assign,Xs=Object.prototype.hasOwnProperty,_e=Array.isArray,Qs=Object.prototype.toString,eo=/-\w/g,ka=Xe((e)=>e.replace(eo,(t)=>t.slice(1).toUpperCase())),to=/\B([A-Z])/g,Aa=Xe((e)=>e.replace(to,"-$1").toLowerCase()),En=Xe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Sa=Xe((e)=>e?`on${En(e)}`:""),Ca=yn(ro+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");lt=new WeakSet;Cn=[];Ot=new WeakMap,Y=Symbol("Object iterate"),Mt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");ho={__proto__:null,[Symbol.iterator](){return ct(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ct(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return dt(this,"includes",e)},indexOf(...e){return dt(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return dt(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return vr(this,"reduce",e,t)},reduceRight(e,...t){return vr(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return ct(this,"values",(e)=>I(this,e))}};po=Array.prototype;bo=yn("__proto__,__v_isRef,__isVue"),On=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));go=class extends Mn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=_e(e)&&Yt(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!a&&ye(i)&&!ye(r))if(l)return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=a?Number(t)<e.length:Ct(e,t),o=Reflect.set(e,t,r,ye(e)?e:n);if(e===y(n)&&o){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return o}deleteProperty(e,t){let r=Ct(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!On.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",_e(e)?"length":Y),Reflect.ownKeys(e)}},vo=class extends Mn{constructor(e=!1){super(!0,e)}set(e,t){return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return X(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},xo=new go,yo=new vo;Eo={get:In(!1,!1)},ko={get:In(!0,!1)};Ln=new WeakMap,Ao=new WeakMap,Dn=new WeakMap,So=new WeakMap;M("nextTick",()=>Ft);M("dispatch",(e)=>me.bind(me,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),o=Ar(()=>{let l;return a((c)=>l=c),l},i);r(o)});M("store",$s);M("data",(e)=>Dr(e));M("root",(e)=>Je(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=J(Oo(e)),e._x_refs_proxy});ut={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Lo(e,i,t,()=>{let a=Mo(e,r),s=a?a._x_ids[r]:Bn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Ce((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Rn("Focus","focus","focus");Rn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let a=n(t),s=()=>{let d;return a((u)=>d=u),d},o=n(`${t} = __placeholder`),l=(d)=>o(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,f=hn({get(){return d()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=yr(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((o)=>{a.addEventListener(o,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Se(a,{},e);let s=(o,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(o,l);else if(c.includes("append"))l.parentNode.insertBefore(o,l.nextSibling);else l.appendChild(o)};_(()=>{R(()=>{s(a,i,t),D(a)})()}),e._x_teleportPutBack=()=>{let o=yr(r);_(()=>{s(e._x_teleport,o,t)})},n(()=>_(()=>{a.remove(),re(a)}))});Do=document.createElement("div");$n.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})};E("ignore",$n);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));$o=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let a=e;if(t.includes("parent"))a=T(e,(p)=>p!==e);let s=A(a,r),o;if(typeof r==="string")o=A(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")o=A(a,`${r()} = __placeholder`);else o=()=>{};let l=()=>{let p;return s((b)=>p=b),_r(p)?p.get():p},c=(p)=>{let b;if(s((h)=>b=h),_r(b))b.set(p);else o(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),m=d||u||f,g;if(U)g=()=>{};else if(m){let p=[],b=(h)=>c(Pe(e,t,h,l()));if(d)p.push(oe(e,"change",t,b));if(u){if(p.push(oe(e,"blur",t,b)),e.form){let h=e.form,v=()=>b({target:e});if(!h._x_pendingModelUpdates)h._x_pendingModelUpdates=[];h._x_pendingModelUpdates.push(v),i(()=>{if(h._x_pendingModelUpdates)h._x_pendingModelUpdates.splice(h._x_pendingModelUpdates.indexOf(v),1)})}}if(f)p.push(oe(e,"keydown",t,(h)=>{if(h.key==="Enter")b(h)}));g=()=>p.forEach((h)=>h())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,p,t,(b)=>{c(Pe(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ue(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Pe(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=g,i(()=>e._x_removeModelListeners.default()),e.form){let p=oe(e.form,"reset",[],(b)=>{Ft(()=>e._x_model&&e._x_model.set(Pe(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:zn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Ue(e))if(Array.isArray(p))e.checked=p.some((b)=>b==e.value);else e.checked=!!p;else if(Wt(e))if(typeof p==="boolean")e.checked=Be(e.value)===p;else e.checked=e.value==p;else ln(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)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));nn(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{_(()=>{e.textContent=a})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{_(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=a??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ut(Fr(":",Vr(de("bind:"))));Un.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}};E("bind",Un);rn(()=>`[${de("data")}]`);j=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Fo(e))return;let n=e[j];if(n?.expression===t)return;t=t===""?"{}":t;let i={};ze(i,e);let a={};js(a,i);let s=W(e,t,{scope:a});if(s===void 0||s===!0)s={};ze(s,e);let o;if(n?.reactiveData){o=n.reactiveData,qo(o,s);let c={expression:t};e[j]=c,queueMicrotask(()=>{if(e[j]===c)delete e[j]})}else o=le(s);zt(o,r);let l=Se(e,o);R(()=>{o.init&&W(e,o.init)})(),r(()=>{o.destroy&&W(e,o.destroy),l();let c={reactiveData:o};e[j]=c,queueMicrotask(()=>{if(e[j]===c)delete e[j]})})});Ce((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{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},s=()=>{e._x_doShow(),e._x_isShown=!0},o=()=>setTimeout(s),l=At((u)=>u?s():a(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,a);else u?o():a()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?o():a();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Wo(t),a=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Ko(e,i,a,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((o)=>_(()=>{re(o),o.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));jn.inline=(e,{expression:t},{cleanup:r})=>{let n=Je(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",jn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let o=e.content.cloneNode(!0).firstElementChild;return Se(o,{},e),_(()=>{e.after(o),D(o)}),e._x_currentIfEl=o,e._x_lastRenderedEl=o,e._x_undoIf=()=>{_(()=>{re(o),o.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},o},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((o)=>{o?a():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Io(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ut(Fr("@",Vr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?A(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 s=oe(e,t,r,(o)=>{a(()=>{},{scope:{$event:o},params:[o]})});i(()=>s())}));Ze("Collapse","collapse","collapse");Ze("Intersect","intersect","intersect");Ze("Focus","trap","focus");Ze("Mask","mask","mask");E("html",(e,{expression:t})=>{Ke(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Js);ue.setRawEvaluator(Ys);ue.setReactivityEngine({reactive:Qt,effect:(e,t={})=>{let r;return r=oo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:ao,raw:y});qn=ue,Xo=qn;/*! Bundled license information:
|
|
8
8
|
|
|
9
9
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
10
|
(**
|
|
@@ -19,8 +19,28 @@ ${r?'Expression: "'+r+`"
|
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
21
|
**)
|
|
22
|
-
*/});var
|
|
23
|
-
|
|
22
|
+
*/});var Ie=typeof HTMLElement==="function"?HTMLElement:class{};function lr(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 cr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,o]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,o)};i();let a=new MutationObserver(i);a.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>a.disconnect(),{once:!0})}var xi=Symbol.for("bare-v3.styles");function Le(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[xi]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let a=e.createElement("style");a.id=t,a.textContent=r,e.head.append(a)}var Oe=null;function Kn(){if(Oe)return Oe;let e=(Vn(),pi(Fn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Oe=e}var Wn=(e)=>Kn().reactive(e),Yn=(e)=>Oe?Oe.raw(e):e;function Jn(e,t,r){let n=Kn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Zo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},a=null,s=null,o=0,l=null,c=0,d=null,u=new n.MutationObserver((g)=>{if(!a.isConnected||g.some(({target:p})=>s.contains(p)&&!d.contains(p)))f()});function f(){if(!a)return;n.clearTimeout(c),u.disconnect();let g=a.dataset.b3Confirm;if(l&&g&&a.textContent===g)a.replaceChildren(...l);a.removeAttribute("data-b3-armed"),a=s=l=null,d.textContent=""}function m(g){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;a=g,o=n.performance.now(),s=g.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||g.parentElement;let b=g.dataset.b3Confirm;if(b)l=[...g.childNodes],g.replaceChildren(b);g.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(a===g)p.textContent=b||"Press again to confirm"})}e.addEventListener("click",(g)=>{let p=g.target.closest?.("[data-b3-confirm]");if(a&&p!==a)f();if(!p||p.disabled||!e.contains(p))return;if(p===a&&n.performance.now()-o>=350)return f();if(g.preventDefault(),g.stopImmediatePropagation(),p!==a)m(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:g})=>{if(g===a)n.queueMicrotask(()=>g===a&&f())},i),e.addEventListener("keydown",(g)=>{let p=g;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 Gn=Symbol.for("bare-v3.confirm");function Xn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Gn])return;e[Gn]=!0,Zo(document)}var fe=1.001,Qo=320,ea=30,ta=350,ra="b3-image-viewer-style",na=`
|
|
23
|
+
.b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
|
|
24
|
+
background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
|
|
25
|
+
border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
|
|
26
|
+
.b3-image-viewer:focus-visible{outline:2px solid var(--b3-color-focus,#276bdd);outline-offset:2px;}
|
|
27
|
+
.b3-image-viewer>img{display:block;max-width:100%;max-height:100%;margin:0 auto;
|
|
28
|
+
will-change:transform;-webkit-user-drag:none;}
|
|
29
|
+
.b3-image-viewer[open]{position:fixed;inset:0;z-index:100;display:flex;align-items:center;
|
|
30
|
+
justify-content:center;border-radius:0;background:var(--b3-color-canvas,#f6f5f0);}
|
|
31
|
+
.b3-image-viewer[open]>img{max-width:100vw;max-height:100vh;}
|
|
32
|
+
.b3-image-viewer[data-b3-pannable]{cursor:grab;}
|
|
33
|
+
.b3-image-viewer[data-b3-zoomed]{cursor:grabbing;}
|
|
34
|
+
.b3-image-viewer>.b3-image-viewer-close,.b3-image-viewer>.b3-image-viewer-fit{position:absolute;
|
|
35
|
+
z-index:1;top:var(--b3-space,1rem);border:1px solid var(--b3-color-border,#d5dbd3);
|
|
36
|
+
border-radius:var(--b3-radius,.75rem);background:var(--b3-color-surface,#fff);
|
|
37
|
+
color:var(--b3-color-text,#202923);font:inherit;line-height:1;padding:.5rem .75rem;cursor:pointer;
|
|
38
|
+
min-height:44px;min-width:44px;}
|
|
39
|
+
.b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
|
|
40
|
+
.b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
|
|
41
|
+
`;class er extends Ie{static observedAttributes=["src","alt","max-scale","open"];#e=1;#t=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#h=0;#r=0;#m=0;#g=0;#y=!1;#v=null;#p=null;#w=new WeakSet;#l=null;get scale(){return this.#e}get fitted(){return this.#e<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#_()}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.#y)return;if(this.#y=!0,Le(this.ownerDocument,ra,na),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#E(),this.#_(),this.#M(),this.#p=new MutationObserver(()=>{this.#S(),this.#u()}),this.#p.observe(this,{childList:!0}),this.#S(),this.#u()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#p?.disconnect(),this.#p=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#y=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#c();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#S(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#e>this.maxScale)this.zoomTo(this.maxScale)}#c(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#c(),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.#E(),e.tagName==="IMG")this.#k(e)}#E(){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")}#k(e){if(this.#w.has(e))return;if(this.#w.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#A(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#A(e)},0)}#A(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}}))}#S(){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)}#d(){let e=this.#c();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.#o=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}}#f(e){if(this.#e<=fe&&!this.#o){this.#t=0,this.#n=0;return}let t=e.w*this.#e,r=e.h*this.#e;this.#t=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#t)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#u(e){let t=e?.element??this.#c();if(!t)return;let r=this.#e<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#t&&!this.#n?"":`translate(${this.#t}px, ${this.#n}px) scale(${this.#e})`,t.style.setProperty("--b3-zoom",String(this.#e)),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.#d()){if(!n)return;let i=this.#e;e=Math.max(1,Math.min(this.maxScale,e));let a=(t-this.#t)/this.#e,s=(r-this.#n)/this.#e;if(this.#t=t-a*e,this.#n=r-s*e,this.#e=e,this.#f(n),this.#u(n),i!==this.#e)this.#x()}#x(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#e,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#e!==1;this.#e=1,this.#t=0,this.#n=0;let t=this.#d();if(t)this.#f(t);if(this.#u(t),e)this.#x()}zoomTo(e){let t=this.#d();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}}))}#T(){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}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#v=new AbortController;let e={signal:this.#v.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#c())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#e>fe||this.#o)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.#e<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let a=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let o=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#e,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#e*(l/s))):this.#e,f=(a.x-c.left-this.#t)/this.#e,m=(a.y-c.top-this.#n)/this.#e;if(this.#t=o.x-c.left-f*u,this.#n=o.y-c.top-m*u,this.#e=u,this.#f(this.#s),this.#u(this.#s),this.#a=!0,d!==this.#e)this.#x()},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.#s=this.#d();return}if(this.#s=null,this.#a){this.#h=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),a=Math.hypot(n.clientX-this.#m,n.clientY-this.#g)<ea;if(i-this.#r<Qo&&a){this.#r=0;let s=this.getBoundingClientRect();this.#C(this.#e>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#h=i}else this.#r=i,this.#m=n.clientX,this.#g=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.#h<ta){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.#e*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let a=this.#d();if(!a||a.h*this.#e<=a.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(a),this.#n===s)return;n.preventDefault(),this.#u(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=(s,o)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#t+=s,this.#n+=o,this.#f(l),this.#u(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#e*1.5);break;case"-":case"_":this.zoomTo(this.#e/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.#d();if(n)this.#f(n),this.#u(n)},e)}}var Zn=er;function tr(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=Zn;return Zn=class extends er{},customElements.define(e,r),r}tr();var ia=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,sa=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,oa=350,tt=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),Qn=(e)=>JSON.parse(JSON.stringify(Yn(e))),w=(e,t)=>e!=null&&String(e)===String(t),rr=(e)=>!!e&&typeof e==="object",S=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],si=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ei(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=tt();t.add(String(n.id))};return e.filter(rr).map((n)=>{r(n),n.cards=si(Array.isArray(n.cards)?n.cards.filter(rr):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(rr(a))r(a)}return n})}function ti(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>w(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((a)=>w(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 s=S(a),o=s.findIndex((l)=>w(l.id,r));if(o>=0)return void s.splice(o,1)}}}var aa=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function la(e){return[e.title??"",e.description??"",...S(e).map((t)=>t.title??""),...rt(e)].join(`
|
|
42
|
+
`).toLowerCase()}function rt(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...S(e).map((n)=>n.title??"")].join(`
|
|
43
|
+
`);for(let[,,n]of r.matchAll(ia))t.add(n.toLowerCase());return[...t]}var ri=String.raw`((?:[^()\s]|\([^()\s]*\))+)`,ca=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ri}\)|\[([^\]\n]+)\]\(${ri}\)|\bhttps?:\/\/[^\s<>]+`,"giu");function da(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function sr(e){let t=[],r=0;for(let n of e.matchAll(ca)){let i=n[2]!==void 0,[a]=n,s=i?n[1]:n[3],o=i?n[2]:n[4],l=n.index+a.length;if(!o){let d=a;for(;;){if(d=d.replace(/[.,;:!?'"\]]+$/u,""),!d.endsWith(")")||d.split("(").length>=d.split(")").length)break;d=d.slice(0,-1)}l-=a.length-d.length,a=s=o=d}let c=da(o);if(!c||i&&!c.file&&!/^https?:/i.test(c.href))continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:s,...c,...i?{image:i}:{}}),r=l}if(r<e.length)t.push(e.slice(r));return t}var ni=(e)=>sr(e).map((t)=>typeof t==="string"?t:t.text).join(""),nr=null;function ua(e,t){let r=e.ownerDocument;e.replaceChildren(...sr(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.image){let a=r.createElement("img");if(a.src=n.href,a.alt=n.text,a.loading="lazy",a.draggable=!1,i.classList.add("b3-board-image"),i.append(a),n.file)i.dataset.file="";else i.target="_blank",i.rel="noopener noreferrer";return i}if(n.file){if(i.dataset.file="",!nr){let a=r.createElement("template");a.innerHTML=ba,nr=a.content.firstElementChild}i.append(nr.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var fa="b3-board-style",ha=`
|
|
24
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);
|
|
25
45
|
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
26
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));}
|
|
@@ -44,6 +64,10 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
44
64
|
.b3-board-ref{color:var(--b3-color-accent);text-decoration:none;text-underline-offset:.15em;overflow-wrap:anywhere;}
|
|
45
65
|
.b3-board-ref:hover{text-decoration:underline;}
|
|
46
66
|
.b3-board-image{display:inline-block;max-inline-size:100%;margin-block:.125rem;vertical-align:top;line-height:0;}
|
|
67
|
+
.b3-board-lightbox-open{position:absolute;z-index:1;inset-block-end:calc(var(--b3-space,1rem) + env(safe-area-inset-bottom,0px));inset-inline-end:var(--b3-space,1rem);
|
|
68
|
+
min-block-size:44px;padding:.5rem .75rem;border:1px solid var(--b3-color-border,#d5dbd3);border-radius:var(--b3-radius,.75rem);
|
|
69
|
+
background:var(--b3-color-surface,#fff);color:var(--b3-color-text,#202923);font:inherit;line-height:1;cursor:pointer;}
|
|
70
|
+
.b3-board-image{cursor:zoom-in;}
|
|
47
71
|
.b3-board-image>img{max-inline-size:100%;max-block-size:10rem;border-radius:var(--b3-radius-small,.375rem);background:var(--b3-board-soft);}
|
|
48
72
|
.b3-board-ref>.b3-board-icon{display:inline;inline-size:.875em;block-size:.875em;margin-inline-end:.2em;vertical-align:-.125em;}
|
|
49
73
|
.b3-board-link{display:inline-flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-chip);padding:0 .375rem;border:0;
|
|
@@ -155,9 +179,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
155
179
|
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
156
180
|
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
157
181
|
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
158
|
-
`,ne=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,
|
|
182
|
+
`,ne=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ii=ne('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),Qe=ne('<path d="M5 12h14M12 5v14"/>'),ir=ne('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),pa=ne('<path d="m9 18 6-6-6-6"/>'),ba=ne('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),ma=ne('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),ga=ne('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),et=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
|
|
159
183
|
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
160
|
-
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,
|
|
184
|
+
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,va=`
|
|
161
185
|
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
|
|
162
186
|
<span class="b3-board-caption" aria-hidden="true">Filter</span>
|
|
163
187
|
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
@@ -169,30 +193,30 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
169
193
|
<template b3x-for="column in columns" b3x-bind:key="column.id">
|
|
170
194
|
<section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
|
|
171
195
|
<header class="b3-board-column-header">
|
|
172
|
-
${
|
|
196
|
+
${et("name","column.id",!1)}
|
|
173
197
|
<button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
|
|
174
198
|
b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
|
|
175
199
|
<span class="b3-board-count" b3x-text="count(column)"></span>
|
|
176
200
|
<button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
|
|
177
|
-
b3x-on:click="addCard(column)">${
|
|
201
|
+
b3x-on:click="addCard(column)">${Qe}</button>
|
|
178
202
|
<button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete column ' + (column.name || 'Untitled')"
|
|
179
|
-
b3x-on:click="removeColumn(column)">${
|
|
203
|
+
b3x-on:click="removeColumn(column)">${ir}</button>
|
|
180
204
|
</header>
|
|
181
205
|
<ol class="b3-board-cards">
|
|
182
206
|
<template b3x-for="card in visible(column)" b3x-bind:key="card.id">
|
|
183
207
|
<li class="b3-board-card" tabindex="0" b3x-bind:data-card="card.id" b3x-bind:data-starred="card.starred ? '' : null" b3x-on:keydown="keyCard($event, card)">
|
|
184
|
-
<span class="b3-board-grip" b3x-show="!readonly">${
|
|
208
|
+
<span class="b3-board-grip" b3x-show="!readonly">${ii}</span>
|
|
185
209
|
<div class="b3-board-card-head">
|
|
186
|
-
${
|
|
210
|
+
${et("title","card.id")}
|
|
187
211
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
|
|
188
212
|
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
189
213
|
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
190
214
|
<button type="button" class="b3-board-quiet b3-board-details" b3x-show="!readonly && !hasDetails(card) && !isOpen(card)" b3x-bind:aria-label="'Add details to ' + plain(card.title)"
|
|
191
|
-
b3x-on:click="addDetails(card)">${
|
|
215
|
+
b3x-on:click="addDetails(card)">${ma}</button>
|
|
192
216
|
<button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(card.title)"
|
|
193
|
-
b3x-on:click="removeCard(column, card)">${
|
|
217
|
+
b3x-on:click="removeCard(column, card)">${ir}</button>
|
|
194
218
|
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
195
|
-
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${
|
|
219
|
+
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${ga}</button>
|
|
196
220
|
</span>
|
|
197
221
|
</div>
|
|
198
222
|
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
@@ -202,32 +226,32 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
202
226
|
</div>
|
|
203
227
|
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
204
228
|
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
205
|
-
${
|
|
229
|
+
${pa}
|
|
206
230
|
<span class="b3-board-progress" b3x-show="subtasksOf(card).length" b3x-bind:data-complete="complete(card) ? '' : null" b3x-text="done(card) + '/' + subtasksOf(card).length"></span>
|
|
207
231
|
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
208
232
|
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
|
|
209
233
|
</button>
|
|
210
234
|
<template b3x-if="isOpen(card)">
|
|
211
235
|
<div class="b3-board-body">
|
|
212
|
-
${
|
|
236
|
+
${et("description","card.id")}
|
|
213
237
|
<div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
|
|
214
238
|
b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
|
|
215
239
|
b3x-effect="rich($el, card.description)"></div>
|
|
216
240
|
<ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
|
|
217
241
|
<template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
|
|
218
242
|
<li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
|
|
219
|
-
<span class="b3-board-subtask-grip" b3x-show="!readonly">${
|
|
243
|
+
<span class="b3-board-subtask-grip" b3x-show="!readonly">${ii}</span>
|
|
220
244
|
<input type="checkbox" b3x-bind:checked="!!sub.done" b3x-bind:disabled="readonly" b3x-on:change="check(card, sub, $event.target.checked)" b3x-bind:aria-label="plain(sub.title)">
|
|
221
|
-
${
|
|
245
|
+
${et("subtask","sub.id",!1)}
|
|
222
246
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
|
|
223
247
|
b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
|
|
224
|
-
<button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${
|
|
248
|
+
<button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${ir}</button>
|
|
225
249
|
</li>
|
|
226
250
|
</template>
|
|
227
251
|
</ul>
|
|
228
252
|
<div class="b3-board-actions" b3x-show="!readonly">
|
|
229
|
-
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${
|
|
230
|
-
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${
|
|
253
|
+
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${Qe}<span>Add details</span></button>
|
|
254
|
+
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${Qe}<span>Add subtask</span></button>
|
|
231
255
|
</div>
|
|
232
256
|
</div>
|
|
233
257
|
</template>
|
|
@@ -236,10 +260,10 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
236
260
|
</ol>
|
|
237
261
|
</section>
|
|
238
262
|
</template>
|
|
239
|
-
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${
|
|
263
|
+
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${Qe}<span>Add column</span></button>
|
|
240
264
|
</div>
|
|
241
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class
|
|
242
|
-
`).map(
|
|
265
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class oi extends Ie{static observedAttributes=["readonly","search"];#e=null;#t=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#h=null;#r=null;#m=!1;#g=null;#y=0;#v=Math.random().toString(36).slice(2,8);#p=!1;#w=[];get columns(){let e=Qn(this.#t?.columns??this.#n??[]),t=this.#t?.editing;if(t?.fresh)ti(e,t);return e}set columns(e){let t=ei(Qn(e));if(!this.#t){this.#n=t;return}this.#b();let r=this.#t;if(r.columns=t,r.editing&&!this.#l(r.editing.id))r.editing=null}get filter(){return[...this.#t?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#t){if(t.join(" ")!==this.#t.filter.join(" "))this.#t.kept=[];this.#t.filter=t}else this.#o=t}get search(){return this.#t?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#t){if(t!==this.#t.search)this.#t.kept=[];this.#t.search=t}else this.#s=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#t;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((a)=>w(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.#g}set upload(e){this.#g=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.#e&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Le(e,fa,ha),Xn(),!this.#e){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=ei(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#e=e.createElement("div"),this.#e.className="b3-board-ui",this.append(this.#e),this.#t=Jn(this.#e,va,this.#_(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null}else if(this.#e.parentNode!==this)this.append(this.#e);this.#h=new MutationObserver(()=>{if(this.#e&&this.#e.parentNode!==this)this.append(this.#e)}),this.#h.observe(this,{childList:!0}),this.#C(),cr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#b(),this.#a?.abort(),this.#a=null,this.#x(),this.#h?.disconnect(),this.#h=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#t)return;if(this.#t.readonly=this.readonly,this.#t.viewed={},this.readonly)this.#b(),this.#t.editing=null}#l(e){for(let t of this.#t?.columns??[]){if(w(t.id,e))return t;for(let r of t.cards)if(w(r.id,e)||S(r).some((n)=>w(n.id,e)))return r}return null}#c(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#_(e,t,r){let n=this,i=(o)=>this.#c(o),a=(o)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>w(d.id,o));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Wn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,viewed:{},tokensOf:rt,subtasksOf:S,label(o){let l=String(o??"");return l.replace(sa,"").trim()||l},pressed(o){return String(s.filter.includes(o))},mention(o){return o.startsWith("@")?"":null},starred(o){return String(!!o.starred)},hasDetails(o){return!!(o.description||S(o).length)},complete(o){let l=S(o).length;return l>0&&s.done(o)===l},preview(o){let l=String(o.description??"");return l.split(`
|
|
266
|
+
`).map(ni).find((d)=>d.trim())?.trim()??(sr(l).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(o){return ni(s.label(o))},rich(o,l){ua(o,String(l??""))},keyText(o,l,c,d){if(o.target!==o.currentTarget||o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation(),s.edit(l,c,d)},isOpen(o){let l=s.viewed[String(o.id)];return s.readonly&&l!==void 0?l:!!o.expanded},expanded(o){return String(s.isOpen(o))},isEditing(o,l){return!!s.editing&&s.editing.field===o&&s.editing.id===l},focusEditor(o){queueMicrotask(()=>n.#S(o))},blurEditor(o,l){if(s.isEditing(o,l))s.commit()},tokens(){let o=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of rt(c))o.add(d);return[...o].sort()},visible(o){let l=aa(s.search);if(!s.filter.length&&!l.length)return o.cards;let c=s.editing&&n.#l(s.editing.id);return o.cards.filter((d)=>{if(d===c||s.kept.some((m)=>w(d.id,m)))return!0;let u=rt(d),f=l.length?la(d):"";return s.filter.every((m)=>u.includes(m))&&l.every((m)=>f.includes(m))})},count(o){let l=s.visible(o).length;return l===o.cards.length?String(l):`${l}/${o.cards.length}`},done(o){return S(o).filter((l)=>l.done).length},disclosable(o){return!!(o.description||S(o).length||!s.readonly)},toggleFilter(o){s.kept=[],s.filter=s.filter.includes(o)?s.filter.filter((l)=>l!==o):[...s.filter,o]},setFilter(o){s.kept=[],s.filter=o},toggleStar(o){let l=a(o.id);if(s.readonly||!l)return;if(o.starred)delete o.starred;else o.starred=!0;l.column.cards=si(l.column.cards);let c=!!o.starred;s.announcement=`${o.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:o.id,starred:c}),n.#f(o.id)},toggle(o){if(s.readonly){s.viewed={...s.viewed,[String(o.id)]:!s.isOpen(o)};return}o.expanded=!o.expanded,i({type:"toggle",card:o.id,expanded:o.expanded})},edit(o,l,c,d=!1,u=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(o,l))s.commit();s.editing={field:o,id:l,draft:c??"",fresh:d,opened:u},n.#d()},addDetails(o){if(s.readonly)return;let l=!o.expanded;o.expanded=!0,s.edit("description",o.id,String(o.description??""),!1,l)},keyEditor(o,l){if(o.stopPropagation(),o.key==="Escape")o.preventDefault(),s.cancel();else if(o.key==="Enter"&&!(l&&o.shiftKey)&&!o.isComposing)o.preventDefault(),s.commit(!0)},pasteEditor(o,l,c){let d=[...o.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(o.clipboardData?.getData("text/plain").trim())return;o.preventDefault();for(let u of d)n.#E(c,u,l==="description"?o.target:null)},cancel(){let o=s.editing;if(s.editing=null,o?.fresh)s.discard(o);if(o?.opened)s.close(o);n.#u(o)},close(o){let l=n.#l(o.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(o=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#l(l.id);if(!d)return;if(!c&&l.fresh)return s.discard(l);if(!c&&l.opened)s.close(l);let u=null;if(l.field==="name"){let f=d;if(c&&c!==f.name)f.name=c,u={type:"edit",column:f.id,field:"name"};if(l.fresh)u={type:"add",column:f.id}}else if(l.field==="subtask"){let f=d,m=S(f).find((g)=>w(g.id,l.id));if(!c)return s.removeSubtask(f,m);if(c!==m.title)m.title=c,u={type:"edit",card:f.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:f.id,subtask:m.id,op:"add"}}else{let f=d,m=l.field;if((c||m==="description")&&c!==(f[m]??""))f[m]=c,u={type:"edit",card:f.id,field:m};if(l.fresh)u={type:"add",card:f.id,column:a(f.id).column.id},s.kept=[...s.kept,f.id]}if(u)i(u);if(l.fresh&&l.field==="subtask"&&o)s.addSubtask(d);else if(l.fresh&&l.field==="title"&&o&&!n.hasAttribute("compact"))s.addDetails(d);else n.#u(l)},discard(o){ti(s.columns,o)},settle(){if(s.editing)s.commit()},addCard(o){if(s.readonly)return;s.settle();let l={id:tt(),title:""};o.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let o={id:tt(),name:"",cards:[]};s.columns.push(o),s.edit("name",o.id,"",!0)},addSubtask(o){if(s.readonly)return;s.settle();let l={id:tt(),title:"",done:!1};if(o.expanded=!0,!Array.isArray(o.subtasks))o.subtasks=[];o.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(o,l){if(s.readonly)return;o.cards=o.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:o.id})},removeColumn(o){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==o),i({type:"remove",column:o.id})},removeSubtask(o,l){if(s.readonly)return;o.subtasks=S(o).filter((c)=>c!==l),i({type:"subtask",card:o.id,subtask:l.id,op:"remove"})},check(o,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:o.id,subtask:l.id,done:c})},keyCard(o,l){if(o.target!==o.currentTarget)return;if(o.key==="Enter")return o.preventDefault(),s.edit("title",l.id,l.title);if(!o.altKey||s.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}[o.key];if(!u)return;if(o.preventDefault(),o.key==="ArrowUp"||o.key==="ArrowDown"){let m=s.visible(c.column),g=m[m.indexOf(c.card)+u];if(g&&!g.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(g));return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.cards.length))},keySubtask(o,l,c){s.keyText(o,"subtask",c.id,c.title);let d=o.key==="ArrowUp"?-1:o.key==="ArrowDown"?1:0;if(!o.altKey||!d||s.readonly)return;o.preventDefault(),o.stopPropagation(),n.#A(l,c.id,S(l).indexOf(c)+d)},keyColumn(o,l){if(!o.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=o.key==="ArrowLeft"?c?1:-1:o.key==="ArrowRight"?c?-1:1:0;if(!d)return;o.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#E(e,t,r){let n=this.#t,i=()=>n.editing?.field==="description"&&w(n.editing.id,e)?n.editing:null,a=`![Uploading image ${this.#v}-${++this.#y}…]()`,s="",o=i();if(o&&r){let{selectionStart:h,selectionEnd:v}=r;s=h&&r.value[h-1]!==`
|
|
243
267
|
`?`
|
|
244
|
-
${
|
|
245
|
-
${c}`:c:f;let x=u(f);return x?f.slice(0,x[0])+x[2]+f.slice(x[1]):f},g=i();if(g){let f=this.querySelector("textarea.b3-board-editor"),x=f?.value===g.draft&&u(f.value);if(f&&x){let[U,ie,Qe]=x,{selectionStart:ni,selectionEnd:ii,selectionDirection:si}=f,tr=(Oe)=>Oe>=ie?Oe+Qe.length-(ie-U):Oe>U?U+Qe.length:Oe;f.setRangeText(Qe,U,ie),f.setSelectionRange(tr(ni),tr(ii),si??void 0),g.draft=f.value}else if(p(g.draft)!==g.draft)g.draft=p(g.draft);else if(c)this.#h("Image not added");return}let m=this.#i(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),b=p(h).trim();if(!m||this.readonly||b===h.trim()){if(c)this.#h("Image not added");return}m.description=b,m.expanded=!0,this.#o({type:"edit",card:m.id,field:"description"})}#h(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((p)=>_(p.id,e))),o=n.columns.find((u)=>_(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>_(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,d=Math.max(0,Math.min(o.cards.length,r)),c=a.starred?Math.min(d,l):Math.max(d,l);if(o.cards.splice(c,0,a),i===o&&s===c)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${c+1} of ${o.cards.length}`,this.#o({type:"move",card:a.id,from:i.id,to:o.id,index:c}),this.#g(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>_(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#o({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#m(e,t,r){let n=this.#e,i=T(e),o=i.findIndex((l)=>_(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#o({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#T(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),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?.visualViewport;if(!n)return;let i=new AbortController;n.addEventListener("resize",()=>{if(i.abort(),this.ownerDocument.activeElement===e)r()},{signal:i.signal}),setTimeout(()=>i.abort(),1000)}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#r?.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.#r?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#g(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#x(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})})}#O(){this.#s?.abort(),this.#s=new AbortController;let e=this.#s.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#I(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#L(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#D(i),{signal:e}),t.addEventListener("pointercancel",(i)=>{if(i.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(i)=>{if(i.key==="Escape"&&this.#t?.started)i.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(i)=>{if(this.#t?.started)i.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(i)=>{if(this.#t)i.preventDefault()},{signal:e}),this.addEventListener("click",(i)=>{if(!this.#c)return;this.#c=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#M(i);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(i)=>{if(i.button===1)r(i)},{signal:e,capture:!0});let n=()=>this.#v();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#v(){this.#p=!1;for(let e of this.#b.splice(0))e()}#M(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>_(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>_(l.id,r("[data-card]")?.dataset.card)),o=i&&T(i).find((l)=>_(l.id,r("[data-subtask]")?.dataset.subtask)),s={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(o)s.subtask=o.id;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#I(e){if(this.readonly||this.#t||!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-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#y(e.clientX,e.clientY)},Xo)}#y(e,t){let r=this.#t;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 s of[i,...i.querySelectorAll("[id]")])s.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.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#t!==r)return;this.#P(r.px,r.py),this.#N(this.#_(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#L(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#n();return}if(r<5)return;this.#y(e.clientX,e.clientY)}e.preventDefault(),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}#D(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#_(e.clientX,e.clientY);if(this.#n(),this.#c=!0,setTimeout(()=>{this.#c=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>_(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((d)=>_(d.id,t.id))),s=r.before?i.cards.findIndex((l)=>_(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>_(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#i(t.card);if(!i)return;let o=T(i),s=r.before?o.findIndex((a)=>_(a.id,r.before)):o.length;if(o.findIndex((a)=>_(a.id,t.id))<s)s-=1;this.#m(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>_(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>_(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#_(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#w(e,n);if(!l)return null;let d=l.querySelector(".b3-board-cards"),c=[...d.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=c.find((g)=>{let m=g.getBoundingClientRect();return t<m.top+m.height/2}),p=(g)=>!!(g!=null&&this.#i(g)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=c.find((g)=>!p(g.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:d}}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 p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let d=l.getBoundingClientRect();return s?e>d.left+d.width/2:e<d.left+d.width/2})?.dataset.column??null,list:i}}#N(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#w(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})}#P(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#t?.kind==="card"?this.#w(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#n(){let e=this.#t;if(!e)return;this.#t=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}ir("b3-board",ri);export{ri as B3Board};
|
|
268
|
+
${a}`:a,o.draft=r.value=r.value.slice(0,h)+s+r.value.slice(v),r.setSelectionRange(h+s.length,h+s.length)}let l=n.columns.find((h)=>h.cards.some((v)=>w(v.id,e))),c=null;try{c=await this.#g?.(t,{card:e,column:l?.id})}catch(h){console.warn("b3-board: image upload failed",h)}let d=c?`.replace(/[\s()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#k("Image not added");while(this.#p)await new Promise((h)=>this.#w.push(h));let u=(h)=>{if(!s)return null;let v=h.indexOf(s),z=v>=0?v:h.indexOf(a);if(z<0)return null;let ie=v>=0?s:a;return[z,z+ie.length,d?ie.replace(a,d):""]},f=(h)=>{if(!s)return d?h.trim()?`${h.replace(/\s+$/,"")}
|
|
269
|
+
${d}`:d:h;let v=u(h);return v?h.slice(0,v[0])+v[2]+h.slice(v[1]):h},m=i();if(m){let h=this.querySelector("textarea.b3-board-editor"),v=h?.value===m.draft&&u(h.value);if(h&&v){let[z,ie,nt]=v,{selectionStart:ai,selectionEnd:li,selectionDirection:ci}=h,or=(Me)=>Me>=ie?Me+nt.length-(ie-z):Me>z?z+nt.length:Me;h.setRangeText(nt,z,ie),h.setSelectionRange(or(ai),or(li),ci??void 0),m.draft=h.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(d)this.#k("Image not added");return}let g=this.#l(e);if(s&&!String(g?.description??"").includes(a))g=n.columns.flatMap((h)=>h.cards).find((h)=>String(h.description??"").includes(a))??g;let p=String(g?.description??""),b=f(p).trim();if(!g||this.readonly||b===p.trim()){if(d)this.#k("Image not added");return}g.description=b,g.expanded=!0,this.#c({type:"edit",card:g.id,field:"description"})}#k(e){let t=this.#t;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#t;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>w(f.id,e))),a=n.columns.find((u)=>w(u.id,t));if(!i||!a)return!1;let s=i.cards.findIndex((u)=>w(u.id,e)),[o]=i.cards.splice(s,1),l=a.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(a.cards.length,r)),d=o.starred?Math.min(c,l):Math.max(c,l);if(a.cards.splice(d,0,o),i===a&&s===d)return!1;return n.announcement=`${o.title??""} moved to ${a.name??""}, position ${d+1} of ${a.cards.length}`,this.#c({type:"move",card:o.id,from:i.id,to:a.id,index:d}),this.#f(o.id),!0}moveColumn(e,t){let r=this.#t;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>w(s.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.#c({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#A(e,t,r){let n=this.#t,i=S(e),a=i.findIndex((l)=>w(l.id,t));if(!n||this.readonly||a<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(a===s)return!1;let[o]=i.splice(a,1);return i.splice(s,0,o),n.announcement=`${o.title??""} moved to position ${s+1} of ${i.length}`,this.#c({type:"subtask",card:e.id,subtask:o.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(o.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),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}),s=a(),o=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=a(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",o,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#d(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#e?.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.#e?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#f(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#u(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})})}#C(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#M(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#N(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#P(i),{signal:e}),t.addEventListener("pointercancel",(i)=>{if(i.pointerId===this.#r?.pointerId)this.#b()},{signal:e}),t.addEventListener("keydown",(i)=>{if(i.key==="Escape"&&this.#r?.started)i.preventDefault(),this.#b()},{signal:e}),this.addEventListener("touchmove",(i)=>{if(this.#r?.started)i.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(i)=>{if(this.#r)i.preventDefault()},{signal:e}),this.addEventListener("click",(i)=>{if(!this.#m)return;this.#m=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#T(i);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(i)=>{if(i.button===1)r(i)},{signal:e,capture:!0});let n=()=>this.#x();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#x(){this.#p=!1;for(let e of this.#w.splice(0))e()}#T(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.#t?.columns.find((c)=>w(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>w(c.id,r("[data-card]")?.dataset.card)),a=i&&S(i).find((c)=>w(c.id,r("[data-subtask]")?.dataset.subtask)),s={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)s.subtask=a.id;let o=t.querySelector("img");if(o&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#O(t,o,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#O(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),tr();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 s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(a,s);let o=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 o?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.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})}#M(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#t?.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-card"),a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??a;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:a.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#I(e.clientX,e.clientY)},oa)}#I(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 s of[i,...i.querySelectorAll("[id]")])s.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.#e.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let a=()=>{if(this.#r!==r)return;this.#R(r.px,r.py),this.#B(this.#L(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#N(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#b();return}if(r<5)return;this.#I(e.clientX,e.clientY)}e.preventDefault(),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}#P(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#b();let r=this.#L(e.clientX,e.clientY);if(this.#b(),this.#m=!0,setTimeout(()=>{this.#m=!1},0),!r)return;let n=this.#t;if(t.kind==="card"){let i=n.columns.find((l)=>w(l.id,r.column)),a=n.columns.find((l)=>l.cards.some((c)=>w(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>w(l.id,r.before)):i.cards.length,o=a.cards.findIndex((l)=>w(l.id,t.id));if(a===i&&o<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#l(t.card);if(!i)return;let a=S(i),s=r.before?a.findIndex((o)=>w(o.id,r.before)):a.length;if(a.findIndex((o)=>w(o.id,t.id))<s)s-=1;this.#A(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>w(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>w(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#L(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.#D(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((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#l(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((m)=>!f(m.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])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:a.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#B(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")}#D(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})}#R(e,t){let r=(s,o,l)=>s<o+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#D(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let a=this.ownerDocument.defaultView;a.scrollBy(0,r(t,0,a.innerHeight))}#b(){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.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}lr("b3-board",oi);export{oi as B3Board};
|
package/dist/manifest.json
CHANGED
package/dist/references/board.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Board component
|
|
2
2
|
|
|
3
3
|
`<b3-board>` is an opt-in component for a kanban-style board: columns of cards that the person can
|
|
4
|
-
drag to reorder, edit inline, star to the top, filter by tag and open for details. It renders from data you give it
|
|
4
|
+
drag to reorder, edit inline, star to the top, filter by tag or search and open for details. It renders from data you give it
|
|
5
5
|
and reports every change; the app owns loading and saving. It is not part of the core
|
|
6
6
|
`components` bundle; import it only on pages that show a board.
|
|
7
7
|
|
|
@@ -38,7 +38,7 @@ their column (each group keeps its order), so `columns` always lists a column's
|
|
|
38
38
|
they are shown. Everything else is kept exactly as given (a numeric id stays a number, a card without `subtasks`
|
|
39
39
|
gets none), so `b3-change` echoes untouched cards unchanged and a card can carry your own data
|
|
40
40
|
through edits. Reading `board.columns` returns a copy; assign a new array to change it. Setting it
|
|
41
|
-
while the person edits a card that no longer exists closes that editor. `columns` and `
|
|
41
|
+
while the person edits a card that no longer exists closes that editor. `columns`, `filter` and `search` can
|
|
42
42
|
be set before the element is connected or the module has loaded.
|
|
43
43
|
|
|
44
44
|
`action.type` is `move`, `reorder` (a column), `add`, `remove`, `edit` (`field`: title,
|
|
@@ -66,7 +66,9 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
66
66
|
description (not under `compact`); Enter on a new subtask opens the next one. Starting an edit commits
|
|
67
67
|
any other open one. A new editor is focused and scrolled into view (its whole card, in the column's
|
|
68
68
|
scroller and the columns row); on touch the keyboard opens within the tap, and editors use 16px text
|
|
69
|
-
so iOS does not zoom.
|
|
69
|
+
so iOS does not zoom. While an editor keeps focus, a viewport that gets shorter at the same zoom (the keyboard) brings it back into view — a pinch or a growing viewport leaves the scroll alone — a
|
|
70
|
+
framed page sees the keyboard late and in steps (the host re-lays out first, a native shell shrinks the
|
|
71
|
+
webview after the keyboard animation).
|
|
70
72
|
- **Filter**: `#tag` and `@mention` words in a card's text (plus its `tags`) become filter labels —
|
|
71
73
|
plain coloured words, not pills (mentions in their own colour). Choosing labels shows only cards
|
|
72
74
|
carrying all of them; counts show shown/total. `board.filter` reads and sets the active labels. A
|
|
@@ -74,6 +76,17 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
74
76
|
a filter active moves past the next visible card; hidden cards keep their places (and a visible
|
|
75
77
|
neighbour across the starred boundary stops the move). The card being
|
|
76
78
|
edited stays shown, so Add card works with chips chosen.
|
|
79
|
+
- **Search**: `board.search` (or the `search` attribute) shows only cards whose title, description,
|
|
80
|
+
subtasks or tags hold every word of it — case-insensitive, any order (`#web` matches the tag). It
|
|
81
|
+
combines with the chosen labels, and counts show shown/total. The board has no search box: the host
|
|
82
|
+
puts one where it fits (e.g. a toolbar input setting `board.search` on `input`, cleared on Escape).
|
|
83
|
+
A card added while filtered or searched stays shown, even if it does not match, until the filter or
|
|
84
|
+
search changes — a new card never vanishes as it is committed.
|
|
85
|
+
- **Add to the default column**: `board.addCard(column?)` starts a new card at the end of `column` (an
|
|
86
|
+
id, or a name matched case-insensitively), its title editor focused and in view — as the column's +
|
|
87
|
+
does; it is reported once named. With no argument it uses `default-column` (`board.defaultColumn`, an
|
|
88
|
+
id or name), else the first column. Returns false when readonly or the column does not exist. Wire it
|
|
89
|
+
to the host's own shortcut, e.g. `default-column="TODO"` and N.
|
|
77
90
|
- **Links**: `[text](target)` and bare `http(s)://` URLs in a title, description or subtask render as
|
|
78
91
|
links, built as DOM nodes (never as HTML). Only http, https, mailto and paths link; any other
|
|
79
92
|
scheme (`javascript:`, `data:`…), and any target with a control character, whitespace or a backslash,
|
|
@@ -86,7 +99,9 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
86
99
|
text shows its raw source.
|
|
87
100
|
- **Images**: `` renders the image (at most 10rem tall), with the same target rules as a
|
|
88
101
|
link (http/https or a path; a path resolves like any relative URL on the page, so a host can serve a
|
|
89
|
-
file's images beside it).
|
|
102
|
+
file's images beside it). Clicking an image previews it full screen in a modal dialog (`<b3-image-viewer open>`, bundled
|
|
103
|
+
with the board: pinch/double-tap zoom; Esc, × or a click beside the image closes); the preview's **Open**
|
|
104
|
+
fires the image's `b3-link`, as ⌘/middle click on the image does directly.
|
|
90
105
|
A closed card whose description is only images previews as "Image".
|
|
91
106
|
- **Paste an image**: set `board.upload = async (file, { card, column }) => target` and an image pasted
|
|
92
107
|
into a card's description editor is stored by the host and written at the caret as ``, starting a new
|
|
@@ -105,6 +120,7 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
105
120
|
|
|
106
121
|
## Attributes and styling
|
|
107
122
|
|
|
123
|
+
- `search`, `default-column`: see Search and Add above.
|
|
108
124
|
- `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
|
|
109
125
|
only hidden; a starred card still shows its star. `compact`: hides card details and the chevron, narrows columns (two side by side on a phone) and shrinks card tools to the chip size; on touch it also hides the delete buttons and unstarred stars so column names and titles keep the width (they are back out of compact). `aria-label` names the board region.
|
|
110
126
|
- **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
|