@livx.cc/bare-v3 0.1.0-alpha.144 → 0.1.0-alpha.146

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/README.md CHANGED
@@ -19,7 +19,7 @@ Install the published alpha with `bun add @livx.cc/bare-v3@alpha`; use `bun pm p
19
19
 
20
20
  Live batches are explicit: save `bun lab plan config.json` output, then run `bun lab execute saved-plan.json artifacts/batches/name/runs --live --max-new-jobs 4` with `CURSOR_API_KEY` available in the environment (and the configured `CURSOR_REAL_NODE` where required). This can incur provider charges. The job cap limits new generations in that invocation, not dollars; provider cost is currently unavailable. Obtain the resource budget before execution. Resume with the exact saved plan, artifact directory and unchanged built source. Before starting, the CLI checks installed AgentX/AI package versions against the pinned versions and boots Node through the isolation launcher without a model request. Install the frozen lock and use a self-contained `CURSOR_REAL_NODE` if Homebrew dynamic libraries are blocked. Generation failure, timeout, cancellation or a request for input stops the batch for investigation. Terminal attempts are retained, including failures; they are not retried automatically. A remaining `.batch.lock` or nonterminal attempt requires checking the recorded process and child handles before any manual recovery. Completion of attempts is never quality qualification. Review that batch with `bun lab compare artifacts/batches/name`; replay one run with `bun lab replay <run-id> artifacts/batches/name/runs`. These explicit paths keep unrelated pilots out of the batch review.
21
21
 
22
- `bun lab plan config.json` creates a seeded, capped development job plan. `bun lab prepare run.json` prepares one isolated workspace and manifest without invoking a model. The [visual playground](http://127.0.0.1:4313/fixtures/playground.html) demonstrates the current component contracts and shows the bare-v2 coverage audit. Composed apps include Signal (system performance), Elsewhere (local discovery/booking), Daylight (iOS/Android web studies), Relay, Gather setup and sign-in, Counter, Margin, Still, Fieldnotes, Interval, and the Forma project workspace. New components are an implemented subset, not full bare-v2 parity or a qualified release. Two public layers ship: `/css` (CSS only) and `/components` — light-DOM custom elements (`<b3-tabs>`, `<b3-reel>`, `<b3-dropdown>`, `<b3-dialog>`, `<b3-sheet>`, `<b3-command>`, `<b3-toast-region>`, `<b3-toc>`) that enhance native markup, plus the document-wide `data-b3-confirm` guard and the `motion`/`layout`/`sequence`/`settle` helpers. Loading the entry (ESM, or re-bundled as a classic script) registers everything; there is no setup call or cleanup, and loading twice is a no-op. Heavier components are opt-in subpaths: `/components/board` (`<b3-board>`), `/components/date-picker` and `/components/image-viewer`. They are separate files rather than one bundle because of weight: the core is ~20 KB minified (~7 KB gzip), the board alone ~117 KB (~36 KB gzip, it bundles a reactive template runtime privately — one that needs no `'unsafe-eval'` under a Content-Security-Policy and loads only when a board first renders), so a single bundle would multiply every page's always-loaded cost by ~5x for a component most pages never show. `/markdown-stream` is a plain module (`MarkdownStream`, a class, not a tag) for streaming LLM markdown into bare-v3 components. Every entry ships `.d.ts` typings. Read `recipes/board.md`, `recipes/image-viewer.md`, `recipes/date-picker.md` or `recipes/markdown-stream.md` for markup and lifecycle; `fixtures/elements/markdown-stream.html` demos the stream; `bun run chat` serves it as a live chat against a real model (needs `OPENROUTER_API_KEY` or `OPENAI_API_KEY`; offline it replays canned replies). The plain/React/Vue demos in `fixtures/elements/` exercise the image viewer; run `bun scripts/verify-image-viewer.ts` through the authorized AgentX browser workflow to verify measured transforms. `bun scripts/verify-components.ts`, `verify-reel.ts` and `verify-confirm.ts` drive headless Chrome against `fixtures/checks/` and re-run every check against a control build without the code.
22
+ `bun lab plan config.json` creates a seeded, capped development job plan. `bun lab prepare run.json` prepares one isolated workspace and manifest without invoking a model. The [visual playground](http://127.0.0.1:4313/fixtures/playground.html) demonstrates the current component contracts and shows the bare-v2 coverage audit. Composed apps include Signal (system performance), Elsewhere (local discovery/booking), Daylight (iOS/Android web studies), Relay, Gather setup and sign-in, Counter, Margin, Still, Fieldnotes, Interval, and the Forma project workspace. New components are an implemented subset, not full bare-v2 parity or a qualified release. Two public layers ship: `/css` (CSS only) and `/components` — light-DOM custom elements (`<b3-tabs>`, `<b3-reel>`, `<b3-dropdown>`, `<b3-dialog>`, `<b3-sheet>`, `<b3-command>`, `<b3-toast-region>`, `<b3-toc>`) that enhance native markup, plus the document-wide `data-b3-confirm` guard and the `motion`/`layout`/`sequence`/`settle` helpers. Loading the entry (ESM, or re-bundled as a classic script) registers everything; there is no setup call or cleanup, and loading twice is a no-op. Heavier components are opt-in subpaths: `/components/board` (`<b3-board>`), `/components/date-picker`, `/components/image-viewer` and `/components/audio-player`. They are separate files rather than one bundle because of weight: the core is ~20 KB minified (~7 KB gzip), the board alone ~117 KB (~36 KB gzip, it bundles a reactive template runtime privately — one that needs no `'unsafe-eval'` under a Content-Security-Policy and loads only when a board first renders), so a single bundle would multiply every page's always-loaded cost by ~5x for a component most pages never show. `/markdown-stream` is a plain module (`MarkdownStream`, a class, not a tag) for streaming LLM markdown into bare-v3 components. Every entry ships `.d.ts` typings. Read `recipes/board.md`, `recipes/image-viewer.md`, `recipes/date-picker.md`, `recipes/audio-player.md` or `recipes/markdown-stream.md` for markup and lifecycle; `fixtures/elements/markdown-stream.html` demos the stream; `bun run chat` serves it as a live chat against a real model (needs `OPENROUTER_API_KEY` or `OPENAI_API_KEY`; offline it replays canned replies). The plain/React/Vue demos in `fixtures/elements/` exercise the image viewer; run `bun scripts/verify-image-viewer.ts` through the authorized AgentX browser workflow to verify measured transforms. `bun scripts/verify-components.ts`, `verify-reel.ts` and `verify-confirm.ts` drive headless Chrome against `fixtures/checks/` and re-run every check against a control build without the code.
23
23
 
24
24
  Playground previews accept shareable app/width links, for example [Signal at 390px](http://127.0.0.1:4313/fixtures/playground.html?demo=metrics&width=390#demos). The controls keep these query parameters in sync; unknown values fall back to the authored defaults. This is an iframe layout preview, not mobile-device qualification.
25
25
 
@@ -0,0 +1,18 @@
1
+ /**
2
+ * <b3-audio-player> — transport controls around an authored <audio>.
3
+ *
4
+ * Light DOM, opt-in entry (`@livx.cc/bare-v3/components/audio-player`). Without the module the
5
+ * child is a native `<audio controls>`; with it the native controls are hidden and replaced by
6
+ * play/pause, a seek bar, current / total time, skip back/forward and a speed cycle — the parts a
7
+ * WebView's native player shrinks away on a phone. The <audio> stays the source of truth: set its
8
+ * `src`, `currentTime` or call `play()` from your code and the controls follow.
9
+ */
10
+ import { B3Element } from './base';
11
+ /** Seconds as m:ss, or h:mm:ss past an hour. Not-yet-known (NaN/Infinity) reads as --:--. */
12
+ export declare function clock(seconds: number): string;
13
+ export declare class B3AudioPlayer extends B3Element<HTMLAudioElement> {
14
+ /** Seconds the skip buttons move (attribute `skip`, default 15). */
15
+ get skip(): number;
16
+ protected target(): HTMLAudioElement | null;
17
+ protected mount(audio: HTMLAudioElement, signal: AbortSignal): void;
18
+ }
@@ -0,0 +1,14 @@
1
+ var E=typeof HTMLElement==="function"?HTMLElement:class{};function g(e,n){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,n)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}class m extends E{#e=null;#n=null;#t=null;target(){return this}connectedCallback(){let e=this.ownerDocument;if(e.readyState==="loading"){e.addEventListener("DOMContentLoaded",()=>{if(this.isConnected)this.#r()},{once:!0});return}this.#r()}disconnectedCallback(){this.#a(),this.#t?.disconnect(),this.#t=null}#r(){if(this.#e)return;let e=this.target();if(e!==this&&!this.#t)this.#t=new MutationObserver(()=>{if(this.target()!==this.#n)this.#a(),this.#r()}),this.#t.observe(this,{childList:!0});if(!e)return;this.#e=new AbortController,this.#n=e,this.mount(e,this.#e.signal)}#a(){this.#e?.abort(),this.#e=null,this.#n=null}}var T=Symbol.for("bare-v3.styles");function v(e,n,r){if(!e?.head||e.getElementById(n))return;let s=e[T]??=new Set;if(s.has(n))return;let a=e.defaultView;if(a&&"adoptedStyleSheets"in e&&"replaceSync"in a.CSSStyleSheet.prototype){let i=new a.CSSStyleSheet;i.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,i],s.add(n);return}let o=e.createElement("style");o.id=n,o.textContent=r,e.head.append(o)}function p(e){if(!Number.isFinite(e)||e<0)return"--:--";let n=Math.floor(e),r=Math.floor(n/3600),s=Math.floor(n/60)%60,a=(o)=>String(o).padStart(2,"0");return r?`${r}:${a(s)}:${a(n%60)}`:`${s}:${a(n%60)}`}var w="b3-audio-player-style",M=`
2
+ b3-audio-player{container-type:inline-size;display:flex;align-items:center;gap:.25rem;min-inline-size:0;font-variant-numeric:tabular-nums;}
3
+ b3-audio-player > audio{display:none;}
4
+ b3-audio-player:not(:defined) > audio{display:block;inline-size:100%;}
5
+ b3-audio-player button{flex:none;display:inline-flex;align-items:center;justify-content:center;
6
+ min-inline-size:var(--b3-touch,44px);min-block-size:var(--b3-touch,44px);padding:0;border:0;border-radius:var(--b3-radius-small,.375rem);
7
+ background:none;color:inherit;font:inherit;font-size:.8125em;cursor:pointer;}
8
+ b3-audio-player button:hover{background:var(--b3-color-canvas,#f6f5f0);}
9
+ b3-audio-player button:focus-visible,b3-audio-player input:focus-visible{outline:2px solid var(--b3-color-focus,#276bdd);outline-offset:1px;}
10
+ b3-audio-player svg{inline-size:1.25rem;block-size:1.25rem;fill:currentColor;}
11
+ b3-audio-player [data-b3-part="time"]{flex:none;font-size:.8125em;color:var(--b3-color-muted,#5d6b60);white-space:nowrap;}
12
+ b3-audio-player input[type=range]{flex:1;min-inline-size:3rem;margin:0;accent-color:var(--b3-color-accent,#276bdd);cursor:pointer;}
13
+ @container (max-width:22rem){[data-b3-part="rate"],[data-b3-part="back"],[data-b3-part="fwd"]{display:none;}}
14
+ `,f={play:'<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8 5v14l11-7z"/></svg>',pause:'<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 5h4v14H7zm6 0h4v14h-4z"/></svg>'},h=[1,1.25,1.5,2,0.75];class S extends m{get skip(){return Number(this.getAttribute("skip"))||15}target(){return this.querySelector(":scope > audio")}mount(e,n){v(this.ownerDocument,w,M);for(let t of this.querySelectorAll(":scope > [data-b3-part]"))t.remove();let r=this.skip,s=`<button type="button" data-b3-part="back" aria-label="Back ${r} seconds">−${r}</button><button type="button" data-b3-part="play" aria-label="Play">${f.play}</button><button type="button" data-b3-part="fwd" aria-label="Forward ${r} seconds">+${r}</button><input type="range" data-b3-part="seek" min="0" max="0" step="0.1" value="0" aria-label="Seek"><span data-b3-part="time"></span>`+'<button type="button" data-b3-part="rate" aria-label="Playback speed">1×</button>';e.insertAdjacentHTML("afterend",s);let a=(t)=>this.querySelector(`:scope > [data-b3-part="${t}"]`),o=a("play"),i=a("seek"),k=a("time"),y=a("rate"),u=!1,d=()=>{let{duration:t,currentTime:c}=e;if(Number.isFinite(t))i.max=String(t);if(!u)i.value=String(c);i.setAttribute("aria-valuetext",`${p(c)} of ${p(t)}`),k.textContent=`${p(u?Number(i.value):c)} / ${p(t)}`,o.innerHTML=e.paused?f.play:f.pause,o.setAttribute("aria-label",e.paused?"Play":"Pause"),y.textContent=`${e.playbackRate}×`},l=(t,c,x)=>t.addEventListener(c,x,{signal:n});for(let t of["timeupdate","durationchange","loadedmetadata","play","pause","ended","ratechange","emptied","seeked"])l(e,t,d);let b=(t)=>{e.currentTime=Math.max(0,Math.min(t,Number.isFinite(e.duration)?e.duration:t))};l(o,"click",()=>{if(e.paused)e.play().catch((t)=>this.dispatchEvent(new CustomEvent("b3-error",{detail:t,bubbles:!0})));else e.pause()}),l(a("back"),"click",()=>b(e.currentTime-r)),l(a("fwd"),"click",()=>b(e.currentTime+r)),l(y,"click",()=>{e.playbackRate=h[(h.indexOf(e.playbackRate)+1)%h.length]}),l(i,"input",()=>{u=!0,d()}),l(i,"change",()=>{u=!1,b(Number(i.value))}),n.addEventListener("abort",()=>{for(let t of this.querySelectorAll(":scope > [data-b3-part]"))t.remove()},{once:!0}),d()}}g("b3-audio-player",S);export{S as B3AudioPlayer,p as clock};
@@ -67,8 +67,9 @@ export type BoardAction = {
67
67
  type: 'edit';
68
68
  card?: BoardId;
69
69
  column?: BoardId;
70
- field: 'title' | 'description' | 'name' | 'subtask';
70
+ field: 'title' | 'description' | 'name' | 'subtask' | 'comment';
71
71
  subtask?: BoardId;
72
+ comment?: BoardId;
72
73
  } | {
73
74
  type: 'toggle';
74
75
  card: BoardId;
@@ -118,9 +119,9 @@ export type BoardLinkDetail = {
118
119
  subtask?: BoardId;
119
120
  };
120
121
  /**
121
- * `board.upload`: stores an image pasted into a card's title or description editor and returns the target to
122
+ * `board.upload`: stores an image pasted into a card's title, description or comment editor and returns the target to
122
123
  * reference it by (a URL, or a path the page resolves); nothing (or a throw) drops it. The board writes it into the
123
- * description as `![](target)` and reports an `edit` of `description`.
124
+ * description (or the comment) as `![](target)` and reports an `edit` of that field.
124
125
  */
125
126
  export type BoardUpload = (file: File, detail: {
126
127
  card: BoardId;
@@ -1,10 +1,10 @@
1
- var{defineProperty:lt,getOwnPropertyNames:yi,getOwnPropertyDescriptor:xi}=Object,vi=Object.prototype.hasOwnProperty;function wi(e){return this[e]}var _i=(e)=>{var t=(hr??=new WeakMap).get(e),r;if(t)return t;if(t=lt({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of yi(e))if(!vi.call(t,n))lt(t,n,{get:wi.bind(e,n),enumerable:!(r=xi(e,n))||r.enumerable})}return hr.set(e,t),t},hr;var Ei=(e)=>e;function ki(e,t){this[e]=Ei.bind(null,t)}var Si=(e,t)=>{for(var r in t)lt(e,r,{get:t[r],enumerable:!0,configurable:!0,set:ki.bind(t,r)})};var Ai=(e,t)=>()=>(e&&(t=e(e=0)),t);var Gn={};Si(Gn,{Alpine:()=>Jn,default:()=>sa});function Ti(e){Li(e)}function Oi(){$t=!0}function Mi(){$t=!1,Or()}function Li(e){if(!R.includes(e)){if(R.push(e),e._x_schedulerPriority!==void 0)Ue=!0}Or()}function Rt(e){let t=R.indexOf(e);if(t!==-1&&t>xt)R.splice(t,1)}function Or(){if(!yt&&!gt){if($t)return;gt=!0,queueMicrotask(Ii)}}function Ii(){gt=!1,yt=!0;for(let e=0;e<R.length;e++){if(Ue)Di(e);R[e](),xt=e}R.length=0,xt=-1,Ue=!1,yt=!1}function Di(e){let t=new Map,r=R.slice(e).sort((n,i)=>Ni(n,i,t));for(let n=0;n<r.length;n++)R[e+n]=r[n];Ue=!1}function Ni(e,t,r){if(!ct(e))return ct(t)?1:0;if(!ct(t))return-1;return mr(e._x_schedulerPriority.el,r)-mr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function ct(e){return e._x_schedulerPriority!==void 0}function mr(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 Pi(e){vt=!1,e(),vt=!0}function $i(e){ce=e.reactive,de=e.release,ne=(t)=>e.effect(t,{scheduler:(r)=>{if(vt)Ti(r);else r()}}),Mr=e.raw}function gr(e){ne=e}function Ri(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Bi++:void 0,s=ne(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),de(s)},s},()=>{t()}]}function Lr(e,t){let r=!0,n,i,o=ne(()=>{let s=e(),a=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=a,r=!1});return()=>{Rt(o),de(o)}}async function Hi(e){Oi();try{await e(),await Promise.resolve()}finally{Mi()}}function zi(e){Nr.push(e)}function Ht(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Dr.push(t)}function Br(e){Ir.push(e)}function Pr(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 $r(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 Ui(e){e._x_effects?.forEach(Rt);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Ut(){Ye.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),zt=!0}function Rr(){qi(),Ye.disconnect(),zt=!1}function qi(){let e=Ye.takeRecords();K.push(()=>e.length>0&&Je(e));let t=K.length;queueMicrotask(()=>{if(K.length===t)while(K.length>0)K.shift()()})}function ji(){while(K.length>0)K.shift()();let e=Ye.takeRecords();if(e.length>0)Je(e)}function _(e){if(!zt)return e();Rr();try{return e()}finally{Ut()}}function Fi(){qt=!0}function Ki(){qt=!1,Je(qe),qe=[]}function Je(e){if(qt){qe=qe.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].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[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)c();else if(s.hasAttribute(a))d(),c();else d()}}i.forEach((o,s)=>{$r(s,o)}),n.forEach((o,s)=>{Ir.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Dr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Nr.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Hr(e){return X(le(e))}function Te(e,t,r){return e._x_dataStack=[t,...le(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function le(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return le(e.host);if(!e.parentNode)return[];return le(e.parentNode)}function X(e){return new Proxy({objects:e},Vi)}function zr(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return zr(Object.getPrototypeOf(e),t)}function Wi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function jt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let c=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,c,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,c)})};return n(e)}function Ur(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Yi(n,i),(a)=>wt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let c=n.initialize(o,s,a,l);return r.initialValue=c,i(o,s,a,l)}}else r.initialValue=n;return r}}function Yi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function wt(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 wt(e[t[0]],t.slice(1),r);else return e[t[0]]={},wt(e[t[0]],t.slice(1),r)}function L(e,t){qr[e]=t}function je(e,t){let r=Ji(t);return Object.entries(qr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Ji(e){let[t,r]=Jr(e),n={interceptor:Ur,...t};return Ht(e,r),n}function Gi(e,t,r,...n){try{return r(...n)}catch(i){Ge(i,e,t)}}function Ge(...e){return jr(...e)}function Xi(e){jr=e}function Zi(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}
1
+ var{defineProperty:ct,getOwnPropertyNames:xi,getOwnPropertyDescriptor:vi}=Object,wi=Object.prototype.hasOwnProperty;function _i(e){return this[e]}var Ei=(e)=>{var t=(br??=new WeakMap).get(e),r;if(t)return t;if(t=ct({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of xi(e))if(!wi.call(t,n))ct(t,n,{get:_i.bind(e,n),enumerable:!(r=vi(e,n))||r.enumerable})}return br.set(e,t),t},br;var ki=(e)=>e;function Si(e,t){this[e]=ki.bind(null,t)}var Ai=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0,configurable:!0,set:Si.bind(t,r)})};var Ci=(e,t)=>()=>(e&&(t=e(e=0)),t);var Xn={};Ai(Xn,{Alpine:()=>Gn,default:()=>oa});function Oi(e){Ii(e)}function Mi(){Rt=!0}function Li(){Rt=!1,Mr()}function Ii(e){if(!z.includes(e)){if(z.push(e),e._x_schedulerPriority!==void 0)qe=!0}Mr()}function Ht(e){let t=z.indexOf(e);if(t!==-1&&t>vt)z.splice(t,1)}function Mr(){if(!xt&&!yt){if(Rt)return;yt=!0,queueMicrotask(Di)}}function Di(){yt=!1,xt=!0;for(let e=0;e<z.length;e++){if(qe)Ni(e);z[e](),vt=e}z.length=0,vt=-1,qe=!1,xt=!1}function Ni(e){let t=new Map,r=z.slice(e).sort((n,i)=>Bi(n,i,t));for(let n=0;n<r.length;n++)z[e+n]=r[n];qe=!1}function Bi(e,t,r){if(!dt(e))return dt(t)?1:0;if(!dt(t))return-1;return gr(e._x_schedulerPriority.el,r)-gr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function dt(e){return e._x_schedulerPriority!==void 0}function gr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function $i(e){wt=!1,e(),wt=!0}function Ri(e){ue=e.reactive,fe=e.release,oe=(t)=>e.effect(t,{scheduler:(r)=>{if(wt)Oi(r);else r()}}),Lr=e.raw}function yr(e){oe=e}function Hi(e){let t=()=>{};return[(n,i)=>{let a=i?.priority==="structural"?Pi++:void 0,s=oe(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),fe(s)},s},()=>{t()}]}function Ir(e,t){let r=!0,n,i,a=oe(()=>{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()=>{Ht(a),fe(a)}}async function zi(e){Mi();try{await e(),await Promise.resolve()}finally{Li()}}function Ui(e){Br.push(e)}function zt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Nr.push(t)}function Pr(e){Dr.push(e)}function $r(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Rr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function qi(e){e._x_effects?.forEach(Ht);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function qt(){Je.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Ut=!0}function Hr(){ji(),Je.disconnect(),Ut=!1}function ji(){let e=Je.takeRecords();Y.push(()=>e.length>0&&Ge(e));let t=Y.length;queueMicrotask(()=>{if(Y.length===t)while(Y.length>0)Y.shift()()})}function Fi(){while(Y.length>0)Y.shift()();let e=Je.takeRecords();if(e.length>0)Ge(e)}function _(e){if(!Ut)return e();Hr();try{return e()}finally{qt()}}function Ki(){jt=!0}function Vi(){jt=!1,Ge(je),je=[]}function Ge(e){if(jt){je=je.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let a=0;a<e.length;a++){if(e[a].target._x_ignoreMutationObserver)continue;if(e[a].type==="childList")e[a].removedNodes.forEach((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)=>{Rr(s,a)}),n.forEach((a,s)=>{Dr.forEach((o)=>o(s,a))});for(let a of r){if(t.some((s)=>s.contains(a)))continue;Nr.forEach((s)=>s(a))}for(let a of t){if(!a.isConnected)continue;Br.forEach((s)=>s(a))}t=null,r=null,n=null,i=null}function zr(e){return ee(de(e))}function Oe(e,t,r){return e._x_dataStack=[t,...de(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function de(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return de(e.host);if(!e.parentNode)return[];return de(e.parentNode)}function ee(e){return new Proxy({objects:e},Wi)}function Ur(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ur(Object.getPrototypeOf(e),t)}function Yi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Ft(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 qr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,a,s){return e(this.initialValue,()=>Ji(n,i),(o)=>_t(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 Ji(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function _t(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 _t(e[t[0]],t.slice(1),r);else return e[t[0]]={},_t(e[t[0]],t.slice(1),r)}function D(e,t){jr[e]=t}function Fe(e,t){let r=Gi(t);return Object.entries(jr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Gi(e){let[t,r]=Gr(e),n={interceptor:qr,...t};return zt(e,r),n}function Xi(e,t,r,...n){try{return r(...n)}catch(i){Xe(i,e,t)}}function Xe(...e){return Fr(...e)}function Zi(e){Fr=e}function Qi(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
2
2
 
3
3
  ${r?'Expression: "'+r+`"
4
4
 
5
- `:""}`,t),setTimeout(()=>{throw e},0)}function Fr(e){let t=Y;Y=!1;let r=e();return Y=t,r}function J(e,t,r={}){let n;return C(e,t)((i)=>n=i,r),n}function C(...e){return Kr(...e)}function Qi(e){Kr=e}function es(e){Vr=e}function ts(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!Y){_t(r,t,X([n,...e]),i);return}let s=t.apply(X([n,...e]),i);_t(r,s)}}function _t(e,t,r,n,i){if(Y&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>_t(e,s,r,n)).catch((s)=>Ge(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function rs(...e){return Vr(...e)}function ue(e=""){return Ft+e}function ns(e){Ft=e}function E(e,t){return Fe[e]=t,{before(r){if(!Fe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=W.indexOf(r);W.splice(n>=0?n:W.indexOf("DEFAULT"),0,e)}}}function is(e){return Object.keys(Fe).includes(e)}function Xe(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=Wr(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(Zr((o,s)=>n[o]=s)).filter(en).map(as(n,r)).sort(ls).map((o)=>os(e,o))}function Wr(e){return Array.from(e).map(Zr()).filter((t)=>!en(t))}function ss(e){Et=!0;let t=Symbol();Yr=t,ge.set(t,[]);let r=()=>{while(ge.get(t).length)ge.get(t).shift()();ge.delete(t)},n=()=>{Et=!1,r()};e(r),n()}function Jr(e){let t=[],r=(a)=>t.push(a),[n,i]=Ri(e);return t.push(i),[{Alpine:fe,effect:n,cleanup:r,evaluateLater:C.bind(C,e),evaluate:J.bind(J,e)},()=>t.forEach((a)=>a())]}function os(e,t){let r=()=>{},n=Fe[t.type]||r,[i,o]=Jr(e);Pr(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),Et?ge.get(Yr).push(n):n()};return s.runCleanups=o,s}function Zr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Qr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Kt(e){Qr.push(e)}function en({name:e}){return tn().test(e)}function as(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(tn()),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 ls(e,t){let r=W.indexOf(e.type)===-1?kt:e.type,n=W.indexOf(t.type)===-1?kt:t.type;return W.indexOf(r)-W.indexOf(n)}function Z(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>Z(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)Z(n,t,!1),n=n.nextElementSibling}function H(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function cs(e){return(...t)=>j&&e(...t)}function Oe(e){rn.push(e)}function ds(e,t){rn.forEach((r)=>r(e,t)),j=!0,nn(()=>{N(t,(r,n)=>{n(r,()=>{})})}),j=!1}function us(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,St=!0,nn(()=>{fs(t)}),j=!1,St=!1}function fs(e){let t=!1;N(e,(n,i)=>{Z(n,(o,s)=>{if(t&&ys(o))return s();t=!0,i(o,s)})})}function nn(e){let t=ne;gr((r,n)=>{let i=t(r);return de(i),()=>{}}),e(),gr(t)}function hs(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;Ze++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ge(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>bs(e,r))}function bs(e,t){if(t.pending--,t.pending>0)return;if(ji(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ze--,!e.isConnected)return;ms(t),N(e)}function ps(e,t){if(Ze===0)return!1;let r=O(e,(n)=>n._x_deferInit);if(!r)return!1;return sn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function sn(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 ms(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=O(r,(o)=>o._x_deferInit);if(n){sn(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;Xe(r,i).forEach((o)=>o())})}function ye(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function D(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function gs(){if(yr)D("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(yr=!0,!document.body)D("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");ye(document,"alpine:init"),ye(document,"alpine:initializing"),Ut(),zi((t)=>N(t,Z)),Ht((t)=>ie(t)),Br((t,r)=>{if(ps(t,r))return;Xe(t,r).forEach((n)=>n())});let e=(t)=>!Qe(t.parentElement,!0);Array.from(document.querySelectorAll(ln().join(","))).filter(e).forEach((t)=>{N(t)}),ye(document,"alpine:initialized"),setTimeout(()=>{ws()})}function an(){return Vt.map((e)=>e())}function ln(){return Vt.concat(on).map((e)=>e())}function cn(e){Vt.push(e)}function dn(e){on.push(e)}function Qe(e,t=!1){return O(e,(r)=>{if((t?ln():an()).some((i)=>r.matches(i)))return!0})}function O(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return O(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return O(e.parentNode.host,t);if(!e.parentElement)return;return O(e.parentElement,t)}function ys(e){return an().some((t)=>e.matches(t))}function xs(e){un.push(e)}function N(e,t=Z,r=()=>{}){if(O(e,(n)=>n._x_ignore))return;ss(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),un.forEach((o)=>o(n,i)),Xe(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=vs++;n._x_ignore&&i()})})}function ie(e,t=Z){t(e,(r)=>{Ui(r),$r(r),delete r._x_marker})}function ws(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(is(r))return;n.some((i)=>{if(document.querySelector(i))return D(`found "${i}", but missing ${t} plugin`),!0})})}function Yt(e=()=>{}){return queueMicrotask(()=>{Wt||setTimeout(()=>{Ct()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function Ct(){Wt=!1;while(At.length)At.shift()()}function _s(){Wt=!0}function Jt(e,t){if(Array.isArray(t))return xr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return Es(e,t);else if(typeof t==="function")return Jt(e,t());return xr(e,t)}function Tt(e){return e.split(/\s/).filter(Boolean)}function xr(e,t){let r=(i)=>Tt(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 Es(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Tt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Tt(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 et(e,t){if(typeof t==="object"&&t!==null)return ks(e,t);return Ss(e,t)}function ks(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=As(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{et(e,r)}}function Ss(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function As(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ot(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function Cs(e,t,r){fn(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 Ts(e,t,r){fn(e,et);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((y,g)=>g<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((y,g)=>g>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?pe(t,"scale",95)/100:1,u=pe(t,"delay",0)/1000,f=pe(t,"origin","center"),h="opacity, transform",b=pe(t,"duration",150)/1000,p=pe(t,"duration",75)/1000,m="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${b}s`,transitionTimingFunction:m},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:h,transitionDuration:`${p}s`,transitionTimingFunction:m},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function fn(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=()=>{}){Mt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Mt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function hn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:hn(t)}function Mt(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,c;Os(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Os(e,t){let r,n,i,o=Ot(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Ct();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Ot(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),_s(),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;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),Ct(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function pe(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function bn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=ce({});switch(e._x_bindings[t]=r,t=n.includes("camel")?$s(t):t,t){case"value":Ms(e,r);break;case"style":Is(e,r);break;case"class":Ls(e,r);break;case"selected":case"checked":Ds(e,t,r);break;default:Gt(e,t,r);break}}function Ms(e,t){if(Xt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ke(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)=>Rs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ps(e,t);else if(e.tagName==="OPTION")Gt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ls(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Jt(e,t)}function Is(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=et(e,t)}function Ds(e,t,r){Gt(e,t,r),Bs(e,t,r)}function Gt(e,t,r){if([null,void 0,!1].includes(r)&&zs(t))e.removeAttribute(t);else{if(pn(t))r=t;if(Us(r))r=JSON.stringify(r);Ns(e,t,r)}}function Ns(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Bs(e,t,r){if(e[t]!==r)e[t]=r}function Ps(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function $s(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Rs(e,t){return e==t}function ze(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 pn(e){return Hs.has(e)}function zs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Us(e){return typeof e==="object"&&e!==null}function qs(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return mn(e,t,r)}function js(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Fr(()=>J(e,i.expression))}return mn(e,t,r)}function mn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(pn(t))return!![t,"true"].includes(n);return n}function Ke(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Xt(e){return e.type==="radio"||e.localName==="ui-radio"}function gn(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 yn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function xn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=ne(()=>{let l=e(),c=r();if(i)n(dt(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(dt(l));else if(d!==u)t(dt(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Rt(a),de(a)}}function dt(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Fs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(fe))}function Ks(e,t){if(!vr)P=ce(P),vr=!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 jt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function Vs(){return P}function Ws(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return wn(e,r());else vn[e]=r;return()=>{}}function Ys(e){return Object.entries(vn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function wn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Wr(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}),Xe(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Js(e,t){_n[e]=t}function Gs(e,t){return Object.entries(_n).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function kn(e){try{let r=new Qs(e).tokenize(),i=new eo(r).parse(),o=new to;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function ro(e,t,r={}){let n=Sn(e),i=X([r.scope??{},...n]),o=r.params??[],a=kn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&Y)return a.apply(i,o);return a}function no(e,t){let r=Sn(e);if(typeof t==="function")return ts(r,t);let n=io(e,t,r);return Gi.bind(null,e,t,n)}function Sn(e){let t={};return je(t,e),[t,...le(e)]}function io(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=X([i,...r]),l=kn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(Y&&typeof l==="function"){let c=l.apply(l,o);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 An(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Q(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function fo(e,t=!1){if(e.flags|=8,t){e.next=we,we=e;return}e.next=ve,ve=e}function Qt(){Mn++}function er(){if(--Mn>0)return;if(we){let t=we;we=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 Ln(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function In(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;tr(n),bo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ho(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function ho(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ve)return;if(e.globalVersion=Ve,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=v,n=M;v=e,M=!0;try{Ln(e);let i=e.fn(e._value);if(t.version===0||V(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,M=n,In(e),e.flags&=-3}}function tr(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)tr(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function bo(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 po(e,t){if(e.effect instanceof _r)e=e.effect.fn;let r=new _r(e);if(t)Ee(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function mo(e){e.effect.stop()}function go(){Dn.push(M),M=!1}function yo(){let e=Dn.pop();M=e===void 0?!0:e}function Er(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function Nn(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Nn(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function T(e,t,r){if(M&&v){let n=Dt.get(e);if(!n)Dt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new vo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function q(e,t,r,n,i,o){let s=Dt.get(e);if(!s){Ve++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Qt(),t==="clear")s.forEach(a);else{let l=ke(e),c=l&&Zt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===Ae||!Me(f)&&f>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(Ae));switch(t){case"add":if(!l){if(a(s.get(G)),xe(e))a(s.get(Nt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(G)),xe(e))a(s.get(Nt))}break;case"set":if(xe(e))a(s.get(G));break}}}er()}function oe(e){let t=w(e);if(t===e)return t;return T(t,"iterate",Ae),te(e)?t:t.map(re)}function rr(e){return T(e=w(e),"iterate",Ae),e}function I(e,t){if(ee(e))return Un(e)?Ce(re(t)):Ce(t);return re(t)}function ht(e,t,r){let n=rr(e),i=n[t]();if(n!==e&&!te(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function B(e,t,r,n,i,o){let s=rr(e),a=s!==e&&!te(e),l=s[t];if(l!==_o[t]){let u=l.apply(e,o);return a?re(u):u}let c=r;if(s!==e){if(a)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 a&&i?i(d):d}function kr(e,t,r,n){let i=rr(e),o=i!==e&&!te(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!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 a?I(e,l):l}function bt(e,t,r){let n=w(e);T(n,"iterate",Ae);let i=n[t](...r);if((i===-1||i===!1)&&Po(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function me(e,t,r=[]){go(),Qt();let n=w(e)[t].apply(e,r);return er(),yo(),n}function ko(e){if(!Me(e))e=String(e);let t=w(this);return T(t,"has",e),t.hasOwnProperty(e)}function Oo(e,t,r){return function(...n){let i=this.__v_raw,o=w(i),s=xe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Bt:t?Ce:re;return!t&&T(o,"iterate",l?Nt:G),Ee(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Re(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Q(`${On(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Mo(e,t){let r={get(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(V(i,a))T(s,"get",i);T(s,"get",a)}let{has:l}=$e(s),c=t?Bt:e?Ce:re;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&T(w(i),"iterate",G),i.size},has(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(V(i,a))T(s,"has",i);T(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=w(a),c=t?Bt:e?Ce:re;return!e&&T(l,"iterate",G),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return Ee(r,e?{add:Re("add"),set:Re("set"),delete:Re("delete"),clear:Re("clear")}:{add(i){let o=w(this),s=$e(o),a=w(i),l=!t&&!te(i)&&!ee(i)?a:i;if(!(s.has.call(o,l)||V(i,l)&&s.has.call(o,i)||V(a,l)&&s.has.call(o,a)))o.add(l),q(o,"add",l,l);return this},set(i,o){if(!t&&!te(o)&&!ee(o))o=w(o);let s=w(this),{has:a,get:l}=$e(s),c=a.call(s,i);if(!c)i=w(i),c=a.call(s,i);else Sr(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)q(s,"add",i,o);else if(V(o,d))q(s,"set",i,o,d);return this},delete(i){let o=w(this),{has:s,get:a}=$e(o),l=s.call(o,i);if(!l)i=w(i),l=s.call(o,i);else Sr(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)q(o,"delete",i,void 0,c);return d},clear(){let i=w(this),o=i.size!==0,s=xe(i)?new Map(i):new Set(i),a=i.clear();if(o)q(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Oo(i,e,t)}),r}function $n(e,t){let r=Mo(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(Lt(r,i)&&i in n?r:n,i,o)}}function Sr(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Tn(e);Q(`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 Bo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nr(e){if(ee(e))return e;return zn(e,!1,Co,Lo,Rn)}function Pt(e){return zn(e,!0,To,Io,Hn)}function zn(e,t,r,n,i){if(!Se(e))return Q(`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=Bo(Tn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Un(e){if(ee(e))return Un(e.__v_raw);return!!(e&&e.__v_isReactive)}function ee(e){return!!(e&&e.__v_isReadonly)}function te(e){return!!(e&&e.__v_isShallow)}function Po(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function _e(e){return e?e.__v_isRef===!0:!1}function $o(e){let t=[];return O(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function qn(e){if(!pt[e])pt[e]=0;return++pt[e]}function Ro(e,t){return O(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Ho(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=qn(t)}function zo(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 jn(e,t,r){L(t,(n)=>D(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Ar(e){let t=H(()=>document.querySelector(e),()=>Uo)();if(!t)D(`Cannot find x-teleport element for selector: "${e}"`);return t}function ae(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=qo(t);if(r.includes("camel"))t=jo(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=Kn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(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"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Ko(t)||Vn(t))o=a(o,(l,c)=>{if(Wo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Kn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=We(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=gn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=We(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=yn(t,n)}return t}function qo(e){return e.replace(/-/g,".")}function jo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function We(e){return!Array.isArray(e)&&!isNaN(e)}function Fo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ko(e){return["keydown","keyup"].includes(e)}function Vn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Wo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Vo.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,We((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,We((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Cr(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(Vn(e.type))return!1;if(Cr(e.key).includes(r[0]))return!1}}return!0}function Cr(e){if(!e)return[];e=Fo(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 He(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(Ke(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=mt(r.target.value);else if(t.includes("boolean"))i=ze(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Yo(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 mt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return ze(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Xt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return mt(i);else if(t.includes("boolean"))return ze(i);else if(t.includes("trim"))return i.trim();else return i}})}function mt(e){let t=e?parseFloat(e):null;return Jo(t)?t:e}function Yo(e,t){return e==t}function Jo(e){return!Array.isArray(e)&&!isNaN(e)}function Tr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Go(e,t){e._x_keyExpression=t}function Xo(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 Zo(e){if(!j)return!1;if(St)return!0;return e.hasAttribute("data-has-alpine-state")}function Qo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function ea(e,t,r,n){r((i)=>{if(na(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 o=e._x_lookup,s=new Map;e._x_lookup=s;let a=ia(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=ra(t,d,c,i),f;return n((h)=>{if(typeof h==="object")D("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(h))s.set(h,o.get(h)),o.delete(h);f=h},{scope:{index:c,...u}}),[f,u]});_(()=>{o.forEach((u)=>{ie(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)D("x-for templates require a single root element, additional elements will be ignored.",e);let h=document.importNode(e.content,!0).firstElementChild,b=ce(f);Te(h,b,e),h._x_refreshXForScope=Qo(b),s.set(u,h),c.add(h),d.after(h),d=h}),c.forEach((u)=>N(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function ta(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 ra(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 na(e){return typeof e!=="object"&&!isNaN(e)}function ia(e){return typeof e==="object"&&!Array.isArray(e)}function Yn(){}function rt(e,t,r){E(t,(n)=>D(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var gt=!1,yt=!1,R,xt=-1,Ue=!1,$t=!1,ce,ne,de,Mr,Bi=0,vt=!0,Ir,Dr,Nr,Ye,zt=!1,K,qt=!1,qe,Vi,qr,jr,Y=!0,Kr=()=>{},Vr,Ft="x-",Fe,Et=!1,ge,Yr,Gr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Xr=(e)=>e,Qr,tn=()=>new RegExp(`^${Ft}([^:^.]+)\\b`),kt="DEFAULT",W,j=!1,rn,St=!1,Ze=0,yr=!1,Vt,on,un,vs=1,At,Wt=!1,Hs,P,vr=!1,vn,_n,Xs,fe,wr,En,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Zs,Qs=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
- `)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))}}},eo=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 Zs.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}}},to=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let m=t[e.name];if(this.checkForDangerousValues(m),typeof m==="function")return m.bind(t);return m}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let 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((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let m=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y;if(e.callee.computed)y=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else y=e.callee.property.name;this.checkForDangerousKeywords(y);let g=m[y];if(typeof g!=="function")throw Error("Value is not a function");l=g.apply(m,a)}else if(e.callee.type==="Identifier"){let m=e.callee.name,y;if(m in t)y=t[m];else throw Error(`Undefined variable: ${m}`);if(typeof y!=="function")throw Error("Value is not a function");let g=r!==null?r:t;l=y.apply(g,a)}else{let m=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof m!=="function")throw Error("Value is not a function");l=m.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let m=e.argument.name;if(!(m in t))throw Error(`Undefined variable: ${m}`);let y=t[m];if(e.operator==="++")t[m]=y+1;else if(e.operator==="--")t[m]=y-1;return e.prefix?t[m]:y}else if(e.argument.type==="MemberExpression"){let m=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(y);let g=m[y];if(e.operator==="++")m[y]=g+1;else if(e.operator==="--")m[y]=g-1;return e.prefix?m[y]:g}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let b=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=b,b;else if(e.left.type==="MemberExpression"){let m=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),y=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(y),m[y]=b,b}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let m of e.properties){let y=m.computed?this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):m.key.type==="Identifier"?m.key.name:this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),g=this.evaluate({node:m.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[y]=g}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(wr.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(En.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return wr.set(e,!0),!0}},Ba,Pa,Ee,so,Lt=(e,t)=>so.call(e,t),ke,xe=(e)=>Cn(e)==="[object Map]",oo=(e)=>typeof e==="string",Me=(e)=>typeof e==="symbol",Se=(e)=>e!==null&&typeof e==="object",ao,Cn=(e)=>ao.call(e),Tn=(e)=>Cn(e).slice(8,-1),Zt=(e)=>oo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tt=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},lo,$a,co,Ra,On,Ha,V=(e,t)=>!Object.is(e,t),uo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",za,ut,v,ft,_r=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ut)if(ut.active)ut.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ft.has(this))ft.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))fo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Er(this),Ln(this);let e=v,t=M;v=this,M=!0;try{return this.fn()}finally{if(v!==this)Q("Active effect was not restored correctly - this is likely a Vue internal bug.");In(this),v=e,M=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)tr(e);this.deps=this.depsTail=void 0,Er(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ft.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},Mn=0,ve,we,M=!0,Dn,Ve=0,xo=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}},vo=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||!M||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new xo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;Nn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(Ee({effect:v},e));return t}trigger(e){this.version++,Ve++,this.notify(e)}notify(e){Qt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(Ee({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{er()}}},Dt,G,Nt,Ae,wo,_o,Eo,Bn,Pn=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?No:Hn:i?Do:Rn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=ke(e);if(!n){let a;if(o&&(a=wo[t]))return a;if(t==="hasOwnProperty")return ko}let s=Reflect.get(e,t,_e(e)?e:r);if(Me(t)?Bn.has(t):Eo(t))return s;if(!n)T(e,"get",t);if(i)return s;if(_e(s)){let a=o&&Zt(t)?s:s.value;return n&&Se(a)?Pt(a):a}if(Se(s))return n?Pt(s):nr(s);return s}},So,Ao,Co,To,Bt=(e)=>e,$e=(e)=>Reflect.getPrototypeOf(e),Lo,Io,Rn,Do,Hn,No,re=(e)=>Se(e)?nr(e):e,Ce=(e)=>Se(e)?Pt(e):e,pt,Uo,Fn=()=>{},Vo,Wn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Ys(l),C(e,n)((d)=>{wn(e,d,i)},{scope:l});return}if(t==="key")return Go(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=C(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>bn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},F,Jn,sa;var Xn=Ai(()=>{R=[];Ir=[],Dr=[],Nr=[];Ye=new MutationObserver(Je);K=[];qe=[];Vi={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 Wi;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=zr(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)}};qr={};jr=Zi;Fe={};ge=new Map,Yr=Symbol();Qr=[];W=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",kt,"teleport"];rn=[];Oe((e,t)=>{if(Ze===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(O(e,(r)=>r._x_deferInit))t._x_ignore=!0});Vt=[],on=[];un=[];At=[];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")Ts(e,r,t);else Cs(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=hn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Hs=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={};vn={};_n={};Xs={get reactive(){return ce},get release(){return de},get effect(){return ne},get raw(){return Mr},get transaction(){return Hi},version:"3.17.4",flushAndStopDeferringMutations:Ki,dontAutoEvaluateFunctions:Fr,disableEffectScheduling:Pi,startObservingMutations:Ut,stopObservingMutations:Rr,setReactivityEngine:$i,onAttributeRemoved:Pr,onAttributesAdded:Br,closestDataStack:le,skipDuringClone:H,onlyDuringClone:cs,addRootSelector:cn,addInitSelector:dn,setErrorHandler:Xi,interceptClone:Oe,addScopeToNode:Te,deferMutations:Fi,mapAttributes:Kt,evaluateLater:C,interceptInit:xs,initInterceptors:jt,injectMagics:je,setEvaluator:Qi,setRawEvaluator:es,mergeProxies:X,extractProp:js,findClosest:O,onElRemoved:Ht,closestRoot:Qe,destroyTree:ie,interceptor:Ur,transition:Mt,setStyles:et,mutateDom:_,deferInit:hs,directive:E,entangle:xn,throttle:yn,debounce:gn,evaluate:J,evaluateRaw:rs,initTree:N,nextTick:Yt,prefixed:ue,prefix:ns,plugin:Fs,magic:L,store:Ks,start:gs,clone:us,cloneNode:ds,bound:qs,$data:Hr,watch:Lr,walk:Z,data:Js,bind:Ws},fe=Xs,wr=new WeakMap,En=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}En.add(t)});Zs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Ba=Object.freeze({}),Pa=Object.freeze([]),Ee=Object.assign,so=Object.prototype.hasOwnProperty,ke=Array.isArray,ao=Object.prototype.toString,lo=/-\w/g,$a=tt((e)=>e.replace(lo,(t)=>t.slice(1).toUpperCase())),co=/\B([A-Z])/g,Ra=tt((e)=>e.replace(co,"-$1").toLowerCase()),On=tt((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Ha=tt((e)=>e?`on${On(e)}`:""),za=An(uo+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ft=new WeakSet;Dn=[];Dt=new WeakMap,G=Symbol("Object iterate"),Nt=Symbol("Map keys iterate"),Ae=Symbol("Array iterate");wo={__proto__:null,[Symbol.iterator](){return ht(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return oe(this).concat(...e.map((t)=>ke(t)?oe(t):t))},entries(){return ht(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return B(this,"every",e,t,void 0,arguments)},filter(e,t){return B(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return B(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return B(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return B(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return B(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return B(this,"forEach",e,t,void 0,arguments)},includes(...e){return bt(this,"includes",e)},indexOf(...e){return bt(this,"indexOf",e)},join(e){return oe(this).join(e)},lastIndexOf(...e){return bt(this,"lastIndexOf",e)},map(e,t){return B(this,"map",e,t,void 0,arguments)},pop(){return me(this,"pop")},push(...e){return me(this,"push",e)},reduce(e,...t){return kr(this,"reduce",e,t)},reduceRight(e,...t){return kr(this,"reduceRight",e,t)},shift(){return me(this,"shift")},some(e,t){return B(this,"some",e,t,void 0,arguments)},splice(...e){return me(this,"splice",e)},toReversed(){return oe(this).toReversed()},toSorted(e){return oe(this).toSorted(e)},toSpliced(...e){return oe(this).toSpliced(...e)},unshift(...e){return me(this,"unshift",e)},values(){return ht(this,"values",(e)=>I(this,e))}};_o=Array.prototype;Eo=An("__proto__,__v_isRef,__isVue"),Bn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Me));So=class extends Pn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=ke(e)&&Zt(t);if(!this._isShallow){let l=ee(i);if(!te(r)&&!ee(r))i=w(i),r=w(r);if(!o&&_e(i)&&!_e(r))if(l)return Q(`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:Lt(e,t),a=Reflect.set(e,t,r,_e(e)?e:n);if(e===w(n)&&a){if(!s)q(e,"add",t,r);else if(V(r,i))q(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Lt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)q(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Me(t)||!Bn.has(t))T(e,"has",t);return r}ownKeys(e){return T(e,"iterate",ke(e)?"length":G),Reflect.ownKeys(e)}},Ao=class extends Pn{constructor(e=!1){super(!0,e)}set(e,t){return Q(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Q(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Co=new So,To=new Ao;Lo={get:$n(!1,!1)},Io={get:$n(!0,!1)};Rn=new WeakMap,Do=new WeakMap,Hn=new WeakMap,No=new WeakMap;L("nextTick",()=>Yt);L("dispatch",(e)=>ye.bind(ye,e));L("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Lr(()=>{let l;return o((c)=>l=c),l},i);r(a)});L("store",Vs);L("data",(e)=>Hr(e));L("root",(e)=>Qe(e));L("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=X($o(e)),e._x_refs_proxy});pt={};L("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return zo(e,i,t,()=>{let o=Ro(e,r),s=o?o._x_ids[r]:qn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Oe((e,t)=>{if(e._x_id)t._x_id=e._x_id});L("el",(e)=>e);jn("Focus","focus","focus");jn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{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=xn({get(){return d()},set(h){u(h)}},{get(){return s()},set(h){l(h)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")D("x-teleport can only be used on a <template> tag",e);let i=Ar(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))})});Te(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{H(()=>{s(o,i,t),N(o)})()}),e._x_teleportPutBack=()=>{let a=Ar(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ie(o)}))});Uo=document.createElement("div");Fn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",Fn);E("effect",H((e,{expression:t},{effect:r})=>{r(C(e,t))}));Vo=["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=O(e,(p)=>p!==e);let s=C(o,r),a;if(typeof r==="string")a=C(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=C(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let p;return s((m)=>p=m),Tr(p)?p.get():p},c=(p)=>{let m;if(s((y)=>m=y),Tr(m))m.set(p);else a(()=>{},{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"),h=d||u||f,b;if(j)b=()=>{};else if(h){let p=[],m=(y)=>c(He(e,t,y,l()));if(d)p.push(ae(e,"change",t,m));if(u){if(p.push(ae(e,"blur",t,m)),e.form){let y=e.form,g=()=>m({target:e});if(!y._x_pendingModelUpdates)y._x_pendingModelUpdates=[];y._x_pendingModelUpdates.push(g),i(()=>{if(y._x_pendingModelUpdates)y._x_pendingModelUpdates.splice(y._x_pendingModelUpdates.indexOf(g),1)})}}if(f)p.push(ae(e,"keydown",t,(y)=>{if(y.key==="Enter")m(y)}));b=()=>p.forEach((y)=>y())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";b=ae(e,p,t,(m)=>{c(He(e,t,m,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ke(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(He(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=b,i(()=>e._x_removeModelListeners.default()),e.form){let p=ae(e.form,"reset",[],(m)=>{Yt(()=>e._x_model&&e._x_model.set(He(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Kn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Ke(e))if(Array.isArray(p))e.checked=p.some((m)=>m==e.value);else e.checked=!!p;else if(Xt(e))if(typeof p==="boolean")e.checked=ze(e.value)===p;else e.checked=e.value==p;else bn(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(ue("cloak")))));dn(()=>`[${ue("init")}]`);E("init",H((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)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ie(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,N(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Kt(Gr(":",Xr(ue("bind:"))));Wn.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",Wn);cn(()=>`[${ue("data")}]`);F=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Zo(e))return;let n=e[F];if(n?.expression===t)return;t=t===""?"{}":t;let i={};je(i,e);let o={};Gs(o,i);let s=J(e,t,{scope:o});if(s===void 0||s===!0)s={};je(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Xo(a,s);let c={expression:t};e[F]=c,queueMicrotask(()=>{if(e[F]===c)delete e[F]})}else a=ce(s);jt(a,r);let l=Te(e,a);H(()=>{a.init&&J(e,a.init)})(),r(()=>{a.destroy&&J(e,a.destroy),l();let c={reactiveData:a};e[F]=c,queueMicrotask(()=>{if(e[F]===c)delete e[F]})})});Oe((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=C(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 o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Ot((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",H((e,{expression:t},{effect:r,cleanup:n})=>{let i=ta(t),o=C(e,i.items),s=C(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>ea(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ie(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Yn.inline=(e,{expression:t},{cleanup:r})=>{let n=Qe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Yn);E("if",H((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")D("x-if can only be used on a <template> tag",e);let i=C(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Te(a,{},e),_(()=>{e.after(a),N(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ie(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)=>Ho(e,i))});Oe((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Kt(Gr("@",Xr(ue("on:"))));E("on",H((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?C(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=ae(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));rt("Collapse","collapse","collapse");rt("Intersect","intersect","intersect");rt("Focus","trap","focus");rt("Mask","mask","mask");E("html",(e,{expression:t})=>{Ge(Error("Using the x-html directive is prohibited in the CSP build"),e)});fe.setEvaluator(no);fe.setRawEvaluator(ro);fe.setReactivityEngine({reactive:nr,effect:(e,t={})=>{let r;return r=po(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:mo,raw:w});Jn=fe,sa=Jn;/*! Bundled license information:
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}function Kr(e){let t=X;X=!1;let r=e();return X=t,r}function Z(e,t,r={}){let n;return T(e,t)((i)=>n=i,r),n}function T(...e){return Vr(...e)}function es(e){Vr=e}function ts(e){Wr=e}function rs(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!X){Et(r,t,ee([n,...e]),i);return}let s=t.apply(ee([n,...e]),i);Et(r,s)}}function Et(e,t,r,n,i){if(X&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((s)=>Et(e,s,r,n)).catch((s)=>Xe(s,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function ns(...e){return Wr(...e)}function he(e=""){return Kt+e}function is(e){Kt=e}function E(e,t){return Ke[e]=t,{before(r){if(!Ke[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=G.indexOf(r);G.splice(n>=0?n:G.indexOf("DEFAULT"),0,e)}}}function ss(e){return Object.keys(Ke).includes(e)}function Ze(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=Yr(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(Qr((a,s)=>n[a]=s)).filter(tn).map(ls(n,r)).sort(cs).map((a)=>as(e,a))}function Yr(e){return Array.from(e).map(Qr()).filter((t)=>!tn(t))}function os(e){kt=!0;let t=Symbol();Jr=t,ye.set(t,[]);let r=()=>{while(ye.get(t).length)ye.get(t).shift()();ye.delete(t)},n=()=>{kt=!1,r()};e(r),n()}function Gr(e){let t=[],r=(o)=>t.push(o),[n,i]=Hi(e);return t.push(i),[{Alpine:be,effect:n,cleanup:r,evaluateLater:T.bind(T,e),evaluate:Z.bind(Z,e)},()=>t.forEach((o)=>o())]}function as(e,t){let r=()=>{},n=Ke[t.type]||r,[i,a]=Gr(e);$r(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),kt?ye.get(Jr).push(n):n()};return s.runCleanups=a,s}function Qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=en.reduce((a,s)=>s(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Vt(e){en.push(e)}function tn({name:e}){return rn().test(e)}function ls(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(rn()),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 cs(e,t){let r=G.indexOf(e.type)===-1?St:e.type,n=G.indexOf(t.type)===-1?St:t.type;return G.indexOf(r)-G.indexOf(n)}function te(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>te(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)te(n,t,!1),n=n.nextElementSibling}function U(e,t=()=>{}){return(...r)=>K?t(...r):e(...r)}function ds(e){return(...t)=>K&&e(...t)}function Me(e){nn.push(e)}function us(e,t){nn.forEach((r)=>r(e,t)),K=!0,sn(()=>{P(t,(r,n)=>{n(r,()=>{})})}),K=!1}function fs(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;K=!0,At=!0,sn(()=>{hs(t)}),K=!1,At=!1}function hs(e){let t=!1;P(e,(n,i)=>{te(n,(a,s)=>{if(t&&xs(a))return s();t=!0,i(a,s)})})}function sn(e){let t=oe;yr((r,n)=>{let i=t(r);return fe(i),()=>{}}),e(),yr(t)}function bs(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Qe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Xe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>ps(e,r))}function ps(e,t){if(t.pending--,t.pending>0)return;if(Fi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Qe--,!e.isConnected)return;gs(t),P(e)}function ms(e,t){if(Qe===0)return!1;let r=L(e,(n)=>n._x_deferInit);if(!r)return!1;return on(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function on(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function gs(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=L(r,(a)=>a._x_deferInit);if(n){on(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((a)=>r.hasAttribute(a)).map((a)=>({name:a,value:r.getAttribute(a)}));if(i.length===0)return;Ze(r,i).forEach((a)=>a())})}function xe(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function B(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ys(){if(xr)B("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(xr=!0,!document.body)B("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");xe(document,"alpine:init"),xe(document,"alpine:initializing"),qt(),Ui((t)=>P(t,te)),zt((t)=>ae(t)),Pr((t,r)=>{if(ms(t,r))return;Ze(t,r).forEach((n)=>n())});let e=(t)=>!et(t.parentElement,!0);Array.from(document.querySelectorAll(cn().join(","))).filter(e).forEach((t)=>{P(t)}),xe(document,"alpine:initialized"),setTimeout(()=>{_s()})}function ln(){return Wt.map((e)=>e())}function cn(){return Wt.concat(an).map((e)=>e())}function dn(e){Wt.push(e)}function un(e){an.push(e)}function et(e,t=!1){return L(e,(r)=>{if((t?cn():ln()).some((i)=>r.matches(i)))return!0})}function L(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return L(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return L(e.parentNode.host,t);if(!e.parentElement)return;return L(e.parentElement,t)}function xs(e){return ln().some((t)=>e.matches(t))}function vs(e){fn.push(e)}function P(e,t=te,r=()=>{}){if(L(e,(n)=>n._x_ignore))return;os(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),fn.forEach((a)=>a(n,i)),Ze(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=ws++;n._x_ignore&&i()})})}function ae(e,t=te){t(e,(r)=>{qi(r),Rr(r),delete r._x_marker})}function _s(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(ss(r))return;n.some((i)=>{if(document.querySelector(i))return B(`found "${i}", but missing ${t} plugin`),!0})})}function Jt(e=()=>{}){return queueMicrotask(()=>{Yt||setTimeout(()=>{Tt()})}),new Promise((t)=>{Ct.push(()=>{e(),t()})})}function Tt(){Yt=!1;while(Ct.length)Ct.shift()()}function Es(){Yt=!0}function Gt(e,t){if(Array.isArray(t))return vr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return ks(e,t);else if(typeof t==="function")return Gt(e,t());return vr(e,t)}function Ot(e){return e.split(/\s/).filter(Boolean)}function vr(e,t){let r=(i)=>Ot(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 ks(e,t){let r=Object.entries(t).flatMap(([s,o])=>o?Ot(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,o])=>!o?Ot(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 tt(e,t){if(typeof t==="object"&&t!==null)return Ss(e,t);return As(e,t)}function Ss(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=Cs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{tt(e,r)}}function As(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Cs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Mt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function Ts(e,t,r){hn(e,Gt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function Os(e,t,r){hn(e,tt);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),a=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((g,S)=>S<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((g,S)=>S>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?me(t,"scale",95)/100:1,u=me(t,"delay",0)/1000,f=me(t,"origin","center"),b="opacity, transform",p=me(t,"duration",150)/1000,h=me(t,"duration",75)/1000,m="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${p}s`,transitionTimingFunction:m},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(a)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${h}s`,transitionTimingFunction:m},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function hn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Lt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Lt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function bn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:bn(t)}function Lt(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;Ms(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 Ms(e,t){let r,n,i,a=Mt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Tt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Mt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},_(()=>{t.start(),t.during()}),Es(),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()}),Tt(),setTimeout(e._x_transitioning.finish,s+o),i=!0})})}function me(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function pn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=ue({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Rs(t):t,t){case"value":Ls(e,r);break;case"style":Ds(e,r);break;case"class":Is(e,r);break;case"selected":case"checked":Ns(e,t,r);break;default:Xt(e,t,r);break}}function Ls(e,t){if(Zt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ve(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Hs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")$s(e,t);else if(e.tagName==="OPTION")Xt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Is(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Gt(e,t)}function Ds(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=tt(e,t)}function Ns(e,t,r){Xt(e,t,r),Ps(e,t,r)}function Xt(e,t,r){if([null,void 0,!1].includes(r)&&Us(t))e.removeAttribute(t);else{if(mn(t))r=t;if(qs(r))r=JSON.stringify(r);Bs(e,t,r)}}function Bs(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ps(e,t,r){if(e[t]!==r)e[t]=r}function $s(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Rs(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Hs(e,t){return e==t}function Ue(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function mn(e){return zs.has(e)}function Us(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function qs(e){return typeof e==="object"&&e!==null}function js(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return gn(e,t,r)}function Fs(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Kr(()=>Z(e,i.expression))}return gn(e,t,r)}function gn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(mn(t))return!![t,"true"].includes(n);return n}function Ve(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Zt(e){return e.type==="radio"||e.localName==="ui-radio"}function yn(e,t){let r;return function(){let n=this,i=arguments,a=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(a,t)}}function xn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function vn({get:e,set:t},{get:r,set:n}){let i=!0,a,s,o=oe(()=>{let l=e(),c=r();if(i)n(ut(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==a)n(ut(l));else if(d!==u)t(ut(c))}a=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Ht(o),fe(o)}}function ut(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Ks(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(be))}function Vs(e,t){if(!wr)H=ue(H),wr=!0;if(t===void 0)return H[e];if(H[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)H[e]=t.initialize(H,e,e,()=>{});else Ft(H[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")H[e].init()}function Ws(){return H}function Ys(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return _n(e,r());else wn[e]=r;return()=>{}}function Js(e){return Object.entries(wn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function _n(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,o])=>({name:s,value:o})),a=Yr(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}),Ze(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Gs(e,t){En[e]=t}function Xs(e,t){return Object.entries(En).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function Sn(e){try{let r=new eo(e).tokenize(),i=new to(r).parse(),a=new ro;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 no(e,t,r={}){let n=An(e),i=ee([r.scope??{},...n]),a=r.params??[],o=Sn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof o==="function"&&X)return o.apply(i,a);return o}function io(e,t){let r=An(e);if(typeof t==="function")return rs(r,t);let n=so(e,t,r);return Xi.bind(null,e,t,n)}function An(e){let t={};return Fe(t,e),[t,...de(e)]}function so(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=ee([i,...r]),l=Sn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(X&&typeof l==="function"){let c=l.apply(l,a);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function Cn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function re(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function ho(e,t=!1){if(e.flags|=8,t){e.next=_e,_e=e;return}e.next=we,we=e}function er(){Ln++}function tr(){if(--Ln>0)return;if(_e){let t=_e;_e=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(we){let t=we;we=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function In(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Dn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;rr(n),po(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Dt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(bo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function bo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===We)return;if(e.globalVersion=We,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Dt(e)))return;e.flags|=2;let t=e.dep,r=v,n=I;v=e,I=!0;try{In(e);let i=e.fn(e._value);if(t.version===0||J(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{v=r,I=n,Dn(e),e.flags&=-3}}function rr(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let a=r.computed.deps;a;a=a.nextDep)rr(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function po(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 mo(e,t){if(e.effect instanceof Er)e=e.effect.fn;let r=new Er(e);if(t)ke(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function go(e){e.effect.stop()}function yo(){Nn.push(I),I=!1}function xo(){let e=Nn.pop();I=e===void 0?!0:e}function kr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function Bn(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)Bn(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 M(e,t,r){if(I&&v){let n=Nt.get(e);if(!n)Nt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new wo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function F(e,t,r,n,i,a){let s=Nt.get(e);if(!s){We++;return}let o=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(er(),t==="clear")s.forEach(o);else{let l=Se(e),c=l&&Qt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===Ce||!Le(f)&&f>=d)o(u)})}else{if(r!==void 0||s.has(void 0))o(s.get(r));if(c)o(s.get(Ce));switch(t){case"add":if(!l){if(o(s.get(Q)),ve(e))o(s.get(Bt))}else if(c)o(s.get("length"));break;case"delete":if(!l){if(o(s.get(Q)),ve(e))o(s.get(Bt))}break;case"set":if(ve(e))o(s.get(Q));break}}}tr()}function le(e){let t=w(e);if(t===e)return t;return M(t,"iterate",Ce),ie(e)?t:t.map(se)}function nr(e){return M(e=w(e),"iterate",Ce),e}function N(e,t){if(ne(e))return qn(e)?Te(se(t)):Te(t);return se(t)}function bt(e,t,r){let n=nr(e),i=n[t]();if(n!==e&&!ie(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function R(e,t,r,n,i,a){let s=nr(e),o=s!==e&&!ie(e),l=s[t];if(l!==Eo[t]){let u=l.apply(e,a);return o?se(u):u}let c=r;if(s!==e){if(o)c=function(u,f){return r.call(this,N(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 Sr(e,t,r,n){let i=nr(e),a=i!==e&&!ie(e),s=r,o=!1;if(i!==e){if(a)o=n.length===0,s=function(c,d,u){if(o)o=!1,c=N(e,c);return r.call(this,c,N(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?N(e,l):l}function pt(e,t,r){let n=w(e);M(n,"iterate",Ce);let i=n[t](...r);if((i===-1||i===!1)&&$o(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function ge(e,t,r=[]){yo(),er();let n=w(e)[t].apply(e,r);return tr(),xo(),n}function So(e){if(!Le(e))e=String(e);let t=w(this);return M(t,"has",e),t.hasOwnProperty(e)}function Mo(e,t,r){return function(...n){let i=this.__v_raw,a=w(i),s=ve(a),o=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Pt:t?Te:se;return!t&&M(a,"iterate",l?Bt:Q),ke(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 He(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";re(`${Mn(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Lo(e,t){let r={get(i){let a=this.__v_raw,s=w(a),o=w(i);if(!e){if(J(i,o))M(s,"get",i);M(s,"get",o)}let{has:l}=Re(s),c=t?Pt:e?Te:se;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&&M(w(i),"iterate",Q),i.size},has(i){let a=this.__v_raw,s=w(a),o=w(i);if(!e){if(J(i,o))M(s,"has",i);M(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=w(o),c=t?Pt:e?Te:se;return!e&&M(l,"iterate",Q),o.forEach((d,u)=>i.call(a,c(d),c(u),s))}};return ke(r,e?{add:He("add"),set:He("set"),delete:He("delete"),clear:He("clear")}:{add(i){let a=w(this),s=Re(a),o=w(i),l=!t&&!ie(i)&&!ne(i)?o:i;if(!(s.has.call(a,l)||J(i,l)&&s.has.call(a,i)||J(o,l)&&s.has.call(a,o)))a.add(l),F(a,"add",l,l);return this},set(i,a){if(!t&&!ie(a)&&!ne(a))a=w(a);let s=w(this),{has:o,get:l}=Re(s),c=o.call(s,i);if(!c)i=w(i),c=o.call(s,i);else Ar(s,o,i);let d=l.call(s,i);if(s.set(i,a),!c)F(s,"add",i,a);else if(J(a,d))F(s,"set",i,a,d);return this},delete(i){let a=w(this),{has:s,get:o}=Re(a),l=s.call(a,i);if(!l)i=w(i),l=s.call(a,i);else Ar(a,s,i);let c=o?o.call(a,i):void 0,d=a.delete(i);if(l)F(a,"delete",i,void 0,c);return d},clear(){let i=w(this),a=i.size!==0,s=ve(i)?new Map(i):new Set(i),o=i.clear();if(a)F(i,"clear",void 0,void 0,s);return o}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Mo(i,e,t)}),r}function Rn(e,t){let r=Lo(e,t);return(n,i,a)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(It(r,i)&&i in n?r:n,i,a)}}function Ar(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=On(e);re(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}function Po(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ir(e){if(ne(e))return e;return Un(e,!1,To,Io,Hn)}function $t(e){return Un(e,!0,Oo,Do,zn)}function Un(e,t,r,n,i){if(!Ae(e))return re(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let s=Po(On(e));if(s===0)return e;let o=new Proxy(e,s===2?n:r);return i.set(e,o),o}function qn(e){if(ne(e))return qn(e.__v_raw);return!!(e&&e.__v_isReactive)}function ne(e){return!!(e&&e.__v_isReadonly)}function ie(e){return!!(e&&e.__v_isShallow)}function $o(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function Ee(e){return e?e.__v_isRef===!0:!1}function Ro(e){let t=[];return L(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function jn(e){if(!mt[e])mt[e]=0;return++mt[e]}function Ho(e,t){return L(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function zo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=jn(t)}function Uo(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 Fn(e,t,r){D(t,(n)=>B(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Cr(e){let t=U(()=>document.querySelector(e),()=>qo)();if(!t)B(`Cannot find x-teleport element for selector: "${e}"`);return t}function ce(e,t,r,n){let i=e,a=(l)=>n(l),s={},o=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=jo(t);if(r.includes("camel"))t=Fo(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=Vn(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(Vo(t)||Wn(t))a=o(a,(l,c)=>{if(Yo(c,r))return;l(c)});return i.addEventListener(t,a,s),()=>{i.removeEventListener(t,a,s)}}function Vn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=yn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ye(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=xn(t,n)}return t}function jo(e){return e.replace(/-/g,".")}function Fo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ye(e){return!Array.isArray(e)&&!isNaN(e)}function Ko(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Vo(e){return["keydown","keyup"].includes(e)}function Wn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Yo(e,t){let r=t.filter((a,s)=>{if(a==="false"&&t[s-1]==="passive")return!1;return!Wo.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,Ye((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Tr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((a)=>r.includes(a));if(r=r.filter((a)=>!i.includes(a)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Wn(e.type))return!1;if(Tr(e.key).includes(r[0]))return!1}}return!0}function Tr(e){if(!e)return[];e=Ko(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function ze(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Ve(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=gt(r.target.value);else if(t.includes("boolean"))i=Ue(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Jo(a,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return gt(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return Ue(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Zt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return gt(i);else if(t.includes("boolean"))return Ue(i);else if(t.includes("trim"))return i.trim();else return i}})}function gt(e){let t=e?parseFloat(e):null;return Go(t)?t:e}function Jo(e,t){return e==t}function Go(e){return!Array.isArray(e)&&!isNaN(e)}function Or(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Xo(e,t){e._x_keyExpression=t}function Zo(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 Qo(e){if(!K)return!1;if(At)return!0;return e.hasAttribute("data-has-alpine-state")}function ea(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function ta(e,t,r,n){r((i)=>{if(ia(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=sa(i),l=Object.entries(i).map(([c,d])=>{if(!o)c=parseInt(c);let u=na(t,d,c,i),f;return n((b)=>{if(typeof b==="object")B("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(b))s.set(b,a.get(b)),a.delete(b);f=b},{scope:{index:c,...u}}),[f,u]});_(()=>{a.forEach((u)=>{ae(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(f),d.nextElementSibling!==h){if(d.nextElementSibling)h.replaceWith(d.nextElementSibling);d.after(h)}if(d=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)d.after(h._x_currentIfEl);d=h._x_currentIfEl}return}if(e.content.children.length>1)B("x-for templates require a single root element, additional elements will be ignored.",e);let b=document.importNode(e.content,!0).firstElementChild,p=ue(f);Oe(b,p,e),b._x_refreshXForScope=ea(p),s.set(u,b),c.add(b),d.after(b),d=b}),c.forEach((u)=>P(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function ra(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 na(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 ia(e){return typeof e!=="object"&&!isNaN(e)}function sa(e){return typeof e==="object"&&!Array.isArray(e)}function Jn(){}function nt(e,t,r){E(t,(n)=>B(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var yt=!1,xt=!1,z,vt=-1,qe=!1,Rt=!1,ue,oe,fe,Lr,Pi=0,wt=!0,Dr,Nr,Br,Je,Ut=!1,Y,jt=!1,je,Wi,jr,Fr,X=!0,Vr=()=>{},Wr,Kt="x-",Ke,kt=!1,ye,Jr,Xr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Zr=(e)=>e,en,rn=()=>new RegExp(`^${Kt}([^:^.]+)\\b`),St="DEFAULT",G,K=!1,nn,At=!1,Qe=0,xr=!1,Wt,an,fn,ws=1,Ct,Yt=!1,zs,H,wr=!1,wn,En,Zs,be,_r,kn,A=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Qs,eo=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new A("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
6
+ `)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new A("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new A("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new A("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new A("UNDEFINED",void 0,e,this.position));else this.tokens.push(new A("KEYWORD",t,e,this.position));else this.tokens.push(new A("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
7
+ `;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let a=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new A("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new A("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new A("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new A("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new A("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new A("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new A("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new A(i,t,e,this.position))}}},to=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 Qs.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}}},ro=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let m=t[e.name];if(this.checkForDangerousValues(m),typeof m==="function")return m.bind(t);return m}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let a;if(e.computed)a=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else a=e.property.name;this.checkForDangerousKeywords(a);let 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((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let m=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),g;if(e.callee.computed)g=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else g=e.callee.property.name;this.checkForDangerousKeywords(g);let S=m[g];if(typeof S!=="function")throw Error("Value is not a function");l=S.apply(m,o)}else if(e.callee.type==="Identifier"){let m=e.callee.name,g;if(m in t)g=t[m];else throw Error(`Undefined variable: ${m}`);if(typeof g!=="function")throw Error("Value is not a function");let S=r!==null?r:t;l=g.apply(S,o)}else{let m=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof m!=="function")throw Error("Value is not a function");l=m.apply(r,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 m=e.argument.name;if(!(m in t))throw Error(`Undefined variable: ${m}`);let g=t[m];if(e.operator==="++")t[m]=g+1;else if(e.operator==="--")t[m]=g-1;return e.prefix?t[m]:g}else if(e.argument.type==="MemberExpression"){let m=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),g=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(g);let S=m[g];if(e.operator==="++")m[g]=S+1;else if(e.operator==="--")m[g]=S-1;return e.prefix?m[g]:S}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 p=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=p,p;else if(e.left.type==="MemberExpression"){let m=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),g=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(m))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(g),m[g]=p,p}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((m)=>this.evaluate({node:m,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let m of e.properties){let g=m.computed?this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):m.key.type==="Identifier"?m.key.name:this.evaluate({node:m.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),S=this.evaluate({node:m.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[g]=S}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(_r.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(kn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return _r.set(e,!0),!0}},Pa,$a,ke,oo,It=(e,t)=>oo.call(e,t),Se,ve=(e)=>Tn(e)==="[object Map]",ao=(e)=>typeof e==="string",Le=(e)=>typeof e==="symbol",Ae=(e)=>e!==null&&typeof e==="object",lo,Tn=(e)=>lo.call(e),On=(e)=>Tn(e).slice(8,-1),Qt=(e)=>ao(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,rt=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},co,Ra,uo,Ha,Mn,za,J=(e,t)=>!Object.is(e,t),fo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ua,ft,v,ht,Er=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft)if(ft.active)ft.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ht.has(this))ht.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))ho(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,kr(this),In(this);let e=v,t=I;v=this,I=!0;try{return this.fn()}finally{if(v!==this)re("Active effect was not restored correctly - this is likely a Vue internal bug.");Dn(this),v=e,I=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)rr(e);this.deps=this.depsTail=void 0,kr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ht.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Dt(this))this.run()}get dirty(){return Dt(this)}},Ln=0,we,_e,I=!0,Nn,We=0,vo=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}},wo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!v||!I||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new vo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;Bn(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(ke({effect:v},e));return t}trigger(e){this.version++,We++,this.notify(e)}notify(e){er();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(ke({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{tr()}}},Nt,Q,Bt,Ce,_o,Eo,ko,Pn,$n=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Bo:zn:i?No:Hn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=Se(e);if(!n){let o;if(a&&(o=_o[t]))return o;if(t==="hasOwnProperty")return So}let s=Reflect.get(e,t,Ee(e)?e:r);if(Le(t)?Pn.has(t):ko(t))return s;if(!n)M(e,"get",t);if(i)return s;if(Ee(s)){let o=a&&Qt(t)?s:s.value;return n&&Ae(o)?$t(o):o}if(Ae(s))return n?$t(s):ir(s);return s}},Ao,Co,To,Oo,Pt=(e)=>e,Re=(e)=>Reflect.getPrototypeOf(e),Io,Do,Hn,No,zn,Bo,se=(e)=>Ae(e)?ir(e):e,Te=(e)=>Ae(e)?$t(e):e,mt,qo,Kn=()=>{},Wo,Yn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:s})=>{if(!t){let l={};Js(l),T(e,n)((d)=>{_n(e,d,i)},{scope:l});return}if(t==="key")return Xo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let o=T(e,n);a(()=>o((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>pn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},W,Gn,oa;var Zn=Ci(()=>{z=[];Dr=[],Nr=[],Br=[];Je=new MutationObserver(Ge);Y=[];je=[];Wi={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 Yi;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=Ur(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)}};jr={};Fr=Qi;Ke={};ye=new Map,Jr=Symbol();en=[];G=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",St,"teleport"];nn=[];Me((e,t)=>{if(Qe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(L(e,(r)=>r._x_deferInit))t._x_ignore=!0});Wt=[],an=[];fn=[];Ct=[];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")Os(e,r,t);else Ts(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=bn(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})})})};zs=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);H={};wn={};En={};Zs={get reactive(){return ue},get release(){return fe},get effect(){return oe},get raw(){return Lr},get transaction(){return zi},version:"3.17.4",flushAndStopDeferringMutations:Vi,dontAutoEvaluateFunctions:Kr,disableEffectScheduling:$i,startObservingMutations:qt,stopObservingMutations:Hr,setReactivityEngine:Ri,onAttributeRemoved:$r,onAttributesAdded:Pr,closestDataStack:de,skipDuringClone:U,onlyDuringClone:ds,addRootSelector:dn,addInitSelector:un,setErrorHandler:Zi,interceptClone:Me,addScopeToNode:Oe,deferMutations:Ki,mapAttributes:Vt,evaluateLater:T,interceptInit:vs,initInterceptors:Ft,injectMagics:Fe,setEvaluator:es,setRawEvaluator:ts,mergeProxies:ee,extractProp:Fs,findClosest:L,onElRemoved:zt,closestRoot:et,destroyTree:ae,interceptor:qr,transition:Lt,setStyles:tt,mutateDom:_,deferInit:bs,directive:E,entangle:vn,throttle:xn,debounce:yn,evaluate:Z,evaluateRaw:ns,initTree:P,nextTick:Jt,prefixed:he,prefix:is,plugin:Ks,magic:D,store:Vs,start:ys,clone:fs,cloneNode:us,bound:js,$data:zr,watch:Ir,walk:te,data:Gs,bind:Ys},be=Zs,_r=new WeakMap,kn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}kn.add(t)});Qs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Pa=Object.freeze({}),$a=Object.freeze([]),ke=Object.assign,oo=Object.prototype.hasOwnProperty,Se=Array.isArray,lo=Object.prototype.toString,co=/-\w/g,Ra=rt((e)=>e.replace(co,(t)=>t.slice(1).toUpperCase())),uo=/\B([A-Z])/g,Ha=rt((e)=>e.replace(uo,"-$1").toLowerCase()),Mn=rt((e)=>e.charAt(0).toUpperCase()+e.slice(1)),za=rt((e)=>e?`on${Mn(e)}`:""),Ua=Cn(fo+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ht=new WeakSet;Nn=[];Nt=new WeakMap,Q=Symbol("Object iterate"),Bt=Symbol("Map keys iterate"),Ce=Symbol("Array iterate");_o={__proto__:null,[Symbol.iterator](){return bt(this,Symbol.iterator,(e)=>N(this,e))},concat(...e){return le(this).concat(...e.map((t)=>Se(t)?le(t):t))},entries(){return bt(this,"entries",(e)=>(e[1]=N(this,e[1]),e))},every(e,t){return R(this,"every",e,t,void 0,arguments)},filter(e,t){return R(this,"filter",e,t,(r)=>r.map((n)=>N(this,n)),arguments)},find(e,t){return R(this,"find",e,t,(r)=>N(this,r),arguments)},findIndex(e,t){return R(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return R(this,"findLast",e,t,(r)=>N(this,r),arguments)},findLastIndex(e,t){return R(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return R(this,"forEach",e,t,void 0,arguments)},includes(...e){return pt(this,"includes",e)},indexOf(...e){return pt(this,"indexOf",e)},join(e){return le(this).join(e)},lastIndexOf(...e){return pt(this,"lastIndexOf",e)},map(e,t){return R(this,"map",e,t,void 0,arguments)},pop(){return ge(this,"pop")},push(...e){return ge(this,"push",e)},reduce(e,...t){return Sr(this,"reduce",e,t)},reduceRight(e,...t){return Sr(this,"reduceRight",e,t)},shift(){return ge(this,"shift")},some(e,t){return R(this,"some",e,t,void 0,arguments)},splice(...e){return ge(this,"splice",e)},toReversed(){return le(this).toReversed()},toSorted(e){return le(this).toSorted(e)},toSpliced(...e){return le(this).toSpliced(...e)},unshift(...e){return ge(this,"unshift",e)},values(){return bt(this,"values",(e)=>N(this,e))}};Eo=Array.prototype;ko=Cn("__proto__,__v_isRef,__isVue"),Pn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Le));Ao=class extends $n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=Se(e)&&Qt(t);if(!this._isShallow){let l=ne(i);if(!ie(r)&&!ne(r))i=w(i),r=w(r);if(!a&&Ee(i)&&!Ee(r))if(l)return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=a?Number(t)<e.length:It(e,t),o=Reflect.set(e,t,r,Ee(e)?e:n);if(e===w(n)&&o){if(!s)F(e,"add",t,r);else if(J(r,i))F(e,"set",t,r,i)}return o}deleteProperty(e,t){let r=It(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)F(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Le(t)||!Pn.has(t))M(e,"has",t);return r}ownKeys(e){return M(e,"iterate",Se(e)?"length":Q),Reflect.ownKeys(e)}},Co=class extends $n{constructor(e=!1){super(!0,e)}set(e,t){return re(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return re(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},To=new Ao,Oo=new Co;Io={get:Rn(!1,!1)},Do={get:Rn(!0,!1)};Hn=new WeakMap,No=new WeakMap,zn=new WeakMap,Bo=new WeakMap;D("nextTick",()=>Jt);D("dispatch",(e)=>xe.bind(xe,e));D("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),o=Ir(()=>{let l;return a((c)=>l=c),l},i);r(o)});D("store",Ws);D("data",(e)=>zr(e));D("root",(e)=>et(e));D("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=ee(Ro(e)),e._x_refs_proxy});mt={};D("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Uo(e,i,t,()=>{let a=Ho(e,r),s=a?a._x_ids[r]:jn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Me((e,t)=>{if(e._x_id)t._x_id=e._x_id});D("el",(e)=>e);Fn("Focus","focus","focus");Fn("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=vn({get(){return d()},set(b){u(b)}},{get(){return s()},set(b){l(b)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")B("x-teleport can only be used on a <template> tag",e);let i=Cr(r),a=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=a,a._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),a.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((o)=>{a.addEventListener(o,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Oe(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)};_(()=>{U(()=>{s(a,i,t),P(a)})()}),e._x_teleportPutBack=()=>{let o=Cr(r);_(()=>{s(e._x_teleport,o,t)})},n(()=>_(()=>{a.remove(),ae(a)}))});qo=document.createElement("div");Kn.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",Kn);E("effect",U((e,{expression:t},{effect:r})=>{r(T(e,t))}));Wo=["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=L(e,(h)=>h!==e);let s=T(a,r),o;if(typeof r==="string")o=T(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")o=T(a,`${r()} = __placeholder`);else o=()=>{};let l=()=>{let h;return s((m)=>h=m),Or(h)?h.get():h},c=(h)=>{let m;if(s((g)=>m=g),Or(m))m.set(h);else o(()=>{},{scope:{__placeholder:h}})};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"),b=d||u||f,p;if(K)p=()=>{};else if(b){let h=[],m=(g)=>c(ze(e,t,g,l()));if(d)h.push(ce(e,"change",t,m));if(u){if(h.push(ce(e,"blur",t,m)),e.form){let g=e.form,S=()=>m({target:e});if(!g._x_pendingModelUpdates)g._x_pendingModelUpdates=[];g._x_pendingModelUpdates.push(S),i(()=>{if(g._x_pendingModelUpdates)g._x_pendingModelUpdates.splice(g._x_pendingModelUpdates.indexOf(S),1)})}}if(f)h.push(ce(e,"keydown",t,(g)=>{if(g.key==="Enter")m(g)}));p=()=>h.forEach((g)=>g())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";p=ce(e,h,t,(m)=>{c(ze(e,t,m,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ve(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(ze(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=p,i(()=>e._x_removeModelListeners.default()),e.form){let h=ce(e.form,"reset",[],(m)=>{Jt(()=>e._x_model&&e._x_model.set(ze(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){c(h)},setWithModifiers:Vn(t,c)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";_(()=>{if(Ve(e))if(Array.isArray(h))e.checked=h.some((m)=>m==e.value);else e.checked=!!h;else if(Zt(e))if(typeof h==="boolean")e.checked=Ue(e.value)===h;else e.checked=e.value==h;else pn(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(()=>_(()=>e.removeAttribute(he("cloak")))));un(()=>`[${he("init")}]`);E("init",U((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)=>ae(s)),e.innerHTML=a??"",e._x_ignoreSelf=!0,P(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Vt(Xr(":",Zr(he("bind:"))));Yn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Yn);dn(()=>`[${he("data")}]`);W=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Qo(e))return;let n=e[W];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Fe(i,e);let a={};Xs(a,i);let s=Z(e,t,{scope:a});if(s===void 0||s===!0)s={};Fe(s,e);let o;if(n?.reactiveData){o=n.reactiveData,Zo(o,s);let c={expression:t};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})}else o=ue(s);Ft(o,r);let l=Oe(e,o);U(()=>{o.init&&Z(e,o.init)})(),r(()=>{o.destroy&&Z(e,o.destroy),l();let c={reactiveData:o};e[W]=c,queueMicrotask(()=>{if(e[W]===c)delete e[W]})})});Me((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=T(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=Mt((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",U((e,{expression:t},{effect:r,cleanup:n})=>{let i=ra(t),a=T(e,i.items),s=T(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>ta(e,i,a,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((o)=>_(()=>{ae(o),o.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Jn.inline=(e,{expression:t},{cleanup:r})=>{let n=et(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Jn);E("if",U((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")B("x-if can only be used on a <template> tag",e);let i=T(e,t),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let o=e.content.cloneNode(!0).firstElementChild;return Oe(o,{},e),_(()=>{e.after(o),P(o)}),e._x_currentIfEl=o,e._x_lastRenderedEl=o,e._x_undoIf=()=>{_(()=>{ae(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)=>zo(e,i))});Me((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Vt(Xr("@",Zr(he("on:"))));E("on",U((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=n?T(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=ce(e,t,r,(o)=>{a(()=>{},{scope:{$event:o},params:[o]})});i(()=>s())}));nt("Collapse","collapse","collapse");nt("Intersect","intersect","intersect");nt("Focus","trap","focus");nt("Mask","mask","mask");E("html",(e,{expression:t})=>{Xe(Error("Using the x-html directive is prohibited in the CSP build"),e)});be.setEvaluator(io);be.setRawEvaluator(no);be.setReactivityEngine({reactive:ir,effect:(e,t={})=>{let r;return r=mo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:go,raw:w});Gn=be,oa=Gn;/*! Bundled license information:
8
8
 
9
9
  @vue/shared/dist/shared.esm-bundler.js:
10
10
  (**
@@ -19,7 +19,7 @@ ${r?'Expression: "'+r+`"
19
19
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
20
20
  * @license MIT
21
21
  **)
22
- */});var Be=typeof HTMLElement==="function"?HTMLElement:class{};function br(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function pr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var Ci=Symbol.for("bare-v3.styles");function Pe(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[Ci]??=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 o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Le=null;function Zn(){if(Le)return Le;let e=(Xn(),_i(Gn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Le=e}var Qn=(e)=>Zn().reactive(e),ir=(e)=>Le?Le.raw(e):e;function ei(e,t,r){let n=Zn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function oa(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,c=0,d=null,u=new n.MutationObserver((b)=>{if(!o.isConnected||b.some(({target:p})=>s.contains(p)&&!d.contains(p)))f()});function f(){if(!o)return;n.clearTimeout(c),u.disconnect();let b=o.dataset.b3Confirm;if(l&&b&&o.textContent===b)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function h(b){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;o=b,a=n.performance.now(),s=b.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||b.parentElement;let m=b.dataset.b3Confirm;if(m)l=[...b.childNodes],b.replaceChildren(m);b.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(o===b)p.textContent=m||"Press again to confirm"})}e.addEventListener("click",(b)=>{let p=b.target.closest?.("[data-b3-confirm]");if(o&&p!==o)f();if(!p||p.disabled||!e.contains(p))return;if(p===o&&n.performance.now()-a>=350)return f();if(b.preventDefault(),b.stopImmediatePropagation(),p!==o)h(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:b})=>{if(b===o)n.queueMicrotask(()=>b===o&&f())},i),e.addEventListener("keydown",(b)=>{let p=b;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var ti=Symbol.for("bare-v3.confirm");function ri(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[ti])return;e[ti]=!0,oa(document)}var he=1.001,aa=320,la=30,ca=350,da="b3-image-viewer-style",ua=`
22
+ */});var Pe=typeof HTMLElement==="function"?HTMLElement:class{};function pr(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function mr(e,t,r={},n=[]){let i=()=>{for(let 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 Ti=Symbol.for("bare-v3.styles");function $e(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[Ti]??=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 Ie=null;function Qn(){if(Ie)return Ie;let e=(Zn(),Ei(Xn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Ie=e}var ei=(e)=>Qn().reactive(e),sr=(e)=>Ie?Ie.raw(e):e;function ti(e,t,r){let n=Qn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function aa(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((p)=>{if(!a.isConnected||p.some(({target:h})=>s.contains(h)&&!d.contains(h)))f()});function f(){if(!a)return;n.clearTimeout(c),u.disconnect();let p=a.dataset.b3Confirm;if(l&&p&&a.textContent===p)a.replaceChildren(...l);a.removeAttribute("data-b3-armed"),a=s=l=null,d.textContent=""}function b(p){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let h=d;a=p,o=n.performance.now(),s=p.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||p.parentElement;let m=p.dataset.b3Confirm;if(m)l=[...p.childNodes],p.replaceChildren(m);p.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===p)h.textContent=m||"Press again to confirm"})}e.addEventListener("click",(p)=>{let h=p.target.closest?.("[data-b3-confirm]");if(a&&h!==a)f();if(!h||h.disabled||!e.contains(h))return;if(h===a&&n.performance.now()-o>=350)return f();if(p.preventDefault(),p.stopImmediatePropagation(),h!==a)b(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:p})=>{if(p===a)n.queueMicrotask(()=>p===a&&f())},i),e.addEventListener("keydown",(p)=>{let h=p;if(h.key==="Escape")f();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var ri=Symbol.for("bare-v3.confirm");function ni(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[ri])return;e[ri]=!0,aa(document)}var pe=1.001,la=320,ca=30,da=350,ua="b3-image-viewer-style",fa=`
23
23
  .b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
24
24
  background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
25
25
  border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
@@ -38,9 +38,9 @@ ${r?'Expression: "'+r+`"
38
38
  min-height:44px;min-width:44px;}
39
39
  .b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
40
40
  .b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
41
- `;class sr extends Be{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#l=!1;#o=null;#i=new Map;#c=!1;#p=0;#r=0;#m=0;#v=0;#S=!1;#w=null;#g=null;#A=new WeakSet;#d=null;get scale(){return this.#t}get fitted(){return this.#t<=he}get src(){return this.#d??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#d=e.src??e.default??String(e);else if(this.#d=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.#S)return;if(this.#S=!0,Pe(this.ownerDocument,da,ua),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.#g=new MutationObserver(()=>{this.#C(),this.#s()}),this.#g.observe(this,{childList:!0}),this.#C(),this.#s()}disconnectedCallback(){this.#w?.abort(),this.#w=null,this.#g?.disconnect(),this.#g=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#o=null,this.#c=!1,this.#S=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#C(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#h(),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.#a(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")}#a(e){if(this.#A.has(e))return;if(this.#A.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#y(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#y(e)},0)}#y(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}}))}#C(){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)}#u(){let e=this.#h();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.#l=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.#t<=he&&!this.#l){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#s(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=he,n=!r||this.#l;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#k(e,t,r,n=this.#u()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#f(n),this.#s(n),i!==this.#t)this.#T()}#T(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#u();if(t)this.#f(t);if(this.#s(t),e)this.#T()}zoomTo(e){let t=this.#u();if(t)this.#k(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#O(){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}}#x(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#w=new AbortController;let e={signal:this.#w.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#o=this.#u(),this.#i.size>1||this.#t>he||this.#l)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=he&&!this.#l){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#o??=this.#u(),!this.#o)return;n.preventDefault();let o=this.#O(),s=i?this.#x():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#O(),l=i?this.#x():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,f=(o.x-c.left-this.#e)/this.#t,h=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-f*u,this.#n=a.y-c.top-h*u,this.#t=u,this.#f(this.#o),this.#s(this.#o),this.#c=!0,d!==this.#t)this.#T()},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.#o=this.#u();return}if(this.#o=null,this.#c){this.#p=performance.now(),this.#c=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#m,n.clientY-this.#v)<la;if(i-this.#r<aa&&o){this.#r=0;let s=this.getBoundingClientRect();this.#k(this.#t>he?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#p=i}else this.#r=i,this.#m=n.clientX,this.#v=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.#p<ca){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.#k(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#u();if(!o||o.h*this.#t<=o.vh&&!this.#l)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(o),this.#n===s)return;n.preventDefault(),this.#s(o)},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,o=(s,a)=>{let l=this.#u();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#f(l),this.#s(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#u();if(n)this.#f(n),this.#s(n)},e)}}var ni=sr;function or(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ni;return ni=class extends sr{},customElements.define(e,r),r}or();var fa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,ha=/(?:\s+(?!#\d+(?:\s|$))[#@][\p{L}\p{N}_-]+)+\s*$/u,ba=350,De=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),ar=(e)=>JSON.parse(JSON.stringify(ir(e))),x=(e,t)=>e!=null&&String(e)===String(t),nt=(e)=>!!e&&typeof e==="object",S=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],be=(e)=>Array.isArray(e.comments)?e.comments:[];function pa(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var fi=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function lr(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=De();t.add(String(n.id))};return e.filter(nt).map((n)=>{r(n),n.cards=fi(Array.isArray(n.cards)?n.cards.filter(nt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(nt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(nt(o))r(o)}}return n})}function ii(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>x(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=S(o),a=s.findIndex((l)=>x(l.id,r));if(a>=0)return void s.splice(a,1)}}}function ma(e,t,r){let{field:n,id:i}=r,o=(s,a,l)=>s.splice(Math.min(l,s.length),0,ir(a));if(n==="name"){let s=e.findIndex((a)=>x(a.id,i));if(s>=0&&!t.some((a)=>x(a.id,i)))o(t,e[s],s);return}for(let s of e){let a=s.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&a>=0){let l=t.find((c)=>x(c.id,s.id));if(l&&!l.cards.some((c)=>x(c.id,i)))o(l.cards,s.cards[a],a);return}if(n==="subtask")for(let l of s.cards){let c=S(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!S(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];o(d.subtasks,S(l)[c],c)}return}}}var hi=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function ga(e){return[e.title??"",e.description??"",...S(e).map((t)=>t.title??""),...ot(e),...be(e).map((t)=>t.text??"")].join(`
42
- `).toLowerCase()}var si=(e,t)=>{let r=String(t.text??"").toLowerCase();return hi(e).some((n)=>r.includes(n))},ya=/^#\d+$/;function ot(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(fa))t.add(n.toLowerCase());return[...t].filter((n)=>!ya.test(n))}var oi=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,xa=new RegExp(String.raw`!\[([^\]\n]*)\]\(${oi}\)|\[([^\]\n]+)\]\(${oi}\)|\[([^[\]\s]*\/[^[\]\s]*\.[a-z][a-z\d]{0,7}|[^[\]\s\/]+\.(?:md|markdown|txt|json|ya?ml|csv|log|pdf|png|jpe?g|gif|webp|svg|html|kanban))\](?![(\[])|\bhttps?:\/\/[^\s<>]+`,"giu"),va=new Set(["javascript","data","vbscript","file","blob","about"]),wa=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function _a(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!va.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var ai=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean),li=(e)=>(e??"").toLowerCase().split(",").map((t)=>t.trim()).filter(Boolean),cr=(e,t)=>!!t&&e.includes(String(t.name??"").trim().toLowerCase());function ur(e,t=[]){let r=[],n=0;for(let i of e.matchAll(xa)){let o=i[2]!==void 0,[s]=i,a=o?i[1]:i[3]??i[5],l=o?i[2]:i[4]??i[5],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=a=l=u}else l=wa(l);let d=_a(l,t);if(!d||o&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:a,...d,...o?{image:o}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var ci=(e,t=[])=>ur(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),dr=null;function Ea(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...ur(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let o=n.createElement("a");if(o.className="b3-board-ref",o.href=i.href,o.dataset.href=i.href,o.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,o.classList.add("b3-board-image"),o.append(s),i.file)o.dataset.file="";else o.target="_blank",o.rel="noopener noreferrer";return o}if(i.file){if(o.dataset.file="",!dr){let s=n.createElement("template");s.innerHTML=Ca,dr=s.content.firstElementChild}o.append(dr.cloneNode(!0))}else if(/^https?:/i.test(i.href))o.target="_blank",o.rel="noopener noreferrer";return o.append(i.text),o}))}var ka="b3-board-style",Sa=`
41
+ `;class or extends Pe{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#l=!1;#o=null;#i=new Map;#c=!1;#m=0;#r=0;#g=0;#v=0;#S=!1;#w=null;#y=null;#A=new WeakSet;#d=null;get scale(){return this.#t}get fitted(){return this.#t<=pe}get src(){return this.#d??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#d=e.src??e.default??String(e);else if(this.#d=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.#S)return;if(this.#S=!0,$e(this.ownerDocument,ua,fa),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.#y=new MutationObserver(()=>{this.#C(),this.#s()}),this.#y.observe(this,{childList:!0}),this.#C(),this.#s()}disconnectedCallback(){this.#w?.abort(),this.#w=null,this.#y?.disconnect(),this.#y=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#o=null,this.#c=!1,this.#S=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#C(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#h(),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.#a(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")}#a(e){if(this.#A.has(e))return;if(this.#A.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#b(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#b(e)},0)}#b(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}}))}#C(){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)}#u(){let e=this.#h();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.#l=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.#t<=pe&&!this.#l){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#s(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=pe,n=!r||this.#l;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#k(e,t,r,n=this.#u()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let a=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-a*e,this.#n=r-s*e,this.#t=e,this.#f(n),this.#s(n),i!==this.#t)this.#T()}#T(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#u();if(t)this.#f(t);if(this.#s(t),e)this.#T()}zoomTo(e){let t=this.#u();if(t)this.#k(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#O(){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}}#x(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#w=new AbortController;let e={signal:this.#w.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#o=this.#u(),this.#i.size>1||this.#t>pe||this.#l)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=pe&&!this.#l){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#o??=this.#u(),!this.#o)return;n.preventDefault();let a=this.#O(),s=i?this.#x():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let o=this.#O(),l=i?this.#x():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,f=(a.x-c.left-this.#e)/this.#t,b=(a.y-c.top-this.#n)/this.#t;if(this.#e=o.x-c.left-f*u,this.#n=o.y-c.top-b*u,this.#t=u,this.#f(this.#o),this.#s(this.#o),this.#c=!0,d!==this.#t)this.#T()},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.#o=this.#u();return}if(this.#o=null,this.#c){this.#m=performance.now(),this.#c=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),a=Math.hypot(n.clientX-this.#g,n.clientY-this.#v)<ca;if(i-this.#r<la&&a){this.#r=0;let s=this.getBoundingClientRect();this.#k(this.#t>pe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#m=i}else this.#r=i,this.#g=n.clientX,this.#v=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.#m<da){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.#k(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let a=this.#u();if(!a||a.h*this.#t<=a.vh&&!this.#l)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(a),this.#n===s)return;n.preventDefault(),this.#s(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.#u();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=o,this.#f(l),this.#s(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!a(i,0))return;break;case"ArrowRight":if(!a(-i,0))return;break;case"ArrowUp":if(!a(0,i))return;break;case"ArrowDown":if(!a(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#u();if(n)this.#f(n),this.#s(n)},e)}}var ii=or;function ar(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ii;return ii=class extends or{},customElements.define(e,r),r}ar();var ha=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,ba=/(?:\s+(?!#\d+(?:\s|$))[#@][\p{L}\p{N}_-]+)+\s*$/u,pa=350,Ne=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),lr=(e)=>JSON.parse(JSON.stringify(sr(e))),x=(e,t)=>e!=null&&String(e)===String(t),it=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],V=(e)=>Array.isArray(e.comments)?e.comments:[];function ma(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,a]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=a)return`${Math.floor(n/a)}${i} ago`;return`${n}m ago`}var hi=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function cr(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ne();t.add(String(n.id))};return e.filter(it).map((n)=>{r(n),n.cards=hi(Array.isArray(n.cards)?n.cards.filter(it):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(it(a))r(a)}if(Array.isArray(i.comments)){for(let a of i.comments)if(it(a))r(a)}}return n})}function si(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((a)=>x(a.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let a of n.cards){let s=C(a),o=s.findIndex((l)=>x(l.id,r));if(o>=0)return void s.splice(o,1)}}}function ga(e,t,r){let{field:n,id:i}=r,a=(s,o,l)=>s.splice(Math.min(l,s.length),0,sr(o));if(n==="name"){let s=e.findIndex((o)=>x(o.id,i));if(s>=0&&!t.some((o)=>x(o.id,i)))a(t,e[s],s);return}for(let s of e){let o=s.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&o>=0){let l=t.find((c)=>x(c.id,s.id));if(l&&!l.cards.some((c)=>x(c.id,i)))a(l.cards,s.cards[o],o);return}if(n==="subtask")for(let l of s.cards){let c=C(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!C(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];a(d.subtasks,C(l)[c],c)}return}}}var bi=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function ya(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...at(e),...V(e).map((t)=>t.text??"")].join(`
42
+ `).toLowerCase()}var oi=(e,t)=>{let r=String(t.text??"").toLowerCase();return bi(e).some((n)=>r.includes(n))},xa=/^#\d+$/;function at(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
43
+ `);for(let[,,n]of r.matchAll(ha))t.add(n.toLowerCase());return[...t].filter((n)=>!xa.test(n))}var ai=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,va=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ai}\)|\[([^\]\n]+)\]\(${ai}\)|\[([^[\]\s]*\/[^[\]\s]*\.[a-z][a-z\d]{0,7}|[^[\]\s\/]+\.(?:md|markdown|txt|json|ya?ml|csv|log|pdf|png|jpe?g|gif|webp|svg|html|kanban))\](?![(\[])|\bhttps?:\/\/[^\s<>]+`,"giu"),wa=new Set(["javascript","data","vbscript","file","blob","about"]),_a=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function Ea(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!wa.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var li=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean),ci=(e)=>(e??"").toLowerCase().split(",").map((t)=>t.trim()).filter(Boolean),dr=(e,t)=>!!t&&e.includes(String(t.name??"").trim().toLowerCase());function fr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(va)){let a=i[2]!==void 0,[s]=i,o=a?i[1]:i[3]??i[5],l=a?i[2]:i[4]??i[5],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=o=l=u}else l=_a(l);let d=Ea(l,t);if(!d||a&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:o,...d,...a?{image:a}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var di=(e,t=[])=>fr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),ur=null;function ka(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...fr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let a=n.createElement("a");if(a.className="b3-board-ref",a.href=i.href,a.dataset.href=i.href,a.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,a.classList.add("b3-board-image"),a.append(s),i.file)a.dataset.file="";else a.target="_blank",a.rel="noopener noreferrer";return a}if(i.file){if(a.dataset.file="",!ur){let s=n.createElement("template");s.innerHTML=Ta,ur=s.content.firstElementChild}a.append(ur.cloneNode(!0))}else if(/^https?:/i.test(i.href))a.target="_blank",a.rel="noopener noreferrer";return a.append(i.text),a}))}var Sa="b3-board-style",Aa=`
44
44
  :where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
45
45
  --b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
46
46
  --b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
@@ -232,9 +232,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
232
232
  .b3-board-keys dd{margin:0;color:var(--b3-color-muted);}
233
233
  .b3-board-keys kbd{padding:0 .375rem;border:1px solid var(--b3-board-line);border-radius:.25rem;font:inherit;font-size:.75rem;white-space:nowrap;}
234
234
  @media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-card[data-b3-bump]{animation:none;}.b3-board-ghost{rotate:none;}}
235
- `,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,di=z('<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"/>'),it=z('<path d="M5 12h14M12 5v14"/>'),st=z('<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"/>'),Aa=z('<path d="m9 18 6-6-6-6"/>'),Ca=z('<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"/>'),ui=z('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),Ta=z('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Oa=z('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),Ma=z('<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"/>'),Ie=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
235
+ `,q=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ui=q('<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"/>'),st=q('<path d="M5 12h14M12 5v14"/>'),ot=q('<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"/>'),Ca=q('<path d="m9 18 6-6-6-6"/>'),Ta=q('<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"/>'),fi=q('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),Oa=q('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Ma=q('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),La=q('<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"/>'),De=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
236
236
  <textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
237
- b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,La=`
237
+ b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Ia=`
238
238
  <div class="b3-board-filters" b3x-bind:hidden="!tokens().length && !searchable" role="group" aria-label="Filter" b3x-on:keydown="keyTags($event)">
239
239
  <span class="b3-board-caption" aria-hidden="true" b3x-show="tokens().length">Filter</span>
240
240
  <template b3x-for="token in tokens()" b3x-bind:key="token">
@@ -242,7 +242,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
242
242
  </template>
243
243
  <button type="button" class="b3-board-link" b3x-show="filter.length" b3x-on:click="setFilter([])">Clear</button>
244
244
  <span class="b3-board-search" b3x-show="searchable" b3x-bind:data-open="searchShown() ? '' : null">
245
- <button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Oa}</button>
245
+ <button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Ma}</button>
246
246
  <input type="search" class="b3-board-search-input" b3x-bind:hidden="!searchShown()" b3x-bind:value="search" placeholder="Search" aria-label="Search cards"
247
247
  spellcheck="false" autocomplete="off" enterkeyhint="search" b3x-on:input="typeSearch($event)" b3x-on:keydown="keySearch($event)" b3x-on:blur="blurSearch()">
248
248
  </span>
@@ -251,30 +251,30 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
251
251
  <template b3x-for="column in columns" b3x-bind:key="column.id">
252
252
  <section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
253
253
  <header class="b3-board-column-header">
254
- ${Ie("name","column.id",!1)}
254
+ ${De("name","column.id",!1)}
255
255
  <button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
256
256
  b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
257
257
  <span class="b3-board-count" b3x-text="count(column)"></span>
258
258
  <button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
259
- b3x-on:click="addCard(column)">${it}</button>
259
+ b3x-on:click="addCard(column)">${st}</button>
260
260
  <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')"
261
- b3x-on:click="removeColumn(column)">${st}</button>
261
+ b3x-on:click="removeColumn(column)">${ot}</button>
262
262
  </header>
263
263
  <ol class="b3-board-cards">
264
264
  <template b3x-for="card in visible(column)" b3x-bind:key="card.id">
265
265
  <li class="b3-board-card" tabindex="0" b3x-bind:data-card="card.id" b3x-bind:data-starred="card.starred ? '' : null" b3x-bind:data-b3-selected="isSelected(card) ? '' : null" b3x-on:keydown="keyCard($event, card)">
266
- <span class="b3-board-grip" b3x-show="!readonly">${di}</span>
266
+ <span class="b3-board-grip" b3x-show="!readonly">${ui}</span>
267
267
  <div class="b3-board-card-head">
268
- ${Ie("title","card.id")}
268
+ ${De("title","card.id")}
269
269
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
270
270
  b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
271
271
  <span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
272
272
  <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)"
273
- b3x-on:click="addDetails(card)">${Ta}</button>
273
+ b3x-on:click="addDetails(card)">${Oa}</button>
274
274
  <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)"
275
- b3x-on:click="removeCard(column, card)">${st}</button>
275
+ b3x-on:click="removeCard(column, card)">${ot}</button>
276
276
  <button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
277
- b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${Ma}</button>
277
+ b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${La}</button>
278
278
  </span>
279
279
  </div>
280
280
  <div class="b3-board-tags" b3x-show="tokensOf(card).length">
@@ -285,9 +285,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
285
285
  <div class="b3-board-foot" b3x-show="(disclosable(card) && (hasDetails(card) || isOpen(card))) || ago(card.updated)">
286
286
  <button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
287
287
  b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
288
- ${Aa}
288
+ ${Ca}
289
289
  <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>
290
- <span class="b3-board-talk" b3x-bind:data-match="said(card) ? '' : null" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${ui}<span b3x-text="commentsOf(card).length"></span></span>
290
+ <span class="b3-board-talk" b3x-bind:data-match="said(card) ? '' : null" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${fi}<span b3x-text="commentsOf(card).length"></span></span>
291
291
  <span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
292
292
  <span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length && !commentsOf(card).length">Hide details</span>
293
293
  </button>
@@ -295,19 +295,19 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
295
295
  </div>
296
296
  <template b3x-if="isOpen(card)">
297
297
  <div class="b3-board-body">
298
- ${Ie("description","card.id")}
298
+ ${De("description","card.id")}
299
299
  <div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
300
300
  b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
301
301
  b3x-effect="rich($el, card.description)"></div>
302
302
  <ul class="b3-board-subtasks">
303
303
  <template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
304
304
  <li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
305
- <span class="b3-board-subtask-grip" b3x-show="!readonly">${di}</span>
305
+ <span class="b3-board-subtask-grip" b3x-show="!readonly">${ui}</span>
306
306
  <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)">
307
- ${Ie("subtask","sub.id",!1)}
307
+ ${De("subtask","sub.id",!1)}
308
308
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
309
309
  b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
310
- <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)">${st}</button>
310
+ <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)">${ot}</button>
311
311
  </li>
312
312
  </template>
313
313
  </ul>
@@ -316,15 +316,15 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
316
316
  <li class="b3-board-comment" b3x-bind:data-comment="comment.id" b3x-bind:data-match="hits(search, comment) ? '' : null">
317
317
  <span class="b3-board-comment-meta"><b b3x-text="comment.by || 'you'"></b> · <span b3x-bind:title="comment.at || null" b3x-text="ago(comment.at)"></span></span>
318
318
  <div class="b3-board-comment-text" b3x-effect="rich($el, comment.text)"></div>
319
- <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" aria-label="Delete comment" b3x-on:click="removeComment(card, comment)">${st}</button>
319
+ <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" aria-label="Delete comment" b3x-on:click="removeComment(card, comment)">${ot}</button>
320
320
  </li>
321
321
  </template>
322
322
  </ul>
323
- ${Ie("comment","card.id")}
323
+ ${De("comment","card.id")}
324
324
  <div class="b3-board-actions" b3x-show="!readonly">
325
- <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${it}<span>Add details</span></button>
326
- <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${it}<span>Add subtask</span></button>
327
- <button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${ui}<span>Comment</span></button>
325
+ <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${st}<span>Add details</span></button>
326
+ <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${st}<span>Add subtask</span></button>
327
+ <button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${fi}<span>Comment</span></button>
328
328
  </div>
329
329
  </div>
330
330
  </template>
@@ -333,10 +333,10 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
333
333
  </ol>
334
334
  </section>
335
335
  </template>
336
- <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${it}<span>Add column</span></button>
336
+ <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${st}<span>Add column</span></button>
337
337
  </div>
338
- <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class bi extends Be{static observedAttributes=["readonly","search","link-schemes","searchable","expand-in"];#t=null;#e=null;#n=null;#l=null;#o=null;#i=!1;#c=null;#p=null;#r=null;#m=!1;#v=null;#S=0;#w=Math.random().toString(36).slice(2,8);#g=!1;#A=[];#d={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=ar(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)ii(e,t);return e}set columns(e){let t=lr(ar(e));if(!this.#e){this.#n=t;return}this.#b();let r=this.#j();if(r)this.#F(r);let n=this.#e;if(n.editing?.fresh)ma(n.columns,t,n.editing);if(n.columns=t,n.editing&&!this.#a(n.editing.id))n.editing=null;if(!this.#h)this.#d={past:[],future:[],now:null,key:"",at:0};this.#d.now=this.columns}undo(){return this.#_(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#_(1)}get canUndo(){return!this.readonly&&(this.#d.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#d.future.length>0}#_(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#d,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let o=new Map(t.columns.flatMap((a)=>a.cards.map((l)=>[String(l.id),l.expanded]))),s=lr(ar(i));for(let a of s)for(let l of a.cards){let c=o.get(String(l.id));if(o.has(String(l.id)))if(c===void 0)delete l.expanded;else l.expanded=c}return this.#b(),t.columns=s,r.now=this.columns,this.#s(e<0?"Undone":"Redone"),this.#E({type:e<0?"undo":"redo"}),!0}#E(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#l??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#l=t}get search(){return this.#e?.search??this.#o??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#o=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.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((o)=>x(o.id,r))??t.columns.find((o)=>String(o.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.#v}set upload(e){this.#v=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Pe(e,ka,Sa),ri(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=lr(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=ei(this.#t,La,this.#C(r??[],this.#l??[],this.#o??this.getAttribute("search")??"")),this.#n=this.#l=this.#o=null,this.#d.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#p=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#p.observe(this,{childList:!0}),this.#K(),pr(this,this.#c.signal,{role:"region"})}disconnectedCallback(){this.#b(),this.#c?.abort(),this.#c=null,this.#$(),this.#p?.disconnect(),this.#p=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=ai(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(e==="expand-in")return void(this.#e.expandIn=li(r));if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#b(),this.#e.editing=null}#a(e){for(let t of this.#e?.columns??[]){if(x(t.id,e))return t;for(let r of t.cards)if(x(r.id,e)||S(r).some((n)=>x(n.id,e)))return r}return null}#y(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#a(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#d,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#E(e)}#C(e,t,r){let n=this,i=(a)=>this.#y(a),o=(a)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>x(d.id,a));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Qn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),expandIn:li(n.getAttribute("expand-in")),searching:!1,schemes:ai(n.getAttribute("link-schemes")),viewed:{},selected:null,tokensOf:ot,subtasksOf:S,commentsOf:be,hits:si,said(a){return be(a).some((l)=>si(s.search,l))},now:Date.now(),ago(a){return pa(a,s.now)},label(a){let l=String(a??"");return l.replace(ha,"").trim()||l},pressed(a){return String(s.filter.includes(a))},mention(a){return a.startsWith("@")?"":null},starred(a){return String(!!a.starred)},hasDetails(a){return!!(a.description||S(a).length||be(a).length)},complete(a){let l=S(a).length;return l>0&&s.done(a)===l},preview(a){let l=String(a.description??"");return l.split(`
339
- `).map((d)=>ci(d,s.schemes)).find((d)=>d.trim())?.trim()??(ur(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return ci(s.label(a),s.schemes)},rich(a,l){Ea(a,String(l??""),s.schemes)},keyText(a,l,c,d){if(a.target!==a.currentTarget||a.key!=="Enter"&&a.key!==" ")return;a.preventDefault(),a.stopPropagation(),s.edit(l,c,d)},isOpen(a){let l=s.viewed[String(a.id)];return s.readonly&&l!==void 0?l:a.expanded??(s.hasDetails(a)&&cr(s.expandIn,s.columns.find((c)=>c.cards.some((d)=>x(d.id,a.id)))))},expanded(a){return String(s.isOpen(a))},isSelected(a){return x(s.selected,a.id)},isEditing(a,l){return!!s.editing&&s.editing.field===a&&s.editing.id===l},focusEditor(a){queueMicrotask(()=>n.#T(a))},blurEditor(a,l){if(s.isEditing(a,l))s.commit()},tokens(){let a=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of ot(c))a.add(d);return[...a].sort()},visible(a){let l=hi(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#a(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((h)=>x(d.id,h)))return!0;let u=ot(d),f=l.length?ga(d):"";return s.filter.every((h)=>u.includes(h))&&l.every((h)=>f.includes(h))})},count(a){let l=s.visible(a).length;return l===a.cards.length?String(l):`${l}/${a.cards.length}`},done(a){return S(a).filter((l)=>l.done).length},disclosable(a){return!!(s.hasDetails(a)||!s.readonly)},toggleFilter(a){s.kept=[],s.filter=s.filter.includes(a)?s.filter.filter((l)=>l!==a):[...s.filter,a]},setFilter(a){s.kept=[],s.filter=a},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let a=n.querySelector(".b3-board-search-input");if(!a)return;a.hidden=!1,a.closest(".b3-board-filters").hidden=!1,a.focus(),a.select()},typeSearch(a){n.search=a.target.value},keySearch(a){if(a.isComposing||a.keyCode===229)return;if(a.key!=="Escape"&&a.key!=="Enter")return;a.preventDefault(),a.stopPropagation();let l=a.target;if(a.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(a){if(s.readonly)return;if(s.editing)s.commit();let l=o(a.id),c=l?.card;if(!l||!c)return;if(c.starred)delete c.starred;else c.starred=!0;l.column.cards=fi(l.column.cards);let d=!!c.starred;s.announcement=`${c.title??""} ${d?"starred":"unstarred"}`,i({type:"star",card:c.id,starred:d}),n.#B(c.id)},toggle(a){if(s.readonly){s.viewed={...s.viewed,[String(a.id)]:!s.isOpen(a)};return}a.expanded=!s.isOpen(a),i({type:"toggle",card:a.id,expanded:a.expanded})},edit(a,l,c,d=!1,u=!1,f=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(a,l))s.commit();s.editing={field:a,id:l,draft:c??"",fresh:d,opened:u,atEnd:f},n.#O()},addDetails(a,l=!1){if(s.readonly)return;let c=!s.isOpen(a);a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,c,l)},keyEditor(a,l){if(a.stopPropagation(),a.key==="Escape")a.preventDefault(),s.cancel();else if(a.key==="Enter"&&!(l&&a.shiftKey)&&!a.isComposing)a.preventDefault(),s.commit(!0);else if(a.key==="Tab"&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.isComposing&&!n.hasAttribute("compact")){let c=s.editing,d=c?.field==="title"&&!a.shiftKey?"description":c?.field==="description"&&a.shiftKey?"title":null;if(!d)return;a.preventDefault(),s.commit();let u=n.#a(c.id);if(!u||s.readonly)return;if(d==="description")s.addDetails(u,!0);else s.edit("title",u.id,String(u.title??""))}},pasteEditor(a,l,c){let d=[...a.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(a.clipboardData?.getData("text/plain").trim())return;a.preventDefault();for(let u of d)n.#u(c,u,l==="description"?a.target:null)},cancel(){let a=s.editing;if(s.editing=null,a?.fresh)s.discard(a);if(a?.opened)s.close(a);n.#P(a)},close(a){let l=n.#a(a.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(a=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#a(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==="comment"){let h=d;if(c){let b={id:De(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};h.comments=[...be(h),b],u={type:"comment",card:h.id,comment:b.id,op:"add"}}}else if(l.field==="name"){let h=d;if(c&&c!==h.name)h.name=c,u={type:"edit",column:h.id,field:"name"};if(l.fresh)u={type:"add",column:h.id}}else if(l.field==="subtask"){let h=d,b=S(h).find((p)=>x(p.id,l.id));if(!c)return s.removeSubtask(h,b);if(c!==b.title)b.title=c,u={type:"edit",card:h.id,field:"subtask",subtask:b.id};if(l.fresh)u={type:"subtask",card:h.id,subtask:b.id,op:"add"}}else{let h=d,b=l.field;if((c||b==="description")&&c!==(h[b]??""))h[b]=c,u={type:"edit",card:h.id,field:b};if(l.fresh)u={type:"add",card:h.id,column:o(h.id).column.id},s.kept=[...s.kept,h.id]}if(u)i(u);let f=n.#a(l.id)??d;if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(f);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(f,!0);else n.#P(l)},discard(a){ii(s.columns,a)},settle(){if(s.editing)s.commit()},addCard(a){if(s.readonly)return;s.settle();let l={id:De(),title:""};a.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let a={id:De(),name:"",cards:[]};s.columns.push(a),s.edit("name",a.id,"",!0)},addSubtask(a){if(s.readonly)return;s.settle();let l={id:De(),title:"",done:!1};if(a.expanded=!0,!Array.isArray(a.subtasks))a.subtasks=[];a.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(a,l){if(s.readonly)return;a.cards=a.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:a.id})},removeColumn(a){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==a),i({type:"remove",column:a.id})},removeSubtask(a,l){if(s.readonly)return;a.subtasks=S(a).filter((c)=>c!==l),i({type:"subtask",card:a.id,subtask:l.id,op:"remove"})},removeComment(a,l){if(s.readonly)return;a.comments=be(a).filter((c)=>c!==l),i({type:"comment",card:a.id,comment:l.id,op:"remove"})},check(a,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:a.id,subtask:l.id,done:c})},keyTags(a){n.#q(a)},keyCard(a,l){if(a.target!==a.currentTarget)return;if(a.key==="Enter")return a.preventDefault(),s.edit("title",l.id,l.title);if(a.metaKey||a.ctrlKey)return;if(!a.altKey)return void n.#M(a,l);if(s.readonly)return;let c=o(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[a.key];if(!u)return;if(a.preventDefault(),a.key==="ArrowUp"||a.key==="ArrowDown"){let h=s.visible(c.column),b=h[h.indexOf(c.card)+u];if(b&&!b.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(b));else n.#D(a.currentTarget,u,!b?u<0?"Already first":"Already last":l.starred?"Starred cards stay above the others — unstar it to move it lower":"Starred cards stay on top — star it to move it among them");return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.cards.length));else n.#D(a.currentTarget,0,"No column there")},keySubtask(a,l,c){s.keyText(a,"subtask",c.id,c.title);let d=a.key==="ArrowUp"?-1:a.key==="ArrowDown"?1:0;if(!a.altKey||!d||s.readonly)return;a.preventDefault(),a.stopPropagation(),n.#k(l,c.id,S(l).indexOf(c)+d)},keyColumn(a,l){if(a.metaKey||a.ctrlKey||a.shiftKey)return;let c=getComputedStyle(n).direction==="rtl",d=a.key==="ArrowLeft"?c?1:-1:a.key==="ArrowRight"?c?-1:1:0;if(!a.altKey){let f=a.currentTarget.closest(".b3-board-column"),h=[...n.querySelectorAll(".b3-board-column")],b=a.key==="ArrowDown"?f.querySelector(".b3-board-card"):d?h[h.indexOf(f)+d]?.querySelector(".b3-board-column-name"):void 0;if(b===void 0)return;if(a.preventDefault(),b)n.#x(b);return}if(!d||s.readonly)return;a.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#u(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&x(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#w}-${++this.#S}…]()`,s="",a=i();if(a&&r){let{selectionStart:g,selectionEnd:A}=r;s=g&&r.value[g-1]!==`
338
+ <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class pi extends Pe{static observedAttributes=["readonly","search","link-schemes","searchable","expand-in"];#t=null;#e=null;#n=null;#l=null;#o=null;#i=!1;#c=null;#m=null;#r=null;#g=!1;#v=null;#S=0;#w=Math.random().toString(36).slice(2,8);#y=!1;#A=[];#d={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=lr(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)si(e,t);return e}set columns(e){let t=cr(lr(e));if(!this.#e){this.#n=t;return}this.#p();let r=this.#j();if(r)this.#F(r);let n=this.#e;if(n.editing?.fresh)ga(n.columns,t,n.editing);if(n.columns=t,n.editing&&!this.#a(n.editing.id))n.editing=null;if(!this.#h)this.#d={past:[],future:[],now:null,key:"",at:0};this.#d.now=this.columns}undo(){return this.#_(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#_(1)}get canUndo(){return!this.readonly&&(this.#d.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#d.future.length>0}#_(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#d,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let a=new Map(t.columns.flatMap((o)=>o.cards.map((l)=>[String(l.id),l.expanded]))),s=cr(lr(i));for(let o of s)for(let l of o.cards){let c=a.get(String(l.id));if(a.has(String(l.id)))if(c===void 0)delete l.expanded;else l.expanded=c}return this.#p(),t.columns=s,r.now=this.columns,this.#s(e<0?"Undone":"Redone"),this.#E({type:e<0?"undo":"redo"}),!0}#E(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#l??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#l=t}get search(){return this.#e?.search??this.#o??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#o=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.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((a)=>x(a.id,r))??t.columns.find((a)=>String(a.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#v}set upload(e){this.#v=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if($e(e,Sa,Aa),ni(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=cr(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=ti(this.#t,Ia,this.#C(r??[],this.#l??[],this.#o??this.getAttribute("search")??"")),this.#n=this.#l=this.#o=null,this.#d.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#m=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#m.observe(this,{childList:!0}),this.#K(),mr(this,this.#c.signal,{role:"region"})}disconnectedCallback(){this.#p(),this.#c?.abort(),this.#c=null,this.#$(),this.#m?.disconnect(),this.#m=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=li(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(e==="expand-in")return void(this.#e.expandIn=ci(r));if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#p(),this.#e.editing=null}#a(e){for(let t of this.#e?.columns??[]){if(x(t.id,e))return t;for(let r of t.cards)if(x(r.id,e)||C(r).some((n)=>x(n.id,e)))return r}return null}#b(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#a(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#d,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#E(e)}#C(e,t,r){let n=this,i=(o)=>this.#b(o),a=(o)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>x(d.id,o));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=ei({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),expandIn:ci(n.getAttribute("expand-in")),searching:!1,schemes:li(n.getAttribute("link-schemes")),viewed:{},selected:null,tokensOf:at,subtasksOf:C,commentsOf:V,hits:oi,said(o){return V(o).some((l)=>oi(s.search,l))},now:Date.now(),ago(o){return ma(o,s.now)},label(o){let l=String(o??"");return l.replace(ba,"").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||C(o).length||V(o).length)},complete(o){let l=C(o).length;return l>0&&s.done(o)===l},preview(o){let l=String(o.description??"");return l.split(`
339
+ `).map((d)=>di(d,s.schemes)).find((d)=>d.trim())?.trim()??(fr(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(o){return di(s.label(o),s.schemes)},rich(o,l){ka(o,String(l??""),s.schemes)},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??(s.hasDetails(o)&&dr(s.expandIn,s.columns.find((c)=>c.cards.some((d)=>x(d.id,o.id)))))},expanded(o){return String(s.isOpen(o))},isSelected(o){return x(s.selected,o.id)},isEditing(o,l){return!!s.editing&&s.editing.field===o&&s.editing.id===l},focusEditor(o){queueMicrotask(()=>n.#T(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 at(c))o.add(d);return[...o].sort()},visible(o){let l=bi(s.search);if(!s.filter.length&&!l.length)return o.cards;let c=s.editing&&n.#a(s.editing.id);return o.cards.filter((d)=>{if(d===c||s.kept.some((b)=>x(d.id,b)))return!0;let u=at(d),f=l.length?ya(d):"";return s.filter.every((b)=>u.includes(b))&&l.every((b)=>f.includes(b))})},count(o){let l=s.visible(o).length;return l===o.cards.length?String(l):`${l}/${o.cards.length}`},done(o){return C(o).filter((l)=>l.done).length},disclosable(o){return!!(s.hasDetails(o)||!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},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let o=n.querySelector(".b3-board-search-input");if(!o)return;o.hidden=!1,o.closest(".b3-board-filters").hidden=!1,o.focus(),o.select()},typeSearch(o){n.search=o.target.value},keySearch(o){if(o.isComposing||o.keyCode===229)return;if(o.key!=="Escape"&&o.key!=="Enter")return;o.preventDefault(),o.stopPropagation();let l=o.target;if(o.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(o){if(s.readonly)return;if(s.editing)s.commit();let l=a(o.id),c=l?.card;if(!l||!c)return;if(c.starred)delete c.starred;else c.starred=!0;l.column.cards=hi(l.column.cards);let d=!!c.starred;s.announcement=`${c.title??""} ${d?"starred":"unstarred"}`,i({type:"star",card:c.id,starred:d}),n.#B(c.id)},toggle(o){if(s.readonly){s.viewed={...s.viewed,[String(o.id)]:!s.isOpen(o)};return}o.expanded=!s.isOpen(o),i({type:"toggle",card:o.id,expanded:o.expanded})},edit(o,l,c,d=!1,u=!1,f=!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,atEnd:f},n.#O()},addDetails(o,l=!1){if(s.readonly)return;let c=!s.isOpen(o);o.expanded=!0,s.edit("description",o.id,String(o.description??""),!1,c,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);else if(o.key==="Tab"&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.isComposing&&!n.hasAttribute("compact")){let c=s.editing,d=c?.field==="title"&&!o.shiftKey?"description":c?.field==="description"&&o.shiftKey?"title":null;if(!d)return;o.preventDefault(),s.commit();let u=n.#a(c.id);if(!u||s.readonly)return;if(d==="description")s.addDetails(u,!0);else s.edit("title",u.id,String(u.title??""))}},pasteEditor(o,l,c){let d=[...o.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||!["title","description","comment"].includes(l)||!d.length)return;if(o.clipboardData?.getData("text/plain").trim())return;o.preventDefault();for(let u of d)n.#u(c,u,l==="title"?null:o.target,l==="comment"?"comment":"description")},cancel(){let o=s.editing;if(s.editing=null,o?.fresh)s.discard(o);if(o?.opened)s.close(o);n.#P(o)},close(o){let l=n.#a(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.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#a(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==="comment"){let b=d;if(c){let p={id:Ne(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};b.comments=[...V(b),p],u={type:"comment",card:b.id,comment:p.id,op:"add"}}}else if(l.field==="name"){let b=d;if(c&&c!==b.name)b.name=c,u={type:"edit",column:b.id,field:"name"};if(l.fresh)u={type:"add",column:b.id}}else if(l.field==="subtask"){let b=d,p=C(b).find((h)=>x(h.id,l.id));if(!c)return s.removeSubtask(b,p);if(c!==p.title)p.title=c,u={type:"edit",card:b.id,field:"subtask",subtask:p.id};if(l.fresh)u={type:"subtask",card:b.id,subtask:p.id,op:"add"}}else{let b=d,p=l.field;if((c||p==="description")&&c!==(b[p]??""))b[p]=c,u={type:"edit",card:b.id,field:p};if(l.fresh)u={type:"add",card:b.id,column:a(b.id).column.id},s.kept=[...s.kept,b.id]}if(u)i(u);let f=n.#a(l.id)??d;if(l.fresh&&l.field==="subtask"&&o)s.addSubtask(f);else if(l.fresh&&l.field==="title"&&o&&!n.hasAttribute("compact"))s.addDetails(f,!0);else n.#P(l)},discard(o){si(s.columns,o)},settle(){if(s.editing)s.commit()},addCard(o){if(s.readonly)return;s.settle();let l={id:Ne(),title:""};o.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let o={id:Ne(),name:"",cards:[]};s.columns.push(o),s.edit("name",o.id,"",!0)},addSubtask(o){if(s.readonly)return;s.settle();let l={id:Ne(),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=C(o).filter((c)=>c!==l),i({type:"subtask",card:o.id,subtask:l.id,op:"remove"})},removeComment(o,l){if(s.readonly)return;o.comments=V(o).filter((c)=>c!==l),i({type:"comment",card:o.id,comment: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})},keyTags(o){n.#q(o)},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.metaKey||o.ctrlKey)return;if(!o.altKey)return void n.#M(o,l);if(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 b=s.visible(c.column),p=b[b.indexOf(c.card)+u];if(p&&!p.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(p));else n.#D(o.currentTarget,u,!p?u<0?"Already first":"Already last":l.starred?"Starred cards stay above the others — unstar it to move it lower":"Starred cards stay on top — star it to move it among them");return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.cards.length));else n.#D(o.currentTarget,0,"No column there")},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.#k(l,c.id,C(l).indexOf(c)+d)},keyColumn(o,l){if(o.metaKey||o.ctrlKey||o.shiftKey)return;let c=getComputedStyle(n).direction==="rtl",d=o.key==="ArrowLeft"?c?1:-1:o.key==="ArrowRight"?c?-1:1:0;if(!o.altKey){let f=o.currentTarget.closest(".b3-board-column"),b=[...n.querySelectorAll(".b3-board-column")],p=o.key==="ArrowDown"?f.querySelector(".b3-board-card"):d?b[b.indexOf(f)+d]?.querySelector(".b3-board-column-name"):void 0;if(p===void 0)return;if(o.preventDefault(),p)n.#x(p);return}if(!d||s.readonly)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#u(e,t,r,n="description"){let i=this.#e,a=()=>i.editing?.field===n&&x(i.editing.id,e)?i.editing:null,s=`![Uploading image ${this.#w}-${++this.#S}…]()`,o="",l=a();if(l&&r){let{selectionStart:y,selectionEnd:k}=r;o=y&&r.value[y-1]!==`
340
340
  `?`
341
- ${o}`:o,a.draft=r.value=r.value.slice(0,g)+s+r.value.slice(A),r.setSelectionRange(g+s.length,g+s.length),this.#f(r)}let l=n.columns.find((g)=>g.cards.some((A)=>x(A.id,e))),c=null;try{c=await this.#v?.(t,{card:e,column:l?.id})}catch(g){console.warn("b3-board: image upload failed",g)}let d=c?`![](${String(c).replace(/[\s()]/g,(g)=>`%${g.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#s("Image not added");while(this.#g)await new Promise((g)=>this.#A.push(g));let u=(g)=>{if(!s)return null;let A=g.indexOf(s),U=A>=0?A:g.indexOf(o);if(U<0)return null;let se=A>=0?s:o;return[U,U+se.length,d?se.replace(o,d):""]},f=(g)=>{if(!s)return d?g.trim()?`${g.replace(/\s+$/,"")}
342
- ${d}`:d:g;let A=u(g);return A?g.slice(0,A[0])+A[2]+g.slice(A[1]):g},h=i();if(h){let g=this.querySelector("textarea.b3-board-editor"),A=g?.value===h.draft&&u(g.value);if(g&&A){let[U,se,at]=A,{selectionStart:pi,selectionEnd:mi,selectionDirection:gi}=g,fr=(Ne)=>Ne>=se?Ne+at.length-(se-U):Ne>U?U+at.length:Ne;g.setRangeText(at,U,se),g.setSelectionRange(fr(pi),fr(mi),gi??void 0),h.draft=g.value,this.#f(g)}else if(f(h.draft)!==h.draft)h.draft=f(h.draft);else if(d)this.#s("Image not added");return}let b=this.#a(e);if(s&&!String(b?.description??"").includes(o))b=n.columns.flatMap((g)=>g.cards).find((g)=>String(g.description??"").includes(o))??b;let p=String(b?.description??""),m=f(p).trim();if(!b||this.readonly||m===p.trim()){if(d)this.#s("Image not added");return}b.description=m,b.expanded=!0,this.#y({type:"edit",card:b.id,field:"description"});let y=b.id;requestAnimationFrame(()=>this.#f(this.querySelector(`[data-card="${CSS.escape(String(y))}"]`)))}#f(e){requestAnimationFrame(()=>e?.isConnected&&e.scrollIntoView({block:"nearest",inline:"nearest"}))}#s(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>x(f.id,e))),o=n.columns.find((u)=>x(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>x(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;if(cr(n.expandIn,i)!==cr(n.expandIn,o))delete a.expanded;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#y({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#B(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>x(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.#y({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#k(e,t,r){let n=this.#e,i=S(e),o=i.findIndex((l)=>x(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.#y({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;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),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",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#O(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#x(e){e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"})}#M(e,t){let r=this.#e,n=e.currentTarget,i=(c)=>[...c.querySelectorAll(".b3-board-cards > .b3-board-card")],o=n.closest(".b3-board-column"),s=i(o),a=s.indexOf(n),l;switch(e.key){case"ArrowUp":if(l=s[a-1],!l&&this.#U())return void e.preventDefault();break;case"ArrowDown":l=s[a+1];break;case"Home":l=s[0];break;case"End":l=s.at(-1);break;case"ArrowLeft":case"ArrowRight":{let c=[...this.querySelectorAll(".b3-board-column")],d=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1;for(let u=c.indexOf(o)+d;u>=0&&u<c.length&&!l;u+=d){let f=i(c[u]);l=f[Math.min(a,f.length-1)]}break}case" ":if(e.preventDefault(),!this.hasAttribute("compact")&&r.disclosable(t))r.toggle(t);return;case"Delete":case"Backspace":{if(r.readonly||e.shiftKey)return;e.preventDefault();let c=(s[a+1]??s[a-1])?.dataset.card;n.querySelector(":scope > .b3-board-card-head .b3-board-remove")?.click(),requestAnimationFrame(()=>{if(n.isConnected)return;let d=c!==void 0&&this.querySelector(`[data-card="${CSS.escape(c)}"]`),u=this.querySelector(`[data-column="${CSS.escape(o.dataset.column??"")}"] .b3-board-column-name`),f=d||u;if(f)this.#x(f)});return}default:return}if(e.preventDefault(),l)this.#x(l)}#U(){let e=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],t=e.find((r)=>r.textContent===this.#L)??e[0];return t?.focus(),!!t}#L=null;#q(e){let t=e.target;if(!t.matches(".b3-board-chip")||e.altKey||e.metaKey||e.ctrlKey)return;let r=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],n=r.indexOf(t);if(this.#L=t.textContent,e.key==="ArrowDown"||e.key==="Escape"){e.preventDefault(),this.focusCard();return}if(e.key===" "||e.key==="Enter"){if(e.preventDefault(),!e.repeat)t.click();return}if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;e.preventDefault();let i=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1,o=r[n+i];if(o)this.#L=o.textContent,o.focus()}focusCard(e){let t=(n)=>n!=null&&this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(n))}"]`),r=t(e)||t(this.#e?.selected)||this.querySelector(".b3-board-cards > .b3-board-card");if(!r)return!1;return this.#x(r),!0}shortcuts=[];showShortcuts(e=!0){let t=this.#t;if(!t)return!1;let r=t.querySelector(":scope > .b3-board-keys");if(!e){if(r)this.focusCard(),r.remove();return!0}if(r)return!0;let n=/Mac|iP(hone|ad|od)/.test(this.ownerDocument.defaultView?.navigator.platform??""),i=n?"⌥":"Alt+",o=n?"⌘":"Ctrl+",s=[["↑ ↓","Previous / next card"],["↑ (top card)","Filter tags: ← → pick, Space toggle, ↓ back"],["← →","Card in the next column"],["Home End","First / last card"],["Space","Expand / collapse"],["Enter","Edit the title"],...this.readonly?[]:[[`${i}↑ ${i}↓`,"Move the card up / down"],[`${i}← ${i}→`,"Move the card to the next column"],["Tab ⇧Tab","Editing: title ⇄ details"],["Delete","Delete the card (press twice)"],[`${o}Z ${n?"⇧⌘Z":"Ctrl+Y"}`,"Undo / redo"]],...this.shortcuts,["Esc","Cancel / close"],["?","This list"]];r=this.ownerDocument.createElement("div"),r.className="b3-board-keys",r.tabIndex=-1,r.setAttribute("role","dialog"),r.setAttribute("aria-label","Keyboard shortcuts");let a=this.ownerDocument.createElement("dl");for(let[l,c]of s){let d=this.ownerDocument.createElement("div"),u=this.ownerDocument.createElement("dt"),f=this.ownerDocument.createElement("dd");for(let h of l.split(" ")){let b=this.ownerDocument.createElement("kbd");b.textContent=h,u.append(b)}f.textContent=c,d.append(u,f),a.append(d)}return r.append(a),r.addEventListener("keydown",(l)=>{if(l.key!=="Escape"&&l.key!=="?")return;l.preventDefault(),l.stopPropagation(),this.showShortcuts(!1)}),r.addEventListener("focusout",(l)=>{if(!r.contains(l.relatedTarget))queueMicrotask(()=>r.remove())}),t.append(r),r.focus({preventScroll:!0}),!0}#j(){let e=this.ownerDocument.activeElement;if(!e?.matches(".b3-board-card")||!this.contains(e))return null;let t=e.closest(".b3-board-column");return{id:e.dataset.card,column:t.dataset.column,index:[...t.querySelectorAll(".b3-board-cards > .b3-board-card")].indexOf(e)}}#F(e){requestAnimationFrame(()=>{let t=this.ownerDocument.activeElement;if(t&&t!==this.ownerDocument.body&&t.isConnected)return;let r=[...this.querySelectorAll(`[data-column="${CSS.escape(e.column)}"] .b3-board-cards > .b3-board-card`)];(this.querySelector(`[data-card="${CSS.escape(e.id)}"]`)??r[Math.min(e.index,r.length-1)])?.focus({preventScroll:!0})})}#D(e,t,r){e.style.setProperty("--b3-board-bump",String(t)),e.removeAttribute("data-b3-bump"),e.offsetWidth,e.setAttribute("data-b3-bump",""),e.addEventListener("animationend",()=>e.removeAttribute("data-b3-bump"),{once:!0}),this.#s(r)}#N(){let e=this.ownerDocument,t=e.activeElement;if(!this.#I||!this.#e?.selected||t&&t!==e.body&&t!==e.documentElement)return;this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(this.#e.selected))}"]`)?.focus({preventScroll:!0})}#B(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#P(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})})}#I=!1;#K(){this.#c?.abort(),this.#c=new AbortController;let e=this.#c.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#Y(o),{signal:e}),this.addEventListener("mousedown",(o)=>{if(this.#e?.editing&&o.target.closest?.(".b3-board-actions > button, .b3-board-star")&&this.contains(this.ownerDocument.activeElement))o.preventDefault()},{signal:e,capture:!0}),t.addEventListener("pointermove",(o)=>this.#J(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#G(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#b()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#b()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("focusin",(o)=>{let s=o.target,a=s.parentElement;if(!a?.matches(".b3-board-filters"))return;a.style.scrollPaddingInlineEnd=`${a.querySelector(":scope > .b3-board-search")?.offsetWidth??0}px`,s.scrollIntoView({inline:"nearest",block:"nearest"})},{signal:e}),this.addEventListener("focusin",(o)=>{this.#I=!0;let s=o.target.closest?.(".b3-board-card");if(s&&this.#e&&this.contains(s))this.#e.selected=s.dataset.card??null},{signal:e}),this.addEventListener("focusout",(o)=>{let s=o.relatedTarget;if(s&&!this.contains(s)){this.#I=!1;return}if(!s)requestAnimationFrame(()=>requestAnimationFrame(()=>this.#N()))},{signal:e}),t.addEventListener("focus",()=>queueMicrotask(()=>this.#N()),{signal:e}),this.addEventListener("click",(o)=>{let s=this.ownerDocument.getSelection(),a=o.target;if(!this.#m&&s&&!s.isCollapsed&&(a.contains(s.anchorNode)||s.containsNode(a,!0))&&!a.closest?.("button, .b3-board-grip, .b3-board-card-head>.b3-board-title")){o.preventDefault(),o.stopImmediatePropagation();return}if(!this.#m)return;this.#m=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.key!=="?"||o.defaultPrevented||o.metaKey||o.ctrlKey||o.altKey||o.isComposing)return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"]), .b3-board-keys'))return;o.preventDefault(),this.showShortcuts()},{signal:e}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#V(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#$();this.addEventListener("compositionstart",()=>{this.#g=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#$(){this.#g=!1;for(let e of this.#A.splice(0))e()}#V(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),o=i&&S(i).find((c)=>x(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(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#W(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#W(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),or();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 o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=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 a?.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})}#Y(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-grip, .b3-board-card-head>.b3-board-title")?t.closest(".b3-board-card"):null;if(!i&&t.closest(".b3-board-card"))return;let 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.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#R(e.clientX,e.clientY)},ba)}#R(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.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#Z(r.px,r.py),this.#X(this.#H(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#J(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.#R(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}#G(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#b();let r=this.#H(e.clientX,e.clientY);if(this.#b(),this.#m=!0,setTimeout(()=>{this.#m=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>x(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>x(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>x(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>x(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.#a(t.card);if(!i)return;let o=S(i),s=r.before?o.findIndex((a)=>x(a.id,r.before)):o.length;if(o.findIndex((a)=>x(a.id,t.id))<s)s-=1;this.#k(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>x(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>x(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#H(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.#z(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((h)=>{let b=h.getBoundingClientRect();return t<b.top+b.height/2}),f=(h)=>!!(h!=null&&this.#a(h)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((h)=>!f(h.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.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}}#X(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")}#z(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})}#Z(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.#r?.kind==="card"?this.#z(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))}#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")}}br("b3-board",bi);export{bi as B3Board};
341
+ ${s}`:s,l.draft=r.value=r.value.slice(0,y)+o+r.value.slice(k),r.setSelectionRange(y+o.length,y+o.length),this.#f(r)}let c=i.columns.find((y)=>y.cards.some((k)=>x(k.id,e))),d=null;try{d=await this.#v?.(t,{card:e,column:c?.id})}catch(y){console.warn("b3-board: image upload failed",y)}let u=d?`![](${String(d).replace(/[\s()]/g,(y)=>`%${y.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!u)this.#s("Image not added");while(this.#y)await new Promise((y)=>this.#A.push(y));let f=(y)=>{if(!o)return null;let k=y.indexOf(o),O=k>=0?k:y.indexOf(s);if(O<0)return null;let j=k>=0?o:s;return[O,O+j.length,u?j.replace(s,u):""]},b=(y)=>{if(!o)return u?y.trim()?`${y.replace(/\s+$/,"")}
342
+ ${u}`:u:y;let k=f(y);return k?y.slice(0,k[0])+k[2]+y.slice(k[1]):y},p=a();if(p){let y=this.querySelector("textarea.b3-board-editor"),k=y?.value===p.draft&&f(y.value);if(y&&k){let[O,j,lt]=k,{selectionStart:mi,selectionEnd:gi,selectionDirection:yi}=y,hr=(Be)=>Be>=j?Be+lt.length-(j-O):Be>O?O+lt.length:Be;y.setRangeText(lt,O,j),y.setSelectionRange(hr(mi),hr(gi),yi??void 0),p.draft=y.value,this.#f(y)}else if(b(p.draft)!==p.draft)p.draft=b(p.draft);else if(u)this.#s("Image not added");return}if(n==="comment"){let y=i.columns.flatMap((O)=>O.cards).find((O)=>V(O).some((j)=>String(j.text??"").includes(s))),k=y&&V(y).find((O)=>String(O.text??"").includes(s));if(!y||!k||this.readonly){if(u)this.#s("Image not added");return}k.text=b(String(k.text)).trim(),this.#b({type:"edit",card:y.id,field:"comment",comment:k.id});return}let h=this.#a(e);if(o&&!String(h?.description??"").includes(s))h=i.columns.flatMap((y)=>y.cards).find((y)=>String(y.description??"").includes(s))??h;let m=String(h?.description??""),g=b(m).trim();if(!h||this.readonly||g===m.trim()){if(u)this.#s("Image not added");return}h.description=g,h.expanded=!0,this.#b({type:"edit",card:h.id,field:"description"});let S=h.id;requestAnimationFrame(()=>this.#f(this.querySelector(`[data-card="${CSS.escape(String(S))}"]`)))}#f(e){requestAnimationFrame(()=>e?.isConnected&&e.scrollIntoView({block:"nearest",inline:"nearest"}))}#s(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>x(f.id,e))),a=n.columns.find((u)=>x(u.id,t));if(!i||!a)return!1;let s=i.cards.findIndex((u)=>x(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;if(dr(n.expandIn,i)!==dr(n.expandIn,a))delete o.expanded;return n.announcement=`${o.title??""} moved to ${a.name??""}, position ${d+1} of ${a.cards.length}`,this.#b({type:"move",card:o.id,from:i.id,to:a.id,index:d}),this.#B(o.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>x(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.#b({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#k(e,t,r){let n=this.#e,i=C(e),a=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||a<0)return!1;let 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.#b({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}#T(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,a=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),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})}#O(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#x(e){e.focus({preventScroll:!0}),e.scrollIntoView({block:"nearest",inline:"nearest"})}#M(e,t){let r=this.#e,n=e.currentTarget,i=(c)=>[...c.querySelectorAll(".b3-board-cards > .b3-board-card")],a=n.closest(".b3-board-column"),s=i(a),o=s.indexOf(n),l;switch(e.key){case"ArrowUp":if(l=s[o-1],!l&&this.#U())return void e.preventDefault();break;case"ArrowDown":l=s[o+1];break;case"Home":l=s[0];break;case"End":l=s.at(-1);break;case"ArrowLeft":case"ArrowRight":{let c=[...this.querySelectorAll(".b3-board-column")],d=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1;for(let u=c.indexOf(a)+d;u>=0&&u<c.length&&!l;u+=d){let f=i(c[u]);l=f[Math.min(o,f.length-1)]}break}case" ":if(e.preventDefault(),!this.hasAttribute("compact")&&r.disclosable(t))r.toggle(t);return;case"Delete":case"Backspace":{if(r.readonly||e.shiftKey)return;e.preventDefault();let c=(s[o+1]??s[o-1])?.dataset.card;n.querySelector(":scope > .b3-board-card-head .b3-board-remove")?.click(),requestAnimationFrame(()=>{if(n.isConnected)return;let d=c!==void 0&&this.querySelector(`[data-card="${CSS.escape(c)}"]`),u=this.querySelector(`[data-column="${CSS.escape(a.dataset.column??"")}"] .b3-board-column-name`),f=d||u;if(f)this.#x(f)});return}default:return}if(e.preventDefault(),l)this.#x(l)}#U(){let e=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],t=e.find((r)=>r.textContent===this.#L)??e[0];return t?.focus(),!!t}#L=null;#q(e){let t=e.target;if(!t.matches(".b3-board-chip")||e.altKey||e.metaKey||e.ctrlKey)return;let r=[...this.querySelectorAll(".b3-board-filters > .b3-board-chip")],n=r.indexOf(t);if(this.#L=t.textContent,e.key==="ArrowDown"||e.key==="Escape"){e.preventDefault(),this.focusCard();return}if(e.key===" "||e.key==="Enter"){if(e.preventDefault(),!e.repeat)t.click();return}if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;e.preventDefault();let i=e.key==="ArrowLeft"!==(getComputedStyle(this).direction==="rtl")?-1:1,a=r[n+i];if(a)this.#L=a.textContent,a.focus()}focusCard(e){let t=(n)=>n!=null&&this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(n))}"]`),r=t(e)||t(this.#e?.selected)||this.querySelector(".b3-board-cards > .b3-board-card");if(!r)return!1;return this.#x(r),!0}shortcuts=[];showShortcuts(e=!0){let t=this.#t;if(!t)return!1;let r=t.querySelector(":scope > .b3-board-keys");if(!e){if(r)this.focusCard(),r.remove();return!0}if(r)return!0;let n=/Mac|iP(hone|ad|od)/.test(this.ownerDocument.defaultView?.navigator.platform??""),i=n?"⌥":"Alt+",a=n?"⌘":"Ctrl+",s=[["↑ ↓","Previous / next card"],["↑ (top card)","Filter tags: ← → pick, Space toggle, ↓ back"],["← →","Card in the next column"],["Home End","First / last card"],["Space","Expand / collapse"],["Enter","Edit the title"],...this.readonly?[]:[[`${i}↑ ${i}↓`,"Move the card up / down"],[`${i}← ${i}→`,"Move the card to the next column"],["Tab ⇧Tab","Editing: title ⇄ details"],["Delete","Delete the card (press twice)"],[`${a}Z ${n?"⇧⌘Z":"Ctrl+Y"}`,"Undo / redo"]],...this.shortcuts,["Esc","Cancel / close"],["?","This list"]];r=this.ownerDocument.createElement("div"),r.className="b3-board-keys",r.tabIndex=-1,r.setAttribute("role","dialog"),r.setAttribute("aria-label","Keyboard shortcuts");let o=this.ownerDocument.createElement("dl");for(let[l,c]of s){let d=this.ownerDocument.createElement("div"),u=this.ownerDocument.createElement("dt"),f=this.ownerDocument.createElement("dd");for(let b of l.split(" ")){let p=this.ownerDocument.createElement("kbd");p.textContent=b,u.append(p)}f.textContent=c,d.append(u,f),o.append(d)}return r.append(o),r.addEventListener("keydown",(l)=>{if(l.key!=="Escape"&&l.key!=="?")return;l.preventDefault(),l.stopPropagation(),this.showShortcuts(!1)}),r.addEventListener("focusout",(l)=>{if(!r.contains(l.relatedTarget))queueMicrotask(()=>r.remove())}),t.append(r),r.focus({preventScroll:!0}),!0}#j(){let e=this.ownerDocument.activeElement;if(!e?.matches(".b3-board-card")||!this.contains(e))return null;let t=e.closest(".b3-board-column");return{id:e.dataset.card,column:t.dataset.column,index:[...t.querySelectorAll(".b3-board-cards > .b3-board-card")].indexOf(e)}}#F(e){requestAnimationFrame(()=>{let t=this.ownerDocument.activeElement;if(t&&t!==this.ownerDocument.body&&t.isConnected)return;let r=[...this.querySelectorAll(`[data-column="${CSS.escape(e.column)}"] .b3-board-cards > .b3-board-card`)];(this.querySelector(`[data-card="${CSS.escape(e.id)}"]`)??r[Math.min(e.index,r.length-1)])?.focus({preventScroll:!0})})}#D(e,t,r){e.style.setProperty("--b3-board-bump",String(t)),e.removeAttribute("data-b3-bump"),e.offsetWidth,e.setAttribute("data-b3-bump",""),e.addEventListener("animationend",()=>e.removeAttribute("data-b3-bump"),{once:!0}),this.#s(r)}#N(){let e=this.ownerDocument,t=e.activeElement;if(!this.#I||!this.#e?.selected||t&&t!==e.body&&t!==e.documentElement)return;this.querySelector(`.b3-board-cards > [data-card="${CSS.escape(String(this.#e.selected))}"]`)?.focus({preventScroll:!0})}#B(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#P(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})})}#I=!1;#K(){this.#c?.abort(),this.#c=new AbortController;let e=this.#c.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(a)=>this.#Y(a),{signal:e}),this.addEventListener("mousedown",(a)=>{if(this.#e?.editing&&a.target.closest?.(".b3-board-actions > button, .b3-board-star")&&this.contains(this.ownerDocument.activeElement))a.preventDefault()},{signal:e,capture:!0}),t.addEventListener("pointermove",(a)=>this.#J(a),{signal:e}),t.addEventListener("pointerup",(a)=>this.#G(a),{signal:e}),t.addEventListener("pointercancel",(a)=>{if(a.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(a)=>{if(a.key==="Escape"&&this.#r?.started)a.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(a)=>{if(this.#r?.started)a.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(a)=>{if(this.#r)a.preventDefault()},{signal:e}),this.addEventListener("focusin",(a)=>{let s=a.target,o=s.parentElement;if(!o?.matches(".b3-board-filters"))return;o.style.scrollPaddingInlineEnd=`${o.querySelector(":scope > .b3-board-search")?.offsetWidth??0}px`,s.scrollIntoView({inline:"nearest",block:"nearest"})},{signal:e}),this.addEventListener("focusin",(a)=>{this.#I=!0;let s=a.target.closest?.(".b3-board-card");if(s&&this.#e&&this.contains(s))this.#e.selected=s.dataset.card??null},{signal:e}),this.addEventListener("focusout",(a)=>{let s=a.relatedTarget;if(s&&!this.contains(s)){this.#I=!1;return}if(!s)requestAnimationFrame(()=>requestAnimationFrame(()=>this.#N()))},{signal:e}),t.addEventListener("focus",()=>queueMicrotask(()=>this.#N()),{signal:e}),this.addEventListener("click",(a)=>{let s=this.ownerDocument.getSelection(),o=a.target;if(!this.#g&&s&&!s.isCollapsed&&(o.contains(s.anchorNode)||s.containsNode(o,!0))&&!o.closest?.("button, .b3-board-grip, .b3-board-card-head>.b3-board-title")){a.preventDefault(),a.stopImmediatePropagation();return}if(!this.#g)return;this.#g=!1,a.preventDefault(),a.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(a)=>{if(a.key!=="?"||a.defaultPrevented||a.metaKey||a.ctrlKey||a.altKey||a.isComposing)return;if(a.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"]), .b3-board-keys'))return;a.preventDefault(),this.showShortcuts()},{signal:e}),this.addEventListener("keydown",(a)=>{if(a.defaultPrevented||a.altKey||!(a.metaKey||a.ctrlKey))return;if(a.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=a.key.toLowerCase(),o=s==="y"||s==="z"&&a.shiftKey;if(s!=="z"&&s!=="y")return;if(a.preventDefault(),o)this.redo();else this.undo()},{signal:e});let n=(a)=>this.#V(a);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(a)=>{if(a.button===1)n(a)},{signal:e,capture:!0});let i=()=>this.#$();this.addEventListener("compositionstart",()=>{this.#y=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#$(){this.#y=!1;for(let e of this.#A.splice(0))e()}#V(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),a=i&&C(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),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.#W(t,o,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#W(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ar();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=n.createElement("img");a.src=t.currentSrc||t.src,a.alt=t.alt;let 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})}#Y(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-grip, .b3-board-card-head>.b3-board-title")?t.closest(".b3-board-card"):null;if(!i&&t.closest(".b3-board-card"))return;let a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,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.#R(e.clientX,e.clientY)},pa)}#R(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.#t.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.#Z(r.px,r.py),this.#X(this.#H(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#J(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.#p();return}if(r<5)return;this.#R(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}#G(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#H(e.clientX,e.clientY);if(this.#p(),this.#g=!0,setTimeout(()=>{this.#g=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>x(l.id,r.column)),a=n.columns.find((l)=>l.cards.some((c)=>x(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>x(l.id,r.before)):i.cards.length,o=a.cards.findIndex((l)=>x(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.#a(t.card);if(!i)return;let a=C(i),s=r.before?a.findIndex((o)=>x(o.id,r.before)):a.length;if(a.findIndex((o)=>x(o.id,t.id))<s)s-=1;this.#k(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>x(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>x(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#H(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.#z(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((b)=>{let p=b.getBoundingClientRect();return t<p.top+p.height/2}),f=(b)=>!!(b!=null&&this.#a(b)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((b)=>!f(b.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}}#X(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")}#z(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})}#Z(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.#z(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))}#p(){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")}}pr("b3-board",pi);export{pi as B3Board};
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.144",
2
+ "version": "0.1.0-alpha.146",
3
3
  "cssSha256": "a1e97a6aa21ed495e8de168d029455630332805d056b112c8e40fe7127611142",
4
4
  "classes": [
5
5
  "b3-accordion",
@@ -513,6 +513,7 @@
513
513
  "mobile.md",
514
514
  "app-frame.md",
515
515
  "tui.md",
516
+ "audio-player.md",
516
517
  "board.md",
517
518
  "cross-screen.md",
518
519
  "date-picker.md",
@@ -0,0 +1,26 @@
1
+ # Audio player element
2
+
3
+ `<b3-audio-player>` is an opt-in component for recordings: play/pause, a seek bar, current / total
4
+ time, skip back/forward and a speed cycle. A WebView's native `<audio controls>` shrinks to a lone
5
+ play button on a phone; this does not.
6
+
7
+ ```html
8
+ <script type="module" src="@livx.cc/bare-v3/components/audio-player"></script>
9
+
10
+ <!-- Without the module this is the native player. -->
11
+ <b3-audio-player skip="15">
12
+ <audio controls preload="metadata" src="/rec/mix.webm"></audio>
13
+ </b3-audio-player>
14
+ ```
15
+
16
+ Always author the `<audio>` yourself: it is the degraded experience and stays the source of truth.
17
+ Set `audio.src`, `audio.currentTime`, call `audio.play()` from your code — the controls follow.
18
+ A replaced `<audio>` child is re-mounted.
19
+
20
+ | Attribute | Meaning |
21
+ | --- | --- |
22
+ | `skip` | Seconds the back/forward buttons move (default 15). |
23
+
24
+ Events: `b3-error` (bubbles) when `play()` is refused. Under ~22rem wide the skip and speed buttons
25
+ hide; play, seek and time stay. `clock(seconds)` (m:ss / h:mm:ss) is exported for matching
26
+ timestamps elsewhere on the page.
@@ -144,7 +144,9 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
144
144
  line when the caret follows text (an "Uploading image…" placeholder holds the spot and the caret stays where the
145
145
  user puts it; committed first, it is replaced in the saved description, even if `columns` was set meanwhile);
146
146
  pasted into its title, it is appended to the description and the card opens. Whitespace and
147
- parentheses in `target` are percent-encoded. Each lands as an `edit` of `description`. Returning
147
+ parentheses in `target` are percent-encoded. Each lands as an `edit` of `description`. Pasted into a comment editor,
148
+ it lands at the caret the same way; a comment posted before the upload ends gets it swapped in, reported as an
149
+ `edit` of `comment` (with the comment's id). Returning
148
150
  nothing (or throwing) drops the image and its placeholder, and the board announces "Image not added".
149
151
  A clipboard that also holds text (a spreadsheet copy) pastes the text. Without `upload`, pasting is left to the browser.
150
152
  - **Details**: the chevron row under the title opens and closes a card's description and subtasks; it
@@ -8,6 +8,7 @@
8
8
  ],
9
9
  "dist/components/date-picker.js": [],
10
10
  "dist/components/image-viewer.js": [],
11
+ "dist/components/audio-player.js": [],
11
12
  "dist/markdown-stream.js": []
12
13
  },
13
14
  "packages": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/bare-v3",
3
- "version": "0.1.0-alpha.144",
3
+ "version": "0.1.0-alpha.146",
4
4
  "type": "module",
5
5
  "thirdPartyNotices": "./dist/third-party.json",
6
6
  "files": [
@@ -27,6 +27,10 @@
27
27
  "types": "./dist/components/date-picker.d.ts",
28
28
  "default": "./dist/components/date-picker.js"
29
29
  },
30
+ "./components/audio-player": {
31
+ "types": "./dist/components/audio-player.d.ts",
32
+ "default": "./dist/components/audio-player.js"
33
+ },
30
34
  "./components/image-viewer": {
31
35
  "types": "./dist/components/image-viewer.d.ts",
32
36
  "default": "./dist/components/image-viewer.js"