@cmach_socket/opencode-qq-bot 0.10.0 → 0.11.0

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.
@@ -1,8 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible;function d(e){return typeof e==`function`}var f=()=>{};function p(e){return e()}function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var v=1<<24,y=1024,b=2048,x=4096,S=8192,C=16384,w=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=1<<21,oe=1<<22,se=1<<23,ce=Symbol(`$state`),le=Symbol(`component`),ue=Symbol(`legacy props`),T=Symbol(``),de=Symbol(`attributes`),fe=Symbol(`class`),pe=Symbol(`style`),me=Symbol(`text`),he=Symbol(`form reset`),ge=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_e=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),ve={},E=Symbol(`uninitialized`),ye=`http://www.w3.org/1999/xhtml`,be=`http://www.w3.org/2000/svg`,xe=`@attach`;function Se(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ce(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function we(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Te(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var D=!1;function Ee(e){D=e}var De;function Oe(e){if(e===null)throw Ce(),ve;return De=e}function ke(){return Oe(yn(De))}function O(e){if(D){if(yn(De)!==null)throw Ce(),ve;De=e}}function k(e=1){if(D){for(var t=e,n=De;t--;)n=yn(n);De=n}}function Ae(e=!0){for(var t=0,n=De;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=yn(n);e&&n.remove(),n=i}}function je(e){if(!e||e.nodeType!==8)throw Ce(),ve;return e.data}function Me(e){return e===this.v}function Ne(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Pe(e){return!Ne(e,this.v)}function Fe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ie(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Le(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Re(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ze(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Be(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ve(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function He(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ue(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ge(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ke(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var qe=!1;function Je(){qe=!0}function Ye(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function Xe(e,t){return e===null&&Fe(t),e.c??=new Map(Ye(e)||void 0)}var Ze=null;function Qe(e){Ze=e}function $e(e){return Xe(Ze,`getContext`).get(e)}function et(e,t){return Xe(Ze,`setContext`).set(e,t),t}function tt(e){return Xe(Ze,`hasContext`).has(e)}function nt(){return Xe(Ze,`getAllContexts`)}function A(e,t=!1,n){Ze={p:Ze,i:!1,c:null,e:null,s:e,x:null,r:ar,l:qe&&!t?{s:null,u:null,$:[]}:null}}function j(e){var t=Ze,n=t.e;if(n!==null){t.e=null;for(var r of n)Mn(r)}return e!==void 0&&(t.x=e),t.i=!0,Ze=t.p,rt(e)}function rt(e={}){return i(e,le,{value:!0}),e}function it(){return!qe||Ze!==null&&Ze.l===null}var at=[];function ot(){var e=at;at=[],m(e)}function st(e){if(at.length===0&&!It){var t=at;queueMicrotask(()=>{t===at&&ot()})}at.push(e)}function ct(){for(;at.length>0;)ot()}var lt=~(b|x|y);function ut(e,t){e.f=e.f&lt|t}function dt(e){e.f&512||e.deps===null?ut(e,y):ut(e,x)}function ft(e,t){e.f&2048?t.set(e,b):e.f&4096&&t.get(e)!==2048&&t.set(e,x),ut(e,y)}function pt(e,t){if(t){let t=document.body;e.autofocus=!0,st(()=>{document.activeElement===t&&e.focus()})}}var mt=!1;function ht(){mt||(mt=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[he]?.()})},{capture:!0}))}function gt(e){var t=nr,n=ar;ir(null),or(null);try{return e()}finally{ir(t),or(n)}}function _t(e,t,n,r=n){e.addEventListener(t,()=>gt(n));let i=e[he];e[he]=i?()=>{i(),r(!0)}:()=>r(!0),ht()}function vt(e,t,n,r){let i=it()?St:Tt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=ar,c=yt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Tn(e,s)}bt()}}var d=xt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>wt(e))).then(u).catch(e=>Tn(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),bt())}):f()}function yt(){var e=ar,t=nr,n=Ze,r=Mt;return function(i=!0){or(e),ir(t),Qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function bt(e=!0){or(null),ir(null),Qe(null),e&&Mt?.deactivate()}function xt(){var e=ar,t=e.b,n=Mt,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function St(e){var t=2|b;return ar!==null&&(ar.f|=ne),{ctx:Ze,deps:null,effects:null,equals:Me,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:ar,ac:null}}var Ct=Symbol(`obsolete`);function wt(e,t,n){let r=ar;r===null&&Ie();var i=void 0,a=$t(E),o=!nr,s=new Set;return Ln(()=>{var t=ar,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ge&&n.reject(e)}).finally(bt)}catch(e){n.reject(e),bt()}var c=Mt;if(o){if(t.f&32768)var l=xt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Ct);else for(let e of s.values())e.reject(Ct);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Ct&&(c.activate(),t?(a.f|=se,rn(a,t)):(a.f&8388608&&(a.f^=se),rn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),An(()=>{for(let e of s)e.reject(Ct)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=St(e);return cr(t),t}function Tt(e){let t=St(e);return t.equals=Pe,t}function Et(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Gn(t[n])}}function Dt(e){var t,n=ar,r=e.parent;if(!er&&r!==null&&e.v!==E&&r.f&24576)return Se(),e.v;or(r);try{Et(e),t=br(e)}finally{or(n)}return t}function Ot(e){var t=Dt(e);!e.equals(t)&&(e.wv=_r(),(!Mt?.is_fork||e.deps===null)&&(Mt===null?e.v=t:(Mt.capture(e,t,!0),Nt?.capture(e,t,!0)),e.deps===null))?ut(e,y):er||(Pt===null?dt(e):(kn()||Mt?.is_fork)&&Pt.set(e,t))}function kt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&gt(()=>{t.ac.abort(ge),t.ac=null}),t.fn!==null&&(t.teardown=f),Cr(t,0),Un(t))}function At(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&wr(t)}var jt=null,Mt=null,Nt=null,Pt=null,Ft=null,It=!1,Lt=!1,Rt=null,zt=null,Bt=0,Vt=1,Ht=class e{id=Vt++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=new Map;#i=null;#a=[];#o=[];#s=new Map;#c=new Map;#l=new Set;is_fork=!1;#u=!1;constructor(){jt===null?jt=this:(jt.next=this,this.prev=jt),jt=this}#d(){if(this.is_fork)return!0;for(let e of this.#r.keys())if(!this.#f(e))return!0;return!1}#f(e){for(var t=e;t!==null;t=t.parent)if(this.#c.has(t))return!0;return!1}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]}),this.#l.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#c.get(e);if(n){this.#c.delete(e);for(var r of n.d)ut(r,b),t(r);for(r of n.m)ut(r,x),t(r)}this.#l.add(e)}#p(){var e=[];for(let i of this.#a)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=y}}n||e.push(t)}return this.#a=[],e}#m(){this.started=!0;for(let[e,t]of this.#s)ut(e,t),this.schedule(e);this.apply();for(var t=Rt=[],n=[],r=zt=[];this.#a.length>0;){Bt++>1e3&&(this.#b(),Wt());for(let e of this.#p())try{this.#h(e,t,n)}catch(t){throw Yt(e),this.#d()||this.discard(),t}}if(Mt=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(Rt=null,zt=null,this.#d()){this.#y(n),this.#y(t);for(let[e,t]of this.#c)Jt(e,t);r.length>0&&Mt.#m();return}let a=this.#g();if(a)this.#y(n),this.#y(t),a.#v(this);else{this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Nt=this,Kt(n),Kt(t),Nt=null,this.#i?.resolve();var o=Mt;this.#n===0&&(this.#a.length===0||o!==null)&&this.#b(),o!==null&&(Zt.clear(),o.#m())}}#h(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):vr(r)&&(i&16&&this.add_dirty_reaction(r,x),wr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#g(){for(var e=this.prev;e!==null;e=e.prev)if(!e.is_fork&&this.#_(e))return e;return null}#_(e){for(let[t,[,n]]of this.current)if(!n&&e.current.has(t))return!0;return!1}#v(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_reactions(e.#s);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#s.delete(i),ut(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#b(),Mt=this,this.#m()}#y(e){for(var t=0;t<e.length;t+=1)ft(e[t],this.#s)}capture(e,t,n=!1){e.v!==E&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Pt?.set(e,t)),this.is_fork||(e.v=t)}activate(){Mt=this}deactivate(){Mt=null,Pt=null}flush(){try{Lt=!0,Mt=this,this.#m()}finally{Bt=0,Ft=null,Rt=null,zt=null,Lt=!1,Mt=null,Pt=null,Zt.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear();for(let e of this.async_deriveds.values())e.reject(Ct);this.#b(),this.#i?.resolve()}register_created_effect(e){this.#o.push(e)}increment(e,t){if(this.#n+=1,e){let e=this.#r.get(t)??0;this.#r.set(t,e+1)}}decrement(e,t){if(--this.#n,e){let e=this.#r.get(t)??0;e===1?this.#r.delete(t):this.#r.set(t,e-1)}this.#u||(this.#u=!0,st(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_reactions(e){for(let[t,n]of e)this.add_dirty_reaction(t,n);e.clear()}add_dirty_reaction(e,t){(t===2048||this.#s.get(e)!==2048)&&this.#s.set(e,t)}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=h()).promise}static ensure(){if(Mt===null){let t=Mt=new e;!Lt&&!It&&st(()=>{t.started||t.flush()})}return Mt}apply(){Pt=null}schedule(e){Ft=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#a.push(e)}#b(){if(this.linked){var e=this.prev,t=this.next;e===null||(e.next=t),t===null?jt=e:t.prev=e,this.linked=!1}}};function Ut(e){var t=It,n=Nt;Nt=null,It=!0;try{var r;for(e&&(Ut(),r=e());;){if(ct(),Mt===null)return r;Mt.flush()}}finally{It=t,Nt=n}}function Wt(){try{Ve()}catch(e){Tn(e,Ft)}}var Gt=null;function Kt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&vr(r)&&(Gt=new Set,wr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&qn(r),Gt?.size>0)){Zt.clear();for(let e of Gt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Gt.has(n)&&(Gt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||wr(n)}}Gt.clear()}}Gt=null}}function qt(e){Mt.schedule(e)}function Jt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),ut(e,y);for(var n=e.first;n!==null;)Jt(n,t),n=n.next}}function Yt(e){ut(e,y);for(var t=e.first;t!==null;)Yt(t),t=t.next}var Xt=new Set,Zt=new Map,Qt=!1;function $t(e,t){return{f:0,v:e,reactions:null,equals:Me,rv:0,wv:0}}function N(e,t){let n=$t(e,t);return cr(n),n}function en(e,t=!1,n=!0){let r=$t(e);return t||(r.equals=Pe),qe&&n&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(r),r}function P(e,t,n=!1){return nr!==null&&(!rr||nr.f&131072)&&it()&&nr.f&4325394&&(sr===null||!sr.has(e))&&Ge(),rn(e,n?ln(t):t,zt)}var tn=null,nn=0;function rn(e,t,n=null){if(!e.equals(t)){er?Zt.set(e,t):Zt.has(e)||Zt.set(e,e.v);var r=Ht.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Dt(t),Pt===null&&dt(t)}e.wv=_r(),tn=null,nn=0,cn(e,b,n),tn=null,it()&&ar!==null&&ar.f&1024&&!(ar.f&96)&&(dr===null?fr([e]):dr.push(e)),!r.is_fork&&Xt.size>0&&!Qt&&an()}return t}function an(){Qt=!1;for(let e of Xt){e.f&1024&&ut(e,x);let t;try{t=vr(e)}catch{t=!0}t&&wr(e)}Xt.clear()}function on(e,t=1){var n=B(e),r=t===1?n++:n--;return P(e,n),r}function sn(e){P(e,e.v+1)}function cn(e,t,n){var r=e.reactions;if(r!==null){var i=it(),a=r.length;if(nn+=a,nn>1e5&&tn===null&&(tn=new Set),tn!==null){if(tn.has(e))return;tn.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==ar){var l=(c&b)===0;if(l&&ut(s,t),c&131072)Xt.add(s);else if(c&2){var u=s;Pt?.delete(u),cn(u,x,n)}else if(l){var d=s;c&16&&Gt!==null&&Gt.add(d),n===null?qt(d):n.push(d)}}}}}function ln(t){if(typeof t!=`object`||!t||ce in t||le in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=N(0),u=null,d=hr,f=e=>{if(hr===d)return e();var t=nr,n=hr;ir(null),gr(d);var r=e();return ir(t),gr(n),r};return i&&r.set(`length`,N(t.length,u)),new Proxy(t,{defineProperty(e,t,n){`value`in n&&n.configurable!==!1&&n.enumerable!==!1&&n.writable!==!1||Ue();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,u);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(E,u));r.set(t,e),sn(o)}}else P(n,E),sn(o);return!0},get(e,n,i){if(n===ce)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>N(ln(s?e[n]:E),u)),r.set(n,o)),o!==void 0){var c=B(o);return c===E?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=B(i);if(a===E)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ce)return!0;var n=r.get(t),i=n!==void 0&&n.v!==E||Reflect.has(e,t);return(n!==void 0||(ar!==null||nr!==null)&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?ln(e[t]):E,u)),r.set(t,n)),B(n)===E)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(E,u)),r.set(d+``,p)):P(p,E)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>N(void 0,u)),P(c,ln(n)),r.set(t,c));else{l=c.v!==E;var m=f(()=>ln(n));P(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}sn(o)}return!0},ownKeys(e){B(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==E});for(var[n,i]of r)i.v!==E&&!(n in e)&&t.push(n);return t},setPrototypeOf(){We()}})}function un(e){try{if(typeof e==`object`&&e&&ce in e)return e[ce]}catch{}return e}function dn(e,t){return Object.is(un(e),un(t))}var fn,pn,mn,hn;function gn(){if(fn===void 0){fn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mn=a(t,`firstChild`).get,hn=a(t,`nextSibling`).get,u(e)&&(e[fe]=void 0,e[de]=null,e[pe]=void 0,e.__e=void 0),u(n)&&(n[me]=void 0)}}function _n(e=``){return document.createTextNode(e)}function vn(e){return mn.call(e)}function yn(e){return hn.call(e)}function F(e,t){if(!D)return vn(e);var n=vn(De);if(n===null)n=De.appendChild(_n());else if(t&&n.nodeType!==3){var r=_n();return n?.before(r),Oe(r),r}return t&&Cn(n),Oe(n),n}function I(e,t=!1){if(!D){var n=vn(e);return n instanceof Comment&&n.data===``?yn(n):n}if(t){if(De?.nodeType!==3){var r=_n();return De?.before(r),Oe(r),r}Cn(De)}return De}function L(e,t=!1){if(!D)return vn(e);var n=F(e,t);return O(e),n}function R(e,t=1,n=!1){let r=D?De:e;for(var i;t--;)i=r,r=yn(r);if(!D)return r;if(n){if(r?.nodeType!==3){var a=_n();return r===null?i?.after(a):r.before(a),Oe(a),a}Cn(r)}return Oe(r),r}function bn(e){e.textContent=``}function xn(){return!1}function Sn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Cn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function wn(e){var t=ar;if(t===null)return nr.f|=se,e;if(!(t.f&32768)&&!(t.f&4))throw e;Tn(e,t)}function Tn(e,t){if(e===ve)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function En(e){ar===null&&(nr===null&&Be(e),ze()),er&&Re(e)}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function On(e,t){var n=ar;n!==null&&n.f&8192&&(e|=S);var r={ctx:Ze,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Mt?.register_created_effect(r);var i=r;if(e&4)Rt===null?Ht.ensure().schedule(r):Rt.push(r);else if(t!==null){try{wr(r)}catch(e){throw Gn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=te))}if(i!==null&&(i.parent=n,n!==null&&Dn(i,n),nr!==null&&nr.f&2&&!(e&64))){var a=nr;(a.effects??=[]).push(i)}return r}function kn(){return nr!==null&&!rr}function An(e){let t=On(8,null);return ut(t,y),t.teardown=e,t}function jn(e){En(`$effect`);var t=ar.f;if(!nr&&t&32&&Ze!==null&&!Ze.i){var n=Ze;(n.e??=[]).push(e)}else return Mn(e)}function Mn(e){return On(4|re,e)}function Nn(e){return En(`$effect.pre`),On(8|re,e)}function Pn(e){Ht.ensure();let t=On(64|ne,e);return()=>{Gn(t)}}function Fn(e){Ht.ensure();let t=On(64|ne,e);return(e={})=>new Promise(n=>{e.outro?Jn(t,()=>{Gn(t),n(void 0)}):(Gn(t),n(void 0))})}function In(e){return On(4,e)}function Ln(e){return On(oe|ne,e)}function Rn(e,t=0){return On(8|t,e)}function z(e,t=[],n=[],r=[]){vt(r,t,n,t=>{On(8,()=>{e(...t.map(B))})})}function zn(e,t=0){return On(16|t,e)}function Bn(e,t=0){return On(v|t,e)}function Vn(e){return On(32|ne,e)}function Hn(e){var t=e.teardown;if(t!==null){let n=er,r=nr;tr(!0),ir(null);try{t.call(null)}catch(t){Tn(t,e.parent)}finally{tr(n),ir(r)}}}function Un(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&gt(()=>{e.abort(ge)});var r=n.next;n.f&64?n.parent=null:Gn(n,t),n=r}}function Wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Gn(t),t=n}}function Gn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Kn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,Un(e,t&&!n),Cr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Hn(e),e.f^=ee,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&qn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Kn(e,t){for(;e!==null;){var n=e===t?null:yn(e);e.remove(),e=n}}function qn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Jn(e,t,n=!0){var r=[];e.f|=256,Yn(e,r,!0);var i=()=>{n&&Gn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Yn(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Yn(i,t,o?n:!1)}i=a}}}function Xn(e){e.f&=-257,Zn(e,!0)}function Zn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=S,e.f&1024||(ut(e,b),Ht.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Zn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Qn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:yn(n);t.append(n),n=i}}var $n=null,er=!1;function tr(e){er=e}var nr=null,rr=!1;function ir(e){nr=e}var ar=null;function or(e){ar=e}var sr=null;function cr(e){nr!==null&&(nr.f&2097152||nr.f&2)&&(sr??=new Set).add(e)}var lr=null,ur=0,dr=null;function fr(e){dr=e}var pr=1,mr=0,hr=mr;function gr(e){hr=e}function _r(){return++pr}function vr(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(vr(a)&&Ot(a),a.wv>e.wv)return!0}t&512&&Pt===null&&ut(e,y)}return!1}function yr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(sr!==null&&sr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?yr(a,t,!1):t===a&&(n?ut(a,b):a.f&1024&&ut(a,x),qt(a))}}function br(e){var t=lr,n=ur,r=dr,i=nr,a=sr,o=Ze,s=rr,c=hr,l=e.f;lr=null,ur=0,dr=null,nr=l&96?null:e,sr=null,Qe(e.ctx),rr=!1,hr=++mr,e.ac!==null&&(gt(()=>{e.ac.abort(ge)}),e.ac=null);try{e.f|=ae;var u=e.fn,d=u();e.f|=w;var f=xr(e);if(it()&&dr!==null&&!rr&&f!==null&&!(e.f&6146))for(var p=0;p<dr.length;p++)yr(dr[p],e);if(i!==null&&i!==e){if(mr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=mr;if(t!==null)for(let e of t)e.rv=mr;dr!==null&&(r===null?r=dr:r.push(...dr))}return e.f&8388608&&(e.f^=se),d}catch(t){return xr(e),wn(t)}finally{e.f^=ae,lr=t,ur=n,dr=r,nr=i,sr=a,Qe(o),rr=s,hr=c}}function xr(e){var t=e.deps,n=Mt?.is_fork;if(lr!==null){var r;if(n||Cr(e,ur),t!==null&&ur>0)for(t.length=ur+lr.length,r=0;r<lr.length;r++)t[ur+r]=lr[r];else e.deps=t=lr;if(kn()&&e.f&512)for(r=ur;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&ur<t.length&&(Cr(e,ur),t.length=ur);return t}function Sr(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(lr===null||!n.call(lr,r))){var s=r;s.f&512&&(s.f^=512),s.v!==E&&dt(s),s.ac!==null&&gt(()=>{s.ac.abort(ge),s.ac=null,ut(s,b)}),kt(s),Cr(s,0)}}function Cr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sr(e,n[r])}function wr(e){var t=e.f;if(!(t&16384)){ut(e,y);var n=ar;ar=e;try{t&16777232?Wn(e):Un(e),Hn(e);var r=br(e);e.teardown=typeof r==`function`?r:null,e.wv=pr}finally{ar=n}}}async function Tr(){await Promise.resolve(),Ut()}function B(e){var t=!!(e.f&2);if($n?.add(e),nr!==null&&!rr&&!(ar!==null&&ar.f&16384)&&(sr===null||!sr.has(e))){var r=nr.deps;if(nr.f&2097152)e.rv<mr&&(e.rv=mr,lr===null&&r!==null&&r[ur]===e?ur++:lr===null?lr=[e]:lr.push(e));else{nr.deps??=[],n.call(nr.deps,e)||nr.deps.push(e);var i=e.reactions;i===null?e.reactions=[nr]:n.call(i,nr)||i.push(nr)}}if(er&&Zt.has(e))return Zt.get(e);if(t){var a=e;if(er){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Dr(a))&&(o=Dt(a)),Zt.set(a,o),o}var s=!(a.f&512)&&!rr&&nr!==null&&!!(nr.f&512),c=(a.f&w)===0;vr(a)&&(s&&(a.f|=512),Ot(a)),s&&!c&&(At(a),Er(a))}if(Pt?.has(e))return Pt.get(e);if(e.f&8388608)throw e.v;return e.v}function Er(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:n.call(t,e)||t.push(e),r.f&2&&!(r.f&512)&&(At(r),Er(r))}}function Dr(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Zt.has(t)||t.f&2&&Dr(t))return!0;return!1}function Or(e){var t=rr;try{return rr=!0,e()}finally{rr=t}}function kr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(ce in e)Ar(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&ce in n&&Ar(n)}}}function Ar(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ar(e[n],t)}catch{}let n=l(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=o(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function jr(){return Symbol(xe)}function Mr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Nr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Pr(e){return Nr.includes(e)}var Fr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Ir={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Lr(e){return e=e.toLowerCase(),Ir[e]??e}[...Fr];var Rr=[`touchstart`,`touchmove`];function zr(e){return Rr.includes(e)}var Br=[`textarea`,`script`,`style`,`title`];function Vr(e){return Br.includes(e)}var Hr=Symbol(`events`),Ur=new Set,Wr=new Set;function Gr(e,t,n,r={}){function i(e){if(r.capture||Zr.call(t,e),!e.cancelBubble)return gt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,st(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function Kr(e,t,n,r={}){var i=Gr(t,e,n,r);return()=>{i.__removed=!0,e.removeEventListener(t,i,r)}}function qr(e,t,n){(t[Hr]??={})[e]=n}function Jr(e){for(var t=0;t<e.length;t++)Ur.add(e[t]);for(var n of Wr)n(e)}var Yr=null,Xr=!1;function Zr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Yr=e,Xr||(Xr=!0,setTimeout(()=>{Xr=!1,Yr=null}));var s=0,c=Yr===e&&e[Hr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Hr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=nr,f=ar;ir(null),or(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Hr]?.[r];h==null||o.disabled&&e.target!==o||h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Hr]=t,delete e.currentTarget,ir(d),or(f)}}}var Qr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function $r(e){return Qr?.createHTML(e)??e}function ei(e){var t=Sn(`template`);return t.innerHTML=$r(e.replaceAll(`<!>`,`<!---->`)),t.content}function ti(e,t){var n=ar;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(D)return ti(De,null),De;i===void 0&&(i=ei(a?e:`<!>`+e),n||(i=vn(i)));var t=r||pn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=vn(t),s=t.lastChild;ti(o,s)}else ti(t,t);return t}}function ni(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(D)return ti(De,null),De;if(!o){var e=vn(ei(a));if(i)for(o=document.createDocumentFragment();vn(e);)o.appendChild(vn(e));else o=vn(e)}var t=o.cloneNode(!0);if(i){var n=vn(t),r=t.lastChild;ti(n,r)}else ti(t,t);return t}}function ri(e,t){return ni(e,t,`svg`)}function H(e=``){if(!D){var t=_n(e+``);return ti(t,t),t}var n=De;return n.nodeType===3?Cn(n):(n.before(n=_n()),Oe(n)),ti(n,n),n}function U(){if(D)return ti(De,null),De;var e=document.createDocumentFragment(),t=document.createComment(``),n=_n();return e.append(t,n),ti(t,n),e}function W(e,t){if(D){var n=ar;n.f&32768&&n.nodes.end!==null||(n.nodes.end=De),ke()}else e!==null&&e.before(t)}function ii(){if(D&&De&&De.nodeType===8&&De.textContent?.startsWith(`$`)){let e=De.textContent.substring(1);return ke(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function ai(e){let t=0,n=$t(0),r;return()=>{kn()&&(B(n),Rn(()=>(t===0&&(r=Or(()=>e(()=>sn(n)))),t+=1,()=>{st(()=>{--t,t===0&&(r?.(),r=void 0,sn(n))})})))}}var oi=te|ne;function si(e,t,n,r){new ci(e,t,n,r)}var ci=class{parent;is_pending=!1;transform_error;#e;#t=D?De:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Map;#p=null;#m=ai(()=>(this.#p=$t(this.#l),()=>{this.#p=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=ar;t.b=this,t.f|=128,n(e)},this.parent=ar.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=zn(()=>{if(D){let e=je(this.#t);ke();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#g(t)}else t?this.#y():this.#h()}else this.#b()},oi),D&&(this.#e=De)}#h(){try{this.#a=Vn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#_(e);st(r),t&&(this.#s=Vn(()=>{t(this.#e,()=>e,()=>n)}))}#_(e){var t=!1,n=!1;let r=()=>{this.#v()||(t?Te():(t=!0,n&&Ke(),this.#s!==null&&Jn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})))};return{reset:r,invoke_onerror:()=>{if(!this.#v())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){Tn(e,this.#i&&this.#i.parent)}}}}#v(){return(this.#i.f&(C|ee))!==0}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Vn(()=>e(this.#e)),st(()=>{if(!this.#v()){var e=this.#c=document.createDocumentFragment(),t=_n(),n=!1;e.append(t),this.#a=this.#S(()=>{try{return Vn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){Tn(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#x(Mt)):this.#u===0&&(this.#e.before(e),this.#c=null,Jn(this.#o,()=>{this.#o=null}),this.#x(Mt))}}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Vn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Qn(this.#a,e);let t=this.#n.pending;this.#o=Vn(()=>t(this.#e))}else this.#x(Mt)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_reactions(this.#f)}defer_effect(e){ft(e,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=ar,n=nr,r=Ze;or(this.#i),ir(this.#i),Qe(this.#i.ctx);try{return Ht.ensure(),e()}finally{or(t),ir(n),Qe(r)}}#C(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Jn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#C(e,t)}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!this.#p||this.#d||(this.#d=!0,st(()=>{this.#d=!1,this.#p&&rn(this.#p,this.#l)}))}get_effect_pending(){return this.#m(),B(this.#p)}error(e){if(e===ve||!this.#n.onerror&&!this.#n.failed)throw e;Mt?.is_fork?(this.#a&&Mt.skip_effect(this.#a),this.#o&&Mt.skip_effect(this.#o),this.#s&&Mt.skip_effect(this.#s),Mt.oncommit(()=>{this.#v()||this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(Gn(this.#a),null),this.#o&&=(Gn(this.#o),null),this.#s&&=(Gn(this.#s),null),D&&(Oe(this.#t),k(),Oe(Ae()));let t=this.#n.failed,n=e=>{if(this.#v())return;let{reset:n,invoke_onerror:r}=this.#_(e);r(),t&&!this.#v()&&(this.#s=this.#S(()=>{try{return Vn(()=>{var r=ar;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return Tn(e,this.#i.parent),null}}))};st(()=>{if(!this.#v()){var t;try{t=this.transform_error(e)}catch(e){Tn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>Tn(e,this.#i&&this.#i.parent)):n(t)}})}};function G(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[me]??=e.nodeValue)&&(e[me]=n,e.nodeValue=`${n}`)}function li(e,t){return di(e,t)}var ui=new Map;function di(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){gn();var l=void 0,u=Fn(()=>{var s=n??t.appendChild(_n());si(s,{pending:()=>{}},t=>{A({});var n=Ze;if(o&&(n.c=o),a&&(i.$$events=a),D&&ti(t,null),l=e(t,i)||rt(),D&&(ar.nodes.end=De,De===null||De.nodeType!==8||De.data!==`]`))throw Ce(),ve;j()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=zr(r);for(let e of[t,document]){var a=ui.get(e);a===void 0&&(a=new Map,ui.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Zr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(Ur)),Wr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ui.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Zr),r.delete(e),r.size===0&&ui.delete(n)):r.set(e,i)}Wr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return fi.set(l,u),l}var fi=new WeakMap;function pi(e,t){let n=fi.get(e);return n?(fi.delete(e),n(t)):Promise.resolve()}var mi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Xn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Xn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Gn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Qn(r,t),t.append(_n()),this.#n.set(e,{effect:r,fragment:t})}else Gn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Jn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Gn(n.effect),this.#n.delete(e))};ensure(e,t){var n=Mt,r=xn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=_n();i.append(a),this.#n.set(e,{effect:Vn(()=>t(a)),fragment:i})}else this.#t.set(e,Vn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else D&&(this.anchor=De),this.#a(n)}};function K(e,t,n=!1){var r;D&&(r=De,ke());var i=new mi(e),a=n?te:0;function o(e,t){if(D){var n=je(r);if(e!==parseInt(n.substring(1))){var a=Ae();Oe(a),i.anchor=a,Ee(!1),i.ensure(e,t),Ee(!0);return}}i.ensure(e,t)}zn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var hi=Symbol(`NaN`);function gi(e,t,n){D&&ke();var r=new mi(e),i=!it();zn(()=>{var e=t();e!==e&&(e=hi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function _i(e,t){return t}function vi(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];Jn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;yi(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;bn(d),d.append(u),e.items.clear()}yi(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function yi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Qn(a,document.createDocumentFragment())):Gn(t[i],n)}}var bi;function xi(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=D?Oe(vn(u)):u.appendChild(_n())}D&&ke();var d=null,f=Tt(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var t=B(f);_.fallback=d,Ci(_,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=ie,Ti(d,null,c)):Xn(d):Jn(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:zn(()=>{var e=B(f),t=e.length;let r=!1;D&&je(c)===`[!`!=(t===0)&&(c=Ae(),Oe(c),Ee(!1),r=!0);for(var u=new Set,_=Mt,v=xn(),y=0;y<t;y+=1){D&&De.nodeType===8&&De.data===`]`&&(c=De,r=!0,Ee(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&rn(S.v,b),S.i&&rn(S.i,y),v&&_.unskip_effect(S.e)):(S=wi(l,m?c:bi??=_n(),b,x,y,o,n,i),m||(S.e.f|=ie),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=Vn(()=>s(c)):(d=Vn(()=>s(bi??=_n())),d.f|=ie)),t>u.size&&Le(``,``,``),D&&t>0&&Oe(Ae()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}r&&Ee(!0),B(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,D&&(c=De)}function Si(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Ci(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=Si(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Xn(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=ie,_===l)Ti(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ei(e,d,_),Ei(e,_,y),Ti(_,y,n),d=_,p=[],m=[],l=Si(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Ti(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ei(e,S.prev,C.next),Ei(e,d,S),Ei(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Ti(_,l,n),Ei(e,_.prev,_.next),Ei(e,_,d===null?e.effect.first:d.next),Ei(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Si(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Si(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(yi(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Si(l.next);var ee=w.length;if(ee>0){var te=i&4&&s===0?n:null;if(o){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}vi(e,w,te)}}o&&st(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function wi(e,t,n,r,i,a,o,s){var c=o&1?o&16?$t(n):en(n,!1,!1):null,l=o&2?$t(i):null;return{v:c,i:l,e:Vn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ti(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=yn(r);if(a.before(r),r===i)return;r=o}}function Ei(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Di(e,t,n,r,i){if(D&&ke(),t.$$host?.$$shadowRoot){let t=Sn(`slot`);if(n!=="default"&&(t.name=n),W(e,t),i!==null){let e=_n();t.append(e),i(e)}}else{var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n==="default"?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}}function q(e,t,...n){var r=new mi(e);zn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},te)}function J(e,t,n){var r;D&&(r=De,ke());var i=new mi(e);zn(()=>{var e=t()??null;if(D&&je(r)===`[`!=(e!==null)){var a=Ae();Oe(a),i.anchor=a,Ee(!1),i.ensure(e,e&&(t=>n(t,e))),Ee(!0)}else i.ensure(e,e&&(t=>n(t,e)))},te)}function Oi(e,t,n,r,i,a){let o=D;D&&ke();var s=null;D&&De.nodeType===1&&(s=De,ke());var c=D?De:e,l=new mi(c,!1);zn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?be:void 0;if(e===null)l.ensure(null,null);else return l.ensure(e,t=>{if(e){var n=D;if(s=D?s:Sn(e,a),ti(s,s),r){var i=null;D&&Vr(e)&&s.append(i=document.createComment(``));var o=D?vn(s):s.appendChild(_n());D&&(o===null?Ee(!1):Oe(o)),r(s,o),i?.remove()}ar.nodes.end=s,n||t.before(s)}D&&Oe(t)}),()=>{}},te),An(()=>{}),o&&(Ee(!0),Oe(c))}function ki(e,t){var n=void 0,r;Bn(()=>{n!==(n=t())&&(r&&=(Gn(r),null),n&&(r=Vn(()=>{In(()=>n(e))})))})}function Ai(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ji(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=` `),r+=t);return r}function Mi(e){return typeof e==`object`?ji(e):e??``}var Ni=[...`
2
- \r\f\xA0\v`];function Pi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ni.includes(r[o-1]))&&(s===r.length||Ni.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Fi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Ii(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Li(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Ii)),i&&c.push(...Object.keys(i).map(Ii));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Ii(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Fi(r)),i&&(n+=Fi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Ri(e,t,n,r,i,a){var o=e[fe];if(D||o!==n||o===void 0){var s=Pi(n,r,a);D&&s===e.getAttribute(`class`)||(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[fe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function zi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Bi(e,t,n,r){var i=e[pe];if(D||i!==t){var a=Li(t,r);D&&a===e.getAttribute(`style`)||(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[pe]=t}else r&&(Array.isArray(r)?(zi(e,n?.[0],r[0]),zi(e,n?.[1],r[1],`important`)):zi(e,n,r));return r}function Vi(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Hi(e,t){var n=!(`__defaultValue`in e);(n||e.__defaultValue!==t)&&(e.__defaultValue=t,Ui(e,!n||`__value`in e))}function Ui(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=qi(c);Vi(c,i?a.includes(l):dn(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function Wi(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return we();for(var i of t.options)i.selected=n.includes(qi(i))}else{for(i of t.options)if(dn(qi(i),n)){i.selected=!0;return}r&&n===void 0||(t.selectedIndex=-1)}}function Gi(e){var t=new MutationObserver(t=>{t.every(Ji)||(`__defaultValue`in e&&Ui(e,!1),`__value`in e&&Wi(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),An(()=>{t.disconnect()})}function Ki(e,t,n=t){var r=new WeakSet,i=!0;_t(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),qi);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&qi(o)}n(a),e.__value=a,Mt!==null&&r.add(Mt)}),In(()=>{var a=t();if(e===document.activeElement){var o=Mt;if(r.has(o))return}if(Wi(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=qi(s),n(a))}e.__value=a,i=!1})}function qi(e){return`__value`in e?e.__value:e.value}function Ji(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var Yi=Symbol(`class`),Xi=Symbol(`style`),Zi=Symbol(`is custom element`),Qi=Symbol(`is html`),$i=_e?`link`:`LINK`,ea=_e?`input`:`INPUT`,ta=_e?`option`:`OPTION`,na=_e?`select`:`SELECT`,ra=_e?`progress`:`PROGRESS`;function ia(e){if(D){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;aa(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;aa(e,`checked`,null),e.checked=r}}};e[he]=n,st(n),ht()}}function aa(e,t,n,r){var i=ca(e);if(!(D&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===$i))){var a=i[t];a!==(i[t]=n)&&(t===`loading`&&(e[T]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ua(e).has(t)?e[t]=n:(!D||typeof n!=`number`&&typeof n!=`boolean`||a!==String(n))&&e.setAttribute(t,n))}}function oa(e,t,n,r,i=!1,a=!1){D&&i&&e.nodeName===ea&&(`defaultValue`in n||`defaultChecked`in n||ia(e));var o=ca(e),s=o[Zi],c=!o[Qi];let l=D&&s;l&&Ee(!1);var u=t||{},d=e.nodeName===ta,f=e.nodeName===na;try{for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=Mi(n.class):(r||n[Yi])&&(n.class=null),n[Xi]&&(n.style??=null);var m=ua(e);if(e.nodeName===ea&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==u.type||h===void 0&&e.hasAttribute(`type`))&&(u.type=h,aa(e,`type`,h,a))}for(let i in n){let l=n[i];if(d&&i===`value`&&l==null)e.value=e.__value=``,u[i]=l;else if(i===`class`)Ri(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[Yi],n[Yi]),u[i]=l,u[Yi]=n[Yi];else if(i===`style`)Bi(e,l,t?.[Xi],n[Xi]),u[i]=l,u[Xi]=n[Xi];else{var g=u[i];if(l!==g||l===void 0&&e.hasAttribute(i)){u[i]=l;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Pr(r);if(Mr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;e.removeEventListener(r,u[n],t),u[n]=null}if(v)qr(r,e,l),Jr([r]);else if(l!=null){function a(e){u[i].call(this,e)}u[n]=Gr(r,e,a,t)}}else if(i===`style`)aa(e,i,l);else if(i===`autofocus`)pt(e,!!l);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.__value=l,(g==null||e.value!==l||l===0&&e.nodeName===ra)&&(e.value=l);else if(i===`selected`&&d)Vi(e,l);else{var y=i;c||(y=Lr(y));var b=y===`defaultValue`||y===`defaultChecked`;if(f&&y===`defaultValue`)continue;if(l==null&&!s&&!b){if(o[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else b||(s||typeof l!=`string`)&&m.has(y)?(e[y]=l,y in o&&(o[y]=E)):typeof l!=`function`&&aa(e,y,l,a)}}}}}}finally{l&&Ee(!0)}return u}function sa(e,t,n=[],r=[],i=[],a,o=!1,s=!1){vt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===na,l=!1;if(Bn(()=>{var u=t(...n.map(B)),d=oa(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&Hi(f,u.defaultValue),`value`in u&&Wi(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||Gn(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description!==`@attach`||r&&p===r[t]||(i[t]&&Gn(i[t]),i[t]=Vn(()=>ki(e,()=>p))),d[t]=p}r=d}),c){var u=e;In(()=>{var e=r;`defaultValue`in e&&Hi(u,e.defaultValue),Wi(u,e.value,!0),Gi(u)})}l=!0})}function ca(e){return e[de]??={[Zi]:e.nodeName.includes(`-`),[Qi]:e.namespaceURI===ye}}var la=new Map;function ua(e){var t=e.getAttribute(`is`)||e.nodeName,n=la.get(t);if(n)return n;la.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.add(s);i=l(i)}return n}function da(e,t,n=t){var r=new WeakSet;_t(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=fa(e)?pa(a):a,n(a),Mt!==null&&r.add(Mt),await Tr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(D&&e.defaultValue!==e.value||Or(t)==null&&e.value)&&(n(fa(e)?pa(e.value):e.value),Mt!==null&&r.add(Mt)),Rn(()=>{var n=t();if(e===document.activeElement){var i=Mt;if(r.has(i))return}fa(e)&&n===pa(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function fa(e){var t=e.type;return t===`number`||t===`range`}function pa(e){return e===``?null:+e}function ma(e,t,n=t){_t(e,`change`,()=>{n(e.files)}),D&&e.files&&n(e.files),Rn(()=>{e.files=t()})}function ha(e,t){return e===t||e?.[ce]===t}function ga(e=rt(),t,n,r){var i=Ze.r,a=ar;return In(()=>{var o,s;return Rn(()=>{o=s,s=r?.()||[],Or(()=>{ha(n(...s),e)||(t(e,...s),o&&ha(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ha(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function _a(e=!1){let t=Ze,n=t.l.u;if(!n)return;let r=()=>kr(t.s);if(e){let e=0,n={},i=St(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>B(i)}n.b.length&&Nn(()=>{va(t,r),m(n.b)}),jn(()=>{let e=Or(()=>n.m.map(p));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&jn(()=>{va(t,r),m(n.a)})}function va(e,t){if(e.l.s)for(let t of e.l.s)B(t);t()}var ya=!1;function ba(e){var t=ya;try{return ya=!1,[e(),ya]}finally{ya=t}}var xa={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},xa)}var Sa={get(e,t){if(!e.exclude.includes(t))return B(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var r=ar;try{or(e.parent_effect),e.special[t]=X({get[t](){return e.props[t]}},t,4)}finally{or(r)}}return e.special[t](n),on(e.version),!0},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},deleteProperty(e,t){return e.exclude.includes(t)||(e.exclude.push(t),on(e.version)),!0},has(e,t){return!e.exclude.includes(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Ca(e,t){return new Proxy({props:e,exclude:t,special:{},version:$t(0),parent_effect:ar},Sa)}var wa={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];d(i)&&(i=i());let o=a(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=a(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ce||t===ue)return!1;for(let n of e.props)if(d(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Ta(...e){return new Proxy({props:e},wa)}function X(e,t,n,r){var i=!qe||!!(n&2),o=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??=St(r),B(u)):(l&&(l=!1,c=s?Or(r):r),c);let f;if(o){var p=ce in e||ue in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=ba(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&He(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?St:Tt)(()=>(v=!1,g()));o&&B(y);var b=ar;return(function(e,t){if(arguments.length>0){let n=t?B(y):i&&o?ln(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return er&&v||b.f&16384?y.v:B(y)})}function Ea(e){Ze===null&&Fe(`onMount`),qe&&Ze.l!==null?Da(Ze).m.push(e):jn(()=>{let t=Or(e);if(typeof t==`function`)return t})}function Da(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),Je();var Oa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ka=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Aa=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ja=ri(`<svg><!><!></svg>`);function Ma(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=Ca(n,[`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`]);A(t,!1);let i=X(t,`name`,8,void 0),a=X(t,`color`,8,`currentColor`),o=X(t,`size`,8,24),s=X(t,`strokeWidth`,8,2),c=X(t,`absoluteStrokeWidth`,8,!1),l=X(t,`iconNode`,24,()=>[]);_a();var u=ja();sa(u,(e,t,n)=>({...Oa,...e,...r,width:o(),height:o(),stroke:a(),"stroke-width":t,class:n}),[()=>ka(r)?void 0:{"aria-hidden":`true`},()=>(kr(c()),kr(s()),kr(o()),Or(()=>c()?Number(s())*24/Number(o()):s())),()=>(kr(Aa),kr(i()),kr(n),Or(()=>Aa(`lucide-icon`,`lucide`,i()?`lucide-${i()}`:``,n.class)))]);var d=F(u);xi(d,1,l,_i,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Oi(I(a),r,!0,(e,t)=>{sa(e,()=>({...i()}))}),W(e,a)}),Di(R(d),t,`default`,{},null),O(u),W(e,u),j()}function Na(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Ma(e,Ta({name:`activity`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Pa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`}],[`path`,{d:`m5.082 11.09 8.828 8.828`}]];Ma(e,Ta({name:`eraser`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Fa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];Ma(e,Ta({name:`log-out`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ia(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Ma(e,Ta({name:`pause`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function La(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}],[`path`,{d:`m15 5 4 4`}]];Ma(e,Ta({name:`pencil`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ra(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Ma(e,Ta({name:`play`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function za(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Ma(e,Ta({name:`plus`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ba(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Ma(e,Ta({name:`refresh-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Va(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];Ma(e,Ta({name:`rotate-ccw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ha(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]];Ma(e,Ta({name:`save`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ua(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Ma(e,Ta({name:`search`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Wa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Ma(e,Ta({name:`trash-2`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ga(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Ma(e,Ta({name:`x`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}var Ka=class extends Error{status;fields;constructor(e,t,n=[]){super(t),this.status=e,this.fields=n,this.name=`ApiError`}};async function qa(e,t){let n=await fetch(e,{credentials:`same-origin`,...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...t?.headers}});if(!n.ok){let e=`请求失败(${n.status})`,t=[];try{let r=await n.json();r.message&&(e=r.message),Array.isArray(r.fields)&&(t=r.fields)}catch{}throw new Ka(n.status,e,t)}return await n.json()}var Ja={async login(e){await qa(`/api/login`,{method:`POST`,body:JSON.stringify({token:e})})},schema(){return qa(`/api/config/schema`)},config(){return qa(`/api/config`)},save(e){return qa(`/api/config`,{method:`PUT`,body:JSON.stringify(e)})},models(){return qa(`/api/models`)},status(){return qa(`/api/status`)},logs(e={}){let t=new URLSearchParams;e.limit!==void 0&&t.set(`limit`,String(e.limit)),e.level&&t.set(`level`,e.level);let n=t.toString();return qa(`/api/logs${n?`?${n}`:``}`)},chatOverrides(){return qa(`/api/chat-overrides`)},saveChatOverrides(e){return qa(`/api/chat-overrides`,{method:`PUT`,body:JSON.stringify(e)})},toolProfiles(){return qa(`/api/tool-profiles`)},saveToolProfiles(e){return qa(`/api/tool-profiles`,{method:`PUT`,body:JSON.stringify(e)})}};function Ya(e){let t=new EventSource(`/api/stream`),n=(e,n)=>{n&&t.addEventListener(e,e=>{try{n(JSON.parse(e.data))}catch{}})};return n(`status`,t=>e.status?.(t)),n(`log`,t=>e.log?.(t)),n(`config`,t=>e.config?.(t)),()=>t.close()}var Xa=Array.isArray,Za=e=>{if(!e&&e!==0&&e!==0n)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return e===e?``+e:``;if(typeof e==`bigint`)return``+e;let t=``;if(Xa(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n&&n!==0&&n!==0n)continue;let i=typeof n==`string`?n:Za(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},Qa=/\s+/g,$a=Array.isArray,eo=e=>typeof e!=`string`||!e?e:e.replace(Qa,` `).trim(),to=e=>{let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0),r=e.charCodeAt(t-1);if(n===32||r===32||n>=9&&n<=13||n===160||r>=9&&r<=13||r===160)return!0;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(r>=9&&r<=13||r===160||r===32&&n+1<t&&e.charCodeAt(n+1)===32)return!0}return!1},no=(...e)=>{let t=Za(e);if(t)return to(t)?eo(t):t},ro=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,io=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},ao=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e=0;e<i.length;e++){let t=i[e];if(!a.includes(t)||n[t]!==r[t])return!1}return!0},oo=(e,t)=>{let n=e;for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];n[e]=e in n?no(n[e],r):r}return e},so=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];$a(r)?so(r,t):r&&t.push(r)}},co=(...e)=>{let t=[];so(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},lo=(e,t)=>{let n=e,r=t,i={};for(let e in n){let t=n[e];if(e in r){let n=r[e];i[e]=$a(t)||$a(n)?co(n,t):typeof t==`object`&&typeof n==`object`&&t&&n?lo(t,n):n+` `+t}else i[e]=t}for(let e in r)e in n||(i[e]=r[e]);return i},uo={twMerge:!0,twMergeConfig:{}},fo=256,po=128,mo=Symbol(`tv-cache-miss`),ho=e=>e?.class!=null&&e.class!==``||e?.className!=null&&e.className!==``,go=e=>{if(e===void 0)return``;if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return e===0?`0`:String(e);if(typeof e==`bigint`)return String(e);let t=ro(e),n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return String(t);if(n===`object`)try{return JSON.stringify(t)}catch{return null}return null},_o=(e,t)=>{if(t===void 0)return e;if(t===null)return e+`null`;let n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return e+String(t);if(Array.isArray(t))return e+t.join(`\0`);try{return e+JSON.stringify(t)}catch{return e+`?`}},vo=(e,t,n,r)=>{let i=``,a=Object.create(null);for(let r=0;r<e.length;r++){let o=e[r];a[o]=1;let s=t[o];n&&n[o]!==void 0&&(s=n[o]);let c=go(s);if(c===null)return null;i+=o+`:`+c+`;`}let o=[];for(let e in t)e===`class`||e===`className`||a[e]||(a[e]=1,o.push(e));if(n)for(let e in n)e===`class`||e===`className`||a[e]||n[e]===void 0||(a[e]=1,o.push(e));o.length>1&&o.sort();for(let e=0;e<o.length;e++){let r=o[e],a=t[r];n&&n[r]!==void 0&&(a=n[r]);let s=go(a);if(s===null)return null;i+=r+`:`+s+`;`}return i},yo=(e,t)=>{let n=``;for(let t=0;t<e.length;t++){let{conditionKeys:r,source:i}=e[t];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=_o(n,i[t]),n+=`,`}n+=`c=`,n=_o(n,i.class),n+=`|cn=`,n=_o(n,i.className),n+=`;`}for(let e=0;e<t.length;e++){let{conditionKeys:r,source:i}=t[e];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=_o(n,i[t]),n+=`,`}Array.isArray(i.slots)&&(n+=`slots=`+i.slots.join(`,`)+`,`),n+=`c=`,n=_o(n,i.class),n+=`|cn=`,n=_o(n,i.className),n+=`;`}return n},bo=(e=fo)=>{let t=new Map,n=null;return{get(e){if(t.has(e))return t.get(e);if(n?.has(e)){let r=n.get(e);return t.set(e,r),r}return mo},set(r,i){t.size>=e&&(n=t,t=new Map),t.set(r,i)}}},xo=(e=fo)=>{let t=bo(e);return{get(e){return t.get(e)},set(e,n){t.set(e,n)}}},So=(e=po)=>{let t=new Map,n=null,r=0;return{get(e,i){let a=t.get(e);if(a){let e=a.get(i);if(e!==void 0||a.has(i))return e}if(n){let a=n.get(e);if(a){let n=a.get(i);if(n!==void 0||a.has(i)){let a=t.get(e);return a||(a=new Map,t.set(e,a)),a.has(i)||r++,a.set(i,n),n}}}return mo},set(i,a,o){r>=e&&(n=t,t=new Map,r=0);let s=t.get(i);s||(s=new Map,t.set(i,s)),s.has(a)||r++,s.set(a,o)}}},Co=(e,t)=>{let n=null;return(r,i)=>{if(!ho(i))return r;let a=i.class,o=i.className;if(a!=null&&a!==``&&typeof a!=`string`||o!=null&&o!==``&&typeof o!=`string`)return e(t,r,a,o);n??=So();let s=r??``,c=(typeof a==`string`?a:``)+`\0`+(typeof o==`string`?o:``),l=n.get(s,c);if(l!==mo)return l;let u=e(t,r,a,o);return n.set(s,c,u),u}};function wo(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var To=wo(),Eo=e=>{!io(e.twMergeConfig)&&!ao(e.twMergeConfig,To.cachedTwMergeConfig)&&(To.didTwMergeConfigChange=!0,To.cachedTwMergeConfig=e.twMergeConfig)},Do=(e,t)=>{let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e[i];n.push({key:i,values:a,isEmpty:io(a)})}return n},Oo=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r})}return t},ko=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`slots`&&e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r})}return t},Ao=e=>{let t={};for(let n=0;n<e.length;n++){let r=e[n],i=r.source.slots;if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];t[n]||(t[n]=[]),t[n].push(r)}}return t},jo=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:a=[],compoundSlots:o=[],defaultVariants:s={}}=e,c={...uo,...t},l=e.slots!==void 0,u=n?.base?no(n.base,e?.base):e?.base,d=n?.variants&&!io(n.variants)?lo(i,n.variants):i,f=n?.defaultVariants&&!io(n.defaultVariants)?{...n.defaultVariants,...s}:s;Eo(c);let p=!n?.slots||io(n.slots),m=l?p&&n?.base?no(e?.base,n.base):typeof e?.base==`string`||e?.base==null?e.base:no(e.base):void 0,h=l?{base:m,...r}:{},g=p?h:oo({...n?.slots},io(h)?{base:e?.base}:h),_=!n?.compoundVariants||io(n.compoundVariants)?a:co(n?.compoundVariants,a),v=!n?.compoundSlots||io(n.compoundSlots)?o:co(n?.compoundSlots,o),y=Object.keys(d);return{config:c,extend:n,base:u,variants:d,defaultVariants:f,slots:g,compoundVariants:_,compoundSlots:v,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:_&&!Array.isArray(_)?TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof _}`):v&&!Array.isArray(v)?TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof v}`):null,mode:l||!p?`slots`:y.length===0?`plain`:`variants`,slotKeys:null,variantKeys:y}},Mo=e=>(e.compiledVariants===null&&(e.compiledVariants=Do(e.variants,e.variantKeys),e.compiledCompoundVariants=Oo(e.compoundVariants),e.compiledCompoundSlots=ko(e.compoundSlots),e.compiledCompoundSlotsBySlot=Ao(e.compiledCompoundSlots),e.slotKeys=e.slots&&typeof e.slots==`object`?Object.keys(e.slots):[]),e),No=[],Po=[],Fo=[],Io=[],Lo=[],Ro=(e,t,n)=>{let r={};for(let t in e)r[t]=e[t];if(t)for(let e in t)t[e]!==void 0&&(r[e]=t[e]);if(n)for(let e in n)n[e]!==void 0&&(r[e]=n[e]);return r},zo=e=>e==null||e===!1,Bo=(e,t)=>{if(!Array.isArray(e))return e===t||zo(e)&&zo(t);for(let n=0;n<e.length;n++){let r=e[n];if(r===t||zo(r)&&zo(t))return!0}return!1},Vo=(e,t,n,r)=>{if(e.isEmpty)return null;let i=r?.[e.key]??n?.[e.key];if(i===null)return null;let a=ro(i);if(typeof a==`object`)return null;let o=t?.[e.key],s=a??ro(o);return e.values[s||`false`]},Ho=(e,t)=>{let{conditionKeys:n,source:r}=e;for(let e=0;e<n.length;e++){let i=n[e];if(!Bo(r[i],t[i]))return!1}return!0},Uo=(e,t,n)=>{typeof n==`string`?t===`base`&&e.push(n):n&&typeof n==`object`&&n[t]&&e.push(n[t])},Wo=(e,t,n)=>{let r=Po;r.length=0;for(let i=0;i<e.length;i++){let a=Vo(e[i],t,n);a&&r.push(a)}return r},Go=(e,t,n,r,i)=>{let a=Po;a.length=0;for(let o=0;o<t.length;o++){let s=Vo(t[o],n,r,i),c=e===`base`&&typeof s==`string`?s:s&&s[e];c&&a.push(c)}return a},Ko=(e,t)=>{let n=Fo;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Ho(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},qo=(e,t,n)=>{let r=Io;r.length=0;for(let i=0;i<t.length;i++){let a=t[i];Ho(a,n)&&(Uo(r,e,a.source.class),Uo(r,e,a.source.className))}return r},Jo=(e,t)=>{let n=Lo;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Ho(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},Yo=(e,t)=>{let{base:n,config:r}=e,i=mo,a=Co(t,r);return(e=>(i===mo&&(i=t(r,n)),a(i,e)))},Xo=(e,t)=>{let{base:n,config:r,defaultVariants:i,deferredError:a,variantKeys:o}=e,s=e.compiledCompoundVariants,c=e.compiledVariants,l=No,u=null,d=Co(t,r),f=1,p=e=>{let a=s.length>0?Ko(s,Ro(i,e)):void 0;return t(r,n,Wo(c,i,e),a)};return(t=>{if(a)throw a;(c===null||s===null)&&(Mo(e),c=e.compiledVariants,s=e.compiledCompoundVariants,l=e.compiledCompoundSlots??No);let n;if(f>0)f--,n=p(t);else{u??=xo();let e=vo(o,i,t);if(e!==null){let r=s.length>0||l.length>0?yo(s,l):``,i=e+`#`+r,a=u.get(i);a===mo?(n=p(t),u.set(i,n)):n=a}else n=p(t)}return d(n,t)})},Zo=(e,t)=>{let{config:n,defaultVariants:r,deferredError:i,slots:a,variantKeys:o}=e,s=null,c=null,l=null,u=null,d=!1,f=null,p=null,m=1,h=()=>{if(l!==null)return;(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&Mo(e);let i=e.compiledVariants;s=e.compiledCompoundVariants,c=e.compiledCompoundSlots;let o=e.compiledCompoundSlotsBySlot;l=e.slotKeys,d=s.length>0||c.length>0,f=Co(t,n);let p=Array(l.length);for(let e=0;e<l.length;e++){let c=l[e],u=o[c]??No;p[e]=(e,o)=>{let l=d?Ro(r,e,o):void 0,f=l?qo(c,s,l):void 0,p=l?Jo(u,l):void 0;return t(n,a[c],Go(c,i,r,e,o),f,p)}}u=p},g=e=>{let t=l,n=u,r=f,i={};for(let a=0;a<t.length;a++){let o=n[a],s=o(e);i[t[a]]=t=>{if(t==null)return s;let n=!1;for(let e in t)if(e!==`class`&&e!==`className`&&t[e]!==void 0){n=!0;break}return r(n?o(e,t):s,t)}}return i};return(e=>{if(i)throw i;if(h(),m>0)return m--,g(e);let t=vo(o,r,e);if(t===null)return g(e);let n=d?yo(s,c):``,a=t+`#`+n;p??=bo();let l=p.get(a);if(l!==mo)return l;let u=g(e);return p.set(a,u),u})},Qo=(e,t)=>{if(e.mode===`plain`)return Yo(e,t);let n;return(r=>(n??=e.mode===`slots`?Zo(e,t):Xo(e,t),n(r)))},$o=(e,t)=>{e.variantKeys=t.variantKeys,e.extend=t.extend,e.base=t.base,e.slots=t.slots,e.variants=t.variants,e.defaultVariants=t.defaultVariants,e.compoundSlots=t.compoundSlots,e.compoundVariants=t.compoundVariants},es=e=>{let t=(t,n)=>{let r=jo(t,n),i=Qo(r,e);return $o(i,r),i};return{tv:t,createTV:e=>(n,r)=>t(n,r?lo(e,r):e)}},ts=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},ns=(e,t)=>({classGroupId:e,validator:t}),rs=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),is=`-`,as=[],os=`arbitrary..`,ss=e=>{let t=us(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e[0]===`[`&&e[e.length-1]===`]`)return ls(e);let n=e.split(is);return cs(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ts(i,t):t:i||as}return n[e]||as}}},cs=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=cs(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(is):e.slice(t).join(is),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ls=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?os+r:void 0},us=e=>{let{theme:t,classGroups:n}=e;return ds(n,t)},ds=(e,t)=>{let n=rs();for(let r in e){let i=e[r];fs(i,n,r,t)}return n},fs=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ps(i,t,n,r)}},ps=(e,t,n,r)=>{typeof e==`string`?ms(e,t,n):typeof e==`function`?hs(e,t,n,r):gs(e,t,n,r)},ms=(e,t,n)=>{let r=e===``?t:_s(t,e);r.classGroupId=n},hs=(e,t,n,r)=>{vs(e)?fs(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ns(n,e)))},gs=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];fs(o,_s(t,a),n,r)}},_s=(e,t)=>{let n=e,r=t.split(is),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=rs(),n.nextPart.set(t,i)),n=i}return n},vs=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ys=`!`,bs=58,xs=47,Ss=91,Cs=93,ws=40,Ts=41,Es=33,Ds=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),Os=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===bs){t.push(e.slice(i,s)),i=s+1;continue}if(o===xs){a=s;continue}}o===Ss?n++:o===Cs?n--:o===ws?r++:o===Ts&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1,u=s.length-1;s.charCodeAt(u)===Es?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===Es&&(c=s.slice(1),l=!0);let d=a&&a>i?a-i:void 0;return Ds(t,l,c,d)},ks=e=>{let t=new Set(e.orderSensitiveModifiers);return e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);if(o||s){if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e]);r=[]}n.push(a)}else r.push(a)}if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e])}return n}},As={isExternal:!0,classId:-1,conflictIds:[]},js=4096,Ms=16384,Ns=e=>{let t=ks(e),n=Ps(e),{getClassGroupId:r,getConflictingClassGroupIds:i}=ss(e),a=Object.create(null),o=Object.create(null),s=0,c=new Int32Array(256),l=0,u=new Uint8Array(64),d=!1,f=e=>{let t=[],n=e.length,r=-1;d=!1;for(let i=0;i<n;i++){let n=e.charCodeAt(i);n===32?r!==-1&&(t.push(e.slice(r,i)),r=-1):n>=9&&n<=13?(d=!0,r!==-1&&(t.push(e.slice(r,i)),r=-1)):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t},p=new Map,m=0,h=e=>{let t=p.get(e);if(t===void 0&&(t=m++,p.set(e,t),t>=c.length)){let e=new Int32Array(c.length*2);e.set(c),c=e}return t},g=e=>{let{isExternal:a,modifiers:o,hasImportantModifier:s,baseClassName:c,maybePostfixModifierPosition:l}=Os(e);if(a)return As;let u=!!l,d;if(u){let e=c.substring(0,l);d=r(e);let t=d&&n[d]?r(c):void 0;t&&t!==d&&(d=t,u=!1)}else d=r(c);if(!d){if(!u||(d=r(c),!d))return As;u=!1}let f=o.length===0?``:o.length===1?o[0]:t(o).join(`:`),p=s?f+ys:f,m=i(d,u),g=[];for(let e=0;e<m.length;e++)g.push(h(p+m[e]));return{isExternal:!1,classId:h(p+d),conflictIds:g}},_=e=>{let t=a[e];return t===void 0&&(t=o[e],t===void 0&&(t=g(e)),a[e]=t,++s>js&&(s=0,o=a,a=Object.create(null))),t};return{parseClassName:Os,sortModifiers:t,postfixLookupClassGroupIds:n,getClassGroupId:r,getConflictingClassGroupIds:i,getClassDescriptor:_,mergeClassList:e=>{let t=f(e),n=t.length;if(n===1)return t[0];m>Ms&&(p.clear(),m=0,a=Object.create(null),o=Object.create(null),s=0),l=l+1|0,l===0&&(l=1);let r=l;if(n>u.length){let e=u.length;for(;e<n;)e*=2;u=new Uint8Array(e)}let i=!1,h=0;for(let e=n-1;e>=0;--e){let n=t[e];h+=n.length;let a=_(n);if(a.isExternal){u[e]=1;continue}let o=a.classId;if(c[o]===r){u[e]=0,i=!0;continue}c[o]=r;let s=a.conflictIds;for(let e=0;e<s.length;e++)c[s[e]]=r;u[e]=1}if(!i&&!d&&e.length===h+n-1)return e;let g=``;for(let e=0;e<n;e++)u[e]===1&&(g&&(g+=` `),g+=t[e]);return g}}},Ps=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Fs=500,Is=e=>{let t,n,r=Object.create(null),i=Object.create(null),a=0,o=r=>(t=Ns(e()),n=t.mergeClassList,c.mergeString=s,s(r)),s=e=>{let t=r[e];return t===void 0&&(t=i[e],t===void 0&&(t=n(e)),r[e]=t,++a>Fs&&(a=0,i=r,r=Object.create(null))),t},c=(...e)=>c.mergeString(Za(e));return c.mergeString=o,c},Ls=[],Rs=e=>{let t=t=>t[e]||Ls;return t.isThemeGetter=!0,t},zs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Hs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Us=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ws=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gs=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ks=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=Number,Js=Number.isNaN,Ys=Number.isInteger,Xs=e=>Vs.test(e),Zs=e=>!!e&&!Js(qs(e)),Qs=e=>!!e&&Ys(qs(e)),$s=e=>e.endsWith(`%`)&&Zs(e.slice(0,-1)),ec=e=>Hs.test(e),tc=()=>!0,nc=e=>Us.test(e)&&!Ws.test(e),rc=()=>!1,ic=e=>Gs.test(e),ac=e=>Ks.test(e),oc=e=>!Z(e)&&!Q(e),sc=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),cc=e=>Cc(e,Dc,rc),Z=e=>zs.test(e),lc=e=>Cc(e,Oc,nc),uc=e=>Cc(e,kc,Zs),dc=e=>Cc(e,jc,tc),fc=e=>Cc(e,Ac,rc),pc=e=>Cc(e,Tc,rc),mc=e=>Cc(e,Ec,ac),hc=e=>Cc(e,Mc,ic),Q=e=>Bs.test(e),gc=e=>wc(e,Oc),_c=e=>wc(e,Ac),vc=e=>wc(e,Tc),yc=e=>wc(e,Dc),bc=e=>wc(e,Ec),xc=e=>wc(e,Mc,!0),Sc=e=>wc(e,jc,!0),Cc=(e,t,n)=>{let r=zs.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wc=(e,t,n=!1)=>{let r=Bs.exec(e);return r?r[1]?t(r[1]):n:!1},Tc=e=>e===`position`||e===`percentage`,Ec=e=>e===`image`||e===`url`,Dc=e=>e===`length`||e===`size`||e===`bg-size`,Oc=e=>e===`length`,kc=e=>e===`number`,Ac=e=>e===`family-name`,jc=e=>e===`number`||e===`weight`,Mc=e=>e===`shadow`,Nc=()=>{let e=Rs(`color`),t=Rs(`font`),n=Rs(`text`),r=Rs(`font-weight`),i=Rs(`tracking`),a=Rs(`leading`),o=Rs(`breakpoint`),s=Rs(`container`),c=Rs(`spacing`),l=Rs(`radius`),u=Rs(`shadow`),d=Rs(`inset-shadow`),f=Rs(`text-shadow`),p=Rs(`drop-shadow`),m=Rs(`blur`),h=Rs(`perspective`),g=Rs(`aspect`),_=Rs(`ease`),v=Rs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],ee=()=>[Xs,`full`,`auto`,...w()],te=()=>[Qs,`none`,`subgrid`,Q,Z],ne=()=>[`auto`,{span:[`full`,Qs,Q,Z]},Qs,Q,Z],re=()=>[Qs,`auto`,Q,Z],ie=()=>[`auto`,`min`,`max`,`fr`,Q,Z],ae=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],oe=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],se=()=>[`auto`,...w()],ce=()=>[Xs,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],le=()=>[Xs,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ue=()=>[Xs,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],T=()=>[e,Q,Z],de=()=>[...b(),vc,pc,{position:[Q,Z]}],fe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],pe=()=>[`auto`,`cover`,`contain`,yc,cc,{size:[Q,Z]}],me=()=>[$s,gc,lc],he=()=>[``,`none`,`full`,l,Q,Z],ge=()=>[``,Zs,gc,lc],_e=()=>[`solid`,`dashed`,`dotted`,`double`],ve=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],E=()=>[Zs,$s,vc,pc],ye=()=>[``,`none`,m,Q,Z],be=()=>[`none`,Zs,Q,Z],xe=()=>[`none`,Zs,Q,Z],Se=()=>[Zs,Q,Z],Ce=()=>[Xs,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ec],breakpoint:[ec],color:[tc],container:[ec],"drop-shadow":[ec],ease:[`in`,`out`,`in-out`],font:[oc],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ec],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ec],shadow:[ec],spacing:[`px`,Zs],text:[ec],"text-shadow":[ec],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Xs,Z,Q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Q,Z]}],"container-named":[sc],columns:[{columns:[Zs,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Qs,`auto`,Q,Z]}],basis:[{basis:[Xs,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Zs,Xs,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,Zs,Q,Z]}],shrink:[{shrink:[``,Zs,Q,Z]}],order:[{order:[Qs,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ae(),`normal`]}],"justify-items":[{"justify-items":[...oe(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...oe()]}],"align-content":[{content:[`normal`,...ae()]}],"align-items":[{items:[...oe(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...oe(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...oe(),`baseline`]}],"place-self":[{"place-self":[`auto`,...oe()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:se()}],mx:[{mx:se()}],my:[{my:se()}],ms:[{ms:se()}],me:[{me:se()}],mbs:[{mbs:se()}],mbe:[{mbe:se()}],mt:[{mt:se()}],mr:[{mr:se()}],mb:[{mb:se()}],ml:[{ml:se()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ce()}],"inline-size":[{inline:[`auto`,...le()]}],"min-inline-size":[{"min-inline":[`auto`,...le()]}],"max-inline-size":[{"max-inline":[`none`,...le()]}],"block-size":[{block:[`auto`,...ue()]}],"min-block-size":[{"min-block":[`auto`,...ue()]}],"max-block-size":[{"max-block":[`none`,...ue()]}],w:[{w:[s,`screen`,...ce()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ce()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ce()]}],h:[{h:[`screen`,`lh`,...ce()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ce()]}],"max-h":[{"max-h":[`screen`,`lh`,...ce()]}],"font-size":[{text:[`base`,n,gc,lc]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Sc,dc]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,$s,Z]}],"font-family":[{font:[_c,fc,t]}],"font-features":[{"font-features":[Z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[Zs,`none`,Q,uc]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[..._e(),`wavy`]}],"text-decoration-thickness":[{decoration:[Zs,`from-font`,`auto`,Q,lc]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Zs,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Qs,Q,Z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Qs,Q,Z],radial:[``,Q,Z],conic:[Qs,Q,Z]},bc,mc]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[..._e(),`hidden`,`none`]}],"divide-style":[{divide:[..._e(),`hidden`,`none`]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[..._e(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Zs,Q,Z]}],"outline-w":[{outline:[``,Zs,gc,lc]}],"outline-color":[{outline:T()}],shadow:[{shadow:[``,`none`,u,xc,hc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":[`none`,d,xc,hc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ge()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Zs,lc]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":[`none`,f,xc,hc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Zs,Q,Z]}],"mix-blend":[{"mix-blend":[...ve(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Zs]}],"mask-image-linear-from-pos":[{"mask-linear-from":E()}],"mask-image-linear-to-pos":[{"mask-linear-to":E()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":E()}],"mask-image-t-to-pos":[{"mask-t-to":E()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":E()}],"mask-image-r-to-pos":[{"mask-r-to":E()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":E()}],"mask-image-b-to-pos":[{"mask-b-to":E()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":E()}],"mask-image-l-to-pos":[{"mask-l-to":E()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":E()}],"mask-image-x-to-pos":[{"mask-x-to":E()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":E()}],"mask-image-y-to-pos":[{"mask-y-to":E()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":E()}],"mask-image-radial-to-pos":[{"mask-radial-to":E()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Zs]}],"mask-image-conic-from-pos":[{"mask-conic-from":E()}],"mask-image-conic-to-pos":[{"mask-conic-to":E()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:ye()}],brightness:[{brightness:[Zs,Q,Z]}],contrast:[{contrast:[Zs,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,xc,hc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:[``,Zs,Q,Z]}],"hue-rotate":[{"hue-rotate":[Zs,Q,Z]}],invert:[{invert:[``,Zs,Q,Z]}],saturate:[{saturate:[Zs,Q,Z]}],sepia:[{sepia:[``,Zs,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Zs,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[Zs,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Zs,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Zs,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,Zs,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[Zs,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[Zs,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,Zs,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Zs,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[Zs,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[Qs,Q,Z]}],accent:[{accent:T()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...T()]}],"stroke-w":[{stroke:[Zs,gc,lc,uc]}],stroke:[{stroke:[`none`,...T()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Pc=(e,{extend:t={},override:n={}})=>(Ic(e.theme,n.theme),Ic(e.classGroups,n.classGroups),Ic(e.conflictingClassGroups,n.conflictingClassGroups),Ic(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),Fc(e,`postfixLookupClassGroups`,n.postfixLookupClassGroups),Fc(e,`orderSensitiveModifiers`,n.orderSensitiveModifiers),Lc(e.theme,t.theme),Lc(e.classGroups,t.classGroups),Lc(e.conflictingClassGroups,t.conflictingClassGroups),Lc(e.conflictingClassGroupModifiers,t.conflictingClassGroupModifiers),Rc(e,t,`postfixLookupClassGroups`),Rc(e,t,`orderSensitiveModifiers`),e),Fc=(e,t,n)=>{n!==void 0&&(e[t]=n)},Ic=(e,t)=>{if(t)for(let n in t)Fc(e,n,t[n])},Lc=(e,t)=>{if(t)for(let n in t)Rc(e,t,n)},Rc=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},zc=e=>Is(e?typeof e==`function`?()=>e(Nc()):()=>Pc(Nc(),e):Nc),Bc=e=>{if(io(e))return;let t=e,n={...t.extend??{}};for(let e of[`theme`,`classGroups`,`conflictingClassGroups`,`conflictingClassGroupModifiers`,`postfixLookupClassGroups`,`orderSensitiveModifiers`,`cacheSize`,`prefix`,`separator`,`experimentalParseClassName`])t[e]!==void 0&&n[e]===void 0&&(n[e]=t[e]);let r={};if(Object.keys(n).length>0&&(r.extend=n),t.override!=null&&!io(t.override)&&(r.override=t.override),r.extend||r.override)return r},Vc=e=>{let t=zc(Bc(e));return e=>t.mergeString(e)},Hc,Uc=()=>(Hc||=zc(),Hc),Wc=()=>((!To.cachedTwMerge||To.didTwMergeConfigChange)&&(To.didTwMergeConfigChange=!1,To.cachedTwMerge=Vc(To.cachedTwMergeConfig)),To.cachedTwMerge),Gc=e=>{let t=e?.twMergeConfig;t&&!io(t)&&(ao(t,To.cachedTwMergeConfig)||(To.cachedTwMergeConfig=t,To.didTwMergeConfigChange=!0))},Kc=e=>Za(e);(()=>{let e=Error();return!(`line`in e)&&!(`lineNumber`in e)})();var qc=To.reset.bind(To);To.reset=()=>{Hc=void 0,qc()};var Jc=(e,t)=>{let n=Kc(e);return!n||!(t?.twMerge??!0)?n||void 0:n.indexOf(` `)===-1?n:(Gc(t),(t?.twMergeConfig&&!io(t.twMergeConfig)?Wc():Uc().mergeString)(n)||void 0)},Yc=es((e,...t)=>Jc(t,e)),Xc=Yc.tv;Yc.createTV;var Zc=48,Qc=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Zc-t;return n},$c=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},el=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Zc;n+=i>>>1^-(i&1),t[r]=n}return t},tl=384,nl=[],rl=$c(Qc(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),il=$c(Qc(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),al=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,ol=(()=>{let e=rl.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=rl[n];i<rl[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(rl[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=rl[i];a<rl[i+1];a++)n[r++]=e,e+=t[e]}return n})(),sl=Qc(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),cl=$c(Qc(`123333359346463635126536711576`)),ll=Qc(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),ul=Qc(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),dl=el(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),fl=(()=>{let e=new Int32Array(319).fill(-1),t=el(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=el(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),pl=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),ml=el(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),hl=el(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),gl=el(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),_l=new Int32Array(987),vl=new Int32Array(987),yl=new Int32Array(987),bl=``,xl=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<ml.length;r++)for(let i of pl[gl[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),xl[a*2]=bl.length,xl[a*2+1]=i.length,bl+=i),_l[n]=ml[r],vl[n]=hl[r],yl[n]=a,n++}}var Sl=el(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Cl=$c(Qc(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),wl=el(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Tl=Qc(`ij`),El=Qc(`—`),Dl=Qc(`1`),Ol={GROUP_COUNT:tl,customValidatorNames:nl,edgeStart:rl,labelStart:il,labelText:al,edgeTarget:ol,nodeGroup:sl,nodeVlist:fl,vlistPat:cl,vlistOps:ll,vlistRef:ul,vlistGroup:dl,litAnchor:_l,litGroup:vl,litPool:yl,poolOffsets:xl,poolText:bl,adjGid:Sl,adjStart:Cl,adjTgt:wl,patGid:Tl,patTgt:El,postfixLookupGroups:Dl,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},kl=`line`in Error(),Al=-1,jl=-1,Ml=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Nl=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Pl=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:te}=e,ne=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)ne[y[e]]=e;let re=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>re&&(re=t)}let ie=32;for(;ie<2*(1+re+S.length);)ie<<=1;let ae=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)ae[e+1]=ae[e]+u[f[e]+1]-u[f[e]];let oe=new Uint8Array(r);for(let e=0;e<w.length;e++)oe[w[e]]=1;let se=i.length-1,ce=new Uint8Array(se),le=0,ue=!0;for(let e=0;e<m.length;e++){ce[m[e]]=1;let t=_[g[e]*2+1];t>le&&(le=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ue=!1)}let T=1;for(;T<m.length*2;)T<<=1;let de=new Int32Array(T).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Ml(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&T-1;for(;de[n]!==-1;)n=n+1&T-1;de[n]=e}let fe=(e,t,n,r)=>{let i=(Ml(t,n,r)^Math.imul(e,2654435761)|0)&T-1,a=r-n;for(;;){let r=de[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&T-1}},pe=n.cacheSize??8192,me=n.prefix??e.prefix??``,he=me===``?``:me+`:`,ge=he.length,_e=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,E=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,be=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=0,Se=-1,Ce=-1,we=-1,Te=-1,D=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ee=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(xe=0,Se=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)xe=1;else if(r===40&&i===41)xe=2;else return;we=t+1,Te=n-1;let a=t+1;if(D(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!D(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(Se=t+1,Ce=a,we=a+1)}},Oe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},ke=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,O=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k=e=>!!e&&!Number.isNaN(Number(e)),Ae=(e,t,n)=>{if(n-t<11||!Oe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&Oe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&Oe(e,t+10,t+18,`-normal/`)},je=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Me=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Ne=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Pe=(e,t,n,r)=>{if(e>=10){if(e>=25)return _e[e-25](t.slice(n,r));let i=e-10;if(xe!==je[i])return!1;if(Se>=0){for(let e of Me[i])if(Oe(t,Se,Ce,e))return!0;return!1}switch(Ne[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(we,Te);return ve.test(e)&&!E.test(e)}case 3:return k(t.slice(we,Te));case 4:return be.test(t.slice(we,Te));default:return ye.test(t.slice(we,Te))}}switch(e){case 0:return!0;case 1:return xe===0;case 2:return xe===1;case 3:return xe===2;case 4:return ke.test(t.slice(n,r));case 5:return k(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&k(t.slice(n,r-1));case 8:return O.test(t.slice(n,r));default:return Ae(t,n,r)}},Fe=new Set(typeof te==`string`?te.split(` `):te),Ie=(e,t,n,r,i,a)=>{let o=Ml(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Le=new Map,Re=new Map,ze=2,Be=4096,Ve=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Fe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Re.get(s);return c===void 0&&Re.set(s,c=ze++),c},He=new Map,Ue=r,We=r+4096,Ge=()=>Ue++,Ke=2097152,qe=8192,Je=new Int32Array(qe),Ye=Array(qe).fill(null),Xe=new Int32Array(qe),Ze=new Int32Array(qe),Qe=new Uint8Array(qe),$e=0,et=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ye[e]!==null){if(Ye[e|1]===null)c=e|1;else if(!($e++&3))c=e|$e>>2&1;else return}Ye[c]=t.slice(n,r),Je[c]=i,Xe[c]=a,Ze[c]=o,Qe[c]=s},tt=()=>Ye.fill(null),nt=256,A=[new Int32Array(nt),new Int32Array(nt),new Int32Array(nt),new Int32Array(nt)],[j,rt,it,at]=A,ot=new Uint8Array(nt),st=new Uint8Array(nt),ct=()=>{nt*=2,A=A.map(e=>{let t=new Int32Array(nt);return t.set(e),t}),[j,rt,it,at]=A;let e=new Uint8Array(nt);e.set(ot),ot=e,st=new Uint8Array(nt)},lt=64,ut=new Int32Array(lt),dt=new Int32Array(lt),ft=new Int32Array(r),pt=2048,mt=21,ht=new Float64Array(pt),gt=new Int32Array(pt),_t=0,vt=(e,t)=>{if(e===0&&t<r)return ft[t]===_t?1:(ft[t]=_t,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>mt;for(;gt[i]===_t;){if(ht[i]===n)return 1;i=i+1&pt-1}return ht[i]=n,gt[i]=_t,0},yt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Al:Ie(He,e,t+1,r,0,Ge)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=dt[t];if(r>n)continue;let i=ut[t],a=n-r;if(ce[i]===1&&a>0&&a<=le){let t=e.charCodeAt(r);if(ue===!1||t!==91&&t!==40){let t=fe(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=ae[o]-c;for(let t=c;t<m;t++)if(Pe(d[t],e,r,n))return p[h+t]}return Al},bt=e=>{let t=e.length,n=0,c=0,u=!1;(ze>Be||Le.size>Be)&&(Le=new Map,Re=new Map,ze=2,tt()),Ue>We&&(He=new Map,Ue=r,tt());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Ee(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&Ee(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===nt&&ct();let _=n++;j[_]=p,rt[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Je[y]===v&&Ye[y]!==null&&Ye[y].length===g?t=y:Je[y|1]===v&&Ye[y|1]!==null&&Ye[y|1].length===g&&(t=y|1),t>=0){let n=Ye[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){it[_]=Xe[t],at[_]=Ze[t],ot[_]=Qe[t];continue}}}let b=p;if(ge!==0){if(h-p<=ge||!e.startsWith(he,p)){it[_]=Al,et(y,e,p,h,v,Al,0,0);continue}b=p+ge}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,te=ee,ne=h,re=!1,ie=0;ne>te&&e.charCodeAt(ne-1)===33?(re=!0,ne--):ne>te&&e.charCodeAt(te)===33&&(re=!0,te++,ie=1);let ae=-1;w>ee&&(ae=w+ie,ae>=ne&&(ae=-1));let se=te;ne-te>1&&e.charCodeAt(te)===45&&(se=te+1);let le=0,ue=0,T=0,de=-1,fe=0;(l[0]>=0||ce[0]===1)&&(ut[0]=0,dt[0]=se,fe=1);let pe=jl,me=0;for(let t=se;t<ne;t++)if(t===ae&&(pe=ue<T?jl:le,me=fe),le!==jl){let n=e.charCodeAt(t),r=-1;if(ue<T)o.charCodeAt(ue)===n?(ue++,ue===T&&(r=le=de)):le=jl;else{let e=i[le],t=i[le+1],c=jl;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ue=e+1,T=a[i+1],de=s[i],c=le);break}}le=c}if(r>=0&&(l[r]>=0||ce[r]===1)&&t+1<ne&&e.charCodeAt(t+1)===45){if(fe===lt){lt*=2;let e=new Int32Array(lt);e.set(ut),ut=e;let t=new Int32Array(lt);t.set(dt),dt=t}ut[fe]=r,dt[fe]=t+2,fe++}}ae===ne&&(pe=ue<T?jl:le,me=fe);let _e=ue<T?jl:le,ve,E=!1;if(ae>=0){if(E=!0,ve=yt(e,te,ae,pe,me),ve!==Al&&ve<r&&oe[ve]){let t=yt(e,te,ne,_e,fe);t!==Al&&t!==ve&&(ve=t,E=!1)}else ve===Al&&(ve=yt(e,te,ne,_e,fe),E=!1)}else ve=yt(e,te,ne,_e,fe);let ye=0,be=0;ve===Al?it[_]=Al:(be=+!!E,ye=b>=C?+!!re:Ie(Le,e,b,C,+!!re,e=>Ve(e,re)),it[_]=ve,ot[_]=be,at[_]=ye),et(y,e,p,h,v,ve,ye,be)}if(n===0)return``;if(n===1)return j[0]===0&&rt[0]===t?e:e.slice(j[0],rt[0]);if(n*ie>pt){for(;n*ie>pt;)pt<<=1,mt--;ht=new Float64Array(pt),gt=new Int32Array(pt)}if(ze>=Ke||Ue>=Ke)throw Error(`cn: too many distinct classes in one merge`);_t=_t+1|0,_t===0&&(ft.fill(0),gt.fill(0),_t=1);let f=!1;for(let e=n-1;e>=0;e--){let t=it[e];if(t===Al){st[e]=1;continue}let n=at[e];if(vt(n,t)===1)st[e]=0,f=!0;else if(st[e]=1,t<r){let r=ne[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)vt(n,x[e]);if(ot[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&vt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!st[m]){m++;continue}let t=j[m],r=rt[m],i=m+1;for(;i<n&&st[i]&&j[i]===r+1&&e.charCodeAt(r)===32;)r=rt[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},xt=16384,St=new Int32Array(xt*2),Ct=0,wt=1,M=Object.create(null),Tt=Object.create(null),Et=new Map,Dt=new Map,Ot=0,kt=0,At=()=>{Ct^=xt,wt=wt+1|0,kt=0},jt=e=>{let t=M[e];if(t!==void 0)return t;let n=Nl(e,0,e.length),r=(n&16383)+Ct,i=St[r]===(n^wt)||St[r^xt]===(n^wt-1);return i&&(t=Tt[e],t!==void 0)?(M[e]=t,t):(t=bt(e),i?(M[e]=t,++Ot>pe&&(Ot=0,Tt=M,M=Object.create(null),At())):(St[r]=n^wt,++kt>xt&&At()),t)},Mt=e=>{let t=Et.get(e);if(t!==void 0)return t;let n=Nl(e,0,e.length),r=(n&16383)+Ct,i=St[r]===(n^wt)||St[r^xt]===(n^wt-1);return i&&(t=Dt.get(e),t!==void 0)?(Et.set(e,t),t):(t=bt(e),i?(Et.set(e,t),++Ot>pe&&(Ot=0,Dt=Et,Et=new Map,At())):(St[r]=n^wt,++kt>xt&&At()),t)},Nt=e=>{let t=Nl(e,0,e.length),n=(t&16383)+Ct;return St[n]===(t^wt)||St[n^xt]===(t^wt-1)||(St[n]=t^wt,++kt>xt&&At(),!1)},Pt=pe===0?bt:kl?e=>{let t=Et.get(e);return t===void 0?Mt(e):t}:jt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Pt(arguments[0]):Pt(Ll.apply(null,arguments))},mergeString:Pt,seenBefore:pe===0?()=>!1:Nt,mergeUncached:bt}},Fl=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Fl(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Il=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Fl(i,t);a&&(n&&(n+=` `),n+=a)}return n},Ll=function(){return Il(arguments,!1)},Rl=256,zl=16,Bl=1024,Vl=4096,Hl=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Vl).fill(``),l=Array(Vl).fill(``),u=Array(Vl).fill(``));let i=Nl(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Fl(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>zl&&(_.miss=zl,_.skip=Bl,_.e.length=0,_.at=0);let u=_.e;u.length<Rl?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Fl(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Ul=Pl(Ol),Wl=Hl(Ul.mergeString,Ul);Ul.merge;var Gl=Xc({base:`h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}}),Kl=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);function ql(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,Kl);var a=U();Oi(I(a),()=>t.href?`a`:`span`,!1,(e,a)=>{ga(e,e=>n(e),()=>n()),sa(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>Wl(Gl({variant:r()}),t.class)]);var o=U();q(I(o),()=>t.children??f),W(a,o)}),W(e,a),j()}var Jl=Xc({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),Yl=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),Xl=V(`<a><!></a>`),Zl=V(`<button><!></button>`);function Ql(e,t){A(t,!0);let n=X(t,`variant`,3,`default`),r=X(t,`size`,3,`default`),i=X(t,`ref`,15,null),a=X(t,`href`,3,void 0),o=X(t,`type`,3,`button`),s=Y(t,Yl);var c=U(),l=I(c),u=e=>{var o=Xl();sa(o,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:a(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...s}),[()=>Wl(Jl({variant:n(),size:r()}),t.class)]),q(F(o),()=>t.children??f),O(o),ga(o,e=>i(e),()=>i()),W(e,o)},d=e=>{var a=Zl();sa(a,e=>({"data-slot":`button`,class:e,type:o(),disabled:t.disabled,...s}),[()=>Wl(Jl({variant:n(),size:r()}),t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>i(e),()=>i()),W(e,a)};K(l,e=>{a()?e(u):e(d,-1)}),W(e,c),j()}var $l=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),eu=V(`<input/>`);function tu(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15),i=X(t,`files`,15),a=X(t,`data-slot`,3,`input`),o=Y(t,$l);var s=U(),c=I(s),l=e=>{var s=eu();sa(s,e=>({"data-slot":a(),class:e,type:`file`,...o}),[()=>Wl(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),ga(s,e=>n(e),()=>n()),ma(s,i),da(s,r),W(e,s)},u=e=>{var i=eu();sa(i,e=>({"data-slot":a(),class:e,type:t.type,...o}),[()=>Wl(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),ga(i,e=>n(e),()=>n()),da(i,r),W(e,i)};K(c,e=>{t.type===`file`?e(l):e(u,-1)}),W(e,s),j()}function nu(e){return typeof e==`function`}function ru(e){return typeof e==`object`&&!!e}var iu=[`string`,`number`,`bigint`,`boolean`];function au(e){return e==null||iu.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>au(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var ou=Symbol(`box`),su=Symbol(`is-writable`);function $(e,t){let n=M(e);return t?{[ou]:!0,[su]:!0,get current(){return B(n)},set current(e){t(e)}}:{[ou]:!0,get current(){return e()}}}function cu(e){return ru(e)&&ou in e}function lu(e){return cu(e)&&su in e}function uu(e){return cu(e)?e:nu(e)?$(e):pu(e)}function du(e){return Object.entries(e).reduce((e,[t,n])=>cu(n)?(lu(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function fu(e){return lu(e)?{[ou]:!0,get current(){return e.current}}:e}function pu(e){let t=N(ln(e));return{[ou]:!0,[su]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}function mu(e){let t=N(ln(e));return{[ou]:!0,[su]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}mu.from=uu,mu.with=$,mu.flatten=du,mu.readonly=fu,mu.isBox=cu,mu.isWritableBox=lu;function hu(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var gu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_u=/\n/g,vu=/^\s*/,yu=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bu=/^:\s*/,xu=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Su=/^[;\s]*/,Cu=/^\s+|\s+$/g,wu=`
3
- `,Tu=`/`,Eu=`*`,Du=``,Ou=`comment`,ku=`declaration`;function Au(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(_u);t&&(n+=t.length);var i=e.lastIndexOf(wu);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(vu)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Tu==e.charAt(0)&&Eu==e.charAt(1)){for(var n=2;Du!=e.charAt(n)&&(Eu!=e.charAt(n)||Tu!=e.charAt(n+1));)++n;if(n+=2,Du===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Ou,comment:o})}}function f(){var e=a(),t=c(yu);if(t){if(d(),!c(bu))return s(`property missing ':'`);var n=c(xu),r=e({type:ku,property:ju(t[0].replace(gu,Du)),value:n?ju(n[0].replace(gu,Du)):Du});return c(Su),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function ju(e){return e?e.replace(Cu,Du):Du}function Mu(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Au(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Nu=/\d/,Pu=[`-`,`_`,`/`,`.`];function Fu(e=``){if(!Nu.test(e))return e!==e.toLowerCase()}function Iu(e){let t=[],n=``,r,i;for(let a of e){let e=Pu.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Fu(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Lu(e){return e?Iu(e).map(e=>zu(e)).join(``):``}function Ru(e){return Bu(Lu(e||``))}function zu(e){return e?e[0].toUpperCase()+e.slice(1):``}function Bu(e){return e?e[0].toLowerCase()+e.slice(1):``}var Vu=1e3,Hu=new Map;function Uu(e){let t=Hu.get(e);return t===void 0&&(t=e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)?Lu(e):e.startsWith(`--`)?e:Ru(e),Hu.size>=Vu&&Hu.clear(),Hu.set(e,t)),t}var Wu=/["'\\{}]|\/\*/,Gu=/^[-\w]+$/;function Ku(e){if(Wu.test(e))return null;let t=[],n=0,r=0,i=-1;for(let a=0;a<=e.length;a++){let o=a<e.length?e.charCodeAt(a):59;if(o===40)n++;else if(o===41){if(--n<0)return null}else if(o===58)i<0&&(i=a);else if(o===59){if(n!==0)return null;let o=e.slice(r,a);if(i<0){if(o.trim()||t.length===0)return null}else{let n=e.slice(r,i).trim(),o=e.slice(i+1,a).trim();if(!Gu.test(n)||!o)return null;t.push(n,o)}r=a+1,i=-1}}return t}function qu(e,t){let n=Ku(t);if(n)for(let t=0;t<n.length;t+=2)e[Uu(n[t])]=n[t+1];else Mu(t,(t,n)=>{e[Uu(t)]=n})}function Ju(e){if(!e)return{};let t={};return qu(t,e),t}function Yu(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Xu(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Zu=Xu(/[A-Z]/,e=>`-${e.toLowerCase()}`),Qu=new Map;function $u(e){let t=Qu.get(e);return t===void 0&&(t=Zu(e),Qu.size>=1e3&&Qu.clear(),Qu.set(e,t)),t}function ed(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);let t=``;for(let n of Object.keys(e)){let r=e[n];r!=null&&r!==``&&(t+=`${t?`
4
- `:``}${$u(n)}: ${r};`)}return t}function td(e={}){return ed(e).replace(`
5
- `,` `)}var nd=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function rd(e){return nd.has(e)}function id(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&o&&rd(e))t[e]=hu(n,i);else if(a&&o)t[e]=Yu(n,i);else if(e===`class`){let r=au(n),a=au(i);r&&a?t[e]=ji(n,i):r?t[e]=ji(n):a&&(t[e]=ji(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Ju(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Ju(n),...i};else if(o&&s){let r=Ju(n),a=Ju(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=td(t.style).replaceAll(`
6
- `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var ad={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`};td(ad);var od=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function sd(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var cd=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=hr||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return hr===this.#r?N(e):$t(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return B(this.#t),!1}return B(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{B(this.#t);return}}return B(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),sn(o);else if(i!==t){sn(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||sn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),sn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);sn(this.#t),e.clear()}}#a(){B(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)B(n)}keys(){return B(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return B(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=od,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=ai(e=>{let n=Kr(t,`focusin`,e),r=Kr(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?sd(this.#e):null}};function ld(e){return typeof e==`function`}var ud=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tt(this.#t)}get(){let e=$e(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=$e(this.#t);return t===void 0?e:t}set(e){return et(this.#t,e)}};function dd(e,t){switch(e){case`post`:jn(t);break;case`pre`:Nn(t)}}function fd(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;dd(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Or(()=>n(t,o));return o=t,r})}function pd(e,t,n){fd(e,`post`,t,n)}function md(e,t,n){fd(e,`pre`,t,n)}pd.pre=md;function hd(e){return ld(e)?e():e}var gd=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=M(()=>(B(this.#s)?.(),this.getSize().width));#o=M(()=>(B(this.#s)?.(),this.getSize().height));#s=M(()=>{let e=hd(this.#r);if(e)return ai(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??od,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=hd(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return B(this.#s)?.(),this.getSize()}get width(){return B(this.#a)}get height(){return B(this.#o)}},_d=class{#e=()=>void 0;#t=M(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return B(this.#t)}};function vd(e){jn(()=>()=>{e()})}function yd(e){jn(()=>Or(()=>e()))}function bd(e){Tr().then(e)}var xd=1,Sd=9,Cd=11;function wd(e){return ru(e)&&e.nodeType===xd&&typeof e.nodeName==`string`}function Td(e){return ru(e)&&e.nodeType===Sd}function Ed(e){return ru(e)&&e.constructor?.name===`VisualViewport`}function Dd(e){return ru(e)&&e.nodeType!==void 0}function Od(e){return Dd(e)&&e.nodeType===Cd&&`host`in e}function kd(e,t){if(!e||!t||!wd(e)||!wd(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&Od(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ad(e){return Td(e)?e:Ed(e)?e.document:e?.ownerDocument??document}function jd(e){return Od(e)?jd(e.host):Td(e)?e.defaultView??window:wd(e)?e.ownerDocument?.defaultView??window:window}function Md(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Nd=class{element;#e=M(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return B(this.#e)}set root(e){P(this.#e,e)}constructor(e){this.element=typeof e==`function`?$(e):e}getDocument=()=>Ad(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Md(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Pd(e,t){return{[jr()]:n=>cu(e)?(e.current=n,Or(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Or(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Fd(e){return e?`true`:`false`}function Id(e){return e?`true`:void 0}function Ld(e){return e?``:void 0}function Rd(e){return e?!0:void 0}function zd(e){return e?`open`:`closed`}function Bd(e){return e?`checked`:`unchecked`}function Vd(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function Hd(e,t){return t?`mixed`:e?`true`:`false`}var Ud=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Wd(e){let t=new Ud(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Gd=`ArrowDown`,Kd=`ArrowLeft`,qd=`ArrowRight`,Jd=`ArrowUp`,Yd=`Home`,Xd=`PageDown`,Zd=`PageUp`;function Qd(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var $d=[Gd,Zd,Yd],ef=[Jd,Xd,`End`];[...$d,...ef];function tf(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Kd:qd,vertical:Gd}[t]}function nf(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qd:Kd,vertical:Jd}[t]}function rf(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:tf(e,t),prevKey:nf(e,t)}}var af=typeof document<`u`,of=sf();function sf(){return af&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function cf(e){return e instanceof HTMLElement}function lf(e){return e instanceof Element||e instanceof SVGElement}function uf(e){return e?.matches(`:disabled`)??!1}function df(e){return e!==null}function ff(e){if(typeof CSS<`u`&&typeof CSS.escape==`function`)return CSS.escape(e);let t=e.length,n=-1,r,i=``,a=e.charCodeAt(0);if(t===1&&a===45)return`\\`+e;for(;++n<t;)r=e.charCodeAt(n),i+=r===0?`�`:r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&a===45?`\\`+r.toString(16)+` `:r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122?e.charAt(n):`\\`+e.charAt(n);return i}var pf=class{#e;#t=mu(null);constructor(e){this.#e=e}getCandidateNodes(){if(!this.#e.rootNode.current)return[];if(this.#e.candidateSelector){let e=Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector));return this.#n(this.#e.rootNode.current,e)}if(this.#e.candidateAttr){let e=Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`));return this.#n(this.#e.rootNode.current,e)}return[]}#n(e,t){let n=this.#e.rootAttr;if(!n)return t;let r=`[${n}]`;return t.filter(t=>t.closest(r)===e)}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=rf(Qd(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Yd]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?qd:Gd,t=s===`ArrowUp`?Kd:Jd;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${ff(e)}`);t&&cf(t)&&t.focus()}},mf=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,vd(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#r,n=()=>{t===this.#r&&this.#a(e)},r=()=>{if(t!==this.#r)return;let i=this.#e.ref.current;if(!i)return;if(typeof i.getAnimations!=`function`){this.#a(e);return}let a=i.getAnimations();a.length===0?n():Promise.all(a.map(e=>e.finished)).then(()=>{n()}).catch(()=>{t===this.#r&&(i.getAnimations().some(e=>e.pending||e.playState!==`finished`)?r():n())})},i=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,r()})};this.#e.afterTick.current?this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`,n=this.#e.ref.current;n&&(n.hasAttribute(e)?(this.#n=new MutationObserver(()=>{t===this.#r&&(n.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,i()))}),this.#n.observe(n,{attributes:!0,attributeFilter:[e]})):i())}):i()}#a(e){let t=this.#r,n=()=>{t===this.#r&&e()};this.#e.afterTick.current?bd(n):n()}},hf=class{#e;#t;#n;#r=N(!1);#i=N(void 0);#a=!1;#o=null;constructor(e){this.#e=e,P(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new mf({ref:this.#e.ref,afterTick:this.#e.open}),vd(()=>this.#s()),pd(()=>this.#e.open.current,e=>{!this.#a&&(this.#a=!0,e===B(this.#r))||(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()?(P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.()):(e&&P(this.#r,!0),P(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&P(this.#i,void 0)})),this.#t?this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())}):(e||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())))})}get shouldRender(){return B(this.#r)}get transitionStatus(){return B(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function gf(){}function _f(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function vf(e,t){var n=U();gi(I(n),()=>t.children,e=>{var n=U();q(I(n),()=>t.children??f),W(e,n)}),W(e,n)}var yf=new ud(`BitsConfig`);function bf(){let e=new xf(null,{});return yf.getOr(e).opts}var xf=class{opts;constructor(e,t){let n=Sf(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function Sf(e,t){return n=>$(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function Cf(e,t){return n=>{let r=bf();return $(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var wf=Cf(e=>e.defaultPortalTo,`body`);function Tf(e,t){A(t,!0);let n=wf(()=>t.to),r=nt(),i=M(a);function a(){if(!af||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&=(pi(o),null)}pd([()=>B(i),()=>t.disabled],([e,n])=>{if(!e||n)s();else return o=li(vf,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.children??f),W(e,n)};K(l,e=>{t.disabled&&e(u)}),W(e,c),j()}var Ef=new WeakMap;function Df(e,t=e.composedPath()){Ef.set(e,t)}function Of(e){return Ef.get(e)??e.composedPath()}function kf(e,t){return t?lf(e.target)&&t.contains(e.target)||Of(e).includes(t):!1}function Af(e,t){for(let n of Of(e))if(lf(n)&&n.matches(t))return n;return lf(e.target)?e.target.closest(t):null}function jf(e,t){Df(t,Of(e))}function Mf(e,t=500){let n=null,r=null,i=(...e)=>{i.destroy(),r=e,n=setTimeout(i.flush,t)};return i.flush=()=>{if(r===null)return;let t=r;i.destroy(),e(...t)},i.destroy=()=>{n!==null&&(clearTimeout(n),n=null),r=null},i}function Nf(e,t){return e===t||e.contains(t)}function Pf(e){return e?.ownerDocument??document}function Ff(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var If=`data-context-menu-trigger`,Lf=`data-context-menu-content`;globalThis.bitsDismissableLayers??=new Map;var Rf=class e{static create(t){return new e(t)}opts;#e=gf;#t=()=>!1;#n=null;#r=pu(`close`);#i={pointerdown:!1};#a=!1;#o=null;#s=!1;#c=void 0;#l=gf;#u=gf;#d=!1;constructor(e){this.opts=e,Nn(()=>{this.#r.current=e.interactOutsideBehavior.current,this.#e=e.onInteractOutside.current,this.#l=e.onFocusOutside.current,this.#t=e.isValidEvent.current,this.#n=e.ref.current});let t=gf,n=null,r=()=>{n=null,this.#x(),globalThis.bitsDismissableLayers.delete(this),this.#g.destroy(),this.#u(),t()};pd([()=>this.opts.enabled.current,()=>this.opts.ref.current],([e,i])=>{let a=e?i:null;n!==a&&(r(),a&&(n=a,this.#c=Pf(a),globalThis.bitsDismissableLayers.set(this,this.#r),t=this.#p()))}),vd(()=>{this.#d=!0,r()})}#f=e=>{e.defaultPrevented||this.#d||!this.#n||bd(()=>{this.#d||this.#n&&!this.#b(e.target)&&e.target&&!this.#s&&this.#l?.(e)})};#p(){let e=this.#c,t=e=>{Or(()=>{this.#g.flush(),this.#_(e),this.#y(e)})},n=e=>{e.cancelBubble||e!==this.#o||(this.#v(e),e.pointerType===`touch`?(this.#g.destroy(),this.#h(e)):this.#g(e))};return e.addEventListener(`pointerdown`,t,!0),e.addEventListener(`pointerdown`,n),Yu(()=>e.removeEventListener(`pointerdown`,t,!0),()=>e.removeEventListener(`pointerdown`,n),Kr(e,`focusin`,this.#f))}#m=e=>{let t=e;t.defaultPrevented&&(t=Hf(e)),this.#e(e)};#h=e=>{if(!this.#n){this.#u();return}let t=this.#t(e,this.#n)||Vf(e,this.#n);if(!this.#a||this.#S()||!t){this.#u();return}let n=e;if(n.defaultPrevented&&(n=Hf(n)),this.#r.current!==`close`&&this.#r.current!==`defer-otherwise-close`)this.#u();else if(e.pointerType===`touch`){this.#u();let e=null,t=gf,n=e=>{t(),this.#m(e)};t=Yu(Kr(this.#c,`click`,n,{once:!0}),Kr(this.#c,`click`,t=>{Df(t),e=setTimeout(()=>n(t),0)},{once:!0,capture:!0}),()=>{e!==null&&clearTimeout(e),e=null}),this.#u=t}else this.#e(n)};#g=Mf(this.#h,10);#_=e=>{this.#i[e.type]=!0};#v=e=>{this.#i[e.type]=!1};#y=e=>{this.#o=e,Df(e),this.#n&&(this.#a=Bf(this))};#b=e=>this.#n?Nf(this.#n,e):!1;#x=()=>{for(let e in this.#i)this.#i[e]=!1;this.#a=!1,this.#o=null};#S(){return Object.values(this.#i).some(Boolean)}#C=()=>{this.#s=!0};#w=()=>{this.#s=!1};props={onfocuscapture:this.#C,onblurcapture:this.#w}};function zf(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Bf(e){let t=[...globalThis.bitsDismissableLayers],n=zf(t);if(n)return n[0]===e;let[r]=t[0];return r===e}function Vf(e,t){let n=e.target;if(!lf(n))return!1;let r=!!Af(e,`[${If}]`),i=!!t.closest(`[${Lf}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:Pf(n).documentElement.contains(n)&&!kf(e,t)&&Ff(e,t)}function Hf(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1,a=new Proxy(r,{get:(r,a)=>{if(a===`currentTarget`)return t;if(a===`target`)return n;if(a===`preventDefault`)return()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()};if(a===`defaultPrevented`)return i;if(a in r){let e=r[a];return typeof e==`function`?e.bind(r):e}let o=e[a];return typeof o==`function`?o.bind(e):o}});return jf(e,a),a}function Uf(e,t){A(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`onInteractOutside`,3,gf),i=X(t,`onFocusOutside`,3,gf),a=X(t,`isValidEvent`,3,()=>!1),o=Rf.create({id:$(()=>t.id),interactOutsideBehavior:$(()=>n()),onInteractOutside:$(()=>r()),enabled:$(()=>t.enabled),onFocusOutside:$(()=>i()),isValidEvent:$(()=>a()),ref:Or(()=>t.ref)});var s=U();q(I(s),()=>t.children??f,()=>({props:o.props})),W(e,s),j()}globalThis.bitsEscapeLayers??=new Map;var Wf=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Nd(this.opts.ref);let t=gf;pd(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Kr(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Gf(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}};function Gf(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Kf(e,t){A(t,!0);let n=X(t,`escapeKeydownBehavior`,3,`close`),r=X(t,`onEscapeKeydown`,3,gf);Wf.create({escapeKeydownBehavior:$(()=>n()),onEscapeKeydown:$(()=>r()),enabled:$(()=>t.enabled),ref:Or(()=>t.ref)});var i=U();q(I(i),()=>t.children??f),W(e,i),j()}var qf=class e{static instance;#e=pu([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=Md(document);n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e),e.resume()}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},Jf=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],Yf=Jf.join(`,`),Xf=typeof Element>`u`,Zf=Xf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qf=!Xf&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},$f=function(e,t){t===void 0&&(t=!0);var n=e==null||e.getAttribute==null?void 0:e.getAttribute(`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):$f(e.parentNode))},ep=function(e){var t,n=e==null||e.getAttribute==null||(t=e.getAttribute(`contenteditable`))==null?void 0:t.toLowerCase();return n===``||n===`true`||n===`plaintext-only`},tp=function(e,t,n){if($f(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Yf));return t&&Zf.call(e,Yf)&&r.unshift(e),r=r.filter(n),r},np=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!$f(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=np(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Zf.call(a,Yf)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!$f(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=np(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},rp=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},ip=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ep(e))&&!rp(e)?0:e.tabIndex},ap=function(e,t){var n=ip(e);return n<0&&t&&!rp(e)?0:n},op=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sp=function(e){return e.tagName===`INPUT`},cp=function(e){return sp(e)&&e.type===`hidden`},lp=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},up=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},dp=function(e){if(!e.name)return!0;var t=e.form||Qf(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=up(r,e.form);return!i||i===e},fp=function(e){return sp(e)&&e.type===`radio`},pp=function(e){return fp(e)&&!dp(e)},mp=function(e){var t=e&&Qf(e),n=t?.host,r=!1;if(t&&t!==e){var i,a;for(r=!!((i=n)!=null&&(i=i.ownerDocument)!=null&&i.contains(n)||e!=null&&(a=e.ownerDocument)!=null&&a.contains(e));!r&&n;){var o;t=Qf(n),n=t?.host,r=!!((o=n)!=null&&(o=o.ownerDocument)!=null&&o.contains(n))}}return r},hp=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},gp=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=Zf.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Zf.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=Qf(e);if(s&&!s.shadowRoot&&r(s)===!0)return hp(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(mp(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return hp(e);return!1},_p=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Zf.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},vp=function(e,t){return!(t.disabled||cp(t)||gp(t,e)||lp(t)||_p(t))},yp=function(e,t){return!(pp(t)||ip(t)<0||!vp(e,t))},bp=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},xp=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=ap(a,i),s=i?xp(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(op).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Sp=function(e,t){return t||={},xp(t.getShadowRoot?np([e],t.includeContainer,{filter:yp.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:bp}):tp(e,t.includeContainer,yp.bind(null,t)))},Cp=function(e,t){return t||={},t.getShadowRoot?np([e],t.includeContainer,{filter:vp.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):tp(e,t.includeContainer,vp.bind(null,t))},wp=Jf.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Tp=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Zf.call(e,wp)!==!1&&vp(t,e)};function Ep(e,t){let n=t.getRootNode();for(;e;){let t=e.getRootNode();if(t===n)return e;e=t!==e&&`host`in t?t.host:null}return null}var Dp=class e{#e=!1;#t=null;#n=qf.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t!==e&&(this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o())}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t||this.#e||!this.#n.isActiveScope(this)||this.#t.contains(Ep(Md(this.#t.ownerDocument),this.#t)))return;let e=this.#u();e?(e.focus({preventScroll:!0}),this.#n.setFocusMemory(this,e)):this.#t.focus({preventScroll:!0})})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(Kr(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=Ep(t.composedPath()[0],e);if(n!==null&&e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&Tp(n))t.preventDefault(),n.focus({preventScroll:!0});else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus({preventScroll:!0})}}},{capture:!0}),Kr(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&Md(t)===i?(e.preventDefault(),r.focus()):e.shiftKey&&Md(t)===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus({preventScroll:!0}),this.#n.setFocusMemory(this,r)):e.focus({preventScroll:!0})}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?Sp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?Cp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return pd([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),vd(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function Op(e,t){A(t,!0);let n=X(t,`enabled`,3,!1),r=X(t,`trapFocus`,3,!1),i=X(t,`loop`,3,!1),a=X(t,`onCloseAutoFocus`,3,gf),o=X(t,`onOpenAutoFocus`,3,gf),s=Dp.use({enabled:$(()=>n()),trap:$(()=>r()),loop:Or(()=>i()),onCloseAutoFocus:$(()=>a()),onOpenAutoFocus:$(()=>o()),ref:Or(()=>t.ref)});var c=U();q(I(c),()=>t.focusScope??f,()=>({props:s.props})),W(e,c),j()}var kp=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var Ap=class e{static create(t){return new e(t)}opts;domContext;#e=gf;#t=!1;#n=kp;#r=kp;constructor(e){this.opts=e,this.domContext=new Nd(e.ref);let t=gf;pd(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Yu(Kr(this.domContext.getDocument(),`pointerdown`,this.#o),Kr(this.domContext.getDocument(),`pointerup`,this.#a))}#a=e=>{this.#s(),e.defaultPrevented||this.#r(e)};#o=e=>{if(!this.#t)return;this.#s();let t=this.opts.ref.current,n=e.target;cf(t)&&cf(n)&&Pp(this)&&kd(t,n)&&(this.#n(e),e.defaultPrevented||(this.#e=Mp(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=gf}},jp=e=>e.style.userSelect||e.style.webkitUserSelect;function Mp(e,t){let n=jp(t),r=jp(e);return Np(t,`none`),Np(e,`text`),()=>{Np(t,n),Np(e,r)}}function Np(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Pp(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function Fp(e,t){A(t,!0);let n=X(t,`preventOverflowTextSelection`,3,!0),r=X(t,`onPointerDown`,3,gf),i=X(t,`onPointerUp`,3,gf);Ap.create({id:$(()=>t.id),onPointerDown:$(()=>r()),onPointerUp:$(()=>i()),enabled:$(()=>t.enabled&&n()),ref:Or(()=>t.ref)});var a=U();q(I(a),()=>t.children??f),W(e,a),j()}globalThis.bitsIdCounter??={current:0};function Ip(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Lp=class{#e;#t=0;#n=N();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),P(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,B(this.#n)===void 0&&(this.#r=Pn(()=>{P(this.#n,this.#e(...e),!0)})),jn(()=>()=>{this.#i()}),B(this.#n)}},Rp=new cd,zp=new Map,Bp=[`padding-right`,`margin-right`,`overflow`,`overflow-x`,`overflow-y`,`pointer-events`,`--scrollbar-width`],Vp=null,Hp=!1,Up=new Set,Wp=null,Gp=null,Kp=!1;function qp(e,t,n){e.setProperty(t,n),Up.add(t),t===`overflow`&&(Up.add(`overflow-x`),Up.add(`overflow-y`))}var Jp=$(()=>{for(let e of Rp.values())if(e)return!0;return!1}),Yp=$(()=>{for(let[e,t]of Rp)if(t&&(zp.get(e)?.()??!0))return!0;return!1}),Xp=null,Zp=new Lp(()=>{function e(e,t){let n=Vp?.get(t);n?.value?e.body.style.setProperty(t,n.value,n.priority):e.body.style.removeProperty(t)}function t(t){for(let n of Bp)Up.has(n)&&e(t,n);!Hp&&t.body.style.length===0&&t.body.removeAttribute(`style`),Vp=null,Up.clear(),of&&Wp?.()}function n(t){Up.delete(`pointer-events`)&&e(t,`pointer-events`)}function r(){Gp!==null&&(window.clearTimeout(Gp),Gp=null)}function i(e,t){r(),Kp=!0,Xp=Date.now();let n=Xp,i=()=>{Gp=null,Xp===n&&($p(Rp)?Kp=!1:(Kp=!1,t()))},a=e===null?24:e;Gp=window.setTimeout(i,a)}function a(){if(Vp===null&&Rp.size===0&&!Kp){Hp=document.body.hasAttribute(`style`),Vp=new Map;for(let e of Bp)Vp.set(e,{value:document.body.style.getPropertyValue(e),priority:document.body.style.getPropertyPriority(e)})}}return pd(()=>Jp.current,()=>{if(!Jp.current)return;a(),Kp=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),r=window.innerWidth-document.documentElement.clientWidth,i={padding:Number.parseInt(t.paddingRight??`0`,10)+r,margin:Number.parseInt(t.marginRight??`0`,10)};r>0&&!n&&(qp(document.body.style,`padding-right`,`${i.padding}px`),qp(document.body.style,`margin-right`,`${i.margin}px`),qp(document.body.style,`--scrollbar-width`,`${r}px`)),qp(document.body.style,`overflow`,`hidden`),of&&(Wp=Kr(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),bd(()=>{Yp.current&&qp(document.body.style,`pointer-events`,`none`),qp(document.body.style,`overflow`,`hidden`)})}),pd(()=>Yp.current,()=>{Jp.current&&bd(()=>{Jp.current&&(Yp.current?qp(document.body.style,`pointer-events`,`none`):n(document))})},{lazy:!0}),vd(()=>()=>{Wp?.()}),{get lockMap(){return Rp},resetBodyStyle:t,restorePointerEvents:n,scheduleCleanupIfNoNewLocks:i,cancelPendingCleanup:r,ensureInitialStyleCaptured:a}}),Qp=class{#e=Ip();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null,n=()=>!0){this.#t=e,this.#n=t,this.#r=Zp.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),zp.set(this.#e,n),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=$(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),vd(()=>{if(this.#r.lockMap.delete(this.#e),zp.delete(this.#e),$p(this.#r.lockMap))return;let e=this.#n(),t=document;this.#r.restorePointerEvents(t),this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle(t)})}))}};function $p(e){for(let[t,n]of e)if(n)return!0;return!1}function em(e,t){A(t,!0);let n=X(t,`preventScroll`,3,!0),r=X(t,`restoreScrollDelay`,3,null),i=X(t,`blockPointer`,3,()=>!0);Or(()=>{n()&&new Qp(n(),()=>r(),i())}),j()}function tm(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function nm(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function rm(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function im(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function am(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return am(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return om(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=om(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function om(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var sm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`]),cm=V(`<input/>`);function lm(e,t){A(t,!0);let n=X(t,`value`,15),r=Y(t,sm),i=M(()=>id(r,{"aria-hidden":`true`,tabindex:-1,style:{...ad,position:`absolute`,top:`0`,left:`0`}}));var a=U(),o=I(a),s=e=>{var t=cm();sa(t,()=>({...B(i),value:n(),defaultChecked:B(i).checked})),W(e,t)},c=e=>{var t=cm(),r=e=>n(e.currentTarget.value);sa(t,()=>({...B(i),value:n(),defaultValue:n()??``,oninput:r})),W(e,t)};K(o,e=>{B(i).type===`checkbox`?e(s):e(c,-1)}),W(e,a),j()}var um=new ud(`Floating.Root`),dm=new ud(`Floating.Root`),fm=class e{static create(t=!1){return t?dm.set(new e):um.set(new e)}anchorNode=pu(null);customAnchorNode=pu(null);triggerNode=pu(null);constructor(){jn(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},pm=class e{static create(t,n=!1){return n?new e(t,dm.get()):new e(t,um.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?uu(e.virtualEl.current):e.ref}};function mm(e,t){A(t,!0);let n=X(t,`tooltip`,3,!1);fm.create(Or(()=>n()));var r=U();q(I(r),()=>t.children??f),W(e,r),j()}function hm(e){return typeof e==`function`?e():e}function gm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _m(e,t){let n=gm(e);return Math.round(t*n)/n}function vm(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}var ym={afterMs:1e4,onChange:gf};function bm(e,t){let{afterMs:n,onChange:r,getWindow:i}={...ym,...t},a=null,o=N(ln(e));function s(){return i().setTimeout(()=>{P(o,e,!0),r?.(e)},n)}return jn(()=>()=>{a&&i().clearTimeout(a)}),$(()=>B(o),e=>{P(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var xm=class{#e;#t=M(()=>this.#e.candidateValues());#n;constructor(e){this.#e=e,this.#n=bm(``,{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!B(this.#t).length)return;this.#n.current=this.#n.current+e;let t=this.#e.getCurrentItem(),n=B(this.#t).find(e=>e===t)??``,r=am(B(this.#t).map(e=>e??``),this.#n.current,n),i=B(this.#t).find(e=>e===r);return i&&this.#e.onMatch(i),i}resetTypeahead(){this.#n.current=``}},Sm=class{#e;#t;#n=M(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=M(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=bm(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=B(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=am(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&B(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},Cm=[Gd,Zd,Yd],wm=[Jd,Xd,`End`],Tm=[...Cm,...wm],Em=Wd({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),Dm=new ud(`Select.Root | Combobox.Root`);new ud(`Select.Group | Combobox.Group`);var Om=new ud(`Select.Content | Combobox.Content`),km=class{opts;#e=N(!1);get touchedInput(){return B(this.#e)}set touchedInput(e){P(this.#e,e,!0)}#t=N(null);get inputNode(){return B(this.#t)}set inputNode(e){P(this.#t,e,!0)}#n=N(null);get contentNode(){return B(this.#n)}set contentNode(e){P(this.#n,e,!0)}contentPresence;#r=N(null);get viewportNode(){return B(this.#r)}set viewportNode(e){P(this.#r,e,!0)}#i=N(null);get triggerNode(){return B(this.#i)}set triggerNode(e){P(this.#i,e,!0)}#a=N(null);get valueNode(){return B(this.#a)}set valueNode(e){P(this.#a,e,!0)}#o=N(``);get valueId(){return B(this.#o)}set valueId(e){P(this.#o,e,!0)}selectedLabelsByValue=new cd;#s=N(null);get highlightedNode(){return B(this.#s)}set highlightedNode(e){P(this.#s,e,!0)}#c=M(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return B(this.#c)}set highlightedValue(e){P(this.#c,e)}#l=M(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return B(this.#l)}set highlightedId(e){P(this.#l,e)}#u=M(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return B(this.#u)}set highlightedLabel(e){P(this.#u,e)}#d=N(!1);get contentIsPositioned(){return B(this.#d)}set contentIsPositioned(e){P(this.#d,e,!0)}isUsingKeyboard=!1;pressedItem=null;isCombobox=!1;domContext=new Nd(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new hf({ref:$(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Nn(()=>{this.opts.open.current||(this.setHighlightedNode(null),this.pressedItem=null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){let t=this.viewportNode;if(!t||!this.contentIsPositioned)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();this.opts.scrollAlignment.current===`center`?t.scrollTop+=n.top+n.height/2-(r.top+r.height/2):n.top<r.top?t.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(t.scrollTop+=n.bottom-r.bottom)}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}getLabelForValue(e){if(e===``)return``;let t=this.opts.items.current.find(t=>t.value===e)?.label;return t?.trim()?t:this.selectedLabelsByValue.get(e)??e}resolveItemLabel(e,t,n){return t?.trim()?t:n?.textContent?.trim()||e}setSelectedLabel(e,t){e===``||t===e?this.selectedLabelsByValue.delete(e):this.selectedLabelsByValue.set(e,t)}pruneSelectedLabels(e){for(let t of this.selectedLabelsByValue.keys())e.includes(t)||this.selectedLabelsByValue.delete(t)}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>Em.getAttr(e,this.isCombobox?`combobox`:void 0)},Am=class extends km{opts;isMulti=!1;#e=M(()=>this.opts.value.current!==``);get hasValue(){return B(this.#e)}set hasValue(e){P(this.#e,e)}#t=M(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return B(this.#t)}set currentLabel(e){P(this.#t,e)}#n=M(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return B(this.#n)}set candidateLabels(e){P(this.#n,e)}#r=M(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return B(this.#r)}set dataTypeaheadEnabled(e){P(this.#r,e)}constructor(e){super(e),this.opts=e,jn(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),pd(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),pd(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e===``?[]:[e])})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.setSelectedLabel(e,t),this.opts.inputValue.current=t)}setInitialHighlightedNode(){bd(()=>{if(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))return;let e=this.getNodeByValue(this.opts.value.current);e?this.setHighlightedNode(e,!0):this.setHighlightedToFirstCandidate(!0)})}},jm=class extends km{opts;isMulti=!0;#e=M(()=>this.opts.value.current.length>0);get hasValue(){return B(this.#e)}set hasValue(e){P(this.#e,e)}#t=M(()=>new Set(this.opts.value.current));constructor(e){super(e),this.opts=e,jn(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),pd(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),pd(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e)})}includesItem(e){return B(this.#t).has(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):(this.opts.value.current=[...this.opts.value.current,e],this.setSelectedLabel(e,t)),this.opts.inputValue.current=t}setInitialHighlightedNode(){bd(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},Mm=class{static create(e){let{type:t,...n}=e,r=t===`single`?new Am(n):new jm(n);return Dm.set(r)}},Nm=class e{static create(t){return new e(t,Dm.get())}root;opts;attachment;constructor(e,t){this.root=t,this.opts=e,this.attachment=Pd(e.ref,e=>this.root.valueNode=e),this.setValue=this.setValue.bind(this)}setValue(e){this.root.isMulti&&!Array.isArray(e)||!this.root.isMulti&&typeof e!=`string`||(this.root.opts.value.current=e)}#e=M(()=>{if(this.root.isMulti)return{selection:{type:`multiple`,selected:this.root.opts.value.current.length>0?this.root.opts.value.current.map(e=>({value:e,label:this.root.getLabelForValue(e)})):[],setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current};let e=this.root.opts.value.current;return{selection:{type:`single`,selected:e===``?void 0:{value:e,label:this.root.getLabelForValue(e)},setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current}});get snippetProps(){return B(this.#e)}set snippetProps(e){P(this.#e,e)}#t=M(()=>({id:this.opts.id.current,"data-placeholder":this.root.hasValue?void 0:``,"data-select-value":``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Pm=class e{static create(t){return new e(t,Dm.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref,e=>this.root.triggerNode=e),this.root.domContext=new Nd(e.ref),this.#e=new Sm({getCurrentItem:()=>this.root.highlightedNode,onMatch:e=>{this.root.setHighlightedNode(e)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new xm({getCurrentItem:()=>this.root.isMulti?``:this.root.currentLabel,onMatch:e=>{if(this.root.isMulti||!this.root.opts.items.current)return;let t=this.root.opts.items.current.find(t=>t.label===e);t&&(this.root.opts.value.current=t.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#n(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#r(e){this.#n()}#i(){if(this.root.opts.disabled.current)return!1;let e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti||(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.resolveItemLabel(this.root.highlightedValue,this.root.highlightedLabel,this.root.highlightedNode)),!this.root.isMulti&&!e)?(this.root.handleClose(),!0):!1}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if((e.key===`Enter`||e.key===` `&&this.#e.search===``)&&!e.isComposing&&(e.preventDefault(),this.#i()||e.key===` `))return;if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),Tm.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=tm(t,r,i):e.key===`ArrowUp`?a=nm(t,r,i):e.key===`PageDown`?a=rm(t,r,10,i):e.key===`PageUp`?a=im(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}let t=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,r=e.key===` `,i=this.root.getCandidateNodes();if(e.key!==`Tab`){if(!t&&(n||r)){let t=this.#e.handleTypeaheadSearch(e.key,i);r&&(e.preventDefault(),t||this.#i())}else this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus(),this.root.opts.disabled.current||e.detail!==0||(this.root.opts.open.current?this.root.handleClose():this.#n(),e.preventDefault())}onpointerdown(e){if(this.root.opts.disabled.current||uf(this.opts.ref.current))return;if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||uf(this.opts.ref.current)||(e.preventDefault(),e.pointerType===`touch`&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose()))}#a=M(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"aria-expanded":Fd(this.root.opts.open.current),"aria-controls":this.root.contentNode?.id||void 0,"aria-activedescendant":this.root.highlightedId,"data-state":zd(this.root.opts.open.current),"data-disabled":Ld(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:``,[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return B(this.#a)}set props(e){P(this.#a,e)}},Fm=class e{static create(t){return Om.set(new e(t,Dm.get()))}opts;root;attachment;#e=N(!1);get isPositioned(){return B(this.#e)}set isPositioned(e){P(this.#e,e,!0)}userHasScrolled=!1;domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref,e=>this.root.contentNode=e),this.domContext=new Nd(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),vd(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),pd(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1,this.userHasScrolled=!1)}),pd([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{this.isPositioned&&this.root.highlightedNode&&(this.root.isUsingKeyboard&&(this.userHasScrolled=!1),this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode))}),pd([()=>this.isPositioned,()=>this.root.viewportNode],()=>{let e=this.root.viewportNode;if(!this.isPositioned||!e)return;let t=()=>{this.userHasScrolled=!0},n=new(this.domContext.getWindow()).ResizeObserver(()=>{!this.userHasScrolled&&this.root.highlightedNode&&this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)});return n.observe(e),Yu(Kr(e,`wheel`,t,{passive:!0}),Kr(e,`touchmove`,t,{passive:!0}),()=>n.disconnect())}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}onpointerdowncapture=()=>{this.root.pressedItem=null};#t=M(()=>vm(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{kf(e,this.root.triggerNode)||kf(e,this.root.inputNode)?e.preventDefault():(this.opts.onInteractOutside.current(e),e.defaultPrevented||this.root.handleClose())};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),e.defaultPrevented||this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=M(()=>({open:this.root.opts.open.current}));get snippetProps(){return B(this.#n)}set snippetProps(e){P(this.#n,e)}#r=M(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":zd(this.root.opts.open.current),...Vd(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...B(this.#t)},onpointermove:this.onpointermove,onpointerdowncapture:this.onpointerdowncapture,...this.attachment}));get props(){return B(this.#r)}set props(e){P(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}},Im=class e{static create(t){return new e(t,Dm.get())}opts;root;attachment;#e=M(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return B(this.#e)}set isDisabled(e){P(this.#e,e)}#t=M(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return B(this.#t)}set isSelected(e){P(this.#t,e)}#n=M(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return B(this.#n)}set isHighlighted(e){P(this.#n,e)}#r=M(()=>this.isHighlighted&&!this.isDisabled);prevHighlighted=new _d(()=>this.isHighlighted);#i=N(!1);get mounted(){return B(this.#i)}set mounted(e){P(this.#i,e,!0)}#a;constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref),pd([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),pd(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),pd([()=>this.isSelected,()=>this.mounted,()=>this.opts.value.current,()=>this.opts.label.current],([e,t,n])=>{e&&t&&this.root.setSelectedLabel(n,this.#o())}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}#o(){return this.root.resolveItemLabel(this.opts.value.current,this.opts.label.current,this.opts.ref.current)}handleSelect(){if(this.isDisabled)return;let e=this.opts.value.current===this.root.opts.value.current;!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?this.root.handleClose():(this.root.toggleItem(this.opts.value.current,this.#o()),!this.root.isMulti&&!e&&this.root.handleClose())}#s=M(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return B(this.#s)}set snippetProps(e){P(this.#s,e)}onpointerdown(e){e.preventDefault(),this.root.pressedItem={item:this,x:e.clientX,y:e.clientY}}onpointerup(e){if(this.#a?.(),e.defaultPrevented||!this.opts.ref.current)return;let t=this.root.pressedItem;this.root.pressedItem=null,t&&t.item!==this&&Math.hypot(e.clientX-t.x,e.clientY-t.y)<4?(e.preventDefault(),t.item.handleSelect()):e.pointerType===`touch`&&!of?this.#a=Kr(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0}):(e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current))}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#c=M(()=>({id:this.opts.id.current,role:`option`,"aria-selected":Fd(this.isSelected),"data-value":this.opts.value.current,"data-disabled":Ld(this.isDisabled),"data-highlighted":Ld(B(this.#r)),"data-selected":Ld(this.isSelected),"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return B(this.#c)}set props(e){P(this.#c,e)}},Lm=class e{static create(t){return new e(t,Dm.get())}opts;root;#e=M(()=>this.root.opts.name.current!==``);get shouldRender(){return B(this.#e)}set shouldRender(e){P(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=M(()=>({disabled:Rd(this.root.opts.disabled.current),required:Rd(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Rm=class e{static create(t){return new e(t,Om.get())}opts;content;root;attachment;#e=N(0);get prevScrollTop(){return B(this.#e)}set prevScrollTop(e){P(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Pd(e.ref,e=>{this.root.viewportNode=e})}#t=M(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},zm=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=gf;#e=N(!1);get mounted(){return B(this.#e)}set mounted(e){P(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Pd(e.ref),pd([()=>this.mounted],()=>{this.mounted||(this.isUserScrolling=!1)}),jn(()=>{this.mounted&&this.root.opts.open.current||this.clearAutoScrollInterval()}),vd(()=>this.clearAutoScrollInterval()),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null||!this.root.opts.open.current)return;this.content.userHasScrolled=!0;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=M(()=>({id:this.opts.id.current,"aria-hidden":Id(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Bm=class e{static create(t){return new e(new zm(t,Om.get()))}scrollButtonState;content;root;#e=N(!1);get canScrollDown(){return B(this.#e)}set canScrollDown(e){P(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,pd([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{let e=this.root.viewportNode;if(e&&this.content.isPositioned)return this.handleScroll(!0),Kr(e,`scroll`,()=>this.handleScroll())}),pd([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{this.root.viewportNode&&this.content.isPositioned&&this.handleScroll(!0)})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;e&&t&&(e.scrollTop+=t.offsetHeight)};#t=M(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Vm=class e{static create(t){return new e(new zm(t,Om.get()))}scrollButtonState;content;root;#e=N(!1);get canScrollUp(){return B(this.#e)}set canScrollUp(e){P(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,pd([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(this.root.viewportNode&&this.content.isPositioned)return this.handleScroll(!0),Kr(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{this.root.viewportNode&&this.root.highlightedNode&&(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=M(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}};function Hm(e,t){A(t,!0);let n=X(t,`value`,15),r=Lm.create({value:$(()=>n())});var i=U(),a=I(i),o=e=>{lm(e,Ta(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return n()},set value(e){n(e)}}))};K(a,e=>{r.shouldRender&&e(o)}),W(e,i),j()}function Um(e,t){A(t,!0);let n=X(t,`tooltip`,3,!1);pm.create({id:$(()=>t.id),virtualEl:$(()=>t.virtualEl),ref:Or(()=>t.ref)},Or(()=>n()));var r=U();q(I(r),()=>t.children??f),W(e,r),j()}var Wm=[`top`,`right`,`bottom`,`left`],Gm=Math.min,Km=Math.max,qm=Math.round,Jm=Math.floor,Ym=e=>({x:e,y:e}),Xm={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Zm(e,t,n){return Km(e,Gm(t,n))}function Qm(e,t){return typeof e==`function`?e(t):e}function $m(e){return e.split(`-`)[0]}function eh(e){return e.split(`-`)[1]}function th(e){return e===`x`?`y`:`x`}function nh(e){return e===`y`?`height`:`width`}function rh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ih(e){return th(rh(e))}function ah(e,t,n){n===void 0&&(n=!1);let r=eh(e),i=ih(e),a=nh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=mh(o)),[o,mh(o)]}function oh(e){let t=mh(e);return[sh(e),t,sh(t)]}function sh(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ch=[`left`,`right`],lh=[`right`,`left`],uh=[`top`,`bottom`],dh=[`bottom`,`top`];function fh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?lh:ch:t?ch:lh;case`left`:case`right`:return t?uh:dh;default:return[]}}function ph(e,t,n,r){let i=eh(e),a=fh($m(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(sh)))),a}function mh(e){let t=$m(e);return Xm[t]+e.slice(t.length)}function hh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function gh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:hh(e)}function _h(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function vh(e,t,n){let{reference:r,floating:i}=e,a=rh(t),o=ih(t),s=nh(o),c=$m(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=eh(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function yh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Qm(t,e),p=gh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=_h(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=_h(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var bh=50,xh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:yh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=vh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<bh&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=vh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Sh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Qm(e,t)||{};if(l==null)return{};let d=gh(u),f={x:n,y:r},p=ih(i),m=nh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,ee=C/2-h[m]/2-1,te=Gm(d[_],ee),ne=Gm(d[v],ee),re=C-h[m]-ne,ie=C/2-h[m]/2+w,ae=Zm(te,ie,re),oe=!c.arrow&&eh(i)!=null&&ie!==ae&&a.reference[m]/2-(ie<te?te:ne)-h[m]/2<0,se=oe?ie<te?ie-te:ie-re:0;return{[p]:f[p]+se,data:{[p]:ae,centerOffset:ie-ae-se,...oe&&{alignmentOffset:se}},reset:oe}}}),Ch=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Qm(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=$m(r),_=rh(o),v=$m(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[mh(o)]:oh(o)),x=p!==`none`;!d&&x&&b.push(...ph(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],ee=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ah(r,a,y);w.push(C[e[0]],C[e[1]])}if(ee=[...ee,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===rh(t)||ee.every(e=>rh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:ee},reset:{placement:t}};let n=ee.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=ee.filter(e=>{if(x){let t=rh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function wh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Th(e){return Wm.some(t=>e[t]>=0)}var Eh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Qm(e,t);switch(i){case`referenceHidden`:{let e=wh(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Th(e)}}}case`escaped`:{let e=wh(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Th(e)}}}default:return{}}}}},Dh=new Set([`left`,`top`]);async function Oh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=$m(n),s=eh(n),c=rh(n)===`y`,l=Dh.has(o)?-1:1,u=a&&c?-1:1,d=Qm(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var kh=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Oh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ah=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Qm(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=rh(i),p=th(f),m=u[p],h=u[f],g=(e,t)=>Zm(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Qm(e,t),u={x:n,y:r},d=rh(i),f=th(d),p=u[f],m=u[d],h=Qm(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Dh.has($m(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Mh=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Qm(e,t),c=await i.detectOverflow(t,s),l=$m(n),u=eh(n),d=rh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Gm(p-c[m],g),y=Gm(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Km(c.left,c.right):S=p-2*Km(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Nh(){return typeof window<`u`}function Ph(e){return Lh(e)?(e.nodeName||``).toLowerCase():`#document`}function Fh(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ih(e){return((Lh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Lh(e){return Nh()?e instanceof Node||e instanceof Fh(e).Node:!1}function Rh(e){return Nh()?e instanceof Element||e instanceof Fh(e).Element:!1}function zh(e){return Nh()?e instanceof HTMLElement||e instanceof Fh(e).HTMLElement:!1}function Bh(e){return!Nh()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Fh(e).ShadowRoot}function Vh(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Qh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Hh(e){return/^(table|td|th)$/.test(Ph(e))}function Uh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Wh=/transform|translate|scale|rotate|perspective|filter/,Gh=/paint|layout|strict|content/,Kh=e=>!!e&&e!==`none`,qh;function Jh(e){let t=Rh(e)?Qh(e):e;return Kh(t.transform)||Kh(t.translate)||Kh(t.scale)||Kh(t.rotate)||Kh(t.perspective)||!Xh()&&(Kh(t.backdropFilter)||Kh(t.filter))||Wh.test(t.willChange||``)||Gh.test(t.contain||``)}function Yh(e){let t=eg(e);for(;zh(t)&&!Zh(t);){if(Jh(t))return t;if(Uh(t))return null;t=eg(t)}return null}function Xh(){return qh??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),qh}function Zh(e){return/^(html|body|#document)$/.test(Ph(e))}function Qh(e){return Fh(e).getComputedStyle(e)}function $h(e){return Rh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eg(e){if(Ph(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bh(e)&&e.host||Ih(e);return Bh(t)?t.host:t}function tg(e){let t=eg(e);return Zh(t)?(e.ownerDocument||e).body:zh(t)&&Vh(t)?t:tg(t)}function ng(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=tg(e),i=r===e.ownerDocument?.body,a=Fh(r);if(i){let e=rg(a);return t.concat(a,a.visualViewport||[],Vh(r)?r:[],e&&n?ng(e):[])}return t.concat(r,ng(r,[],n))}function rg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ig(e){let t=Qh(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zh(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=qm(n)!==a||qm(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ag(e){return Rh(e)?e:e.contextElement}function og(e){let t=ag(e);if(!zh(t))return Ym(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ig(t),o=(a?qm(n.width):n.width)/r,s=(a?qm(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var sg=Ym(0);function cg(e){let t=Fh(e);return!Xh()||!t.visualViewport?sg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lg(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Fh(e)}function ug(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ag(e),o=Ym(1);t&&(r?Rh(r)&&(o=og(r)):o=og(e));let s=lg(a,n,r)?cg(a):Ym(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Fh(a),t=Rh(r)?Fh(r):r,n=e,i=rg(n);for(;i&&t!==n;){let e=og(i),t=i.getBoundingClientRect(),r=Qh(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Fh(i),i=rg(n)}}return _h({width:u,height:d,x:c,y:l})}function dg(e,t){let n=$h(e).scrollLeft;return t?t.left+n:ug(Ih(e)).left+n}function fg(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dg(e,n),y:n.top+t.scrollTop}}function pg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ih(r),s=t?Uh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ym(1),u=Ym(0),d=zh(r);if((d||!a)&&((Ph(r)!==`body`||Vh(o))&&(c=$h(r)),d)){let e=ug(r);l=og(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?fg(o,c):Ym(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function mg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function hg(e){let t=$h(e),n=e.ownerDocument.body,r=Km(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Km(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+dg(e),o=-t.scrollTop;return Qh(n).direction===`rtl`&&(a+=Km(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var gg=25;function _g(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Fh(e),a=Ih(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Xh()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(dg(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=gg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function vg(e,t){let n=ug(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=og(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yg(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=_g(e,n,t);else if(t===`document`)r=hg(Ih(e));else if(Rh(t))r=vg(t,n);else{let n=cg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _h(r)}function bg(e,t){let n=t.get(e);if(n)return n;let r=ng(e,[],!1).filter(e=>Rh(e)&&Ph(e)!==`body`),i=null,a=Qh(e).position===`fixed`,o=a?eg(e):e;for(;Rh(o)&&!Zh(o);){let e=Qh(o),t=Jh(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=eg(o)}return t.set(e,r),r}function xg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Uh(t)?[]:bg(t,this._c):[].concat(n),r],o=yg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=yg(t,a[e],i);s=Km(n.top,s),c=Gm(n.right,c),l=Gm(n.bottom,l),u=Km(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Sg(e){let{width:t,height:n}=ig(e);return{width:t,height:n}}function Cg(e,t,n){let r=zh(t),i=Ih(t),a=n===`fixed`,o=ug(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ym(0);if((r||!a)&&((Ph(t)!==`body`||Vh(i))&&(s=$h(t)),r)){let e=ug(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=dg(i));let l=i&&!r&&!a?fg(i,s):Ym(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function wg(e){return Qh(e).position===`static`}function Tg(e,t){if(!zh(e)||Qh(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ih(e)===n&&(n=n.ownerDocument.body),n}function Eg(e,t){let n=Fh(e);if(Uh(e))return n;if(!zh(e)){let t=eg(e);for(;t&&!Zh(t);){if(Rh(t)&&!wg(t))return t;t=eg(t)}return n}let r=Tg(e,t);for(;r&&Hh(r)&&wg(r);)r=Tg(r,t);return r&&Zh(r)&&wg(r)&&!Jh(r)?n:r||Yh(e)||n}var Dg=async function(e){let t=this.getOffsetParent||Eg,n=this.getDimensions,r=await n(e.floating);return{reference:Cg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Og(e){return Qh(e).direction===`rtl`}var kg={convertOffsetParentRelativeRectToViewportRelativeRect:pg,getDocumentElement:Ih,getClippingRect:xg,getOffsetParent:Eg,getElementRects:Dg,getClientRects:mg,getDimensions:Sg,getScale:og,isElement:Rh,isRTL:Og};function Ag(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jg(e,t,n){let r=null,i,a=Ih(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Jm(d),h=Jm(a.clientWidth-(u+f)),g=Jm(a.clientHeight-(d+p)),_=Jm(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Km(0,Gm(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ag(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Fh(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Mg(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ag(e),u=i||a?[...l?ng(l):[],...t?ng(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?jg(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ug(e):null;c&&g();function g(){let t=ug(e);h&&!Ag(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ng=kh,Pg=Ah,Fg=Ch,Ig=Mh,Lg=Eh,Rg=Sh,zg=jh,Bg=(e,t,n)=>{let r=new Map,i=n??{},a={...kg,...i.platform,_c:r};return xh(e,t,{...i,platform:a})};function Vg(e){let t=e.whileElementsMounted,n=M(()=>hm(e.open)??!0),r=M(()=>hm(e.middleware)),i=M(()=>hm(e.transform)??!0),a=M(()=>hm(e.placement)??`bottom`),o=M(()=>hm(e.strategy)??`absolute`),s=M(()=>hm(e.sideOffset)??0),c=M(()=>hm(e.alignOffset)??0),l=e.reference,u;Nn(()=>{u={middleware:B(r),placement:B(a),strategy:B(o),open:B(n),sideOffset:B(s),alignOffset:B(c)}});let d=N(0),f=N(0),p=pu(null),m=N(ln(B(o))),h=N(ln(B(a))),g=N(ln({})),_=N(!1),v=!1,y=0,b=!1,x=M(()=>{let e=p.current?_m(p.current,B(d)):B(d),t=p.current?_m(p.current,B(f)):B(f);return B(i)?{position:B(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&gm(p.current)>=1.5&&{willChange:`transform`}}:{position:B(m),left:`${e}px`,top:`${t}px`}}),S;function C(){if(b||l.current===null||p.current===null)return;let e=l.current,t=p.current,n=++y;Bg(e,t,{middleware:u.middleware,placement:u.placement,strategy:u.strategy}).then(r=>{if(n===y&&l.current===e&&p.current===t){if(Hg(e))P(g,{...B(g),hide:{...B(g).hide,referenceHidden:!0}},!0);else{if(!u.open&&B(d)!==0&&B(f)!==0){let e=Math.max(Math.abs(u.sideOffset),Math.abs(u.alignOffset),15);if(r.x<=e&&r.y<=e)return}P(d,r.x,!0),P(f,r.y,!0),P(m,r.strategy,!0),P(h,r.placement,!0),P(g,r.middlewareData,!0),P(_,!0)}}})}function w(){typeof S==`function`&&(S(),S=void 0),y++}function ee(){w(),t===void 0?(te(),C()):B(n)&&l.current!==null&&p.current!==null&&(te(),S=t(l.current,p.current,C))}function te(){return[B(r),B(a),B(o)]}function ne(){!B(n)&&p.current===null&&P(_,!1)}function re(){return[B(r),B(a),B(o),B(s),B(c),B(n)]}return jn(()=>{t===void 0&&B(n)&&(te(),C())}),jn(ee),jn(()=>{t!==void 0&&(re(),B(n)&&B(_)?v?C():v=!0:v=!1)}),jn(ne),jn(()=>()=>{b=!0,w()}),{floating:p,reference:l,get strategy(){return B(m)},get placement(){return B(h)},get middlewareData(){return B(g)},get isPositioned(){return B(_)},get floatingStyles(){return B(x)},get update(){return C}}}function Hg(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Ug={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Wg=new ud(`Floating.Content`),Gg=class e{static create(t,n=!1){return n?Wg.set(new e(t,dm.get())):Wg.set(new e(t,um.get()))}opts;root;contentRef=pu(null);wrapperRef=pu(null);arrowRef=pu(null);contentAttachment=Pd(this.contentRef);wrapperAttachment=Pd(this.wrapperRef);arrowAttachment=Pd(this.arrowRef);arrowId=pu(Ip());#e=M(()=>{if(typeof this.opts.style==`string`)return Ju(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new gd(()=>this.arrowRef.current??void 0);#r=M(()=>this.#n?.width??0);#i=M(()=>this.#n?.height??0);#a=M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=M(()=>(Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]).filter(df));#s=M(()=>B(this.#o).length>0);get hasExplicitBoundaries(){return B(this.#s)}set hasExplicitBoundaries(e){P(this.#s,e)}#c=M(()=>({padding:this.opts.collisionPadding.current,boundary:B(this.#o),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return B(this.#c)}set detectOverflowOptions(e){P(this.#c,e)}#l=N(void 0);#u=N(void 0);#d=N(void 0);#f=N(void 0);#p=M(()=>[Ng({mainAxis:this.opts.sideOffset.current+B(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Pg({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?zg():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Fg({...this.detectOverflowOptions}),Ig({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(this.#l,t,!0),P(this.#u,n,!0),P(this.#d,r,!0),P(this.#f,i,!0)}}),this.arrowRef.current&&Rg({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Kg({arrowWidth:B(this.#r),arrowHeight:B(this.#i)}),this.opts.hideWhenDetached.current&&Lg({strategy:`referenceHidden`,...this.detectOverflowOptions}),this.opts.hideWhenDetached.current&&!this.hasExplicitBoundaries&&{...Lg({strategy:`referenceHidden`,boundary:`clippingAncestors`}),name:`hideClipping`}].filter(Boolean));get middleware(){return B(this.#p)}set middleware(e){P(this.#p,e)}floating;#m=M(()=>Jg(this.floating.placement));get placedSide(){return B(this.#m)}set placedSide(e){P(this.#m,e)}#h=M(()=>Yg(this.floating.placement));get placedAlign(){return B(this.#h)}set placedAlign(e){P(this.#h,e)}#g=M(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return B(this.#g)}set arrowX(e){P(this.#g,e)}#_=M(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return B(this.#_)}set arrowY(e){P(this.#_,e)}#v=M(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return B(this.#v)}set cannotCenterArrow(e){P(this.#v,e)}#y=N(`auto`);get contentZIndex(){return B(this.#y)}set contentZIndex(e){P(this.#y,e,!0)}#b=M(()=>Ug[this.placedSide]);get arrowBaseSide(){return B(this.#b)}set arrowBaseSide(e){P(this.#b,e)}#x=M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${B(this.#l)}px`,"--bits-floating-available-height":`${B(this.#u)}px`,"--bits-floating-anchor-width":`${B(this.#d)}px`,"--bits-floating-anchor-height":`${B(this.#f)}px`,...(this.floating.middlewareData.hide?.referenceHidden||this.floating.middlewareData.hideClipping?.referenceHidden)&&{visibility:`hidden`,"pointer-events":`none`},...B(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return B(this.#x)}set wrapperProps(e){P(this.#x,e)}#S=M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:td({...B(this.#e)}),...this.contentAttachment}));get props(){return B(this.#S)}set props(e){P(this.#S,e)}#C=M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}));get arrowStyle(){return B(this.#C)}set arrowStyle(e){P(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),pd(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Vg({strategy:()=>this.opts.strategy.current,placement:()=>B(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>Mg(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),jn(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),pd([()=>this.contentRef.current,()=>this.opts.enabled.current],([e,t])=>{if(!e||!t)return;let n=jd(e),r=n.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let t=n.getComputedStyle(e).zIndex;t!==this.contentZIndex&&(this.contentZIndex=t)});return()=>{n.cancelAnimationFrame(r)}}),jn(()=>{this.floating.floating.current=this.wrapperRef.current})}};function Kg(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=qg(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function qg(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function Jg(e){return qg(e)[0]}function Yg(e){return qg(e)[1]}function Xg(e,t){A(t,!0);let n=X(t,`side`,3,`bottom`),r=X(t,`sideOffset`,3,0),i=X(t,`align`,3,`center`),a=X(t,`alignOffset`,3,0),o=X(t,`arrowPadding`,3,0),s=X(t,`avoidCollisions`,3,!0),c=X(t,`collisionBoundary`,19,()=>[]),l=X(t,`collisionPadding`,3,0),u=X(t,`hideWhenDetached`,3,!1),d=X(t,`onPlaced`,3,()=>{}),p=X(t,`sticky`,3,`partial`),m=X(t,`updatePositionStrategy`,3,`optimized`),h=X(t,`strategy`,3,`fixed`),g=X(t,`dir`,3,`ltr`),_=X(t,`style`,19,()=>({})),v=X(t,`wrapperId`,19,Ip),y=X(t,`customAnchor`,3,null),b=X(t,`tooltip`,3,!1),x=Gg.create({side:$(()=>n()),sideOffset:$(()=>r()),align:$(()=>i()),alignOffset:$(()=>a()),id:$(()=>t.id),arrowPadding:$(()=>o()),avoidCollisions:$(()=>s()),collisionBoundary:$(()=>c()),collisionPadding:$(()=>l()),hideWhenDetached:$(()=>u()),onPlaced:$(()=>d()),sticky:$(()=>p()),updatePositionStrategy:$(()=>m()),strategy:$(()=>h()),dir:$(()=>g()),style:$(()=>_()),enabled:$(()=>t.enabled),wrapperId:$(()=>v()),customAnchor:$(()=>y())},Or(()=>b())),S=M(()=>id(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=U();q(I(C),()=>t.content??f,()=>({props:x.props,wrapperProps:B(S)})),W(e,C),j()}function Zg(e,t){A(t,!0),Ea(()=>{t.onPlaced?.()});var n=U();q(I(n),()=>t.content??f,()=>({props:{},wrapperProps:{}})),W(e,n),j()}var Qg=Wd({component:`separator`,parts:[`root`]}),$g=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Pd(e.ref)}#e=M(()=>({id:this.opts.id.current,role:this.opts.decorative.current?`none`:`separator`,"aria-orientation":this.opts.orientation.current,"aria-hidden":Id(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[Qg.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}},e_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`decorative`,`orientation`]),t_=V(`<div><!></div>`);function n_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`decorative`,3,!1),o=X(t,`orientation`,3,`horizontal`),s=Y(t,e_),c=$g.create({ref:$(()=>i(),e=>i(e)),id:$(()=>r()),decorative:$(()=>a()),orientation:$(()=>o())}),l=M(()=>id(s,c.props));var u=U(),d=I(u),p=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(l)})),W(e,n)},m=e=>{var n=t_();sa(n,()=>({...B(l)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(d,e=>{t.child?e(p):e(m,-1)}),W(e,u),j()}var r_=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function i_(e,t){let n=X(t,`isStatic`,3,!1),r=Y(t,r_);var i=U(),a=I(i),o=e=>{Zg(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{Xg(e,Ta({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};K(a,e=>{n()?e(o):e(s,-1)}),W(e,i)}var a_=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.forceMount.ref.tooltip.contentPointerEvents`.split(`.`)),o_=V(`<!> <!>`,1);function s_(e,t){A(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=X(t,`tooltip`,3,!1),c=X(t,`contentPointerEvents`,3,`auto`),l=Y(t,a_),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(B(u)?`fixed`:`absolute`));i_(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return B(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=o_(),p=I(d),m=e=>{em(e,{get preventScroll(){return B(u)}})},h=e=>{em(e,{get preventScroll(){return B(u)}})};K(p,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),Op(R(p,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Kf(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Uf(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;Fp(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=U(),u=I(i);{let e=M(()=>({props:id(l,o(),r(),a(),{id:t.id,style:{pointerEvents:c()}}),wrapperProps:s()}));q(u,()=>t.popper??f,()=>B(e))}W(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),W(e,d)},$$slots:{content:!0}}),j()}var c_=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function l_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,c_);var c=U(),l=I(c),u=e=>{s_(e,Ta({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};K(l,e=>{t.shouldRender&&e(u)}),W(e,c)}var u_=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function d_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,u_);s_(e,Ta({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}var f_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),p_=V(`<div><div><!></div></div>`);function m_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`forceMount`,3,!1),o=X(t,`side`,3,`bottom`),s=X(t,`onInteractOutside`,3,gf),c=X(t,`onEscapeKeydown`,3,gf),l=X(t,`preventScroll`,3,!1),u=Y(t,f_),d=Fm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),onInteractOutside:$(()=>s()),onEscapeKeydown:$(()=>c())}),p=M(()=>id(u,d.props));var m=U(),h=I(m),g=e=>{d_(e,Ta(()=>B(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get enabled(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!0,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>id(r(),{style:d.props.style},{style:t.style}));var o=U(),s=I(o),c=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=p_();sa(n,()=>({...i()}));var r=F(n);sa(r,()=>({...B(a)})),q(F(r),()=>t.children??f),O(r),O(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))},_=e=>{l_(e,Ta(()=>B(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get open(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!1,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>id(r(),{style:d.props.style},{style:t.style}));var o=U(),s=I(o),c=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=p_();sa(n,()=>({...i()}));var r=F(n);sa(r,()=>({...B(a)})),q(F(r),()=>t.children??f),O(r),O(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))};K(h,e=>{a()?e(g):a()||e(_,1)}),W(e,m),j()}function h_(e,t){A(t,!0);let n=X(t,`mounted`,15,!1),r=X(t,`onMountedChange`,3,gf);yd(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),j()}var g_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),__=V(`<div><!></div>`),v_=V(`<!> <!>`,1);function y_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`label`,19,()=>t.value),o=X(t,`disabled`,3,!1),s=X(t,`onHighlight`,3,gf),c=X(t,`onUnhighlight`,3,gf),l=Y(t,g_),u=Im.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),value:$(()=>t.value),disabled:$(()=>o()),label:$(()=>a()),onHighlight:$(()=>s()),onUnhighlight:$(()=>c())}),d=M(()=>id(l,u.props));var p=v_(),m=I(p),h=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(d),...u.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},g=e=>{var n=__();sa(n,()=>({...B(d)})),q(F(n),()=>t.children??f,()=>u.snippetProps),O(n),W(e,n)};K(m,e=>{t.child?e(h):e(g,-1)}),h_(R(m,2),{get mounted(){return u.mounted},set mounted(e){u.mounted=e}}),W(e,p),j()}var b_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),x_=V(`<div><!></div>`);function S_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=Y(t,b_),o=Rm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>id(a,o.props));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=x_();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var C_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),w_=V(`<div><!></div>`),T_=V(`<!> <!>`,1);function E_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,C_),s=Bm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=M(()=>id(o,s.props));var l=U(),u=I(l),d=e=>{var n=T_(),r=I(n);h_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=w_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollDown&&e(d)}),W(e,l),j()}var D_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),O_=V(`<div><!></div>`),k_=V(`<!> <!>`,1);function A_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,D_),s=Vm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=M(()=>id(o,s.props));var l=U(),u=I(l),d=e=>{var n=k_(),r=I(n);h_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=O_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollUp&&e(d)}),W(e,l),j()}var j_=Wd({component:`label`,parts:[`root`]}),M_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Pd(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=M(()=>({id:this.opts.id.current,[j_.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}},N_=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),P_=V(`<label><!></label>`);function F_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=Y(t,N_),o=M_.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>id(a,o.props,{for:t.for}));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=P_();sa(n,()=>({...B(s),for:t.for})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var I_=Wd({component:`progress`,parts:[`root`]}),L_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Pd(this.opts.ref)}#e=M(()=>({role:`progressbar`,value:this.opts.value.current,"aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":this.opts.value.current===null?void 0:this.opts.value.current,"data-value":this.opts.value.current===null?void 0:this.opts.value.current,"data-state":R_(this.opts.value.current,this.opts.max.current),"data-max":this.opts.max.current,"data-min":this.opts.min.current,"data-indeterminate":this.opts.value.current===null?``:void 0,[I_.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}};function R_(e,t){return e===null?`indeterminate`:e===t?`loaded`:`loading`}var z_=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`value`,`max`,`min`,`id`,`ref`]),B_=V(`<div><!></div>`);function V_(e,t){let n=ii();A(t,!0);let r=X(t,`value`,3,0),i=X(t,`max`,3,100),a=X(t,`min`,3,0),o=X(t,`id`,19,()=>_f(n)),s=X(t,`ref`,15,null),c=Y(t,z_),l=L_.create({value:$(()=>r()),max:$(()=>i()),min:$(()=>a()),id:$(()=>o()),ref:$(()=>s(),e=>s(e))}),u=M(()=>id(c,l.props));var d=U(),p=I(d),m=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(u)})),W(e,n)},h=e=>{var n=B_();sa(n,()=>({...B(u)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(p,e=>{t.child?e(m):e(h,-1)}),W(e,d),j()}var H_=V(`<!> <!>`,1);function U_(e,t){A(t,!0);let n=X(t,`value`,15),r=X(t,`onValueChange`,3,gf),i=X(t,`name`,3,``),a=X(t,`disabled`,3,!1),o=X(t,`open`,15,!1),s=X(t,`onOpenChange`,3,gf),c=X(t,`onOpenChangeComplete`,3,gf),l=X(t,`loop`,3,!1),u=X(t,`scrollAlignment`,3,`nearest`),d=X(t,`required`,3,!1),p=X(t,`items`,19,()=>[]),m=X(t,`allowDeselect`,3,!1);function h(){n()===void 0&&n(t.type===`single`?``:[])}h(),pd.pre(()=>n(),()=>{h()});let g=N(``),_=Mm.create({type:Or(()=>t.type),value:$(()=>n(),e=>{n(e),r()(e)}),disabled:$(()=>a()),required:$(()=>d()),open:$(()=>o(),e=>{o(e),s()(e)}),loop:$(()=>l()),scrollAlignment:$(()=>u()),name:$(()=>i()),isCombobox:!1,items:$(()=>p()),allowDeselect:$(()=>m()),inputValue:$(()=>B(g),e=>P(g,e,!0)),onOpenChangeComplete:$(()=>c())});var v=H_(),y=I(v);mm(y,{children:(e,n)=>{var r=U();q(I(r),()=>t.children??f),W(e,r)},$$slots:{default:!0}});var b=R(y,2),x=e=>{var n=U(),r=I(n),i=e=>{Hm(e,{get autocomplete(){return t.autocomplete}})},a=e=>{var n=U();xi(I(n),16,()=>_.opts.value.current,e=>e,(e,n)=>{Hm(e,{get value(){return n},get autocomplete(){return t.autocomplete}})}),W(e,n)};K(r,e=>{_.opts.value.current.length===0?e(i):e(a,-1)}),W(e,n)},S=M(()=>Array.isArray(_.opts.value.current)),C=e=>{Hm(e,{get autocomplete(){return t.autocomplete},get value(){return _.opts.value.current},set value(e){_.opts.value.current=e}})};K(b,e=>{B(S)?e(x):e(C,-1)}),W(e,v),j()}var W_=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`placeholder`,`child`,`children`]),G_=V(`<span><!></span>`);function K_(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>_f(n)),a=Y(t,W_),o=Nm.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e)),placeholder:$(()=>t.placeholder)}),s=M(()=>id(a,o.props));var c=U(),l=I(c),u=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=G_();sa(n,()=>({...B(s)}));var r=F(n),i=e=>{var n=U();q(I(n),()=>t.children??f,()=>o.snippetProps),W(e,n)},a=e=>{var n=H();z(()=>G(n,o.snippetProps.selection.selected?.label??t.placeholder)),W(e,n)},c=e=>{var n=H();z(e=>G(n,e),[()=>o.snippetProps.selection.selected.length>0?o.snippetProps.selection.selected.map(e=>e.label).join(`, `):t.placeholder]),W(e,n)},l=e=>{var n=H();z(()=>G(n,t.placeholder)),W(e,n)};K(r,e=>{t.children?e(i):o.snippetProps.selection.type===`single`?e(a,1):o.snippetProps.selection.type===`multiple`&&o.snippetProps.selection.selected?e(c,2):e(l,-1)}),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var q_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`type`]),J_=V(`<button><!></button>`);function Y_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`type`,3,`button`),o=Y(t,q_),s=Pm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=M(()=>id(o,s.props,{type:a()}));var l=U();J(I(l),()=>Um,(e,n)=>{n(e,{get id(){return r()},get ref(){return s.opts.ref},children:(e,n)=>{var r=U(),i=I(r),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(c)})),W(e,n)},o=e=>{var n=J_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,l),j()}var X_=Wd({component:`switch`,parts:[`root`,`thumb`]}),Z_=new ud(`Switch.Root`),Q_=class e{static create(t){return Z_.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=Pd(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){e.key!==`Enter`&&e.key!==` `||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=M(()=>({"data-disabled":Ld(this.opts.disabled.current),"data-state":Bd(this.opts.checked.current),"data-required":Ld(this.opts.required.current)}));get sharedProps(){return B(this.#t)}set sharedProps(e){P(this.#t,e)}#n=M(()=>({checked:this.opts.checked.current}));get snippetProps(){return B(this.#n)}set snippetProps(e){P(this.#n,e)}#r=M(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:Rd(this.opts.disabled.current),"aria-checked":Hd(this.opts.checked.current,!1),"aria-required":Fd(this.opts.required.current),[X_.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#r)}set props(e){P(this.#r,e)}},$_=class e{static create(){return new e(Z_.get())}root;#e=M(()=>this.root.opts.name.current!==void 0);get shouldRender(){return B(this.#e)}set shouldRender(e){P(this.#e,e)}constructor(e){this.root=e}#t=M(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},ev=class e{static create(t){return new e(t,Z_.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref)}#e=M(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return B(this.#e)}set snippetProps(e){P(this.#e,e)}#t=M(()=>({...this.root.sharedProps,id:this.opts.id.current,[X_.thumb]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}};function tv(e,t){A(t,!1);let n=$_.create();_a();var r=U(),i=I(r),a=e=>{lm(e,Ta(()=>n.props))};K(i,e=>{n.shouldRender&&e(a)}),W(e,r),j()}var nv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),rv=V(`<button><!></button>`),iv=V(`<!> <!>`,1);function av(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>_f(n)),a=X(t,`disabled`,3,!1),o=X(t,`required`,3,!1),s=X(t,`checked`,15,!1),c=X(t,`value`,3,`on`),l=X(t,`name`,3,void 0),u=X(t,`type`,3,`button`),d=X(t,`onCheckedChange`,3,gf),p=Y(t,nv),m=Q_.create({checked:$(()=>s(),e=>{s(e),d()?.(e)}),disabled:$(()=>a()??!1),required:$(()=>o()),value:$(()=>c()),name:$(()=>l()),id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),h=M(()=>id(p,m.props,{type:u()}));var g=iv(),_=I(g),v=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(h),...m.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},y=e=>{var n=rv();sa(n,()=>({...B(h)})),q(F(n),()=>t.children??f,()=>m.snippetProps),O(n),W(e,n)};K(_,e=>{t.child?e(v):e(y,-1)}),tv(R(_,2),{}),W(e,g),j()}var ov=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),sv=V(`<span><!></span>`);function cv(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>_f(n)),a=Y(t,ov),o=ev.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),s=M(()=>id(a,o.props));var c=U(),l=I(c),u=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=sv();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f,()=>o.snippetProps),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var lv=Wd({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),uv=new ud(`Tabs.Root`),dv=class e{static create(t){return uv.set(new e(t))}opts;attachment;rovingFocusGroup;#e=N(ln([]));get triggerIds(){return B(this.#e)}set triggerIds(e){P(this.#e,e,!0)}valueToTriggerId=new cd;valueToContentId=new cd;constructor(e){this.opts=e,this.attachment=Pd(e.ref),this.rovingFocusGroup=new pf({candidateAttr:lv.trigger,rootAttr:lv.root,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=M(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[lv.root]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},fv=class e{static create(t){return new e(t,uv.get())}opts;root;attachment;#e=M(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref)}#t=M(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[lv.list]:``,"data-disabled":Ld(B(this.#e)),...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},pv=class e{static create(t){return new e(t,uv.get())}opts;root;attachment;#e=N(0);#t=M(()=>this.root.opts.value.current===this.opts.value.current);#n=M(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=M(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref),pd([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),jn(()=>{this.root.triggerIds.length,B(this.#t)||!this.root.opts.value.current?P(this.#e,0):P(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||B(this.#n)||this.#i()}onclick(e){B(this.#n)||this.#i()}onkeydown(e){B(this.#n)||(e.key===` `||e.key===`Enter`?(e.preventDefault(),this.#i()):this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e))}#a=M(()=>({id:this.opts.id.current,role:`tab`,"data-state":hv(B(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Ld(B(this.#n)),"aria-selected":Fd(B(this.#t)),"aria-controls":B(this.#r),[lv.trigger]:``,disabled:Rd(B(this.#n)),tabindex:B(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#a)}set props(e){P(this.#a,e)}},mv=class e{static create(t){return new e(t,uv.get())}opts;root;attachment;#e=M(()=>this.root.opts.value.current===this.opts.value.current);#t=M(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Pd(e.ref),pd([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=M(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:Rd(!B(this.#e)),tabindex:this.opts.tabindex.current,"data-value":this.opts.value.current,"data-state":hv(B(this.#e)),"aria-labelledby":B(this.#t),"data-orientation":this.root.opts.orientation.current,[lv.content]:``,...this.attachment}));get props(){return B(this.#n)}set props(e){P(this.#n,e)}};function hv(e){return e?`active`:`inactive`}var gv=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),_v=V(`<div><!></div>`);function vv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`value`,15,``),o=X(t,`onValueChange`,3,gf),s=X(t,`orientation`,3,`horizontal`),c=X(t,`loop`,3,!0),l=X(t,`activationMode`,3,`automatic`),u=X(t,`disabled`,3,!1),d=Y(t,gv),p=dv.create({id:$(()=>r()),value:$(()=>a(),e=>{a(e),o()(e)}),orientation:$(()=>s()),loop:$(()=>c()),activationMode:$(()=>l()),disabled:$(()=>u()),ref:$(()=>i(),e=>i(e))}),m=M(()=>id(d,p.props));var h=U(),g=I(h),_=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(m)})),W(e,n)},v=e=>{var n=_v();sa(n,()=>({...B(m)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(g,e=>{t.child?e(_):e(v,-1)}),W(e,h),j()}var yv=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`,`tabindex`]),bv=V(`<div><!></div>`);function xv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=X(t,`tabindex`,3,0),o=Y(t,yv),s=mv.create({value:$(()=>t.value),tabindex:$(()=>a()??0),id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=M(()=>id(o,s.props));var l=U(),u=I(l),d=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(c)})),W(e,n)},p=e=>{var n=bv();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(u,e=>{t.child?e(d):e(p,-1)}),W(e,l),j()}var Sv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),Cv=V(`<div><!></div>`);function wv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>_f(n)),i=X(t,`ref`,15,null),a=Y(t,Sv),o=fv.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>id(a,o.props));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=Cv();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var Tv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),Ev=V(`<button><!></button>`);function Dv(e,t){let n=ii();A(t,!0);let r=X(t,`disabled`,3,!1),i=X(t,`id`,19,()=>_f(n)),a=X(t,`type`,3,`button`),o=X(t,`ref`,15,null),s=Y(t,Tv),c=pv.create({id:$(()=>i()),disabled:$(()=>r()??!1),value:$(()=>t.value),ref:$(()=>o(),e=>o(e))}),l=M(()=>id(s,c.props,{type:a()}));var u=U(),d=I(u),p=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(l)})),W(e,n)},m=e=>{var n=Ev();sa(n,()=>({...B(l)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(d,e=>{t.child?e(p):e(m,-1)}),W(e,u),j()}var Ov=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function kv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Ov);var i=U(),a=I(i);{let e=M(()=>Wl(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));J(a,()=>F_,(t,i)=>{i(t,Ta({"data-slot":`label`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var Av=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);function jv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`data-slot`,3,`separator`),i=Y(t,Av);var a=U(),o=I(a);{let e=M(()=>Wl(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,t.class));J(o,()=>n_,(t,a)=>{a(t,Ta({get"data-slot"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),j()}var Mv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Nv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Mv);var i=U(),a=I(i);{let e=M(()=>Wl(`text-sm flex-1 outline-none`,t.class));J(a,()=>xv,(t,i)=>{i(t,Ta({"data-slot":`tabs-content`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var Pv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Fv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Pv);var i=U(),a=I(i);{let e=M(()=>Wl(`gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 relative inline-flex h-[calc(100%_-_1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,t.class));J(a,()=>Dv,(t,i)=>{i(t,Ta({"data-slot":`tabs-trigger`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var Iv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Lv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15,``),i=Y(t,Iv);var a=U(),o=I(a);{let e=M(()=>Wl(`gap-2 group/tabs flex data-horizontal:flex-col`,t.class));J(o,()=>vv,(t,a)=>{a(t,Ta({"data-slot":`tabs`,get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))})}W(e,a),j()}var Rv=Xc({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col`,variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),zv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function Bv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,zv);var a=U(),o=I(a);{let e=M(()=>Wl(Rv({variant:r()}),t.class));J(o,()=>wv,(t,a)=>{a(t,Ta({"data-slot":`tabs-list`,get"data-variant"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),j()}var Vv=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hv(e,t){let n=Y(t,Vv);var r=U();J(I(r),()=>Tf,(e,t)=>{t(e,Ta(()=>n))}),W(e,r)}var Uv={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Wv=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function Gv(e){return e!=null}function Kv(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Uv.width,a=e.size??e.height??Uv.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Wv(...c):Wv(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Uv[`stroke-width`])*Number(e.size??e.width??Uv.width)/Number(t.size??t.width??Uv.width):t.strokeWidth??Uv[`stroke-width`];return[`svg`,{...Object.entries(Uv).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Gv(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Gv(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Gv(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var qv=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Jv=Symbol(`lucide-context`),Yv=()=>$e(Jv),Xv=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),Zv=ri(`<svg><!><!></svg>`);function Qv(e,t){A(t,!0);let n=Yv()??{},r=X(t,`color`,19,()=>n.color??`currentColor`),i=X(t,`size`,19,()=>n.size??24),a=X(t,`width`,19,i),o=X(t,`height`,19,i),s=X(t,`strokeWidth`,19,()=>n.strokeWidth??2),c=X(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),l=X(t,`nonScalingStroke`,19,()=>n.nonScalingStroke??!1),u=X(t,`iconNode`,19,()=>[]),d=X(t,`icon`,19,()=>({node:u(),aliases:[],size:24})),p=Y(t,Xv),m=M(()=>!!t.children||qv(p)),h=M(()=>Kv(d(),{color:r(),width:a(),height:o(),strokeWidth:s(),absoluteStrokeWidth:c(),nonScalingStroke:l(),className:Wv(`lucide-icon`,n.class),hasA11yProp:B(m),attributes:p})),v=M(()=>_(B(h),3)),y=M(()=>B(v)[1]),b=M(()=>g(B(v)[2],()=>[],!0)),x=M(()=>({...B(y),class:[...B(y).class.split(` `),t.class]}));var S=Zv();sa(S,()=>({...B(x)}));var C=F(S);xi(C,17,()=>B(b),_i,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Oi(I(a),r,!0,(e,t)=>{sa(e,()=>({...i()}))}),W(e,a)}),q(R(C),()=>t.children??f),O(S),W(e,S),j()}var $v={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};$v.node;var ey=new Set([`$$slots`,`$$events`,`$$legacy`]);function ty(e,t){let n=Y(t,ey);Qv(e,Ta(()=>n,{get icon(){return $v}}))}var ny=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function ry(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ny);var i=U(),a=I(i);{let e=M(()=>Wl(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>E_,(t,i)=>{i(t,Ta({"data-slot":`select-scroll-down-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{ty(e,{})},$$slots:{default:!0}}))})}W(e,i),j()}var iy={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`}]]};iy.node;var ay=new Set([`$$slots`,`$$events`,`$$legacy`]);function oy(e,t){let n=Y(t,ay);Qv(e,Ta(()=>n,{get icon(){return iy}}))}var sy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function cy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,sy);var i=U(),a=I(i);{let e=M(()=>Wl(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>A_,(t,i)=>{i(t,Ta({"data-slot":`select-scroll-up-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{oy(e,{})},$$slots:{default:!0}}))})}W(e,i),j()}var ly=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`portalProps`,`children`,`preventScroll`]),uy=V(`<!> <!> <!>`,1);function dy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`sideOffset`,3,4),i=X(t,`preventScroll`,3,!0),a=Y(t,ly);Hv(e,Ta(()=>t.portalProps,{children:(e,o)=>{var s=U(),c=I(s);{let e=M(()=>Wl(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--bits-select-content-available-height) origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,t.class));J(c,()=>m_,(o,s)=>{s(o,Ta({get sideOffset(){return r()},get preventScroll(){return i()},"data-slot":`select-content`,get class(){return B(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=uy(),i=I(r);cy(i,{});var a=R(i,2);{let e=M(()=>Wl(`h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1`));J(a,()=>S_,(n,r)=>{r(n,{get class(){return B(e)},children:(e,n)=>{var r=U();q(I(r),()=>t.children??f),W(e,r)},$$slots:{default:!0}})})}ry(R(a,2),{}),W(e,r)},$$slots:{default:!0}}))})}W(e,s)},$$slots:{default:!0}})),j()}var fy={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};fy.node;var py=new Set([`$$slots`,`$$events`,`$$legacy`]);function my(e,t){let n=Y(t,py);Qv(e,Ta(()=>n,{get icon(){return fy}}))}var hy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`label`,`children`]),gy=V(`<span class="pointer-events-none absolute right-2 flex size-4 items-center justify-center"><!></span> <span class="flex flex-1 gap-2 shrink-0 whitespace-nowrap"><!></span>`,1);function _y(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,hy);var i=U(),a=I(i);{let e=(e,n)=>{let r=()=>(n?.()).selected,i=()=>(n?.()).highlighted;var a=gy(),o=I(a),s=F(o),c=e=>{my(e,{class:`pointer-events-none`})};K(s,e=>{r()&&e(c)}),O(o);var l=R(o,2),u=F(l),d=e=>{var n=U();q(I(n),()=>t.children,()=>({selected:r(),highlighted:i()})),W(e,n)},f=e=>{var n=H();z(()=>G(n,t.label||t.value)),W(e,n)};K(u,e=>{t.children?e(d):e(f,-1)}),O(l),W(e,a)},i=M(()=>Wl(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-highlighted:bg-accent data-highlighted:text-accent-foreground`,t.class));J(a,()=>y_,(a,o)=>{o(a,Ta({get value(){return t.value},get label(){return t.label},"data-slot":`select-item`,get class(){return B(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:e,$$slots:{default:!0}}))})}W(e,i),j()}var vy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),yy=V(`<!> <!>`,1);function by(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,vy);var a=U(),o=I(a);{let e=M(()=>Wl(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,t.class));J(o,()=>Y_,(a,o)=>{o(a,Ta({"data-slot":`select-trigger`,get"data-size"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=yy(),i=I(r);q(i,()=>t.children??f),ty(R(i,2),{class:`text-muted-foreground size-4 pointer-events-none`}),W(e,r)},$$slots:{default:!0}}))})}W(e,a),j()}var xy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function Sy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,xy);var i=U();J(I(i),()=>K_,(e,t)=>{t(e,Ta({"data-slot":`select-value`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),W(e,i),j()}var Cy=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`]);function wy(e,t){A(t,!0);let n=X(t,`open`,15,!1),r=X(t,`value`,15),i=Y(t,Cy);var a=U();J(I(a),()=>U_,(e,t)=>{t(e,Ta(()=>i,{get open(){return n()},set open(e){n(e)},get value(){return r()},set value(e){r(e)}}))}),W(e,a),j()}var Ty=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Ey=V(`<tbody><!></tbody>`);function Dy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Ty);var i=Ey();sa(i,e=>({"data-slot":`table-body`,class:e,...r}),[()=>Wl(`[&_tr:last-child]:border-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Oy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ky=V(`<td><!></td>`);function Ay(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Oy);var i=ky();sa(i,e=>({"data-slot":`table-cell`,class:e,...r}),[()=>Wl(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var jy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),My=V(`<th><!></th>`);function Ny(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,jy);var i=My();sa(i,e=>({"data-slot":`table-head`,class:e,...r}),[()=>Wl(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Py=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Fy=V(`<thead><!></thead>`);function Iy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Py);var i=Fy();sa(i,e=>({"data-slot":`table-header`,class:e,...r}),[()=>Wl(`[&_tr]:border-b`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Ly=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Ry=V(`<tr><!></tr>`);function zy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Ly);var i=Ry();sa(i,e=>({"data-slot":`table-row`,class:e,...r}),[()=>Wl(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var By=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Vy=V(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>`);function Hy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,By);var i=Vy(),a=F(i);sa(a,e=>({"data-slot":`table`,class:e,...r}),[()=>Wl(`w-full caption-bottom text-sm`,t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>n(e),()=>n()),O(i),W(e,i),j()}var Uy=V(` <button type="button" class="hover:text-destructive"><!></button>`,1),Wy=V(`<div class="flex flex-wrap items-center gap-2"><!> <!></div>`);function Gy(e,t){A(t,!0);let n=X(t,`value`,31,()=>ln([])),r=X(t,`numeric`,3,!1),i=N(``);function a(){let e=B(i).trim();e&&(r()&&!/^\d+$/.test(e)?P(i,``):(n().includes(e)||n([...n(),e]),P(i,``),t.onchange?.(n())))}function o(e){n(n().filter(t=>t!==e)),t.onchange?.(n())}function s(e){(e.key===`Enter`||e.key===`,`)&&(e.preventDefault(),a())}var c=Wy(),l=F(c);xi(l,16,n,e=>e,(e,t)=>{ql(e,{variant:`secondary`,class:`gap-1`,children:(e,n)=>{k();var r=Uy(),i=I(r),a=R(i);Ga(F(a),{class:`size-3`}),O(a),z(()=>{G(i,`${t??``} `),aa(a,`aria-label`,`删除 ${t}`)}),qr(`click`,a,()=>o(t)),W(e,r)},$$slots:{default:!0}})});var u=R(l,2);{let e=M(()=>r()?`numeric`:`text`);tu(u,{get id(){return t.id},class:`h-8 w-40`,get placeholder(){return t.placeholder},get inputmode(){return B(e)},onkeydown:s,onblur:a,get value(){return B(i)},set value(e){P(i,e,!0)}})}O(c),W(e,c),j()}Jr([`click`]);function Ky(e){return e==null?``:String(e)}function qy(e){return Array.isArray(e)?e.map(e=>String(e)):typeof e==`string`&&e.trim()?e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0):[]}var Jy=V(`<!> 新增聊天`,1),Yy=V(`<p> </p>`),Xy=V(`<li> </li>`),Zy=V(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),Qy=V(`<p class="text-muted-foreground text-sm">正在读取会话覆盖…</p>`),$y=V(`<p class="text-muted-foreground text-sm">还没有任何覆盖,全部按默认行为走。</p>`),eb=V(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),tb=V(`<!> 编辑`,1),nb=V(`<!> 删除`,1),rb=V(`<div class="flex items-center gap-1"><!> <!></div>`),ib=V(`<!> <!>`,1),ab=V(`<p class="text-destructive text-xs"> </p>`),ob=V(`<!> <!> <!>`,1),sb=V(`<div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs"> </p> <!></div>`),cb=V(`<!> 保存`,1),lb=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"></div> <div class="flex items-center gap-2"><!> <!></div></section>`),ub=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">聊天覆盖</h2> <!></section> <!>`,1),db=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!></div>`);function fb(e,t){A(t,!0);let n=[{path:`wake`,label:`唤醒方式`,hint:`all / mention / prefix / none`},{path:`wake.prefixes`,label:`唤醒前缀`,hint:`wake 为 prefix 时用,留空表示不覆盖`},{path:`proactive.enabled`,label:`主动说话`,hint:`留空表示跟随全局白名单`},{path:`proactive.startProbability`,label:`主动概率`,hint:`0 到 1 之间的数字`},{path:`collect.privateMs`,label:`私聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`collect.groupMs`,label:`群聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`agent`,label:`agent`,hint:`覆盖这个聊天用的 agent`},{path:`model`,label:`模型`,hint:`provider/model[/variant]`},{path:`soulPath`,label:`角色设定路径`,hint:`覆盖 soulPath`},{path:`soulName`,label:`角色设定文件名`,hint:`覆盖 soulName`}],r=[`all`,`mention`,`prefix`,`none`],i=`__empty__`,a=N(void 0),o=N(!0),s=N(!1),c=N(``),l=N(`ok`),u=N(ln([])),d=N(ln({})),f=N(void 0),p=N(``),m=N(ln({})),h=M(()=>B(a)?.value?.chats??{});Ea(()=>{g()});async function g(){P(o,!0);try{P(a,await Ja.chatOverrides(),!0),P(u,B(a).warnings??[],!0),P(c,``),P(l,`ok`)}catch(e){ne(e)}finally{P(o,!1)}}function v(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=`${t.providerID??``}/${t.id??``}`;return t.variant?`${n}/${t.variant}`:n}return``}function y(e){return(B(a)?.masked??[]).includes(e)}function b(e){let t=B(h)[e];P(f,e,!0),P(p,e,!0),P(m,{wake:t?.wake??``,"wake.prefixes":qy(t?.[`wake.prefixes`]),"proactive.enabled":t?.[`proactive.enabled`]===void 0?``:String(t[`proactive.enabled`]),"proactive.startProbability":t?.[`proactive.startProbability`]===void 0?``:String(t[`proactive.startProbability`]),"collect.privateMs":t?.[`collect.privateMs`]===void 0?``:String(t[`collect.privateMs`]),"collect.groupMs":t?.[`collect.groupMs`]===void 0?``:String(t[`collect.groupMs`]),agent:t?.agent??``,model:v(t?.model),soulPath:t?.soulPath??``,soulName:t?.soulName??``},!0);for(let t of n)y(`chats.${e}.${t.path}`)&&(B(m)[t.path]=``);P(d,{},!0),P(c,``)}function x(){P(f,``),P(p,``),P(m,{wake:``,"wake.prefixes":[],"proactive.enabled":``,"proactive.startProbability":``,"collect.privateMs":``,"collect.groupMs":``,agent:``,model:``,soulPath:``,soulName:``},!0),P(d,{},!0),P(c,``)}function S(){P(f,void 0),P(d,{},!0)}function C(e){let t=B(m)[e];if(e===`wake.prefixes`){let e=qy(t);return e.length>0?e:null}if(e===`proactive.enabled`)return t===`true`||t!==`false`&&null;if(e===`proactive.startProbability`||e===`collect.privateMs`||e===`collect.groupMs`){if(t===``||t==null)return null;let e=Number(t);return Number.isFinite(e)?e:String(t)}let n=String(t??``).trim();return n===``?null:n}async function w(){let e=B(p).trim();if(e===``){P(d,{key:`请填写聊天键`},!0),P(l,`error`),P(c,`聊天键不能为空`);return}let r=B(f)===``;if(r&&Object.hasOwn(B(h),e)){P(d,{key:`这个聊天已经有覆盖了,点「编辑」来改`},!0),P(l,`error`),P(c,`这个聊天已经有覆盖了,点「编辑」来改`);return}if(B(m).wake===`prefix`&&qy(B(m)[`wake.prefixes`]).length===0){P(d,{[`chats.${e}.wake.prefixes`]:`选择 prefix 唤醒时必须写至少一个前缀`},!0),P(l,`error`),P(c,`选择 prefix 唤醒时必须写至少一个前缀`);return}let i={};for(let t of n){if(y(`chats.${e}.${t.path}`)&&te(B(m)[t.path]))continue;let n=C(t.path);r&&n===null||(i[t.path]=n)}if(Object.keys(i).length===0)P(d,{key:`至少填写一项再保存`},!0),P(l,`error`),P(c,`至少填写一项再保存`);else{P(s,!0);try{let n=await Ja.saveChatOverrides({chats:{[e]:i}});P(a,n.document,!0),P(u,n.warnings??[],!0),P(f,void 0),P(d,{},!0),P(l,`ok`),P(c,n.restartRequired?n.note:`已保存。${n.note}`,!0),n.restartRequired&&t.onrestart?.([`chat-overrides:${e}`])}catch(e){ne(e)}finally{P(s,!1)}}}async function ee(e){P(s,!0);try{let t=await Ja.saveChatOverrides({chats:{[e]:null}});P(a,t.document,!0),P(u,t.warnings??[],!0),P(d,{},!0),P(l,`ok`),P(c,`已删除 ${e}。${t.note}`),B(f)===e&&P(f,void 0)}catch(e){ne(e)}finally{P(s,!1)}}function te(e){return e==null?!0:Array.isArray(e)?e.length===0:String(e).trim()===``}function ne(e){if(P(l,`error`),e instanceof Ka){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;P(d,t,!0),P(c,e.fields.map(e=>e.message).join(`;`),!0)}else P(c,e.message,!0)}else P(c,e instanceof Error?e.message:String(e),!0)}function re(e){return B(d)[e]??``}function ie(e){return e==null||e===``?`-`:Array.isArray(e)?e.length>0?e.join(` / `):`-`:String(e)}function ae(e){let t=[];return e[`collect.privateMs`]!==void 0&&t.push(`私 ${e[`collect.privateMs`]}ms`),e[`collect.groupMs`]!==void 0&&t.push(`群 ${e[`collect.groupMs`]}ms`),t.length>0?t.join(` / `):`-`}var oe=db(),se=F(oe),ce=F(se),le=L(ce,!0),ue=R(ce,2),T=e=>{ql(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`文件不存在,保存后新建`))},$$slots:{default:!0}})};K(ue,e=>{B(a)&&!B(a).exists&&e(T)});var de=R(ue,2),fe=F(de);Ql(fe,{variant:`ghost`,size:`sm`,onclick:()=>void g(),children:(e,t)=>{k(),W(e,H(`重新读取`))},$$slots:{default:!0}}),Ql(R(fe,2),{size:`sm`,onclick:x,children:(e,t)=>{var n=Jy();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(de),O(se);var pe=R(se,2),me=e=>{var t=Yy(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(c))}),W(e,t)};K(pe,e=>{B(c)&&e(me)});var he=R(pe,2),ge=e=>{var t=Zy();xi(t,21,()=>B(u),_i,(e,t)=>{var n=Xy(),r=L(n);z(()=>G(r,`· ${B(t)??``}`)),W(e,n)}),O(t),W(e,t)};K(he,e=>{B(u).length>0&&e(ge)});var _e=R(he,2),ve=e=>{W(e,Qy())},E=e=>{var t=ub(),a=I(t),o=R(F(a),2),c=e=>{W(e,$y())},l=M(()=>Object.keys(B(h)).length===0),u=e=>{var t=U();J(I(t),()=>Hy,(e,t)=>{t(e,{children:(e,t)=>{var n=ib(),r=I(n);J(r,()=>Iy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=eb(),r=I(n);J(r,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`唤醒`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`前缀`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`主动`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`概率`))},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`收集`))},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`agent`))},$$slots:{default:!0}})});var u=R(l,2);J(u,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`模型`))},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`角色设定`))},$$slots:{default:!0}})}),J(R(d,2),()=>Ny,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Dy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),17,()=>Object.entries(B(h)),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();J(I(a),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=eb(),a=I(n);J(a,()=>Ay,(e,t)=>{t(e,{class:`font-mono text-xs`,children:(e,t)=>{k();var n=H();z(()=>G(n,r())),W(e,n)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().wake)]),W(e,n)},$$slots:{default:!0}})});var c=R(o,2);J(c,()=>Ay,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i()[`wake.prefixes`])]),W(e,n)},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(()=>G(n,i()[`proactive.enabled`]===void 0?`默认`:i()[`proactive.enabled`]?`开`:`关`)),W(e,n)},$$slots:{default:!0}})});var u=R(l,2);J(u,()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i()[`proactive.startProbability`])]),W(e,n)},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>Ay,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ae(i())]),W(e,n)},$$slots:{default:!0}})});var f=R(d,2);J(f,()=>Ay,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().agent)]),W(e,n)},$$slots:{default:!0}})});var p=R(f,2);J(p,()=>Ay,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(v(i().model))]),W(e,n)},$$slots:{default:!0}})});var m=R(p,2);J(m,()=>Ay,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().soulPath??i().soulName)]),W(e,n)},$$slots:{default:!0}})}),J(R(m,2),()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{var n=rb(),i=F(n);Ql(i,{variant:`ghost`,size:`sm`,onclick:()=>b(r()),children:(e,t)=>{var n=tb();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(i,2),{variant:`ghost`,size:`sm`,get disabled(){return B(s)},onclick:()=>void ee(r()),children:(e,t)=>{var n=nb();Wa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(n),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,a)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(o,e=>{B(l)?e(c):e(u,-1)}),O(a);var d=R(a,2),g=e=>{var t=lb(),a=F(t),o=L(a,!0),c=R(a,2),l=F(c);kv(l,{for:`chat-key`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}});var u=R(l,2);{let e=M(()=>B(f)!==``);tu(u,{id:`chat-key`,get value(){return B(p)},get disabled(){return B(e)},placeholder:`group:100 或 private:200`,oninput:e=>P(p,e.currentTarget.value,!0)})}var d=R(u,2),h=e=>{var t=ab(),n=L(t,!0);z(e=>G(n,e),[()=>re(`chats`)||re(`chats.${B(p).trim()}`)]),W(e,t)},g=M(()=>re(`chats`)||re(`chats.${B(p).trim()}`));K(d,e=>{B(g)&&e(h)}),O(c);var _=R(c,2);xi(_,21,()=>n,e=>e.path,(e,t)=>{var n=sb(),a=F(n);{let e=M(()=>`chat-${B(t).path}`);kv(a,{get for(){return B(e)},class:`text-sm`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).label)),W(e,r)},$$slots:{default:!0}})}var o=R(a,2),s=e=>{var n=U(),a=I(n);{let e=M(()=>String(B(m)[B(t).path]??``)===``?i:String(B(m)[B(t).path]));J(a,()=>wy,(n,a)=>{a(n,{type:`single`,get value(){return B(e)},onValueChange:e=>B(m)[B(t).path]=e===i?``:e??``,children:(e,n)=>{var a=ib(),o=I(a);{let e=M(()=>`chat-${B(t).path}`);J(o,()=>by,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Sy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(o,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{var n=ib(),a=I(n);J(a,()=>_y,(e,t)=>{t(e,{value:i,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(a,2),16,()=>r,e=>e,(e,t)=>{var n=U();J(I(n),()=>_y,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,a)},$$slots:{default:!0}})})}W(e,n)},c=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>qy(B(m)[B(t).path]));Gy(e,{get id(){return B(n)},get value(){return B(r)},placeholder:`输入前缀后回车`,onchange:e=>B(m)[B(t).path]=e})}},l=e=>{var n=U(),r=I(n);{let e=M(()=>String(B(m)[B(t).path]??``)===``?i:String(B(m)[B(t).path]));J(r,()=>wy,(n,r)=>{r(n,{type:`single`,get value(){return B(e)},onValueChange:e=>B(m)[B(t).path]=e===i?``:e??``,children:(e,n)=>{var r=ib(),a=I(r);{let e=M(()=>`chat-${B(t).path}`);J(a,()=>by,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Sy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(a,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{var n=ob(),r=I(n);J(r,()=>_y,(e,t)=>{t(e,{value:i,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})});var a=R(r,2);J(a,()=>_y,(e,t)=>{t(e,{value:`true`,children:(e,t)=>{k(),W(e,H(`允许`))},$$slots:{default:!0}})}),J(R(a,2),()=>_y,(e,t)=>{t(e,{value:`false`,children:(e,t)=>{k(),W(e,H(`不允许`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})})}W(e,n)},u=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``));tu(e,{get id(){return B(n)},type:`number`,min:`0`,max:`1`,step:`0.05`,get value(){return B(r)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}},d=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``));tu(e,{get id(){return B(n)},type:`number`,min:`0`,step:`100`,get value(){return B(r)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}},f=M(()=>B(t).path.startsWith(`collect.`)),h=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``)),i=M(()=>y(`chats.${B(p).trim()}.${B(t).path}`)?`已隐藏,留空表示不修改`:`留空表示不覆盖`);tu(e,{get id(){return B(n)},type:`text`,get value(){return B(r)},get placeholder(){return B(i)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}};K(o,e=>{B(t).path===`wake`?e(s):B(t).path===`wake.prefixes`?e(c,1):B(t).path===`proactive.enabled`?e(l,2):B(t).path===`proactive.startProbability`?e(u,3):B(f)?e(d,4):e(h,-1)});var g=R(o,2),_=L(g,!0),v=R(g,2),b=e=>{var n=ab(),r=L(n,!0);z(e=>G(r,e),[()=>re(`chats.${B(p).trim()}.${B(t).path}`)]),W(e,n)},x=M(()=>re(`chats.${B(p).trim()}.${B(t).path}`));K(v,e=>{B(x)&&e(b)}),O(n),z(()=>G(_,B(t).hint)),W(e,n)}),O(_);var v=R(_,2),b=F(v);Ql(b,{size:`sm`,get disabled(){return B(s)},onclick:()=>void w(),children:(e,t)=>{var n=cb();Ha(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(b,2),{variant:`ghost`,size:`sm`,onclick:S,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(v),O(t),z(()=>G(o,B(f)===``?`新增聊天覆盖`:`编辑 ${B(f)}`)),W(e,t)};K(d,e=>{B(f)!==void 0&&e(g)}),W(e,t)};K(_e,e=>{B(o)?e(ve):e(E,-1)}),O(oe),z(()=>G(le,B(a)?.path??`-`)),W(e,oe),j()}var pb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`,`size`]);function mb(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`checked`,15,!1),i=X(t,`size`,3,`default`),a=Y(t,pb);var o=U(),s=I(o);{let e=M(()=>Wl(`data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,t.class));J(s,()=>av,(t,o)=>{o(t,Ta({"data-slot":`switch`,get"data-size"(){return i()},get class(){return B(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=U(),r=I(n);{let e=M(()=>Wl(`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`,`rtl:data-[state=checked]:translate-x-[calc(-100%)]`));J(r,()=>cv,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return B(e)}})})}W(e,n)},$$slots:{default:!0}}))})}W(e,o),j()}var hb=V(`<!> 还原`,1),gb=V(`<!> 保存`,1),_b=V(`<p> </p>`),vb=V(`<p class="text-muted-foreground text-sm">正在读取配置…</p>`),yb=V(`<p class="text-muted-foreground text-sm">字段元数据加载失败。</p>`),bb=V(`<button type="button" class="text-muted-foreground hover:text-foreground ml-auto text-xs">还原</button>`),xb=V(`<div class="flex h-9 items-center"><!></div>`),Sb=V(`<!> <!>`,1),Cb=V(`<p class="text-muted-foreground text-xs"> </p>`),wb=V(`<p class="text-destructive text-xs"> </p>`),Tb=V(`<div class="space-y-1.5"><div class="flex items-center gap-2"><!> <!> <!> <!></div> <!> <!> <!> <p class="text-muted-foreground font-mono text-[11px]"> </p></div>`),Eb=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="grid gap-4 md:grid-cols-2"></div></section>`),Db=V(`<p class="text-muted-foreground text-sm">没有匹配的字段。</p>`),Ob=V(`<!> <!> <!>`,1),kb=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"><!></span> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!></div>`);function Ab(e,t){A(t,!0);let n=N(void 0),r=N(ln([])),i=N(ln({})),a=N(ln({})),o=N(ln([])),s=N(ln({})),c=N(``),l=N(`ok`),u=N(!1),d=N(!0),f=N(``),p=N(``),m=N(ln({})),h,g=M(()=>new Map((B(n)?.fields??[]).map(e=>[e.path,e]))),_=M(()=>(B(n)?.groups??[]).map(e=>({...e,fields:(B(n)?.fields??[]).filter(t=>t.group===e.id&&(B(f).trim()===``||t.path.includes(B(f).trim())||t.label.includes(B(f).trim())||(t.description??``).includes(B(f).trim())))})));Ea(()=>{v()}),jn(()=>{let e=t.config;e&&e!==h&&(B(o).length>0||(h=e,y(e.fields)))});async function v(){P(d,!0);try{let[e,t]=await Promise.all([Ja.schema(),Ja.config()]);P(n,e,!0),y(t.fields);try{P(r,(await Ja.models()).models,!0)}catch(e){P(p,e instanceof Error?e.message:String(e),!0)}}catch(e){te(e)}finally{P(d,!1)}}function y(e){let t={},n={};for(let r of e){let e=B(g).get(r.path);e&&(t[r.path]=e.secret?``:r.value,e.secret&&(n[r.path]=r.hasValue===!0))}P(i,t,!0),P(a,{...t},!0),P(m,n,!0),P(o,[],!0),P(s,{},!0)}function b(e,t){B(i)[e.path]=t,delete B(s)[e.path],B(o).includes(e.path)||P(o,[...B(o),e.path],!0),P(c,``)}function x(e){B(i)[e]=B(a)[e],P(o,B(o).filter(t=>t!==e),!0),delete B(s)[e]}function S(){P(i,{...B(a)},!0),P(o,[],!0),P(s,{},!0),P(c,``)}function C(e){return B(o).includes(e)}function w(e,t){switch(e.type){case`number`:{if(t===``||t==null)return null;let e=typeof t==`number`?t:Number(t);return Number.isFinite(e)?e:null}case`numberList`:return qy(t).map(e=>Number(e)).filter(e=>Number.isFinite(e));case`stringList`:case`enum`:return Array.isArray(t)?t:String(t??``);case`modelRef`:case`text`:case`path`:case`clock`:return typeof t==`string`&&t.trim()!==``?t.trim():null;case`secret`:return typeof t==`string`&&t!==``?t:void 0;default:return t}}async function ee(){if(B(o).length===0){P(c,`没有需要保存的改动`),P(l,`ok`);return}let e={};for(let t of B(o)){let n=B(g).get(t);if(!n)continue;let r=w(n,B(i)[t]);r!==void 0&&(e[t]=r)}if(Object.keys(e).length===0)P(c,`没有需要保存的改动`),P(l,`ok`);else{P(u,!0);try{let n=await Ja.save(e);y(n.fields),n.restartRequired.length>0?(P(c,`已保存;以下字段需要重启插件后生效:${n.restartRequired.join(`、`)}`),t.onrestart?.(n.restartRequired)):P(c,`已保存并立即生效`),P(l,`ok`)}catch(e){if(e instanceof Ka){if(P(c,e.message,!0),e.fields.length>0){let t={...B(s)};for(let n of e.fields)t[n.path]=n.message;P(s,t,!0),P(c,e.fields.map(e=>e.message).join(`;`),!0)}}else P(c,e instanceof Error?e.message:String(e),!0);P(l,`error`)}finally{P(u,!1)}}}function te(e){P(c,e instanceof Error?e.message:String(e),!0),P(l,`error`)}function ne(e){if(e.type===`modelRef`){let t=B(r).map(e=>`${e.providerID}/${e.id}`),n=String(B(i)[e.path]??``);return n&&!t.includes(n)?[n,...t]:t}return e.options??[]}let re=`__empty__`;var ie=kb(),ae=F(ie),oe=F(ae),se=F(oe);Ua(se,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),tu(R(se,2),{class:`w-64 pl-8`,placeholder:`搜索字段名或说明`,get value(){return B(f)},set value(e){P(f,e,!0)}}),O(oe);var ce=R(oe,2),le=F(ce),ue=e=>{var t=H();z(()=>G(t,`${B(o).length??``} 项待保存`)),W(e,t)},T=e=>{W(e,H(`全部为已保存的值`))};K(le,e=>{B(o).length>0?e(ue):e(T,-1)}),O(ce);var de=R(ce,2),fe=F(de);{let e=M(()=>B(o).length===0);Ql(fe,{variant:`ghost`,size:`sm`,get disabled(){return B(e)},onclick:S,children:(e,t)=>{var n=hb();Va(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}var pe=R(fe,2);{let e=M(()=>B(u)||B(o).length===0);Ql(pe,{size:`sm`,get disabled(){return B(e)},onclick:()=>void ee().catch(te),children:(e,t)=>{var n=gb();Ha(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(de),O(ae);var me=R(ae,2),he=e=>{var t=_b(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(c))}),W(e,t)};K(me,e=>{B(c)&&e(he)});var ge=R(me,2),_e=e=>{W(e,vb())},ve=e=>{W(e,yb())},E=e=>{var t=Ob(),n=I(t);xi(n,17,()=>B(_),e=>e.id,(e,t)=>{var n=U(),r=I(n),a=e=>{var n=Eb(),r=F(n),a=L(r,!0),o=R(r,2);xi(o,21,()=>B(t).fields,e=>e.path,(e,t)=>{var n=Tb(),r=F(n),a=F(r);{let e=M(()=>`field-${B(t).path}`);kv(a,{get for(){return B(e)},class:`text-sm`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).label)),W(e,r)},$$slots:{default:!0}})}var o=R(a,2),c=e=>{ql(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`待保存`))},$$slots:{default:!0}})},l=M(()=>C(B(t).path));K(o,e=>{B(l)&&e(c)});var u=R(o,2),d=e=>{ql(e,{variant:`secondary`,children:(e,t)=>{k(),W(e,H(`需重启`))},$$slots:{default:!0}})};K(u,e=>{B(t).hot||e(d)});var f=R(u,2),p=e=>{var n=bb();qr(`click`,n,()=>x(B(t).path)),W(e,n)},h=M(()=>C(B(t).path));K(f,e=>{B(h)&&e(p)}),O(r);var g=R(r,2),_=e=>{var n=xb(),r=F(n);{let e=M(()=>`field-${B(t).path}`),n=M(()=>B(i)[B(t).path]===!0);mb(r,{get id(){return B(e)},get checked(){return B(n)},onCheckedChange:e=>b(B(t),e)})}O(n),W(e,n)},v=e=>{let n=M(()=>ne(B(t)));var r=U(),a=I(r);{let e=M(()=>String(B(i)[B(t).path]??``)||re);J(a,()=>wy,(r,i)=>{i(r,{type:`single`,get value(){return B(e)},onValueChange:e=>b(B(t),e===re?``:e??``),children:(e,r)=>{var i=Sb(),a=I(i);{let e=M(()=>`field-${B(t).path}`);J(a,()=>by,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Sy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(a,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{var r=Sb(),i=I(r);J(i,()=>_y,(e,t)=>{t(e,{value:re,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(i,2),16,()=>B(n),e=>e,(e,t)=>{var n=U();J(I(n),()=>_y,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})})}W(e,r)},y=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``)),a=M(()=>B(m)[B(t).path]?`已设置;留空表示不修改`:`未设置;留空表示不修改`);tu(e,{get id(){return B(n)},type:`password`,get value(){return B(r)},get placeholder(){return B(a)},oninput:e=>b(B(t),e.currentTarget.value)})}},S=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>Ky(B(i)[B(t).path])),a=M(()=>B(t).step??1);tu(e,{get id(){return B(n)},type:`number`,get value(){return B(r)},get min(){return B(t).min},get max(){return B(t).max},get step(){return B(a)},oninput:e=>{let n=e.currentTarget.value;b(B(t),n===``?``:Number(n))}})}},w=e=>{{let n=M(()=>qy(B(i)[B(t).path])),r=M(()=>B(t).type===`numberList`),a=M(()=>B(t).type===`numberList`?`输入数字后回车`:`输入后回车`);Gy(e,{get value(){return B(n)},get numeric(){return B(r)},get placeholder(){return B(a)},onchange:e=>b(B(t),e)})}},ee=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``));tu(e,{get id(){return B(n)},type:`time`,get value(){return B(r)},oninput:e=>b(B(t),e.currentTarget.value)})}},te=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``)),a=M(()=>B(t).type===`path`?`留空使用默认路径`:`留空使用默认值`);tu(e,{get id(){return B(n)},type:`text`,get value(){return B(r)},get placeholder(){return B(a)},oninput:e=>b(B(t),e.currentTarget.value)})}};K(g,e=>{B(t).type===`boolean`?e(_):B(t).type===`enum`||B(t).type===`modelRef`?e(v,1):B(t).type===`secret`?e(y,2):B(t).type===`number`?e(S,3):B(t).type===`numberList`||B(t).type===`stringList`?e(w,4):B(t).type===`clock`?e(ee,5):e(te,-1)});var ie=R(g,2),ae=e=>{var n=Cb(),r=L(n,!0);z(()=>G(r,B(t).description)),W(e,n)};K(ie,e=>{B(t).description&&e(ae)});var oe=R(ie,2),se=e=>{var n=wb(),r=L(n,!0);z(()=>G(r,B(s)[B(t).path])),W(e,n)};K(oe,e=>{B(s)[B(t).path]&&e(se)});var ce=L(R(oe,2),!0);O(n),z(()=>G(ce,B(t).path)),W(e,n)}),O(o),O(n),z(()=>G(a,B(t).label)),W(e,n)};K(r,e=>{B(t).fields.length>0&&e(a)}),W(e,n)});var r=R(n,2),a=e=>{var t=Cb(),n=L(t);z(()=>G(n,`模型列表读取失败:${B(p)??``}`)),W(e,t)};K(r,e=>{B(p)&&e(a)});var o=R(r,2),c=e=>{W(e,Db())},l=M(()=>B(f).trim()&&B(_).every(e=>e.fields.length===0));K(o,e=>{B(l)&&e(c)}),W(e,t)};K(ge,e=>{B(d)?e(_e):B(n)?e(E,-1):e(ve,1)}),O(ie),W(e,ie),j()}Jr([`click`]);var jb=new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`medium`}),Mb=new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`}),Nb=new Intl.NumberFormat(`zh-CN`);function Pb(e){return e===void 0||!Number.isFinite(e)?`-`:jb.format(e)}function Fb(e){return e===void 0||!Number.isFinite(e)?`-`:Mb.format(e)}function Ib(e){if(e===void 0||!Number.isFinite(e)||e<0)return`-`;let t=Math.floor(e/1e3);if(t<60)return`${t} 秒`;let n=Math.floor(t/60);if(n<60)return`${n} 分 ${t%60} 秒`;let r=Math.floor(n/60);return r<24?`${r} 小时 ${n%60} 分`:`${Math.floor(r/24)} 天 ${r%24} 小时`}function Lb(e){return e===void 0||!Number.isFinite(e)?`-`:Nb.format(e)}function Rb(e){return e==null?`不限`:Lb(e)}function zb(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var Bb=V(`<option> </option>`),Vb=V(`<!> 继续`,1),Hb=V(`<!> 暂停`,1),Ub=V(`<!> 清空`,1),Wb=V(`<!> 重新读取`,1),Gb=V(`<p class="text-destructive text-sm"> </p>`),Kb=V(`<span class="text-muted-foreground break-all"> </span>`),qb=V(`<div class="hover:bg-muted flex gap-2 rounded px-1 py-0.5"><span class="text-muted-foreground shrink-0"> </span> <span> </span> <span class="break-all whitespace-pre-wrap"> </span> <!></div>`),Jb=V(`<p class="text-muted-foreground p-4 text-sm">没有日志。</p>`),Yb=V(`<div class="flex flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><select class="border-input bg-transparent h-9 rounded-md border px-2 text-sm shadow-xs"><option>全部级别</option><!></select> <div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!> <!> <!></div></div> <!> <div class="bg-muted/40 h-[65vh] overflow-auto rounded-lg border p-2 font-mono text-xs"></div> <div class="text-muted-foreground flex items-center gap-2 text-xs"><!> <span></span></div></div>`);function Xb(e,t){A(t,!0);let n=X(t,`logs`,19,()=>[]),r=[`debug`,`info`,`warn`,`error`],i=2e3,a=N(ln([])),o=N(`all`),s=N(``),c=N(!0),l=N(!1),u=N(!1),d=N(``),f,p=new Set;function m(e){return`${e.time}|${e.level}|${e.message}`}function h(e){let t=[...B(a)];for(let n of e){let e=m(n);p.has(e)||(p.add(e),t.push(n))}if(t.length>i){let e=t.splice(0,t.length-i);for(let t of e)p.delete(m(t))}P(a,t,!0)}async function g(){P(u,!0),P(d,``);try{let e=await Ja.logs({limit:500});p=new Set,P(a,[],!0),h(e.entries)}catch(e){P(d,e instanceof Error?e.message:String(e),!0)}finally{P(u,!1)}}Ea(()=>{g()}),jn(()=>{let e=n();e.length===0||B(l)||h(e)}),jn(()=>{B(a).length,B(c)&&f&&(f.scrollTop=f.scrollHeight)});let _=M(()=>B(a).filter(e=>{if(B(o)!==`all`&&e.level!==B(o))return!1;let t=B(s).trim();return!t||e.message.includes(t)||zb(e.meta).includes(t)}));function v(){P(a,[],!0),p=new Set}function y(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-amber-600`;case`debug`:return`text-muted-foreground`;default:return`text-sky-600`}}var b=Yb(),x=F(b),S=F(x),C=F(S);C.value=C.__value=`all`,xi(R(C),16,()=>r,e=>e,(e,t)=>{var n=Bb(),r=L(n,!0),i={};z(()=>{G(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),W(e,n)}),O(S),Gi(S);var w=R(S,2),ee=F(w);Ua(ee,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),tu(R(ee,2),{class:`w-56 pl-8`,placeholder:`搜索日志内容`,get value(){return B(s)},set value(e){P(s,e,!0)}}),O(w);var te=R(w,2),ne=L(te),re=R(te,2),ie=F(re);Ql(ie,{variant:`ghost`,size:`sm`,onclick:()=>P(l,!B(l)),children:(e,t)=>{var n=U(),r=I(n),i=e=>{var t=Vb();Ra(I(t),{class:`size-4`}),k(),W(e,t)},a=e=>{var t=Hb();Ia(I(t),{class:`size-4`}),k(),W(e,t)};K(r,e=>{B(l)?e(i):e(a,-1)}),W(e,n)},$$slots:{default:!0}});var ae=R(ie,2);Ql(ae,{variant:`ghost`,size:`sm`,onclick:()=>P(c,!B(c)),get"aria-pressed"(){return B(c)},children:(e,t)=>{k();var n=H();z(()=>G(n,B(c)?`自动滚动:开`:`自动滚动:关`)),W(e,n)},$$slots:{default:!0}});var oe=R(ae,2);Ql(oe,{variant:`ghost`,size:`sm`,onclick:v,children:(e,t)=>{var n=Ub();Pa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(oe,2),{variant:`ghost`,size:`sm`,get disabled(){return B(u)},onclick:()=>void g(),children:(e,t)=>{var n=Wb();Ba(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(re),O(x);var se=R(x,2),ce=e=>{var t=Gb(),n=L(t,!0);z(()=>G(n,B(d))),W(e,t)};K(se,e=>{B(d)&&e(ce)});var le=R(se,2);xi(le,23,()=>B(_),(e,t)=>m(e)+t,(e,t)=>{var n=qb(),r=F(n),i=L(r,!0),a=R(r,2),o=L(a,!0),s=R(a,2),c=L(s,!0),l=R(s,2),u=e=>{var n=Kb(),r=L(n,!0);z(e=>G(r,e),[()=>zb(B(t).meta)]),W(e,n)};K(l,e=>{B(t).meta.length>0&&e(u)}),O(n),z((e,n)=>{G(i,e),Ri(a,1,`${n??``} w-10 shrink-0 uppercase`),G(o,B(t).level),G(c,B(t).message)},[()=>Fb(Date.parse(B(t).time)),()=>y(B(t).level)]),W(e,n)},e=>{W(e,Jb())}),O(le),ga(le,e=>f=e,()=>f);var ue=R(le,2),T=F(ue);ql(T,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`环形缓冲`))},$$slots:{default:!0}});var de=R(T,2);de.textContent=`面板只保留最近 2000 条;完整日志在日志目录里。`,O(ue),O(b),z(()=>G(ne,`${B(_).length??``} / ${B(a).length??``} 条`)),Ki(S,()=>B(o),e=>P(o,e)),W(e,b),j()}var Zb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Qb=V(`<div><!></div>`);function $b(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Zb);var i=Qb();sa(i,e=>({"data-slot":`card-content`,class:e,...r}),[()=>Wl(`flex flex-col gap-3 px-(--card-spacing)`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var ex=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),tx=V(`<p><!></p>`);function nx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ex);var i=tx();sa(i,e=>({"data-slot":`card-description`,class:e,...r}),[()=>Wl(`text-muted-foreground text-sm`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var rx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ix=V(`<div><!></div>`);function ax(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,rx);var i=ix();sa(i,e=>({"data-slot":`card-header`,class:e,...r}),[()=>Wl(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var ox=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),sx=V(`<div><!></div>`);function cx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ox);var i=sx();sa(i,e=>({"data-slot":`card-title`,class:e,...r}),[()=>Wl(`text-base leading-normal font-medium group-data-[size=sm]/card:text-sm`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var lx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),ux=V(`<div><!></div>`);function dx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,lx);var a=ux();sa(a,e=>({"data-slot":`card`,"data-size":r(),class:e,...i}),[()=>Wl(`ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>n(e),()=>n()),W(e,a),j()}var fx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`max`,`value`]),px=V(`<div data-slot="progress-indicator" class="bg-primary size-full flex-1 transition-all"></div>`);function mx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`max`,3,100),i=Y(t,fx);var a=U(),o=I(a);{let e=M(()=>Wl(`bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class));J(o,()=>V_,(a,o)=>{o(a,Ta({"data-slot":`progress`,get class(){return B(e)},get value(){return t.value},get max(){return r()}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=px();z(()=>Bi(i,`transform: translateX(-${100-100*(t.value??0)/(r()??1)}%)`)),W(e,i)},$$slots:{default:!0}}))})}W(e,a),j()}var hx=V(`<p class="text-muted-foreground p-4 text-sm">正在读取运行状态…</p>`),gx=V(`<!> <!>`,1),_x=V(`<div class="flex items-center gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">机器人</span> <span class="font-mono"> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">重连次数</span> <span> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">上次重连</span> <span> </span></div>`,1),vx=V(`<div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">版本</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">已运行</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">工作目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">日志目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">agent</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">模型</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">面板</span> <span class="font-mono"> </span></div>`,1),yx=V(`<p class="text-muted-foreground text-sm">还没有任何会话。</p>`),bx=V(`<!> <!> <!> <!> <!> <!>`,1),xx=V(`<p class="text-muted-foreground text-sm">限流模块未启用或还没有记录。</p>`),Sx=V(`<div class="space-y-1"><div class="flex items-center justify-between text-xs"><span class="font-mono"> </span> <span class="text-muted-foreground"> </span></div> <!> <div class="text-muted-foreground flex justify-between text-[11px]"><span> </span> <span> </span></div></div>`),Cx=V(`<div class="flex gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">总结时间</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次总结</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次结果</span> <span> </span></div>`,1),wx=V(`<span class="text-muted-foreground">-</span>`),Tx=V(`<div class="flex items-center justify-between rounded border px-2 py-1"><span class="font-mono text-xs"> </span> <!></div>`),Ex=V(`<div class="grid gap-1 sm:grid-cols-2"></div>`),Dx=V(`<p class="text-muted-foreground text-xs">没有按聊天的策略覆盖。</p>`),Ox=V(`<div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground">默认配置档</span> <!> <span class="text-muted-foreground ml-4">可用配置档</span> <!></div> <!>`,1),kx=V(`<div class="grid gap-4 lg:grid-cols-2"><!> <!> <!> <!> <!> <!></div> <p class="text-muted-foreground mt-2 text-xs"> </p>`,1);function Ax(e,t){A(t,!0);function n(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}var r=U(),i=I(r),a=e=>{W(e,hx())},o=e=>{var r=kx(),i=I(r),a=F(i);J(a,()=>dx,(e,n)=>{n(e,{children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`连接`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`NapCat / NapLink WebSocket`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=_x(),i=I(r),a=R(F(i),2);{let e=M(()=>t.status.connection.connected?`default`:`destructive`);ql(a,{get variant(){return B(e)},children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.connection.connected?`已连接`:`未连接`)),W(e,r)},$$slots:{default:!0}})}O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u),z((e,n)=>{G(s,t.status.connection.selfId??`-`),G(l,e),G(d,n)},[()=>Lb(t.status.connection.reconnects),()=>Pb(t.status.connection.lastReconnectAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>dx,(e,n)=>{n(e,{children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`运行时`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`工作目录、模型与面板`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=vx(),i=I(r),a=L(R(F(i),2));O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u);var f=R(u,2),p=L(R(F(f),2),!0);O(f);var m=R(f,2),h=L(R(F(m),2),!0);O(m);var g=R(m,2),_=L(R(F(g),2));O(g),z(e=>{G(a,`v${t.status.version??``}`),G(s,e),G(l,t.status.runtime.home),G(d,t.status.runtime.logDir),G(p,t.status.runtime.agent??`-`),G(h,t.status.runtime.model??`跟随默认`),G(_,`${t.status.runtime.panel.enabled?`已启用`:`已关闭`}
7
- · ${t.status.runtime.panel.host??``}:${t.status.runtime.panel.port??``}`)},[()=>Ib(t.status.uptimeMs)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>dx,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`会话`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`每个聊天目标的上游会话与消息缓存`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=I(r),a=e=>{W(e,yx())},o=e=>{var n=U();J(I(n),()=>Hy,(e,n)=>{n(e,{children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>Iy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=bx(),r=I(n);J(r,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`目标`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`会话`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`状态`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`缓存`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`唤醒`))},$$slots:{default:!0}})}),J(R(s,2),()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`主动`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>Dy,(e,n)=>{n(e,{children:(e,n)=>{var r=U();xi(I(r),17,()=>t.status.sessions,e=>e.target,(e,t)=>{var n=U();J(I(n),()=>zy,(e,n)=>{n(e,{children:(e,n)=>{var r=bx(),i=I(r);J(i,()=>Ay,(e,n)=>{n(e,{class:`font-mono`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).target)),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ay,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).sessionID??`-`)),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=I(r),a=e=>{ql(e,{children:(e,t)=>{k(),W(e,H(`处理中`))},$$slots:{default:!0}})},o=e=>{ql(e,{variant:`secondary`,children:(e,t)=>{k(),W(e,H(`等待重试`))},$$slots:{default:!0}})},s=e=>{ql(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`空闲`))},$$slots:{default:!0}})};K(i,e=>{B(t).busy?e(a):B(t).pending?e(o,1):e(s,-1)}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>Lb(B(t).buffered)]),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).wake??`默认`)),W(e,r)},$$slots:{default:!0}})}),J(R(c,2),()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).proactive===void 0?`默认`:B(t).proactive?`开`:`关`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)};K(i,e=>{t.status.sessions.length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>dx,(e,r)=>{r(e,{children:(e,r)=>{var i=gx(),a=I(i);J(a,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`出站限流`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`按聊天目标统计的分钟与小时用量`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(a,2),()=>$b,(e,r)=>{r(e,{class:`space-y-3`,children:(e,r)=>{var i=U(),a=I(i),o=e=>{W(e,xx())},s=e=>{var r=U();xi(I(r),17,()=>t.status.rateLimit,e=>e.scope,(e,t)=>{var r=Sx(),i=F(r),a=F(i),o=L(a,!0),s=L(R(a,2));O(i);var c=R(i,2);{let e=M(()=>n(B(t).usedPerMinute,B(t).maxPerMinute));mx(c,{get value(){return B(e)}})}var l=R(c,2),u=F(l),d=L(u),f=L(R(u,2));O(l),O(r),z((e,n,r,i,a,c)=>{G(o,B(t).scope),G(s,`${e??``}/${n??``} 每分钟 ·
8
- ${r??``}/${i??``} 每小时`),G(d,`分钟剩余 ${a??``}`),G(f,`小时剩余 ${c??``}`)},[()=>Lb(B(t).usedPerMinute),()=>Rb(B(t).maxPerMinute),()=>Lb(B(t).usedPerHour),()=>Rb(B(t).maxPerHour),()=>Rb(B(t).minuteLeft),()=>Rb(B(t).hourLeft)]),W(e,r)}),W(e,r)};K(a,e=>{t.status.rateLimit.length===0?e(o):e(s,-1)}),W(e,i)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>dx,(e,n)=>{n(e,{children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`日记调度`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`每日总结的生成时间与结果`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=Cx(),i=I(r),a=R(F(i),2);{let e=M(()=>t.status.diary.enabled?`default`:`outline`);ql(a,{get variant(){return B(e)},children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.diary.enabled?`已启用`:`已关闭`)),W(e,r)},$$slots:{default:!0}})}O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u);var f=R(u,2),p=L(R(F(f),2),!0);O(f);var m=R(f,2),h=L(R(F(m),2),!0);O(m),z((e,n,r)=>{G(s,t.status.diary.summaryTime),G(l,e),G(d,n),G(p,r),G(h,t.status.diary.lastResult??`-`)},[()=>Pb(t.status.diary.nextSummaryAt),()=>Pb(t.status.diary.nextRunAt),()=>Pb(t.status.diary.lastRunAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(l,2),()=>dx,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=gx(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var n=gx(),r=I(n);J(r,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`工具策略`))},$$slots:{default:!0}})}),J(R(r,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`默认配置档与按聊天的覆盖`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,n)=>{n(e,{class:`space-y-3 text-sm`,children:(e,n)=>{var r=Ox(),i=I(r),a=R(F(i),2);ql(a,{variant:`secondary`,children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.policy.defaultProfile)),W(e,r)},$$slots:{default:!0}}),xi(R(a,4),16,()=>t.status.policy.profiles,e=>e,(e,t)=>{ql(e,{variant:`outline`,children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})},e=>{W(e,wx())}),O(i);var o=R(i,2),s=e=>{var n=Ex();xi(n,21,()=>Object.entries(t.status.policy.chats),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=Tx(),o=F(a),s=L(o,!0);ql(R(o,2),{variant:`outline`,children:(e,t)=>{k();var n=H();z(()=>G(n,i())),W(e,n)},$$slots:{default:!0}}),O(a),z(()=>G(s,r())),W(e,a)}),O(n),W(e,n)},c=M(()=>Object.keys(t.status.policy.chats).length>0),l=e=>{W(e,Dx())};K(o,e=>{B(c)?e(s):e(l,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),O(i);var u=L(R(i,2));z((e,t)=>G(u,`启动于 ${e??``} · 快照时间 ${t??``}`),[()=>Fb(t.status.startedAt),()=>Fb(Date.now())]),W(e,r)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),j()}var jx=V(`<!> 新增配置档`,1),Mx=V(`<p> </p>`),Nx=V(`<li> </li>`),Px=V(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),Fx=V(`<p class="text-muted-foreground text-sm">正在读取工具配置…</p>`),Ix=V(`<!> <!>`,1),Lx=V(`<p class="text-destructive text-xs"> </p>`),Rx=V(`<p class="text-muted-foreground text-sm">还没有任何配置档。</p>`),zx=V(`<!> <!> <!> <!>`,1),Bx=V(` <!>`,1),Vx=V(`<!> 编辑`,1),Hx=V(`<!> 删除`,1),Ux=V(`<div class="flex items-center gap-1"><!> <!></div>`),Wx=V(`<!> 保存`,1),Gx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"><div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">命中的工具才可用;写 <code>*</code> 表示全部。</p> <!></div> <div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">deny 优先于 allow。</p> <!></div></div> <div class="flex items-center gap-2"><!> <!></div></section>`),Kx=V(`<!> 新增映射`,1),qx=V(`<p class="text-muted-foreground text-sm">没有按聊天的映射,全部用默认配置档。</p>`),Jx=V(`<!> <!> <!>`,1),Yx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="grid gap-4 md:grid-cols-2"><div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">只能是 group:群号 或 private:账号。</p> <!></div> <div class="space-y-1.5"><!> <!> <!></div></div> <div class="flex items-center gap-2"><!> <!></div></section>`),Xx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">默认配置档</h2> <div class="flex flex-wrap items-center gap-2"><!> <span class="text-muted-foreground text-xs">没有按聊天指定的配置档时用这一档;「跟随默认」表示用内置默认档。</span></div> <!></section> <section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">配置档</h2> <!></section> <!> <section class="space-y-3 rounded-lg border p-4"><div class="flex items-center gap-2"><h2 class="text-sm font-semibold">聊天映射</h2> <!></div> <!></section> <!>`,1),Zx=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!></div>`);function Qx(e,t){A(t,!0);let n=N(void 0),r=N(!0),i=N(!1),a=N(``),o=N(`ok`),s=N(ln([])),c=N(ln({})),l=N(void 0),u=N(``),d=N(ln([])),f=N(ln([])),p=N(void 0),m=N(``),h=N(``),g=M(()=>B(n)?.value??void 0),v=M(()=>B(n)?.fileValue?.profiles??{}),y=M(()=>B(n)?.fileValue?.defaultProfile??``),b=M(()=>Object.keys(B(g)?.profiles??{})),x=`__empty__`;Ea(()=>{S()});async function S(){P(r,!0);try{P(n,await Ja.toolProfiles(),!0),P(s,B(n).warnings??[],!0),P(a,``),P(o,`ok`)}catch(e){T(e)}finally{P(r,!1)}}function C(e){return(B(n)?.masked??[]).includes(e)}function w(e){return!Object.hasOwn(B(v),e)}function ee(e){let t=B(g)?.profiles?.[e];P(l,e,!0),P(u,e,!0),P(d,qy(t?.allow),!0),P(f,qy(t?.deny),!0),C(`profiles.${e}.allow`)&&P(d,[],!0),C(`profiles.${e}.deny`)&&P(f,[],!0),P(c,{},!0),P(a,``)}function te(){P(l,``),P(u,``),P(d,[],!0),P(f,[],!0),P(c,{},!0),P(a,``)}function ne(){P(l,void 0),P(c,{},!0)}async function re(){let e=B(u).trim();if(e===``){P(c,{name:`请填写配置档名字`},!0),P(o,`error`),P(a,`配置档名字不能为空`);return}let r=B(l)===``;if(r&&Object.hasOwn(B(g)?.profiles??{},e)){P(c,{name:`这个配置档已经存在,点「编辑」来改`},!0),P(o,`error`),P(a,`这个配置档已经存在,点「编辑」来改`);return}let p={};if(C(`profiles.${e}.allow`)&&B(d).length===0||(!r||B(d).length>0)&&(p.allow=B(d)),C(`profiles.${e}.deny`)&&B(f).length===0||(!r||B(f).length>0)&&(p.deny=B(f)),Object.keys(p).length===0)P(c,{name:`至少填写一个工具名再保存`},!0),P(o,`error`),P(a,`至少填写一个工具名再保存`);else{P(i,!0);try{let r=await Ja.saveToolProfiles({profiles:{[e]:p}});P(n,r.document,!0),P(s,r.warnings??[],!0),P(l,void 0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:${e}`])}catch(e){T(e)}finally{P(i,!1)}}}async function ie(e){let t={profiles:{[e]:null}},r={},u=[];for(let[t,n]of Object.entries(B(g)?.chats??{}))n===e&&(r[t]=null,u.push(t));Object.keys(r).length>0&&(t.chats=r);let d=!1;B(y)===e&&(t.defaultProfile=null,d=!0),P(i,!0);try{let r=await Ja.saveToolProfiles(t);P(n,r.document,!0),P(s,r.warnings??[],!0),P(c,{},!0),P(o,`ok`);let i=[];u.length>0&&i.push(`已解掉聊天映射 ${u.join(`、`)}`),d&&i.push(`已把默认配置档改回内置默认`),P(a,[`已删除配置档 ${e}。`,...i,r.note].join(` `),!0),B(l)===e&&P(l,void 0)}catch(e){T(e)}finally{P(i,!1)}}async function ae(e){P(i,!0);try{let r=await Ja.saveToolProfiles({defaultProfile:e});P(n,r.document,!0),P(s,r.warnings??[],!0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:defaultProfile`])}catch(e){T(e)}finally{P(i,!1)}}function oe(e){P(p,e,!0),P(m,e,!0),P(h,B(g)?.chats?.[e]??``,!0),P(c,{},!0),P(a,``)}function se(){P(p,``),P(m,``),P(h,B(b)[0]??``,!0),P(c,{},!0),P(a,``)}function ce(){P(p,void 0),P(c,{},!0)}async function le(){let e=B(m).trim();if(e===``)P(c,{mappingKey:`请填写聊天键`},!0),P(o,`error`),P(a,`聊天键不能为空`);else if(B(h)===``)P(c,{mappingProfile:`请选择配置档`},!0),P(o,`error`),P(a,`聊天映射要指向一个配置档`);else{P(i,!0);try{let r=await Ja.saveToolProfiles({chats:{[e]:B(h)}});P(n,r.document,!0),P(s,r.warnings??[],!0),P(p,void 0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:chats.${e}`])}catch(e){T(e)}finally{P(i,!1)}}}async function ue(e){P(i,!0);try{let t=await Ja.saveToolProfiles({chats:{[e]:null}});P(n,t.document,!0),P(s,t.warnings??[],!0),P(c,{},!0),P(o,`ok`),P(a,`已删除 ${e} 的映射。${t.note}`),B(p)===e&&P(p,void 0)}catch(e){T(e)}finally{P(i,!1)}}function T(e){if(P(o,`error`),e instanceof Ka){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;P(c,t,!0),P(a,e.fields.map(e=>e.message).join(`;`),!0)}else P(a,e.message,!0)}else P(a,e instanceof Error?e.message:String(e),!0)}function de(e){return B(c)[e]??``}var fe=Zx(),pe=F(fe),me=F(pe),he=L(me,!0),ge=R(me,2),_e=e=>{ql(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`文件不存在,保存后新建`))},$$slots:{default:!0}})};K(ge,e=>{B(n)&&!B(n).exists&&e(_e)});var ve=R(ge,2),E=F(ve);Ql(E,{variant:`ghost`,size:`sm`,onclick:()=>void S(),children:(e,t)=>{k(),W(e,H(`重新读取`))},$$slots:{default:!0}}),Ql(R(E,2),{size:`sm`,onclick:te,children:(e,t)=>{var n=jx();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(ve),O(pe);var ye=R(pe,2),be=e=>{var t=Mx(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(o)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(a))}),W(e,t)};K(ye,e=>{B(a)&&e(be)});var xe=R(ye,2),Se=e=>{var t=Px();xi(t,21,()=>B(s),_i,(e,t)=>{var n=Nx(),r=L(n);z(()=>G(r,`· ${B(t)??``}`)),W(e,n)}),O(t),W(e,t)};K(xe,e=>{B(s).length>0&&e(Se)});var Ce=R(xe,2),we=e=>{W(e,Fx())},Te=e=>{var t=Xx(),n=I(t),r=R(F(n),2),a=F(r);{let e=M(()=>B(y)===``?x:B(y));J(a,()=>wy,(t,n)=>{n(t,{type:`single`,get value(){return B(e)},onValueChange:e=>{e===x?ae(null):e&&ae(e)},children:(e,t)=>{var n=Ix(),r=I(n);J(r,()=>by,(e,t)=>{t(e,{class:`w-64`,children:(e,t)=>{var n=U();J(I(n),()=>Sy,(e,t)=>{t(e,{placeholder:`选择默认配置档`})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{var n=Ix(),r=I(n);J(r,()=>_y,(e,t)=>{t(e,{value:x,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(r,2),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>_y,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})})}k(2),O(r);var o=R(r,2),s=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`defaultProfile`)]),W(e,t)},c=M(()=>de(`defaultProfile`));K(o,e=>{B(c)&&e(s)}),O(n);var v=R(n,2),S=R(F(v),2),te=e=>{W(e,Rx())},T=e=>{var t=U();J(I(t),()=>Hy,(e,t)=>{t(e,{children:(e,t)=>{var n=Ix(),r=I(n);J(r,()=>Iy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=zx(),r=I(n);J(r,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`档名`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`allow`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`deny`))},$$slots:{default:!0}})}),J(R(a,2),()=>Ny,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Dy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>zy,(e,n)=>{n(e,{children:(e,n)=>{var r=zx(),a=I(r);J(a,()=>Ay,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=Bx(),i=I(r),a=R(i),o=e=>{ql(e,{variant:`secondary`,class:`ml-1`,children:(e,t)=>{k(),W(e,H(`内置`))},$$slots:{default:!0}})},s=M(()=>w(t));K(a,e=>{B(s)&&e(o)}),z(()=>G(i,`${t??``} `)),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ay,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>C(`profiles.${t}.allow`)?`已隐藏`:(B(g)?.profiles?.[t]?.allow??[]).join(` / `)||`-`]),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ay,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>C(`profiles.${t}.deny`)?`已隐藏`:(B(g)?.profiles?.[t]?.deny??[]).join(` / `)||`-`]),W(e,r)},$$slots:{default:!0}})}),J(R(s,2),()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{var r=Ux(),a=F(r);Ql(a,{variant:`ghost`,size:`sm`,onclick:()=>ee(t),children:(e,t)=>{var n=Vx();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}});var o=R(a,2);{let e=M(()=>B(i)||w(t));Ql(o,{variant:`ghost`,size:`sm`,get disabled(){return B(e)},onclick:()=>void ie(t),children:(e,t)=>{var n=Hx();Wa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(r),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(S,e=>{B(b).length===0?e(te):e(T,-1)}),O(v);var fe=R(v,2),pe=e=>{var t=Gx(),n=F(t),r=L(n,!0),a=R(n,2),o=F(a);kv(o,{for:`profile-name`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`档名`))},$$slots:{default:!0}});var s=R(o,2);{let e=M(()=>B(l)!==``);tu(s,{id:`profile-name`,get value(){return B(u)},get disabled(){return B(e)},placeholder:`例如 readonly`,oninput:e=>P(u,e.currentTarget.value,!0)})}var c=R(s,2),p=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles`)||de(`profiles.${B(u).trim()}`)]),W(e,t)},m=M(()=>de(`profiles`)||de(`profiles.${B(u).trim()}`));K(c,e=>{B(m)&&e(p)}),O(a);var h=R(a,2),g=F(h),_=F(g);kv(_,{for:`profile-allow`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`allow`))},$$slots:{default:!0}});var v=R(_,2);Gy(v,{id:`profile-allow`,get value(){return B(d)},placeholder:`工具名或通配符,输入后回车`,onchange:e=>P(d,e,!0)});var y=R(v,4),b=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles.${B(u).trim()}.allow`)]),W(e,t)},x=M(()=>de(`profiles.${B(u).trim()}.allow`));K(y,e=>{B(x)&&e(b)}),O(g);var S=R(g,2),C=F(S);kv(C,{for:`profile-deny`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`deny`))},$$slots:{default:!0}});var w=R(C,2);Gy(w,{id:`profile-deny`,get value(){return B(f)},placeholder:`工具名或通配符,输入后回车`,onchange:e=>P(f,e,!0)});var ee=R(w,4),te=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles.${B(u).trim()}.deny`)]),W(e,t)},ie=M(()=>de(`profiles.${B(u).trim()}.deny`));K(ee,e=>{B(ie)&&e(te)}),O(S),O(h);var ae=R(h,2),oe=F(ae);Ql(oe,{size:`sm`,get disabled(){return B(i)},onclick:()=>void re(),children:(e,t)=>{var n=Wx();Ha(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(oe,2),{variant:`ghost`,size:`sm`,onclick:ne,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(ae),O(t),z(()=>G(r,B(l)===``?`新增配置档`:`编辑配置档 ${B(l)}`)),W(e,t)};K(fe,e=>{B(l)!==void 0&&e(pe)});var me=R(fe,2),he=F(me);Ql(R(F(he),2),{variant:`ghost`,size:`sm`,class:`ml-auto`,onclick:se,children:(e,t)=>{var n=Kx();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(he);var ge=R(he,2),_e=e=>{W(e,qx())},ve=M(()=>Object.keys(B(g)?.chats??{}).length===0),E=e=>{var t=U();J(I(t),()=>Hy,(e,t)=>{t(e,{children:(e,t)=>{var n=Ix(),r=I(n);J(r,()=>Iy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=Jx(),r=I(n);J(r,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`配置档`))},$$slots:{default:!0}})}),J(R(i,2),()=>Ny,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Dy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),17,()=>Object.entries(B(g)?.chats??{}),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],a=()=>B(n)[1];var o=U();J(I(o),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=Jx(),o=I(n);J(o,()=>Ay,(e,t)=>{t(e,{class:`font-mono text-xs`,children:(e,t)=>{k();var n=H();z(()=>G(n,r())),W(e,n)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{ql(e,{variant:`outline`,children:(e,t)=>{k();var n=H();z(()=>G(n,a())),W(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})}),J(R(s,2),()=>Ay,(e,t)=>{t(e,{children:(e,t)=>{var n=Ux(),a=F(n);Ql(a,{variant:`ghost`,size:`sm`,onclick:()=>oe(r()),children:(e,t)=>{var n=Vx();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(a,2),{variant:`ghost`,size:`sm`,get disabled(){return B(i)},onclick:()=>void ue(r()),children:(e,t)=>{var n=Hx();Wa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(n),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,o)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(ge,e=>{B(ve)?e(_e):e(E,-1)}),O(me);var ye=R(me,2),be=e=>{var t=Yx(),n=F(t),r=L(n,!0),a=R(n,2),o=F(a),s=F(o);kv(s,{for:`mapping-key`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}});var c=R(s,2);{let e=M(()=>B(p)!==``);tu(c,{id:`mapping-key`,get value(){return B(m)},get disabled(){return B(e)},placeholder:`group:100 或 private:200`,oninput:e=>P(m,e.currentTarget.value,!0)})}var l=R(c,4),u=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`chats`)||de(`chats.${B(m).trim()}`)]),W(e,t)},d=M(()=>de(`chats`)||de(`chats.${B(m).trim()}`));K(l,e=>{B(d)&&e(u)}),O(o);var f=R(o,2),g=F(f);kv(g,{for:`mapping-profile`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`配置档`))},$$slots:{default:!0}});var _=R(g,2);J(_,()=>wy,(e,t)=>{t(e,{type:`single`,get value(){return B(h)},onValueChange:e=>P(h,e??``,!0),children:(e,t)=>{var n=Ix(),r=I(n);J(r,()=>by,(e,t)=>{t(e,{id:`mapping-profile`,class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Sy,(e,t)=>{t(e,{placeholder:`选择配置档`})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>dy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>_y,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})});var v=R(_,2),y=e=>{var t=Lx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`chats.${B(m).trim()}`)]),W(e,t)},x=M(()=>de(`chats.${B(m).trim()}`));K(v,e=>{B(x)&&e(y)}),O(f),O(a);var S=R(a,2),C=F(S);Ql(C,{size:`sm`,get disabled(){return B(i)},onclick:()=>void le(),children:(e,t)=>{var n=Wx();Ha(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),Ql(R(C,2),{variant:`ghost`,size:`sm`,onclick:ce,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(S),O(t),z(()=>G(r,B(p)===``?`新增聊天映射`:`编辑映射 ${B(p)}`)),W(e,t)};K(ye,e=>{B(p)!==void 0&&e(be)}),W(e,t)};K(Ce,e=>{B(r)?e(we):e(Te,-1)}),O(fe),z(()=>G(he,B(n)?.path??`-`)),W(e,fe),j()}var $x=V(`<p class="text-muted-foreground p-4 text-sm">正在读取追踪数据…</p>`),eS=V(`<!> <!>`,1),tS=V(`<p class="text-muted-foreground text-sm">还没有追踪节点。</p>`),nS=V(`<!> <!> <!> <!> <!>`,1),rS=V(`<details><summary class="text-muted-foreground cursor-pointer text-xs"> </summary> <pre class="bg-muted mt-1 overflow-auto rounded p-2 text-[11px]"> </pre></details>`),iS=V(`<span class="text-muted-foreground text-xs">-</span>`);function aS(e,t){A(t,!0);let n=M(()=>[...t.status?.traces??[]].reverse());var r=U(),i=I(r),a=e=>{W(e,$x())},o=e=>{var t=U();J(I(t),()=>dx,(e,t)=>{t(e,{children:(e,t)=>{var r=eS(),i=I(r);J(i,()=>ax,(e,t)=>{t(e,{children:(e,t)=>{var r=eS(),i=I(r);J(i,()=>cx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`调用追踪`))},$$slots:{default:!0}})}),J(R(i,2),()=>nx,(e,t)=>{t(e,{children:(e,t)=>{k();var r=H();z(()=>G(r,`最近 ${B(n).length??``} 个节点;完整调用链在 trace 目录里,这里只展示运行中的摘要。`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(i,2),()=>$b,(e,t)=>{t(e,{children:(e,t)=>{var r=U(),i=I(r),a=e=>{W(e,tS())},o=e=>{var t=U();J(I(t),()=>Hy,(e,t)=>{t(e,{children:(e,t)=>{var r=eS(),i=I(r);J(i,()=>Iy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>zy,(e,t)=>{t(e,{children:(e,t)=>{var n=nS(),r=I(n);J(r,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`时间`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`节点`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`目标`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`trace`))},$$slots:{default:!0}})}),J(R(o,2),()=>Ny,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`属性`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>Dy,(e,t)=>{t(e,{children:(e,t)=>{var r=U();xi(I(r),17,()=>B(n),e=>e.spanId,(e,t)=>{var n=U();J(I(n),()=>zy,(e,n)=>{n(e,{children:(e,n)=>{var r=nS(),i=I(r);J(i,()=>Ay,(e,n)=>{n(e,{class:`whitespace-nowrap font-mono text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>Fb(B(t).at)]),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Ay,(e,n)=>{n(e,{children:(e,n)=>{ql(e,{variant:`outline`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).name)),W(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Ay,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).target??`-`)),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Ay,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>B(t).traceId.slice(0,8)]),W(e,r)},$$slots:{default:!0}})}),J(R(s,2),()=>Ay,(e,n)=>{n(e,{class:`max-w-72`,children:(e,n)=>{var r=U(),i=I(r),a=e=>{var n=rS(),r=F(n),i=L(r),a=L(R(r,2),!0);O(n),z((e,t)=>{G(i,`${e??``} 项`),G(a,t)},[()=>Object.keys(B(t).attributes).length,()=>zb(B(t).attributes)]),W(e,n)},o=M(()=>B(t).attributes&&Object.keys(B(t).attributes).length>0),s=e=>{W(e,iS())};K(i,e=>{B(o)?e(a):e(s,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{B(n).length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),j()}var oS=V(`<!> 刷新`,1),sS=V(`<!> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!></div>`,1),cS=V(`<p class="text-destructive text-sm"> </p>`),lS=V(`<!> 登录`,1),uS=V(`<div class="mx-auto mt-16 w-full max-w-sm space-y-3"><h2 class="text-base font-medium">需要访问令牌</h2> <p class="text-muted-foreground text-sm">令牌在 <code>config.json</code> 的 <code>panel.token</code> 里;没有配置时插件启动会生成一个并写回文件。</p> <!> <!> <!> <!></div>`),dS=V(`<!> <!> <!> <!> <!> <!>`,1),fS=V(`<!> <!> <!> <!> <!> <!> <!>`,1),pS=V(`<span>·</span> <span> </span>`,1),mS=V(`<div class="mx-auto flex min-h-screen max-w-6xl flex-col gap-4 p-4"><header class="flex flex-wrap items-center gap-3"><h1 class="text-lg font-semibold">opencode-qq-bot 面板</h1> <!></header> <!> <!> <footer class="text-muted-foreground mt-auto flex items-center gap-2 pt-4 text-xs"><!> <span> </span> <span>·</span> <span> </span> <!> <span>·</span> <span> </span></footer></div>`);function hS(e,t){A(t,!0);let n=N(``),r=N(!1),i=N(``),a=N(!1),o=N(`config`),s=N(void 0),c=N(ln([])),l=N(void 0),u,d=N(!1);new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`});let f=new Intl.NumberFormat(`zh-CN`);Ea(()=>(p(),()=>u?.()));async function p(){try{P(s,await Ja.status(),!0),P(r,!0),P(i,``),m()}catch(e){if(e instanceof Ka&&e.status===401){P(r,!1);return}P(i,e instanceof Error?e.message:String(e),!0)}}function m(){u?.(),u=Ya({status:e=>{P(s,e,!0)},log:e=>{P(c,[...B(c),e].slice(-500),!0)},config:e=>{P(l,e,!0)}})}async function h(){P(a,!0),P(i,``);try{await Ja.login(B(n)),P(n,``),await p()}catch(e){P(i,e instanceof Error?e.message:String(e),!0)}finally{P(a,!1)}}function g(){P(d,!0)}var _=mS(),v=F(_),y=R(F(v),2),b=e=>{var t=sS(),n=I(t);{let e=M(()=>B(s).connection.connected?`default`:`destructive`);ql(n,{get variant(){return B(e)},children:(e,t)=>{k();var n=H();z(()=>G(n,B(s).connection.connected?`已连接`:`未连接`)),W(e,n)},$$slots:{default:!0}})}var r=R(n,2),i=L(r),a=R(r,2),o=F(a),c=e=>{ql(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`有字段需要重启生效`))},$$slots:{default:!0}})};K(o,e=>{B(d)&&e(c)}),Ql(R(o,2),{variant:`ghost`,size:`sm`,onclick:()=>void p(),children:(e,t)=>{var n=oS();Ba(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(a),z(e=>G(i,`v${B(s).version??``} · 运行 ${e??``} 秒`),[()=>Math.floor(B(s).uptimeMs/1e3)]),W(e,t)};K(y,e=>{B(s)&&e(b)}),O(v);var x=R(v,2);jv(x,{});var S=R(x,2),C=e=>{var t=uS(),r=R(F(t),4);kv(r,{for:`token`,children:(e,t)=>{k(),W(e,H(`令牌`))},$$slots:{default:!0}});var o=R(r,2);tu(o,{id:`token`,type:`password`,placeholder:`面板访问令牌`,onkeydown:e=>{e.key===`Enter`&&h()},get value(){return B(n)},set value(e){P(n,e,!0)}});var s=R(o,2),c=e=>{var t=cS(),n=L(t,!0);z(()=>G(n,B(i))),W(e,t)};K(s,e=>{B(i)&&e(c)});var l=R(s,2);{let e=M(()=>B(a)||!B(n));Ql(l,{class:`w-full`,get disabled(){return B(e)},onclick:()=>void h(),children:(e,t)=>{var n=lS();Fa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(t),W(e,t)},w=e=>{var t=U();J(I(t),()=>Lv,(e,t)=>{t(e,{class:`flex-1`,get value(){return B(o)},set value(e){P(o,e,!0)},children:(e,t)=>{var n=fS(),r=I(n);J(r,()=>Bv,(e,t)=>{t(e,{children:(e,t)=>{var n=dS(),r=I(n);J(r,()=>Fv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{k(),W(e,H(`配置`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Fv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{k(),W(e,H(`会话覆盖`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Fv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{k(),W(e,H(`工具档案`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Fv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{k(),W(e,H(`状态`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Fv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{k(),W(e,H(`日志`))},$$slots:{default:!0}})}),J(R(s,2),()=>Fv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{k(),W(e,H(`追踪`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Nv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{Ab(e,{get config(){return B(l)},onrestart:g})},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Nv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{fb(e,{onrestart:g})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Nv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{Qx(e,{onrestart:g})},$$slots:{default:!0}})});var u=R(o,2);J(u,()=>Nv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{Ax(e,{get status(){return B(s)}})},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>Nv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{Xb(e,{get logs(){return B(c)}})},$$slots:{default:!0}})}),J(R(d,2),()=>Nv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{aS(e,{get status(){return B(s)}})},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(S,e=>{B(r)?e(w,-1):e(C)});var ee=R(S,2),te=F(ee);Na(te,{class:`size-3`});var ne=R(te,2),re=L(ne),ie=R(ne,4),ae=L(ie),oe=R(ie,2),se=e=>{var t=pS(),n=L(R(I(t),2));z(()=>G(n,`agent ${B(s).runtime.agent??``}`)),W(e,t)};K(oe,e=>{B(s)?.runtime.agent&&e(se)});var ce=L(R(oe,4));O(ee),O(_),z(e=>{G(re,`工作目录 ${B(s)?.runtime.home??`-`??``}`),G(ae,`日志 ${B(s)?.runtime.logDir??`-`??``}`),G(ce,`${e??``} 个会话`)},[()=>f.format(B(s)?.sessions.length??0)]),W(e,_),j()}var gS=document.getElementById(`app`);if(!gS)throw Error(`缺少 #app 挂载点`);li(hS,{target:gS});