@exponential-at/ui-element 0.0.0-stage → 0.1.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.
@@ -0,0 +1,466 @@
1
+ const Rf=(e,t)=>e===t,bo=Symbol("solid-proxy"),Pc=typeof Proxy=="function",Oc=Symbol("solid-track"),vo={equals:Rf};let fr=null,Mc=Lc;const Mt=1,xo=2,Fc={owned:null,cleanups:null,context:null,owner:null};var Se=null;let bi=null,Nf=null,Fe=null,Xe=null,xt=null,Yo=0;function Bt(e,t){const n=Fe,r=Se,o=e.length===0,i=t===void 0?r:t,s=o?Fc:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>N(()=>gr(s)));Se=s,Fe=null;try{return Cn(a,!0)}finally{Fe=n,Se=r}}function X(e,t){t=t?Object.assign({},vo,t):vo;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Nc(n,o));return[Rc.bind(n),r]}function Ut(e,t,n){const r=Pr(e,t,!0,Mt);Zn(r)}function te(e,t,n){const r=Pr(e,t,!1,Mt);Zn(r)}function he(e,t,n){Mc=Hf;const r=Pr(e,t,!1,Mt);(!n||!n.render)&&(r.user=!0),xt?xt.push(r):Zn(r)}function j(e,t,n){n=n?Object.assign({},vo,n):vo;const r=Pr(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Zn(r),Rc.bind(r)}function Yi(e){return Cn(e,!1)}function N(e){if(Fe===null)return e();const t=Fe;Fe=null;try{return e()}finally{Fe=t}}function _e(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=N(()=>t(a,o,s));return o=a,l}}function Le(e){he(()=>N(e))}function ce(e){return Se===null||(Se.cleanups===null?Se.cleanups=[e]:Se.cleanups.push(e)),e}function Lf(e,t){fr||(fr=Symbol("error")),Se=Pr(void 0,void 0,!0),Se.context={...Se.context,[fr]:[t]};try{return e()}catch(n){Or(n)}finally{Se=Se.owner}}function Es(){return Se}function zc(e,t){const n=Se,r=Fe;Se=e,Fe=null;try{return Cn(t,!0)}catch(o){Or(o)}finally{Se=n,Fe=r}}const[LT,jT]=X(!1);function sn(e,t){const n=Symbol("context");return{id:n,Provider:Uf(n),defaultValue:e}}function qt(e){let t;return Se&&Se.context&&(t=Se.context[e.id])!==void 0?t:e.defaultValue}function $o(e){const t=j(e),n=j(()=>Xi(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}function Rc(){if(this.sources&&this.state)if(this.state===Mt)Zn(this);else{const e=Xe;Xe=null,Cn(()=>ko(this),!1),Xe=e}if(Fe){const e=this.observers;if(!e||e[e.length-1]!==Fe){const t=e?e.length:0;Fe.sources?(Fe.sources.push(this),Fe.sourceSlots.push(t)):(Fe.sources=[this],Fe.sourceSlots=[t]),e?(e.push(Fe),this.observerSlots.push(Fe.sources.length-1)):(this.observers=[Fe],this.observerSlots=[Fe.sources.length-1])}}return this.value}function Nc(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Cn(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=bi&&bi.running;s&&bi.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?Xe.push(i):xt.push(i),i.observers&&jc(i)),s||(i.state=Mt)}if(Xe.length>1e6)throw Xe=[],new Error},!1)),t}function Zn(e){if(!e.fn)return;gr(e);const t=Yo;jf(e,e.value,t)}function jf(e,t,n){let r;const o=Se,i=Fe;Fe=Se=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Mt,e.owned&&e.owned.forEach(gr),e.owned=null),e.updatedAt=n+1,Or(s)}finally{Fe=i,Se=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Nc(e,r):e.value=r,e.updatedAt=n)}function Pr(e,t,n,r=Mt,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Se,context:Se?Se.context:null,pure:n};return Se===null||Se!==Fc&&(Se.owned?Se.owned.push(i):Se.owned=[i]),i}function wo(e){if(e.state===0)return;if(e.state===xo)return ko(e);if(e.suspense&&N(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Yo);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Mt)Zn(e);else if(e.state===xo){const r=Xe;Xe=null,Cn(()=>ko(e,t[0]),!1),Xe=r}}function Cn(e,t){if(Xe)return e();let n=!1;t||(Xe=[]),xt?n=!0:xt=[],Yo++;try{const r=e();return Bf(n),r}catch(r){n||(xt=null),Xe=null,Or(r)}}function Bf(e){if(Xe&&(Lc(Xe),Xe=null),e)return;const t=xt;xt=null,t.length&&Cn(()=>Mc(t),!1)}function Lc(e){for(let t=0;t<e.length;t++)wo(e[t])}function Hf(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:wo(r)}for(t=0;t<n;t++)wo(e[t])}function ko(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Mt?r!==t&&(!r.updatedAt||r.updatedAt<Yo)&&wo(r):o===xo&&ko(r,t)}}}function jc(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=xo,n.pure?Xe.push(n):xt.push(n),n.observers&&jc(n))}}function gr(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)gr(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)gr(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Wf(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Oa(e,t,n){try{for(const r of t)r(e)}catch(r){Or(r,n&&n.owner||null)}}function Or(e,t=Se){const n=fr&&t&&t.context&&t.context[fr],r=Wf(e);if(!n)throw r;xt?xt.push({fn(){Oa(r,n,t)},state:Mt}):Oa(r,n,t)}function Xi(e){if(typeof e=="function"&&!e.length)return Xi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Xi(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Uf(e,t){return function(r){let o;return te(()=>o=N(()=>(Se.context={...Se.context,[e]:r.value},$o(()=>r.children))),void 0),o}}const Zi=Symbol("fallback");function So(e){for(let t=0;t<e.length;t++)e[t]()}function qf(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ce(()=>So(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Oc],N(()=>{let g,p,v,m,b,y,h,k,w;if(c===0)s!==0&&(So(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Zi],o[0]=Bt(_=>(i[0]=_,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=Bt(f);s=c}else{for(v=new Array(c),m=new Array(c),a&&(b=new Array(c)),y=0,h=Math.min(s,c);y<h&&r[y]===l[y];y++);for(h=s-1,k=c-1;h>=y&&k>=y&&r[h]===l[k];h--,k--)v[k]=o[h],m[k]=i[h],a&&(b[k]=a[h]);for(g=new Map,p=new Array(k+1),d=k;d>=y;d--)w=l[d],u=g.get(w),p[d]=u===void 0?-1:u,g.set(w,d);for(u=y;u<=h;u++)w=r[u],d=g.get(w),d!==void 0&&d!==-1?(v[d]=o[u],m[d]=i[u],a&&(b[d]=a[u]),d=p[d],g.set(w,d)):i[u]();for(d=y;d<c;d++)d in v?(o[d]=v[d],i[d]=m[d],a&&(a[d]=b[d],a[d](d))):o[d]=Bt(f);o=o.slice(0,s=c),r=l.slice(0)}return o});function f(g){if(i[d]=g,a){const[p,v]=X(d);return a[d]=v,t(l[d],p)}return t(l[d])}}}function Kf(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,l;return ce(()=>So(i)),()=>{const c=e()||[],u=c.length;return c[Oc],N(()=>{if(u===0)return a!==0&&(So(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[Zi],o[0]=Bt(f=>(i[0]=f,n.fallback())),a=1),o;for(r[0]===Zi&&(i[0](),i=[],r=[],o=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?s[l](()=>c[l]):l>=r.length&&(o[l]=Bt(d));for(;l<r.length;l++)i[l]();return a=s.length=i.length=u,r=c.slice(0),o=o.slice(0,a)});function d(f){i[l]=f;const[g,p]=X(c[l]);return s[l]=p,t(g,l)}}}function $(e,t){return N(()=>e(t||{}))}function Zr(){return!0}const Ji={get(e,t,n){return t===bo?n:e.get(t)},has(e,t){return t===bo?!0:e.has(t)},set:Zr,deleteProperty:Zr,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Zr,deleteProperty:Zr}},ownKeys(e){return e.keys()}};function vi(e){return(e=typeof e=="function"?e():e)?e:{}}function Vf(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function C(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&bo in a,e[s]=typeof a=="function"?(t=!0,j(a)):a}if(Pc&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=vi(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in vi(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(vi(e[a])));return[...new Set(s)]}},Ji);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:Vf.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function Mr(e,...t){const n=t.length;if(Pc&&bo in e){const o=n>1?t.flat():t[0],i=new Set,s=t.map(a=>{const l=a.filter(c=>!i.has(c)&&(i.add(c),!0));return new Proxy({get(c){return l.includes(c)?e[c]:void 0},has(c){return l.includes(c)&&c in e},keys(){return l.filter(c=>c in e)}},Ji)});return s.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},Ji)),s}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Gf=0;function Ce(){return`cl-${Gf++}`}const Yf=e=>`Stale read from <${e}>.`;function xe(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(qf(()=>e.each,e.children,t||void 0))}function Pt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Kf(()=>e.each,e.children,t||void 0))}function ee(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),r=t?n:j(n,void 0,{equals:(o,i)=>!o==!i});return j(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?N(()=>i(t?o:()=>{if(!N(r))throw Yf("Show");return n()})):i}return e.fallback},void 0,void 0)}let Jr;function Xf(e){let t;const[n,r]=X(t,void 0);return Jr||(Jr=new Set),Jr.add(r),ce(()=>Jr.delete(r)),j(()=>{let o;if(o=n()){const i=e.fallback;return typeof i=="function"&&i.length?N(()=>i(o,()=>r())):i}return Lf(()=>e.children,r)},void 0,void 0)}const Zf=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Jf=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Zf]),Qf=new Set(["innerHTML","textContent","innerText","children"]),ep=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),tp=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function np(e,t){const n=tp[e];return typeof n=="object"?n[t]?n.$:void 0:n}const rp=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),op=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),ip={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Z=e=>j(()=>e());function sp(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],u)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<i){let d=s,f=1,g;for(;++d<o&&d<i&&!((g=c.get(t[d]))==null||g!==u+f);)f++;if(f>u-a){const p=t[s];for(;a<u;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Ma="_$DX_DELEGATE";function ap(e,t,n,r={}){let o;return Bt(i=>{o=i,t===document?e():x(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function F(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>N(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Ct(e,t=window.document){const n=t[Ma]||(t[Ma]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,pp))}}function V(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function lp(e,t,n,r){r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function cp(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}function en(e,t){t==null?e.removeAttribute("class"):e.className=t}function Nn(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function up(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Fa(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Fa(e,a,!0),n[a]=l)}return n}function De(e,t,n){if(!t)return n?V(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function D(e,t={},n,r){const o={};return r||te(()=>o.children=mr(e,t.children,o.children)),te(()=>typeof t.ref=="function"&&ie(t.ref,e)),te(()=>dp(e,t,n,!0,o,!0)),o}function ie(e,t,n){return N(()=>e(t,n))}function x(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return mr(e,t,r,n);te(o=>mr(e,t(),o,n),r)}function dp(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=za(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=za(e,s,a,o[s],n,i,t)}}function fp(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Fa(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function za(e,t,n,r,o,i,s){let a,l,c,u,d;if(t==="style")return De(e,n,r);if(t==="classList")return up(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),g=rp.has(f);if(!g&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(f,p)}(g||n)&&(Nn(e,f,n,g),g&&Ct([f]))}else if(t.slice(0,5)==="attr:")V(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")cp(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Qf.has(t))||!o&&((u=np(t,e.tagName))||(l=Jf.has(t)))||(a=e.nodeName.includes("-")||"is"in s))d&&(t=t.slice(5),l=!0),t==="class"||t==="className"?en(e,n):a&&!l&&!c?e[fp(t)]=n:(t==="value"||t==="defaultValue")&&(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA")?e[u||t]=n??"":e[u||t]=n;else{const f=o&&t.indexOf(":")>-1&&ip[t.split(":")[0]];f?lp(e,f,t,n):V(e,ep[t]||t,n)}return n}function pp(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});try{if(e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}finally{e=t=null}}function mr(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(s){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=_n(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=_n(e,n,r);else{if(i==="function")return te(()=>{let a=t();for(;typeof a=="function";)a=a();n=mr(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(Qi(a,t,n,o))return te(()=>n=mr(e,a,n,r,!0)),()=>n;if(a.length===0){if(n=_n(e,n,r),s)return n}else l?n.length===0?Ra(e,a,r):sp(e,n,a):(n&&_n(e),Ra(e,a));n=a}else if(t.nodeType){if(Array.isArray(n)){if(s)return n=_n(e,n,r,t);_n(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Qi(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Qi(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Qi(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function Ra(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function _n(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}const hp="http://www.w3.org/2000/svg";function Bc(e,t=!1,n=void 0){return t?document.createElementNS(hp,e):document.createElement(e,{is:n})}function gp(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Es();let i;return he(()=>{i||(i=zc(o,()=>j(()=>e.children)));const s=r();if(s instanceof HTMLHeadElement){const[a,l]=X(!1),c=()=>l(!0);Bt(u=>x(s,()=>a()?u():i(),null)),ce(c)}else{const a=Bc(e.isSVG?"g":"div",e.isSVG),l=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return n.parentNode},configurable:!0}),x(l,i),s.appendChild(a),e.ref&&e.ref(a),ce(()=>s.contains(a)&&s.removeChild(a))}},void 0,{render:!0}),n}function mp(e,t){const n=j(e);return j(()=>{const r=n();switch(typeof r){case"function":return N(()=>r(t));case"string":const o=op.has(r),i=Bc(r,o,N(()=>t.is));return D(i,t,o),i}})}function An(e){const[,t]=Mr(e,["component"]);return mp(()=>e.component,t)}const yp="https://ui.exponential.at/catalogs/core/v1",bp="https://ui.exponential.at/catalogs/core-lite/v1",vp="Unknown",xp={variant:["default","secondary","outline","ghost","destructive","link"],size:["sm","default","lg","icon"],tone:["neutral","primary","success","warning","danger","info"],gap:["none","xs","sm","md","lg","xl"],align:["start","center","end","stretch"],justify:["start","center","end","between","around","evenly"],textVariant:["body","caption","muted","lead","code","label","title"],headingLevel:["h1","h2","h3","h4"],imageFit:["contain","cover","fill","none","scaleDown"],orientation:["horizontal","vertical"],side:["top","right","bottom","left"],inputType:["text","email","password","number","search","url","tel"],validateOn:["change","blur","submit"],alertType:["info","success","warning","error"],controlSize:["sm","default","lg"],spinnerSize:["xs","sm","default","lg"],tabClosable:["none","hover","always"],groupType:["single","multiple"],rowChevron:["none","right","selector"],rowSurface:["flat","card"],chipShape:["pill","rect"],density:["default","compact"],listDirection:["vertical","horizontal"],chartKind:["bar","stackedBar","line","area","pie","donut","sparkline"],segmentedVariant:["segmented","toggles","outline","bar"],liveTone:["live","attention","done","unread","idle","muted"],menuItemKind:["item","checkbox","separator","label","submenu"],openOn:["press","hover"],menuOpenOn:["press","contextmenu"],live:["off","polite","assertive"],selectable:["none","single","multiple"],cellType:["text","number","date","boolean","badge","slot","currency","percent","relativeTime"],sortDirection:["asc","desc"],imageLoading:["lazy","eager"],scrollDirection:["vertical","horizontal","both"],collapseBelow:["never","sm","md","lg","xl"],codeLanguage:["plain","json","js","ts","tsx","rust","swift","kotlin","python","bash","html","css","sql","yaml","markdown","ansi"],codeToken:["plain","keyword","string","number","comment","punctuation","operator","type","function","property","tag","attribute","success","warning","error"],codeBlockVariant:["default","destructive"],codeBlockSize:["default","sm"],traceStatus:["running","error","pending"],traceSize:["default","sm"]},$p={option:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},disabled:{type:"boolean"},description:{type:"string"},image:{type:"url"}}},check:{properties:{condition:{type:"boolean",required:!0,bindable:!0},message:{type:"string",required:!0}}},tab:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},count:{type:"number"}}},menuItem:{properties:{label:{type:"string"},value:{type:"string"},kind:{type:"enum",enum:"menuItemKind",default:"item"},icon:{type:"icon"},shortcut:{type:"string"},checked:{type:"boolean",bindable:!0},destructive:{type:"boolean"},disabled:{type:"boolean"},items:{type:"array",items:{type:"object",shape:"menuItem"},bindable:!0},searchable:{type:"boolean"},placeholder:{type:"string"}}},searchItem:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},identifier:{type:"string"},disabled:{type:"boolean"}}},accordionItem:{properties:{title:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},count:{type:"number"}}},segment:{properties:{value:{type:"number",required:!0},tone:{type:"enum",enum:"tone"},label:{type:"string"}}},series:{properties:{name:{type:"string",required:!0},values:{type:"array",items:{type:"number"},required:!0},tone:{type:"enum",enum:"tone"}}},pageItem:{properties:{title:{type:"string"}}},step:{properties:{label:{type:"string",required:!0},description:{type:"string"}}},column:{properties:{key:{type:"string",required:!0},label:{type:"string",required:!0},type:{type:"enum",enum:"cellType",default:"text"},slot:{type:"string"},width:{type:"number"},align:{type:"enum",values:["start","center","end"],default:"start"},sortable:{type:"boolean",default:!1},currency:{type:"string"},decimals:{type:"number"}}},sort:{properties:{key:{type:"string",required:!0},direction:{type:"enum",enum:"sortDirection",required:!0}}},panel:{properties:{min:{type:"number"},max:{type:"number"},collapsible:{type:"boolean"}}},file:{properties:{name:{type:"string",required:!0},size:{type:"number"},type:{type:"string"},url:{type:"url"}}}},wp={names:["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter"]},kp={"Accordion.trigger":"ui-chevron-down","Carousel.previous":"ui-chevron-left","Carousel.next":"ui-chevron-right","Checkbox.check":"ui-check","ChipInput.remove":"ui-close","CodeBlock.copy":"ui-copy","CodeBlock.copied":"ui-check","Composer.attachment":"ui-attach","Composer.send":"ui-send","Composer.stop":"ui-stop","DatePicker.trigger":"calendar","DatePicker.previousMonth":"ui-chevron-left","DatePicker.nextMonth":"ui-chevron-right","DateRangePicker.trigger":"calendar","Dialog.close":"ui-close","Menu.check":"ui-check","Menu.submenuIndicator":"ui-chevron-right","FileUpload.icon":"upload","FileUpload.file":"ui-file","FileUpload.remove":"ui-close","Image.fallback":"ui-icon-placeholder","NumberField.decrement":"ui-minus","NumberField.increment":"ui-add","Select.trigger":"ui-selector","Select.search":"search","Select.check":"ui-check","SearchList.search":"search","SearchList.check":"ui-check","Table.sortIcon.asc":"ui-chevron-up","Table.sortIcon.desc":"ui-chevron-down","Tabs.close":"ui-close","Tabs.new":"ui-add","TimePicker.trigger":"ui-clock","Toast.close":"ui-close","Toast.icon.info":"ui-info","Toast.icon.success":"ui-success","Toast.icon.warning":"ui-warning","Toast.icon.error":"ui-error","Unknown.root":"ui-warning"},Sp=JSON.parse('{"Box":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"style":{"type":"style"},"pressable":{"type":"boolean"}},"events":["press"]},"Stack":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"vertical","responsive":true,"bindable":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"align":{"type":"enum","enum":"align","responsive":true,"bindable":true},"justify":{"type":"enum","enum":"justify","default":"start","responsive":true,"bindable":true},"wrap":{"type":"boolean","default":false,"responsive":true},"style":{"type":"style"}}},"Grid":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"columns":{"type":"number","default":2,"responsive":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"style":{"type":"style"}}},"Card":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"title":{"type":"string"},"description":{"type":"string"},"padded":{"type":"boolean","default":true},"style":{"type":"style"}}},"Separator":{"kind":"macro","group":"layout","lite":true,"children":"none","props":{"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"List":{"kind":"native","group":"layout","lite":true,"children":"many","slots":["section"],"slotScope":"row","props":{"direction":{"type":"enum","enum":"listDirection","default":"vertical"},"gap":{"type":"enum","enum":"gap","default":"none"},"divided":{"type":"boolean","default":false},"sectionBy":{"type":"string"},"stickyHeaders":{"type":"boolean","default":false},"style":{"type":"style"}}},"Resizable":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"horizontal","responsive":true},"sizes":{"type":"array","items":{"type":"number"},"bindable":true},"panels":{"type":"array","items":{"type":"object","shape":"panel"}},"handle":{"type":"boolean","default":false},"style":{"type":"style"}},"events":["change"]},"ScrollArea":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"scrollDirection","default":"vertical"},"maxHeight":{"type":"number"},"style":{"type":"style"}}},"Sidebar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["sidebar"],"props":{"side":{"type":"enum","values":["left","right"],"default":"left"},"width":{"type":"number","default":240},"collapseBelow":{"type":"enum","enum":"collapseBelow","default":"md"},"collapsed":{"type":"boolean","default":false,"bindable":true}}},"SplitView":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["list"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"width":{"type":"number","default":320}},"events":["back"]},"AppBar":{"kind":"macro","group":"layout","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false}},"events":["back"]},"Page":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false},"padded":{"type":"boolean","default":true}},"events":["back"]},"Toolbar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["trailing"],"props":{"gap":{"type":"enum","enum":"gap","default":"sm"}}},"Section":{"kind":"macro","group":"list","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","bindable":true},"caption":{"type":"string","bindable":true},"count":{"type":"number","bindable":true},"icon":{"type":"icon"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":true,"bindable":true},"tint":{"type":"enum","enum":"tone","default":"neutral"},"tree":{"type":"boolean","default":false},"loading":{"type":"boolean","default":false,"bindable":true},"style":{"type":"style"}},"events":["change"]},"Group":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string"},"footer":{"type":"string"}}},"Text":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"textVariant","default":"body"},"align":{"type":"enum","values":["start","center","end"]},"lines":{"type":"number"},"tone":{"type":"enum","enum":"tone"},"shimmer":{"type":"boolean","default":false},"live":{"type":"enum","enum":"live","default":"off"},"style":{"type":"style"}}},"Heading":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"level":{"type":"enum","enum":"headingLevel","default":"h2"}}},"Markdown":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"markdown","required":true,"bindable":true},"lines":{"type":"number"},"style":{"type":"style"}}},"CodeBlock":{"kind":"native","group":"text","lite":true,"children":"none","props":{"code":{"type":"string","required":true,"bindable":true},"language":{"type":"enum","enum":"codeLanguage","default":"plain"},"title":{"type":"string"},"lineNumbers":{"type":"boolean","default":false},"wrap":{"type":"boolean","default":false},"copyable":{"type":"boolean","default":true},"highlight":{"type":"array","items":{"type":"number"}},"maxLines":{"type":"number"},"variant":{"type":"enum","enum":"codeBlockVariant","default":"default","bindable":true},"size":{"type":"enum","enum":"codeBlockSize","default":"default"}}},"Kbd":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"keys":{"type":"string","required":true}}},"Label":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"for":{"type":"string"},"required":{"type":"boolean","default":false}}},"Image":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","bindable":true},"alt":{"type":"string","required":true,"bindable":true},"fit":{"type":"enum","enum":"imageFit","default":"cover"},"width":{"type":"number"},"height":{"type":"number"},"aspectRatio":{"type":"number"},"fallback":{"type":"icon"},"loading":{"type":"enum","enum":"imageLoading","default":"lazy"},"focalX":{"type":"number"},"focalY":{"type":"number"},"style":{"type":"style"}}},"Icon":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"icon","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","bindable":true},"label":{"type":"string"}}},"Video":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"poster":{"type":"url"},"durationMs":{"type":"number"},"autoplay":{"type":"boolean","default":false},"aspectRatio":{"type":"number","default":1.7777778},"style":{"type":"style"}}},"AudioPlayer":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"title":{"type":"string"},"durationMs":{"type":"number"}}},"Avatar":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"string","required":true,"bindable":true},"src":{"type":"url","bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"seed":{"type":"string"}}},"Carousel":{"kind":"native","group":"media","lite":false,"children":"many","props":{"page":{"type":"number","default":0,"bindable":true},"loop":{"type":"boolean","default":false},"indicators":{"type":"boolean","default":true}},"events":["change"]},"Tabs":{"kind":"native","group":"navigation","lite":true,"children":"many","props":{"tabs":{"type":"array","items":{"type":"object","shape":"tab"},"required":true},"value":{"type":"string","bindable":true},"fill":{"type":"boolean","default":false},"closable":{"type":"enum","enum":"tabClosable","default":"none"},"addable":{"type":"boolean","default":false}},"events":["change","close","new"]},"Segmented":{"kind":"native","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"variant":{"type":"enum","enum":"segmentedVariant","default":"segmented"},"size":{"type":"enum","enum":"controlSize","default":"default"},"fill":{"type":"boolean","default":false}},"events":["change"]},"Accordion":{"kind":"native","group":"navigation","lite":false,"children":"many","props":{"items":{"type":"array","items":{"type":"object","shape":"accordionItem"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true}},"events":["change"]},"Collapsible":{"kind":"macro","group":"navigation","lite":true,"children":"many","props":{"title":{"type":"string","required":true},"open":{"type":"boolean","default":false,"bindable":true},"count":{"type":"number"}},"events":["change"]},"Trace":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"size":{"type":"enum","enum":"traceSize","default":"default"}}},"TraceItem":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string","required":true,"bindable":true},"icon":{"type":"icon"},"description":{"type":"string"},"status":{"type":"enum","enum":"traceStatus"},"size":{"type":"enum","enum":"traceSize","default":"default"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["change"]},"Pagination":{"kind":"macro","group":"navigation","lite":false,"children":"none","props":{"totalPages":{"type":"number","required":true},"page":{"type":"number","default":1,"bindable":true}},"events":["change"]},"Breadcrumb":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true}},"events":["select"]},"Stepper":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"steps":{"type":"array","items":{"type":"object","shape":"step"},"required":true},"current":{"type":"number","default":0,"bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"Dialog":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"dismissible":{"type":"boolean","default":true}},"events":["change"]},"Drawer":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom","responsive":true},"dismissible":{"type":"boolean","default":true},"dragToDismiss":{"type":"boolean","default":true}},"events":["change"]},"DockCard":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["footer"],"props":{"label":{"type":"string","required":true,"bindable":true},"title":{"type":"string","required":true,"bindable":true},"caption":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"icon":{"type":"icon"},"tone":{"type":"enum","enum":"tone","default":"neutral"},"open":{"type":"boolean","default":false,"bindable":true}},"events":["press","change"]},"AlertDialog":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"title":{"type":"string","required":true},"description":{"type":"string"},"confirmLabel":{"type":"string","default":"$string.confirm"},"cancelLabel":{"type":"string","default":"$string.cancel"},"destructive":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["confirm","cancel","change"]},"Popover":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom"},"openOn":{"type":"enum","enum":"openOn","default":"press"}},"events":["change"]},"Tooltip":{"kind":"native","group":"overlay","lite":false,"children":"many","props":{"content":{"type":"string","required":true},"side":{"type":"enum","enum":"side","default":"top"}}},"Menu":{"kind":"native","group":"overlay","lite":false,"children":"one","props":{"label":{"type":"string"},"icon":{"type":"icon"},"items":{"type":"array","items":{"type":"object","shape":"menuItem"},"required":true},"openOn":{"type":"enum","enum":"menuOpenOn","default":"press"}},"events":["select"]},"Toast":{"kind":"native","group":"overlay","lite":false,"children":"none","props":{"title":{"type":"string","required":true,"bindable":true},"description":{"type":"string","bindable":true},"type":{"type":"enum","enum":"alertType","default":"info"},"open":{"type":"boolean","default":true,"bindable":true},"duration":{"type":"number","default":5000},"actionLabel":{"type":"string"},"dismissible":{"type":"boolean","default":true}},"events":["dismiss","action","change"]},"Badge":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"variant","default":"default","bindable":true},"icon":{"type":"icon"}}},"Alert":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"title":{"type":"string","required":true},"message":{"type":"string"},"type":{"type":"enum","enum":"alertType","default":"info"}}},"Chip":{"kind":"macro","group":"feedback","lite":true,"children":"none","slots":["leading"],"props":{"label":{"type":"string","required":true,"bindable":true},"shape":{"type":"enum","enum":"chipShape","default":"pill"},"selected":{"type":"boolean","default":false},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"dot":{"type":"color"},"icon":{"type":"icon"},"image":{"type":"url"},"detail":{"type":"string"},"removable":{"type":"boolean","default":false},"pressable":{"type":"boolean","default":false}},"events":["press","remove"]},"EmptyState":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"icon":{"type":"icon","required":true},"title":{"type":"string","required":true},"description":{"type":"string"},"actionLabel":{"type":"string"},"size":{"type":"enum","values":["page","list"],"default":"page"}},"events":["press"]},"Progress":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"max":{"type":"number","default":100},"label":{"type":"string"},"tone":{"type":"enum","enum":"tone","default":"primary"}}},"Meter":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"segments":{"type":"array","items":{"type":"object","shape":"segment"},"required":true},"max":{"type":"number","default":100},"label":{"type":"string"},"value":{"type":"string"}}},"Ring":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","default":"primary"},"label":{"type":"string"}}},"Spinner":{"kind":"native","group":"feedback","lite":false,"children":"none","props":{"size":{"type":"enum","enum":"spinnerSize","default":"default"},"label":{"type":"string"}}},"Skeleton":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"width":{"type":"string"},"height":{"type":"string"},"rounded":{"type":"boolean","default":false},"rows":{"type":"number"},"rowHeight":{"type":"number"},"dot":{"type":"boolean","default":true}}},"Table":{"kind":"native","group":"data","lite":false,"children":"none","slots":["*"],"slotScope":"row","props":{"columns":{"type":"array","items":{"type":"object","shape":"column"},"required":true},"rows":{"type":"array","items":{"type":"object"},"required":true,"bindable":true},"rowKey":{"type":"string","default":"id"},"sort":{"type":"object","shape":"sort","bindable":true},"selectable":{"type":"enum","enum":"selectable","default":"none"},"selected":{"type":"array","items":{"type":"string"},"bindable":true},"caption":{"type":"string"},"emptyText":{"type":"string","default":"$string.noResults"},"striped":{"type":"boolean","default":false},"density":{"type":"enum","enum":"density","default":"default"},"stickyHeader":{"type":"boolean","default":false}},"events":["sort","select","rowPress"]},"Chart":{"kind":"native","group":"data","lite":false,"children":"none","props":{"kind":{"type":"enum","enum":"chartKind","required":true},"categories":{"type":"array","items":{"type":"string"},"bindable":true},"series":{"type":"array","items":{"type":"object","shape":"series"},"required":true,"bindable":true},"title":{"type":"string"},"height":{"type":"number","default":200},"xLabel":{"type":"string"},"yLabel":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"},"showAxes":{"type":"boolean","default":true},"showGrid":{"type":"boolean","default":true},"showLegend":{"type":"boolean","default":true},"showValues":{"type":"boolean","default":false}}},"Sparkline":{"kind":"macro","group":"data","lite":false,"children":"none","props":{"values":{"type":"array","items":{"type":"number"},"required":true,"bindable":true},"tone":{"type":"enum","enum":"tone","default":"primary"},"height":{"type":"number","default":24}}},"StatTile":{"kind":"macro","group":"data","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"value":{"type":"string","required":true,"bindable":true},"delta":{"type":"string","bindable":true},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"trend":{"type":"array","items":{"type":"number"},"bindable":true}}},"Button":{"kind":"native","group":"action","lite":true,"children":"one","props":{"label":{"type":"string","bindable":true},"icon":{"type":"icon","bindable":true},"variant":{"type":"enum","enum":"variant","default":"default"},"size":{"type":"enum","enum":"size","default":"default"},"disabled":{"type":"boolean","default":false,"bindable":true},"loading":{"type":"boolean","default":false},"pendingLabel":{"type":"string"},"submit":{"type":"boolean","default":false}},"events":["press"]},"Link":{"kind":"native","group":"action","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"href":{"type":"url"},"external":{"type":"boolean","default":false}},"events":["press"]},"Toggle":{"kind":"native","group":"action","lite":false,"children":"none","props":{"label":{"type":"string","required":true},"icon":{"type":"icon"},"pressed":{"type":"boolean","default":false,"bindable":true},"variant":{"type":"enum","values":["default","outline"],"default":"default"},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Form":{"kind":"native","group":"input","lite":true,"children":"many","props":{"name":{"type":"string","required":true},"disabled":{"type":"boolean","default":false,"bindable":true},"busy":{"type":"boolean","default":false,"bindable":true},"summary":{"type":"boolean","default":false}},"events":["submit","invalid","change"]},"FieldGroup":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"columns":{"type":"number","default":2}}},"FormActions":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"submit":{"type":"string","required":true,"bindable":true},"cancel":{"type":"boolean","default":false},"destructive":{"type":"boolean","default":false}},"events":["cancel"]},"Input":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"type":{"type":"enum","enum":"inputType","default":"text"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Textarea":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"placeholder":{"type":"string"},"rows":{"type":"number","default":3},"autosize":{"type":"boolean","default":false},"maxRows":{"type":"number"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","focus","blur"]},"NumberField":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"number","bindable":true},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","default":1},"precision":{"type":"number"},"unit":{"type":"string"},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Checkbox":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Radio":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"value":{"type":"string","bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"vertical"},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"ChoiceTiles":{"kind":"native","group":"input","lite":false,"children":"none","props":{"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"columns":{"type":"number","default":2},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Switch":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"description":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["change"]},"Slider":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"min":{"type":"number","default":0,"bindable":true},"max":{"type":"number","required":true,"bindable":true},"step":{"type":"number","default":1},"value":{"type":"number","bindable":true}},"events":["change"]},"Rating":{"kind":"macro","group":"input","lite":true,"children":"none","props":{"value":{"type":"number","default":0,"bindable":true},"max":{"type":"number","default":5,"minimum":1,"maximum":100},"readOnly":{"type":"boolean","default":false},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Select":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"source":{"type":"string"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"multiple":{"type":"boolean","default":false},"searchable":{"type":"boolean","default":false},"emptyText":{"type":"string","default":"$string.noResults"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"change"}},"events":["change","search"]},"SearchList":{"kind":"native","group":"input","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"searchItem"},"required":true,"bindable":true},"query":{"type":"string","bindable":true},"placeholder":{"type":"string","default":"$string.search"},"value":{"type":"string","bindable":true},"emptyText":{"type":"string","default":"$string.noResults"},"maxRows":{"type":"number","default":8},"showCount":{"type":"boolean","default":true}},"events":["search","select"]},"ChipInput":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"values":{"type":"array","items":{"type":"string"},"bindable":true},"suggestions":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"placeholder":{"type":"string"},"max":{"type":"number"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change","add","remove"]},"DatePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"DateRangePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"start":{"type":"date","bindable":true},"end":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"TimePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"string","bindable":true},"min":{"type":"string"},"max":{"type":"string"},"step":{"type":"number","default":15},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["change"]},"FileUpload":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"accept":{"type":"string"},"multiple":{"type":"boolean","default":false},"maxSize":{"type":"number"},"files":{"type":"array","items":{"type":"object","shape":"file"},"bindable":true},"hint":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["upload","remove"]},"Composer":{"kind":"native","group":"input","lite":true,"children":"none","props":{"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"submitLabel":{"type":"string","default":"$string.send"},"attachments":{"type":"boolean","default":false},"busy":{"type":"boolean","default":false}},"events":["submit","change","stop"]},"Row":{"kind":"macro","group":"list","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"identifier":{"type":"string","bindable":true},"subtitle":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"value":{"type":"string","bindable":true},"placeholder":{"type":"string"},"icon":{"type":"icon","bindable":true},"chevron":{"type":"enum","enum":"rowChevron","default":"none","bindable":true},"selected":{"type":"boolean","default":false,"bindable":true},"density":{"type":"enum","enum":"density","default":"default"},"surface":{"type":"enum","enum":"rowSurface","default":"flat"},"pressable":{"type":"boolean","default":false},"depth":{"type":"number","default":0}},"events":["press"]},"TreeGuides":{"kind":"native","group":"list","lite":true,"children":"none","hidden":true,"props":{"depth":{"type":"number","required":true},"elbowAt":{"type":"number"},"tee":{"type":"boolean","default":false},"passThrough":{"type":"array","items":{"type":"number"}}}},"Unknown":{"kind":"native","group":"feedback","lite":true,"children":"none","hidden":true,"props":{"component":{"type":"string","required":true},"catalogId":{"type":"string"}}}}'),Cp={id:yp,liteId:bp,unknownComponent:vp,enums:xp,defs:$p,functions:wp,builtinIcons:kp,components:Sp},Ap="VAPP-85: the token NAMES the core catalog's macros and Box styles reference as `$<group>.<name>` (e.g. `$color.primary`, `$spacing.md`). VALUES come from a theme (VAPP-92); this file only fixes the vocabulary. `color` = the shadcn semantic set plus success/warning/info and the eight chart hues (round 1 added chart6..8); `spacing`/`radius`/`type` mirror packages/design-tokens' scales by NAME (xl2 because 2xl is not an identifier in Swift/Kotlin/Rust); `control` = the per-kind control heights the VAPP-4 spike asked for instead of px (round 1 adds `appBar`, `tabBar`, `toast`); `shadow` = the boxShadow presets, ALSO the elevation scale (none < sm < md < lg < xl: flat, card, popover, dialog, toast; paint order inside a layer stays tree order, overlays stack by layer, never by zIndex); `opacity` = the text-emphasis ladder; VAPP-92 adds `border` (the border-width ladder, px) and `motion` (durations, ms). Round 1 (docs/round-1-contract.md) adds `breakpoint` (px, the ONLY tokens a style CONDITION may reference: `\"@media (min-width: $breakpoint.md)\"`; resolved against the theme before matching), `ease` (cubic-bezier control points [x1, y1, x2, y2], referenced by `transitionEasing`) and `density` (multipliers over `control` and `spacing` for the surface density `compact`/`comfortable`; `default` = 1, never a token). Round 2 (docs/round-2-contract.md §2) adds `blur` (px radii, the ONLY values `backdropBlur` takes). EXP-1259 (EXP-1243, packages/design-tokens motion.scale) adds `scale` (unitless multipliers the PAINTERS read, never a style value): `press` = what a pressed button scales to, `popoverFrom` = what a popover or menu scales FROM while it fades in (never from 0); reduce motion = no scale. Every group is append-only: a theme is validated against these names.",Tp=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","destructive","destructiveForeground","success","successForeground","warning","warningForeground","info","infoForeground","border","input","ring","chart1","chart2","chart3","chart4","chart5","chart6","chart7","chart8"],Ip=["none","xxs","xs","sm","md","lg","xl","xl2","xl3"],Ep=["none","sm","md","lg","xl","xl2","xl3","full"],_p={size:["xs","sm","base","lg","xl","xl2","xl3"],lineHeight:["xs","sm","base","lg","xl","xl2","xl3"],weight:["regular","medium","semibold","bold"],family:["sans","mono"]},Dp=["buttonSm","buttonMd","buttonLg","buttonIcon","input","textarea","row","rowCompact","pill","badge","chip","toggle","switch","checkbox","slider","progress","meter","avatarSm","avatarMd","avatarLg","iconSm","iconMd","iconLg","hairline","appBar","tabBar","toast"],Pp=["none","sm","md","lg","xl"],Op=["primary","secondary","tertiary","quaternary","disabled"],Mp=["none","hairline","thick"],Fp=["fast","standard","slow"],zp=["sm","md","lg","xl"],Rp=["standard","decelerate","accelerate"],Np=["compact","comfortable"],Lp=["sm","md","lg","xl"],jp=["press","popoverFrom"],Bp={$comment:Ap,color:Tp,spacing:Ip,radius:Ep,type:_p,control:Dp,shadow:Pp,opacity:Op,border:Mp,motion:Fp,breakpoint:zp,ease:Rp,density:Np,blur:Lp,scale:jp},Hp="https://a2ui.org/specification/v0_9/basic_catalog.json",Wp="v0.9",Up="ui-icon-placeholder",qp={Text:{to:"Text",props:{text:"text"},transform:"textVariant"},Image:{to:"Image",props:{src:"url",alt:{from:"description",default:""},fit:{from:"fit",default:"cover"}},transform:"imageVariant"},Icon:{to:"Icon",props:{},transform:"iconName"},Video:{to:"Video",props:{src:"url"}},AudioPlayer:{to:"AudioPlayer",props:{src:"url",title:"description"}},Row:{to:"Stack",children:"children",props:{direction:{const:"horizontal"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},Column:{to:"Stack",children:"children",props:{direction:{const:"vertical"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},List:{to:"List",children:"children",props:{direction:{from:"direction",default:"vertical"},gap:{const:"sm"}}},Card:{to:"Card",children:"child",props:{}},Tabs:{to:"Tabs",props:{},transform:"tabs"},Modal:{to:"Dialog",props:{},transform:"modal"},Divider:{to:"Separator",props:{orientation:{from:"axis",default:"horizontal"}}},Button:{to:"Button",props:{variant:{from:"variant",map:{primary:"default",default:"secondary",borderless:"ghost"},default:"secondary"}},transform:"buttonChild"},TextField:{to:"Input",props:{label:"label",value:"value",checks:"checks"},transform:"textField"},CheckBox:{to:"Checkbox",props:{label:"label",checked:"value",checks:"checks"},transform:"fieldName"},ChoicePicker:{to:"Radio",props:{label:"label",options:"options",checks:"checks"},transform:"choicePicker"},Slider:{to:"Slider",props:{label:"label",min:{from:"min",default:0},max:"max",value:"value"}},DateTimeInput:{to:"DatePicker",props:{label:"label",value:"value",min:"min",max:"max"},transform:"fieldName"}},Kp={accountCircle:"ui-assignee",add:"ui-add",arrowBack:"ui-back",arrowForward:"ui-arrow-right",attachFile:"ui-attach",calendarToday:"calendar",call:"phone",camera:"camera",check:"ui-check",close:"ui-close",delete:"ui-delete",download:"ui-download",edit:"ui-edit",event:"ui-due-date",error:"ui-error",fastForward:"media-fast-forward",favorite:"heart",favoriteOff:"ui-favorite-off",folder:"ui-folder",help:"ui-help",home:"house",info:"ui-info",locationOn:"map-pin",lock:"ui-private",lockOpen:"ui-unlock",mail:"ui-mail",menu:"ui-menu",moreVert:"ui-more-vertical",moreHoriz:"ui-more",notificationsOff:"ui-unsubscribe",notifications:"ui-subscribe",pause:"run-pause",payment:"credit-card",person:"ui-avatar-placeholder",phone:"smartphone",photo:"image",play:"action-run",print:"ui-print",refresh:"ui-refresh",rewind:"media-rewind",search:"nav-search",send:"ui-send",settings:"nav-settings",share:"ui-share",shoppingCart:"shopping-cart",skipNext:"media-skip-next",skipPrevious:"media-skip-previous",star:"star",starHalf:"ui-star-half",starOff:"ui-star-off",stop:"ui-stop",upload:"sc-push",visibility:"ui-watch",visibilityOff:"ui-hide",volumeDown:"media-volume-down",volumeMute:"media-volume-mute",volumeOff:"media-volume-off",volumeUp:"media-volume-up",warning:"ui-warning"},_s={from:Hp,version:Wp,placeholderIcon:Up,components:qp,icons:Kp},Vp=JSON.parse('{"Stack":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"flexWrap":{"$cond":["props.wrap","wrap","nowrap"]},"gap":"$spacing.{props.gap|md}","alignItems":{"$coalesce":["{props.align}",{"$map":{"from":"props.direction","cases":{"horizontal":"center"},"default":"stretch"}}]},"justifyContent":{"$map":{"from":"props.justify","cases":{"between":"space-between","around":"space-around","evenly":"space-evenly"},"default":"{props.justify|start}"}}},"children":["$children"]}},"Grid":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))","gap":"$spacing.{props.gap|md}"},"children":["$children"]}},"Card":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}"},"style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.xl","overflow":"hidden"},"children":[{"part":"header","component":"Box","$any":["props.title","props.description"],"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","paddingTop":"$spacing.lg","paddingHorizontal":"$spacing.lg"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"title"}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","variant":"muted"}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Separator":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"separator"},"style":{"alignSelf":"stretch","flexShrink":0,"width":{"$map":{"from":"props.orientation","cases":{"vertical":1},"default":"auto"}},"height":{"$map":{"from":"props.orientation","cases":{"vertical":"auto"},"default":1}}}}},"Section":{"recipeProps":["tint","tree","open","collapsible"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.sm"},"children":[{"part":"header","component":"Box","$if":["props.title",{"$not":"props.collapsible"}],"$a11y":{"role":"heading","level":3},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"header","component":"Box","$if":["props.title","props.collapsible"],"$a11y":{"role":"button","expanded":"{props.open|true}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":{"$not":"props.open|true"}},"$set":{"press":{"prop":"open","value":{"$not":"props.open|true"}}},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"body","component":"List","$if":"props.open|true","$a11y":{"role":{"$cond":["props.tree","tree","list"]}},"props":{"divided":true,"gap":"none","style":"{props.style}"},"children":["$children"]}]}},"Group":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}","description":"{props.footer}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"label"},"style":{"paddingHorizontal":"$spacing.md"}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.lg","overflow":"hidden"},"children":["$children"]},{"part":"footer","component":"Text","$if":"props.footer","props":{"text":"{props.footer}","variant":"muted"},"style":{"paddingHorizontal":"$spacing.md"}}]}},"Heading":{"recipeProps":["level"],"root":{"part":"root","component":"Text","$a11y":{"role":"heading","level":{"$map":{"from":"props.level","cases":{"h1":1,"h2":2,"h3":3,"h4":4},"default":2}}},"props":{"text":"{props.text}","variant":"title"}}},"Collapsible":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":"$control.row","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.md"},"$recipe":{"open":"{props.open|false}"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$recipe":{"open":"{props.open|false}"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}}]},{"part":"body","component":"Box","$if":"props.open","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","paddingHorizontal":"$spacing.sm"},"children":["$children"]}]}},"Trace":{"recipeProps":["size"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0},"children":["$children"]}},"TraceItem":{"recipeProps":["status","size","collapsible","open"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"line","component":"Box","$if":{"$not":"props.collapsible"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}}]},{"part":"line","component":"Box","$if":"props.collapsible","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"chevron","component":"Icon","props":{"name":"trace-chevron","size":"sm"},"$recipe":{"open":"{props.open|false}"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0,"marginLeft":{"$map":{"from":"props.size","cases":{"sm":-2},"default":-4}}}}]},{"part":"content","component":"Box","$if":["props.collapsible","props.open"],"style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0,"marginTop":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"marginBottom":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}},"marginLeft":{"$map":{"from":"props.size","cases":{"sm":6},"default":7}},"borderLeftWidth":1,"paddingLeft":{"$map":{"from":"props.size","cases":{"sm":13},"default":16}},"paddingRight":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}}},"children":["$children"]}]}},"Pagination":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.pagination"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"prev","component":"Button","props":{"icon":"ui-chevron-left","variant":"outline","size":"icon","label":"$string.previous","disabled":{"$not":{"$lt":[1,"{props.page|1}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}}}},{"part":"label","component":"Text","props":{"text":"{props.page|1} / {props.totalPages}","variant":"muted"},"$a11y":{"role":"status","label":{"$fill":["$string.pageOf",{"page":"{props.page|1}","total":"{props.totalPages}"}]}}},{"part":"next","component":"Button","props":{"icon":"ui-chevron-right","variant":"outline","size":"icon","label":"$string.next","disabled":{"$not":{"$lt":["{props.page|1}","{props.totalPages}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}}}}]}},"Badge":{"recipeProps":["variant"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","height":"$control.badge","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.full","alignSelf":"flex-start"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.text}","variant":"caption","lines":1}}]}},"Alert":{"recipeProps":["type"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$map":{"from":"props.type","cases":{"warning":"alert","error":"alert"},"default":"status"}}},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.lg"},"children":[{"part":"icon","component":"Icon","props":{"name":{"$map":{"from":"props.type","cases":{"success":"ui-success","warning":"ui-warning","error":"ui-error"},"default":"ui-info"}},"size":"sm","tone":{"$map":{"from":"props.type","cases":{"success":"success","warning":"warning","error":"danger"},"default":"info"}}}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label"}},{"part":"message","component":"Text","$if":"props.message","props":{"text":"{props.message}","variant":"muted"}}]}]}},"Chip":{"recipeProps":["shape","selected","tone"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"pressed":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs","paddingHorizontal":"$spacing.sm","alignSelf":"flex-start","height":{"$map":{"from":"props.shape","cases":{"rect":"$control.chip"},"default":"$control.pill"}},"borderRadius":{"$map":{"from":"props.shape","cases":{"rect":"$radius.md"},"default":"$radius.full"}}},"children":["$slot:leading",{"part":"dot","component":"Box","$if":"props.dot","style":{"width":8,"height":8,"borderRadius":"$radius.full","backgroundColor":"{props.dot}","flexShrink":0}},{"part":"image","component":"Image","$if":"props.image","props":{"src":"{props.image}","alt":"{props.label}","width":16,"height":16,"fit":"cover"},"style":{"borderRadius":"$radius.full"}},{"part":"icon","component":"Icon","$if":["props.icon","!props.image"],"props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","lines":1}},{"part":"detail","component":"Text","$if":"props.detail","props":{"text":"{props.detail}","variant":"muted","lines":1}},{"part":"remove","component":"Button","$if":"props.removable","props":{"icon":"ui-close","variant":"ghost","size":"icon","label":"$string.remove"},"$on":{"press":"remove"}}]}},"EmptyState":{"recipeProps":["size"],"root":{"part":"root","component":"Box","$a11y":{"role":"status"},"style":{"display":"flex","flexDirection":"column","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"list":"$spacing.xs"},"default":"$spacing.md"}},"paddingVertical":{"$map":{"from":"props.size","cases":{"list":"$spacing.xl"},"default":"$spacing.xl3"}},"paddingHorizontal":{"$map":{"from":"props.size","cases":{"list":"$spacing.md"},"default":"$spacing.xl"}}},"children":[{"part":"disc","component":"Box","$if":{"$not":{"$eq":["{props.size|page}","list"]}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":48,"height":48,"borderRadius":"$radius.full","flexShrink":0},"children":[{"part":"icon","component":"Icon","props":{"name":"{props.icon}","size":"lg","tone":"neutral"}}]},{"part":"icon","component":"Icon","$if":{"$eq":["{props.size|page}","list"]},"props":{"name":"{props.icon}","size":"default","tone":"neutral"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":{"$map":{"from":"props.size","cases":{"list":"muted"},"default":"title"}},"align":"center"}},{"part":"description","component":"Text","$if":["props.description",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"text":"{props.description}","variant":"muted","align":"center"}},{"part":"action","component":"Button","$if":["props.actionLabel",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"label":"{props.actionLabel}","variant":"outline"},"$on":{"press":"press"}}]}},"Progress":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","$a11y":{"role":"progressbar","label":"{props.label}","valueNow":"{props.value}","valueMin":0,"valueMax":"{props.max|100}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"}},{"part":"track","component":"Box","style":{"height":"$control.progress","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"fill","component":"Box","style":{"height":"100%","width":{"$percent":["{props.value}","{props.max|100}"]},"borderRadius":"$radius.full"}}]}]}},"Meter":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"meter","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"header","component":"Box","$any":["props.label","props.value"],"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"},"style":{"flexGrow":1,"minWidth":0}},{"part":"value","component":"Text","$if":"props.value","props":{"text":"{props.value}","variant":"muted"}}]},{"part":"track","component":"Box","style":{"display":"flex","flexDirection":"row","height":"$control.meter","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"segment","component":"Box","$each":"props.segments","$as":"item","style":{"height":"100%","width":{"$percent":["{item.value}","{props.max|100}"]}},"$recipe":{"tone":"{item.tone|neutral}"}}]}]}},"Row":{"recipeProps":["selected","density","surface","depth"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"selected":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":{"$map":{"from":"props.density","cases":{"compact":"$control.rowCompact"},"default":"$control.row"}},"paddingHorizontal":"$spacing.md","borderRadius":{"$map":{"from":"props.surface","cases":{"card":"$radius.lg"},"default":"$radius.md"}}},"children":[{"part":"guides","component":"TreeGuides","$if":{"$lt":[0,"{props.depth|0}"]},"props":{"depth":"{props.depth}"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"identifier","component":"Text","$if":"props.identifier","props":{"text":"{props.identifier}","variant":"code","lines":1},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0,"paddingVertical":{"$map":{"from":"props.surface","cases":{"card":"$spacing.md"},"default":"$spacing.xs"}}},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"body","lines":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1}}]},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}},{"part":"value","component":"Text","$any":["props.value","props.placeholder"],"props":{"text":{"$coalesce":["{props.value}","{props.placeholder}"]},"variant":{"$cond":["props.value","body","muted"]},"lines":1,"align":"end"}},"$slot:trailing",{"part":"chevron","component":"Icon","$if":{"$not":{"$eq":["{props.chevron|none}","none"]}},"props":{"name":{"$map":{"from":"props.chevron","cases":{"selector":"ui-selector"},"default":"ui-chevron-right"}},"size":"sm","tone":"neutral"}}]}},"ScrollArea":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"region"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"overflowX":{"$map":{"from":"props.direction","cases":{"horizontal":"auto","both":"auto"},"default":"hidden"}},"overflowY":{"$map":{"from":"props.direction","cases":{"vertical":"auto","both":"auto"},"default":"hidden"}},"minWidth":0,"minHeight":0,"maxHeight":"{props.maxHeight}"},"children":["$children"]}},"Sidebar":{"recipeProps":["side"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.side","cases":{"right":"row-reverse"},"default":"row"}},"alignItems":"stretch","width":"100%","minHeight":0},"children":[{"part":"sidebar","component":"Box","$if":"!props.collapsed","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|240}","flexShrink":0,"minHeight":0,"@media (max-width: $breakpoint.{props.collapseBelow|md})":{"$cond":[{"$not":{"$eq":["{props.collapseBelow|md}","never"]}},{"display":"none"}]}},"children":["$slot:sidebar"]},{"part":"main","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0},"children":["$children"]}]}},"AppBar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"banner"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.appBar","paddingHorizontal":"$spacing.md","width":"100%"},"children":[{"part":"back","component":"Button","$if":"props.back","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"}},"$slot:leading",{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"title","lines":1},"$a11y":{"role":"heading","level":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1}}]},"$slot:trailing"]}},"Kbd":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","height":"$control.badge","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","alignSelf":"flex-start"},"children":[{"part":"label","component":"Text","props":{"text":"{props.keys}","variant":"code","lines":1}}]}},"Label":{"recipeProps":["required"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs"},"children":[{"part":"text","component":"Text","props":{"text":"{props.text}","variant":"label"}},{"part":"mark","component":"Text","$if":"props.required","props":{"text":"*","variant":"label","tone":"danger"}}]}},"Breadcrumb":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.breadcrumb"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","flexWrap":"wrap","gap":"$spacing.xs"},"children":[{"part":"item","component":"Box","$each":"props.items","$as":"item","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs"},"$recipe":{"current":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"children":[{"part":"separator","component":"Icon","$if":{"$lt":[0,"{index}"]},"props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$a11y":{"hidden":true}},{"part":"link","component":"Button","$if":{"$not":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"props":{"label":"{item.label}","icon":"{item.icon}","variant":"link","size":"sm"},"$on":{"press":"select"},"$context":{"value":"{item.value}"}},{"part":"current","component":"Text","$if":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]},"props":{"text":"{item.label}","variant":"label","lines":1},"$a11y":{"current":"page"}}]}]}},"Stepper":{"recipeProps":["orientation"],"root":{"part":"root","component":"Box","$a11y":{"role":"list"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"column"},"default":"row"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"stretch"},"default":"flex-start"}},"gap":"$spacing.md","width":"100%"},"children":[{"part":"step","component":"Box","$each":"props.steps","$as":"step","style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"row"},"default":"column"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"flex-start"},"default":"center"}},"gap":"$spacing.xs","flexGrow":1,"flexBasis":0,"minWidth":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"$a11y":{"role":"listitem","current":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"step",false]},"label":{"$fill":[{"$cond":[{"$lt":["{index}","{props.current|0}"]},"$string.stepDone",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"$string.stepCurrent","$string.stepUpcoming"]}]},{"step":{"$add":["{index}",1]},"total":"{len(props.steps)}","label":"{step.label}"}]}},"children":[{"part":"marker","component":"Box","$a11y":{"hidden":true},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":"$control.iconLg","height":"$control.iconLg","borderRadius":"$radius.full","flexShrink":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"children":[{"part":"check","component":"Icon","$if":{"$lt":["{index}","{props.current|0}"]},"props":{"name":"ui-check","size":"sm"}},{"part":"number","component":"Text","$if":{"$not":{"$lt":["{index}","{props.current|0}"]}},"props":{"text":{"$text":{"$add":["{index}",1]}},"variant":"caption"},"$recipe":{"status":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"label","component":"Text","props":{"text":"{step.label}","variant":"label","lines":1},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}}},{"part":"description","component":"Text","$if":"step.description","props":{"text":"{step.description}","variant":"muted","lines":2}}]}]}]}},"Rating":{"recipeProps":["size","readOnly"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.readOnly","img","group"]},"label":{"$cond":["props.readOnly",{"$fill":["$string.ratingValue",{"value":"{props.value|0}","max":"{props.max|5}"}]}]}},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","alignSelf":"flex-start"},"children":[{"part":"star","component":"Box","$each":"range(props.max|5)","$as":"star","props":{"pressable":{"$not":"props.readOnly"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}},"$a11y":{"role":{"$cond":["props.readOnly","hidden","button"]},"label":{"$fill":["$string.ratingStar",{"value":{"$add":["{index}",1]},"max":"{props.max|5}"}]},"pressed":{"$eq":[{"$add":["{index}",1]},"{props.value|0}"]}},"$on":{"press":"change"},"$context":{"value":{"$add":["{index}",1]}},"$set":{"press":{"prop":"value","value":{"$add":["{index}",1]}}},"children":[{"part":"icon","component":"Icon","props":{"name":"star","size":"{props.size|default}"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}}}]}]}},"AlertDialog":{"recipeProps":["destructive"],"root":{"part":"root","component":"Dialog","$a11y":{"role":"alertdialog"},"props":{"title":"{props.title}","description":"{props.description}","open":"{props.open|false}","dismissible":false},"slots":{"trigger":"$slot:trigger","footer":{"part":"footer","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"flex-end","flexWrap":"wrap","gap":"$spacing.sm"},"children":[{"part":"cancel","component":"Button","props":{"label":"{props.cancelLabel|$string.cancel}","variant":"outline"},"$a11y":{"autoFocus":true},"$on":{"press":"cancel"},"$set":{"press":{"prop":"open","value":false}}},{"part":"confirm","component":"Button","props":{"label":"{props.confirmLabel|$string.confirm}","variant":{"$cond":["props.destructive","destructive","default"]}},"$on":{"press":"confirm"},"$set":{"press":{"prop":"open","value":false}}}]}},"$on":{"change":"change"},"children":["$children"]}},"DockCard":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","label":"{props.label}: {props.title}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.xl"},"$on":{"press":"press"},"$set":{"press":{"prop":"open","value":true}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm","tone":"{props.tone|neutral}"},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","tone":"{props.tone|neutral}","lines":1}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}}]},{"part":"row","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}}]}]}]},{"part":"sheet","component":"Drawer","props":{"title":"{props.label}","description":"{props.caption}","open":"{props.open|false}","side":"bottom"},"slots":{"footer":"$slot:footer"},"$on":{"change":"change"},"children":["$children"]}]}},"Sparkline":{"recipeProps":["tone"],"root":{"part":"root","component":"Chart","props":{"kind":"sparkline","series":[{"name":"","values":"{props.values}","tone":"{props.tone|primary}"}],"height":"{props.height|24}","showAxes":false,"showGrid":false,"showLegend":false},"style":{"width":"100%"}}},"Page":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"width":"100%"},"children":[{"part":"header","component":"AppBar","props":{"title":"{props.title}","subtitle":"{props.subtitle}","back":"{props.back|false}"},"slots":{"leading":"$slot:leading","trailing":"$slot:trailing"},"$on":{"back":"back"}},{"part":"body","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"overflowY":"auto","gap":"$spacing.lg","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Toolbar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","alignItems":"flex-end","gap":"$spacing.{props.gap|sm}","width":"100%"},"children":["$children",{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]}},"SplitView":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"stretch","width":"100%","flexGrow":1,"minHeight":0},"children":[{"part":"list","component":"Box","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|320}","flexShrink":0,"minHeight":0,"overflowY":"auto","@media (max-width: $breakpoint.md)":{"width":"100%","flexShrink":1,"display":{"$cond":["props.open","none","flex"]}}},"children":["$slot:list"]},{"part":"divider","component":"Separator","props":{"orientation":"vertical"},"style":{"@media (max-width: $breakpoint.md)":{"display":"none"}}},{"part":"detail","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0,"@media (max-width: $breakpoint.md)":{"display":{"$cond":["props.open","flex","none"]}}},"children":[{"part":"backBar","component":"Box","style":{"display":"none","flexDirection":"row","alignItems":"center","height":"$control.appBar","paddingHorizontal":"$spacing.sm","@media (max-width: $breakpoint.md)":{"display":"flex"}},"children":[{"part":"back","component":"Button","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"},"$set":{"press":{"prop":"open","value":false}}}]},"$children"]}]}},"FieldGroup":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"grid","gridTemplateColumns":"repeat(1, minmax(0, 1fr))","gap":"$spacing.md","alignItems":"start","@media (min-width: $breakpoint.md)":{"gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))"}},"children":["$children"]}},"FormActions":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","justifyContent":"flex-end","alignItems":"center","gap":"$spacing.sm","width":"100%"},"children":["$children",{"part":"cancel","component":"Button","$if":"props.cancel","props":{"label":"$string.cancel","variant":"outline"},"$on":{"press":"cancel"}},{"part":"submit","component":"Button","props":{"label":"{props.submit}","variant":{"$cond":["props.destructive","destructive","default"]},"submit":true}}]}},"StatTile":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"card","component":"Card","children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"muted","lines":1},"style":{"flexGrow":1,"flexShrink":1,"minWidth":0}},{"part":"delta","component":"Text","$if":"props.delta","props":{"text":"{props.delta}","variant":"caption","tone":"{props.tone|neutral}"}}]},{"part":"value","component":"Text","props":{"text":"{props.value}","variant":"title","lines":1}},{"part":"trend","component":"Sparkline","$if":"props.trend","props":{"values":"{props.trend}","height":32}}]}]}}}'),Gp={macros:Vp},Qe=Cp,yr=Qe.id,Hc=Qe.liteId,Ds=_s.from,Wc=_s.version,br=Qe.unknownComponent,Yp=Gp.macros,Ue=(()=>{const e={};for(const[t,n]of Object.entries(Bp))if(!t.startsWith("$"))if(Array.isArray(n))e[t]=n;else for(const[r,o]of Object.entries(n))e[`${t}.${r}`]=o;return e})(),Xp=/^\$([a-z][a-zA-Z0-9]*(?:\.[a-z][a-zA-Z0-9]*)*)\.([a-zA-Z0-9]+)$/;function Kt(e){if(typeof e!="string")return null;const t=Xp.exec(e);return t?{group:t[1],name:t[2]}:null}function Uc(e){const t=Kt(e);return t!==null&&(Ue[t.group]?.includes(t.name)??!1)}function Qr(e){return Object.assign(Object.create(null),e)}function Gn(e=[]){const t={components:Qr(Qe.components),enums:Qr(Qe.enums),defs:Qr(Qe.defs),macros:Qr(Yp)};for(const n of e)Object.assign(t.components,n.components),Object.assign(t.enums,n.enums??{}),Object.assign(t.defs,n.defs??{}),Object.assign(t.macros,n.macros??{});return t}let Zp;const Na=new WeakMap;function Fr(e=[]){if(e.length===0)return Zp??=Gn();let t=Na.get(e);return t||Na.set(e,t=Gn(e)),t}const Jp=["Box","Stack","Grid","Card","Separator","List","Resizable","ScrollArea","Sidebar","SplitView","AppBar","Page","Toolbar","Section","Group","Text","Heading","Markdown","CodeBlock","Kbd","Label","Image","Icon","Video","AudioPlayer","Avatar","Carousel","Tabs","Segmented","Accordion","Collapsible","Trace","TraceItem","Pagination","Breadcrumb","Stepper","Dialog","Drawer","DockCard","AlertDialog","Popover","Tooltip","Menu","Toast","Badge","Alert","Chip","EmptyState","Progress","Meter","Ring","Spinner","Skeleton","Table","Chart","Sparkline","StatTile","Button","Link","Toggle","Form","FieldGroup","FormActions","Input","Textarea","NumberField","Checkbox","Radio","ChoiceTiles","Switch","Slider","Rating","Select","SearchList","ChipInput","DatePicker","DateRangePicker","TimePicker","FileUpload","Composer","Row","TreeGuides","Unknown"],Qp=["a-large-small","action-chat","action-create","action-default","action-repository","action-run","action-suggestion","activity","anchor","app-editor-chat","archive","arrow-down","arrow-down-left","arrow-left","arrow-left-right","arrow-right","arrow-up-right","at-sign","atom","auth-passkey","award","ban","bell","bell-off","bold","book-open","bookmark","bot","boxes","braces","brain","briefcase","brush-cleaning","bug","building","building-2","calculator","calendar","calendar-days","camera","car","chart-line","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-up-down","circle","circle-arrow-up","circle-check","circle-dashed","circle-dot","circle-minus","circle-question-mark","circle-slash","circle-stop","circle-user","circle-x","clipboard-list","clock","cloud","code","coding-assistant","coding-command","coding-compact","coding-diff","coding-ended","coding-in-review","coding-needs-input","coding-plan","coding-running","coding-stop","coding-subagent","coding-tool","coffee","compass","computer","copy","corner-down-right","cpu","credit-card","crown","database","download","droplet","dumbbell","editor-bold","editor-clear-formatting","editor-code","editor-emoji","editor-heading-1","editor-heading-2","editor-heading-3","editor-image","editor-issue-ref","editor-italic","editor-link","editor-list","editor-list-ordered","editor-list-todo","editor-mention","editor-quote","editor-strikethrough","editor-text","editor-text-format","editor-unlink","ellipsis","ellipsis-vertical","event-assignee-changed","event-board-moved","event-estimate-changed","event-label-added","event-label-removed","event-priority-changed","event-relation-added","event-relation-removed","event-status-changed","event-title-changed","external-link","eye","eye-off","fast-forward","file","file-diff","file-pen-line","file-text","fingerprint","flag","flame","flask-conical","fold-vertical","folder","folder-kanban","folder-open","gamepad-2","gauge","gem","gift","git-branch","git-merge","git-pull-request","github","globe","graduation-cap","guide-changes","hammer","hard-drive","hash","heading-1","heading-2","heading-3","headphones","heart","heart-off","history","hourglass","house","image","images","inbox","info","italic","key","landmark","laptop","layers","layers-2","layout-grid","leaf","lightbulb","link","link-2","list","list-checks","list-end","list-ordered","list-todo","list-tree","loader-circle","lock","lock-open","log-in","log-out","mail","map","map-pin","maximize-2","media-fast-forward","media-rewind","media-skip-next","media-skip-previous","media-volume-down","media-volume-mute","media-volume-off","media-volume-up","megaphone","menu","message-circle","message-square","message-square-plus","message-square-reply","mic","microscope","minimize-2","minus","monitor","monitor-off","moon","mountain","move","music","nav-account","nav-actions","nav-admin","nav-apps","nav-boards","nav-changelog","nav-computer","nav-create-issue","nav-devices","nav-drafts","nav-files","nav-getting-started","nav-inbox","nav-issues","nav-my-issues","nav-notifications","nav-rail-collapse","nav-rail-expand","nav-report-bug","nav-search","nav-settings","nav-sign-out","nav-source-control","nav-team-switcher","nav-terminal","nav-threads","newspaper","notification-agent-message","notification-issue-assigned","notification-issue-comment","notification-issue-created","notification-issue-mention","notification-issue-status-changed","notification-mark-read","notification-mute","notification-pr-merged","notification-pr-opened","notification-reporter-reply","notification-session-blocked","os-apple","os-linux","os-windows","package","paintbrush","palette","panel-left-close","panel-left-open","paperclip","pause","pen-tool","pencil","phone","pin","pin-off","plane","play","plug","plus","pr-batch","pr-closed","pr-draft","pr-merged","pr-open","pr-stack","printer","priority-high","priority-low","priority-medium","priority-none","priority-urgent","progress-1-4","progress-1-5","progress-2-4","progress-2-5","progress-3-4","progress-3-5","progress-4-5","puzzle","quote","refresh-cw","relation-blocked-by","relation-blocks","relation-duplicate","relation-parent","relation-related","relation-section","relation-sub-issue","remove-formatting","repeat","rewind","rocket","rotate-ccw","run-pause","run-resume","sc-push","scale","search","search-x","send","server","session-shell","session-tree","settings","settings-about","settings-account","settings-agents","settings-api","settings-billing","settings-boards","settings-general","settings-import","settings-issues","settings-labels","settings-licenses","settings-local-repos","settings-mcp","settings-members","settings-notifications","settings-rate","settings-repositories","settings-servers","settings-sessions","settings-statuses","settings-storage","settings-sync","settings-tools","settings-widget","share-2","shield","shield-check","shield-question-mark","shopping-bag","shopping-cart","signal-high","signal-low","signal-medium","skip-back","skip-forward","sliders-horizontal","smartphone","smile","sparkles","square-kanban","square-pen","square-slash","square-terminal","star","star-half","star-off","status-backlog","status-cancelled","status-done","status-duplicate","status-in-progress","status-in-review","status-todo","stethoscope","store","strikethrough","sun","support-open","support-resolved","tag","target","terminal","tool-script","trace-background","trace-chevron","trace-completed","trace-edit","trace-failed","trace-fetch","trace-read","trace-reasoning","trace-search","trace-subagent","trace-task-done","trace-task-pending","trace-task-running","trace-terminal","trace-todo","trace-tool","trash-2","tree-pine","triangle-alert","trigger-event","trigger-schedule","trophy","truck","type","ui-add","ui-agent-source","ui-archive","ui-arrow-down","ui-arrow-right","ui-assignee","ui-attach","ui-avatar-placeholder","ui-back","ui-branch","ui-check","ui-checklist","ui-chevron-down","ui-chevron-left","ui-chevron-right","ui-chevron-up","ui-clean","ui-clear","ui-clock","ui-close","ui-cloud","ui-copy","ui-delete","ui-delete-account","ui-device","ui-device-default","ui-device-offline","ui-dock-side","ui-docs","ui-download","ui-due-date","ui-edit","ui-empty-search","ui-error","ui-estimate","ui-external-link","ui-favorite-off","ui-file","ui-float","ui-folder","ui-folder-open","ui-fullscreen","ui-fullscreen-exit","ui-github","ui-help","ui-hide","ui-history","ui-icon-placeholder","ui-indeterminate","ui-info","ui-invite","ui-issue","ui-link","ui-loading","ui-mail","ui-mcp","ui-member","ui-menu","ui-minus","ui-more","ui-more-vertical","ui-offline","ui-organization","ui-owner","ui-permission","ui-pin","ui-print","ui-private","ui-properties","ui-queued","ui-redock","ui-refresh","ui-remove-member","ui-repeat","ui-repository","ui-selected","ui-selector","ui-send","ui-server","ui-share","ui-sign-in","ui-sign-out","ui-staging","ui-star-half","ui-star-off","ui-stop","ui-submit","ui-subscribe","ui-success","ui-swap","ui-team","ui-unassigned","ui-undo","ui-undock","ui-unlock","ui-unpin","ui-unselected","ui-unsubscribe","ui-update","ui-usage","ui-warning","ui-watch","ui-widget","undo-2","unlink","upload","user","user-minus","user-plus","user-x","users","video","volume-1","volume-2","volume-off","volume-x","wallet","wifi-off","work-faces","work-results","workflow","wrench","x","zap"],eh=["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter"],th={display:{enum:["flex","grid","block","none"]},flexDirection:{enum:["row","column","row-reverse","column-reverse"]},flexWrap:{enum:["nowrap","wrap","wrap-reverse"]},justifyContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignItems:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},alignContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignSelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},justifySelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},flexGrow:{type:"number"},flexShrink:{type:"number"},flexBasis:{type:"length"},gap:{type:"length"},rowGap:{type:"length"},columnGap:{type:"length"},direction:{enum:["ltr","rtl"]},overflow:{enum:["visible","hidden","clip","scroll","auto"]},overflowX:{enum:["visible","hidden","clip","scroll","auto"]},overflowY:{enum:["visible","hidden","clip","scroll","auto"]},width:{type:"length"},height:{type:"length"},minWidth:{type:"length"},minHeight:{type:"length"},maxWidth:{type:"length"},maxHeight:{type:"length"},aspectRatio:{type:"ratio"},position:{enum:["relative","absolute","sticky"]},top:{type:"length"},right:{type:"length"},bottom:{type:"length"},left:{type:"length"},inset:{type:"length"},insetInlineStart:{type:"length"},insetInlineEnd:{type:"length"},insetBlockStart:{type:"length"},insetBlockEnd:{type:"length"},padding:{type:"length"},paddingTop:{type:"length"},paddingRight:{type:"length"},paddingBottom:{type:"length"},paddingLeft:{type:"length"},paddingHorizontal:{type:"length"},paddingVertical:{type:"length"},paddingInlineStart:{type:"length"},paddingInlineEnd:{type:"length"},margin:{type:"length"},marginTop:{type:"length"},marginRight:{type:"length"},marginBottom:{type:"length"},marginLeft:{type:"length"},marginHorizontal:{type:"length"},marginVertical:{type:"length"},marginInlineStart:{type:"length"},marginInlineEnd:{type:"length"},gridTemplateColumns:{type:"tracks"},gridTemplateRows:{type:"tracks"},gridTemplateAreas:{type:"areas"},gridArea:{type:"string"},gridColumn:{type:"string"},gridRow:{type:"string"}},nh={backgroundColor:{type:"color"},backgroundGradient:{type:"gradient"},color:{type:"color"},borderWidth:{type:"number",layoutEffect:!0},borderTopWidth:{type:"number",layoutEffect:!0},borderRightWidth:{type:"number",layoutEffect:!0},borderBottomWidth:{type:"number",layoutEffect:!0},borderLeftWidth:{type:"number",layoutEffect:!0},borderColor:{type:"color"},borderStyle:{enum:["solid","dashed","dotted"]},borderRadius:{type:"length"},borderTopLeftRadius:{type:"length"},borderTopRightRadius:{type:"length"},borderBottomRightRadius:{type:"length"},borderBottomLeftRadius:{type:"length"},opacity:{type:"number"},boxShadow:{type:"token",group:"shadow"},fontSize:{type:"length"},fontWeight:{enum:[300,400,500,600,700,800]},lineHeight:{type:"length"},letterSpacing:{type:"length"},textAlign:{enum:["left","right","center","start","end","justify"]},textDecoration:{enum:["none","underline","line-through"]},textTransform:{enum:["none","uppercase","lowercase","capitalize"]},fontStyle:{enum:["normal","italic"]},fontFamily:{type:"token",group:"type.family"},transition:{type:"token",group:"motion"},transitionEasing:{type:"token",group:"ease"},transform:{type:"transform"},visibility:{enum:["visible","hidden"]},pointerEvents:{enum:["auto","none"]},userSelect:{enum:["auto","none","text"]},cursor:{enum:["auto","default","pointer","text","not-allowed","grab","grabbing","move","col-resize","row-resize"]},backdropBlur:{type:"token",group:"blur"},animation:{enum:["pulse","spin","fade-in","slide-in-up","slide-in-down","slide-in-left","slide-in-right","shimmer"]},animationDuration:{type:"token",group:"motion"}},rh={$comment:"Round 2 (docs/round-2-contract.md §2): the keyframes behind the `animation` key. Channels: `opacity` (multiplies the node's), `translateX`/`translateY` (px), `rotate` (deg), `scale`, applied OUTSIDE the node's own `transform` about the box centre; `band` = the shimmer highlight's position across the box (-1 = one box width before it, 1 = one after), painted over the content and clipped to the border box. Duration = the theme's `duration` token (or the node's `animationDuration`) × `factor`; `easing` applies PER keyframe segment (CSS) and is a `$ease` token or `linear`; `iterations` = a count or `infinite`. An animation starts when the node enters the tree (first paint, `visible` turning true, a template item appearing). Reduced motion: no animation, the node shows the keyframe at `rest` (0 = the first, 1 = the last; shimmer draws no band). Channels are PHYSICAL, like `transform`: `direction` never mirrors them (in rtl too, `slide-in-left` moves leftwards and the shimmer band sweeps left → right).",pulse:{duration:"$motion.slow",factor:7,easing:"$ease.standard",iterations:"infinite",rest:0,keyframes:[{offset:0,opacity:1},{offset:.5,opacity:.5},{offset:1,opacity:1}]},spin:{duration:"$motion.slow",factor:4,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,rotate:0},{offset:1,rotate:360}]},"fade-in":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0},{offset:1,opacity:1}]},"slide-in-up":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:8},{offset:1,opacity:1,translateY:0}]},"slide-in-down":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:-8},{offset:1,opacity:1,translateY:0}]},"slide-in-left":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:8},{offset:1,opacity:1,translateX:0}]},"slide-in-right":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:-8},{offset:1,opacity:1,translateX:0}]},shimmer:{duration:"$motion.slow",factor:5,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,band:-1},{offset:1,band:1}],band:{color:"$color.background",stops:[{offset:0,alpha:0},{offset:.5,alpha:.5},{offset:1,alpha:0}]}}},oh={media:"^@media \\((min-width|max-width|min-height|max-height): (\\d+(\\.\\d+)?px|\\$breakpoint\\.[a-zA-Z0-9]+)\\)$|^@media \\(orientation: (portrait|landscape)\\)$|^@media \\(hover: (hover|none)\\)$|^@media \\(prefers-reduced-motion: (reduce|no-preference)\\)$",states:[":hover",":focus-visible",":pressed"],transform:"^((translate\\(-?\\d+(\\.\\d+)?px, -?\\d+(\\.\\d+)?px\\)|scale\\(-?\\d+(\\.\\d+)?\\)|rotate\\(-?\\d+(\\.\\d+)?deg\\))( (?=\\S)|$))+$"},ih={durationMs:2e3,angleDeg:20,spreadPx:60,highlightLightnessMin:.8,highlightLightnessBoost:.4,highlightAlphaBoost:.4,lightAlphaFactor:.2},Tn={layout:th,visual:nh,animations:rh,conditions:oh,textShimmer:ih},qc=Tn.layout,Ps=Tn.visual,sh=[...Object.keys(qc),...Object.keys(Ps)];Object.entries(Ps).filter(([,e])=>e.layoutEffect).map(([e])=>e);const Os={...qc,...Ps},ah=new Set(sh),Ms=new RegExp(Tn.conditions.media),Kc=new RegExp(Tn.conditions.transform),lh=Tn.conditions.states,ch=/^-?\d+(\.\d+)?(px|%)$/,uh=/^\d+(\.\d+)?\/\d+(\.\d+)?$/,La=new Set(["spacing","radius","control","type.size","type.lineHeight","opacity","border"]);function co(e,t){const n=Kt(e);return n!==null&&t.has(n.group)&&Uc(e)}function Vc(e){return co(e,new Set(["color"]))}function dh(e,t){const n=`${e}: expected {angle, stops: [{color, offset 0..1}, …]} with two or more stops`;if(typeof t!="object"||t===null||Array.isArray(t))return n;const r=t;if(typeof r.angle!="number"||!Number.isFinite(r.angle)||!Array.isArray(r.stops)||r.stops.length<2)return n;for(const o of r.stops){if(typeof o!="object"||o===null)return n;const i=o;if(!Vc(i.color)||typeof i.offset!="number"||i.offset<0||i.offset>1)return n}for(const o of Object.keys(r))if(o!=="angle"&&o!=="stops")return n;return null}function fh(e,t){const n=Os[e];if(n.enum)return n.enum.includes(t)?null:`${e}: expected one of ${n.enum.join("|")}`;switch(n.type){case"number":return typeof t=="number"&&Number.isFinite(t)||co(t,La)?null:`${e}: expected a number or a numeric token`;case"length":return typeof t=="number"&&Number.isFinite(t)||t==="auto"||typeof t=="string"&&ch.test(t)||co(t,La)?null:`${e}: expected px, "N%", "auto" or a numeric token`;case"color":return Vc(t)?null:`${e}: expected $color.<name>`;case"gradient":return dh(e,t);case"token":return co(t,new Set([n.group??""]))?null:`${e}: expected $${n.group}.<name>`;case"transform":return typeof t=="string"&&Kc.test(t)?null:`${e}: expected translate(Xpx, Ypx), scale(N) and/or rotate(Ndeg)`;case"ratio":return typeof t=="number"&&t>0||typeof t=="string"&&uh.test(t)?null:`${e}: expected a number or "w/h"`;case"tracks":case"string":return typeof t=="string"?null:`${e}: expected a string`;case"areas":return Array.isArray(t)&&t.every(r=>typeof r=="string")?null:`${e}: expected an array of row strings`;default:return`${e}: unknown spec`}}function ja(e){return Os[e]?.enum}function ph(e){return Ms.test(e)||lh.includes(e)}function Gc(e,t={}){const n=[],r=t.path??"style",o=(i,s,a)=>{for(const[l,c]of Object.entries(i)){if(c===void 0)continue;if(ph(l)){const d=/\$breakpoint\.([a-zA-Z0-9]+)/.exec(l);d&&!Ue.breakpoint.includes(d[1])&&n.push({path:`${s}.${l}`,message:`unknown breakpoint $breakpoint.${d[1]}; known: ${Ue.breakpoint.join("|")}`}),a?n.push({path:`${s}.${l}`,message:"conditions do not nest"}):typeof c!="object"||c===null||Array.isArray(c)?n.push({path:`${s}.${l}`,message:"must be an object"}):o(c,`${s}.${l}`,!0);continue}if(!ah.has(l)){n.push({path:`${s}.${l}`,message:l.startsWith("@media")||l.startsWith(":")?"not a supported condition":"not in the Box style whitelist"});continue}Os[l].rootOnly&&t.root===!1&&n.push({path:`${s}.${l}`,message:"allowed on the root only"});const u=fh(l,c);u&&n.push({path:`${s}.${l}`,message:u})}};return typeof e!="object"||e===null||Array.isArray(e)?[{path:r,message:"expected an object"}]:(o(e,r,!1),n)}const hh=/^@media \(([a-z-]+): ([^)]+)\)$/;function Fs(e){if(!Ms.test(e))return null;const t=hh.exec(e);return t?{feature:t[1],value:t[2]}:null}function gh(e,t){const n=Kt(e);if(n){if(n.group!=="breakpoint")return null;const o=t.breakpoints?.[n.name];return typeof o=="number"?o:null}const r=parseFloat(e);return Number.isFinite(r)?r:null}function mh(e,t){switch(e.feature){case"min-width":case"max-width":case"min-height":case"max-height":{const n=gh(e.value,t);if(n===null)return!1;const r=e.feature.endsWith("width")?t.width:t.height;return r===void 0?!1:e.feature.startsWith("min")?r>=n:r<n}case"orientation":{const n=t.height!==void 0&&t.height>=t.width;return e.value===(n?"portrait":"landscape")}case"hover":return e.value===(t.hover?"hover":"none");case"prefers-reduced-motion":return e.value===(t.reducedMotion?"reduce":"no-preference")}}function yh(e,t){let n=null;for(const r of Ue.breakpoint){const o=t[r];typeof o=="number"&&e>=o&&(n=r)}return n}const bh={back:"Back",breadcrumb:"Breadcrumb",browse:"Browse",cancel:"Cancel",carousel:"Carousel",chartSummary:"Chart of {series}, values from {min} to {max}",choose:"Choose",clear:"Clear",close:"Close",closeTab:"Close {name}",codeBlock:"Code",collapse:"Collapse",confirm:"Confirm",copied:"Copied",copy:"Copy",decrement:"Decrease",dialog:"Dialog",dismiss:"Dismiss",dropFiles:"Drop files here",expand:"Expand",fileTooLarge:"File too large",fileTooLargeNamed:"{name}: File too large",increment:"Increase",invalidFields:"Check the highlighted fields",invalidValue:"Invalid value",loading:"Loading",menu:"Menu",message:"Message",more:"More",newTab:"New tab",next:"Next",nextMonth:"Next month",noResults:"No results",optional:"Optional",pageOf:"Page {page} of {total}",pagination:"Pagination",previous:"Previous",previousMonth:"Previous month",ratingStar:"{value} of {max}",ratingValue:"Rated {value} of {max}",remove:"Remove",removeItem:"Remove {name}",required:"Required",resize:"Resize",search:"Search…",selectAll:"Select all",selectedCount:"{count} selected",selectRow:"Select row",send:"Send",showLess:"Show less",showMore:"Show more",slide:"Slide",sortAscending:"Sort ascending",sortByAscending:"{name}: Sort ascending",sortByDescending:"{name}: Sort descending",sortDescending:"Sort descending",sparklineSummary:"Trend from {first} to {last}, low {min}, high {max}",stepCurrent:"Step {step} of {total}: {label}, current",stepDone:"Step {step} of {total}: {label}, completed",stepUpcoming:"Step {step} of {total}: {label}",stop:"Stop",submit:"Submit",table:"Table",today:"Today",unknownComponent:"Unknown component",unsupportedFile:"Unsupported file",unsupportedFileNamed:"{name}: Unsupported file"},vh={strings:bh},Xo=vh.strings,xh=/^\$string\.([a-zA-Z][a-zA-Z0-9]*)$/,$h=/\{([a-zA-Z][a-zA-Z0-9]*)\}/g;function zs(e){if(typeof e!="string")return null;const t=xh.exec(e);return t?t[1]:null}function wh(e){const t=zs(e);return t!==null&&t in Xo}function kh(e={}){return{...Xo,...e}}function Yc(e,t={}){return e.replace($h,(n,r)=>r in t&&t[r]!==void 0&&t[r]!==null?String(t[r]):n)}function Sh(e,t=Xo){const n=zs(e);return n===null?e:t[n]??n}const Ch={default:1,regions:{0:["AG","AS","BD","BR","BS","BT","BW","BZ","CA","CN","CO","DM","DO","ET","GT","GU","HK","HN","ID","IL","IN","JM","JP","KE","KH","KR","LA","MH","MM","MO","MT","MX","MZ","NI","NP","PA","PE","PH","PK","PR","PT","PY","SA","SG","SV","TH","TT","TW","UM","US","VE","VI","WS","YE","ZA","ZW"],5:["MV"],6:["AE","AF","BH","DJ","DZ","EG","IQ","IR","JO","KW","LY","OM","QA","SD","SY"]}},Ah={af:"ZA",am:"ET",ar:"EG",az:"AZ",be:"BY",bg:"BG",bn:"BD",bs:"BA",ca:"ES",ckb:"IQ",cs:"CZ",cy:"GB",da:"DK",de:"DE",dv:"MV",el:"GR",en:"US",es:"ES",et:"EE",eu:"ES",fa:"IR",fi:"FI",fil:"PH",fr:"FR",ga:"IE",gl:"ES",gu:"IN",ha:"NG",he:"IL",hi:"IN",hr:"HR",hu:"HU",hy:"AM",id:"ID",ig:"NG",is:"IS",it:"IT",ja:"JP",jv:"ID",ka:"GE",kk:"KZ",km:"KH",kn:"IN",ko:"KR",ku:"TR",ky:"KG",lo:"LA",lt:"LT",lv:"LV",mk:"MK",ml:"IN",mn:"MN",mr:"IN",ms:"MY",mt:"MT",my:"MM",nb:"NO",ne:"NP",nl:"NL",nn:"NO",no:"NO",or:"IN",pa:"IN",pl:"PL",ps:"AF",pt:"BR",ro:"RO",ru:"RU",sd:"PK",si:"LK",sk:"SK",sl:"SI",so:"SO",sq:"AL",sr:"RS",sv:"SE",sw:"TZ",ta:"IN",te:"IN",th:"TH",tl:"PH",tr:"TR",ug:"CN",uk:"UA",ur:"PK",uz:"UZ",vi:"VN",yi:"001",yo:"NG",zh:"CN",zu:"ZA"},Th={in:"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",tl:"fil"},Ih=["ar","ckb","dv","fa","he","ps","sd","ug","ur","yi"],Eh=["ui-back","ui-chevron-left","ui-chevron-right","ui-arrow-right","ui-send","ui-undo","ui-external-link","arrow-left","arrow-right","chevron-left","chevron-right","send","undo-2","external-link"],_h={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayPeriods:["AM","PM"],currencyPrefix:{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CNY:"CN¥",INR:"₹",KRW:"₩",CAD:"CA$",AUD:"A$",MXN:"MX$",BRL:"R$",ILS:"₪",NZD:"NZ$",HKD:"HK$",TWD:"NT$",VND:"₫",PHP:"₱",XAF:"FCFA ",XOF:"F CFA "},currencyDigits:{JPY:0,KRW:0,VND:0,CLP:0,ISK:0,UGX:0,PYG:0,XAF:0,XOF:0,BHD:3,IQD:3,JOD:3,KWD:3,OMR:3,TND:3},relative:{units:{second:["second","seconds"],minute:["minute","minutes"],hour:["hour","hours"],day:["day","days"],week:["week","weeks"],month:["month","months"],year:["year","years"]},auto:{second:{0:"now"},day:{1:"tomorrow","-1":"yesterday"},week:{1:"next week","-1":"last week"},month:{1:"next month","-1":"last month"},year:{1:"next year","-1":"last year"}},past:"{value} {unit} ago",future:"in {value} {unit}"},unknownCurrency:"{code} ",datePatterns:{short:"M/d/yy",medium:"MMM d, y",long:"MMMM d, y",full:"EEEE, MMMM d, y"},timePattern:"h:mm a",dateTimeJoin:{short:"{date}, {time}",medium:"{date}, {time}",long:"{date} at {time}",full:"{date} at {time}"}},an={default:"en-US",weekStart:Ch,likelyRegion:Ah,languageAliases:Th,rtl:Ih,rtlMirroredIcons:Eh,englishFallback:_h},mt=an.englishFallback,rt={second:1e3,minute:6e4,hour:36e5,day:864e5};function zr(e){return typeof e=="string"?e:typeof e=="number"?Number.isFinite(e)?String(e):"":typeof e=="boolean"?String(e):""}function Xc(e){const t=/^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(e));if(!t)return{int:"0",frac:""};const n=t[1]+(t[2]??"");let r=t[1].length+(t[3]?Number(t[3]):0),o=n;return r<=0&&(o="0".repeat(1-r)+o,r=1),r>o.length&&(o=o+"0".repeat(r-o.length)),{int:o.slice(0,r).replace(/^0+(?=\d)/,""),frac:o.slice(r).replace(/0+$/,"")}}function Dh(e,t){const n=e.frac+"0".repeat(Math.max(0,t-e.frac.length));return{int:(e.int+n.slice(0,t)).replace(/^0+(?=\d)/,""),frac:n.slice(t).replace(/0+$/,"")}}function Zc(e,t,n){let{int:r,frac:o}=e;if(o.length>n){const i=o.charCodeAt(n)>=53;let s=r+o.slice(0,n);if(i){const l=s.split("");let c=l.length-1;for(;c>=0;c--)if(l[c]==="9")l[c]="0";else{l[c]=String(Number(l[c])+1);break}s=(c<0?"1":"")+l.join("")}const a=s.length-n;r=s.slice(0,a)||"0",o=s.slice(a).replace(/0+$/,"")}return o.length<t&&(o=o+"0".repeat(t-o.length)),{int:r,frac:o}}function Jc(e,t){if(!t||e.length<4)return e;let n="";for(let r=0;r<e.length;r++)r>0&&(e.length-r)%3===0&&(n+=","),n+=e[r];return n}function eo(e,t,n,r){const o=e<0||Object.is(e,-0);if(Number.isNaN(e))return{sign:"",body:"NaN"};if(!Number.isFinite(e))return{sign:o?"-":"",body:"∞"};const i=Zc(Xc(Math.abs(e)),t,n);return{sign:o?"-":"",body:`${Jc(i.int,r)}${i.frac?`.${i.frac}`:""}`}}const jn=e=>typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(20,Math.trunc(e))):void 0;function Ph(e){return mt.currencyDigits[e.toUpperCase()]??2}function vr(e){if(typeof e=="number")return Number.isFinite(e)?{ms:e,dateOnly:!1}:null;if(typeof e!="string"||e.trim()==="")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(t){const o=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isFinite(o)?{ms:o,dateOnly:!0}:null}if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?$/.test(e))return null;const n=/(Z|[+-]\d{2}:\d{2})$/.test(e)?e:`${e}Z`,r=Date.parse(n);return Number.isFinite(r)?{ms:r,dateOnly:!1}:null}function Qc(e){const t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),weekday:t.getUTCDay(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}const Yt=(e,t)=>String(e).padStart(t,"0");function uo(e,t,n){let r="",o=0;for(;o<e.length;){const i=e[o];if(i==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}for(o++;o<e.length;){if(e[o]==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}o++;break}r+=e[o],o++}continue}if(!/[A-Za-z]/.test(i)){r+=i,o++;continue}let s=1;for(;e[o+s]===i;)s++;const a=e.slice(o,o+s);o+=s;const l=t.hour%12===0?12:t.hour%12;switch(i){case"y":r+=s===2?Yt(t.year%100,2):Yt(t.year,s);break;case"M":r+=s>=4?n.months[t.month-1]:s===3?n.monthsShort[t.month-1]:Yt(t.month,s);break;case"d":r+=Yt(t.day,s);break;case"E":r+=s>=4?n.weekdays[t.weekday]:n.weekdaysShort[t.weekday];break;case"h":r+=Yt(l,s);break;case"H":r+=Yt(t.hour,s);break;case"m":r+=Yt(t.minute,s);break;case"s":r+=Yt(t.second,s);break;case"a":r+=n.dayPeriods[t.hour<12?0:1];break;default:r+=a}}return r}const Oh=mt.datePatterns,Mh=mt.timePattern,Fh=mt.dateTimeJoin,zh=e=>()=>e;function eu(e){const t=Math.abs(e),n=r=>Math.trunc(e/r)||0;return t<rt.minute?{value:n(rt.second),unit:"second"}:t<rt.hour?{value:n(rt.minute),unit:"minute"}:t<rt.day?{value:n(rt.hour),unit:"hour"}:t<7*rt.day?{value:n(rt.day),unit:"day"}:t<30*rt.day?{value:n(7*rt.day),unit:"week"}:t<365*rt.day?{value:n(30*rt.day),unit:"month"}:{value:n(365*rt.day),unit:"year"}}const xi=mt;function Rh(e=zh(0)){return{locale:"en-US",number(t,n={}){const r=jn(n.decimals),{sign:o,body:i}=eo(t,r??0,r??3,n.grouping!==!1);return`${o}${i}`},currency(t,n,r={}){const o=n.toUpperCase(),i=jn(r.decimals)??Ph(o),{sign:s,body:a}=eo(t,i,i,r.grouping!==!1),l=mt.currencyPrefix[o]??mt.unknownCurrency.replace("{code}",o);return`${s}${l}${a}`},percent(t,n={}){const r=jn(n.decimals)??0;if(!Number.isFinite(t)){const{sign:s,body:a}=eo(t,0,0,!0);return`${s}${a}%`}const o=t<0||Object.is(t,-0),i=Zc(Dh(Xc(Math.abs(t)),2),r,r);return`${o?"-":""}${Jc(i.int,!0)}${i.frac?`.${i.frac}`:""}%`},date(t,n={}){const r=vr(t);if(!r)return"";const o=Qc(r.dateOnly?r.ms:r.ms+e(r.ms)*6e4);if(n.format)return uo(n.format,o,xi);const i=n.style??"medium",s=uo(Oh[i],o,xi);if(!n.time)return s;const a=uo(Mh,o,xi);return Fh[i].replace("{date}",s).replace("{time}",a)},relativeTime(t,n){const r=vr(t);if(!r)return"";const{value:o,unit:i}=eu(r.ms-n),s=mt.relative.auto[i]?.[String(o)];if(s)return s;const[a,l]=mt.relative.units[i],c=eo(Math.abs(o),0,0,!0).body,u=Math.abs(o)===1?a:l;return(o<0?mt.relative.past:mt.relative.future).replace("{value}",c).replace("{unit}",u)},plural(t){return Math.abs(t)===1?"one":"other"}}}function tu(e,t="UTC"){const n=s=>new Intl.NumberFormat(e,s);let r=null;const o=()=>{if(r)return r;const s=(u,d)=>new Intl.DateTimeFormat(e,{...u,timeZone:"UTC"}).format(new Date(d)),a=Array.from({length:12},(u,d)=>Date.UTC(2026,d,1)),l=Array.from({length:7},(u,d)=>Date.UTC(2026,0,4+d)),c=u=>new Intl.DateTimeFormat(e,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2026,0,1,u))).find(d=>d.type==="dayPeriod")?.value??(u<12?"AM":"PM");return r={months:a.map(u=>s({month:"long"},u)),monthsShort:a.map(u=>s({month:"short"},u)),weekdays:l.map(u=>s({weekday:"long"},u)),weekdaysShort:l.map(u=>s({weekday:"short"},u)),dayPeriods:[c(9),c(15)]},r},i=s=>{const a=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short",hourCycle:"h23"}).formatToParts(new Date(s)),l=c=>a.find(u=>u.type===c)?.value??"0";return{year:Number(l("year")),month:Number(l("month")),day:Number(l("day")),weekday:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(l("weekday")),hour:Number(l("hour"))%24,minute:Number(l("minute")),second:Number(l("second"))}};return{locale:e,number(s,a={}){const l=jn(a.decimals);return n({minimumFractionDigits:l??0,maximumFractionDigits:l??3,useGrouping:a.grouping!==!1}).format(s)},currency(s,a,l={}){const c=jn(l.decimals);return n({style:"currency",currency:a,...c!==void 0?{minimumFractionDigits:c,maximumFractionDigits:c}:{},useGrouping:l.grouping!==!1}).format(s)},percent(s,a={}){const l=jn(a.decimals)??0;return n({style:"percent",minimumFractionDigits:l,maximumFractionDigits:l}).format(s)},date(s,a={}){const l=vr(s);if(!l)return"";const c=l.dateOnly?"UTC":t;return a.format?uo(a.format,l.dateOnly?Qc(l.ms):i(l.ms),o()):new Intl.DateTimeFormat(e,{dateStyle:a.style??"medium",...a.time?{timeStyle:"short"}:{},timeZone:c}).format(new Date(l.ms))},relativeTime(s,a){const l=vr(s);if(!l)return"";const{value:c,unit:u}=eu(l.ms-a);return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(c,u)},plural(s){return new Intl.PluralRules(e).select(s)}}}const nu=["formatNumber","formatCurrency","formatPercent","formatDate","formatRelativeTime","pluralize"],Nh=/^[ \t\n\r]*[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?[ \t\n\r]*$/,es=e=>typeof e=="number"?e:typeof e=="string"&&Nh.test(e)?Number(e):NaN,$i=e=>e==null?void 0:es(e);function ru(e,t=()=>Date.now()){const n=(r,o)=>{const i=es(r);return Number.isFinite(i)?o(i):""};return{formatNumber:({value:r,decimals:o,grouping:i})=>n(r,s=>e.number(s,{decimals:$i(o),grouping:i===void 0?void 0:i!==!1})),formatCurrency:({value:r,currency:o,decimals:i,grouping:s})=>n(r,a=>typeof o=="string"&&/^[A-Za-z]{3}$/.test(o)?e.currency(a,o,{decimals:$i(i),grouping:s===void 0?void 0:s!==!1}):""),formatPercent:({value:r,decimals:o})=>n(r,i=>e.percent(i,{decimals:$i(o)})),formatDate:({value:r,format:o,style:i,time:s})=>e.date(r,{...typeof o=="string"&&o?{format:o}:{},...i==="short"||i==="medium"||i==="long"||i==="full"?{style:i}:{},...s===!0?{time:!0}:{}}),formatRelativeTime:({value:r,now:o})=>e.relativeTime(r,typeof o=="number"?o:vr(o)?.ms??t()),pluralize:r=>{const o=es(r.value);if(!Number.isFinite(o))return r.other;if(o===0&&r.zero!==void 0)return r.zero;const i=e.plural(o);return r[i]??r.other}}}const ts=ru(Rh()),ou=/^\{([^{}]+)\}$/,Lh=/\{([^{}]+)\}/g,jh=/^(len|range)\((.+)\)$/;function Rs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.path=="string"&&Object.keys(e).length===1}function Rr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.call=="string"}function Ee(e){return Rs(e)||Rr(e)}function Et(e){return e!=null&&e!==!1&&e!==""}function Ye(e,t){const n={};for(const[r,o]of Object.entries(t))o!==void 0&&(n[r]=o);return{call:e,args:n}}function Bh(e){return e==="true"?!0:e==="false"?!1:e==="null"?null:/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function Hh(e,t){if(e==="id")return t.id;const[n,...r]=e.split(".");let o;if(n==="props")o=t.props;else if(n in t.vars)o=t.vars[n];else return;for(const i of r){if(o==null)return;o=o[i]}return o}function He(e){return typeof e=="number"?e:Number(e??0)||0}function Ba(e){const t=e.trim();if(t==="")return;const n=Number(t);return Number.isFinite(n)?n:void 0}function Ns(e,t){return e===t?!0:typeof e=="number"&&typeof t=="string"?Ba(t)===e:typeof t=="number"&&typeof e=="string"?Ba(e)===t:!1}function iu(e,t,n){let r=He(e);return n!=null&&(r=Math.min(r,He(n))),t!=null&&(r=Math.max(r,He(t))),r}function Wh(e,t){const n=e==null?"":String(e);return Yc(n,typeof t=="object"&&t!==null?t:{})}const Uh=1e4;function Ht(e,t){const n=e.trim(),r=jh.exec(n);if(r){const i=Ht(r[2],t);if(r[1]==="len")return Ee(i)?Ye("len",{value:i}):Array.isArray(i)||typeof i=="string"?i.length:0;if(Ee(i))return;const s=Math.min(Uh,Math.max(0,Math.floor(He(i)))||0);return Array.from({length:s},(a,l)=>l)}const o=n.indexOf("|");if(o>=0){const i=Ht(n.slice(0,o),t),s=Bh(n.slice(o+1));return i==null?s:Ee(i)?Ye("fallback",{value:i,default:s}):i}if(n.startsWith("!")){const i=Ht(n.slice(1),t);return Ee(i)?Ye("not",{value:i}):!Et(i)}return Hh(n,t)}function qh(e){return Rr(e)&&e.call==="fallback"&&Ee(e.args?.value)?e.args?.value:e}function We(e,t){if(typeof e=="string"){const n=ou.exec(e);if(n)return Ht(n[1],t)}return at(e,t)}function Co(e,t){const n=typeof e=="string"?Ht(e,t):We(e,t);return Ee(n)?n:Et(n)}function Kh(e,t){const n=[];let r=!1,o=0;for(const i of e.matchAll(Lh)){const s=i.index??0;s>o&&n.push(e.slice(o,s));const a=Ht(i[1],t);Ee(a)&&(r=!0),n.push(a),o=s+i[0].length}return o<e.length&&n.push(e.slice(o)),r?Ye("concat",{values:n.filter(i=>i!=null&&i!=="")}):n.map(i=>i==null?"":String(i)).join("")}function at(e,t){if(typeof e=="string"){const o=ou.exec(e);return o?qh(Ht(o[1],t)):Kh(e,t)}if(Array.isArray(e))return e.map(o=>at(o,t)).filter(o=>o!==void 0);if(typeof e!="object"||e===null)return e;const n=e;if("$map"in n){const o=n.$map,i=Ht(o.from,t);if(Ee(i)){const l={};for(const[c,u]of Object.entries(o.cases)){const d=We(u,t);d!==void 0&&(l[c]=d)}return Ye("map",{value:i,cases:l,default:We(o.default,t)})}const s=i==null?"":String(i),a=Object.prototype.hasOwnProperty.call(o.cases,s)?o.cases[s]:o.default;return We(a,t)}if("$cond"in n){const[o,i,s]=n.$cond,a=Co(o,t);return Ee(a)?Ye("cond",{if:a,then:We(i,t),else:We(s,t)}):We(a?i:s,t)}if("$eq"in n){const[o,i]=n.$eq.map(s=>We(s,t));return Ee(o)||Ee(i)?Ye("eq",{a:o,b:i}):Ns(o,i)}if("$lt"in n){const[o,i]=n.$lt.map(s=>We(s,t));return Ee(o)||Ee(i)?Ye("lt",{a:o,b:i}):He(o)<He(i)}if("$add"in n){const[o,i]=n.$add.map(s=>We(s,t));return Ee(o)||Ee(i)?Ye("add",{a:o,b:i}):He(o)+He(i)}if("$sub"in n){const[o,i]=n.$sub.map(s=>We(s,t));return Ee(o)||Ee(i)?Ye("sub",{a:o,b:i}):He(o)-He(i)}if("$clamp"in n){const[o,i,s]=n.$clamp.map(a=>We(a,t));return Ee(o)||Ee(i)||Ee(s)?Ye("clamp",{value:o,min:i,max:s}):iu(o,i,s)}if("$fill"in n){const[o,i]=n.$fill,s={};for(const[a,l]of Object.entries(i??{})){const c=We(l,t);c!==void 0&&(s[a]=c)}return Ye("fill",{template:We(o,t),params:s})}if("$percent"in n){const[o,i]=n.$percent.map(s=>We(s,t));return Ee(o)||Ee(i)?Ye("percent",{value:o,max:i}):su(o,i)}if("$text"in n){const o=n.$text,i=typeof o=="string"?Ht(o,t):We(o,t);return Ee(i)?Ye("text",{value:i}):i==null?void 0:String(i)}if("$coalesce"in n){const o=[];for(const i of n.$coalesce){const s=We(i,t);if(s!==void 0){if(Ee(s)){o.push(s);continue}if(Et(s)){if(o.length===0)return s;o.push(s);break}}}return o.length===0?void 0:o.length===1?o[0]:Ye("coalesce",{values:o})}if("$not"in n){const o=Co(n.$not,t);return Ee(o)?Ye("not",{value:o}):!o}const r={};for(const[o,i]of Object.entries(n)){const s=at(i,t);if(s===void 0)continue;const a=o.includes("{")?at(o,t):o;r[typeof a=="string"?a:o]=s}return r}function su(e,t){const n=He(t),r=n>0?He(e)/n*100:0,o=Math.min(100,Math.max(0,r));return`${Math.round(o*100)/100}%`}function Vh(e,t,n,r){if(!Array.isArray(e))return[];const o=typeof t=="string"?t.trim().toLowerCase():typeof t=="number"?String(t):"",i=Array.isArray(n)?n.filter(l=>typeof l=="string"):null,s=typeof r=="object"&&r!==null&&!Array.isArray(r)?Object.entries(r).filter(([,l])=>l!=null&&l!==""):[],a=l=>typeof l=="string"?l:typeof l=="number"?String(l):null;return e.filter(l=>{const c=typeof l=="object"&&l!==null&&!Array.isArray(l)?l:null;for(const[d,f]of s)if(!Ns(c?.[d],f))return!1;return o===""?!0:(c?(i??Object.keys(c)).map(d=>c[d]):[l]).some(d=>a(d)?.toLowerCase().includes(o)??!1)})}const Gh={percent:({value:e,max:t})=>su(e,t),add:({a:e,b:t})=>He(e)+He(t),sub:({a:e,b:t})=>He(e)-He(t),eq:({a:e,b:t})=>Ns(e,t),lt:({a:e,b:t})=>He(e)<He(t),clamp:({value:e,min:t,max:n})=>iu(e,t,n),cond:({if:e,then:t,else:n})=>Et(e)?t:n,fallback:({value:e,default:t})=>e??t,concat:({values:e})=>Array.isArray(e)?e.map(t=>t==null?"":String(t)).join(""):"",coalesce:({values:e})=>Array.isArray(e)?e.find(Et):void 0,text:({value:e})=>e==null?void 0:String(e),map:({value:e,cases:t,default:n})=>{const r=e==null?"":String(e),o=t??{};return Object.prototype.hasOwnProperty.call(o,r)?o[r]:n},len:({value:e})=>Array.isArray(e)||typeof e=="string"?e.length:0,fill:({template:e,params:t})=>Wh(e,t),filter:({items:e,query:t,fields:n,where:r})=>Vh(e,t,n,r),formatPercent:ts.formatPercent,formatRelativeTime:ts.formatRelativeTime},Yh="VAPP-103: the input LIMITS every core enforces (the TS reference, the Rust core and through it Swift, Compose and gpui). An agent's input past a limit is refused with an issue, never worked on. `maxComponents` = nodes the reducer places in one surface's tree, template nodes included (the rest is dropped: `surface: more than N components; the rest is dropped`); a renderer's build holds at most `maxComponents` nodes too: the reduced tree's (after expansion, children and slots) plus, per template ITEM, its template subtree's (nested items charged when they are instantiated); the first item that does not fit and every later one are not rendered, with ONE issue on the template component (the same message). `maxDepth` = nesting levels of the REDUCED tree, after macro expansion (the root and every lifted template = 1, children and slots one level down; a Card, Section or Group macro adds a level; a deeper node is the Unknown placeholder, its subtree dropped: `nesting deeper than N levels`); 48 keeps every tree a core emits (2 JSON levels per node) inside serde_json's default recursion limit of 128, so reduced trees, fixtures and the FFI's JSON round-trip; the Rust core's recursive passes switch to a heap-allocated stack segment when the host thread runs low, so an iOS secondary thread's 512 KB never decides (a 48-level surface lays out on a 128 KB thread, debug build). `maxMessageBytes` = one server message as UTF-8 JSON (host routers refuse it: INVALID_MESSAGE). `maxTemplateItems` = template items one surface instantiates (beyond it the items are not rendered: `template: more than N items; the rest is not rendered`). `maxPointerBytes` / `maxPointerSegments` = a data pointer's length and token count (a longer write is refused). Generated into every target; src/limits.ts reads it.",Xh=2e4,Zh=48,Jh=4194304,Qh=1e4,eg=1024,tg=64,In={$comment:Yh,maxComponents:Xh,maxDepth:Zh,maxMessageBytes:Jh,maxTemplateItems:Qh,maxPointerBytes:eg,maxPointerSegments:tg};Object.fromEntries(Object.entries(In).filter(([e])=>!e.startsWith("$")));const Nr=In.maxComponents,xr=In.maxDepth,mn=In.maxMessageBytes,au=In.maxTemplateItems,lu=In.maxPointerBytes,cu=In.maxPointerSegments,wt={usedTwice:"id used twice; only its first place renders",depth:`nesting deeper than ${xr} levels`,components:`surface: more than ${Nr} components; the rest is dropped`,templateItems:`template: more than ${au} items; the rest is not rendered`,messageBytes:`message larger than ${mn} bytes`},uu=e=>e.replace(/~1/g,"/").replace(/~0/g,"~");function du(e,t={}){if(e.startsWith("/"))return e;const n=t.base??"";return e===""?n:`${n}/${e}`}function ng(e){return e!==void 0&&Object.prototype.hasOwnProperty.call(e,"item")}function Ls(e,t){if(t===""||t==="/")return e;let n=e;for(const r of(t.startsWith("/")?t.slice(1):t).split("/")){if(n==null||typeof n!="object")return;const o=uu(r);Array.isArray(n)?n=/^[0-9]+$/.test(o)?n[Number(o)]:void 0:n=Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0}return n}const rg=e=>new TextEncoder().encode(e).length;function og(e){if(rg(e)>lu)return Ao.bytes;if(e===""||e==="/")return[];const t=(e.startsWith("/")?e.slice(1):e).split("/");return t.length>cu?Ao.segments:t.map(uu)}const Ao={bytes:`data: pointer longer than ${lu} bytes`,segments:`data: pointer has more than ${cu} segments`,notIndex:e=>`data: ${JSON.stringify(e)} is not an array index`,pastEnd:(e,t)=>`data: index ${e} is past the end of the array (${t} items)`};function ig(e,t){if(e==="-")return t;if(!/^[0-9]+$/.test(e))return Ao.notIndex(e);const n=Number(e);return n<=t?n:Ao.pastEnd(e,t)}function wi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function js(e,t,n){const r=og(t);if(typeof r=="string")return{data:e,error:r};if(r.length===0)return{data:n===void 0?{}:n};const o=[],i=[];let s=e;for(let a=0;a<r.length;a++){const l=r[a],c=a===r.length-1;if(Array.isArray(s)){const u=ig(l,s.length);if(typeof u=="string")return{data:e,error:u};const d=[...s];c?n===void 0?u<d.length&&d.splice(u,1):d[u]=n:s=d[u],o.push(d),i.push(u)}else{const u={};if(s!==null&&typeof s=="object")for(const[d,f]of Object.entries(s))wi(u,d,f);c?n===void 0?delete u[l]:wi(u,l,n):s=Object.prototype.hasOwnProperty.call(u,l)?u[l]:void 0,o.push(u),i.push(l)}}for(let a=o.length-2;a>=0;a--){const l=o[a];Array.isArray(l)?l[i[a]]=o[a+1]:wi(l,i[a],o[a+1])}return{data:o[0]}}({...ts});new Set(nu);function sg(e,t,n,r={}){let o=e;for(const[i,s]of Object.entries(n??{})){const a=t[i];Rs(a)&&(!a.path.startsWith("/")&&ng(r)||(o=js(o,du(a.path,r),s).data))}return o}const ag=["Dialog","Drawer","AlertDialog","Popover","Tooltip","Menu","Toast"];new Set(ag);function Bs(e){return e?e.type==="object"?e.shape===void 0:e.type==="array"?e.items!==void 0&&Bs(e.items):!1:!1}function Ha(e,t,n){for(let r=t+1;r<e.length;r+=1){const o=e[r];if(o<=n)return!1;if(o===n+1)return!0}return!1}function lg(e){return e.map((t,n)=>{if(t<=0)return{elbowAt:null,tee:!1,passThrough:[]};const r=[];for(let o=0;o<=t-2;o+=1)Ha(e,n,o)&&r.push(o);return{elbowAt:t-1,tee:Ha(e,n,t-1),passThrough:r}})}function Hs(e){return e.recipe?.macro==="Row"&&e.recipe.part==="root"}function cg(e){const t=Hs(e)?e.recipe?.props.depth:e.props.depth;return typeof t=="number"&&Number.isFinite(t)&&t>0?Math.floor(t):0}function ug(e){return!Hs(e)&&e.component!=="TreeGuides"&&typeof e.props.depth=="number"}function Wa(e,t){const n={depth:e};return t.elbowAt!==null&&(n.elbowAt=t.elbowAt),n.tee=t.tee,n.passThrough=t.passThrough,n}function ki(e){const t=e.map(cg),n=lg(t);e.forEach((r,o)=>{const i=n[o];if(Hs(r)){const s=dg(r);s&&(s.props=Wa(t[o],i))}else if(ug(r)){const{depth:s,...a}=Wa(t[o],i);r.props={...r.props,guide:a}}})}function dg(e){return e.children.find(t=>t.component==="TreeGuides"&&t.recipe?.part==="guides")}function fg(e){const t=n=>{ki(n.children);for(const r of Object.values(n.slots??{}))ki([r]),t(r);n.children.forEach(t)};return ki([e]),t(e),e}const Ua=16,Zo=Ue.breakpoint;function fu(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}const pg=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Jo(e){return!pg(e)||!("base"in e)?!1:Object.keys(e).every(t=>t==="base"||Zo.includes(t))}function pu(e,t){let n=e.base;if(t===null)return n;for(const r of Zo)if(r in e&&(n=e[r]),r===t)break;return n}function hu(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=Jo(o)?pu(o,t):o;return n}function hg(e){const t=new Set;for(const n of Object.values(e))if(Jo(n))for(const r of Object.keys(n))r!=="base"&&t.add(r);return Zo.filter(n=>t.has(n)).map(n=>({breakpoint:n,props:hu(e,n)}))}function gg(e,t){if(!e&&!t)return;const n={...e??{}};for(const[r,o]of Object.entries(t??{})){const i=typeof o=="object"&&o!==null&&!Array.isArray(o);n[r]=i?{...n[r]??{},...o}:o}return n}function mg(e,t){const n=fu(e);return t&&n.event&&(n.event.context={...n.event.context??{},...t}),n}function yg(e,t,n){const r={},o=e.view.components[e.macro]?.props??{};for(const i of e.def.recipeProps){const s=e.baseProps[i]??o[i]?.default;s!==void 0&&(r[i]=s)}if(n){const i=at(n,t);for(const[s,a]of Object.entries(i))r[s]=a}return r}function qa(e,t){return e.length===1?e[0]:{call:t,args:{values:e}}}function bg(e,t){const n=[];if(e.$if!==void 0){const r=Array.isArray(e.$if)?e.$if:[e.$if];for(const o of r){const i=Co(o,t);if(i===!1)return!1;i!==!0&&n.push(i)}}if(e.$any!==void 0){let r=!1;const o=[];for(const i of e.$any){const s=Co(i,t);if(s===!0){r=!0;break}s!==!1&&o.push(s)}if(!r){if(o.length===0)return!1;n.push(qa(o,"or"))}}return n.length===0?!0:qa(n,"and")}function ns(e,t,n,r){const o=bg(e,n);if(o===!1)return[];const i=o===!0?void 0:o;if(e.$each!==void 0){const a=at(`{${e.$each}}`,n);if(!Array.isArray(a))return[];const l=e.$as??"item";return a.map((c,u)=>Va(e,t,{...n,vars:{...n.vars,[l]:c,index:u}},`${r}.${e.part}.${u}`,i))}const s=e.part==="root"?t.source.id:`${r}.${e.part}`;return[Va(e,t,n,s,i)]}const Ka=e=>JSON.stringify(e);function vg(e,t,n){if(!e.style)return;const r=at(e.style,n);let o=r;for(const i of t.variants){const s=at(e.style,{...n,props:i.props}),a={};for(const[l,c]of Object.entries(s))!l.startsWith("@")&&!l.startsWith(":")&&Ka(o[l])!==Ka(c)&&(a[l]=c);if(Object.keys(a).length>0){const l=`@media (min-width: $breakpoint.${i.breakpoint})`;r[l]={...r[l]??{},...a}}o=s}return Object.keys(r).length>0?r:void 0}function Va(e,t,n,r,o){const i=at(e.props??{},n)??{},s=vg(e,t,n),a={id:r,component:e.component,props:i,children:[]};if(s&&(a.style=s),o!==void 0&&(a.visible=o),a.recipe={macro:t.macro,part:e.part,props:yg(t,n,e.$recipe)},e.$on){const l={};for(const[c,u]of Object.entries(e.$on)){const d=t.source.on?.[u];if(!d)continue;t.claimed.add(u);const f=e.$context?at(e.$context,n):void 0;l[c]=mg(d,f)}Object.keys(l).length>0&&(a.on=l)}if(e.$set)for(const[l,c]of Object.entries(e.$set)){const u=t.baseProps[c.prop];if(!Rs(u))continue;const d=a.on??={};if(d[l]?.functionCall){const p=`on.${e.$on?.[l]??l}: a function action replaces the two-way set of props.${c.prop}; write it in that function's handler or use an event`;t.issues?.some(v=>v.id===t.source.id&&v.message===p)||t.issues?.push({id:t.source.id,message:p});continue}const f=at(c.value,n);d[l]={...d[l]??{},functionCall:{call:"set",args:f===void 0?{path:u.path}:{path:u.path,value:f}}}}if(e.$a11y){const l=at(e.$a11y,n);Object.keys(l).length>0&&(a.accessibility=l)}if(e.slots)for(const[l,c]of Object.entries(e.slots)){if(typeof c=="string"){const d=c.startsWith("$slot:")?c.slice(6):null,f=d?t.source.slots?.[d]:void 0;f&&((a.slots??={})[l]=f);continue}const[u]=ns(c,t,n,r);u&&((a.slots??={})[l]=u)}for(const l of e.children??[]){if(l==="$children"){a.children.push(...t.source.children),t.source.template&&(a.template=t.source.template);continue}if(typeof l=="string"){if(l.startsWith("$slot:")){const c=t.source.slots?.[l.slice(6)];c&&a.children.push(c)}continue}a.children.push(...ns(l,t,n,r))}return a}function xg(e,t,n,r,o,i){if(o>Ua)throw new Error(`macro ${t}: expansion deeper than ${Ua}`);const s=hu(e.props,null);e.on?.press&&s.pressable===void 0&&r.components[t]?.props.pressable&&(s.pressable=!0);const a={view:r,macro:t,def:n,source:e,baseProps:s,variants:hg(e.props),claimed:new Set,issues:i},l={id:e.id,props:s,vars:{}},[c]=ns(n.root,a,l,e.id);c.style=gg(c.style,e.style),c.style&&Object.keys(c.style).length===0&&delete c.style,e.visible!==void 0&&(c.visible=e.visible),e.accessibility&&(c.accessibility={...c.accessibility??{},...e.accessibility});const u={...c.on??{}};for(const[d,f]of Object.entries(e.on??{}))a.claimed.has(d)||(u[d]=f);return Object.keys(u).length>0?c.on=u:delete c.on,To(c,r,o+1,i)}function To(e,t,n,r){const o={...e,children:e.children.map(s=>To(s,t,n,r))};if(e.slots){o.slots={};for(const[s,a]of Object.entries(e.slots))o.slots[s]=To(a,t,n,r)}const i=t.macros[o.component];return i&&t.components[o.component]?.kind==="macro"?xg(o,o.component,i,t,n,r):o}function Ga(e,t={}){return fg(To(fu(e),Fr(t.extensions),0,t.issues))}const $g=new Set(Qp),gu=e=>Fr(e),wg=new Set(eh),kg=/^\d{4}-\d{2}-\d{2}$/;function Ya(e,t,n,r,o){switch(e.type){case"string":case"markdown":case"url":typeof t!="string"?o.push({path:n,message:"expected a string"}):zs(t)!==null&&!wh(t)&&o.push({path:n,message:`unknown built-in string ${t} (catalog/strings.json)`});return;case"date":(typeof t!="string"||t!==""&&!kg.test(t))&&o.push({path:n,message:"expected yyyy-mm-dd"});return;case"number":typeof t!="number"||!Number.isFinite(t)?o.push({path:n,message:"expected a number"}):e.minimum!==void 0&&t<e.minimum?o.push({path:n,message:`expected at least ${e.minimum}`}):e.maximum!==void 0&&t>e.maximum&&o.push({path:n,message:`expected at most ${e.maximum}`});return;case"boolean":typeof t!="boolean"&&o.push({path:n,message:"expected a boolean"});return;case"enum":{const i=e.values??(e.enum?r.enums[e.enum]:void 0);i?i.includes(t)||o.push({path:n,message:`expected one of ${i.join("|")}`}):o.push({path:n,message:`enum ${e.enum} is not defined`});return}case"icon":(typeof t!="string"||!$g.has(t))&&o.push({path:n,message:"not an icons.json name"});return;case"color":if(Uc(t)&&Kt(t)?.group==="color")return;o.push({path:n,message:"expected $color.<name>"});return;case"style":for(const i of Gc(t,{path:n,root:!1}))o.push(i);return;case"array":if(!Array.isArray(t)){o.push({path:n,message:"expected an array"});return}e.items&&t.forEach((i,s)=>mu(e.items,i,`${n}[${s}]`,r,o));return;case"object":{if(typeof t!="object"||t===null||Array.isArray(t)){o.push({path:n,message:"expected an object"});return}if(!e.shape)return;const i=r.defs[e.shape];if(!i){o.push({path:n,message:`shape ${e.shape} is not defined`});return}yu(i.properties,t,n,r,o);return}}}function mu(e,t,n,r,o){if(!(e.bindable&&Ee(t))){if(e.responsive&&Jo(t)){for(const[i,s]of Object.entries(t))Ya(e,s,`${n}.${i}`,r,o);return}if(e.responsive&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&!Ee(t)){o.push({path:n,message:`a responsive value needs base and only ${Zo.join("|")} besides`});return}Ya(e,t,n,r,o)}}function yu(e,t,n,r,o){for(const[i,s]of Object.entries(e)){const a=t[i];if(a==null){s.required&&o.push({path:`${n}.${i}`,message:"required"});continue}mu(s,a,`${n}.${i}`,r,o)}for(const i of Object.keys(t))i in e||o.push({path:`${n}.${i}`,message:"unknown prop"})}function Sg(e){return wg.has(e)||/^[A-Za-z_][\w-]*(\.[A-Za-z_][\w-]*)+$/.test(e)}function Ws(e,t,n){Sg(e.call)||n.push({path:t,message:`unknown function "${e.call}"; known: the catalog functions, or a namespaced host function (app.toast)`})}function bn(e,t,n){if(Array.isArray(e)){e.forEach((r,o)=>bn(r,`${t}[${o}]`,n));return}if(!(typeof e!="object"||e===null)){Rr(e)&&Ws(e,t,n);for(const[r,o]of Object.entries(e))bn(o,`${t}.${r}`,n)}}function rs(e,t,n,r,o){if(Rr(e)){Ws(e,n,o),bn(e.args,`${n}.args`,o);return}if(!t||Bs(t))return;if(t.type==="style")return bn(e,n,o);if(t.type==="array"&&t.items&&Array.isArray(e)){e.forEach((s,a)=>rs(s,t.items,`${n}[${a}]`,r,o));return}const i=t.type==="object"&&t.shape?r.defs[t.shape]:void 0;if(i&&typeof e=="object"&&e!==null&&!Array.isArray(e))for(const[s,a]of Object.entries(e))rs(a,i.properties[s],`${n}.${s}`,r,o)}function Cg(e,t,n){if(typeof e!="object"||e===null)return;const{functionCall:r,event:o}=e;Rr(r)&&(Ws(r,`${t}.functionCall`,n),bn(r.args,`${t}.functionCall.args`,n)),typeof o=="object"&&o!==null&&bn(o.context,`${t}.event.context`,n)}function bu(e,t={}){const n=[],r=gu(t.extensions),o=r.components[e.component];if(e.style!==void 0)for(const i of Gc(e.style,{path:"style"}))n.push(i);for(const[i,s]of Object.entries(e.props))rs(s,o?.props[i],`props.${i}`,r,n);e.visible!==void 0&&bn(e.visible,"visible",n);for(const[i,s]of Object.entries(e.on??{}))Cg(s,`on.${i}`,n);if(e.component==="Table"&&Array.isArray(e.props.columns)){const i=Object.keys(e.slots??{});e.props.columns.forEach((s,a)=>{if(typeof s!="object"||s===null||s.type!=="slot")return;const l=s.slot;typeof l!="string"?n.push({path:`props.columns[${a}].slot`,message:"a slot column names one of the Table's slots"}):i.includes(l)||n.push({path:`props.columns[${a}].slot`,message:`no slot "${l}" on this Table; slots: ${i.join("|")||"none"}`})})}return n}function vu(e,t,n={}){const r=[];return yu(e.props,t,n.path??"props",gu(n.extensions),r),r}const Ag="Round 2 (docs/round-2-contract.md §7): the layout NUMBERS every painter shares where no theme token decides (px unless noted). `windowThreshold` = items past which List and Table window; `windowOverscan` = items rendered beyond each viewport edge; `resizeStep` = percentage points per arrow key on a Resizable handle; `panelMin` = a panel's min (percent) when unset; `resizeHandleHit` = a handle's hit area across its hairline; `fieldIntrinsicWidth` = the max-content width of a text field (Input, Textarea, NumberField, ChipInput: never the browser's `size` default) — picker triggers (Select, DatePicker, DateRangePicker, TimePicker) size to their content; `mediaIntrinsicWidth` = the max-content width of an Image/Video without a width (its min-content is 0); `mediaAspectRatio` = width/height of an Image without `aspectRatio` or a height (Video: its `aspectRatio` default); `treeGuideColumn` = one TreeGuides gutter column (the recipe's `line` width is the STROKE; round 3: 14, the ×4 app indent, the elbow lands on the parent's lead glyph); `treeGuideRadius` = the elbow's corner radius; `treeGuideBridge` = how far the guide verticals overshoot the row's TOP edge (paint only) so a Section's hairline divider never breaks the line. EXP-1259 (packages/domain-contract/fixtures/feedback-states.json + search-list.json): `pendingDelayMs` = how long a `loading` Button waits before it shows the spinner and its `pendingLabel` (a fast action never flashes; presses are refused at once); `skeletonPulseMs` / `skeletonOpacityLow` / `skeletonOpacityHigh` = the placeholder's ONE opacity pulse (low → high → low, ease-in-out), `skeletonReducedOpacity` = its static opacity under reduce motion; `searchListFade` = the bottom fade over a SearchList (or a searchable submenu) while more rows sit below. Generated into every target; src/layout.ts reads it.",Tg=50,Ig=5,Eg=10,_g=10,Dg=8,Pg=160,Og=320,Mg=1.7777778,Fg=14,zg=3,Rg=1,Ng=150,Lg=1600,jg=.45,Bg=.9,Hg=.6,Wg=24,qe={$comment:Ag,windowThreshold:Tg,windowOverscan:Ig,resizeStep:Eg,panelMin:_g,resizeHandleHit:Dg,fieldIntrinsicWidth:Pg,mediaIntrinsicWidth:Og,mediaAspectRatio:Mg,treeGuideColumn:Fg,treeGuideRadius:zg,treeGuideBridge:Rg,pendingDelayMs:Ng,skeletonPulseMs:Lg,skeletonOpacityLow:jg,skeletonOpacityHigh:Bg,skeletonReducedOpacity:Hg,searchListFade:Wg};Object.fromEntries(Object.entries(qe).filter(([e])=>!e.startsWith("$")));const Us=qe.windowThreshold,xu=qe.windowOverscan,Ug=qe.resizeStep,qg=qe.panelMin,Xa=qe.resizeHandleHit,Kg=qe.mediaIntrinsicWidth,os=qe.mediaAspectRatio,Si=qe.treeGuideColumn,Vg=qe.treeGuideRadius,Ci=qe.treeGuideBridge,Gg=qe.pendingDelayMs,Yg=qe.skeletonPulseMs,Za=qe.skeletonOpacityLow,Xg=qe.skeletonOpacityHigh,Zg=qe.skeletonReducedOpacity,Jg=qe.searchListFade;function $u(e,t){const n=new Set;return e.map((r,o)=>{let i=String(o);if(t!==void 0){const s=Ls(r,t.startsWith("/")?t:`/${t}`),a=s==null||s===""?null:typeof s=="object"?JSON.stringify(s):String(s);for(i=a!==null&&!n.has(a)?a:`#${o}`;n.has(i);)i=`#${i}`}return n.add(i),i})}const Qg=e=>e.replace(/~/g,"~0").replace(/\//g,"~1");function em(e,t="id"){return $u(e,`/${Qg(t)}`)}const tm=e=>e.replace(/~/g,"~0").replace(/\./g,"~1"),wu=(e,t)=>`${e}\0${t}`;function Ja(e){let t=0;const n=[e];for(;n.length;){const r=n.pop();t++;for(const o of Object.values(r.slots??{}))n.push(o);for(const o of r.children)n.push(o)}return t}function nm(e,t,n){const r=new Map,o=new Map,i=u=>{let d=o.get(u);return d===void 0&&o.set(u,d=Ja(u)),d};let s=0,a=Ja(e),l=null;const c=[{node:e,scope:""}];for(;c.length;){const u=c.pop();if("site"in u){if(l||u.index>=u.length||(s>=au?l={id:u.component,message:wt.templateItems}:a+u.size>Nr&&(l={id:u.component,message:wt.components}),l))continue;s++,a+=u.size,r.set(u.site,u.index+1),c.push({...u,index:u.index+1}),c.push({node:u.tpl,scope:`${u.path}/${u.index}`});continue}const{node:d,scope:f}=u,g=[];for(const m of Object.values(d.slots??{}))g.push({node:m,scope:f});for(const m of d.children)g.push({node:m,scope:f});const p=d.template,v=p?n(p.component):void 0;if(p&&v){const m=du(p.path,{base:f}),b=Ls(t,m),y=Array.isArray(b)&&d.component==="List"&&d.children.length+b.length>Us;if(Array.isArray(b)&&!y){const h=wu(d.id,f);r.set(h,0),g.push({site:h,component:p.component,tpl:v,path:m,size:i(v),index:0,length:b.length})}}for(let m=g.length-1;m>=0;m--)c.push(g[m])}return{allowed:r,issue:l}}function qs(e,t=0){const n=new Array(e.length+1);let r=0;for(let o=0;o<e.length;o++)n[o]=r,r+=e[o]+(o<e.length-1?t:0);return n[e.length]=r,n}function rm(e,t){let n=0,r=0;for(const i of e)typeof i=="number"&&(n+=i,r++);const o=r?n/r:t;return e.map(i=>typeof i=="number"?i:o)}function is(e,t,n){for(;e<t;){const r=e+t>>>1;n(r)?t=r:e=r+1}return e}function om(e,t,n,r,o=xu,i){const s=e.length,a=i??qs(e,t),l=a[s];let c=is(0,s,g=>a[g]+e[g]>=n),u=is(c,s,g=>a[g]>=n+r);if(c=Math.max(0,c-o),u=Math.min(s,u+o),u<=c)return{start:c,end:c,before:0,after:l,total:l};const d=a[c],f=l-(a[u-1]+e[u-1]);return{start:c,end:u,before:d,after:f,total:l}}function im(e,t,n,r,o,i="nearest",s=0,a){const l=qs(e,t),c=l[e.length];if(n<0||n>=e.length)return o;const u=l[n],d=e[n];let f=o;return i==="start"?f=u-s:i==="end"?f=u+d-r:i==="center"?f=u+d/2-(r+s)/2:u-s<o?f=u-s:u+d>o+r&&(f=u+d-r),Math.max(0,Math.min(Math.max(0,c-r),f))}function sm(e,t){const n=[],r=t.startsWith("/")?t:`/${t}`;return e.forEach((o,i)=>{const s=Ls(o,r),a=s==null?"":typeof s=="object"?JSON.stringify(s):String(s),l=n[n.length-1];l&&l.value===a?l.count++:n.push({value:a,start:i,count:1})}),n}function am(e){const t=[];return e.forEach((n,r)=>{t.push({header:r});for(let o=0;o<n.count;o++)t.push({item:n.start+o})}),t}function lm(e,t,n,r){const o=is(0,n.length,c=>e[n[c]]>r)-1;if(o<0)return null;const i=n[o],s=n[o+1],a=t[i],l=s===void 0?r:Math.min(r,e[s]-a);return{row:i,offset:l}}const jt=1e-9,Bn=(e,t,n)=>Math.max(t,Math.min(n,e)),ot=e=>{const t=Math.round(e*1e6)/1e6;return Object.is(t,-0)?0:t};function $r(e,t,n){const r=e?.[t]??{},o=100/Math.max(1,n),i=Bn(typeof r.min=="number"&&Number.isFinite(r.min)?r.min:qg,0,o),s=Bn(typeof r.max=="number"&&Number.isFinite(r.max)?r.max:100,i,100);return{min:i,max:s,collapsible:r.collapsible===!0}}function cm(e,t,n){if(t<=0)return[];const r=Array.from({length:t},(c,u)=>{const d=e?.[u];return typeof d=="number"&&Number.isFinite(d)&&d>=0?d:null}),o=r.filter(c=>c===null).length;let i;if(o===t)i=r.map(()=>100/t);else{const c=r.reduce((d,f)=>d+(f??0),0),u=Math.max(0,100-c);i=r.map(d=>d??u/o)}const s=i.reduce((c,u)=>c+u,0);i=s>jt?i.map(c=>c*100/s):i.map(()=>100/t);const a=i.map((c,u)=>$r(n,u,t));i=i.map((c,u)=>a[u].collapsible&&c<=jt?0:Bn(c,a[u].min,a[u].max));let l=100-i.reduce((c,u)=>c+u,0);for(let c=0;c<t&&Math.abs(l)>jt;c++){if(a[c].collapsible&&i[c]===0)continue;const u=l>0?a[c].max-i[c]:a[c].min-i[c],d=l>0?Math.min(l,u):Math.max(l,u);i[c]+=d,l-=d}return i.map(ot)}function fo(e,t,n,r){const o=[...e],i=t,s=t+1;if(i<0||s>=e.length||!Number.isFinite(n))return o.map(ot);const a=$r(r,i,e.length),l=$r(r,s,e.length),c=Math.max(a.min-e[i],e[s]-l.max),u=Math.min(a.max-e[i],e[s]-l.min);let d=Bn(n,Math.min(c,0),Math.max(u,0));return a.collapsible&&n<0&&e[i]>0&&e[i]+n<a.min/2&&e[s]+e[i]<=l.max+jt?d=-e[i]:l.collapsible&&n>0&&e[s]>0&&e[s]-n<l.min/2&&e[i]+e[s]<=a.max+jt?d=e[s]:a.collapsible&&e[i]===0?d=n>=a.min/2&&u>=a.min-jt?Bn(n,a.min,u):0:l.collapsible&&e[s]===0&&(d=-n>=l.min/2&&-c>=l.min-jt?-Bn(-n,l.min,-c):0),o[i]=e[i]+d,o[s]=e[s]-d,o.map(ot)}function um(e,t,n,r,o="ltr",i){const s=t,a=t+1;if(s<0||a>=e.length)return e.map(ot);const l=$r(i,s,e.length),c=$r(i,a,e.length),u=r==="horizontal"&&o==="rtl"?-1:1,d=f=>fo(e,t,f*Ug,i);switch(n){case"ArrowRight":return r==="horizontal"?d(u):e.map(ot);case"ArrowLeft":return r==="horizontal"?d(-u):e.map(ot);case"ArrowDown":return r==="vertical"?d(1):e.map(ot);case"ArrowUp":return r==="vertical"?d(-1):e.map(ot);case"Home":return fo(e,t,l.min-e[s],i);case"End":return fo(e,t,l.max-e[s],i);case"Enter":{const f=[...e];if(l.collapsible){const g=e[s]>0?-e[s]:Math.min(l.min,e[a]-c.min);if(e[a]-g>c.max+jt||g===0)return e.map(ot);f[s]+=g,f[a]-=g}else if(c.collapsible){const g=e[a]>0?e[a]:-Math.min(c.min,e[s]-l.min);if(e[s]+g>l.max+jt||g===0)return e.map(ot);f[s]+=g,f[a]-=g}return f.map(ot)}default:return e.map(ot)}}function dm(e,t,n,r,o="ltr",i=1){const s=Math.max(1,t-Math.max(0,n-1)*i),a=r==="horizontal"&&o==="rtl"?-1:1;return ot(e*100/s*a)}const Lr=Object.fromEntries(Object.entries(Tn.animations).filter(([e])=>!e.startsWith("$"))),fm=Object.keys(Lr),pm=e=>{const t=Math.round(e*1e4)/1e4;return Object.is(t,-0)?0:t},cn=e=>String(pm(e)),hm='@property --xui-a-opacity{syntax:"<number>";inherits:false;initial-value:1}@property --xui-band{syntax:"<number>";inherits:true;initial-value:1}';function gm(e){return Lr[e]?.keyframes.some(t=>t.opacity!==void 0)??!1}function mm(e){const t=Lr[e];if(!t)return"";const n=t.keyframes.map(r=>{const o=[];return r.opacity!==void 0&&o.push(`--xui-a-opacity:${cn(r.opacity)}`),(r.translateX!==void 0||r.translateY!==void 0)&&o.push(`translate:${cn(r.translateX??0)}px ${cn(r.translateY??0)}px`),r.rotate!==void 0&&o.push(`rotate:${cn(r.rotate)}deg`),r.scale!==void 0&&o.push(`scale:${cn(r.scale)}`),r.band!==void 0&&o.push(`--xui-band:${cn(r.band)}`),`${cn(r.offset*100)}%{${o.join(";")}}`});return`@keyframes xui-${e}{${n.join("")}}`}const ku=an.default,ym=an.languageAliases;function Su(e){const t=e.replace(/_/g,"-").split("-").filter(Boolean),n=(t[0]??"").toLowerCase(),r=ym[n]??n,o=t.slice(1).find(i=>/^[A-Za-z]{2}$|^\d{3}$/.test(i));return{language:r,region:o?o.toUpperCase():null}}const Qa=(()=>{const e={};for(const[t,n]of Object.entries(an.weekStart.regions))for(const r of n)e[r]=Number(t);return e})();function bm(e){const{language:t,region:n}=Su(e);return n??an.likelyRegion[t]??null}function vm(e){const t=bm(e);return t!==null&&t in Qa?Qa[t]:an.weekStart.default}function xm(e){return an.rtl.includes(Su(e).language)?"rtl":"ltr"}const $m=an.rtlMirroredIcons,wm={operators:"+-*/%=&|<>!?^~:@#",punctuation:"()[]{},.;"},km={plain:{plain:!0},json:{strings:['"'],keywords:["true","false","null"],keyStrings:!0},js:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",keywords:["async","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]},ts:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",typeNames:["any","bigint","boolean","never","number","object","string","symbol","unknown"],keywords:["abstract","as","async","await","break","case","catch","class","const","continue","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","infer","instanceof","interface","is","keyof","let","namespace","new","null","of","private","protected","public","readonly","return","satisfies","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","yield"]},tsx:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",typeNames:["any","bigint","boolean","never","number","object","string","symbol","unknown"],keywords:["abstract","as","async","await","break","case","catch","class","const","continue","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","infer","instanceof","interface","is","keyof","let","namespace","new","null","of","private","protected","public","readonly","return","satisfies","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","yield"]},rust:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"'],multiline:['"'],types:"capitalized",typeNames:["bool","char","f32","f64","i8","i16","i32","i64","i128","isize","str","u8","u16","u32","u64","u128","usize"],keywords:["as","async","await","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","Self","static","struct","super","trait","true","type","unsafe","use","where","while"]},swift:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"'],types:"capitalized",keywords:["any","as","associatedtype","async","await","break","case","catch","class","continue","default","defer","do","else","enum","extension","fallthrough","false","for","func","guard","if","import","in","init","inout","internal","is","let","nil","private","protocol","public","repeat","rethrows","return","self","Self","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","var","where","while"]},kotlin:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'"],types:"capitalized",keywords:["as","break","by","catch","class","companion","constructor","continue","data","do","else","enum","false","finally","for","fun","if","import","in","init","interface","internal","is","lateinit","null","object","open","override","package","private","protected","public","return","sealed","super","suspend","this","throw","true","try","typealias","val","var","when","while"]},python:{lineComment:["#"],strings:['"',"'"],types:"capitalized",keywords:["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","self","try","while","with","yield"]},bash:{lineComment:["#"],strings:['"',"'"],multiline:['"',"'"],keywords:["case","do","done","echo","elif","else","esac","exit","export","fi","for","function","if","in","local","readonly","return","then","until","while"]},html:{markup:!0,blockComment:[["<!--","-->"]],strings:['"',"'"],numbers:!1},css:{blockComment:[["/*","*/"]],strings:['"',"'"],identExtra:"-@",keyIdents:!0,operators:"+*/%=&|<>!?^~:#",keywords:["@container","@font-face","@import","@keyframes","@layer","@media","@supports","auto","important","inherit","initial","none","unset"]},sql:{lineComment:["--"],blockComment:[["/*","*/"]],strings:["'",'"'],caseInsensitive:!0,keywords:["all","alter","and","as","asc","between","by","case","create","default","delete","desc","distinct","drop","else","end","exists","foreign","from","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","offset","on","or","order","outer","primary","references","returning","right","select","set","table","then","union","update","values","when","where","with"]},yaml:{lineComment:["#"],strings:['"',"'"],keyIdents:!0,identExtra:"-",keywords:["true","false","null","yes","no"]},markdown:{lineKinds:{"#":"keyword",">":"comment"},strings:["`"],numbers:!1,operators:"",punctuation:""},ansi:{ansi:!0,numbers:!1,operators:"",punctuation:"",lineKinds:{"$ ":"comment","> ":"comment","BUILD SUCCESSFUL":"success","BUILD FAILED":"error","PASS ":"success","FAIL ":"error",FAILED:"error","(pass)":"success","(fail)":"error","test result: ok":"success","test result: FAILED":"error","error:":"error","error[":"error","Error:":"error","warning:":"warning","✓":"success","✔":"success","✗":"error","✘":"error"}}},ss={defaults:wm,languages:km},as=ss.languages,Dn=e=>e!==void 0&&e>="0"&&e<="9",Pn=e=>e!==void 0&&(e>="a"&&e<="z"||e>="A"&&e<="Z"),Zt=e=>e===" "||e===" ";function el(e,t){let n=t;for(;Zt(e[n]);)n++;return e[n]}function Cu(e,t,n=!0){const r=[],o=e.length,i=t.operators??ss.defaults.operators,s=t.punctuation??ss.defaults.punctuation,a=t.identExtra??"",l=m=>Pn(m)||m==="_"||m==="$"||m!==void 0&&a.includes(m),c=m=>l(m)||Dn(m),u=new Set(t.keywords??[]),d=new Set(t.typeNames??[]),f=(m,b)=>r.push({kind:m,text:b}),g=()=>{for(let m=r.length-1;m>=0;m--)if(r[m].text.trim()!=="")return r[m]};if(t.plain)return e?[{kind:"plain",text:e}]:[];let p=0,v=!1;for(;p<o;){const m=e[p];if(m===`
2
+ `){f("plain",m),p++;continue}if(t.lineKinds&&(p===0?n:e[p-1]===`
3
+ `||Au(e,p,n))){let h;for(const k of Object.keys(t.lineKinds))e.startsWith(k,p)&&(!h||k.length>h.length)&&(h=k);if(h&&!Zt(m)){let k=p;for(;k<o&&e[k]!==`
4
+ `;)k++;f(t.lineKinds[h],e.slice(p,k)),p=k;continue}}if(v?void 0:(t.lineComment??[]).find(h=>e.startsWith(h,p))){let h=p;for(;h<o&&e[h]!==`
5
+ `;)h++;f("comment",e.slice(p,h)),p=h;continue}const y=v?void 0:(t.blockComment??[]).find(([h])=>e.startsWith(h,p));if(y){const h=e.indexOf(y[1],p+y[0].length),k=h<0?o:h+y[1].length;f("comment",e.slice(p,k)),p=k;continue}if((t.strings??[]).includes(m)&&(!t.markup||v)){const h=(t.multiline??[]).includes(m);let k=p+1;for(;k<o;){if(e[k]==="\\"){k+=2;continue}if(e[k]===m){k++;break}if(e[k]===`
6
+ `&&!h)break;k++}k=Math.min(k,o);const w=t.keyStrings&&el(e,k)===":"?"property":"string";f(w,e.slice(p,k)),p=k;continue}if(t.markup){if(!v){if(m==="<"&&(Pn(e[p+1])||e[p+1]==="/"||e[p+1]==="!")){const k=e[p+1]==="/"?"</":"<";f("punctuation",k);let w=p+k.length;const _=w;for(;w<o&&(Pn(e[w])||Dn(e[w])||e[w]==="-"||e[w]===":"||e[w]==="!");)w++;w>_&&f("tag",e.slice(_,w)),v=!0,p=w;continue}let h=p;for(;h<o&&e[h]!=="<"&&e[h]!==`
7
+ `;)h++;h===p&&(h=p+1),f("plain",e.slice(p,h)),p=h;continue}if(m===">"||e.startsWith("/>",p)){const h=m===">"?">":"/>";f("punctuation",h),v=!1,p+=h.length;continue}if(m==="="){f("operator",m),p++;continue}if(Pn(m)||m==="_"||m===":"||m==="@"){let h=p;for(;h<o&&(Pn(e[h])||Dn(e[h])||"_:@.-".includes(e[h]));)h++;f("attribute",e.slice(p,h)),p=h;continue}if(Zt(m)){let h=p;for(;Zt(e[h]);)h++;f("plain",e.slice(p,h)),p=h;continue}f("plain",m),p++;continue}if(t.numbers!==!1&&(Dn(m)||m==="."&&Dn(e[p+1]))){let h=p+1;for(;h<o&&(Dn(e[h])||Pn(e[h])||e[h]==="_"||e[h]===".");)h++;f("number",e.slice(p,h)),p=h;continue}if(l(m)){let h=p+1;for(;h<o&&c(e[h]);)h++;const k=e.slice(p,h),w=t.caseInsensitive?k.toLowerCase():k,_=el(e,h),A=(()=>{let O=h;for(;Zt(e[O]);)O++;return e[O+1]})(),S=g();let E="plain";u.has(w)?E="keyword":t.keyIdents&&_===":"&&A!==":"?E="property":_==="("?E="function":S&&S.kind==="punctuation"&&S.text.endsWith(".")?E="property":(d.has(k)||t.types==="capitalized"&&k[0]>="A"&&k[0]<="Z")&&(E="type"),f(E,k),p=h;continue}if(Zt(m)){let h=p;for(;Zt(e[h]);)h++;f("plain",e.slice(p,h)),p=h;continue}if(i.includes(m)){let h=p;for(;h<o&&i.includes(e[h]);)h++;f("operator",e.slice(p,h)),p=h;continue}f(s.includes(m)?"punctuation":"plain",m),p++}return r}function Au(e,t,n=!0){let r=t-1;for(;r>=0&&Zt(e[r]);)r--;return r<0?n:e[r]===`
8
+ `}const Sm=e=>e>=48&&e<=63,Cm=e=>e>=32&&e<=47,Am=e=>e>=64&&e<=126;function Tm(e,t){let n=t;for(const r of e.split(";")){const o=r===""?0:Number(r);o===0||o===39?n=null:o===31||o===91?n="error":o===32||o===92?n="success":o===33||o===93?n="warning":(o===2||o===90)&&(n="comment")}return n}function Tu(e){const t=[];let n=null,r="";const o=()=>{if(r==="")return;const a=t[t.length-1];a&&a.kind===n?a.text+=r:t.push({kind:n,text:r}),r=""};let i=0;const s=e.length;for(;i<s;){if(e.charCodeAt(i)===27&&e[i+1]==="["){let a=i+2;for(;a<s&&Sm(e.charCodeAt(a));)a++;const l=e.slice(i+2,a);for(;a<s&&Cm(e.charCodeAt(a));)a++;if(a<s&&Am(e.charCodeAt(a))){if(e[a]==="m"){const c=Tm(l,n);c!==n&&(o(),n=c)}i=a+1;continue}}r+=e[i],i++}return o(),t}function Im(e,t){const n=[];let r=!0;for(const o of Tu(e))o.kind?n.push({kind:o.kind,text:o.text}):n.push(...Cu(o.text,t,r)),r=Au(o.text,o.text.length,r);return n}function Em(e,t){const n=e.replace(/\r\n?/g,`
9
+ `);return as[t]?.ansi?Tu(n).map(r=>r.text).join(""):n}function _m(e,t){const n=e.replace(/\r\n?/g,`
10
+ `),r=as[t]??as.plain,o=[[]];for(const i of r.ansi?Im(n,r):Cu(n,r))i.text.split(`
11
+ `).forEach((a,l)=>{if(l>0&&o.push([]),a==="")return;const c=o[o.length-1],u=c[c.length-1];u&&u.kind===i.kind?u.text+=a:c.push({kind:i.kind,text:a})});return o}function Ks(e){return typeof e=="string"&&/^#([0-9a-f]{6}|[0-9a-f]{8})$/.test(e)}const Dm=Tn.textShimmer;function Pm(e,t,n,r){let o=1/0,i=-1/0;if(e==="stackedBar"){let s=0;for(const a of t)s=Math.max(s,a.values.length);for(let a=0;a<s;a++){let l=0,c=0;for(const u of t){const d=u.values[a];Number.isFinite(d)&&(d>0?l+=d:c+=d)}l>i&&(i=l),c<o&&(o=c)}}else for(const s of t)for(const a of s.values)Number.isFinite(a)&&(a<o&&(o=a),a>i&&(i=a));return e!=="sparkline"&&(o=Math.min(0,o),i=Math.max(0,i)),Number.isFinite(o)||(o=0),Number.isFinite(i)||(i=0),o=n??o,i=r??i,i<=o&&(i=o+1),{min:o,max:i}}function Om(e){let t=1/0,n=-1/0;for(const r of e)for(const o of r.values)Number.isFinite(o)&&(o<t&&(t=o),o>n&&(n=o));return{series:e.map(r=>r.name).filter(Boolean).join(", "),min:Number.isFinite(t)?t:0,max:Number.isFinite(n)?n:0}}function tl(e,t){const n=Math.floor(Math.log10(e)),r=e/10**n;return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*10**n}function Mm(e,t,n=5){const r=Math.min(e,t),o=t===e?e+1:Math.max(e,t),i=tl(o-r,!1),s=tl(i/Math.max(1,n-1),!0),a=Math.max(0,-Math.floor(Math.log10(s))),l=f=>Number(f.toFixed(a)),c=l(Math.floor(r/s)*s),u=l(Math.ceil(o/s)*s),d=[];for(let f=c,g=0;f<=u+s/2&&g<100;g++,f=c+g*s)d.push(l(f));return{min:c,max:u,step:s,ticks:d}}function Fm(e,t){return t?t==="danger"?"$color.destructive":t==="neutral"?"$color.mutedForeground":`$color.${t}`:`$color.chart${e%8+1}`}const zm=.6,Ln=_s;function nl(e){return typeof e!="string"?Ln.placeholderIcon:(ls(Ln.icons,e)?Ln.icons[e]:void 0)??Ln.placeholderIcon}function Rm(e){return typeof e=="object"&&e!==null&&typeof e.path=="string"}const Nm={textVariant(e,t){const n=t.variant;if(n==="h1"||n==="h2"||n==="h3"||n==="h4"){e.component="Heading",e.props={text:e.props.text,level:n};return}e.props.variant=n==="h5"?"label":n==="caption"?"caption":"body"},imageVariant(e,t){const n=t.variant??"mediumFeature";if(n==="avatar"){e.component="Avatar",e.props={src:e.props.src,name:t.description??""};return}const r=n==="icon"?{width:24,height:24}:n==="smallFeature"?{width:120,height:120}:n==="header"?{width:"100%",aspectRatio:3}:{width:"100%",aspectRatio:1.7777778};e.style={...e.style??{},...r}},iconName(e,t){e.props.name=nl(t.name)},tabs(e,t){const n=Array.isArray(t.tabs)?t.tabs:[];e.props.tabs=n.map(r=>({label:r.title,value:r.child})),e.childrenIds=n.map(r=>r.child),n.length>0&&(e.props.value=n[0].child)},modal(e,t){typeof t.trigger=="string"&&(e.slots.trigger=t.trigger),typeof t.content=="string"&&(e.childrenIds=[t.content]),e.props.open=!1},buttonChild(e,t,n){const r=typeof t.child=="string"?t.child:void 0,o=r?n(r):void 0;o?.component==="Text"?e.props.label=o.text:o?.component==="Icon"?e.props.icon=nl(o.name):r&&(e.childrenIds=[r]),e.props.icon!==void 0&&e.props.label===void 0&&(e.props.size="icon"),t.action!==void 0&&(e.on={press:t.action})},textField(e,t){e.props.name=t.id;const n=t.variant??"shortText";if(n==="longText"?e.component="Textarea":e.props.type=n==="number"?"number":n==="obscured"?"password":"text",typeof t.validationRegexp=="string"){const r=Rm(t.value)?t.value.path:t.id,o=Array.isArray(e.props.checks)?[...e.props.checks]:[];o.push({condition:{call:"regex",args:{value:{path:r},pattern:t.validationRegexp}},message:"Invalid value"}),e.props.checks=o}},fieldName(e,t){e.props.name=t.id},choicePicker(e,t){e.props.name=t.id;const n=t.variant==="multipleSelection",r=t.value,o=Array.isArray(r)?n?r.join(","):r[0]??"":r;o!==void 0&&(e.props.value=o),t.filterable===!0?(e.component="Select",e.props.searchable=!0,e.props.multiple=n):t.displayStyle==="chips"?(e.component="Segmented",e.props={items:e.props.options,type:n?"multiple":"single",variant:"outline",value:e.props.value}):n&&(e.component="Select",e.props.multiple=!0)}};function ls(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Lm(e,t){const n=ls(Ln.components,e.component)?Ln.components[e.component]:void 0;if(!n)return null;const r={};for(const[i,s]of Object.entries(n.props)){if(typeof s=="string"){e[s]!==void 0&&(r[i]=e[s]);continue}if("const"in s){r[i]=s.const;continue}let a=s.from!==void 0?e[s.from]:void 0;s.map&&typeof a=="string"&&ls(s.map,a)&&(a=s.map[a]),a===void 0&&s.default!==void 0&&(a=s.default),a!==void 0&&(r[i]=a)}const o={component:n.to,props:r,childrenIds:[],slots:{}};if(n.children==="children"){const i=e.children;Array.isArray(i)?o.childrenIds=i:i&&typeof i=="object"&&(o.template={component:i.componentId,path:i.path,...typeof i.key=="string"?{key:i.key}:{}})}else n.children==="child"&&typeof e.child=="string"&&(o.childrenIds=[e.child]);if(n.transform){const i=Nm[n.transform];if(!i)throw new Error(`basic-map.json names an unimplemented transform: ${n.transform}`);i(o,e,t)}return o}const jm=["id","component","children","slots","on","style","visible","accessibility","template"],Bm=new Set(jm);function Iu(e,t,n){const r=[],o=new Set,i=new Map,s=new Set;let a=!1;const l=new Map,c=g=>{const p=g.template?.component;p===e.id?a=!0:p!==void 0&&!o.has(p)&&(o.add(p),r.push(p));for(const v of Object.values(g.slots??{}))c(v);g.children.forEach(c)},u=g=>{if((g.children.some(v=>o.has(v.id))||Object.values(g.slots??{}).some(v=>o.has(v.id)))&&!l.has(g)&&l.set(g,{children:[...g.children],...g.slots?{slots:{...g.slots}}:{}}),g.children=g.children.filter(v=>o.has(v.id)?(i.has(v.id)||i.set(v.id,v),!1):!0),g.slots){for(const[v,m]of Object.entries(g.slots))o.has(m.id)&&(i.has(m.id)||i.set(m.id,m),delete g.slots[v]);Object.keys(g.slots).length===0&&delete g.slots}for(const v of Object.values(g.slots??{}))u(v);g.children.forEach(u)};c(e);for(let g="";g!==`${o.size}/${i.size}/${s.size}`;){g=`${o.size}/${i.size}/${s.size}`,u(e);for(let p=-1;p!==i.size;){p=i.size;for(const v of[...i.values()])u(v)}for(const p of r){if(i.has(p)||s.has(p))continue;const v=n?.(p);v?i.set(p,v):(s.add(p),t.push({id:p,message:"template: no component with this id"}))}for(const p of[...i.values()])c(p)}a&&t.push({id:e.id,message:"template: cycle through this id"});const d=new Set(i.keys());for(;;){for(const[m,b]of l)if(m.children=b.children.filter(y=>!d.has(y.id)),b.slots){const y=Object.entries(b.slots).filter(([,h])=>!d.has(h.id));y.length>0?m.slots=Object.fromEntries(y):delete m.slots}const g=new Map;for(const m of d){const b=new Set,y=h=>{const k=h.template?.component;k!==void 0&&d.has(k)&&b.add(k);for(const w of Object.values(h.slots??{}))y(w);h.children.forEach(y)};y(i.get(m)),g.set(m,b)}const p=(m,b)=>{const y=new Set,h=[...g.get(m)??[]];for(;h.length>0;){const k=h.pop();if(k===b)return!0;y.has(k)||(y.add(k),h.push(...g.get(k)??[]))}return!1},v=r.filter(m=>d.has(m)&&p(m,m));if(v.length===0)break;for(const m of v)d.delete(m),t.push({id:m,message:"template: cycle through this id"})}const f=new Map;for(const g of r){const p=i.get(g);p&&d.has(g)&&f.set(g,p)}return f}function Eu(e,t,n,r,o,i){const s={left:Nr,reported:i.some(l=>l.message===wt.components)};if(e=rl(ol(n?Ga(e,{extensions:r,issues:i}):e,o,i),s,i),t.size===0)return{root:e,issues:i};const a={};for(const[l,c]of t)a[l]=rl(ol(n?Ga(c,{extensions:r,issues:i}):c,o,i),s,i);return{root:e,issues:i,templates:a}}function rl(e,t,n){Hn(t,e.id,n);const r=o=>{if(o.children=o.children.filter(i=>Hn(t,i.id,n)?(r(i),!0):!1),o.slots)for(const[i,s]of Object.entries(o.slots))Hn(t,s.id,n)?r(s):delete o.slots[i]};return r(e),e}function ol(e,t,n){const r=new Set(n.filter(i=>i.message===wt.depth).map(i=>i.id)),o=[{node:e,depth:1}];for(;o.length;){const{node:i,depth:s}=o.pop(),a=c=>s+1<=xr||c.component===br&&c.children.length===0&&c.slots===void 0?c:(r.has(c.id)||(r.add(c.id),n.push({id:c.id,message:wt.depth})),Nt(c.id,c.component,t)),l=[];if(i.children=i.children.map(c=>{const u=a(c);return l.push(u),u}),i.slots)for(const[c,u]of Object.entries(i.slots)){const d=a(u);i.slots[c]=d,l.push(d)}if(!(s+1>xr))for(let c=l.length-1;c>=0;c--)o.push({node:l[c],depth:s+1})}return e}function Nt(e,t,n){return{id:e,component:br,props:{component:t,catalogId:n},children:[]}}function Hm(e){const t={};for(const[n,r]of Object.entries(e))!Bm.has(n)&&r!==void 0&&(t[n]=r);return t}function Wm(e,t){return e===yr||e===Hc||e===Ds||t.some(n=>n.id===e)}function _u(e){return typeof e=="boolean"||Ee(e)}function Um(e){const t={component:e.componentId,path:e.path};return typeof e.key=="string"&&(t.key=e.key),t}function Du(e,t){const n=t.extensions??[],r=Fr(n),o=[],i=new Map;e.forEach((m,b)=>{if(!m||typeof m!="object"||typeof m.id!="string"||typeof m.component!="string"){o.push({id:t.rootId??"root",message:`components[${b}] is not a component (an object with a string id and component)`});return}i.has(m.id)&&o.push({id:m.id,message:"duplicate id; the last definition wins"}),i.set(m.id,m)});const s=m=>i.get(m),a=t.catalogId===Ds;Wm(t.catalogId,n)||o.push({id:t.rootId??"root",message:`unsupported catalog ${t.catalogId}`});const l=new Set,c=new Set,u=new Set,d={left:Nr,reported:!1},f=(m,b)=>{const y=i.get(m);if(y){if(l.has(m))return Hn(d,m,o)?(o.push({id:m,message:"cycle through this id"}),Nt(m,y.component,t.catalogId)):void 0;if(c.has(m)){u.has(m)||(u.add(m),o.push({id:m,message:wt.usedTwice}));return}}if(!Hn(d,m,o))return;if(!y)return o.push({id:m,message:"no component with this id"}),Nt(m,`#${m}`,t.catalogId);if(c.add(m),b>xr)return o.push({id:m,message:wt.depth}),Nt(m,y.component,t.catalogId);const h=_=>f(_,b+1),k=_=>_.map(h).filter(A=>A!==void 0);l.add(m);let w;if(a){const _=Lm(y,s);if(!_)o.push({id:m,message:`basic component ${y.component} has no mapping`}),w=Nt(m,y.component,t.catalogId);else{w={id:m,component:_.component,props:_.props,children:k(_.childrenIds)},_.template&&(w.template=_.template),_.style&&(w.style=_.style),_.on&&(w.on=_.on);for(const[A,S]of Object.entries(_.slots)){const E=h(S);E&&((w.slots??={})[A]=E)}}}else if(!r.components[y.component])o.push({id:m,message:`unknown component ${y.component}`}),w=Nt(m,y.component,t.catalogId);else{w={id:m,component:y.component,props:Hm(y),children:[]},Array.isArray(y.children)?w.children=k(y.children):y.children&&typeof y.children=="object"&&(w.template=Um(y.children)),y.style&&(w.style=y.style),y.on&&(w.on=y.on);for(const[A,S]of Object.entries(y.slots??{})){const E=h(S);E&&((w.slots??={})[A]=E)}}if(y.visible!==void 0&&(_u(y.visible)?w.visible=y.visible:o.push({id:m,message:"visible: expected a boolean, a binding or a function call"})),y.accessibility&&(w.accessibility=y.accessibility),l.delete(m),t.validate!==!1&&w.component!==br){const _=r.components[w.component];if(_){for(const A of vu(_,w.props,{path:"props",extensions:n}))o.push({id:m,message:`${A.path}: ${A.message}`});_.children==="none"&&w.children.length>0&&o.push({id:m,message:`${w.component} takes no children`});for(const A of Object.keys(w.slots??{}))Pu(_.slots,A)||o.push({id:m,message:`slots.${A}: ${w.component} has no such slot`});for(const A of bu(w,{extensions:n}))o.push({id:m,message:`${A.path}: ${A.message}`})}}return w},g=t.rootId??"root";let p=f(g,1)??Nt(g,`#${g}`,t.catalogId);const v=Iu(p,o,m=>i.has(m)&&!c.has(m)?f(m,1):void 0);return Eu(p,v,t.expand!==!1,n,t.catalogId,o)}function Hn(e,t,n){return e.left>0?(e.left-=1,!0):(e.reported||n.push({id:t,message:wt.components}),e.reported=!0,!1)}function Pu(e,t){return(e??[]).some(n=>n==="*"||n===t)}function qm(e,t){const n=t.extensions??[],r=Fr(n),o=[],i={left:Nr,reported:!1},s=(c,u)=>{if(!Hn(i,c.id,o))return;if(u>xr)return o.push({id:c.id,message:wt.depth}),Nt(c.id,c.component,t.catalogId);const d=r.components[c.component];if(!d)return o.push({id:c.id,message:`unknown component ${c.component}`}),Nt(c.id,c.component,t.catalogId);const f=(c.children??[]).map(p=>s(p,u+1)).filter(p=>p!==void 0),g={id:c.id,component:c.component,props:{...c.props??{}},children:f};if(c.style&&(g.style=c.style),c.visible!==void 0&&(_u(c.visible)?g.visible=c.visible:o.push({id:c.id,message:"visible: expected a boolean, a binding or a function call"})),c.on&&(g.on=c.on),c.accessibility&&(g.accessibility=c.accessibility),c.template&&(g.template=c.template),c.slots){g.slots={};for(const[p,v]of Object.entries(c.slots)){const m=s(v,u+1);m&&(g.slots[p]=m)}}if(t.validate!==!1){for(const p of vu(d,g.props,{path:"props",extensions:n}))o.push({id:c.id,message:`${p.path}: ${p.message}`});d.children==="none"&&g.children.length>0&&o.push({id:c.id,message:`${c.component} takes no children`});for(const p of Object.keys(g.slots??{}))Pu(d.slots,p)||o.push({id:c.id,message:`slots.${p}: ${c.component} has no such slot`});for(const p of bu(g,{extensions:n}))o.push({id:c.id,message:`${p.path}: ${p.message}`})}return g};let a=s(e,1);const l=Iu(a,o);return Eu(a,l,t.expand!==!1,n,t.catalogId,o)}const Km=/^https?:\/\/[^\s]+$/,Vm=/^[A-Z][A-Za-z0-9]*$/;function Gm(e){const t=[];Km.test(e.id)||t.push("id must be a URL-shaped catalog id"),e.extends!==yr&&t.push(`extends must be ${yr}`),e.name||t.push("name is required"),Object.keys(e.components).length===0&&t.push("an extension defines at least one component");for(const[r,o]of Object.entries(e.components)){Vm.test(r)||t.push(`${r}: component names are PascalCase`),r in Qe.components&&t.push(`${r}: shadows a core component`),o.description||t.push(`${r}: description is required`);for(const[i,s]of Object.entries(o.props))s.description||t.push(`${r}.${i}: description is required`),s.type==="enum"&&s.enum&&!(s.enum in Qe.enums)&&!(s.enum in(e.enums??{}))&&t.push(`${r}.${i}: enum ${s.enum} is not defined`),s.type==="object"&&s.shape&&!(s.shape in Qe.defs)&&!(s.shape in(e.defs??{}))&&t.push(`${r}.${i}: shape ${s.shape} is not defined`);o.kind==="macro"&&!e.macros?.[r]&&t.push(`${r}: a macro needs a template in macros`)}for(const r of Object.keys(e.macros??{}))e.components[r]?.kind!=="macro"&&t.push(`macros.${r}: no macro component of that name`);for(const r of Object.keys(e.enums??{}))r in Qe.enums&&t.push(`enums.${r}: shadows a core enum`);return t}function Ym(e){const t=Gm(e);if(t.length>0)throw new Error(`extension ${e.id}:
12
+ ${t.join(`
13
+ `)}`);return e}Object.fromEntries(Jp.map(e=>[e,((t,n,r)=>({component:e,props:t,...n?{children:n}:{},...r}))]));const Xm=["hover","pressed","focus","disabled","checked","open","selected","invalid","dragover"],Zm=["backgroundColor","color","borderColor","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderStyle","padding","paddingHorizontal","paddingVertical","gap","width","height","minWidth","minHeight","fontSize","fontWeight","lineHeight","fontFamily","letterSpacing","textDecoration","textTransform","fontStyle","boxShadow","opacity","transition","transitionEasing","transform","backdropBlur","animation","native"],Jm={Box:{parts:["root"],props:["pressable"]},List:{parts:["root","divider","section"],props:["direction","divided","stickyHeaders"]},Resizable:{parts:["root","panel","handle","grip"],props:["direction","handle"]},Text:{parts:["root"],props:["variant","tone"]},Markdown:{parts:["root","paragraph","heading","link","code","codeBlock","quote","table","listItem"],props:[]},Image:{parts:["root","fallback"],props:["fit"]},Icon:{parts:["root"],props:["size","tone"]},Video:{parts:["root","controls","poster"],props:["autoplay"]},AudioPlayer:{parts:["root","controls","track"],props:[]},Avatar:{parts:["root","image","fallback"],props:["size"]},Carousel:{parts:["root","page","indicator","controls","previous","next"],props:["loop","indicators"]},Tabs:{parts:["root","list","tab","indicator","content","close","new"],props:["fill","closable","addable"]},Segmented:{parts:["root","item","icon","label"],props:["type","variant","size","fill"]},Accordion:{parts:["root","item","trigger","content","count"],props:["type"]},Dialog:{parts:["overlay","content","title","description","footer","close"],props:["dismissible"]},Drawer:{parts:["overlay","content","handle","title","description","footer"],props:["side","dismissible"]},Popover:{parts:["content","arrow"],props:["side","openOn"]},Tooltip:{parts:["content","arrow","anchor"],props:["side"]},Menu:{parts:["trigger","content","item","separator","label","shortcut","check","submenuIndicator","head","search","count","list","empty","fade"],props:["openOn"]},Toast:{parts:["root","icon","title","description","action","close"],props:["type"]},Ring:{parts:["root","track","fill","label"],props:["size","tone"]},Spinner:{parts:["root"],props:["size"]},Skeleton:{parts:["root","row","dot","bar"],props:["rounded","dot"]},Chart:{parts:["root","title","axis","grid","legend","tooltip","valueLabel"],props:["kind"]},Table:{parts:["root","caption","header","headerCell","sortIcon","row","cell","checkbox","empty","body"],props:["selectable","striped","density","stickyHeader","align"]},Button:{parts:["root","icon","label","spinner"],props:["variant","size","disabled","loading"]},Link:{parts:["root"],props:["external"]},Toggle:{parts:["root","icon","label"],props:["variant","size","pressed"]},Form:{parts:["root","summary"],props:["disabled","busy"]},Input:{parts:["root","label","field","placeholder","description","error"],props:["type","disabled"]},Textarea:{parts:["root","label","field","placeholder","description","error"],props:["disabled"]},NumberField:{parts:["root","label","field","decrement","increment","unit","description","error","input"],props:["disabled"]},Checkbox:{parts:["root","box","check","label","description"],props:["checked","disabled"]},Radio:{parts:["root","item","dot","label","items"],props:["orientation"]},ChoiceTiles:{parts:["root","tile","picture","label","description"],props:["type","columns"]},Switch:{parts:["root","track","thumb","label","description","body"],props:["checked","disabled"]},Slider:{parts:["root","track","range","thumb","label","value","header"],props:[]},Select:{parts:["root","label","trigger","placeholder","content","search","item","check","empty"],props:["multiple","searchable","disabled"]},SearchList:{parts:["root","head","search","count","list","item","icon","identifier","label","check","empty","fade"],props:[]},ChipInput:{parts:["root","label","field","chip","chipLabel","remove","placeholder","description","error","input"],props:["disabled"]},DatePicker:{parts:["root","label","trigger","calendar","day"],props:[]},DateRangePicker:{parts:["root","label","trigger","calendar","day","range"],props:[]},TimePicker:{parts:["root","label","trigger","placeholder","list","item"],props:["disabled"]},FileUpload:{parts:["root","label","dropzone","icon","hint","file","fileName","fileMeta","remove","description","error","title","browse","fileIcon"],props:["multiple","disabled"]},CodeBlock:{parts:["root","header","title","copy","gutter","line","lineNumber","token","body","code"],props:["lineNumbers","wrap","kind","variant","size"]},Composer:{parts:["root","field","placeholder","attachment","send"],props:["attachments","busy"]},TreeGuides:{parts:["root","line"],props:["tee"]},Unknown:{parts:["root","label"],props:[]}},Vs={states:Xm,keys:Zm,native:Jm},il=Vs.states,sl=Vs.keys,Ai=Vs.native;function cs(e,t,n){if(typeof e!="string"){t.add(e.part);for(const r of Object.keys(e.$recipe??{}))n.add(r);for(const r of e.children??[])cs(r,t,n);for(const r of Object.values(e.slots??{}))typeof r!="string"&&cs(r,t,n)}}function Qm(e){const t=new Set,n=new Set(e.recipeProps);return cs(e.root,t,n),{parts:[...t],props:[...n]}}function us(e=[]){const t=Gn(e),n={};for(const[r,o]of Object.entries(t.components)){if(o.kind==="macro"){const s=t.macros[r];s&&(n[r]=Qm(s));continue}const i=o.recipe;Ai[r]?n[r]={parts:[...Ai[r].parts],props:[...Ai[r].props]}:i?n[r]={parts:[...i.parts],props:[...i.props]}:n[r]={parts:["root"],props:Object.entries(o.props).filter(([,s])=>s.type==="enum"||s.type==="boolean").map(([s])=>s)}}return n}let ey;const al=new WeakMap;function ty(e){if(e.length===0)return ey??={view:Gn(),parts:us()};let t=al.get(e);return t||al.set(e,t={view:Gn(e),parts:us(e)}),t}function wr(e,t,n=[]){const{view:r,parts:o}=ty(n),i=r.components[e],s=o[e],a={};if(!i||!s)return a;for(const l of s.props){const c=t[l]??i.props[l]?.default;c!==void 0&&(a[l]=c)}return a}const jr=["light","dark"],ll="https://ui.exponential.at/schemas/theme/v1.json",ny=/^[a-z][a-z0-9-]*$/,Io=new Set(["color","shadow"]),ry=new Set(["type.family"]),oy=new Set(["ease"]),iy=["spacing","radius","control","opacity","border","motion","breakpoint","density","blur","scale"],sy=["size","lineHeight","weight","family"],ay={backgroundColor:["color"],color:["color"],borderColor:["color"],borderWidth:["border","control"],borderTopWidth:["border","control"],borderRightWidth:["border","control"],borderBottomWidth:["border","control"],borderLeftWidth:["border","control"],borderRadius:["radius","spacing"],borderStyle:[],padding:["spacing"],paddingHorizontal:["spacing"],paddingVertical:["spacing"],gap:["spacing"],width:["control","spacing","border"],height:["control","spacing","border"],minWidth:["control","spacing"],minHeight:["control","spacing"],fontSize:["type.size"],fontWeight:["type.weight"],lineHeight:["type.lineHeight"],fontFamily:["type.family"],letterSpacing:[],textDecoration:[],textTransform:[],fontStyle:[],boxShadow:["shadow"],opacity:["opacity"],transition:["motion"],transitionEasing:["ease"],transform:[],backdropBlur:["blur"],animation:[]},ly=new Set(["backgroundColor","color","borderColor"]),cy=/^[A-Za-z0-9 ,'"-]+$/,Ou="letters, digits, spaces, hyphens, commas and balanced quotes only";function Mu(e){if(typeof e!="string"||e.length===0||!cy.test(e))return!1;const t=n=>e.split(n).length-1;return t('"')%2===0&&t("'")%2===0}const uy=new Set(["fontFamily","boxShadow","transition","transitionEasing","backdropBlur"]),dy=new Set(["borderStyle","textDecoration","textTransform","fontStyle","animation"]);class fy extends Error{issues;constructor(t,n){super(`Theme "${t}" is invalid:
14
+ ${n.map(r=>` ${r.path}: ${r.message}`).join(`
15
+ `)}`),this.name="ThemeError",this.issues=n}}const je=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),et=e=>e.join("|");function cl(e,t,n,r,o){if(!je(e))return void r.push({path:t,message:"expected an object of token values"});for(const[i,s]of Object.entries(e))n.includes(i)?typeof s!="number"||!Number.isFinite(s)?r.push({path:`${t}.${i}`,message:"expected a number"}):o&&(s<o[0]||s>o[1])&&r.push({path:`${t}.${i}`,message:`expected ${o[0]}–${o[1]}`}):r.push({path:`${t}.${i}`,message:`unknown token; known: ${et(n)}`})}function py(e,t,n,r){if(!je(e))return void r.push({path:t,message:"expected an object of easing curves"});for(const[o,i]of Object.entries(e))n.includes(o)?(!Array.isArray(i)||i.length!==4||!i.every(s=>typeof s=="number"&&Number.isFinite(s)))&&r.push({path:`${t}.${o}`,message:"expected [x1, y1, x2, y2]"}):r.push({path:`${t}.${o}`,message:`unknown token; known: ${et(n)}`})}function hy(e,t,n){if(!Array.isArray(e))return void n.push({path:t,message:"expected a list of shadow layers"});e.forEach((r,o)=>{const i=`${t}[${o}]`;if(!je(r))return void n.push({path:i,message:"expected {x, y, blur, spread, color}"});for(const s of["x","y","blur","spread"])typeof r[s]!="number"&&n.push({path:`${i}.${s}`,message:"expected a number"});Ks(r.color)||n.push({path:`${i}.color`,message:"expected #rrggbb or #rrggbbaa"})})}function gy(e,t,n){if(!je(e))return void n.push({path:t,message:"expected {color, shadow}"});for(const[r,o]of Object.entries(e)){if(!Io.has(r)){n.push({path:`${t}.${r}`,message:"unknown mode group; known: color|shadow"});continue}if(!je(o)){n.push({path:`${t}.${r}`,message:"expected an object of token values"});continue}const i=Ue[r];for(const[s,a]of Object.entries(o)){const l=`${t}.${r}.${s}`;i.includes(s)?r==="color"&&!Ks(a)?n.push({path:l,message:"expected #rrggbb or #rrggbbaa (lowercase); the builder converts oklch/hsl on import"}):r==="shadow"&&hy(a,l,n):n.push({path:l,message:`unknown token; known: ${et(i)}`})}}}function ul(e,t,n){if(!je(e))return void n.push({path:t,message:"expected {light, dark}"});for(const[r,o]of Object.entries(e))jr.includes(r)?gy(o,`${t}.${r}`,n):n.push({path:`${t}.${r}`,message:"unknown mode; known: light|dark"})}function my(e,t,n){if(!je(e))return void n.push({path:t,message:"expected the token groups"});for(const[r,o]of Object.entries(e)){const i=`${t}.${r}`;if(r==="type"){if(!je(o)){n.push({path:i,message:"expected {size, lineHeight, weight, family}"});continue}for(const[s,a]of Object.entries(o)){const l=`type.${s}`;if(!Ue[l])n.push({path:`${i}.${s}`,message:"unknown type group; known: size|lineHeight|weight|family"});else if(ry.has(l))if(!je(a))n.push({path:`${i}.${s}`,message:"expected an object of family names"});else for(const[c,u]of Object.entries(a))Ue[l].includes(c)?typeof u!="string"||u.length===0?n.push({path:`${i}.${s}.${c}`,message:"expected a font family name"}):Mu(u)||n.push({path:`${i}.${s}.${c}`,message:`expected a font family name: ${Ou}`}):n.push({path:`${i}.${s}.${c}`,message:`unknown token; known: ${et(Ue[l])}`});else cl(a,`${i}.${s}`,Ue[l],n)}continue}if(Io.has(r)){n.push({path:i,message:`${r} values live under modes.light / modes.dark`});continue}if(!Ue[r]){n.push({path:i,message:`unknown token group; known: ${et(Object.keys(Ue).filter(s=>!s.startsWith("type.")&&!Io.has(s)))}|type`});continue}oy.has(r)?py(o,i,Ue[r],n):cl(o,i,Ue[r],n,r==="opacity"?[0,1]:r==="density"?[.5,2]:r==="scale"?[.5,1.5]:void 0)}}function yy(e,t,n){if(!je(e))return void n.push({path:t,message:"expected an object keyed by family name"});for(const[r,o]of Object.entries(e)){const i=`${t}.${r}`;if(!je(o)){n.push({path:i,message:"expected {fallback?, weights?, source?}"});continue}for(const s of Object.keys(o))["fallback","weights","source"].includes(s)||n.push({path:`${i}.${s}`,message:"unknown font key; known: fallback|weights|source"});o.fallback!==void 0&&typeof o.fallback!="string"?n.push({path:`${i}.fallback`,message:"expected a string"}):o.fallback!==void 0&&!Mu(o.fallback)&&n.push({path:`${i}.fallback`,message:`expected a font fallback list: ${Ou}`}),o.weights!==void 0&&(!Array.isArray(o.weights)||!o.weights.every(s=>typeof s=="number"))&&n.push({path:`${i}.weights`,message:"expected a list of numbers"}),o.source!==void 0&&o.source!=="system"&&o.source!=="host"&&n.push({path:`${i}.source`,message:"expected system|host"})}}function by(e,t,n,r){if(e==="native"){typeof t!="boolean"&&r.push({path:n,message:"expected true|false"});return}if(dy.has(e)){const a=ja(e)??[];a.includes(t)||r.push({path:n,message:`expected ${et(a.map(String))}`});return}if(e==="transform"){(typeof t!="string"||!Kc.test(t))&&r.push({path:n,message:"expected translate(Xpx, Ypx), scale(N) and/or rotate(Ndeg)"});return}const o=ay[e],i=Kt(t);if(i){o.includes(i.group)?Ue[i.group]?.includes(i.name)||r.push({path:n,message:`unknown token ${t}; known: ${et(Ue[i.group]??[])}`}):r.push({path:n,message:o.length?`expected a $${o.join("|$")} token, got $${i.group}`:"expected a number, not a token"});return}if(ly.has(e)){Ks(t)||r.push({path:n,message:"expected #rrggbb, #rrggbbaa or $color.<name>"});return}if(uy.has(e)){r.push({path:n,message:`expected a $${o[0]}.<name> token`});return}const s=ja("fontWeight")??[];typeof t!="number"||!Number.isFinite(t)?r.push({path:n,message:o.length?`expected a number or a $${o.join("|$")} token`:"expected a number"}):e==="opacity"&&(t<0||t>1)?r.push({path:n,message:"expected 0–1"}):e==="fontWeight"&&!s.includes(t)&&r.push({path:n,message:`expected ${et(s.map(String))} or $type.weight.<name>`})}function vy(e,t,n,r){if(!je(e))return void r.push({path:t,message:"expected {when?, style}"});for(const o of Object.keys(e))o!=="when"&&o!=="style"&&r.push({path:`${t}.${o}`,message:"unknown rule key; known: when|style"});if(e.when!==void 0)if(!je(e.when))r.push({path:`${t}.when`,message:"expected an object of recipe props"});else for(const[o,i]of Object.entries(e.when)){const s=`${t}.when.${o}`;if(o==="state"){const a=Array.isArray(i)?i:[i];for(const l of a)il.includes(l)||r.push({path:s,message:`unknown state; known: ${et(il)}`})}else if(!n.props.includes(o))r.push({path:s,message:`not a recipe prop of this part; known: ${et(["state",...n.props])}`});else{const a=l=>["string","number","boolean"].includes(typeof l);a(i)||Array.isArray(i)&&i.every(a)||r.push({path:s,message:"expected a value or a list of values"})}}if(!je(e.style))return void r.push({path:`${t}.style`,message:"expected a style object"});for(const[o,i]of Object.entries(e.style)){const s=`${t}.style.${o}`;sl.includes(o)?by(o,i,s,r):r.push({path:s,message:`not a recipe key; known: ${et(sl)}`})}}function xy(e,t,n,r){if(!je(e))return void r.push({path:t,message:"expected an object keyed by component"});for(const[o,i]of Object.entries(e)){const s=`${t}.${o}`,a=n[o];if(!a){r.push({path:s,message:"unknown component"});continue}if(!je(i)){r.push({path:s,message:`expected an object keyed by part; known: ${et(a.parts)}`});continue}for(const[l,c]of Object.entries(i)){const u=`${s}.${l}`;if(!a.parts.includes(l)){r.push({path:u,message:`unknown part; known: ${et(a.parts)}`});continue}if(!Array.isArray(c)){r.push({path:u,message:"expected a list of rules [{when?, style}]"});continue}c.forEach((d,f)=>vy(d,`${u}[${f}]`,a,r))}}}const $y=["$schema","$comment","id","name","extends","modes","contrast","tokens","fonts","recipes"];function dl(e,t={}){const n=[];if(!je(e))return[{path:"theme",message:"expected a theme object {id, name, modes, tokens, recipes}"}];e.$schema!==ll&&n.push({path:"$schema",message:`expected "${ll}"`}),(typeof e.id!="string"||!ny.test(e.id))&&n.push({path:"id",message:"expected a kebab-case id"}),(typeof e.name!="string"||e.name.length===0)&&n.push({path:"name",message:"expected a name"});for(const r of Object.keys(e))$y.includes(r)||n.push({path:r,message:"unknown theme key; known: id|name|extends|modes|contrast|tokens|fonts|recipes"});if(e.extends!==void 0){const r=(t.themes??[]).map(o=>o.id);typeof e.extends!="string"?n.push({path:"extends",message:"expected a theme id"}):r.includes(e.extends)?e.extends===e.id&&n.push({path:"extends",message:"a theme cannot extend itself"}):n.push({path:"extends",message:`unknown theme "${e.extends}"; known: ${et(r)}`})}return e.modes!==void 0&&ul(e.modes,"modes",n),e.contrast!==void 0&&ul(e.contrast,"contrast",n),e.tokens!==void 0&&my(e.tokens,"tokens",n),e.fonts!==void 0&&yy(e.fonts,"fonts",n),e.recipes!==void 0&&xy(e.recipes,"recipes",us(t.extensions),n),n}const to=()=>({color:{},shadow:{}});function wy(e){return{id:e.id,name:e.name,chain:[],modes:{light:to(),dark:to()},contrast:{light:to(),dark:to()},tokens:{spacing:{},radius:{},type:{size:{},lineHeight:{},weight:{},family:{}},control:{},opacity:{},border:{},motion:{},breakpoint:{},ease:{},density:{},blur:{},scale:{}},fonts:{},recipes:{}}}function Fu(e){return Array.isArray(e.chain)}function yn(e){return JSON.parse(JSON.stringify(e))}function Eo(e,t){t&&(Object.assign(e.color,t.color??{}),Object.assign(e.shadow,yn(t.shadow??{})))}function ky(e,t){for(const r of jr)Eo(e.modes[r],t.modes?.[r]),Eo(e.contrast[r],t.contrast?.[r]);const n=t.tokens;if(n){for(const r of iy)Object.assign(e.tokens[r],n[r]??{});Object.assign(e.tokens.ease,yn(n.ease??{}));for(const r of sy)Object.assign(e.tokens.type[r],n.type?.[r]??{})}Object.assign(e.fonts,yn(t.fonts??{}));for(const[r,o]of Object.entries(t.recipes??{})){const i=e.recipes[r]??={};for(const[s,a]of Object.entries(o))(i[s]??=[]).push(...yn(a))}}function Sy(e,t){for(const n of jr)Eo(e.modes[n],t.modes[n]),Eo(e.contrast[n],t.contrast?.[n]);e.tokens=yn(t.tokens),e.fonts=yn(t.fonts),e.recipes=yn(t.recipes)}function Cy(e){const t=[];for(const[n,r]of Object.entries(Ue))for(const o of r){if(Io.has(n)){for(const s of jr)e.modes[s][n][o]===void 0&&t.push({path:`modes.${s}.${n}.${o}`,message:`missing value for $${n}.${o}`});continue}(n.startsWith("type.")?e.tokens.type[n.slice(5)]:e.tokens[n])?.[o]===void 0&&t.push({path:`tokens.${n}.${o}`,message:`missing value for $${n}.${o}`})}for(const n of Object.values(e.tokens.type.family))e.fonts[n]||t.push({path:`fonts.${n}`,message:"family named by tokens.type.family has no fonts entry"});return t}function Ay(e,t){const n=t.themes??[],r=[e],o=new Set([e.id]);let i=e;for(;!Fu(i)&&i.extends;){const s=i.extends,a=n.find(l=>l.id===s);if(!a)return{path:"extends",message:`unknown theme "${s}"`};if(o.has(a.id))return{path:"extends",message:`cycle: ${[...o,a.id].join(" → ")}`};o.add(a.id),r.unshift(a),i=a}return r}function Gs(e,t={}){const n=dl(e,t);if(n.length>0)return{theme:null,issues:n};const r=e,o=Ay(r,t);if(!Array.isArray(o))return{theme:null,issues:[o]};const i=wy(r);for(const a of o){if(Fu(a)){Sy(i,a),i.chain.push(...a.chain);continue}if(a!==r){const l=dl(a,t);if(l.length>0)return{theme:null,issues:l.map(c=>({path:`extends(${a.id}).${c.path}`,message:c.message}))}}ky(i,a),i.chain.push(a.id)}const s=Cy(i);return s.length>0?{theme:null,issues:s}:{theme:i,issues:[]}}function Ty(e,t={}){const{theme:n,issues:r}=Gs(e,t);if(!n)throw new fy(je(e)&&typeof e.id=="string"?e.id:"?",r);return n}function Iy(e,t){return t?"dark":"light"}function fl(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=Math.round(o*t);return n}function Ey(e,t){if(t==="default")return e;const n=e.tokens.density[t];return typeof n!="number"?e:{...e,tokens:{...e.tokens,control:fl(e.tokens.control,n),spacing:fl(e.tokens.spacing,n)}}}function _y(e){const t={};for(const n of jr)t[n]={color:{...e.modes[n].color,...e.contrast[n].color},shadow:{...e.modes[n].shadow,...e.contrast[n].shadow}};return{...e,modes:t}}function Dy(e,t,n){const r=Kt(t);if(!r)return;const{group:o,name:i}=r;return o==="color"?e.modes[n].color[i]:o==="shadow"?e.modes[n].shadow[i]:o.startsWith("type.")?e.tokens.type[o.slice(5)]?.[i]:e.tokens[o]?.[i]}const Py=/\$breakpoint\.([a-zA-Z0-9]+)/;function Oy(e,t){return Ms.test(t)?t.replace(Py,(n,r)=>{const o=e.tokens.breakpoint[r];return typeof o=="number"?`${o}px`:n}):t}function zu(e,t,n){const r=i=>{if(Array.isArray(i))return i.map(r);if(je(i))return zu(e,i,n);if(typeof i=="string"&&i.startsWith("$")){const s=Dy(e,i,n);return s===void 0?i:s}return i},o={};for(const[i,s]of Object.entries(t))o[Oy(e,i)]=r(s);return o}function My(e,t,n){if(!e.when)return!0;for(const[r,o]of Object.entries(e.when)){if(r==="state"){if(!(Array.isArray(o)?o:[o]).every(a=>n.includes(a)))return!1;continue}const i=t[r];if(Array.isArray(o)?!o.includes(i):i!==o)return!1}return!0}function Fy(e){if(!e.when)return 0;let t=0;for(const[n,r]of Object.entries(e.when))t+=n==="state"&&Array.isArray(r)?r.length:1;return t}function zy(e,t){const n=e.recipes[t.component]?.[t.part]??[],r=t.props??{},o=t.states??[],i=n.map((a,l)=>({rule:a,index:l,specificity:Fy(a)})).sort((a,l)=>a.specificity-l.specificity||a.index-l.index),s={};for(const{rule:a}of i)My(a,r,o)&&Object.assign(s,a.style);return s}function ds(e,t,n){return zu(e,zy(e,t),n)}function Ru(e){return e.length===0?"none":e.map(t=>`${t.x}px ${t.y}px ${t.blur}px ${t.spread}px ${t.color}`).join(", ")}function Nu(e){return`cubic-bezier(${e.join(", ")})`}const Ry=`AUTO-GENERATED by packages/exponential-ui/scripts/generate.ts — do not edit.
16
+ Source of truth: packages/exponential-ui/themes/*.theme.json, themes/exponential.recipes.json, catalog/recipes.json, catalog/tokens.json (+ packages/design-tokens/tokens.json and packages/ui/src/styles.css for the exponential theme). Composed by scripts/generate-themes.ts composeExponential(): edit themes/exponential.recipes.json, packages/design-tokens/tokens.json or packages/ui/src/styles.css and regenerate.`,Ny="https://ui.exponential.at/schemas/theme/v1.json",Ly="exponential",jy="Exponential",By={light:{color:{background:"#ffffff",foreground:"#0a0a0a",card:"#ffffff",cardForeground:"#0a0a0a",popover:"#ffffff",popoverForeground:"#0a0a0a",primary:"#171717",primaryForeground:"#fafafa",secondary:"#f5f5f5",secondaryForeground:"#171717",muted:"#f5f5f5",mutedForeground:"#737373",accent:"#f5f5f5",accentForeground:"#171717",destructive:"#e7000b",border:"#e5e5e5",input:"#e5e5e5",ring:"#a1a1a1",chart1:"#f54900",chart2:"#009689",chart3:"#104e64",chart4:"#ffb900",chart5:"#fe9a00",success:"#22c55e",warning:"#facc15",info:"#3b82f6",warningForeground:"#1c1917",infoForeground:"#ffffff",successForeground:"#ffffff",destructiveForeground:"#ffffff"},shadow:{none:[],sm:[{x:0,y:1,blur:2,spread:0,color:"#00000014"}],md:[{x:0,y:4,blur:12,spread:-2,color:"#00000014"}],lg:[{x:0,y:12,blur:32,spread:-8,color:"#00000014"}],xl:[{x:0,y:20,blur:48,spread:-12,color:"#00000014"}]}},dark:{color:{background:"#0a0a0a",foreground:"#fafafa",card:"#ffffff0f",cardForeground:"#fafafa",popover:"#171717",popoverForeground:"#fafafa",primary:"#e5e5e5",primaryForeground:"#171717",secondary:"#ffffff0f",secondaryForeground:"#fafafa",muted:"#ffffff0a",mutedForeground:"#a1a1a1",accent:"#ffffff1c",accentForeground:"#fafafa",destructive:"#ff6467",border:"#ffffff1a",input:"#ffffff26",ring:"#737373",chart1:"#1447e6",chart2:"#00bc7d",chart3:"#fe9a00",chart4:"#ad46ff",chart5:"#ff2056",success:"#22c55e",warning:"#facc15",info:"#3b82f6",warningForeground:"#1c1917",infoForeground:"#ffffff",successForeground:"#052e16",destructiveForeground:"#0a0a0a"},shadow:{none:[],sm:[{x:0,y:1,blur:2,spread:0,color:"#00000066"}],md:[{x:0,y:4,blur:12,spread:-2,color:"#00000066"}],lg:[{x:0,y:12,blur:32,spread:-8,color:"#00000066"}],xl:[{x:0,y:20,blur:48,spread:-12,color:"#00000066"}]}}},Hy={spacing:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,xl2:32,xl3:48},radius:{none:0,sm:8,md:10,lg:12,xl:16,xl2:20,xl3:24,full:9999},type:{size:{xs:12,sm:14,base:16,lg:18,xl:20,xl2:24,xl3:30},lineHeight:{xs:16,sm:20,base:24,lg:28,xl:28,xl2:32,xl3:36},weight:{regular:400,medium:500,semibold:600,bold:700},family:{sans:"Inter",mono:"ui-monospace"}},control:{buttonSm:24,buttonMd:32,buttonLg:36,buttonIcon:32,input:36,textarea:64,row:32,rowCompact:28,pill:24,badge:20,chip:24,toggle:32,switch:20,checkbox:16,slider:16,progress:8,meter:8,avatarSm:24,avatarMd:32,avatarLg:40,iconSm:16,iconMd:20,iconLg:24,hairline:1,appBar:48,tabBar:56,toast:56},opacity:{primary:1,secondary:.7,tertiary:.5,quaternary:.3,disabled:.5},border:{none:0,hairline:1,thick:2},motion:{fast:120,standard:180,slow:280},ease:{standard:[.2,0,0,1],decelerate:[0,0,.2,1],accelerate:[.3,0,1,1]},scale:{press:.97,popoverFrom:.96}},Wy={Inter:{fallback:"ui-sans-serif, system-ui, sans-serif",weights:[400,500,600,700],source:"host"},"ui-monospace":{fallback:"SFMono-Regular, Menlo, Consolas, monospace",source:"system"}},Uy={Card:{root:[{style:{boxShadow:"$shadow.none"}}]},Group:{body:[{style:{backgroundColor:"$color.card"}}]},Section:{header:[{style:{backgroundColor:"$color.muted"}}]},Button:{root:[{style:{boxShadow:"$shadow.none",fontWeight:"$type.weight.medium"}},{when:{variant:"outline"},style:{backgroundColor:"$color.secondary",borderColor:"$color.border",boxShadow:"$shadow.none"}},{when:{variant:"outline",state:"hover"},style:{backgroundColor:"$color.accent"}},{when:{variant:"secondary"},style:{backgroundColor:"$color.secondary"}}]},Input:{field:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},Textarea:{field:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},Select:{trigger:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},DatePicker:{trigger:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},Composer:{root:[{style:{backgroundColor:"$color.card",borderColor:"$color.border",boxShadow:"$shadow.none"}}]},Tabs:{list:[{style:{backgroundColor:"$color.muted"}}],tab:[{when:{state:"selected"},style:{backgroundColor:"$color.accent",boxShadow:"$shadow.none"}}]},Segmented:{root:[{when:{variant:"bar"},style:{backgroundColor:"$color.card"}}],item:[{when:{variant:"segmented",state:"selected"},style:{backgroundColor:"$color.accent",boxShadow:"$shadow.none"}}]},Chip:{root:[{style:{backgroundColor:"$color.secondary",borderColor:"$color.border"}},{when:{shape:"rect"},style:{backgroundColor:"$color.secondary"}},{when:{selected:!0},style:{backgroundColor:"$color.accent",borderColor:"$color.ring"}}]},Row:{root:[{when:{state:"hover"},style:{backgroundColor:"$color.secondary"}},{when:{selected:!0},style:{backgroundColor:"$color.accent"}}]},Menu:{item:[{when:{state:"hover"},style:{backgroundColor:"$color.secondary"}},{when:{state:"selected"},style:{backgroundColor:"$color.accent"}}]},Alert:{root:[{style:{backgroundColor:"$color.card"}}]},Dialog:{content:[{style:{backgroundColor:"$color.popover",borderRadius:"$radius.xl"}}]},Drawer:{content:[{style:{backgroundColor:"$color.popover",borderRadius:"$radius.xl3"}}]},Checkbox:{box:[{style:{backgroundColor:"$color.card",boxShadow:"$shadow.none"}}]},Radio:{item:[{style:{backgroundColor:"$color.card",boxShadow:"$shadow.none"}}]},ChoiceTiles:{tile:[{style:{backgroundColor:"$color.card"}},{when:{state:"hover"},style:{backgroundColor:"$color.secondary"}},{when:{state:"selected"},style:{backgroundColor:"$color.accent"}}]},Switch:{track:[{style:{backgroundColor:"$color.input"}}],thumb:[{style:{boxShadow:"$shadow.none"}}]},Skeleton:{root:[{style:{backgroundColor:"$color.secondary"}}]},NumberField:{field:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},ChipInput:{field:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}],chip:[{style:{backgroundColor:"$color.accent",color:"$color.foreground"}}]},TimePicker:{trigger:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}],item:[{when:{state:"hover"},style:{backgroundColor:"$color.secondary"}}]},DateRangePicker:{trigger:[{style:{backgroundColor:"$color.card",borderColor:"$color.input",boxShadow:"$shadow.none"}}]},Toast:{root:[{style:{backgroundColor:"$color.popover",borderColor:"$color.border",borderRadius:"$radius.xl"}}]},CodeBlock:{root:[{style:{backgroundColor:"$color.muted"}}]},Table:{row:[{when:{state:"hover"},style:{backgroundColor:"$color.secondary"}},{when:{striped:!0},style:{backgroundColor:"$color.card"}}]},FileUpload:{dropzone:[{style:{backgroundColor:"$color.card",borderColor:"$color.border"}},{when:{state:"dragover"},style:{backgroundColor:"$color.accent",borderColor:"$color.ring"}}]},Sidebar:{sidebar:[{style:{backgroundColor:"$color.card"}}]}},qy={$comment:Ry,$schema:Ny,id:Ly,name:jy,extends:"neutral",modes:By,tokens:Hy,fonts:Wy,recipes:Uy},Ky="https://ui.exponential.at/schemas/theme/v1.json",Vy="neutral",Gy="Neutral",Yy={light:{color:{background:"#ffffff",foreground:"#0a0a0a",card:"#ffffff",cardForeground:"#0a0a0a",popover:"#ffffff",popoverForeground:"#0a0a0a",primary:"#171717",primaryForeground:"#fafafa",secondary:"#f5f5f5",secondaryForeground:"#171717",muted:"#f5f5f5",mutedForeground:"#737373",accent:"#f5f5f5",accentForeground:"#171717",destructive:"#e7000b",destructiveForeground:"#fafafa",success:"#16a34a",successForeground:"#ffffff",warning:"#d97706",warningForeground:"#ffffff",info:"#2563eb",infoForeground:"#ffffff",border:"#e5e5e5",input:"#e5e5e5",ring:"#a1a1a1",chart1:"#f54900",chart2:"#009689",chart3:"#104e64",chart4:"#ffb900",chart5:"#fe9a00",chart6:"#7c3aed",chart7:"#db2777",chart8:"#0891b2"},shadow:{none:[],sm:[{x:0,y:1,blur:2,spread:0,color:"#0000000d"}],md:[{x:0,y:4,blur:6,spread:-1,color:"#0000001a"},{x:0,y:2,blur:4,spread:-2,color:"#0000001a"}],lg:[{x:0,y:10,blur:15,spread:-3,color:"#0000001a"},{x:0,y:4,blur:6,spread:-4,color:"#0000001a"}],xl:[{x:0,y:20,blur:25,spread:-5,color:"#0000001a"},{x:0,y:8,blur:10,spread:-6,color:"#0000001a"}]}},dark:{color:{background:"#0a0a0a",foreground:"#fafafa",card:"#171717",cardForeground:"#fafafa",popover:"#171717",popoverForeground:"#fafafa",primary:"#e5e5e5",primaryForeground:"#171717",secondary:"#262626",secondaryForeground:"#fafafa",muted:"#262626",mutedForeground:"#a1a1a1",accent:"#262626",accentForeground:"#fafafa",destructive:"#ff6467",destructiveForeground:"#fafafa",success:"#22c55e",successForeground:"#052e16",warning:"#f59e0b",warningForeground:"#1c1917",info:"#3b82f6",infoForeground:"#ffffff",border:"#ffffff1a",input:"#ffffff26",ring:"#737373",chart1:"#1447e6",chart2:"#00bc7d",chart3:"#fe9a00",chart4:"#ad46ff",chart5:"#ff2056",chart6:"#a78bfa",chart7:"#f472b6",chart8:"#22d3ee"},shadow:{none:[],sm:[{x:0,y:1,blur:2,spread:0,color:"#00000033"}],md:[{x:0,y:4,blur:6,spread:-1,color:"#00000066"},{x:0,y:2,blur:4,spread:-2,color:"#00000066"}],lg:[{x:0,y:10,blur:15,spread:-3,color:"#00000066"},{x:0,y:4,blur:6,spread:-4,color:"#00000066"}],xl:[{x:0,y:20,blur:25,spread:-5,color:"#00000080"},{x:0,y:8,blur:10,spread:-6,color:"#00000080"}]}}},Xy={light:{color:{foreground:"#000000",mutedForeground:"#404040",border:"#737373",input:"#737373",ring:"#000000",cardForeground:"#000000",popoverForeground:"#000000"}},dark:{color:{foreground:"#ffffff",mutedForeground:"#d4d4d4",border:"#a3a3a3",input:"#a3a3a3",ring:"#ffffff",cardForeground:"#ffffff",popoverForeground:"#ffffff"}}},Zy={spacing:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,xl2:32,xl3:48},radius:{none:0,sm:6,md:8,lg:10,xl:14,xl2:18,xl3:22,full:9999},type:{size:{xs:12,sm:14,base:16,lg:18,xl:20,xl2:24,xl3:30},lineHeight:{xs:16,sm:20,base:24,lg:28,xl:28,xl2:32,xl3:36},weight:{regular:400,medium:500,semibold:600,bold:700},family:{sans:"Geist",mono:"Geist Mono"}},control:{buttonSm:32,buttonMd:36,buttonLg:40,buttonIcon:36,input:36,textarea:64,row:40,rowCompact:32,pill:24,badge:20,chip:28,toggle:36,switch:20,checkbox:16,slider:16,progress:8,meter:8,avatarSm:24,avatarMd:32,avatarLg:40,iconSm:16,iconMd:20,iconLg:24,hairline:1,appBar:56,tabBar:56,toast:64},opacity:{primary:1,secondary:.7,tertiary:.5,quaternary:.3,disabled:.5},border:{none:0,hairline:1,thick:2},motion:{fast:120,standard:180,slow:280},breakpoint:{sm:640,md:768,lg:1024,xl:1280},ease:{standard:[.2,0,0,1],decelerate:[0,0,.2,1],accelerate:[.3,0,1,1]},density:{compact:.875,comfortable:1.125},blur:{sm:4,md:12,lg:16,xl:24},scale:{press:1,popoverFrom:.95}},Jy={Geist:{fallback:"ui-sans-serif, system-ui, sans-serif",weights:[400,500,600,700],source:"host"},"Geist Mono":{fallback:"ui-monospace, SFMono-Regular, Menlo, monospace",weights:[400,500],source:"host"}},Qy=JSON.parse('{"Text":{"root":[{"style":{"fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.regular","color":"$color.foreground"}},{"when":{"variant":"caption"},"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs"}},{"when":{"variant":"muted"},"style":{"color":"$color.mutedForeground"}},{"when":{"variant":"lead"},"style":{"fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg","color":"$color.mutedForeground"}},{"when":{"variant":"code"},"style":{"fontFamily":"$type.family.mono","fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs"}},{"when":{"variant":"label"},"style":{"fontWeight":"$type.weight.medium"}},{"when":{"variant":"title"},"style":{"fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg","fontWeight":"$type.weight.semibold"}},{"when":{"tone":"primary"},"style":{"color":"$color.primary"}},{"when":{"tone":"success"},"style":{"color":"$color.success"}},{"when":{"tone":"warning"},"style":{"color":"$color.warning"}},{"when":{"tone":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tone":"info"},"style":{"color":"$color.info"}},{"when":{"tone":"neutral"},"style":{"color":"$color.mutedForeground"}}]},"Heading":{"root":[{"when":{"level":"h1"},"style":{"fontSize":"$type.size.xl3","lineHeight":"$type.lineHeight.xl3","fontWeight":"$type.weight.bold"}},{"when":{"level":"h2"},"style":{"fontSize":"$type.size.xl2","lineHeight":"$type.lineHeight.xl2","fontWeight":"$type.weight.semibold"}},{"when":{"level":"h3"},"style":{"fontSize":"$type.size.xl","lineHeight":"$type.lineHeight.xl","fontWeight":"$type.weight.semibold"}},{"when":{"level":"h4"},"style":{"fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg","fontWeight":"$type.weight.semibold"}}]},"Markdown":{"root":[{"style":{"fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.foreground","gap":"$spacing.md"}}],"heading":[{"style":{"fontWeight":"$type.weight.semibold","fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg"}}],"link":[{"style":{"color":"$color.primary"}}],"code":[{"style":{"fontFamily":"$type.family.mono","fontSize":"$type.size.xs","backgroundColor":"$color.muted","borderRadius":"$radius.sm","paddingHorizontal":"$spacing.xs"}}],"codeBlock":[{"style":{"fontFamily":"$type.family.mono","fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.sm","backgroundColor":"$color.muted","borderRadius":"$radius.md","padding":"$spacing.md"}}],"quote":[{"style":{"borderWidth":"$border.thick","borderColor":"$color.border","color":"$color.mutedForeground","paddingHorizontal":"$spacing.md"}}],"table":[{"style":{"borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md"}}]},"Icon":{"root":[{"style":{"width":"$control.iconMd","height":"$control.iconMd","color":"$color.foreground"}},{"when":{"size":"sm"},"style":{"width":"$control.iconSm","height":"$control.iconSm"}},{"when":{"size":"lg"},"style":{"width":"$control.iconLg","height":"$control.iconLg"}},{"when":{"tone":"primary"},"style":{"color":"$color.primary"}},{"when":{"tone":"success"},"style":{"color":"$color.success"}},{"when":{"tone":"warning"},"style":{"color":"$color.warning"}},{"when":{"tone":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tone":"info"},"style":{"color":"$color.info"}},{"when":{"tone":"neutral"},"style":{"color":"$color.mutedForeground"}}]},"Avatar":{"root":[{"style":{"width":"$control.avatarMd","height":"$control.avatarMd","borderRadius":"$radius.full"}},{"when":{"size":"sm"},"style":{"width":"$control.avatarSm","height":"$control.avatarSm"}},{"when":{"size":"lg"},"style":{"width":"$control.avatarLg","height":"$control.avatarLg"}}],"fallback":[{"style":{"backgroundColor":"$color.muted","color":"$color.mutedForeground","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","fontFamily":"$type.family.sans"}}]},"Button":{"root":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"style":{"height":"$control.buttonMd","paddingHorizontal":"$spacing.lg","gap":"$spacing.sm","borderRadius":"$radius.md","borderWidth":"$border.none","fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","backgroundColor":"$color.primary","color":"$color.primaryForeground","boxShadow":"$shadow.sm"}},{"when":{"variant":"default","state":"hover"},"style":{"opacity":0.9}},{"when":{"variant":"secondary"},"style":{"backgroundColor":"$color.secondary","color":"$color.secondaryForeground"}},{"when":{"variant":"secondary","state":"hover"},"style":{"opacity":0.8}},{"when":{"variant":"outline"},"style":{"backgroundColor":"$color.background","color":"$color.foreground","borderWidth":"$border.hairline","borderColor":"$color.input"}},{"when":{"variant":"outline","state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"variant":"ghost"},"style":{"backgroundColor":"#00000000","color":"$color.foreground","boxShadow":"$shadow.none"}},{"when":{"variant":"ghost","state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"variant":"destructive"},"style":{"backgroundColor":"$color.destructive","color":"$color.destructiveForeground"}},{"when":{"variant":"destructive","state":"hover"},"style":{"opacity":0.9}},{"when":{"variant":"link"},"style":{"backgroundColor":"#00000000","color":"$color.primary","paddingHorizontal":"$spacing.none","boxShadow":"$shadow.none"}},{"when":{"variant":"link","state":"hover"},"style":{"opacity":0.8}},{"when":{"size":"sm"},"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.md","gap":"$spacing.xs"}},{"when":{"size":"lg"},"style":{"height":"$control.buttonLg","paddingHorizontal":"$spacing.xl"}},{"when":{"size":"icon"},"style":{"height":"$control.buttonIcon","width":"$control.buttonIcon","paddingHorizontal":"$spacing.none"}},{"when":{"state":"pressed"},"style":{"opacity":0.8}},{"when":{"state":"focus"},"style":{"borderWidth":"$border.hairline","borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"icon":[{"style":{"width":"$control.iconSm","height":"$control.iconSm"}}],"spinner":[{"style":{"width":"$control.iconSm","height":"$control.iconSm"}}]},"Link":{"root":[{"style":{"color":"$color.primary","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans"}},{"when":{"state":"hover"},"style":{"opacity":0.8}}]},"Toggle":{"root":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"style":{"height":"$control.toggle","paddingHorizontal":"$spacing.md","gap":"$spacing.sm","borderRadius":"$radius.md","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","fontFamily":"$type.family.sans","backgroundColor":"#00000000","color":"$color.foreground"}},{"when":{"variant":"outline"},"style":{"borderWidth":"$border.hairline","borderColor":"$color.input","boxShadow":"$shadow.sm"}},{"when":{"size":"sm"},"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm"}},{"when":{"size":"lg"},"style":{"height":"$control.buttonLg","paddingHorizontal":"$spacing.lg"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.muted","color":"$color.mutedForeground"}},{"when":{"pressed":true},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"checked"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}]},"Segmented":{"root":[{"when":{"variant":["toggles","outline","segmented"]},"style":{"gap":"$spacing.xxs"}},{"when":{"variant":"segmented"},"style":{"backgroundColor":"$color.muted","borderRadius":"$radius.md","padding":"$spacing.xxs"}},{"when":{"variant":"bar"},"style":{"backgroundColor":"$color.background","borderTopWidth":"$border.hairline","borderColor":"$color.border"}}],"item":[{"when":{"variant":["toggles","outline","segmented"]},"style":{"height":"$control.toggle","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","fontFamily":"$type.family.sans","backgroundColor":"#00000000","color":"$color.mutedForeground"}},{"when":{"variant":"outline"},"style":{"borderWidth":"$border.hairline","borderColor":"$color.input","color":"$color.foreground"}},{"when":{"variant":"segmented"},"style":{"height":"$control.buttonSm","borderRadius":"$radius.sm"}},{"when":{"variant":["toggles","outline","segmented"],"size":"sm"},"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm"}},{"when":{"variant":["toggles","outline","segmented"],"size":"lg"},"style":{"height":"$control.buttonLg","paddingHorizontal":"$spacing.lg"}},{"when":{"variant":["toggles","outline","segmented"],"state":"hover"},"style":{"backgroundColor":"$color.muted","color":"$color.foreground"}},{"when":{"variant":["toggles","outline"],"state":"selected"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"variant":"segmented","state":"selected"},"style":{"backgroundColor":"$color.background","color":"$color.foreground","boxShadow":"$shadow.sm"}},{"when":{"variant":"bar"},"style":{"color":"$color.mutedForeground","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"variant":"bar","state":"pressed"},"style":{"opacity":0.7}}],"icon":[{"when":{"variant":"bar"},"style":{"color":"$color.mutedForeground"}},{"when":{"variant":"bar","state":"selected"},"style":{"color":"$color.primary"}}],"label":[{"when":{"variant":"bar"},"style":{"color":"$color.mutedForeground"}},{"when":{"variant":"bar","state":"selected"},"style":{"color":"$color.foreground","fontWeight":"$type.weight.medium"}}]},"Tabs":{"list":[{"style":{"backgroundColor":"$color.muted","borderRadius":"$radius.md","padding":"$spacing.xxs","gap":"$spacing.xxs"}}],"tab":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.md","borderRadius":"$radius.sm","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","fontFamily":"$type.family.sans","color":"$color.mutedForeground","backgroundColor":"#00000000"}},{"when":{"state":"hover"},"style":{"color":"$color.foreground"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.background","color":"$color.foreground","boxShadow":"$shadow.sm"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"indicator":[{"style":{"height":"$border.none","backgroundColor":"#00000000"}}],"content":[{"style":{"paddingVertical":"$spacing.md"}}],"close":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"closable":"hover"},"style":{"opacity":0}},{"when":{"closable":"hover","state":"hover"},"style":{"opacity":1}},{"when":{"closable":"hover","state":"focus"},"style":{"opacity":1}}],"new":[{"style":{"width":"$control.buttonSm","height":"$control.buttonSm","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}]},"Accordion":{"item":[{"style":{"borderWidth":"$border.hairline","borderColor":"$color.border"}}],"trigger":[{"style":{"paddingVertical":"$spacing.lg","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","fontFamily":"$type.family.sans","color":"$color.foreground","gap":"$spacing.sm"}},{"when":{"state":"hover"},"style":{"opacity":0.8}}],"content":[{"style":{"paddingVertical":"$spacing.md","fontSize":"$type.size.sm","color":"$color.foreground"}}],"count":[{"style":{"color":"$color.mutedForeground","fontWeight":"$type.weight.regular"}}]},"Dialog":{"overlay":[{"style":{"backgroundColor":"#00000080"}}],"content":[{"style":{"backgroundColor":"$color.background","color":"$color.foreground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.lg","boxShadow":"$shadow.lg","padding":"$spacing.xl","gap":"$spacing.lg"}}],"title":[{"style":{"fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg","fontWeight":"$type.weight.semibold","fontFamily":"$type.family.sans"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"footer":[{"style":{"gap":"$spacing.sm"}}],"close":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}]},"Drawer":{"overlay":[{"style":{"backgroundColor":"#00000080"}}],"content":[{"style":{"backgroundColor":"$color.background","color":"$color.foreground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.lg","boxShadow":"$shadow.lg","padding":"$spacing.xl","gap":"$spacing.lg"}}],"handle":[{"style":{"width":100,"height":8,"borderRadius":"$radius.full","backgroundColor":"$color.muted"}}],"title":[{"style":{"fontSize":"$type.size.lg","lineHeight":"$type.lineHeight.lg","fontWeight":"$type.weight.semibold","fontFamily":"$type.family.sans"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"footer":[{"style":{"gap":"$spacing.sm"}}]},"Popover":{"content":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.lg"}}],"arrow":[{"style":{"backgroundColor":"$color.popover","borderColor":"$color.border"}}]},"Tooltip":{"content":[{"style":{"backgroundColor":"$color.primary","color":"$color.primaryForeground","borderRadius":"$radius.md","paddingHorizontal":"$spacing.md","paddingVertical":"$spacing.xs","fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","fontFamily":"$type.family.sans"}}],"arrow":[{"style":{"backgroundColor":"$color.primary"}}]},"Menu":{"trigger":[{"style":{"height":"$control.buttonMd","paddingHorizontal":"$spacing.md","gap":"$spacing.xs","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"open"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}}],"content":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.xs"}}],"item":[{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.sm","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.popoverForeground","gap":"$spacing.sm"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"separator":[{"style":{"height":"$control.hairline","backgroundColor":"$color.border"}}],"label":[{"style":{"paddingHorizontal":"$spacing.sm","fontSize":"$type.size.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"shortcut":[{"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","color":"$color.mutedForeground","letterSpacing":1}}],"check":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.foreground"}}],"submenuIndicator":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.mutedForeground"}}],"head":[{"style":{"height":36,"gap":"$spacing.sm","paddingHorizontal":"$spacing.sm","borderBottomWidth":"$border.hairline","borderColor":"$color.border"}}],"search":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","color":"$color.foreground"}}],"count":[{"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","color":"$color.mutedForeground"}}],"list":[{"style":{"paddingVertical":"$spacing.xs"}}],"empty":[{"style":{"padding":"$spacing.md","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"fade":[{"style":{"height":24,"backgroundColor":"$color.popover"}}]},"Ring":{"root":[{"style":{"width":"$control.avatarMd","height":"$control.avatarMd"}},{"when":{"size":"sm"},"style":{"width":"$control.avatarSm","height":"$control.avatarSm"}},{"when":{"size":"lg"},"style":{"width":"$control.avatarLg","height":"$control.avatarLg"}}],"track":[{"style":{"color":"$color.muted","borderWidth":"$border.thick"}}],"fill":[{"style":{"color":"$color.primary","borderWidth":"$border.thick"}},{"when":{"tone":"primary"},"style":{"color":"$color.primary"}},{"when":{"tone":"success"},"style":{"color":"$color.success"}},{"when":{"tone":"warning"},"style":{"color":"$color.warning"}},{"when":{"tone":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tone":"info"},"style":{"color":"$color.info"}},{"when":{"tone":"neutral"},"style":{"color":"$color.mutedForeground"}}],"label":[{"style":{"fontSize":"$type.size.xs","fontWeight":"$type.weight.medium","color":"$color.foreground"}}]},"Spinner":{"root":[{"style":{"width":"$control.iconMd","height":"$control.iconMd","color":"$color.mutedForeground"}},{"when":{"size":"sm"},"style":{"width":"$control.iconSm","height":"$control.iconSm"}},{"when":{"size":"lg"},"style":{"width":"$control.iconLg","height":"$control.iconLg"}},{"when":{"size":"xs"},"style":{"width":10,"height":10}}]},"Skeleton":{"root":[{"style":{"backgroundColor":"$color.accent","borderRadius":"$radius.md"}},{"when":{"rounded":true},"style":{"borderRadius":"$radius.full"}}],"row":[{"style":{"gap":"$spacing.md","paddingHorizontal":"$spacing.md"}}],"dot":[{"style":{"width":12,"height":12,"borderRadius":"$radius.full","backgroundColor":"$color.accent"}}],"bar":[{"style":{"height":8,"borderRadius":4,"backgroundColor":"$color.accent"}}]},"Input":{"field":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"error":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.destructive"}}]},"Textarea":{"field":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm","minHeight":"$control.textarea","paddingVertical":"$spacing.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"error":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.destructive"}}]},"Checkbox":{"box":[{"style":{"width":"$control.checkbox","height":"$control.checkbox","borderRadius":4,"borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","boxShadow":"$shadow.sm"}},{"when":{"checked":true},"style":{"backgroundColor":"$color.primary","borderColor":"$color.primary"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"disabled":true},"style":{"opacity":"$opacity.disabled"}}],"check":[{"style":{"color":"$color.primaryForeground","width":12,"height":12}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}]},"Radio":{"root":[{"style":{"gap":"$spacing.sm"}}],"item":[{"style":{"width":"$control.checkbox","height":"$control.checkbox","borderRadius":"$radius.full","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","boxShadow":"$shadow.sm"}},{"when":{"state":"checked"},"style":{"borderColor":"$color.primary"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}}],"dot":[{"style":{"width":8,"height":8,"borderRadius":"$radius.full","backgroundColor":"$color.primary"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}]},"ChoiceTiles":{"root":[{"style":{"gap":"$spacing.sm"}}],"tile":[{"style":{"padding":"$spacing.sm","gap":"$spacing.xs","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","backgroundColor":"$color.card","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"borderColor":"$color.input"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"selected"},"style":{"borderWidth":"$border.thick","padding":7,"borderColor":"$color.primary"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"picture":[{"style":{"borderRadius":6,"backgroundColor":"$color.muted"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"description":[{"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","color":"$color.mutedForeground"}}]},"Switch":{"root":[{"style":{"gap":"$spacing.sm"}}],"track":[{"style":{"transition":"$motion.standard","transitionEasing":"$ease.standard"}},{"style":{"width":32,"height":"$control.switch","borderRadius":"$radius.full","backgroundColor":"$color.input","native":false}},{"when":{"checked":true},"style":{"backgroundColor":"$color.primary"}},{"when":{"state":"focus"},"style":{"borderWidth":"$border.thick","borderColor":"$color.ring"}},{"when":{"disabled":true},"style":{"opacity":"$opacity.disabled"}}],"thumb":[{"style":{"transition":"$motion.standard","transitionEasing":"$ease.standard"}},{"style":{"width":16,"height":16,"borderRadius":"$radius.full","backgroundColor":"$color.background","boxShadow":"$shadow.sm"}},{"when":{"checked":true},"style":{"backgroundColor":"$color.primaryForeground"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}]},"Slider":{"track":[{"style":{"height":6,"borderRadius":"$radius.full","backgroundColor":"$color.muted"}}],"range":[{"style":{"backgroundColor":"$color.primary"}}],"thumb":[{"style":{"width":"$control.slider","height":"$control.slider","borderRadius":"$radius.full","backgroundColor":"$color.background","borderWidth":"$border.hairline","borderColor":"$color.primary","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"value":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}]},"Select":{"trigger":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"content":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.xs"}}],"item":[{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.sm","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.popoverForeground","gap":"$spacing.sm"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"check":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.foreground"}}],"search":[{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm","fontSize":"$type.size.sm","color":"$color.foreground","borderBottomWidth":"$border.hairline","borderColor":"$color.border"}}],"empty":[{"style":{"padding":"$spacing.sm","fontSize":"$type.size.sm","color":"$color.mutedForeground"}}]},"SearchList":{"root":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md"}}],"head":[{"style":{"height":40,"gap":"$spacing.sm","paddingHorizontal":"$spacing.md","borderBottomWidth":"$border.hairline","borderColor":"$color.border"}}],"search":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","color":"$color.foreground"}}],"count":[{"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","color":"$color.mutedForeground"}}],"list":[{"style":{"padding":"$spacing.xs"}}],"item":[{"style":{"height":"$control.row","paddingHorizontal":"$spacing.sm","gap":"$spacing.sm","borderRadius":"$radius.sm","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.popoverForeground"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"icon":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.mutedForeground"}}],"identifier":[{"style":{"fontFamily":"$type.family.mono","fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm"}}],"check":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.foreground"}}],"empty":[{"style":{"padding":"$spacing.md","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"fade":[{"style":{"height":24,"backgroundColor":"$color.popover"}}]},"DatePicker":{"trigger":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}}],"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"calendar":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.md"}}],"day":[{"style":{"width":"$control.buttonSm","height":"$control.buttonSm","borderRadius":"$radius.md","fontSize":"$type.size.sm","color":"$color.foreground","backgroundColor":"#00000000"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.primary","color":"$color.primaryForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}]},"Composer":{"root":[{"style":{"backgroundColor":"$color.background","borderWidth":"$border.hairline","borderColor":"$color.input","borderRadius":"$radius.lg","padding":"$spacing.sm","gap":"$spacing.sm","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}}],"field":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","color":"$color.foreground","minHeight":"$control.buttonMd"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"attachment":[{"style":{"height":"$control.chip","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.md","backgroundColor":"$color.muted","color":"$color.foreground","fontSize":"$type.size.xs"}}],"send":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.md","backgroundColor":"$color.primary","color":"$color.primaryForeground"}},{"when":{"busy":true},"style":{"opacity":"$opacity.disabled"}}]},"List":{"divider":[{"style":{"height":"$control.hairline","backgroundColor":"$color.border"}}],"section":[{"style":{"height":"$control.rowCompact","paddingHorizontal":"$spacing.sm","backgroundColor":"$color.background","color":"$color.mutedForeground","fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","fontWeight":"$type.weight.medium"}}]},"Resizable":{"handle":[{"style":{"backgroundColor":"$color.border","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.ring"}},{"when":{"state":"focus"},"style":{"backgroundColor":"$color.ring"}},{"when":{"state":"pressed"},"style":{"backgroundColor":"$color.ring"}}],"grip":[{"style":{"width":6,"height":24,"borderRadius":"$radius.full","backgroundColor":"$color.border","borderWidth":"$border.hairline","borderColor":"$color.background"}},{"when":{"direction":"vertical"},"style":{"width":24,"height":6}}]},"Carousel":{"root":[{"style":{"gap":"$spacing.sm"}}],"controls":[{"style":{"gap":"$spacing.sm"}}],"previous":[{"style":{"width":28,"height":28,"borderRadius":"$radius.full","color":"$color.foreground","backgroundColor":"#00000000","transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"next":[{"style":{"width":28,"height":28,"borderRadius":"$radius.full","color":"$color.foreground","backgroundColor":"#00000000","transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"indicator":[{"style":{"width":8,"height":8,"borderRadius":"$radius.full","backgroundColor":"$color.border"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.primary"}}]},"AudioPlayer":{"controls":[{"style":{"height":"$control.row"}}],"track":[{"style":{"fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}]},"TreeGuides":{"line":[{"style":{"color":"$color.border","width":"$control.hairline"}}]},"Chart":{"axis":[{"style":{"color":"$color.mutedForeground","fontSize":"$type.size.xs","fontFamily":"$type.family.sans"}}],"grid":[{"style":{"color":"$color.border"}}],"legend":[{"style":{"color":"$color.mutedForeground","fontSize":"$type.size.xs","gap":"$spacing.sm"}}],"tooltip":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.sm","fontSize":"$type.size.xs"}}],"title":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.semibold","color":"$color.foreground","fontFamily":"$type.family.sans"}}],"valueLabel":[{"style":{"fontSize":"$type.size.xs","color":"$color.foreground","fontFamily":"$type.family.sans"}}]},"Unknown":{"root":[{"style":{"borderWidth":"$border.hairline","borderColor":"$color.destructive","borderRadius":"$radius.md","padding":"$spacing.sm"}}],"label":[{"style":{"color":"$color.destructive","fontSize":"$type.size.xs","fontFamily":"$type.family.mono"}}]},"Card":{"root":[{"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border","boxShadow":"$shadow.sm"}}],"title":[{"style":{"color":"$color.cardForeground"}}]},"Separator":{"root":[{"style":{"backgroundColor":"$color.border"}}]},"Section":{"header":[{"style":{"backgroundColor":"$color.muted"}},{"when":{"tint":"primary"},"style":{"backgroundColor":"$color.accent"}},{"when":{"tint":"success"},"style":{"backgroundColor":"$color.accent"}},{"when":{"tint":"warning"},"style":{"backgroundColor":"$color.accent"}},{"when":{"tint":"danger"},"style":{"backgroundColor":"$color.accent"}},{"when":{"tint":"info"},"style":{"backgroundColor":"$color.accent"}},{"when":{"collapsible":true,"state":"hover"},"style":{"backgroundColor":"$color.accent"}}],"chevron":[{"style":{"color":"$color.mutedForeground","transition":"$motion.standard","transitionEasing":"$ease.standard"}},{"when":{"open":true},"style":{"transform":"rotate(90deg)"}}],"title":[{"when":{"tint":"primary"},"style":{"color":"$color.primary"}},{"when":{"tint":"success"},"style":{"color":"$color.success"}},{"when":{"tint":"warning"},"style":{"color":"$color.warning"}},{"when":{"tint":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tint":"info"},"style":{"color":"$color.info"}}],"caption":[{"style":{"color":"$color.mutedForeground"}}],"count":[{"style":{"color":"$color.mutedForeground"}}]},"Group":{"body":[{"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border"}}]},"Alert":{"root":[{"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"type":"success"},"style":{"borderColor":"$color.success"}},{"when":{"type":"warning"},"style":{"borderColor":"$color.warning"}},{"when":{"type":"error"},"style":{"borderColor":"$color.destructive"}},{"when":{"type":"info"},"style":{"borderColor":"$color.info"}}],"title":[{"style":{"color":"$color.foreground"}},{"when":{"type":"error"},"style":{"color":"$color.destructive"}}]},"Badge":{"root":[{"style":{"backgroundColor":"$color.primary","borderWidth":"$border.none"}},{"when":{"variant":"secondary"},"style":{"backgroundColor":"$color.secondary"}},{"when":{"variant":"outline"},"style":{"backgroundColor":"#00000000","borderWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"variant":"ghost"},"style":{"backgroundColor":"#00000000"}},{"when":{"variant":"destructive"},"style":{"backgroundColor":"$color.destructive"}},{"when":{"variant":"link"},"style":{"backgroundColor":"#00000000","paddingHorizontal":"$spacing.none"}}],"label":[{"style":{"color":"$color.primaryForeground","fontWeight":"$type.weight.medium"}},{"when":{"variant":"secondary"},"style":{"color":"$color.secondaryForeground"}},{"when":{"variant":"outline"},"style":{"color":"$color.foreground"}},{"when":{"variant":"ghost"},"style":{"color":"$color.foreground"}},{"when":{"variant":"destructive"},"style":{"color":"$color.destructiveForeground"}},{"when":{"variant":"link"},"style":{"color":"$color.primary"}}],"icon":[{"style":{"color":"$color.primaryForeground"}},{"when":{"variant":["secondary","outline","ghost"]},"style":{"color":"$color.foreground"}},{"when":{"variant":"destructive"},"style":{"color":"$color.destructiveForeground"}},{"when":{"variant":"link"},"style":{"color":"$color.primary"}}]},"Chip":{"root":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"style":{"backgroundColor":"$color.background","borderWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"shape":"rect"},"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}},{"when":{"selected":true},"style":{"backgroundColor":"$color.accent","borderColor":"$color.ring"}},{"when":{"tone":"primary"},"style":{"borderColor":"$color.primary"}},{"when":{"tone":"success"},"style":{"borderColor":"$color.success"}},{"when":{"tone":"warning"},"style":{"borderColor":"$color.warning"}},{"when":{"tone":"danger"},"style":{"borderColor":"$color.destructive"}},{"when":{"tone":"info"},"style":{"borderColor":"$color.info"}},{"when":{"tone":"neutral","shape":"pill"},"style":{"borderColor":"$color.mutedForeground"}}],"label":[{"style":{"color":"$color.foreground"}},{"when":{"tone":"primary"},"style":{"color":"$color.primary"}},{"when":{"tone":"success"},"style":{"color":"$color.success"}},{"when":{"tone":"warning"},"style":{"color":"$color.warning"}},{"when":{"tone":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tone":"info"},"style":{"color":"$color.info"}},{"when":{"tone":"neutral","shape":"pill"},"style":{"color":"$color.mutedForeground"}}],"icon":[{"style":{"color":"$color.mutedForeground"}},{"when":{"tone":"primary"},"style":{"color":"$color.primary"}},{"when":{"tone":"success"},"style":{"color":"$color.success"}},{"when":{"tone":"warning"},"style":{"color":"$color.warning"}},{"when":{"tone":"danger"},"style":{"color":"$color.destructive"}},{"when":{"tone":"info"},"style":{"color":"$color.info"}},{"when":{"tone":"neutral"},"style":{"color":"$color.mutedForeground"}}],"detail":[{"style":{"color":"$color.mutedForeground"}}]},"EmptyState":{"disc":[{"style":{"backgroundColor":"$color.muted"}}],"icon":[{"style":{"color":"$color.mutedForeground"}}]},"Progress":{"track":[{"style":{"backgroundColor":"$color.muted"}}],"fill":[{"style":{"backgroundColor":"$color.primary"}},{"when":{"tone":"primary"},"style":{"backgroundColor":"$color.primary"}},{"when":{"tone":"success"},"style":{"backgroundColor":"$color.success"}},{"when":{"tone":"warning"},"style":{"backgroundColor":"$color.warning"}},{"when":{"tone":"danger"},"style":{"backgroundColor":"$color.destructive"}},{"when":{"tone":"info"},"style":{"backgroundColor":"$color.info"}},{"when":{"tone":"neutral"},"style":{"backgroundColor":"$color.mutedForeground"}}]},"Meter":{"track":[{"style":{"backgroundColor":"$color.muted"}}],"segment":[{"style":{"backgroundColor":"$color.primary"}},{"when":{"tone":"primary"},"style":{"backgroundColor":"$color.primary"}},{"when":{"tone":"success"},"style":{"backgroundColor":"$color.success"}},{"when":{"tone":"warning"},"style":{"backgroundColor":"$color.warning"}},{"when":{"tone":"danger"},"style":{"backgroundColor":"$color.destructive"}},{"when":{"tone":"info"},"style":{"backgroundColor":"$color.info"}},{"when":{"tone":"neutral"},"style":{"backgroundColor":"$color.mutedForeground"}}]},"Row":{"root":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"surface":"card"},"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}},{"when":{"selected":true},"style":{"backgroundColor":"$color.accent"}}],"identifier":[{"style":{"color":"$color.mutedForeground"}}],"title":[{"when":{"selected":true},"style":{"fontWeight":"$type.weight.medium","color":"$color.accentForeground"}}],"value":[{"style":{"color":"$color.foreground"}}]},"Table":{"root":[{"style":{"fontFamily":"$type.family.sans","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.foreground"}}],"caption":[{"style":{"fontSize":"$type.size.sm","color":"$color.mutedForeground","paddingVertical":"$spacing.sm"}}],"header":[{"style":{"color":"$color.mutedForeground","borderBottomWidth":"$border.hairline","borderColor":"$color.border"}},{"when":{"stickyHeader":true},"style":{"backgroundColor":"$color.background"}}],"headerCell":[{"style":{"height":"$control.row","paddingHorizontal":"$spacing.sm","fontWeight":"$type.weight.medium","color":"$color.mutedForeground"}},{"when":{"state":"hover"},"style":{"color":"$color.foreground"}}],"sortIcon":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.mutedForeground"}}],"row":[{"style":{"borderBottomWidth":"$border.hairline","borderColor":"$color.border","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"striped":true},"style":{"backgroundColor":"$color.muted"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.muted"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.accent"}}],"cell":[{"style":{"height":"$control.row","paddingHorizontal":"$spacing.sm"}},{"when":{"density":"compact"},"style":{"height":"$control.rowCompact"}}],"checkbox":[{"style":{"width":"$control.checkbox","height":"$control.checkbox"}}],"empty":[{"style":{"padding":"$spacing.xl","color":"$color.mutedForeground"}}]},"Box":{"root":[]},"Toast":{"root":[{"style":{"minHeight":"$control.toast","padding":"$spacing.md","gap":"$spacing.sm","borderRadius":"$radius.lg","borderWidth":"$border.hairline","borderColor":"$color.border","backgroundColor":"$color.popover","color":"$color.popoverForeground","boxShadow":"$shadow.xl","transition":"$motion.standard","transitionEasing":"$ease.decelerate"}},{"when":{"type":"error"},"style":{"borderColor":"$color.destructive"}}],"icon":[{"style":{"width":"$control.iconMd","height":"$control.iconMd","color":"$color.info"}},{"when":{"type":"success"},"style":{"color":"$color.success"}},{"when":{"type":"warning"},"style":{"color":"$color.warning"}},{"when":{"type":"error"},"style":{"color":"$color.destructive"}}],"title":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.semibold","fontFamily":"$type.family.sans"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"action":[{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","fontSize":"$type.size.xs","fontWeight":"$type.weight.medium","color":"$color.foreground","backgroundColor":"#00000000"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}}],"close":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}]},"CodeBlock":{"root":[{"style":{"backgroundColor":"#00000000","color":"$color.foreground","borderRadius":"$radius.lg","borderWidth":"$border.hairline","borderColor":"$color.input","fontFamily":"$type.family.mono","fontSize":"$type.size.sm","lineHeight":22.75,"paddingVertical":"$spacing.md","gap":"$spacing.sm"}},{"when":{"size":"sm"},"style":{"fontSize":"$type.size.xs","lineHeight":19.5,"paddingVertical":10,"gap":6}},{"when":{"variant":"destructive"},"style":{"borderColor":"#ff646766","color":"$color.destructive","backgroundColor":"#00000000"}}],"header":[{"style":{"height":20,"paddingHorizontal":"$spacing.md","gap":"$spacing.sm","color":"$color.mutedForeground"}},{"when":{"size":"sm"},"style":{"height":16,"paddingHorizontal":10}},{"when":{"variant":"destructive"},"style":{"color":"$color.destructive"}}],"title":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground","fontFamily":"$type.family.sans"}},{"when":{"size":"sm"},"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs"}},{"when":{"variant":"destructive"},"style":{"color":"$color.destructive"}}],"copy":[{"style":{"width":24,"height":24,"borderRadius":"$radius.md","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}],"gutter":[{"style":{"paddingHorizontal":"$spacing.sm","color":"$color.mutedForeground"}}],"line":[{"style":{"paddingHorizontal":"$spacing.md"}},{"when":{"size":"sm"},"style":{"paddingHorizontal":10}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.muted"}}],"lineNumber":[{"style":{"color":"$color.mutedForeground","opacity":"$opacity.secondary"}}],"token":[{"style":{"color":"$color.foreground"}},{"when":{"kind":"keyword"},"style":{"color":"$color.chart6","fontWeight":"$type.weight.medium"}},{"when":{"kind":"string"},"style":{"color":"$color.success"}},{"when":{"kind":"number"},"style":{"color":"$color.warning"}},{"when":{"kind":"comment"},"style":{"color":"$color.mutedForeground","fontStyle":"italic"}},{"when":{"kind":"type"},"style":{"color":"$color.info"}},{"when":{"kind":"function"},"style":{"color":"$color.chart7"}},{"when":{"kind":["property","attribute"]},"style":{"color":"$color.chart8"}},{"when":{"kind":"tag"},"style":{"color":"$color.destructive"}},{"when":{"kind":["operator","punctuation"]},"style":{"color":"$color.mutedForeground"}},{"when":{"kind":"success"},"style":{"color":"$color.success"}},{"when":{"kind":"warning"},"style":{"color":"$color.warning"}},{"when":{"kind":"error"},"style":{"color":"$color.destructive"}},{"when":{"variant":"destructive"},"style":{"color":"$color.destructive","fontWeight":"$type.weight.regular","fontStyle":"normal"}}]},"Form":{"root":[{"style":{"gap":"$spacing.lg"}},{"when":{"disabled":true},"style":{"opacity":"$opacity.disabled"}}],"summary":[{"style":{"padding":"$spacing.md","gap":"$spacing.xs","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.destructive","color":"$color.destructive","fontSize":"$type.size.sm"}}]},"NumberField":{"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"field":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"decrement":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"increment":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"unit":[{"style":{"color":"$color.mutedForeground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"error":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.destructive"}}]},"ChipInput":{"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"field":[{"style":{"paddingHorizontal":"$spacing.xs","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm","minHeight":"$control.input","paddingVertical":"$spacing.xxs","gap":"$spacing.xs"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"chip":[{"style":{"height":"$control.badge","paddingHorizontal":"$spacing.sm","gap":"$spacing.xxs","borderRadius":"$radius.full","backgroundColor":"$color.secondary","color":"$color.secondaryForeground"}},{"when":{"state":"focus"},"style":{"borderWidth":"$border.thick","borderColor":"$color.ring"}}],"chipLabel":[{"style":{"fontSize":"$type.size.xs","fontWeight":"$type.weight.medium"}}],"remove":[{"style":{"width":"$control.iconSm","height":"$control.iconSm","color":"$color.mutedForeground"}},{"when":{"state":"hover"},"style":{"color":"$color.foreground"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"error":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.destructive"}}]},"DateRangePicker":{"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"trigger":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}}],"calendar":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.md"}}],"day":[{"style":{"width":"$control.buttonSm","height":"$control.buttonSm","borderRadius":"$radius.md","fontSize":"$type.size.sm","color":"$color.foreground","backgroundColor":"#00000000"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.primary","color":"$color.primaryForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"range":[{"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}]},"TimePicker":{"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"trigger":[{"style":{"height":"$control.input","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.input","backgroundColor":"$color.background","color":"$color.foreground","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontFamily":"$type.family.sans","boxShadow":"$shadow.sm"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}],"placeholder":[{"style":{"color":"$color.mutedForeground"}}],"list":[{"style":{"backgroundColor":"$color.popover","color":"$color.popoverForeground","borderWidth":"$border.hairline","borderColor":"$color.border","borderRadius":"$radius.md","boxShadow":"$shadow.md","padding":"$spacing.xs"}}],"item":[{"style":{"height":"$control.buttonSm","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.sm","fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.popoverForeground","gap":"$spacing.sm"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"selected"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}},{"when":{"state":"disabled"},"style":{"opacity":"$opacity.disabled"}}]},"FileUpload":{"label":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","fontWeight":"$type.weight.medium","color":"$color.foreground"}}],"dropzone":[{"style":{"padding":"$spacing.xl","gap":"$spacing.sm","borderRadius":"$radius.lg","borderWidth":"$border.hairline","borderStyle":"dashed","borderColor":"$color.input","backgroundColor":"#00000000","color":"$color.foreground","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.muted"}},{"when":{"state":"dragover"},"style":{"borderColor":"$color.ring","backgroundColor":"$color.accent"}},{"when":{"state":"focus"},"style":{"borderColor":"$color.ring"}},{"when":{"state":"invalid"},"style":{"borderColor":"$color.destructive"}},{"when":{"disabled":true},"style":{"opacity":"$opacity.disabled"}}],"icon":[{"style":{"width":"$control.iconLg","height":"$control.iconLg","color":"$color.mutedForeground"}}],"hint":[{"style":{"fontSize":"$type.size.xs","lineHeight":"$type.lineHeight.xs","color":"$color.mutedForeground"}}],"file":[{"style":{"minHeight":"$control.row","paddingHorizontal":"$spacing.sm","gap":"$spacing.sm","borderRadius":"$radius.md","borderWidth":"$border.hairline","borderColor":"$color.border"}}],"fileName":[{"style":{"fontSize":"$type.size.sm","color":"$color.foreground"}}],"fileMeta":[{"style":{"fontSize":"$type.size.xs","color":"$color.mutedForeground"}}],"remove":[{"style":{"width":"$control.buttonIcon","height":"$control.buttonIcon","borderRadius":"$radius.sm","color":"$color.mutedForeground","backgroundColor":"#00000000","transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent","color":"$color.accentForeground"}}],"description":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.mutedForeground"}}],"error":[{"style":{"fontSize":"$type.size.sm","lineHeight":"$type.lineHeight.sm","color":"$color.destructive"}}]},"Image":{"root":[{"style":{"borderRadius":"$radius.none"}}],"fallback":[{"style":{"backgroundColor":"$color.muted","color":"$color.mutedForeground"}}]},"Kbd":{"root":[{"style":{"backgroundColor":"$color.muted","borderWidth":"$border.hairline","borderBottomWidth":"$border.thick","borderColor":"$color.border"}}],"label":[{"style":{"color":"$color.mutedForeground","fontFamily":"$type.family.mono","fontSize":"$type.size.xs"}}]},"Label":{"text":[{"style":{"color":"$color.foreground"}}],"mark":[{"style":{"color":"$color.destructive"}}]},"Breadcrumb":{"separator":[{"style":{"color":"$color.mutedForeground"}}],"link":[{"style":{"color":"$color.mutedForeground","paddingHorizontal":"$spacing.none","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"color":"$color.foreground","textDecoration":"underline"}}],"current":[{"style":{"color":"$color.foreground"}}]},"AppBar":{"root":[{"style":{"backgroundColor":"$color.background","borderBottomWidth":"$border.hairline","borderColor":"$color.border"}}],"title":[{"style":{"color":"$color.foreground"}}]},"Sidebar":{"sidebar":[{"style":{"backgroundColor":"$color.muted","borderColor":"$color.border"}},{"when":{"side":"left"},"style":{"borderRightWidth":"$border.hairline"}},{"when":{"side":"right"},"style":{"borderLeftWidth":"$border.hairline"}}]},"Collapsible":{"trigger":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}}],"chevron":[{"style":{"color":"$color.mutedForeground","transition":"$motion.standard","transitionEasing":"$ease.standard"}},{"when":{"open":true},"style":{"transform":"rotate(90deg)"}}],"count":[{"style":{"color":"$color.mutedForeground"}}]},"Pagination":{"label":[{"style":{"color":"$color.mutedForeground"}}]},"Stepper":{"marker":[{"style":{"backgroundColor":"$color.background","color":"$color.mutedForeground","borderWidth":"$border.hairline","borderColor":"$color.border","transition":"$motion.standard"}},{"when":{"status":"current"},"style":{"backgroundColor":"$color.primary","color":"$color.primaryForeground","borderColor":"$color.primary"}},{"when":{"status":"done"},"style":{"backgroundColor":"$color.primary","color":"$color.primaryForeground","borderColor":"$color.primary"}}],"check":[{"style":{"color":"$color.primaryForeground"}}],"number":[{"style":{"fontWeight":"$type.weight.medium","color":"$color.mutedForeground"}},{"when":{"status":"current"},"style":{"color":"$color.primaryForeground"}}],"label":[{"style":{"color":"$color.foreground"}},{"when":{"status":"upcoming"},"style":{"color":"$color.mutedForeground"}}],"description":[{"style":{"color":"$color.mutedForeground"}}]},"Rating":{"star":[{"style":{"transition":"$motion.fast"}},{"when":{"state":"hover"},"style":{"transform":"scale(1.15)"}}],"icon":[{"style":{"color":"$color.border"}},{"when":{"filled":true},"style":{"color":"$color.warning"}}]},"AlertDialog":{"footer":[{"style":{"gap":"$spacing.sm"}}]},"ScrollArea":{"root":[]},"TraceItem":{"line":[{"style":{"transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"status":"pending"},"style":{"opacity":0.6}}],"icon":[{"style":{"color":"$color.mutedForeground"}},{"when":{"status":"error"},"style":{"color":"$color.destructive"}}],"title":[{"style":{"color":"$color.mutedForeground","fontWeight":"$type.weight.regular"}},{"when":{"status":"error"},"style":{"color":"$color.destructive"}}],"description":[{"style":{"color":"$color.mutedForeground","opacity":0.7}},{"when":{"status":"error"},"style":{"color":"$color.destructive"}}],"chevron":[{"style":{"color":"$color.mutedForeground","transition":"$motion.standard","transitionEasing":"$ease.standard"}},{"when":{"open":true},"style":{"transform":"rotate(90deg)"}},{"when":{"status":"error"},"style":{"color":"$color.destructive"}}],"content":[{"style":{"borderColor":"$color.border","color":"$color.mutedForeground"}}]},"DockCard":{"trigger":[{"style":{"backgroundColor":"$color.card","borderWidth":"$border.hairline","borderColor":"$color.border","transition":"$motion.fast","transitionEasing":"$ease.standard"}},{"when":{"state":"hover"},"style":{"backgroundColor":"$color.accent"}}],"chevron":[{"style":{"color":"$color.mutedForeground"}}]}}'),eb={$schema:Ky,id:Vy,name:Gy,modes:Yy,contrast:Xy,tokens:Zy,fonts:Jy,recipes:Qy},tb="FEED-128: the brand-coloured reference theme: the Exponential glass look with an orange primary. It changes only colours (primary, ring, the accent pair, the chart scale) per mode; every size, family and recipe comes from `exponential`, so it also shows what the smallest brand theme looks like.",nb="https://ui.exponential.at/schemas/theme/v1.json",rb="orange",ob="Orange",ib={light:{color:{primary:"#ea580c",primaryForeground:"#ffffff",accent:"#ffedd5",accentForeground:"#7c2d12",ring:"#fb923c",chart1:"#ea580c",chart2:"#f59e0b",chart3:"#b91c1c",chart4:"#0ea5e9",chart5:"#7c3aed",chart6:"#0d9488",chart7:"#db2777",chart8:"#65a30d"}},dark:{color:{primary:"#fb923c",primaryForeground:"#431407",accent:"#431407",accentForeground:"#fed7aa",ring:"#f97316",chart1:"#fb923c",chart2:"#fbbf24",chart3:"#f87171",chart4:"#38bdf8",chart5:"#a78bfa",chart6:"#2dd4bf",chart7:"#f472b6",chart8:"#a3e635"}}},sb={$comment:tb,$schema:nb,id:rb,name:ob,extends:"exponential",modes:ib},ab="https://ui.exponential.at/schemas/theme/v1.json",lb="playful",cb="Playful",ub={light:{color:{background:"#fffbf5",foreground:"#1f1235",card:"#ffffff",cardForeground:"#1f1235",popover:"#ffffff",popoverForeground:"#1f1235",primary:"#7c3aed",primaryForeground:"#ffffff",secondary:"#ccfbf1",secondaryForeground:"#134e4a",muted:"#f3e8ff",mutedForeground:"#6b5b8a",accent:"#ffe4e6",accentForeground:"#881337",destructive:"#e11d48",destructiveForeground:"#ffffff",success:"#059669",successForeground:"#ffffff",warning:"#d97706",warningForeground:"#ffffff",info:"#0284c7",infoForeground:"#ffffff",border:"#e9d5ff",input:"#ddd6fe",ring:"#a78bfa",chart1:"#7c3aed",chart2:"#14b8a6",chart3:"#f43f5e",chart4:"#f59e0b",chart5:"#0ea5e9",chart6:"#a855f7",chart7:"#ec4899",chart8:"#22c55e"},shadow:{sm:[{x:0,y:2,blur:4,spread:0,color:"#7c3aed1a"}],md:[{x:0,y:6,blur:12,spread:-2,color:"#7c3aed26"}],lg:[{x:0,y:16,blur:32,spread:-6,color:"#7c3aed33"}],xl:[{x:0,y:24,blur:48,spread:-8,color:"#7c3aed40"}]}},dark:{color:{background:"#1a1033",foreground:"#f5f3ff",card:"#2a1b4d",cardForeground:"#f5f3ff",popover:"#2a1b4d",popoverForeground:"#f5f3ff",primary:"#c4b5fd",primaryForeground:"#2e1065",secondary:"#134e4a",secondaryForeground:"#ccfbf1",muted:"#3b2a63",mutedForeground:"#c4b5fd",accent:"#4c1d95",accentForeground:"#f5f3ff",destructive:"#fb7185",destructiveForeground:"#4c0519",success:"#34d399",successForeground:"#022c22",warning:"#fbbf24",warningForeground:"#451a03",info:"#38bdf8",infoForeground:"#082f49",border:"#4c3a7a",input:"#5b4a8a",ring:"#a78bfa",chart1:"#c4b5fd",chart2:"#5eead4",chart3:"#fda4af",chart4:"#fcd34d",chart5:"#7dd3fc",chart6:"#d8b4fe",chart7:"#f9a8d4",chart8:"#86efac"},shadow:{sm:[{x:0,y:2,blur:4,spread:0,color:"#00000040"}],md:[{x:0,y:6,blur:12,spread:-2,color:"#00000059"}],lg:[{x:0,y:16,blur:32,spread:-6,color:"#00000073"}],xl:[{x:0,y:24,blur:48,spread:-8,color:"#00000080"}]}}},db={radius:{sm:10,md:14,lg:18,xl:24,xl2:28,xl3:32},type:{family:{sans:"Nunito",mono:"Fira Code"},weight:{regular:400,medium:600,semibold:700,bold:700}},control:{buttonSm:32,buttonMd:40,buttonLg:48,buttonIcon:40,input:44,pill:28,badge:22,chip:32,toggle:40,switch:24,checkbox:20,row:44},border:{hairline:2,thick:3},motion:{fast:160,standard:240,slow:360},scale:{press:.94,popoverFrom:.9},ease:{standard:[.34,1.56,.64,1]},density:{compact:.9,comfortable:1.2}},fb={Nunito:{fallback:"Avenir Next, Segoe UI, sans-serif",weights:[400,600,700],source:"host"},"Fira Code":{fallback:"ui-monospace, Menlo, monospace",weights:[400,500],source:"host"}},pb={Text:{root:[{when:{variant:"title"},style:{fontWeight:"$type.weight.bold",color:"$color.primary"}},{when:{variant:"label"},style:{fontWeight:"$type.weight.bold"}}]},Heading:{root:[{style:{fontWeight:"$type.weight.bold",color:"$color.primary"}}]},Button:{root:[{style:{borderRadius:"$radius.full",fontWeight:"$type.weight.bold",boxShadow:"$shadow.md",paddingHorizontal:"$spacing.xl"}},{when:{variant:"outline"},style:{borderWidth:"$border.thick",borderColor:"$color.primary",color:"$color.primary",backgroundColor:"#00000000"}},{when:{variant:"outline",state:"hover"},style:{backgroundColor:"$color.muted",color:"$color.primary"}},{when:{variant:"ghost"},style:{color:"$color.primary",boxShadow:"$shadow.none"}},{when:{variant:"link"},style:{boxShadow:"$shadow.none",paddingHorizontal:"$spacing.none"}},{when:{size:"icon"},style:{paddingHorizontal:"$spacing.none"}},{when:{size:"sm"},style:{paddingHorizontal:"$spacing.lg"}}]},Badge:{root:[{style:{borderRadius:"$radius.full",paddingHorizontal:"$spacing.md"}},{when:{variant:"outline"},style:{borderWidth:"$border.thick",borderColor:"$color.primary"}}],label:[{style:{fontWeight:"$type.weight.bold"}},{when:{variant:"outline"},style:{color:"$color.primary"}}]},Card:{root:[{style:{borderWidth:"$border.none",borderRadius:"$radius.xl2",boxShadow:"$shadow.md"}}]},Group:{body:[{style:{borderWidth:"$border.none",boxShadow:"$shadow.sm"}}]},Row:{root:[{when:{surface:"card"},style:{borderWidth:"$border.none",boxShadow:"$shadow.sm",borderRadius:"$radius.xl"}},{when:{selected:!0},style:{backgroundColor:"$color.secondary"}},{when:{selected:!0,surface:"flat"},style:{borderRadius:"$radius.full"}}],title:[{when:{selected:!0},style:{color:"$color.secondaryForeground",fontWeight:"$type.weight.bold"}}],icon:[{when:{selected:!0},style:{color:"$color.secondaryForeground"}}]},Section:{header:[{style:{backgroundColor:"$color.secondary",borderRadius:"$radius.full"}}],title:[{style:{color:"$color.secondaryForeground"}}]},Alert:{root:[{style:{borderWidth:"$border.none",backgroundColor:"$color.muted",borderRadius:"$radius.xl2"}}]},Chip:{root:[{style:{backgroundColor:"$color.secondary",borderWidth:"$border.none"}},{when:{shape:"rect"},style:{borderRadius:"$radius.full",borderWidth:"$border.none",backgroundColor:"$color.muted"}},{when:{selected:!0},style:{backgroundColor:"$color.primary",borderColor:"$color.primary"}}],label:[{style:{color:"$color.secondaryForeground",fontWeight:"$type.weight.bold"}},{when:{selected:!0},style:{color:"$color.primaryForeground"}}]},Tabs:{list:[{style:{backgroundColor:"#00000000",borderRadius:"$radius.none",padding:"$spacing.none",gap:"$spacing.lg"}}],tab:[{style:{borderRadius:"$radius.none",paddingHorizontal:"$spacing.none",fontWeight:"$type.weight.bold"}},{when:{state:"selected"},style:{backgroundColor:"#00000000",color:"$color.primary",boxShadow:"$shadow.none"}}],indicator:[{style:{height:"$border.thick",backgroundColor:"$color.primary",borderRadius:"$radius.full"}}]},Segmented:{root:[{when:{variant:"segmented"},style:{borderRadius:"$radius.full",backgroundColor:"$color.secondary"}}],item:[{when:{variant:["toggles","outline"]},style:{borderRadius:"$radius.full",fontWeight:"$type.weight.bold"}},{when:{variant:"segmented"},style:{fontWeight:"$type.weight.bold"}},{when:{variant:"segmented",state:"selected"},style:{backgroundColor:"$color.primary",color:"$color.primaryForeground"}}],icon:[{when:{variant:"bar",state:"selected"},style:{color:"$color.primary",transform:"scale(1.15)"}}],label:[{when:{variant:"bar",state:"selected"},style:{color:"$color.primary",fontWeight:"$type.weight.bold"}}]},Toggle:{root:[{style:{borderRadius:"$radius.full",fontWeight:"$type.weight.bold"}}]},Input:{field:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",paddingHorizontal:"$spacing.lg",boxShadow:"$shadow.none"}}]},Textarea:{field:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}]},Select:{trigger:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",paddingHorizontal:"$spacing.lg",boxShadow:"$shadow.none"}}],item:[{style:{borderRadius:"$radius.full"}}]},DatePicker:{trigger:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}],day:[{style:{borderRadius:"$radius.full"}}]},Checkbox:{box:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",borderColor:"$color.primary",boxShadow:"$shadow.none"}}]},Radio:{item:[{style:{borderWidth:"$border.thick",borderColor:"$color.primary",boxShadow:"$shadow.none"}}]},Switch:{track:[{style:{width:44,backgroundColor:"$color.muted",borderWidth:"$border.thick",borderColor:"$color.primary"}},{when:{checked:!0},style:{backgroundColor:"$color.primary"}}],thumb:[{style:{width:16,height:16,backgroundColor:"$color.primary"}},{when:{checked:!0},style:{backgroundColor:"$color.primaryForeground"}}]},Slider:{track:[{style:{height:8}}],thumb:[{style:{borderWidth:"$border.thick"}}]},Composer:{root:[{style:{borderRadius:"$radius.xl2",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}],send:[{style:{borderRadius:"$radius.full"}}]},Dialog:{content:[{style:{borderRadius:"$radius.xl3",borderWidth:"$border.none"}}]},Drawer:{content:[{style:{borderRadius:"$radius.xl3",borderWidth:"$border.none"}}]},Popover:{content:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.none"}}]},Menu:{content:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.none",padding:"$spacing.sm"}}],item:[{style:{borderRadius:"$radius.full"}}]},Tooltip:{content:[{style:{borderRadius:"$radius.full",backgroundColor:"$color.accentForeground",color:"$color.accent"}}]},Progress:{track:[{style:{backgroundColor:"$color.secondary"}}]},Meter:{track:[{style:{backgroundColor:"$color.secondary"}}]},Skeleton:{root:[{style:{backgroundColor:"$color.muted",borderRadius:"$radius.lg"}}]},Avatar:{root:[{style:{borderRadius:"$radius.lg"}}],fallback:[{style:{backgroundColor:"$color.secondary",color:"$color.secondaryForeground",fontWeight:"$type.weight.bold"}}]},Unknown:{root:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.thick"}}]},Toast:{root:[{style:{borderRadius:"$radius.xl3",borderWidth:"$border.none",backgroundColor:"$color.primary",color:"$color.primaryForeground"}}],description:[{style:{color:"$color.primaryForeground",opacity:"$opacity.secondary"}}],icon:[{style:{color:"$color.primaryForeground"}}]},CodeBlock:{root:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.none",backgroundColor:"$color.secondary"}}],token:[{when:{kind:"keyword"},style:{color:"$color.primary",fontWeight:"$type.weight.bold"}}]},Table:{header:[{style:{color:"$color.primary",borderBottomWidth:"$border.thick",borderColor:"$color.primary"}}],row:[{when:{striped:!0},style:{backgroundColor:"$color.secondary"}}]},NumberField:{field:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",paddingHorizontal:"$spacing.lg",boxShadow:"$shadow.none"}}]},ChipInput:{field:[{style:{borderRadius:"$radius.xl",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}],chip:[{style:{backgroundColor:"$color.primary",color:"$color.primaryForeground"}}]},TimePicker:{trigger:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}],item:[{style:{borderRadius:"$radius.full"}}]},DateRangePicker:{trigger:[{style:{borderRadius:"$radius.full",borderWidth:"$border.thick",boxShadow:"$shadow.none"}}],day:[{style:{borderRadius:"$radius.full"}}],range:[{style:{backgroundColor:"$color.secondary",color:"$color.secondaryForeground"}}]},FileUpload:{dropzone:[{style:{borderRadius:"$radius.xl2",borderWidth:"$border.thick",borderColor:"$color.primary",backgroundColor:"$color.muted"}}]},Kbd:{root:[{style:{borderRadius:"$radius.md",backgroundColor:"$color.secondary",borderColor:"$color.primary"}}]},Stepper:{marker:[{style:{borderWidth:"$border.thick",borderColor:"$color.primary"}},{when:{status:"done"},style:{backgroundColor:"$color.secondary",color:"$color.secondaryForeground",borderColor:"$color.secondary"}}],check:[{style:{color:"$color.secondaryForeground"}}]},Rating:{icon:[{when:{filled:!0},style:{color:"$color.primary"}}]}},hb={$schema:ab,id:lb,name:cb,extends:"neutral",modes:ub,tokens:db,fonts:fb,recipes:pb},gb=eb,mb=qy,yb=hb,bb=sb,kr=[gb,mb,yb,bb],Sr=kr.map(e=>e.id),_o="exponential",pl=new Map;function Wn(e){const t=pl.get(e);if(t)return t;const n=kr.find(o=>o.id===e);if(!n)throw new Error(`unknown built-in theme "${e}"; known: ${Sr.join("|")}`);const r=Ty(n,{themes:kr});return pl.set(e,r),r}function hl(e){if(typeof e=="string")return Sr.includes(e)?{theme:Wn(e),issues:[]}:{theme:Wn(_o),issues:[{path:"theme",message:`unknown built-in theme "${e}"; known: ${Sr.join("|")}`}]};const{theme:t,issues:n}=Gs(e,{themes:kr});return t?{theme:t,issues:[]}:{theme:Wn(_o),issues:n}}const Jn=4,Qn=8,vb="v0.9",xb={a2ui:["createSurface","updateComponents","updateDataModel","deleteSurface"],extensions:["applyTemplate","bindDataModel"]},$b={defaultSchemes:["https","http","mailto","tel"]},wb={defaultSchemes:["https","http","data"],limits:{maxBytes:20971520,timeoutMs:3e4,maxPixels:33554432}},kb={sseEvents:["message","a2ui"]},tn={a2uiVersion:vb,messages:xb,urls:$b,media:wb,transport:kb},gl=[...tn.messages.a2ui,...tn.messages.extensions],Lu=tn.urls.defaultSchemes,ju=tn.media.defaultSchemes,Ys=tn.media.limits,Sb="RENDER_FAILED",Cb=tn.transport.sseEvents;function yt(e,t,n,r){return{version:tn.a2uiVersion,error:r===void 0?{code:e,surfaceId:t,message:n}:{code:e,surfaceId:t,message:n,path:r}}}function Ab(e){const t={name:e.name,surfaceId:e.surfaceId,sourceComponentId:e.sourceComponentId,timestamp:e.timestamp,context:e.context??{}};return e.payload&&Object.keys(e.payload).length&&(t.payload=e.payload),{version:tn.a2uiVersion,action:t}}const Tb=Qe.functions.names;function fs(e,t){return e.endsWith("*")?t.startsWith(e.slice(0,-1)):e===t}function ml(e,t,n){if(Tb.includes(t))return"allow";if(!n)return"not_found";const r=e??{},o=i=>(i??[]).some(s=>fs(s,t));return o(r.deny)?"deny":o(r.allow)?"allow":o(r.ask)?"ask":r.default??"allow"}function Ib(e,t){const n={allow:0,ask:1,deny:2,not_found:3};return n[e]>=n[t]?e:t}function Eb(e){return{allow:e??[],default:"deny"}}function _b(e,t){try{return new URL(e)}catch{if(!t)return null;try{return new URL(e,t)}catch{return null}}}function Bu(e,t){const n=e.toLowerCase();return n.startsWith("*.")?t.endsWith(n.slice(1))&&t.length>n.length-1:t===n}function Db(e){const t=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(e);if(!t)return null;const n=t.slice(1).map(Number);return n.every(r=>r<=255)?n:null}function Pb(e){if(!e.startsWith("[")||!e.endsWith("]"))return null;const n=e.slice(1,-1).split("::");if(n.length>2)return null;const r=s=>{if(s==="")return[];const a=[];for(const l of s.split(":")){if(!/^[0-9a-f]{1,4}$/.test(l))return null;a.push(parseInt(l,16))}return a},o=r(n[0]),i=n.length===2?r(n[1]):[];return!o||!i?null:n.length===1?o.length===8?o:null:o.length+i.length>7?null:[...o,...new Array(8-o.length-i.length).fill(0),...i]}function yl([e,t]){return e===0||e===10||e===127||e===169&&t===254||e===172&&t>=16&&t<=31||e===192&&t===168}function Hu(e){const t=e.toLowerCase().replace(/\.$/,"");if(t==="localhost"||t.endsWith(".localhost")||t.endsWith(".local"))return!0;const n=Db(t);if(n)return yl(n);const r=Pb(t);return r?r.every(o=>o===0)||r.slice(0,7).every(o=>o===0)&&r[7]===1||(r[0]&65472)===65152||(r[0]&65024)===64512?!0:r.slice(0,5).every(o=>o===0)&&r[5]===65535?yl([r[6]>>8,r[6]&255,r[7]>>8,r[7]&255]):!1:!1}function Ob(e,t){return(e??[]).some(n=>n==="*"||Bu(n,t))}function Br(e,t){const n=_b(t.trim(),e?.baseUrl);if(!n)return{allowed:!1,reason:"invalid"};const r=n.protocol.replace(/:$/,"").toLowerCase();if(!(e?.schemes??Lu).includes(r))return{allowed:!1,url:n.href,reason:"scheme"};if(r==="http"||r==="https"){const i=n.hostname.toLowerCase();if(e?.hosts&&!e.hosts.some(s=>Bu(s,i)))return{allowed:!1,url:n.href,reason:"host"};if(Hu(i)&&!Ob(e?.allowPrivate,i))return{allowed:!1,url:n.href,reason:"private"}}return{allowed:!0,url:n.href}}function Wu(e,t={}){const n=Br({baseUrl:t.baseUrl,schemes:t.schemes??ju,hosts:t.hosts,allowPrivate:t.allowPrivate},e);if(!n.allowed||!n.url)return null;const r=n.url,o={};for(const i of t.rules??[])r.startsWith(i.prefix)&&Object.assign(o,i.headers);return{url:r,headers:Uu(o)}}function Mb(e,t){if(typeof t!="string"||!t)return;const n=Br(e,t);return n.allowed?n.url:void 0}function Uu(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t<n?-1:t>n?1:0))}function Fb(e){if(qu(e))return Nb(e);const t=e.length,n=c=>c+2<=t?e[c]<<8|e[c+1]:null,r=c=>c+2<=t?e[c]|e[c+1]<<8:null,o=c=>c+4<=t?(e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3])>>>0:null,i=c=>c+4<=t?(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0:null,s=c=>c+3<=t?e[c]|e[c+1]<<8|e[c+2]<<16:null,a=(c,u=0)=>c.every((d,f)=>e[u+f]===d),l=(c,u)=>c===null||u===null?null:[c,u];if(a([137,80,78,71,13,10,26,10]))return l(o(16),o(20));if(a([71,73,70,56])&&(e[4]===55||e[4]===57)&&e[5]===97)return l(r(6),r(8));if(a([66,77])){const c=i(22);return l(i(18),c===null?null:Math.abs(c|0))}if(t>=30&&a([82,73,70,70])&&a([87,69,66,80],8)){const c=String.fromCharCode(e[12],e[13],e[14],e[15]);if(c==="VP8 ")return l(r(26)&16383,r(28)&16383);if(c==="VP8L"){const u=i(21);return u===null?null:[(u&16383)+1,(u>>>14&16383)+1]}if(c==="VP8X"){const u=s(24),d=s(27);return u===null||d===null?null:[u+1,d+1]}return null}if(a([255,216])){let c=2;for(;c+4<=t;){if(e[c]!==255){c+=1;continue}const u=e[c+1];if(u===255){c+=1;continue}if(u===216||u===1||u>=208&&u<=215){c+=2;continue}const d=n(c+2);if(d===null)return null;if(u>=192&&u<=207&&u!==196&&u!==200&&u!==204)return l(n(c+7),n(c+5));c+=2+d}}return null}function qu(e){const t=e.subarray(0,256);let n=0;for(;n<t.length&&(t[n]===32||t[n]===9||t[n]===10||t[n]===12||t[n]===13);)n+=1;const r=String.fromCharCode(...t.subarray(n,n+5)).toLowerCase();return r.startsWith("<svg")||r.startsWith("<?xml")}const zb={"":1,px:1,pt:4/3,pc:16,in:96,cm:96/2.54,mm:96/25.4,em:16,ex:8};function bl(e){const t=e.trim();let r=/^[0-9.+\-eE]*/.exec(t)[0],o=t.slice(r.length);/[eE]$/.test(r)&&(r=r.slice(0,-1),o=t.slice(r.length));const i=zb[o.trim()];if(i===void 0||!/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(r))return null;const s=Number(r);return Number.isFinite(s)&&s>=0?s*i:null}function Rb(e){const t=e.split(/[\s,]+/).filter(o=>o!=="");if(t.length!==4||t.some(o=>!/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(o)))return null;const n=Number(t[2]),r=Number(t[3]);return n>0&&r>0&&Number.isFinite(n)&&Number.isFinite(r)?[n,r]:null}function Nb(e){let t=-1;for(let u=0;u+4<=e.length;u++)if(e[u]===60&&e[u+1]===115&&e[u+2]===118&&e[u+3]===103){t=u;break}if(t<0)return null;let n=e.indexOf(62,t);n<0&&(n=e.length);const r=new TextDecoder().decode(e.subarray(t+4,n));let o=null,i=null,s=null;for(const u of r.matchAll(/(?<=\s)([A-Za-z_:][A-Za-z0-9_:.\-]*)\s*=\s*("([^"]*)"?|'([^']*)'?)/g)){const d=u[3]??u[4]??"";u[1]==="width"?o=bl(d):u[1]==="height"?i=bl(d):u[1]==="viewBox"&&(s=Rb(d))}let a,l;o!==null&&i!==null?[a,l]=[o,i]:o!==null?[a,l]=[o,s?o*s[1]/s[0]:100]:i!==null?[a,l]=[s?i*s[0]/s[1]:100,i]:[a,l]=s??[100,100];const c=u=>Number.isFinite(u)?Math.min(Math.max(Math.ceil(u),0),4294967295):4294967295;return[c(a),c(l)]}function Lb(e){const t=e.length,n=a=>a+4<=t?(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0:null,r=a=>a+4<=t?(e[a]|e[a+1]<<8|e[a+2]<<16|e[a+3]<<24)>>>0:null,o=a=>a+4<=t?String.fromCharCode(e[a],e[a+1],e[a+2],e[a+3]):null,i=a=>a.every((l,c)=>e[c]===l);let s=1;if(i([71,73,70,56])&&(e[4]===55||e[4]===57)&&e[5]===97){const a=u=>{for(;u<t;){const d=e[u];if(u+=1+d,d===0)break}return u},l=u=>u&128?3<<(u&7)+1:0;let c=13+(t>10?l(e[10]):0);for(s=0;;)if(e[c]===44){if(s+=1,c+9>=t)break;c=a(c+10+l(e[c+9])+1)}else if(e[c]===33)c=a(c+2);else break}else if(i([137,80,78,71,13,10,26,10])){let a=8;for(;;){const l=n(a),c=o(a+4);if(l===null||c===null||c==="IDAT")break;if(c==="acTL"){s=n(a+8)??1;break}a+=12+l}}else if(t>=21&&o(0)==="RIFF"&&o(8)==="WEBP"&&o(12)==="VP8X"&&e[20]&2){let a=12;for(s=0;;){const l=o(a),c=r(a+4);if(l===null||c===null)break;l==="ANMF"&&(s+=1),a+=8+c+(c&1)}}return Math.max(s,1)}function jb(e,t=Ys){const{maxBytes:n,maxPixels:r}=t;if(e.length>n)return`media is over ${n} bytes`;const o=(u,d=0)=>u.every((f,g)=>e[d+g]===f);if(!(o([137,80,78,71,13,10,26,10])||o([71,73,70,56])&&(e[4]===55||e[4]===57)&&e[5]===97||o([66,77])||o([255,216])||e.length>=12&&o([82,73,70,70])&&o([87,69,66,80],8))&&!qu(e))return null;const s=Fb(e);if(!s)return"media: image dimensions unreadable";const[a,l]=s,c=Lb(e);return c<=1?a*l>r?`media is ${a}×${l}, over ${r} pixels`:null:a*l*c>r?`media is ${a}×${l} × ${c} frames, over ${r} pixels`:null}const Bb=/^([a-zA-Z][a-zA-Z0-9+.-]*):([^?]+)(?:\?(.*))?$/;function Ti(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Cr(e){const t=Bb.exec(e.trim());if(!t)return null;const n=Ti(t[2]);if(!n)return null;const r={};for(const o of(t[3]??"").split("&")){if(!o)continue;const i=o.indexOf("="),s=Ti(i<0?o:o.slice(0,i));s&&(r[s]=i<0?"":Ti(o.slice(i+1)))}return{uri:e,scheme:t[1].toLowerCase(),name:n,params:Uu(r)}}function vl(e,t,n){const r=e.trim();if(r)try{n.messages.push(JSON.parse(r))}catch{n.issues.push({at:t,message:`line ${t} is not JSON`})}}function ps(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r<128?1:r<2048||r>=55296&&r<=57343?2:3}return t}class Ku{parts=[];bytes=0;skipping=!1;push(t){const n=[];let r=0;if(this.skipping){const i=t.indexOf(`
17
+ `);if(i<0)return n;this.skipping=!1,r=i+1}let o=t.indexOf(`
18
+ `,r);for(;o>=0;){const i=t.slice(r,o),s=this.bytes+ps(i)>mn;n.push(s?null:this.parts.length?this.parts.join("")+i:i),this.parts=[],this.bytes=0,r=o+1,o=t.indexOf(`
19
+ `,r)}if(r<t.length){const i=t.slice(r);this.parts.push(i),this.bytes+=ps(i)}return this.bytes>mn&&(n.push(null),this.parts=[],this.bytes=0,this.skipping=!0),n}end(){const t=this.skipping,n=this.parts.join("");return this.parts=[],this.bytes=0,this.skipping=!1,t?null:n}}const Vu=(e,t)=>({at:e,message:`${t} ${e}: ${wt.messageBytes}`});class Gu{lines=new Ku;line=0;push(t){const n={messages:[],issues:[]};for(const r of this.lines.push(t))this.line+=1,r===null?n.issues.push(Vu(this.line,"line")):vl(r,this.line,n);return n}end(){const t={messages:[],issues:[]},n=this.lines.end();return n!==null&&n.trim()&&(this.line+=1,vl(n,this.line,t)),t}}function Yu(e){const t=e.trim();if(t.startsWith("["))try{const i=JSON.parse(t);if(Array.isArray(i))return{messages:i,issues:[]}}catch{}const n=new Gu,r=n.push(e),o=n.end();return{messages:[...r.messages,...o.messages],issues:[...r.issues,...o.issues]}}class Hb{retryMs;lines=new Ku;data=[];dataBytes=0;oversized=!1;event="";count=0;push(t){const n={messages:[],issues:[]};for(const r of this.lines.push(t))r===null?this.dropData():this.line(r.endsWith("\r")?r.slice(0,-1):r,n);return n}end(){const t={messages:[],issues:[]},n=this.lines.end();return n===null?this.dropData():n&&this.line(n,t),this.dispatch(t),t}dropData(){this.data=[],this.dataBytes=0,this.oversized=!0}line(t,n){if(t==="")return this.dispatch(n);if(t.startsWith(":"))return;const r=t.indexOf(":"),o=r<0?t:t.slice(0,r);let i=r<0?"":t.slice(r+1);if(i.startsWith(" ")&&(i=i.slice(1)),o==="data"){if(this.oversized)return;if(this.dataBytes+=ps(i)+1,this.dataBytes>mn)return this.dropData();this.data.push(i)}else o==="event"?this.event=i:o==="retry"&&/^\d+$/.test(i)&&(this.retryMs=Number(i))}dispatch(t){if(this.dataBytes=0,this.oversized){this.oversized=!1,this.count+=1,this.data=[],this.event="",t.issues.push(Vu(this.count,"event"));return}if(!this.data.length){this.event="";return}this.count+=1;const n=this.event||"message",r=this.data.join(`
20
+ `);if(this.data=[],this.event="",!Cb.includes(n))return;const o=Yu(r);t.messages.push(...o.messages),o.issues.length&&t.issues.push({at:this.count,message:`event ${this.count} is not JSON`})}}function Xs(e=[]){const t=[];for(const n of[yr,Hc,Ds,...e])t.includes(n)||t.push(n);return t}function Wb(e=[]){return{"v0.9":{supportedCatalogIds:Xs(e)}}}const gt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Ub=/^(\/([^/~]|~[01])*)*$/;function qb(e,t=Xs()){const n=[];if(!gt(e))return[{path:"",message:"a package is an object"}];for(const r of["id","name","version","catalogId"])(typeof e[r]!="string"||!e[r])&&n.push({path:`/${r}`,message:`${r} is a required string`});if(typeof e.catalogId=="string"&&e.catalogId&&!t.includes(e.catalogId)&&n.push({path:"/catalogId",message:`unsupported catalog ${e.catalogId}`}),!gt(e.templates)||!Object.keys(e.templates).length)n.push({path:"/templates",message:"templates is a non-empty object"});else for(const[r,o]of Object.entries(e.templates)){const i=`/templates/${r}`;if(!gt(o)){n.push({path:i,message:"a template is an object"});continue}const s=o.components;if(!Array.isArray(s)||!s.length)n.push({path:`${i}/components`,message:"components is a non-empty array"});else{const a=new Set;s.forEach((l,c)=>{!gt(l)||typeof l.id!="string"||typeof l.component!="string"?n.push({path:`${i}/components/${c}`,message:"a component needs an id and a component"}):a.has(l.id)?n.push({path:`${i}/components/${c}/id`,message:`duplicate id ${l.id}`}):a.add(l.id)}),a.has("root")||n.push({path:`${i}/components`,message:"no component has the id root"})}o.bindings!==void 0&&(Array.isArray(o.bindings)?o.bindings.forEach((a,l)=>{const c=`${i}/bindings/${l}`;(!gt(a)||typeof a.path!="string"||!Ub.test(a.path))&&n.push({path:`${c}/path`,message:"path is a JSON pointer"}),(!gt(a)||typeof a.source!="string"||!Cr(a.source))&&n.push({path:`${c}/source`,message:"source is a scheme:name URI"})}):n.push({path:`${i}/bindings`,message:"bindings is an array"}))}if(e.functions!==void 0&&(!Array.isArray(e.functions)||e.functions.some(r=>typeof r!="string"||!r))&&n.push({path:"/functions",message:"functions is a list of names or prefix* patterns"}),e.sources!==void 0&&(!Array.isArray(e.sources)||e.sources.some(r=>typeof r!="string"||!r)))n.push({path:"/sources",message:"sources is a list of scheme:name sources or prefix* patterns"});else if(Array.isArray(e.sources)&&gt(e.templates))for(const[r,o]of Object.entries(e.templates))!gt(o)||!Array.isArray(o.bindings)||o.bindings.forEach((i,s)=>{gt(i)&&typeof i.source=="string"&&Cr(i.source)&&!Xu(e.sources,i.source)&&n.push({path:`/templates/${r}/bindings/${s}/source`,message:`source ${i.source} is not in the package's sources`})});return n}function Xu(e,t){if(e===void 0)return!0;const n=Cr(t);if(!n)return!1;const r=`${n.scheme}:${n.name}`;return e.some(o=>fs(o,r)||fs(o,t))}function Kb(e,t,n,r){const o=e.templates[t];if(!o)return null;const i=Wc,s=[{version:i,createSurface:{surfaceId:n,catalogId:e.catalogId}},{version:i,updateComponents:{surfaceId:n,components:o.components}}],a=Vb(o.data,r);a!==void 0&&s.push({version:i,updateDataModel:{surfaceId:n,path:"/",value:a}});for(const l of o.bindings??[])s.push({version:i,bindDataModel:{surfaceId:n,path:l.path,source:l.source}});return s}function Vb(e,t){return t===void 0?e:gt(e)&&gt(t)?{...e,...t}:t}const po=e=>!!e&&typeof e=="object"&&!Array.isArray(e);class Gb{extensionIds;surfaces=new Map;packages=new Map;constructor(t={}){this.extensionIds=[...t.extensionIds??[]]}get supportedCatalogIds(){return Xs(this.extensionIds)}registerExtension(t){this.extensionIds.includes(t)||this.extensionIds.push(t)}installPackage(t){const n=qb(t,this.supportedCatalogIds);return n.length||this.packages.set(t.id,t),n}package(t){return this.packages.get(t)}surface(t){return this.surfaces.get(t)}surfaceIds(){return[...this.surfaces.keys()]}route(t){if(Yb(t))return[this.invalid(po(t)?Ii(t):"",wt.messageBytes)];if(!po(t))return[this.invalid("","a message is a JSON object")];if(t.version!==void 0&&t.version!==Wc)return[this.invalid(Ii(t),`unsupported version ${String(t.version)}`)];const n=Object.keys(t).filter(s=>s!=="version");if(n.length!==1||!gl.includes(n[0]))return[this.invalid(Ii(t),`expected exactly one of ${gl.join(", ")}`)];const r=n[0],o=t[r];if(!po(o)||typeof o.surfaceId!="string"||!o.surfaceId)return[this.invalid("",`${r}.surfaceId is required`)];const i=o.surfaceId;switch(r){case"createSurface":{if(typeof o.catalogId!="string")return[this.invalid(i,"createSurface.catalogId is required")];if(!this.supportedCatalogIds.includes(o.catalogId))return[{op:"send",message:yt("UNSUPPORTED_CATALOG",i,`catalog ${o.catalogId} is not supported`)}];this.surfaces.set(i,{surfaceId:i,catalogId:o.catalogId});const s={op:"create",surfaceId:i,catalogId:o.catalogId};return o.theme!==void 0&&(s.theme=o.theme),o.sendDataModel===!0&&(s.sendDataModel=!0),[s]}case"updateComponents":return Array.isArray(o.components)?this.surfaces.has(i)?[{op:"components",surfaceId:i,components:o.components}]:[this.missing(i)]:[this.invalid(i,"updateComponents.components is required")];case"updateDataModel":{if(!this.surfaces.has(i))return[this.missing(i)];if(o.path!==void 0&&typeof o.path!="string")return[this.invalid(i,"updateDataModel.path is a string")];const s=Ei(o.path);return["value"in o?{op:"data",surfaceId:i,path:s,value:o.value}:{op:"data",surfaceId:i,path:s}]}case"deleteSurface":return this.surfaces.has(i)?(this.surfaces.delete(i),[{op:"delete",surfaceId:i}]):[this.missing(i)];case"bindDataModel":{const s=this.surfaces.get(i);if(!s)return[this.missing(i)];if(typeof o.path!="string"||typeof o.source!="string"||!Cr(o.source))return[this.invalid(i,"bindDataModel needs a path and a scheme:name source")];const a=s.packageId?this.packages.get(s.packageId):void 0;return a&&!Xu(a.sources,o.source)?[{op:"send",message:yt("SOURCE_DENIED",i,`source ${o.source} is not in package ${a.id}'s sources`,Ei(o.path)||"/")}]:[{op:"bind",surfaceId:i,path:Ei(o.path),source:o.source}]}case"applyTemplate":{if(typeof o.templateId!="string")return[this.invalid(i,"applyTemplate.templateId is required")];const s=this.findPackage(o.templateId,typeof o.packageId=="string"?o.packageId:void 0);if(!s)return[{op:"send",message:yt("TEMPLATE_NOT_FOUND",i,`no installed package has the template ${o.templateId}`)}];const a=[];for(const l of Kb(s,o.templateId,i,o.data)??[]){a.push(...this.route(l));const c=this.surfaces.get(i);c&&(c.packageId=s.id)}return a}}return[this.invalid(i,"unknown message")]}findPackage(t,n){if(n!==void 0){const r=this.packages.get(n);return r&&r.templates[t]?r:void 0}for(const r of this.packages.values())if(r.templates[t])return r}invalid(t,n){return{op:"send",message:yt("INVALID_MESSAGE",t,n)}}missing(t){return{op:"send",message:yt("SURFACE_NOT_FOUND",t,`no surface ${t}; send createSurface first`)}}}function Yb(e){let t;try{t=JSON.stringify(e)}catch{return!1}return t===void 0||t.length*3<=mn?!1:t.length>mn||new TextEncoder().encode(t).length>mn}function Ii(e){for(const t of Object.values(e))if(po(t)&&typeof t.surfaceId=="string")return t.surfaceId;return""}function Ei(e){return e===void 0||e==="/"?"":e}class Xb extends Error{constructor(t,n){super(`exponential-ui: package ${t} is unusable: ${n.map(r=>`${r.path||"/"} ${r.message}`).join("; ")}`),this.packageId=t,this.issues=n,this.name="PackageError"}packageId;issues}const xl=100;function Zb(e){if(typeof e=="string")return Sr.includes(e)?{theme:Wn(e),issues:[]}:{theme:null,issues:[`unknown built-in theme "${e}"; known: ${Sr.join("|")}`]};const{theme:t,issues:n}=Gs(e,{themes:kr});return{theme:t,issues:n.map(r=>r.path?`${r.path}: ${r.message}`:r.message)}}class Jb{constructor(t,n,r){this.extensions=r,this.surfaceId=t,this.catalogId=n}extensions;surfaceId;catalogId;packageId;sendDataModel=!1;list=[];shared=!1;positions=new Map;data={};theme;reduced=null;listeners=new Set;version=0;get components(){return this.shared=!0,this.list}component(t){const n=this.positions.get(t);return n===void 0?void 0:this.list[n]}get root(){return this.reduce().root}get issues(){return this.reduce().issues}get templates(){return this.reduce().templates}reduce(){return this.reduced||(this.reduced=this.list.length?Du(this.list,{catalogId:this.catalogId,extensions:this.extensions()}):{root:null,issues:[]}),this.reduced}setComponents(t){this.shared&&(this.list=this.list.slice(),this.shared=!1);for(const n of t){const r=this.positions.get(n.id);r===void 0?(this.positions.set(n.id,this.list.length),this.list.push(n)):this.list[r]=n}this.reduced=null,this.notify()}invalidate(){this.reduced=null,this.notify()}setData(t,n){const r=js(this.data,t,n);if(r.error)return r.error;this.data=r.data,this.notify()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.version+=1;for(const t of[...this.listeners])t()}}class Qb{constructor(t={}){this.options=t,this.extensions=[...t.extensions??[]],this.router=new Gb({extensionIds:this.extensions.map(n=>n.id)}),this.functions={...t.functions??{}},this.sources={...t.sources??{}};for(const n of t.packages??[]){const r=this.installPackage(n);if(r.length)throw new Xb(typeof n?.id=="string"&&n.id?n.id:"?",r)}}options;router;stores=new Map;subscriptions=new Map;paintErrors=new Map;listeners=new Set;functions;sources;extensions;status="closed";statusDetail;unsupportedCatalog;issues=[];get hasTransport(){return this.options.transport!==void 0}get supportedCatalogIds(){return this.router.supportedCatalogIds}clientCapabilities(){return Wb(this.extensions.map(t=>t.id))}get extensionDefs(){return this.extensions}registerExtension(t){if(!this.extensions.some(n=>n.id===t.id)){this.extensions.push(t),this.router.registerExtension(t.id);for(const n of this.stores.values())n.invalidate()}}registerFunction(t,n){this.functions[t]=n}registerSource(t,n){this.sources[t.toLowerCase()]=n}installPackage(t){const n=this.router.installPackage(t),r=typeof t?.id=="string"?t.id:void 0;for(const o of n)this.report({code:"PACKAGE_INVALID",message:o.message,path:o.path,...r?{packageId:r}:{}});return n}report(t){const n=[...this.issues,t];this.issues=n.length>xl?n.slice(n.length-xl):n,this.options.onIssue?.(t),this.notify()}surface(t){return this.stores.get(t)}surfaceIds(){return[...this.stores.keys()]}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){for(const t of[...this.listeners])t()}connect(){const t=this.options.transport;t&&t.start(n=>this.receive(n),(n,r)=>{this.status=n,this.statusDetail=r,this.notify()})}close(){this.options.transport?.close();for(const t of this.surfaceIds())this.perform({op:"delete",surfaceId:t})}receive(t){const n=this.router.route(t);for(const r of n)this.perform(r);return n}send(t){if(this.options.transport?.send(t),this.options.onSend?.(t),"error"in t){const n=t.error;this.report({code:n.code,message:n.message,...n.surfaceId?{surfaceId:n.surfaceId}:{},...n.path!==void 0?{path:n.path}:{}})}}perform(t){switch(this.options.onOp?.(t),t.op){case"create":{this.unbind(t.surfaceId),this.forgetPaintErrors(t.surfaceId);const n=new Jb(t.surfaceId,t.catalogId,()=>this.extensions);if(n.sendDataModel=t.sendDataModel===!0,n.packageId=this.router.surface(t.surfaceId)?.packageId,t.theme!==void 0&&t.theme!==null){const{theme:r,issues:o}=Zb(t.theme);r?n.theme=r:this.send(yt("VALIDATION_FAILED",t.surfaceId,`createSurface.theme is unusable: ${o.join("; ")}`,"/createSurface/theme"))}this.stores.set(t.surfaceId,n),this.notify();return}case"components":{const n=this.paintErrors.get(t.surfaceId);if(n)for(const r of t.components)n.delete(r.id);this.stores.get(t.surfaceId)?.setComponents(t.components);return}case"data":{const n=this.stores.get(t.surfaceId)?.setData(t.path,t.value);n&&this.send(yt("VALIDATION_FAILED",t.surfaceId,n,t.path||"/"));return}case"bind":{const n=this.stores.get(t.surfaceId),r=Cr(t.source),o=r?this.sources[r.scheme]:void 0;if(!n||!r)return;if(!o){this.send(yt("VALIDATION_FAILED",t.surfaceId,`no resolver for the source scheme ${r.scheme}`,t.path||"/"));return}const i=o(r,s=>this.stores.get(t.surfaceId)?.setData(t.path,s));i&&this.subscriptions.set(t.surfaceId,[...this.subscriptions.get(t.surfaceId)??[],i]);return}case"delete":this.unbind(t.surfaceId),this.forgetPaintErrors(t.surfaceId),this.stores.delete(t.surfaceId),this.notify();return;case"send":{const n="error"in t.message?t.message.error:void 0;n?.code==="UNSUPPORTED_CATALOG"&&(this.unsupportedCatalog=n.message.replace(/^catalog (\S+).*$/,"$1"),this.notify()),this.send(t.message);return}}}unbind(t){for(const n of this.subscriptions.get(t)??[])n();this.subscriptions.delete(t)}action(t){const n=Ab({name:t.name,surfaceId:t.surfaceId,sourceComponentId:t.componentId,timestamp:t.timestamp??new Date().toISOString(),context:t.context??{},payload:t.payload});return this.send(n),n}decide(t,n){const r=Object.prototype.hasOwnProperty.call(this.functions,n);let o=ml(this.options.policy?.functions,n,r);const i=this.stores.get(t)?.packageId,s=i?this.router.package(i):void 0;return s&&(o=Ib(o,ml(Eb(s.functions),n,r))),o}async callFunction(t){if(t.name==="openUrl"){const i=typeof t.args.url=="string"?t.args.url:"";return{decision:this.openUrl(i)?"allow":"deny"}}let n=this.decide(t.surfaceId,t.name);if(n==="not_found")return this.send(yt("FUNCTION_NOT_FOUND",t.surfaceId,`no function ${t.name}`)),{decision:n};let r;if(n==="ask"){let i=!1;try{i=await this.options.policy?.onFunctionCall?.(t)===!0}catch(s){r=s instanceof Error?s.message:String(s)}i||(n="deny")}if(n==="deny")return this.send(yt("FUNCTION_DENIED",t.surfaceId,r===void 0?`${t.name} was not allowed`:`${t.name} was not allowed: the consent hook failed: ${r}`)),r===void 0?{decision:n}:{decision:n,error:r};const o=Object.prototype.hasOwnProperty.call(this.functions,t.name)?this.functions[t.name]:void 0;if(!o)return{decision:"allow"};try{return{decision:"allow",result:await o(t.args,t)}}catch(i){return{decision:"allow",error:i instanceof Error?i.message:String(i)}}}urlPolicy(){return{baseUrl:this.options.policy?.media?.baseUrl,...this.options.policy?.urls}}openUrl(t){const n=Br(this.urlPolicy(),t);return!n.allowed||!n.url?!1:((this.options.policy?.openUrl??(o=>globalThis.window?.open(o,"_blank","noopener")))(n.url),!0)}paintError(t){const n=this.stores.get(t.surfaceId);let r=t.componentId;for(;n&&!n.component(r)&&r.includes(".");)r=r.slice(0,r.lastIndexOf("."));const o=n?.component(r);let i=this.paintErrors.get(t.surfaceId);i||this.paintErrors.set(t.surfaceId,i=new Map);let s=i.get(r);(!s||s.component!==o)&&i.set(r,s={component:o,ids:new Set}),!s.ids.has(t.componentId)&&(s.ids.add(t.componentId),this.send(yt(Sb,t.surfaceId,t.message,`/components/${t.componentId}`)))}forgetPaintErrors(t){this.paintErrors.delete(t)}mediaOptions(){return this.options.policy?.media}mediaRequest(t){return Wu(t,this.options.policy?.media)}}class Zu{constructor(t){this.options=t}options;controller;generation=0;start(t,n){this.controller?.abort();const r=++this.generation;this.run(r,t,n)}async run(t,n,r){const o=this.options.fetch??fetch,i=()=>t===this.generation;for(;i();){const s=new AbortController;this.controller=s,r("connecting");let a=this.options.reconnectMs??2e3;try{const l=await o(this.options.url,{headers:{accept:this.accept(),...this.options.headers},signal:s.signal});if(!i())return;if(!l.ok||!l.body)throw new Error(`HTTP ${l.status}`);r("open");const c=l.body.getReader(),u=new TextDecoder,d=this.decoder();for(;;){const{done:g,value:p}=await c.read();if(!i())return;if(g)break;d.push(u.decode(p,{stream:!0})).messages.forEach(n)}if(d.end().messages.forEach(n),r("closed"),!(this.options.resumable===!0||d.retryMs!==void 0)){i()&&(this.generation+=1);return}d.retryMs!==void 0&&this.options.reconnectMs===void 0&&(a=d.retryMs)}catch(l){if(!i())return;r("error",l instanceof Error?l.message:String(l))}if(!a||!i())return;await new Promise(l=>setTimeout(l,a))}}async send(t){await(this.options.fetch??fetch)(this.options.postUrl??this.options.url,{method:"POST",headers:{"content-type":"application/json",...this.options.headers},body:JSON.stringify(t)})}close(){this.generation+=1,this.controller?.abort()}}class ev extends Zu{decoder(){return new Gu}accept(){return"application/jsonl, application/x-ndjson"}}class tv extends Zu{decoder(){return new Hb}accept(){return"text/event-stream"}}class nv{constructor(t){this.options=t}options;socket;generation=0;start(t,n){const r=++this.generation,o=()=>r===this.generation,i=this.options.WebSocket??WebSocket;n("connecting");const s=new i(this.options.url,this.options.protocols);this.socket=s,s.onopen=()=>o()&&n("open"),s.onmessage=a=>{o()&&typeof a.data=="string"&&Yu(a.data).messages.forEach(t)},s.onerror=()=>o()&&n("error","websocket error"),s.onclose=()=>{if(!o())return;n("closed");const a=this.options.reconnectMs??2e3;a&&setTimeout(()=>o()&&this.start(t,n),a)}}send(t){this.socket?.readyState===1&&this.socket.send(JSON.stringify(t))}close(){this.generation+=1,this.socket?.close()}}const rv="@layer xui-base, xui-recipe, xui-node, xui-part;",ov=new Set(["flexGrow","flexShrink","opacity","fontWeight","aspectRatio","zIndex"]),Ju=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function iv(e){const t=Kt(e);if(!t)return null;const{group:n,name:r}=t;return n==="type.family"?`--xui-font-${r}`:`--xui-${n.replace(/\./g,"-")}-${r}`}function vn(e){const t=iv(e);return t?`var(${t})`:null}function $l(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Qu(e,t){const n=t[e]?.fallback;return n?`${$l(e)}, ${n}`:$l(e)}function ho(e,t,n={}){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"&&t.startsWith("var(--xd-"))return t;if(typeof t=="string"&&t.startsWith("$")){const r=vn(t);if(r)return r}return e==="boxShadow"?Array.isArray(t)?Ru(t):String(t):e==="fontFamily"?Qu(String(t),n):e==="gridTemplateAreas"&&Array.isArray(t)?t.map(r=>`"${r}"`).join(" "):e==="backgroundGradient"?sv(t):e==="transitionEasing"?Array.isArray(t)?Nu(t):String(t):e==="transition"?typeof t=="number"?`${t}ms`:String(t):typeof t=="object"?null:typeof t=="number"?ov.has(e)?String(t):`${t}px`:(e==="overflow"||e==="overflowX"||e==="overflowY")&&t==="hidden"?"clip":String(t)}function sv(e){if(typeof e!="object"||e===null)return null;const t=e;if(!Array.isArray(t.stops)||t.stops.length<2)return null;const n=t.stops.map(r=>`${typeof r.color=="string"&&r.color.startsWith("$")?vn(r.color)??r.color:String(r.color)} ${Math.round(Number(r.offset??0)*1e4)/100}%`);return`linear-gradient(${Number(t.angle??180)}deg, ${n.join(", ")})`}const av={paddingHorizontal:["padding-left","padding-right"],paddingVertical:["padding-top","padding-bottom"],marginHorizontal:["margin-left","margin-right"],marginVertical:["margin-top","margin-bottom"],backgroundGradient:["background-image"],transition:["transition-property:all","transition-duration"],transitionEasing:["transition-timing-function"]},lv=["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"];function go(e,t={},n){const r=[],o="animation"in e?e.animation:n?.animation,i=typeof o=="string"&&gm(o)&&("animation"in e||"opacity"in e);for(const[s,a]of Object.entries(e)){if(s==="native"||s.startsWith("@")||s.startsWith(":")||typeof a=="object"&&a!==null&&!Array.isArray(a)&&s!=="backgroundGradient")continue;if(s==="backdropBlur"){const c=ho(s,a,t);c&&r.push(["-webkit-backdrop-filter",`blur(${c})`],["backdrop-filter",`blur(${c})`]);continue}if(s==="animation"){r.push(...cv(a,e.animationDuration));continue}if(s==="animationDuration"){const c=typeof a=="string"?vn(a):null;c&&!("animation"in e)&&r.push(["animation-duration",`calc(${c} * var(--xui-anim-factor, 1))`]);continue}const l=ho(s,a,t);if(l!==null)for(const c of av[s]??[Ju(s)]){const u=c.indexOf(":");u>0?r.push([c.slice(0,u),c.slice(u+1)]):r.push([c,l])}}if(i){const s=r.findIndex(([u])=>u==="opacity"),a="opacity"in e?e:n&&"opacity"in n?n:null,l=s>=0?r[s][1]:a?ho("opacity",a.opacity,t):null,c=l===null?"var(--xui-a-opacity, 1)":`calc(${l} * var(--xui-a-opacity, 1))`;s>=0?r[s]=["opacity",c]:r.push(["opacity",c])}return!("borderStyle"in e)&&lv.some(s=>s in e)&&r.push(["border-style","solid"]),r}function cv(e,t){const n=typeof e=="string"?Lr[e]:void 0;if(!n)return[["animation-name","none"]];const r=typeof t=="string"&&Kt(t)?.group==="motion"?t:n.duration,o=n.easing==="linear"?"linear":vn(n.easing)??"linear";return[["--xui-anim-factor",String(n.factor)],["animation-name",`xui-${e}`],["animation-duration",`calc(${vn(r)??"0ms"} * ${n.factor})`],["animation-timing-function",o],["animation-iteration-count",n.iterations==="infinite"?"infinite":String(n.iterations)],["animation-fill-mode","both"]]}function mo(e,t){if(t.animation!=="shimmer")return"";const n=Lr.shimmer?.band,r=(n&&vn(n.color))??"var(--xui-color-background)",o=(n?.stops??[{offset:0,alpha:0},{offset:.5,alpha:.5},{offset:1,alpha:0}]).map(s=>`color-mix(in srgb, ${r} ${Math.round(s.alpha*100)}%, transparent) calc(var(--xui-band, 1) * 100% + ${Math.round(s.offset*100)}%)`);return`${e.split(",").map(s=>`${s}::after`).join(",")}{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background-image:linear-gradient(90deg, ${o.join(", ")})}`}const hn=(e,t)=>t.length===0?"":`${e}{${t.map(([n,r])=>`${n}:${r}`).join(";")}}`,uv={hover:[":hover",'[data-xs~="hover"]'],pressed:[":active",'[data-xs~="pressed"]'],focus:[":focus-visible",'[data-xs~="focus"]'],disabled:[":disabled","[data-disabled]",'[aria-disabled="true"]','[data-xs~="disabled"]'],checked:['[data-state="checked"]','[data-xs~="checked"]'],open:['[data-state="open"]','[data-xs~="open"]'],selected:['[data-state="active"]','[data-state="on"]',"[data-highlighted]",'[data-xs~="selected"]'],invalid:['[aria-invalid="true"]','[data-xs~="invalid"]'],dragover:["[data-dragover]",'[data-xs~="dragover"]']};function dv(e){let t=[""];for(const n of e){const r=uv[n]??[`[data-xs~="${n}"]`];t=t.flatMap(o=>r.map(i=>o+i))}return t}const Ar=(e,t)=>`data-${e?"m":"r"}-${Ju(t)}`;function fv(e,t){if(!e)return[""];let n=[""];for(const[r,o]of Object.entries(e)){if(r==="state")continue;const i=Array.isArray(o)?o:[o];n=n.flatMap(s=>i.map(a=>`${s}[${Ar(t,r)}="${String(a)}"]`))}return n}function pv(e,t,n=!1){const r=t.when?.state===void 0?[]:Array.isArray(t.when.state)?t.when.state.map(String):[String(t.when.state)],o=fv(t.when,n),i=dv(r);return o.flatMap(s=>i.map(a=>`${e}${s}${a}`))}function hv(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function gv(e){return`xui-t-${e.id.replace(/[^a-z0-9-]/gi,"-")}-${hv(JSON.stringify(e))}`}const mv=[["--background","background"],["--foreground","foreground"],["--card","card"],["--card-foreground","cardForeground"],["--popover","popover"],["--popover-foreground","popoverForeground"],["--primary","primary"],["--primary-foreground","primaryForeground"],["--secondary","secondary"],["--secondary-foreground","secondaryForeground"],["--muted","muted"],["--muted-foreground","mutedForeground"],["--accent","accent"],["--accent-foreground","accentForeground"],["--destructive","destructive"],["--destructive-foreground","destructiveForeground"],["--success","success"],["--success-foreground","successForeground"],["--warning","warning"],["--warning-foreground","warningForeground"],["--info","info"],["--info-foreground","infoForeground"],["--border","border"],["--input","input"],["--ring","ring"],["--chart-1","chart1"],["--chart-2","chart2"],["--chart-3","chart3"],["--chart-4","chart4"],["--chart-5","chart5"],["--chart-6","chart6"],["--chart-7","chart7"],["--chart-8","chart8"],["--sidebar","background"],["--sidebar-foreground","foreground"],["--sidebar-primary","primary"],["--sidebar-primary-foreground","primaryForeground"],["--sidebar-accent","accent"],["--sidebar-accent-foreground","accentForeground"],["--sidebar-border","border"],["--sidebar-ring","ring"],["--glass-fill-section","muted"],["--glass-fill-row","muted"],["--glass-fill-card","card"],["--glass-fill-panel","popover"],["--glass-fill-active","accent"],["--glass-stroke-row","border"],["--glass-stroke-section","border"],["--glass-stroke-card","border"],["--glass-stroke-strong","input"],["--glass-stroke-active","ring"],["--glass-background-top","background"],["--glass-background-bottom","background"]];function yv(e){const t=[],n=e.tokens;for(const r of["spacing","radius","control","opacity","border","motion"])for(const[o,i]of Object.entries(n[r]??{})){const s=r==="opacity"?"":r==="motion"?"ms":"px";t.push([`--xui-${r}-${o}`,`${i}${s}`])}for(const[r,o]of Object.entries(e.tokens.blur??{}))t.push([`--xui-blur-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.scale??{}))t.push([`--xui-scale-${r}`,String(o)]);for(const[r,o]of Object.entries(e.tokens.ease??{}))t.push([`--xui-ease-${r}`,Nu(o)]);for(const[r,o]of Object.entries(e.tokens.breakpoint??{}))t.push([`--xui-breakpoint-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.size))t.push([`--xui-type-size-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.lineHeight))t.push([`--xui-type-lineHeight-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.weight))t.push([`--xui-type-weight-${r}`,String(o)]);for(const[r,o]of Object.entries(e.tokens.type.family))t.push([`--xui-font-${r}`,Qu(o,e.fonts)]);return t.push(["--radius","var(--xui-radius-lg)"],["--font-sans","var(--xui-font-sans)"],["--font-mono","var(--xui-font-mono)"]),t.push(["--xui-duration-fast","var(--xui-motion-fast)"],["--xui-duration-standard","var(--xui-motion-standard)"]),t.map(([r,o])=>`${r}:${o}`).join(";")}function wl(e,t){const n=[];for(const[r,o]of Object.entries(e.modes[t].color))n.push([`--xui-color-${r}`,o]);for(const[r,o]of Object.entries(e.modes[t].shadow))n.push([`--xui-shadow-${r}`,Ru(o)]);for(const[r,o]of mv)n.push([r,`var(--xui-color-${o})`]);return n.push(["color-scheme",t]),n.map(([r,o])=>`${r}:${o}`).join(";")}const bv=new Set(Object.entries(Qe.components).filter(([,e])=>e.kind==="macro").map(([e])=>e));function ed(e,t=new Set){return bv.has(e)||t.has(e)}const xn=(e,t)=>`xui-${e}-${t}`;function kl(e,t={}){const n=gv(e),r=`.xui-surface.${n}`,o=[rv];o.push(`${r}{${yv(e)}}`),o.push(`${r}[data-xui-mode="light"]{${wl(e,"light")}}`),o.push(`${r}[data-xui-mode="dark"]{${wl(e,"dark")}}`);const i=[],s=[];for(const[a,l]of Object.entries(e.recipes)){const c=ed(a,t.extensionMacros),u=c?s:i;for(const[d,f]of Object.entries(l)){const g=`.${n}.${xn(a,d)}`;for(const p of f){const v=go(p.style,e.fonts);if(v.length===0)continue;const m=pv(g,p,c).join(",");u.push(hn(m,v)+mo(m,p.style))}}}return o.push(`@layer xui-recipe{${i.join("")}}`),o.push(`@layer xui-part{${s.join("")}}`),{scope:n,css:o.join(`
21
+ `),theme:e}}const Sl=new WeakMap;function vv(e,t){if(t?.extensionMacros&&t.extensionMacros.size>0)return kl(e,t);let n=Sl.get(e);return n||(n=kl(e),Sl.set(e,n)),n}function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.path=="string"&&Object.keys(e).length===1}function Zs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.call=="string"}const xv=e=>e.replace(/~1/g,"/").replace(/~0/g,"~");function $v(e){return e===""||e==="/"?[]:(e.startsWith("/")?e.slice(1):e).split("/").map(xv)}function er(e,t=""){return e.startsWith("/")?e:t?e===""?t:`${t}/${e}`:`/${e}`}function Wr(e,t){let n=e;for(const r of $v(t)){if(n===null||typeof n!="object")return;Array.isArray(n)?n=/^[0-9]+$/.test(r)?n[Number(r)]:void 0:n=Object.prototype.hasOwnProperty.call(n,r)?n[r]:void 0}return n}function $n(e,t,n){return js(e,t,n).data}const Do="/$xuiRows";function wv(e){return e===void 0||e===Do||e.startsWith(`${Do}/`)?void 0:e}const lr=e=>typeof e=="number"?e:Number(e);function kv(e,t){return e.replace(/\$\{([^}]+)\}/g,(n,r)=>zr(Wr(t.data,er(r.trim(),t.scope))))}function td(e,t=4096){const n=new Map,r=(i,s)=>{const a=n.get(i);if(a!==void 0)return a;const l=s();return n.size>=t&&n.clear(),n.set(i,l),l},o=i=>i instanceof Date?`t${i.getTime()}`:typeof i=="string"?`s${i}`:`${typeof i}${String(i)}`;return{locale:e.locale,number:(i,s)=>r(`n|${i}|${s?.decimals}|${s?.grouping}`,()=>e.number(i,s)),currency:(i,s,a)=>r(`c|${s}|${i}|${a?.decimals}|${a?.grouping}`,()=>e.currency(i,s,a)),percent:(i,s)=>r(`p|${i}|${s?.decimals}`,()=>e.percent(i,s)),date:(i,s)=>r(`d|${s?.format}|${s?.style}|${s?.time}|${o(i)}`,()=>e.date(i,s)),relativeTime:(i,s)=>e.relativeTime(i,s),plural:i=>r(`l|${i}`,()=>e.plural(i))}}const Cl=new Map;function Sv(e){if(e.formatter)return e.formatter;const t=e.locale??ku;let n=Cl.get(t);return n||Cl.set(t,n=td(tu(t,"UTC"))),n}const Al=new WeakMap;function Cv(e){return(t,n)=>{const r=Sv(n);let o=Al.get(r);return(!o||o.now!==n.now)&&Al.set(r,o={now:n.now,table:ru(r,n.now)}),o.table[e](t)}}const Av=Object.fromEntries(nu.map(e=>[e,Cv(e)])),Tv=Object.fromEntries(Object.entries(Gh).map(([e,t])=>[e,n=>t(n)])),nd={required:({value:e})=>Et(e)&&!(Array.isArray(e)&&e.length===0),regex:({value:e,pattern:t})=>{try{return new RegExp(String(t)).test(String(e??""))}catch{return!1}},length:({value:e,min:t,max:n})=>{const r=String(e??"").length;return(t===void 0||r>=lr(t))&&(n===void 0||r<=lr(n))},numeric:({value:e,min:t,max:n})=>{const r=lr(e);return Number.isFinite(r)&&(t===void 0||r>=lr(t))&&(n===void 0||r<=lr(n))},email:({value:e})=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e??"")),formatString:({value:e},t)=>kv(String(e??""),t),openUrl:({url:e},t)=>{typeof e=="string"&&t.openUrl?.(e)},and:({values:e})=>Array.isArray(e)?e.every(Et):!1,or:({values:e})=>Array.isArray(e)?e.some(Et):!1,not:({value:e})=>!Et(e),...Tv,...Av};function $t(e,t){if(Hr(e))return Wr(t.data,er(e.path,t.scope));if(Zs(e)){const n=t.functions?.[e.call]??nd[e.call];if(!n)return;const r={};for(const[o,i]of Object.entries(e.args??{}))r[o]=$t(i,t);return n(r,t)}if(typeof e=="string")return t.strings&&e.startsWith("$string.")?Sh(e,t.strings):e;if(Array.isArray(e))return e.map(n=>$t(n,t));if(typeof e=="object"&&e!==null){const n={};for(const[r,o]of Object.entries(e))n[r]=$t(o,t);return n}return e}function Iv(e){return Fr(e)}const Ev=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function hs(e,t,n,r){if(Hr(e)||Zs(e))return $t(e,n);if(Bs(t))return e;if(t?.type==="array"&&t.items&&Array.isArray(e))return e.map(i=>hs(i,t.items,n,r));const o=t?.type==="object"&&t.shape?r[t.shape]:void 0;if(o&&Ev(e)){const i={};for(const[s,a]of Object.entries(e))i[s]=hs(a,o.properties[s],n,r);return i}return $t(e,n)}function _v(e,t,n,r){const o=Iv(r),i=o.components[e],s={};for(const[a,l]of Object.entries(t)){const c=hs(l,i?.props[a],n,o.defs);c!==void 0&&(s[a]=c)}return s}function Tr(e,t,n=""){const r=e[t];return Hr(r)?er(r.path,n):void 0}function Dv(e,t){return e===void 0?!0:Et($t(e,t))}function gs(e){return Hr(e)||Zs(e)?!0:Array.isArray(e)?e.some(gs):typeof e=="object"&&e!==null?Object.values(e).some(gs):!1}function Pv(e,t){if(!e||typeof e!="object")return null;const n={};for(const[r,o]of Object.entries($t(e,t)))o!==void 0&&(n[r]=o);return Object.keys(n).length?n:null}function Ov(e){const t={};if(!e)return t;const n=e.role;n==="hidden"?t["aria-hidden"]="true":typeof n=="string"&&n!=="text"&&n!==""&&(t.role=n),e.label!==void 0&&e.label!==null&&e.label!==""&&(t["aria-label"]=String(e.label)),e.description!==void 0&&e.description!==null&&e.description!==""&&(t["aria-description"]=String(e.description)),(typeof e.level=="number"||typeof e.level=="string"&&e.level!=="")&&(t["aria-level"]=String(e.level));for(const[r,o]of[["expanded","aria-expanded"],["selected","aria-selected"],["pressed","aria-pressed"],["checked","aria-checked"]]){const i=e[r];(typeof i=="boolean"||i==="mixed")&&(t[o]=String(i))}e.current!==void 0&&e.current!==null&&e.current!==!1&&e.current!==""&&(t["aria-current"]=e.current===!0?"true":String(e.current));for(const[r,o]of[["valueNow","aria-valuenow"],["valueMin","aria-valuemin"],["valueMax","aria-valuemax"]]){const i=e[r];typeof i=="number"&&Number.isFinite(i)&&(t[o]=String(i))}return e.hidden===!0&&(t["aria-hidden"]="true"),e.autoFocus===!0&&(t["data-xui-autofocus"]=""),t}const Qo=e=>`xui-n-${Js(e)}`,ms=e=>`xui-s-${Js(e)}`;function Js(e){return e.replace(/[^a-zA-Z0-9_-]/g,t=>`_${t.charCodeAt(0).toString(16)}_`)}function*Po(e){yield e;for(const t of Object.values(e.slots??{}))yield*Po(t);for(const t of e.children)yield*Po(t)}function rd(e){const t=[];if(!e)return t;const n=(r,o)=>{for(const[i,s]of Object.entries(o))i.startsWith("@")||i.startsWith(":")||gs(s)&&t.push({name:`--xd-${t.length}`,block:r,key:i,value:s})};n("",e);for(const[r,o]of Object.entries(e))(r.startsWith("@")||r.startsWith(":"))&&typeof o=="object"&&o!==null&&n(r,o);return t}function Oo(e){return Js(e.replace(/^@media \(|\)$/g,"").replace(/: /,"-"))}function od(e,t){const n=Fs(e);if(!n)return null;if(n.feature==="orientation"||n.feature==="hover"||n.feature==="prefers-reduced-motion")return e;const r=bs(n.value,t);return r===null?null:`@media (${n.feature}: ${r}px)`}const ys=e=>e==="ltr"||e==="rtl";function Mv(e,t,n){if(!e)return;let r=ys(e.direction)?e.direction:void 0;for(const[o,i]of Object.entries(e)){if(!o.startsWith("@")||typeof i!="object"||i===null)continue;const s=i.direction;if(!ys(s))continue;const a=od(o,t);a&&n(a)&&(r=s)}return r}function bs(e,t){const n=Kt(e);if(n){if(n.group!=="breakpoint")return null;const o=t?.tokens.breakpoint?.[n.name];return typeof o=="number"?o:null}const r=parseFloat(e);return Number.isFinite(r)?r:null}const Tl=new WeakMap;function Fv(e,t,n,r,o){const i=Tl.get(e);if(i&&i.scope===n&&i.theme===r&&i.fonts===o)return i.chunk;const s=[],a=new Set,l=rd(t),c=(m,b)=>{const y=l.filter(k=>k.block===m);if(y.length===0)return b;const h={...b};for(const k of y)h[k.key]=`var(${k.name})`;return h},u=Qo(e.id),d=`${n} .${u}`,f=c("",t),g=go(f,o);g.length&&s.push(hn(d,g)+mo(d,t));for(const[m,b]of Object.entries(t)){if(!m.startsWith("@")||typeof b!="object"||b===null)continue;const y=go(c(m,b),o,f);if(y.length===0)continue;const h=Fs(m);if(!h)continue;if(ys(b.direction)){const w=od(m,r);w&&a.add(w)}const k=w=>mo(w,b);switch(h.feature){case"min-width":case"max-width":{const _=bs(h.value,r);if(_===null)break;const A=h.feature==="min-width"?">=":"<";s.push(`@container xui (width ${A} ${_}px){${hn(d,y)}${k(d)}}`);break}case"min-height":case"max-height":{const _=bs(h.value,r);if(_===null)break;const A=`@media (${h.feature}: ${_}px)`;a.add(A);const S=`${n}:where([data-xq~="${Oo(A)}"]) .${u}`;s.push(hn(S,y)+k(S));break}case"orientation":a.add(m);const w=`${n}:where([data-xq~="${Oo(m)}"]) .${u}`;s.push(hn(w,y)+k(w));break;case"hover":case"prefers-reduced-motion":s.push(`@media (${h.feature}: ${h.value}){${hn(d,y)}${k(d)}}`);break}}const p=[[":hover",`${d}:hover,${d}[data-xs~="hover"]`],[":focus-visible",`${d}:focus-visible,${d}[data-xs~="focus-visible"]`],[":pressed",`${d}:active,${d}[data-xs~="pressed"]`]];for(const[m,b]of p){const y=t[m];if(typeof y!="object"||y===null)continue;const h=go(c(m,y),o,f);h.length&&s.push(hn(b,h)+mo(b,y))}const v={css:s.join(""),queries:[...a]};return Tl.set(e,{scope:n,theme:r,fonts:o,chunk:v}),v}function zv(e,t,n,r=n?.fonts??{}){const o=`.${ms(t)}`,i=new Map,s=new Set,a=new Set;for(const l of e)for(const c of Po(l)){const u=c.style;if(!u||a.has(c.id))continue;a.add(c.id);const d=Fv(c,u,o,n,r);d.css&&i.set(c.id,d.css);for(const f of d.queries)s.add(f)}return{css:`@layer xui-node{${[...i.values()].join("")}}`,queries:[...s],chunks:i}}const _i=e=>({chunks:e,css:`@layer xui-node{${[...e.values()].join("")}}`});function Rv(e,t){const n=[],r=new Set;for(const i of e){let s=!1;for(const[l,c]of i.chunks)r.add(l),t.get(l)!==c&&(s=!0);if(!s){n.push(i);continue}const a=new Map;for(const l of i.chunks.keys()){const c=t.get(l);c!==void 0&&a.set(l,c)}a.size&&n.push(_i(a))}const o=new Map;for(const[i,s]of t)r.has(i)||o.set(i,s);for(o.size&&n.push(_i(o));n.length>1&&n[n.length-1].chunks.size>=n[n.length-2].chunks.size;){const i=n.pop(),s=n.pop();n.push(_i(new Map([...s.chunks,...i.chunks])))}return n}const un=Dm,Nv=`@keyframes xui-shimmer{from{background-position:100% 0}to{background-position:0 0}}
22
+ [data-xui-shimmer]{--_spread:${un.spreadPx}px;--_base:currentColor;--_highlight:oklch(from currentColor l c h / calc(alpha * ${un.lightAlphaFactor}));background-image:linear-gradient(calc(90deg + ${un.angleDeg}deg),var(--_base) calc(50% - var(--_spread)),color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% - var(--_spread) * .5),var(--_highlight) 50%,color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% + var(--_spread) * .5),var(--_base) calc(50% + var(--_spread)));background-repeat:no-repeat;background-size:calc(200% + var(--_spread) * 2) 100%;background-position:0 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:xui-shimmer ${un.durationMs}ms linear infinite}
23
+ [data-xui-mode="dark"] [data-xui-shimmer]{--_highlight:oklch(from currentColor min(1, max(${un.highlightLightnessMin}, calc(l + ${un.highlightLightnessBoost}))) c h / min(1, calc(alpha + ${un.highlightAlphaBoost})))}
24
+ [dir="rtl"] [data-xui-shimmer]{animation-direction:reverse}`,Il=`.xui-surface [data-xui-shimmer]{animation:none !important;background-image:none !important;-webkit-text-fill-color:currentColor !important}.xui-surface [data-xui-c="Button"].xui-el:active{scale:none !important}.xui-surface [data-xui-c="Skeleton"].xui-el:not([data-rows]),.xui-surface .xui-Skeleton-dot,.xui-surface .xui-Skeleton-bar{animation:none !important;opacity:${Zg} !important}`,Lv=`${fm.map(mm).join(`
25
+ `)}
26
+ :is(${$m.map(e=>`svg[data-icon="${e}"]`).join(",")}):dir(rtl){scale:-1 1}`,jv=`${hm}
27
+ @layer xui-base{
28
+ ${Lv}
29
+ .xui-surface{display:block;position:relative;font-family:var(--xui-font-sans);color:var(--xui-color-foreground);font-size:var(--xui-type-size-sm);line-height:var(--xui-type-lineHeight-sm);-webkit-font-smoothing:antialiased}
30
+ .xui-surface *{box-sizing:border-box}
31
+ .xui-container{container-type:inline-size;container-name:xui;width:100%;position:relative}
32
+ :where([data-xui-part]){border:0 solid transparent}
33
+ .xui-el{box-sizing:border-box;display:flex;flex-direction:row;position:relative;margin:0;padding:0;border:0 solid transparent;min-width:auto;min-height:auto;font:inherit;color:inherit;background:transparent;text-align:start;text-decoration:none;outline:none;appearance:none;-webkit-appearance:none}
34
+ button:where([data-xui-part],.xui-calendar-nav,.xui-table-sort,.xui-carousel-nav){margin:0;padding:0;border:0 solid transparent;background:transparent;color:inherit;font:inherit;appearance:none;-webkit-appearance:none}
35
+ .xui-el:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
36
+ .xui-leaf{flex-direction:column}
37
+ .xui-leaf>.xui-measured{flex-shrink:0}
38
+ [data-xui-c="Text"].xui-el{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
39
+ [data-xui-c="Text"][data-lines="1"].xui-el{white-space:nowrap;overflow:clip;text-overflow:ellipsis;min-width:0}
40
+ [data-xui-c="Text"][data-clamp].xui-el{display:-webkit-box;-webkit-box-orient:vertical;overflow:clip}
41
+ [data-xui-c="Text"][data-xui-align="start"].xui-el{text-align:start}
42
+ [data-xui-c="Text"][data-xui-align="center"].xui-el{text-align:center}
43
+ [data-xui-c="Text"][data-xui-align="end"].xui-el{text-align:end}
44
+ [data-xui-c="Button"].xui-el,[data-xui-c="Toggle"].xui-el,[data-xui-c="Link"].xui-el{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;cursor:pointer;user-select:none;flex-shrink:0;transition:background-color var(--xui-motion-fast) var(--xui-ease-standard,ease),color var(--xui-motion-fast) var(--xui-ease-standard,ease),opacity var(--xui-motion-fast) var(--xui-ease-standard,ease),border-color var(--xui-motion-fast) var(--xui-ease-standard,ease),scale var(--xui-motion-fast) var(--xui-ease-standard,ease)}
45
+ [data-xui-c="Button"].xui-el:disabled,[data-xui-c="Toggle"].xui-el:disabled{cursor:default;pointer-events:none}
46
+ [data-xui-c="Link"].xui-el{text-decoration:underline;text-underline-offset:3px}
47
+ .xui-Button-icon,.xui-Button-spinner,.xui-Toggle-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
48
+ .xui-Button-icon>svg,.xui-Toggle-icon>svg,.xui-Button-spinner>svg,.xui-icon>svg{width:100%;height:100%}
49
+ .xui-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
50
+ [data-xui-c="Icon"].xui-el{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
51
+ [data-xui-c="Icon"].xui-el>svg{width:100%;height:100%}
52
+ [data-xui-c="Image"].xui-el{overflow:clip}
53
+ [data-xui-c="Image"].xui-el>img{display:block;position:absolute;inset:0;width:100%;height:100%}
54
+ .xui-image-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:24px;background:repeating-linear-gradient(45deg,color-mix(in srgb,currentColor 12%,transparent) 0 6px,color-mix(in srgb,currentColor 4%,transparent) 6px 12px);color:var(--xui-color-mutedForeground);font-size:var(--xui-type-size-xs)}
55
+ [data-xui-c="Video"].xui-el{overflow:clip}
56
+ .xui-media-sizer{display:block;max-width:100%;height:0;flex:0 1 auto;visibility:hidden;pointer-events:none}
57
+ [data-xui-c="Video"].xui-el>video{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
58
+ [data-xui-c="AudioPlayer"].xui-el>audio{width:100%;display:block;flex-shrink:0}
59
+ [data-xui-c="Avatar"].xui-el{overflow:clip;flex-shrink:0;align-items:center;justify-content:center}
60
+ .xui-Avatar-image{width:100%;height:100%;object-fit:cover;border-radius:inherit}
61
+ .xui-Avatar-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:inherit;text-transform:uppercase;user-select:none}
62
+ [data-xui-c="List"].xui-el{flex-direction:column;overflow:auto;min-height:0}
63
+ [data-xui-c="List"][data-r-direction="horizontal"].xui-el{flex-direction:row}
64
+ .xui-List-divider{flex-shrink:0;align-self:stretch;border-style:solid;border-width:0}
65
+ .xui-list-window{position:relative;width:100%;flex-shrink:0}
66
+ .xui-list-window[data-axis="horizontal"]{width:auto;align-self:flex-start}
67
+ .xui-list-item{position:absolute;left:0;right:0}
68
+ .xui-list-window[data-axis="horizontal"]>.xui-list-item{left:auto;right:auto;top:0}
69
+ .xui-list-row{display:flex;flex-direction:column;position:relative}
70
+ .xui-list-row[data-axis="horizontal"]{flex-direction:row}
71
+ .xui-list-gap{position:absolute;display:flex;pointer-events:none}
72
+ .xui-list-gap[data-axis="vertical"]{left:0;right:0;flex-direction:column;transform:translateY(-50%)}
73
+ .xui-list-gap[data-axis="horizontal"]{top:0;bottom:0;flex-direction:row;transform:translateX(-50%)}
74
+ .xui-list-gap[data-axis="horizontal"]:dir(rtl){transform:translateX(50%)}
75
+ .xui-List-section{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
76
+ [data-xui-c="Resizable"].xui-el{flex-direction:row;align-items:stretch;min-width:0;min-height:0}
77
+ [data-xui-c="Resizable"][data-orientation="vertical"].xui-el{flex-direction:column}
78
+ .xui-Resizable-panel{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:clip}
79
+ .xui-Resizable-handle{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 var(--xui-control-hairline);min-width:0;min-height:0;touch-action:none;user-select:none;outline:none;z-index:1}
80
+ [data-orientation="horizontal"]>.xui-Resizable-handle{cursor:col-resize}
81
+ [data-orientation="vertical"]>.xui-Resizable-handle{cursor:row-resize}
82
+ .xui-Resizable-handle:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
83
+ .xui-resize-hit{position:absolute}
84
+ [data-orientation="horizontal"]>.xui-Resizable-handle>.xui-resize-hit{top:0;bottom:0;left:50%;transform:translateX(-50%)}
85
+ [data-orientation="vertical"]>.xui-Resizable-handle>.xui-resize-hit{left:0;right:0;top:50%;transform:translateY(-50%)}
86
+ .xui-Resizable-grip{flex:none;pointer-events:none}
87
+ [data-xui-c="Carousel"].xui-el{flex-direction:column;overflow:clip}
88
+ .xui-carousel-track{display:flex;flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;gap:var(--xui-spacing-sm)}
89
+ .xui-carousel-track::-webkit-scrollbar{display:none}
90
+ .xui-Carousel-page{flex:0 0 100%;scroll-snap-align:start;display:flex;flex-direction:column}
91
+ .xui-carousel-dots{display:flex;justify-content:center;gap:var(--xui-spacing-xs);padding-top:var(--xui-spacing-sm)}
92
+ .xui-Carousel-indicator{width:6px;height:6px;border-radius:9999px;background:var(--xui-color-border);padding:0;cursor:pointer}
93
+ .xui-Carousel-indicator[data-xs~="selected"]{background:var(--xui-color-primary)}
94
+ [data-xui-c="Tabs"].xui-el{flex-direction:column}
95
+ .xui-Tabs-list{display:flex;flex-direction:row;align-self:flex-start;flex-shrink:0}
96
+ .xui-Tabs-list[data-fill="true"]{align-self:stretch}
97
+ .xui-Tabs-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--xui-spacing-xs);cursor:pointer;white-space:nowrap;flex:0 0 auto;position:relative}
98
+ .xui-Tabs-list[data-fill="true"]>.xui-Tabs-tab{flex:1 1 0}
99
+ .xui-Tabs-tab-body{display:inline-flex;align-items:center;gap:var(--xui-spacing-xs)}
100
+ .xui-Tabs-close,.xui-Tabs-new{display:inline-flex;align-items:center;justify-content:center;align-self:center;flex-shrink:0;cursor:pointer;padding:0;border:0}
101
+ .xui-Tabs-close>svg{width:12px;height:12px}
102
+ .xui-Tabs-new>svg{width:16px;height:16px}
103
+ .xui-Tabs-indicator{position:absolute;left:0;right:0;bottom:0}
104
+ .xui-Tabs-content{display:flex;flex-direction:column;outline:none}
105
+ .xui-Tabs-content[hidden]{display:none}
106
+ [data-xui-c="Segmented"].xui-el{display:inline-flex;align-items:center;align-self:flex-start;flex-wrap:nowrap}
107
+ [data-xui-c="Segmented"][data-r-fill="true"].xui-el,[data-xui-c="Segmented"][data-r-variant="bar"].xui-el{align-self:stretch}
108
+ .xui-Segmented-item{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;white-space:nowrap;flex:0 0 auto;min-width:0}
109
+ [data-xui-c="Segmented"][data-r-fill="true"].xui-el>.xui-Segmented-item,[data-xui-c="Segmented"][data-r-variant="bar"].xui-el>.xui-Segmented-item{flex:1 1 0}
110
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el{align-items:stretch;height:var(--xui-control-tabBar);width:100%}
111
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el>.xui-Segmented-item{flex-direction:column;gap:var(--xui-spacing-xxs);padding:var(--xui-spacing-xs) 0}
112
+ [data-xui-c="Segmented"][data-r-variant="bar"].xui-el .xui-Segmented-label{font-size:var(--xui-type-size-xs);line-height:var(--xui-type-lineHeight-xs);white-space:nowrap}
113
+ .xui-Segmented-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
114
+ .xui-Segmented-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
115
+ [data-xui-c="Accordion"].xui-el{flex-direction:column}
116
+ .xui-Accordion-item{display:flex;flex-direction:column}
117
+ .xui-Accordion-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;text-align:start}
118
+ .xui-Accordion-trigger>svg{transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease)}
119
+ .xui-Accordion-trigger[data-state="open"]>svg{transform:rotate(180deg)}
120
+ .xui-Accordion-content{display:flex;flex-direction:column;overflow:clip}
121
+ .xui-Accordion-content[hidden]{display:none}
122
+ .xui-Dialog-overlay,.xui-Drawer-overlay{position:fixed;inset:0;z-index:50}
123
+ .xui-Dialog-content{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:51;display:flex;flex-direction:column;width:calc(100% - 32px);max-width:480px;max-height:calc(100% - 32px);overflow:auto;outline:none}
124
+ .xui-Drawer-content{position:fixed;z-index:51;display:flex;flex-direction:column;overflow:auto;outline:none}
125
+ .xui-Drawer-content[data-side="bottom"]{left:0;right:0;bottom:0;max-height:85%}
126
+ .xui-Drawer-content[data-side="top"]{left:0;right:0;top:0;max-height:85%}
127
+ .xui-Drawer-content[data-side="left"]{left:0;top:0;bottom:0;width:min(85%,360px)}
128
+ .xui-Drawer-content[data-side="right"]{right:0;top:0;bottom:0;width:min(85%,360px)}
129
+ .xui-Drawer-handle{align-self:center;width:36px;height:4px;border-radius:9999px;background:var(--xui-color-border);flex-shrink:0}
130
+ .xui-overlay-head{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs)}
131
+ .xui-overlay-body{display:flex;flex-direction:column;gap:var(--xui-spacing-md);min-height:0}
132
+ .xui-Dialog-footer,.xui-Drawer-footer{display:flex;flex-direction:row;justify-content:flex-end;flex-wrap:wrap}
133
+ .xui-Dialog-close{position:absolute;top:var(--xui-spacing-sm);inset-inline-end:var(--xui-spacing-sm);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
134
+ .xui-Dialog-close>svg{width:16px;height:16px}
135
+ .xui-Popover-content,.xui-Tooltip-content,.xui-Menu-content,.xui-Select-content,.xui-TimePicker-list{z-index:52;display:flex;flex-direction:column;outline:none;max-height:var(--radix-popper-available-height,320px);overflow:auto}
136
+ .xui-Tooltip-content{max-width:280px}
137
+ .xui-Menu-item,.xui-Select-item,.xui-TimePicker-item{display:flex;align-items:center;cursor:pointer;user-select:none;white-space:nowrap;outline:none}
138
+ .xui-Menu-item[data-disabled],.xui-Select-item[data-disabled],.xui-Select-item[aria-disabled="true"]{pointer-events:none}
139
+ .xui-Menu-item>svg,.xui-Select-item>svg{width:16px;height:16px;flex-shrink:0}
140
+ .xui-Menu-separator{align-self:stretch;flex-shrink:0}
141
+ .xui-Menu-label{display:flex;align-items:center}
142
+ .xui-Menu-trigger{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0;cursor:pointer}
143
+ [data-xui-overlay-root].xui-el{flex-direction:row;align-self:auto;align-items:flex-start}
144
+ [data-xui-overlay-root="stretch"].xui-el{align-items:stretch}
145
+ [data-xui-overlay-root="none"].xui-el{display:contents}
146
+ .xui-trigger{display:flex;flex-direction:row;align-items:stretch;flex:1 1 auto;min-width:0}
147
+ .xui-Tooltip-anchor{display:flex;flex-direction:row;flex:1 1 auto;min-width:0}
148
+ .xui-field-column{display:flex;flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
149
+ .xui-field-row{display:flex;flex-direction:row;align-items:flex-start;gap:var(--xui-spacing-sm);min-width:0}
150
+ .xui-field-text{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs);min-width:0}
151
+ [data-xui-c="Input"].xui-el,[data-xui-c="Textarea"].xui-el,[data-xui-c="Select"].xui-el,[data-xui-c="DatePicker"].xui-el,[data-xui-c="DateRangePicker"].xui-el,[data-xui-c="TimePicker"].xui-el,[data-xui-c="NumberField"].xui-el,[data-xui-c="ChipInput"].xui-el,[data-xui-c="FileUpload"].xui-el,[data-xui-c="Slider"].xui-el,[data-xui-c="Radio"].xui-el,[data-xui-c="Composer"].xui-el{flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
152
+ [data-xui-c="Checkbox"].xui-el{flex-direction:row;align-items:flex-start;gap:var(--xui-spacing-sm);cursor:pointer}
153
+ [data-xui-c="Checkbox"].xui-el>.xui-field-text{flex:1 1 0%}
154
+ .xui-Checkbox-box{margin-top:max(0px,calc((var(--xui-type-lineHeight-sm) - var(--xui-control-checkbox)) / 2))}
155
+ [data-xui-c="Switch"].xui-el{flex-direction:row;align-items:center;cursor:pointer}
156
+ .xui-Switch-body{display:flex;flex-direction:column;gap:var(--xui-spacing-xxs);flex:1 1 0%;min-width:0}
157
+ .xui-Input-field,.xui-Textarea-field{display:block;width:100%;min-width:0;margin:0;outline:none;appearance:none;border:0 solid transparent;background:transparent;color:inherit;font:inherit}
158
+ .xui-Input-field::placeholder,.xui-Textarea-field::placeholder,.xui-Composer-field::placeholder{color:var(--xui-color-mutedForeground)}
159
+ .xui-Textarea-field{resize:vertical;line-height:var(--xui-type-lineHeight-sm);padding-top:var(--xui-spacing-sm);padding-bottom:var(--xui-spacing-sm)}
160
+ .xui-Input-label,.xui-Textarea-label,.xui-Select-label,.xui-DatePicker-label,.xui-DateRangePicker-label,.xui-TimePicker-label,.xui-NumberField-label,.xui-ChipInput-label,.xui-FileUpload-label,.xui-Slider-label,.xui-Radio-label,.xui-Checkbox-label,.xui-Switch-label{display:block;cursor:inherit}
161
+ .xui-Select-trigger,.xui-DatePicker-trigger,.xui-DateRangePicker-trigger,.xui-TimePicker-trigger{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--xui-spacing-sm);width:100%;min-width:0;cursor:pointer;text-align:start;white-space:nowrap}
162
+ .xui-Select-trigger>span,.xui-DatePicker-trigger>span,.xui-DateRangePicker-trigger>span,.xui-TimePicker-trigger>span{overflow:clip;text-overflow:ellipsis;min-width:0;flex:1 1 auto}
163
+ .xui-Select-trigger>svg,.xui-DatePicker-trigger>svg,.xui-DateRangePicker-trigger>svg,.xui-TimePicker-trigger>svg{width:16px;height:16px;flex-shrink:0;opacity:.6}
164
+ .xui-Select-search{display:flex;width:100%;min-width:0;margin:0 0 var(--xui-spacing-xs);padding:var(--xui-spacing-xs) var(--xui-spacing-sm);outline:none;border:0;border-bottom:1px solid var(--xui-color-border);background:transparent;color:inherit;font:inherit}
165
+ .xui-Select-check{display:inline-flex;margin-inline-start:auto;flex-shrink:0}
166
+ .xui-Checkbox-box{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
167
+ .xui-Checkbox-check{display:inline-flex;align-items:center;justify-content:center}
168
+ .xui-Checkbox-check>svg{width:100%;height:100%}
169
+ [data-xui-c="Radio"][data-r-orientation="horizontal"].xui-el>.xui-radio-items{flex-direction:row;flex-wrap:wrap}
170
+ .xui-radio-items{display:flex;flex-direction:column;gap:inherit}
171
+ .xui-radio-row{display:flex;align-items:center;gap:var(--xui-spacing-sm);cursor:pointer}
172
+ .xui-Radio-item{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
173
+ .xui-ChoiceTiles-tile{display:flex;flex-direction:column;align-items:stretch;min-width:0;margin:0;font:inherit;color:inherit;text-align:start;appearance:none;-webkit-appearance:none;cursor:pointer;outline:none}
174
+ .xui-ChoiceTiles-tile:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:1px}
175
+ .xui-ChoiceTiles-tile:disabled{cursor:not-allowed}
176
+ .xui-ChoiceTiles-picture{position:relative;display:flex;align-items:center;justify-content:center;align-self:stretch;aspect-ratio:1.6;flex-shrink:0;min-width:0;overflow:clip;color:var(--xui-color-mutedForeground)}
177
+ .xui-ChoiceTiles-picture>img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
178
+ .xui-ChoiceTiles-picture>svg{width:var(--xui-control-iconMd);height:var(--xui-control-iconMd);opacity:.6}
179
+ .xui-ChoiceTiles-label,.xui-ChoiceTiles-description{display:block;min-width:0;overflow-wrap:anywhere;white-space:pre-wrap}
180
+ .xui-ChoiceTiles-error{grid-column:1/-1;display:flex;flex-direction:column;gap:2px}
181
+ .xui-Switch-track{display:inline-flex;align-items:center;flex-shrink:0;padding:2px;cursor:pointer;transition:background-color var(--xui-motion-fast) var(--xui-ease-standard,ease)}
182
+ .xui-Switch-thumb{display:block;transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease);transform:translateX(0)}
183
+ .xui-Switch-track[data-state="checked"]>.xui-Switch-thumb{transform:translateX(var(--xui-switch-travel,12px))}
184
+ .xui-Switch-track[data-state="checked"]>.xui-Switch-thumb:dir(rtl){transform:translateX(calc(-1 * var(--xui-switch-travel,12px)))}
185
+ .xui-slider-head{display:flex;justify-content:space-between;gap:var(--xui-spacing-sm)}
186
+ .xui-Slider-track{position:relative;display:flex;align-items:center;width:100%;flex-grow:1;overflow:visible;touch-action:none;user-select:none}
187
+ .xui-slider-root{display:flex;align-items:center;width:100%;min-height:var(--xui-control-slider);touch-action:none;user-select:none;position:relative}
188
+ .xui-Slider-range{position:absolute;height:100%;left:0;border-radius:inherit}
189
+ .xui-Slider-thumb{display:block;cursor:grab;outline:none}
190
+ .xui-DatePicker-calendar,.xui-DateRangePicker-calendar{display:flex;flex-direction:column;gap:var(--xui-spacing-sm);padding:var(--xui-spacing-sm)}
191
+ .xui-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:var(--xui-spacing-sm);font-weight:var(--xui-type-weight-medium)}
192
+ .xui-calendar-nav{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--xui-radius-sm);cursor:pointer;padding:0}
193
+ .xui-calendar-nav:hover{background:var(--xui-color-accent)}
194
+ .xui-calendar-nav>svg{width:16px;height:16px}
195
+ .xui-calendar-grid{display:grid;grid-template-columns:repeat(7,32px);gap:2px}
196
+ .xui-calendar-weekday{display:flex;align-items:center;justify-content:center;height:24px;font-size:var(--xui-type-size-xs);color:var(--xui-color-mutedForeground)}
197
+ .xui-DatePicker-day,.xui-DateRangePicker-day{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--xui-radius-sm);cursor:pointer;padding:0;font-size:var(--xui-type-size-sm)}
198
+ .xui-DatePicker-day:hover,.xui-DateRangePicker-day:hover{background:var(--xui-color-accent)}
199
+ .xui-DatePicker-day[data-xs~="selected"],.xui-DateRangePicker-day[data-xs~="selected"]{background:var(--xui-color-primary);color:var(--xui-color-primaryForeground)}
200
+ .xui-DatePicker-day[data-outside],.xui-DateRangePicker-day[data-outside]{opacity:.4}
201
+ .xui-DatePicker-day:disabled,.xui-DateRangePicker-day:disabled{opacity:.3;cursor:default;pointer-events:none}
202
+ .xui-Composer-field{display:block;width:100%;min-width:0;margin:0;padding:0;outline:none;border:0;background:transparent;color:inherit;font:inherit;resize:none;max-height:200px}
203
+ .xui-composer-bar{display:flex;align-items:center;justify-content:flex-end;gap:var(--xui-spacing-xs)}
204
+ .xui-Composer-attachment{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
205
+ .xui-Composer-send{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
206
+ .xui-Composer-send>svg,.xui-Composer-attachment>svg{width:16px;height:16px}
207
+ .xui-Composer-send:disabled{opacity:.5;pointer-events:none}
208
+ [data-xui-c="Ring"].xui-el,[data-xui-c="Spinner"].xui-el{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
209
+ [data-xui-c="Ring"].xui-el>svg,[data-xui-c="Spinner"].xui-el>svg{width:100%;height:100%;display:block}
210
+ .xui-Ring-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
211
+ [data-xui-c="Spinner"].xui-el>svg,.xui-Button-spinner>svg{animation:xui-spin 0.8s linear infinite}
212
+ [data-xui-c="Skeleton"].xui-el:not([data-rows]),.xui-Skeleton-dot,.xui-Skeleton-bar{animation:xui-skeleton ${Yg}ms ease-in-out infinite;opacity:${Za};flex-shrink:0}
213
+ [data-xui-c="Skeleton"][data-rows].xui-el{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;background:none;border-radius:0}
214
+ .xui-Skeleton-row{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
215
+ .xui-Skeleton-row+.xui-Skeleton-row{border-top:var(--xui-border-hairline) solid var(--xui-color-border)}
216
+ .xui-Skeleton-dot{display:block}
217
+ .xui-Skeleton-bar{display:block}
218
+ .xui-Skeleton-bar[data-title]{flex-shrink:1;min-width:0}
219
+ @keyframes xui-skeleton{0%,100%{opacity:${Za}}50%{opacity:${Xg}}}
220
+ [data-xui-c="SearchList"].xui-el{display:flex;flex-direction:column;overflow:hidden;min-width:0}
221
+ .xui-SearchList-head,.xui-Menu-head{display:flex;flex-direction:row;align-items:center;flex-shrink:0}
222
+ .xui-SearchList-search,.xui-Menu-search{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;align-self:stretch}
223
+ .xui-SearchList-search>svg,.xui-Menu-search>svg{width:16px;height:16px;opacity:.6;flex-shrink:0}
224
+ .xui-SearchList-search>input,.xui-Menu-search>input{flex:1 1 auto;min-width:0;height:100%;padding:0;border:0;outline:none;background:transparent;color:inherit;font:inherit}
225
+ .xui-SearchList-count,.xui-Menu-count{flex-shrink:0;font-variant-numeric:tabular-nums}
226
+ .xui-SearchList-body,.xui-Menu-body{display:flex;flex-direction:column;position:relative;flex-shrink:1;min-height:0}
227
+ .xui-SearchList-list,.xui-Menu-list{display:flex;flex-direction:column;flex-shrink:1;min-height:0;overflow-y:auto}
228
+ .xui-SearchList-item{display:flex;flex-direction:row;align-items:center;flex-shrink:0;cursor:pointer;user-select:none;white-space:nowrap}
229
+ .xui-SearchList-item[aria-disabled="true"]{pointer-events:none}
230
+ .xui-SearchList-icon,.xui-SearchList-check{display:inline-flex;flex-shrink:0}
231
+ .xui-SearchList-icon>svg,.xui-SearchList-check>svg{width:100%;height:100%}
232
+ .xui-SearchList-identifier{flex-shrink:0}
233
+ .xui-SearchList-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
234
+ .xui-SearchList-fade,.xui-Menu-fade{position:absolute;left:0;right:0;bottom:0;height:${Jg}px;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--xui-color-popover)) !important}
235
+ .xui-menu-search{display:flex;flex-direction:column;min-width:240px}
236
+ .xui-menu-search .xui-Menu-item{flex-shrink:0}
237
+ [data-xui-c="Markdown"].xui-el{display:block;min-width:0;overflow-wrap:anywhere}
238
+ [data-xui-c="Markdown"][data-lines].xui-el{display:-webkit-box;-webkit-box-orient:vertical;overflow:clip}
239
+ .xui-md>:first-child{margin-top:0}
240
+ .xui-md>:last-child{margin-bottom:0}
241
+ .xui-Markdown-paragraph{margin:0 0 var(--xui-spacing-sm)}
242
+ .xui-Markdown-heading{margin:var(--xui-spacing-md) 0 var(--xui-spacing-xs);font-weight:var(--xui-type-weight-semibold);line-height:1.25}
243
+ .xui-md ul,.xui-md ol{margin:0 0 var(--xui-spacing-sm);padding-inline-start:1.4em}
244
+ .xui-md ul{list-style:disc}
245
+ .xui-md ol{list-style:decimal}
246
+ .xui-md li>ul,.xui-md li>ol{margin-bottom:0}
247
+ .xui-Markdown-listItem{margin:0}
248
+ .xui-Markdown-code{font-family:var(--xui-font-mono);font-size:.925em;padding:0 .3em;border-radius:4px;background:var(--xui-color-muted)}
249
+ .xui-Markdown-codeBlock{display:block;font-family:var(--xui-font-mono);font-size:var(--xui-type-size-xs);white-space:pre;overflow:auto;padding:var(--xui-spacing-sm);margin:0 0 var(--xui-spacing-sm);border-radius:var(--xui-radius-sm);background:var(--xui-color-muted)}
250
+ .xui-Markdown-quote{margin:0 0 var(--xui-spacing-sm);padding-inline-start:var(--xui-spacing-md);border-inline-start:2px solid var(--xui-color-border);color:var(--xui-color-mutedForeground)}
251
+ .xui-Markdown-link{color:var(--xui-color-primary);text-decoration:underline;text-underline-offset:3px}
252
+ .xui-Markdown-table{border-collapse:collapse;margin:0 0 var(--xui-spacing-sm);width:100%}
253
+ .xui-Markdown-table th,.xui-Markdown-table td{border:1px solid var(--xui-color-border);padding:var(--xui-spacing-xs) var(--xui-spacing-sm);text-align:start}
254
+ .xui-Markdown-image{height:160px;margin:0 0 var(--xui-spacing-sm);overflow:hidden}
255
+ .xui-Markdown-image>img{display:block;width:100%;height:100%;object-fit:contain;object-position:0 0}
256
+ .xui-Markdown-image>img:dir(rtl){object-position:100% 0}
257
+ .xui-Markdown-imageAlt{color:var(--xui-color-mutedForeground)}
258
+ [data-xui-c="Chart"].xui-el{flex-direction:column;gap:var(--xui-spacing-xs);min-width:0}
259
+ .xui-Chart-legend,.xui-Chart-title{flex-shrink:0}
260
+ [data-xui-c="Chart"].xui-el>svg{width:100%;display:block}
261
+ .xui-Chart-legend{display:flex;flex-wrap:wrap;gap:var(--xui-spacing-sm);font-size:var(--xui-type-size-xs);color:var(--xui-color-mutedForeground)}
262
+ .xui-Chart-legend>span{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs)}
263
+ .xui-Chart-legend i{display:inline-block;width:8px;height:8px;border-radius:2px}
264
+ .xui-Chart-title{font-weight:var(--xui-type-weight-medium)}
265
+ [data-xui-c="TreeGuides"].xui-el{flex-direction:row;align-self:stretch;flex-shrink:0}
266
+ [data-xui-c="TreeGuides"].xui-el{overflow:visible}
267
+ .xui-tree-col{position:relative;align-self:stretch;flex-shrink:0;overflow:visible}
268
+ .xui-tree-col>.xui-TreeGuides-line{position:absolute;background:currentColor;display:block;padding:0;margin:0;box-sizing:border-box}
269
+ .xui-tree-col>.xui-TreeGuides-line[data-elbow]{background:none;border-style:solid;border-color:currentColor;border-top-width:0;border-right-width:0}
270
+ [data-xui-c="Unknown"].xui-el{flex-direction:column;gap:var(--xui-spacing-xxs)}
271
+ [data-xui-c="Box"][data-pressable="true"].xui-el{cursor:pointer}
272
+ .xui-layer{position:absolute;top:0;left:0;width:0;height:0;overflow:visible}
273
+ .xui-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
274
+
275
+ .xui-calendar-row{display:contents}
276
+ .xui-calendar-cell{display:flex;align-items:center;justify-content:center}
277
+ .xui-calendar-day-label{position:relative}
278
+ .xui-DatePicker-day[data-today]>.xui-calendar-day-label,.xui-DateRangePicker-day[data-today]>.xui-calendar-day-label{text-decoration:underline;text-underline-offset:3px}
279
+ .xui-DateRangePicker-day{position:relative}
280
+ .xui-DateRangePicker-range{position:absolute;inset:0;border-radius:inherit}
281
+ .xui-DateRangePicker-day[data-range]{background:var(--xui-color-accent)}
282
+ .xui-calendar-nav{color:inherit}
283
+ [data-xui-c="Form"].xui-el{flex-direction:column}
284
+ .xui-form-fields{display:contents;border:0;margin:0;padding:0;min-width:0}
285
+ .xui-Form-summary{display:flex;flex-direction:column}
286
+ .xui-form-summary-list{margin:0;padding-inline-start:1.2em}
287
+ .xui-Input-error,.xui-Textarea-error,.xui-NumberField-error,.xui-ChipInput-error,.xui-FileUpload-error,.xui-Select-error,.xui-Checkbox-error,.xui-Switch-error,.xui-Radio-error,.xui-DatePicker-error,.xui-DateRangePicker-error,.xui-TimePicker-error{display:flex;flex-direction:column;gap:2px}
288
+ [data-xui-numberfield]{display:flex;flex-direction:row;align-items:center;gap:var(--xui-spacing-xxs);min-width:0}
289
+ .xui-NumberField-input{flex:1 1 auto;min-width:0;width:100%;border:0;outline:none;background:transparent;color:inherit;font:inherit;padding:0;text-align:start;font-variant-numeric:tabular-nums}
290
+ .xui-NumberField-decrement,.xui-NumberField-increment,.xui-ChipInput-remove,.xui-FileUpload-remove,.xui-Toast-close,.xui-CodeBlock-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
291
+ .xui-NumberField-decrement>svg,.xui-NumberField-increment>svg,.xui-ChipInput-remove>svg,.xui-FileUpload-remove>svg,.xui-Toast-close>svg,.xui-CodeBlock-copy>svg{width:16px;height:16px}
292
+ .xui-NumberField-decrement:disabled,.xui-NumberField-increment:disabled{opacity:.4;pointer-events:none}
293
+ .xui-NumberField-unit{flex-shrink:0}
294
+ [data-xui-chipfield]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;cursor:text}
295
+ .xui-chip-list{display:contents;list-style:none;margin:0;padding:0}
296
+ .xui-ChipInput-chip{display:inline-flex;align-items:center;flex-shrink:0;outline:none}
297
+ .xui-ChipInput-input{flex:1 1 80px;min-width:80px;border:0;outline:none;background:transparent;color:inherit;font:inherit;padding:0;height:var(--xui-type-lineHeight-sm)}
298
+ .xui-ChipInput-suggestions{display:flex;flex-direction:column;border:1px solid var(--xui-color-border);border-radius:var(--xui-radius-md);background:var(--xui-color-popover);color:var(--xui-color-popoverForeground);padding:var(--xui-spacing-xs);box-shadow:var(--xui-shadow-md)}
299
+ .xui-ChipInput-suggestion{display:flex;align-items:center;padding:var(--xui-spacing-xs) var(--xui-spacing-sm);border-radius:var(--xui-radius-sm);cursor:pointer}
300
+ .xui-ChipInput-suggestion[data-active]{background:var(--xui-color-accent);color:var(--xui-color-accentForeground)}
301
+ .xui-FileUpload-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;cursor:pointer;outline:none}
302
+ .xui-FileUpload-dropzone[aria-disabled="true"]{cursor:default}
303
+ .xui-FileUpload-icon{display:inline-flex}
304
+ .xui-FileUpload-icon>svg{width:100%;height:100%}
305
+ .xui-FileUpload-title{font-weight:var(--xui-type-weight-medium)}
306
+ .xui-file-list{display:flex;flex-direction:column;gap:var(--xui-spacing-xs);list-style:none;margin:0;padding:0}
307
+ .xui-FileUpload-file{display:flex;flex-direction:row;align-items:center}
308
+ .xui-FileUpload-fileIcon{display:inline-flex;flex-shrink:0;opacity:.7}
309
+ .xui-FileUpload-fileIcon>svg{width:16px;height:16px}
310
+ .xui-FileUpload-browse{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0;height:var(--xui-control-buttonSm)}
311
+ .xui-FileUpload-fileName{flex:1 1 auto;min-width:0;overflow:clip;text-overflow:ellipsis;white-space:nowrap}
312
+ [data-xui-c="CodeBlock"].xui-el{flex-direction:column;min-width:0;overflow:clip}
313
+ .xui-CodeBlock-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}
314
+ .xui-CodeBlock-copy>svg{width:12px;height:12px}
315
+ .xui-codeblock-scroll{overflow:auto;min-width:0;outline:none}
316
+ .xui-codeblock-scroll[data-max-lines]{max-height:calc(var(--xui-code-lines) * 1lh)}
317
+ .xui-codeblock-pre{margin:0;padding:0;font:inherit;white-space:pre;tab-size:2;min-width:max-content}
318
+ .xui-codeblock-scroll[data-wrap="true"]>.xui-codeblock-pre{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
319
+ .xui-codeblock-pre>code{font:inherit;display:block}
320
+ .xui-CodeBlock-line{display:flex;flex-direction:row}
321
+ .xui-codeblock-text{flex:0 1 auto;min-width:0}
322
+ .xui-CodeBlock-gutter{display:flex;flex-direction:row;justify-content:flex-end;flex-shrink:0;user-select:none}
323
+ .xui-CodeBlock-lineNumber{display:block}
324
+ [data-xui-c="Table"].xui-el{flex-direction:column;min-width:0;overflow:auto}
325
+ .xui-Table-header{display:flex;flex-direction:column}
326
+ .xui-Table-header[data-sticky="true"]{position:sticky;top:0;z-index:1}
327
+ .xui-table-row,.xui-Table-row{display:grid;align-items:stretch;min-width:0}
328
+ .xui-table-body{display:flex;flex-direction:column;position:relative}
329
+ .xui-table-check{display:flex;align-items:center;justify-content:center;min-width:0}
330
+ .xui-Table-headerCell,.xui-Table-cell{display:flex;flex-direction:row;align-items:center;min-width:0;overflow:clip;text-overflow:ellipsis;white-space:nowrap;gap:var(--xui-spacing-xs)}
331
+ .xui-Table-headerCell[data-r-align="end"],.xui-Table-cell[data-r-align="end"]{justify-content:flex-end;text-align:end}
332
+ .xui-Table-headerCell[data-r-align="center"],.xui-Table-cell[data-r-align="center"]{justify-content:center;text-align:center}
333
+ .xui-Table-cell[data-type="number"]{font-variant-numeric:tabular-nums}
334
+ .xui-Table-cell>svg{width:16px;height:16px}
335
+ .xui-Table-row{outline:none}
336
+ .xui-Table-row:focus-visible{box-shadow:inset 0 0 0 2px var(--xui-color-ring)}
337
+ .xui-Table-row[tabindex]{cursor:pointer}
338
+ .xui-table-sort{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs);padding:0;margin:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;min-width:0}
339
+ .xui-Table-headerCell[data-r-align="end"]>.xui-table-sort{flex-direction:row}
340
+ .xui-Table-sortIcon{display:inline-flex;flex-shrink:0}
341
+ .xui-Table-sortIcon>svg{width:100%;height:100%}
342
+ .xui-Table-empty{display:flex;justify-content:center}
343
+ .xui-table-badge{display:inline-flex;align-items:center;height:var(--xui-control-badge);padding:0 var(--xui-spacing-sm);border-radius:var(--xui-radius-full);background:var(--xui-color-secondary);color:var(--xui-color-secondaryForeground);font-size:var(--xui-type-size-xs)}
344
+ .xui-chart-plot{position:relative;width:100%;min-width:0;flex:1 1 0%;min-height:0;overflow:visible}
345
+ .xui-chart-svg{position:absolute;top:0;left:0;display:block;overflow:visible;outline:none}
346
+ .xui-chart-svg:focus-visible{outline:2px solid var(--xui-color-ring);outline-offset:2px;border-radius:var(--xui-radius-sm)}
347
+ .xui-Chart-grid{opacity:.7}
348
+ .xui-Chart-tooltip{display:flex;flex-direction:column;gap:2px;z-index:2;min-width:120px;white-space:nowrap}
349
+ .xui-chart-tip-row{display:inline-flex;align-items:center;gap:var(--xui-spacing-xxs)}
350
+ .xui-chart-tip-row>i{display:inline-block;width:8px;height:8px;border-radius:2px}
351
+ .xui-Chart-valueLabel{fill:currentColor}
352
+ [data-xui-c="Chart"][data-kind="sparkline"].xui-el{gap:0}
353
+ .xui-Image-fallback{display:flex;align-items:center;justify-content:center;position:absolute;inset:0}
354
+ .xui-Image-fallback>svg{width:var(--xui-control-iconLg);height:var(--xui-control-iconLg)}
355
+ [data-xui-c="Image"][data-state="loading"].xui-el{background:var(--xui-color-muted)}
356
+ .xui-carousel-controls{display:flex;align-items:center;justify-content:center}
357
+ .xui-carousel-controls>.xui-carousel-dots{padding-top:0}
358
+ .xui-carousel-nav{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;cursor:pointer}
359
+ .xui-carousel-nav:disabled{pointer-events:none}
360
+ .xui-carousel-nav>svg{width:var(--xui-control-iconSm);height:var(--xui-control-iconSm)}
361
+ .xui-menu-label{flex:1 1 auto;min-width:0}
362
+ .xui-Menu-shortcut{margin-inline-start:auto;padding-inline-start:var(--xui-spacing-lg)}
363
+ .xui-Menu-check{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
364
+ .xui-Menu-check svg,.xui-Menu-submenuIndicator>svg{width:100%;height:100%}
365
+ .xui-Menu-submenuIndicator{display:inline-flex;margin-inline-start:auto;flex-shrink:0}
366
+ .xui-Select-searchbox{display:flex;align-items:center;gap:var(--xui-spacing-xs);padding-inline-start:var(--xui-spacing-sm)}
367
+ .xui-Select-searchbox>svg{width:16px;height:16px;opacity:.6;flex-shrink:0}
368
+ .xui-Select-searchbox>.xui-Select-search{margin:0;border-bottom:0;padding-inline-start:0}
369
+ .xui-Select-listbox,.xui-TimePicker-listbox{display:flex;flex-direction:column;outline:none;overflow:auto;max-height:280px}
370
+ .xui-Select-empty{display:flex}
371
+ .xui-TimePicker-list{min-width:var(--radix-popover-trigger-width)}
372
+ [data-xui-c="Toast"].xui-el{flex-direction:row;align-items:flex-start;width:min(360px,calc(100vw - 32px));pointer-events:auto}
373
+ .xui-Toast-icon{display:inline-flex;flex-shrink:0}
374
+ .xui-Toast-icon>svg{width:100%;height:100%}
375
+ .xui-toast-text{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-width:0}
376
+ .xui-Toast-action{display:inline-flex;align-items:center;flex-shrink:0;cursor:pointer;white-space:nowrap}
377
+ .xui-toast-layer{position:fixed;bottom:var(--xui-spacing-lg);left:50%;transform:translateX(-50%);z-index:60;display:flex;flex-direction:column;align-items:center;gap:var(--xui-spacing-sm);pointer-events:none;width:max-content;max-width:calc(100vw - 32px)}
378
+ .xui-toast-layer>:nth-last-child(n+4){display:none}
379
+ .xui-Popover-content[data-open-on="hover"]{pointer-events:auto}
380
+ @keyframes xui-fade-out{to{opacity:0}}
381
+ @keyframes xui-pop-in{from{opacity:0;scale:var(--xui-scale-popoverFrom,.96)}}
382
+ @keyframes xui-pop-out{to{opacity:0}}
383
+ @keyframes xui-slide-bottom-in{from{translate:0 100%}}
384
+ @keyframes xui-slide-bottom-out{to{translate:0 100%}}
385
+ @keyframes xui-slide-top-in{from{translate:0 -100%}}
386
+ @keyframes xui-slide-top-out{to{translate:0 -100%}}
387
+ @keyframes xui-slide-left-in{from{translate:-100% 0}}
388
+ @keyframes xui-slide-left-out{to{translate:-100% 0}}
389
+ @keyframes xui-slide-right-in{from{translate:100% 0}}
390
+ @keyframes xui-slide-right-out{to{translate:100% 0}}
391
+ @keyframes xui-toast-in{from{opacity:0;translate:0 12px}}
392
+ @keyframes xui-accordion-open{from{height:0}to{height:var(--radix-accordion-content-height)}}
393
+ @keyframes xui-accordion-close{from{height:var(--radix-accordion-content-height)}to{height:0}}
394
+ .xui-Popover-content,.xui-Tooltip-content,.xui-Menu-content,.xui-Select-content,.xui-DatePicker-calendar,.xui-DateRangePicker-calendar,.xui-TimePicker-list{transform-origin:var(--radix-popper-transform-origin)}
395
+ .xui-Popover-content[data-state="open"],.xui-Tooltip-content[data-state$="open"],.xui-Menu-content[data-state="open"],.xui-Select-content[data-state="open"],.xui-DatePicker-calendar[data-state="open"],.xui-DateRangePicker-calendar[data-state="open"],.xui-TimePicker-list[data-state="open"],.xui-Dialog-content[data-state="open"]{animation:xui-pop-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
396
+ [data-xui-c="Button"].xui-el:active:not(:disabled){scale:var(--xui-scale-press,1)}
397
+ .xui-Popover-content[data-state="closed"],.xui-Tooltip-content[data-state="closed"],.xui-Menu-content[data-state="closed"],.xui-Select-content[data-state="closed"],.xui-DatePicker-calendar[data-state="closed"],.xui-DateRangePicker-calendar[data-state="closed"],.xui-TimePicker-list[data-state="closed"],.xui-Dialog-content[data-state="closed"]{animation:xui-pop-out var(--xui-motion-fast) var(--xui-ease-accelerate,ease-in) forwards}
398
+ .xui-Dialog-overlay[data-state="open"],.xui-Drawer-overlay[data-state="open"]{animation:xui-fade-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
399
+ .xui-Dialog-overlay[data-state="closed"],.xui-Drawer-overlay[data-state="closed"]{animation:xui-fade-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
400
+ .xui-Drawer-content[data-side="bottom"][data-state="open"]{animation:xui-slide-bottom-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
401
+ .xui-Drawer-content[data-side="bottom"][data-state="closed"]{animation:xui-slide-bottom-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
402
+ .xui-Drawer-content[data-side="top"][data-state="open"]{animation:xui-slide-top-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
403
+ .xui-Drawer-content[data-side="top"][data-state="closed"]{animation:xui-slide-top-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
404
+ .xui-Drawer-content[data-side="left"][data-state="open"]{animation:xui-slide-left-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
405
+ .xui-Drawer-content[data-side="left"][data-state="closed"]{animation:xui-slide-left-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
406
+ .xui-Drawer-content[data-side="right"][data-state="open"]{animation:xui-slide-right-in var(--xui-motion-slow) var(--xui-ease-decelerate,ease-out)}
407
+ .xui-Drawer-content[data-side="right"][data-state="closed"]{animation:xui-slide-right-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
408
+ .xui-Accordion-content[data-state="open"]{animation:xui-accordion-open var(--xui-motion-standard) var(--xui-ease-standard,ease)}
409
+ .xui-Accordion-content[data-state="closed"]{animation:xui-accordion-close var(--xui-motion-standard) var(--xui-ease-standard,ease)}
410
+ .xui-Tabs-content[data-state="active"]{animation:xui-fade-in var(--xui-motion-fast) var(--xui-ease-decelerate,ease-out)}
411
+ [data-xui-c="Toast"][data-state="open"].xui-el{animation:xui-toast-in var(--xui-motion-standard) var(--xui-ease-decelerate,ease-out)}
412
+ [data-xui-c="Toast"][data-state="closed"].xui-el{animation:xui-fade-out var(--xui-motion-standard) var(--xui-ease-accelerate,ease-in) forwards}
413
+ .xui-accordion-title{display:inline-flex;align-items:baseline;gap:var(--xui-spacing-xs);min-width:0}
414
+ .xui-Collapsible-chevron.xui-el{transition:transform var(--xui-motion-fast) var(--xui-ease-standard,ease)}
415
+ ${Nv}
416
+ }
417
+ @media (prefers-reduced-motion: reduce){@layer xui-base{.xui-surface *,.xui-surface *::before,.xui-surface *::after{animation-duration:0ms !important;animation-iteration-count:1 !important;transition-duration:0ms !important;scroll-behavior:auto !important}${Il}}}
418
+ .xui-surface[data-xui-motion="reduce"] *,.xui-surface[data-xui-motion="reduce"] *::after{animation-duration:0ms !important;animation-iteration-count:1 !important;transition-duration:0ms !important}
419
+ ${Il.replace(/\.xui-surface /g,'.xui-surface[data-xui-motion="reduce"] ')}`,Qs=()=>typeof document<"u"&&document.baseURI?document.baseURI:void 0;function id(){try{const e=Qs();if(!e)return[];const t=new URL(e).hostname.toLowerCase();return Hu(t)?[t]:[]}catch{return[]}}function ea(e){const t=id();return t.length?[...e??[],...t.filter(n=>!(e??[]).includes(n))]:e}function Bv(e){const t=e.urls??{},n=t.baseUrl?t:{...t,baseUrl:e.media?.baseUrl??Qs()};return{...n,allowPrivate:ea(n.allowPrivate)}}function ei(e,t){return Mb(Bv(e),t)}function sd(e,t){if(typeof t!="string"||!t)return null;const n=e.resolveUrl?e.resolveUrl(t):t,r=e.mediaRequest?e.mediaRequest(n):Wu(n,{baseUrl:Qs(),...e.media,allowPrivate:ea(e.media?.allowPrivate)});return r&&ad(e,r.url)?r:null}function ad(e,t){return Br({schemes:e.media?.schemes??ju,hosts:e.media?.hosts,allowPrivate:ea(e.media?.allowPrivate)},t).allowed}function Hv(e,t){const n=ei(e,t);n&&(e.openUrl?e.openUrl(n):typeof window<"u"&&window.open(n,"_blank","noopener,noreferrer"))}function Wv(e,t,n={}){return e?(typeof e=="function"?e(t):e[t])??n[t]:n[t]}const q=(e,t="")=>e==null?t:typeof e=="object"?JSON.stringify(e):String(e),pe=(e,t=0)=>typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&Number.isFinite(Number(e))?Number(e):t,re=e=>e===!0||e==="true",nn=e=>Array.isArray(e)?e:[],Ne=e=>Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[];function pr(e,t,n,r){return e.strings[t]!==void 0?e.t(t,n):r()}const El=["byte","kilobyte","megabyte","gigabyte"],_l=new Map;function Uv(e,t){let n=_l.get(t);n||(n=El.map(i=>{try{return new Intl.NumberFormat(t,{style:"unit",unit:i,unitDisplay:"short",maximumFractionDigits:1})}catch{return new Intl.NumberFormat(t,{maximumFractionDigits:1})}}),_l.set(t,n));let r=0,o=Math.max(0,e);for(;o>=1024&&r<El.length-1;)o/=1024,r++;return n[r].format(o)}function qv(e,t){const n=e.split(",").map(i=>i.trim().toLowerCase()).filter(Boolean);if(n.length===0)return!0;const r=t.name.toLowerCase(),o=(t.type||"").toLowerCase();return n.some(i=>i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?o.startsWith(i.slice(0,-1)):o===i)}function Kv(e,t=Xo.invalidValue){const n=[];for(const r of Ne(e))r&&typeof r=="object"&&"condition"in r&&(r.condition===!1||r.condition===null||r.condition===void 0||r.condition==="")&&n.push(q(r.message,t));return n}const Vv=Qe.builtinIcons;function Gv(e){return Vv[e]??"ui-icon-placeholder"}function Ir(...e){return e.filter(Boolean).join(" ")||void 0}function Yv(e,t,n,r){const o=e.map((l,c)=>c);if(!t||!n)return o;const i=new Intl.Collator(r,{numeric:!0,sensitivity:"base"}),s=t.direction==="desc"?-1:1,a=l=>l==null||l==="";return o.sort((l,c)=>{const u=e[l]?.[t.key],d=e[c]?.[t.key];if(a(u)&&a(d))return l-c;if(a(u))return 1;if(a(d))return-1;let f;return typeof u=="number"&&typeof d=="number"?f=u-d:n.type==="number"?f=pe(u)-pe(d):n.type==="date"?f=new Date(String(u)).getTime()-new Date(String(d)).getTime():typeof u=="boolean"||typeof d=="boolean"?f=+!!u-+!!d:f=i.compare(String(u),String(d)),f===0?l-c:f*s})}const lt=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,Lt=e=>{const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):null},On=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),Di=(e,t)=>{const n=new Date(e.getFullYear(),e.getMonth()+t+1,0).getDate();return new Date(e.getFullYear(),e.getMonth()+t,Math.min(e.getDate(),n))},Qt=(e,t)=>!!(e&&t&&lt(e)===lt(t));function Xv(e,t){const n=new Date(e.getFullYear(),e.getMonth(),1),r=(n.getDay()-t+7)%7;return Array.from({length:42},(o,i)=>new Date(n.getFullYear(),n.getMonth(),1-r+i))}function Zv(e,t,n,r){const o=e.filter(s=>s.getMonth()===t.getMonth()&&s.getFullYear()===t.getFullYear()&&!r(s));if(o.some(s=>Qt(s,n)))return n;let i=null;for(const s of o)(!i||Math.abs(s.getTime()-n.getTime())<Math.abs(i.getTime()-n.getTime()))&&(i=s);return i}const Er=150;class Jv{value;revision=0;pending=!1;focused=!1;acked=0;timer=null;live=!0;send;writeLocal;debounceMs;onChange;constructor(t){this.value=t.initial,this.send=t.send,this.writeLocal=t.writeLocal,this.debounceMs=t.debounceMs??Er,this.onChange=t.onChange}configure(t){this.send=t.send,this.writeLocal=t.writeLocal,this.debounceMs=t.debounceMs??Er}edit(t){this.value=t,this.revision+=1,this.pending=!0,this.writeLocal?.(t),this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,this.dispatch("change")},this.debounceMs),this.notify()}commit(){this.clearTimer(),this.dispatch("commit")}focus(){this.focused=!0,this.notify()}blur(){this.focused=!1,this.notify(),this.commit()}push(t){return this.focused||this.revision>this.acked||Object.is(t,this.value)?!1:(this.value=t,this.notify(),!0)}attach(){this.live=!0}dispose(){this.live=!1,this.clearTimer()}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}notify(){this.live&&this.onChange?.()}ack(t){t>this.acked&&(this.acked=t),this.live&&this.acked>=this.revision&&this.pending&&(this.pending=!1,this.notify())}dispatch(t){const n=this.revision;let r;try{r=this.send(this.value,n,t)}catch{r=void 0}r&&typeof r.then=="function"?r.then(()=>this.ack(n),()=>this.ack(n)):this.ack(n)}}const Dl=new Map;function Qv(e){let t=Dl.get(e);if(!t){t=new Map;const n=new Intl.NumberFormat(e,{useGrouping:!1});for(let r=0;r<=9;r++){const o=n.format(r);o!==String(r)&&t.set(o,String(r))}Dl.set(e,t)}return t}function ex(e,t){const n=new Intl.NumberFormat(t).formatToParts(12345.6),r=n.find(c=>c.type==="group")?.value??",",o=n.find(c=>c.type==="decimal")?.value??".",i=Qv(t),a=(i.size?Array.from(e,c=>i.get(c)??c).join(""):e).trim().split(r).join("").replace(/[\s‎‏؜]/g,"").replace(o,".").replace(/[−–]/g,"-");if(a===""||a==="-")return null;const l=Number(a);return Number.isFinite(l)?l:null}const tx=64,_t=new Map;function nx(e,t){return`${e}
420
+ ${JSON.stringify(t)}`}function ld(e,t){_t.delete(e),_t.set(e,t)}function rx(e,t){let n=_t.get(e);if(!n){const r={refs:0,promise:Promise.resolve("")};r.promise=t().then(o=>(r.url=o,_t.get(e)!==r&&URL.revokeObjectURL(o),o)),r.promise.catch(()=>{_t.get(e)===r&&_t.delete(e)}),n=r}return n.refs+=1,ld(e,n),n}function ox(e,t){if(t.refs-=1,t.refs>0||_t.get(e)!==t)return;ld(e,t);let n=0;for(const r of _t.values())r.refs===0&&(n+=1);for(const[r,o]of _t){if(n<=tx)break;o.refs>0||(_t.delete(r),o.url&&URL.revokeObjectURL(o.url),n-=1)}}function ix(e,t,n="image"){const r=sd(e,t),o=r?.headers??{},i=r!==null&&Object.keys(o).length>0,s=i?`${n}
421
+ ${nx(r.url,o)}`:"";return{fetched:i,key:s,direct:r?r.url:void 0,denied:!!t&&r===null,open:()=>{if(!r||!i)return{promise:Promise.resolve(r?r.url:""),release:()=>{}};const a=n==="stream"&&e.mediaStreamUrl!==void 0,l=a?sx(e,r):rx(s,()=>(n==="stream"?ax(r.url,o):cd(r.url,o)).then(c=>URL.createObjectURL(c)));return{promise:l.promise,release:a?()=>{}:()=>ox(s,l)}}}}function sx(e,t){return{promise:Promise.resolve(e.mediaStreamUrl(t)).then(r=>{if(typeof r!="string"||!ad(e,r))throw new Error("stream url denied by the media policy");return r}),refs:0}}function ax(e,t,n=Ys){return cd(e,t,{...n,maxPixels:1/0},!1)}async function cd(e,t,n=Ys,r=!0){const o=new AbortController,i=setTimeout(()=>o.abort(new Error(`media timed out after ${n.timeoutMs} ms`)),n.timeoutMs),s=()=>new Error(`media is over ${n.maxBytes} bytes`);try{const a=await fetch(e,{headers:t,signal:o.signal});if(!a.ok)throw new Error(`HTTP ${a.status}`);if(Number(a.headers.get("content-length")??NaN)>n.maxBytes)throw s();const l=[];let c=0;if(a.body){const u=a.body.getReader();for(;;){const{done:d,value:f}=await u.read();if(d)break;if(c+=f.byteLength,c>n.maxBytes)throw o.abort(),s();l.push(f)}}else{const u=new Uint8Array(await a.arrayBuffer());if(u.byteLength>n.maxBytes)throw s();l.push(u)}if(r){const u=jb(l.length===1?l[0]:lx(l),n);if(u)throw new Error(u)}return new Blob(l,{type:a.headers.get("content-type")??""})}finally{clearTimeout(i)}}function lx(e){const t=new Uint8Array(e.reduce((r,o)=>r+o.byteLength,0));let n=0;for(const r of e)t.set(r,n),n+=r.byteLength;return t}const cx=32,Pl=8192,Pi=/\s+(?:"[^"]*"|'[^']*')/y;class ud{constructor(t){this.s=t;const n=t.length;this.close=new Int32Array(n).fill(-1),this.balance=new Int32Array(n+1),this.escaped=new Uint8Array(n);const r=[],o=[];let i=!1,s=0;for(let a=0;a<n;a++){if(this.balance[a]=s,i){this.escaped[a]=1,i=!1;continue}const l=t[a];if(l==="\\")i=!0;else if(l==="[")r.push(a);else if(l==="]"){const c=r.pop();c!==void 0&&(this.close[c]=a)}else if(l==="(")o.push(a),s++;else if(l===")"){const c=o.pop();c!==void 0&&(this.close[c]=a),s--}}this.balance[n]=s,this.nextWs=new Int32Array(n+1),this.nextGt=new Int32Array(n+1),this.nextLtNl=new Int32Array(n+1),this.nextWs[n]=n,this.nextGt[n]=-1,this.nextLtNl[n]=n;for(let a=n-1;a>=0;a--){const l=t[a];this.nextWs[a]=!this.escaped[a]&&/\s/.test(l)?a:this.nextWs[a+1],this.nextGt[a]=l===">"?a:this.nextGt[a+1],this.nextLtNl[a]=l==="<"||l===`
422
+ `?a:this.nextLtNl[a+1]}}s;close;balance;nextWs;nextGt;nextLtNl;escaped;at(t){const n=this.s;if(n[t]!=="["||this.escaped[t])return null;const r=this.close[t];if(r<0||n[r+1]!=="(")return null;let o=r+2,i;if(n[o]==="<"){const s=this.nextGt[o];if(s<0||this.nextLtNl[o+1]<s||s-o-1>Pl)return null;i=n.slice(o+1,s),o=s+1}else{const s=this.close[r+1],a=this.nextWs[o];let l;if(s>=0&&s<a)l=s;else if(this.balance[a]===this.balance[o])l=a;else return null;if(l-o>Pl)return null;i=n.slice(o,l).replace(/\\([()])/g,"$1"),o=l}for(Pi.lastIndex=o,Pi.exec(n)&&(o=Pi.lastIndex);n[o]===" ";)o++;return n[o]!==")"?null:{label:n.slice(t+1,r),dest:i,end:o+1}}}function ux(e,t){return e[t]==="["?new ud(e).at(t):null}function dx(e){if(e[0]!=="!")return null;const t=ux(e,1);return t&&t.end===e.length?{alt:t.label,src:t.dest}:null}const fx=/(`[^`]+`)|(\*\*([^*]+)\*\*)|(__([^_]+)__)|(\*([^*\s][^*]*)\*)|(_([^_\s][^_]*)_)|(~~([^~]+)~~)/;function bt(e,t=0){const n=[],r=t<cx&&e.includes("[")?new ud(e):null,o=new RegExp(fx.source,"g");let i=0,s=null,a=!1;for(;i<e.length;){(!a||s&&s.index<i)&&(o.lastIndex=i,s=o.exec(e),a=!0);const l=s?s.index:e.length;let c=null;if(r)for(let u=e.indexOf("[",i);u>=0&&u<l;u=e.indexOf("[",u+1)){const d=r.at(u);if(!d)continue;const f=u>i&&e[u-1]==="!";c={at:f?u-1:u,image:f,...d};break}if(c){c.at>i&&n.push(e.slice(i,c.at)),c.image?n.push(c.label):n.push({type:"link",dest:c.dest,children:bt(c.label,t+1)}),i=c.end;continue}if(!s){n.push(e.slice(i));break}s.index>i&&n.push(e.slice(i,s.index)),s[1]?n.push({type:"code",text:s[1].slice(1,-1)}):s[2]?n.push({type:"strong",children:bt(s[3],t)}):s[4]?n.push({type:"strong",children:bt(s[5],t)}):s[6]?n.push({type:"em",children:bt(s[7],t)}):s[8]?n.push({type:"em",children:bt(s[9],t)}):s[10]&&n.push({type:"del",text:s[11]}),i=s.index+s[0].length}return n}const Mo=/^(\s*)([-*+]|\d+[.)])\s+(.*)$/;function px(e){const t=i=>i.replace(/\t/g," ").length,n=e.length?Mo.exec(e[0]):null;if(!n)return{indent:0,ordered:!1,items:[]};const r={indent:t(n[1]),ordered:/\d/.test(n[2]),items:[]},o=[r];for(const i of e){const s=Mo.exec(i);if(!s)continue;const a=t(s[1]);for(;o.length>1&&a<o[o.length-1].indent;)o.pop();let l=o[o.length-1];const c=l.items[l.items.length-1];if(c&&a>=l.indent+2&&o.length<dd){const d={indent:a,ordered:/\d/.test(s[2]),items:[]};c.children.push(d),o.push(d),l=d}const u=/^\[([ xX])\]\s+(.*)$/.exec(s[3]);l.items.push(u?{text:u[2],content:bt(u[2]),task:u[1]!==" ",children:[]}:{text:s[3],content:bt(s[3]),children:[]})}return r}const Ol=e=>/^\s*\|.*\|\s*$/.test(e),hx=e=>/^\s*\|(\s*:?-+:?\s*\|)+\s*$/.test(e),Oi=e=>e.trim().replace(/^\|/,"").replace(/\|$/,"").split(/(?<!\\)\|/).map(t=>t.replace(/\\\|/g,"|").trim()),dd=32;function gx(e){return fd(e,0)}function fd(e,t){const n=e.replace(/\r\n?/g,`
423
+ `).split(`
424
+ `),r=[];let o=0;const i=[],s=()=>{if(i.length===0)return;const a=i.join(" "),l=dx(a);l?r.push({type:"image",alt:l.alt,src:l.src}):r.push({type:"paragraph",children:bt(a)}),i.length=0};for(;o<n.length;){const a=n[o],l=/^```(\w*)\s*$/.exec(a);if(l){s();const u=[];for(o++;o<n.length&&!/^```\s*$/.test(n[o]);)u.push(n[o++]);o++,r.push({type:"codeBlock",lang:l[1]||void 0,text:u.join(`
425
+ `)});continue}const c=/^(#{1,6})\s+(.*)$/.exec(a);if(c){s(),r.push({type:"heading",level:c[1].length,children:bt(c[2])}),o++;continue}if(t<dd&&/^\s*>/.test(a)){s();const u=[];for(;o<n.length&&/^\s*>/.test(n[o]);)u.push(n[o++].replace(/^\s*>\s?/,""));r.push({type:"quote",children:fd(u.join(`
426
+ `),t+1)});continue}if(Mo.test(a)){s();const u=[];for(;o<n.length&&Mo.test(n[o]);)u.push(n[o++]);r.push({type:"list",list:px(u)});continue}if(Ol(a)&&o+1<n.length&&hx(n[o+1])){s();const u=Oi(a),d=Oi(n[o+1]).map(g=>g.startsWith(":")&&g.endsWith(":")?"center":g.endsWith(":")?"end":g.startsWith(":")?"start":void 0);o+=2;const f=[];for(;o<n.length&&Ol(n[o]);)f.push(Oi(n[o++]));r.push({type:"table",align:d,head:u.map(g=>bt(g)),rows:f.map(g=>g.map(p=>bt(p)))});continue}if(/^\s*([-*_])(\s*\1){2,}\s*$/.test(a)){s(),r.push({type:"rule"}),o++;continue}if(a.trim()===""){s(),o++;continue}i.push(a.trim()),o++}return s(),r}const mx=Object.fromEntries(Object.entries(Qe.components).flatMap(([e,t])=>{const n=t.props.validateOn?.default;return n===void 0?[]:[[e,String(n)]]}));function yx(e){return mx[e]}function bx(e){return e.submitted||e.attempts>0||(e.validateOn==="change"?e.dirty:e.validateOn==="blur"?e.touched:!1)}function vx(e){return[...e].sort((t,n)=>{const r=t.element(),o=n.element();return!r||!o?0:r.compareDocumentPosition(o)&4?-1:1})}class xx{fields=new Set;register(t){return this.fields.add(t),()=>{this.fields.delete(t)}}check(){const t=vx(this.fields),n=[];let r=null;for(const i of t){const s=i.errors();s.length&&!r&&(r=i);for(const a of s)n.push({name:i.name,message:a})}if(n.length)return{ok:!1,errors:n,first:r};const o={};for(const i of t)o[i.name]=i.value();return{ok:!0,values:o}}stillFailing(t){return t.filter(n=>[...this.fields].some(r=>r.name===n.name&&r.errors().includes(n.message)))}}function pd(e,t="vertical"){let n=e?.parentElement??null;for(;n&&n!==document.body&&n!==document.documentElement;){const r=getComputedStyle(n),o=t==="vertical"?r.overflowY:r.overflowX,i=t==="vertical"?n.scrollHeight>n.clientHeight+1:n.scrollWidth>n.clientWidth+1;if((o==="auto"||o==="scroll")&&i)return n;n=n.parentElement}return null}function Ml(e,t,n,r){const o=r===void 0?pd(e,t):r,i=e.getBoundingClientRect();if(t==="vertical")return o?{scroll:o.getBoundingClientRect().top+o.clientTop-i.top,viewport:o.clientHeight,scroller:o}:{scroll:-i.top,viewport:window.innerHeight,scroller:o};if(o){const s=o.getBoundingClientRect();return{scroll:n?i.right-(s.right-o.clientLeft):s.left+o.clientLeft-i.left,viewport:o.clientWidth,scroller:o}}return{scroll:n?i.right-window.innerWidth:-i.left,viewport:window.innerWidth,scroller:o}}const $x=700;function hd(e,t,n,r=()=>!1){if(e===0)return-1;let o=t;for(let i=0;i<e;i++)if(o=((o+n)%e+e)%e,!r(o))return o;return-1}function gd(e,t,n,r,o,i,s){const a={text:n-e.at>$x?t.toLowerCase():e.text+t.toLowerCase(),at:n};for(let l=1;l<=o;l++){const c=(Math.max(0,r)+(a.text.length>1?l-1:l))%o;if(!i(c)&&s(c).toLowerCase().startsWith(a.text))return{buffer:a,index:c}}return{buffer:a,index:-1}}const wx={Switch:["body","label","description","track"],Input:["label","field","description","error"],Textarea:["label","field","description","error"],NumberField:["label","field","decrement","input","unit","increment","description","error"],ChipInput:["label","field","input","description","error"],Select:["label","trigger"],DatePicker:["label","trigger"],DateRangePicker:["label","trigger"],TimePicker:["label","trigger"],Radio:["label","items"],ChoiceTiles:["error"],Checkbox:["box","label","description"],Slider:["header","label","value","track"],Tabs:["list","content","new"],SearchList:["head","search","count","body","list","empty","fade"],Menu:["trigger","head","search","count","body","list","empty","fade"],Table:["header","body","caption","empty"],Carousel:["page","indicator","controls","previous","next"],Tooltip:["anchor"],FileUpload:["label","dropzone","icon","title","hint","browse","description"],CodeBlock:["header","title","copy","body"],AudioPlayer:["track","controls"],Video:["controls"],Image:["fallback"],Ring:["label"]},Fl=e=>{const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},Mi=e=>typeof e=="object"&&e!==null&&typeof e.id=="string"?e.id:void 0;function Fo(e,t){if(Object.is(e,t)||typeof e!="object"||typeof t!="object"||e===null||t===null)return t;if(Array.isArray(t)){if(!Array.isArray(e))return t;const s=e.length>0&&Mi(e[0])!==void 0?new Map(e.map(c=>[Mi(c),c])):null;let a=e.length===t.length;const l=t.map((c,u)=>{const d=s?Mi(c):void 0,f=Fo(d!==void 0?s.get(d):e[u],c);return f!==e[u]&&(a=!1),f});return a?e:l}if(Array.isArray(e)||!Fl(e)||!Fl(t))return t;const n=e,r=Object.keys(t);let o=r.length===Object.keys(n).length;const i={};for(const s of r){const a=Object.prototype.hasOwnProperty.call(n,s),l=Fo(a?n[s]:void 0,t[s]);i[s]=l,(!a||l!==n[s])&&(o=!1)}return o?e:i}const Ur=sn();function ae(){const e=qt(Ur);if(!e)throw new Error("exponential-ui: this component must render inside <ExponentialSurface>");return e}function ta(e,t){const n={};for(const r of Object.keys(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:()=>e[r]});for(const[r,o]of Object.entries(t))o&&Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:o});return n}const ti=sn(()=>""),ni=sn(()=>""),na=()=>qt(ti),qr=()=>qt(ni);function ri(e,t){return{get data(){return e.data},scope:t,get functions(){return e.functions},get openUrl(){return e.openUrl},get locale(){return e.locale},get strings(){return e.strings},get formatter(){return e.formatter},get now(){return e.now}}}const[kx,zl]=X([]),Rl=new Set;function Sx(e){const t=md(e);zl(n=>[...n,t]);for(const n of Rl)n();return()=>{zl(n=>n.filter(r=>r!==t));for(const n of Rl)n()}}function md(e){return{catalog:e.catalog?Ym(e.catalog):null,components:e.components??{}}}function Cx(){return kx()}function yd(e){return e.flatMap(t=>t.catalog?[t.catalog]:[])}const Nl=new WeakMap;function bd(e){const t=Nl.get(e);if(t)return t;const n=new Set;Nl.set(e,n);for(const r of e)for(const[o,i]of Object.entries(r.catalog?.components??{}))i.kind==="macro"&&n.add(o);return n}function Ax(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n].components[t];if(r)return r}}var Tx={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"},Mn=Tx,Ix=F("<svg>"),Ll=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ex=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),_x=e=>{const t=Ex(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dx=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Px=e=>{const[t,n]=Mr(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var r=Ix();return D(r,C(Mn,{get width(){return t.size??Mn.width},get height(){return t.size??Mn.height},get stroke(){return t.color??Mn.stroke},get"stroke-width"(){return Z(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Mn["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??Mn["stroke-width"])},get class(){return Dx("lucide","lucide-icon",...t.name!=null?[`lucide-${Ll(_x(t.name))}`,`lucide-${Ll(t.name)}`]:[],t.class!=null?t.class:"")}},n),!0,!0),x(r,$(xe,{get each(){return t.iconNode},children:([o,i])=>$(An,C({component:o},i))})),r})()},Pe=Px,Ox=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Mx=e=>$(Pe,C(e,{iconNode:Ox,name:"arrow-left"})),Fx=Mx,zx=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Rx=e=>$(Pe,C(e,{iconNode:zx,name:"calendar"})),Nx=Rx,Lx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jx=e=>$(Pe,C(e,{iconNode:Lx,name:"check"})),Bx=jx,Hx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wx=e=>$(Pe,C(e,{iconNode:Hx,name:"chevron-down"})),Ux=Wx,qx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Kx=e=>$(Pe,C(e,{iconNode:qx,name:"chevron-left"})),Vx=Kx,Gx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yx=e=>$(Pe,C(e,{iconNode:Gx,name:"chevron-right"})),Xx=Yx,Zx=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Jx=e=>$(Pe,C(e,{iconNode:Zx,name:"chevron-up"})),Qx=Jx,e$=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],t$=e=>$(Pe,C(e,{iconNode:e$,name:"chevrons-up-down"})),n$=t$,r$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],o$=e=>$(Pe,C(e,{iconNode:r$,name:"circle-check"})),i$=o$,s$=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],a$=e=>$(Pe,C(e,{iconNode:s$,name:"circle-dashed"})),vd=a$,l$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],c$=e=>$(Pe,C(e,{iconNode:l$,name:"circle-stop"})),u$=c$,d$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],f$=e=>$(Pe,C(e,{iconNode:d$,name:"circle-x"})),p$=f$,h$=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],g$=e=>$(Pe,C(e,{iconNode:h$,name:"clock"})),m$=g$,y$=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],b$=e=>$(Pe,C(e,{iconNode:y$,name:"copy"})),v$=b$,x$=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],$$=e=>$(Pe,C(e,{iconNode:x$,name:"ellipsis"})),w$=$$,k$=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],S$=e=>$(Pe,C(e,{iconNode:k$,name:"file"})),C$=S$,A$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],T$=e=>$(Pe,C(e,{iconNode:A$,name:"info"})),I$=T$,E$=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],_$=e=>$(Pe,C(e,{iconNode:E$,name:"loader"})),D$=_$,P$=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O$=e=>$(Pe,C(e,{iconNode:P$,name:"menu"})),M$=O$,F$=[["path",{d:"M5 12h14",key:"1ays0h"}]],z$=e=>$(Pe,C(e,{iconNode:F$,name:"minus"})),R$=z$,N$=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],L$=e=>$(Pe,C(e,{iconNode:N$,name:"paperclip"})),j$=L$,B$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],H$=e=>$(Pe,C(e,{iconNode:B$,name:"plus"})),W$=H$,U$=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],q$=e=>$(Pe,C(e,{iconNode:U$,name:"search"})),jl=q$,K$=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],V$=e=>$(Pe,C(e,{iconNode:K$,name:"send"})),G$=V$,Y$=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],X$=e=>$(Pe,C(e,{iconNode:Y$,name:"star"})),Z$=X$,J$=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Q$=e=>$(Pe,C(e,{iconNode:J$,name:"triangle-alert"})),ew=Q$,tw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],nw=e=>$(Pe,C(e,{iconNode:tw,name:"upload"})),rw=nw,ow=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iw=e=>$(Pe,C(e,{iconNode:ow,name:"x"})),sw=iw,aw=F('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>');const xd={spinner:D$},lw={"ui-check":Bx,"ui-chevron-down":Ux,"ui-chevron-up":Qx,"ui-chevron-left":Vx,"ui-chevron-right":Xx,"ui-selector":n$,"ui-close":sw,"ui-copy":v$,"ui-file":C$,"ui-minus":R$,"ui-add":W$,"ui-clock":m$,"ui-info":I$,"ui-success":i$,"ui-warning":ew,"ui-error":p$,"ui-stop":u$,"ui-attach":j$,"ui-send":G$,"ui-back":Fx,"ui-more":w$,"ui-menu":M$,"ui-search":jl,"ui-icon-placeholder":vd,calendar:Nx,search:jl,upload:rw,star:Z$};function cw(e,t){return Wv(e,t,lw)}const Fi=new WeakMap;function uw(e){if(Fi.has(e))return Fi.get(e);let t=null;if(typeof document<"u")try{Bt(n=>{const r=e({});if(r instanceof Element&&r.localName==="svg"&&r.classList.contains("lucide")){const o=Array.from(r.classList).filter(s=>s!=="lucide"&&s!=="lucide-icon"),i=Array.from(r.children).map(s=>{const a={};for(const l of Array.from(s.attributes))l.name!=="key"&&(a[l.name]=l.value);return[s.localName,a]});t={classes:o,nodes:i}}n()})}catch{t=null}return Fi.set(e,t),t}const Bl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();function dw(e){const[t,n]=Mr(e,["shape","size","class"]),r=()=>Object.keys(n).some(s=>s.startsWith("aria-")||s==="role"||s==="title"),o=()=>t.size??24,i=(s,a)=>s in n?n[s]:a;return(()=>{var s=aw();return D(s,C({get"aria-hidden"(){return r()?void 0:"true"}},n,{get width(){return i("width",o())},get height(){return i("height",o())},get class(){return Bl("lucide",Bl(...t.shape.classes,t.class))}}),!0,!0),x(s,$(xe,{get each(){return t.shape.nodes},children:([a,l])=>$(An,C({component:a},l))})),s})()}function ra(e){const[t,n]=Mr(e,["icon"]);return $(An,C({get component(){const r=t.icon,o=uw(r);return o?i=>$(dw,C({shape:o},i)):r}},n))}function tt(e){const[t,n]=Mr(e,["icons","name","size","class"]),r=()=>cw(t.icons,t.name);return $(ra,C({get icon(){return r()??vd},"aria-hidden":"true",get"data-icon"(){return t.name},get"data-icon-missing"(){return r()?void 0:"true"},get size(){return t.size},get class(){return t.class}},n))}const fw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Hl=new Map;function pw(e){let t=Hl.get(e);return t===void 0&&(t=e.includes("-")?e:e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^ms-/,"-ms-"),Hl.set(e,t)),t}function me(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e)){if(r==null||typeof r=="boolean"||r==="")continue;if(n.startsWith("--")){t[n]=String(r);continue}const o=n==="cssFloat"?"float":pw(n);t[o]=typeof r=="number"&&r!==0&&!fw.has(n)?`${r}px`:String(r).trim()}return t}const $d=e=>typeof e=="number"?e===0?"0":`${e}px`:e;var hw=F("<label>"),gw=F("<div>"),mw=F("<p>"),yw=F("<span>");function be(e){const t=ae(),n=qr(),r=j(()=>{const a={};for(const[l,c]of Object.entries(wr(e.node.component,e.props,t.extensionDefs)))typeof c!="object"&&(a[Ar(!1,l)]=String(c));return a}),o=()=>`${e.node.id}${n()}`,i=(a,l,c,u)=>{const d=e.node.component,f=u!==null?`${o()}.${a}.${u}`:wx[d]?.includes(a)?`${o()}.${a}`:null,g=[...t.states,...c.filter(v=>!!v)],p={};if(l)for(const[v,m]of Object.entries(l))m!=null&&(p[Ar(!1,v)]=String(m));return{class:`${t.compiled.scope} ${xn(d,a)}`,"data-xui-part":`${d}/${a}`,...f!==null?{"data-xui-id":f}:{},...r(),...p,...g.length?{"data-xs":g.join(" ")}:{}}},s=((a,...l)=>i(a,null,l,null));return s.with=(a,l,...c)=>i(a,l,c,null),s.at=(a,l,...c)=>i(a,null,c,l),s.atWith=(a,l,c,...u)=>i(a,c,u,l),Object.defineProperty(s,"domId",{get:o}),s}function Ze(e){const t=()=>zr(e.text);return Z(()=>Z(()=>!!t())()?(()=>{const n=e.as??"span";return n==="label"?(()=>{var r=hw();return D(r,C(()=>e.part,{get id(){return e.id},get for(){return e.htmlFor}}),!1,!0),x(r,t),r})():n==="div"?(()=>{var r=gw();return D(r,C(()=>e.part,{get id(){return e.id}}),!1,!0),x(r,t),r})():n==="p"?(()=>{var r=mw();return D(r,C(()=>e.part,{get id(){return e.id}}),!1,!0),x(r,t),r})():(()=>{var r=yw();return D(r,C(()=>e.part,{get id(){return e.id}}),!1,!0),x(r,t),r})()})():null)}function $e(e){const t=ae();return $(tt,{get icons(){return t.host.icons},get name(){return Gv(e.slot)},get class(){return e.class},get width(){return e.size},get height(){return e.size},get"data-slot"(){return e.slot}})}var bw=F("<div><span class=xui-sr-only></span><ul class=xui-form-summary-list>"),vw=F("<form><fieldset class=xui-form-fields>"),xw=F("<li>"),$w=F("<div>"),ww=F("<span class=xui-field-error>");const wd=sn(null),oa=sn(null);function kd(){return qt(wd)??null}function kw(e){const t=ae(),n=be(e),r=qt(oa)??null,o=new xx,[i,s]=X(0),[a,l]=X([]),c=()=>re(e.props.disabled),u=()=>re(e.props.busy),d=()=>{if(N(u))return;const p=o.check();if(!p.ok){s(v=>v+1),l(p.errors),p.first?.focus(),t.announce(t.t("invalidFields"),"assertive"),e.emit("invalid",{errors:p.errors});return}l([]),e.emit("submit",{values:p.values}),r?.()},f={register:p=>o.register(p),submit:d,changed:(p,v)=>{e.emit("change",{name:p,value:v})},get disabled(){return c()},get busy(){return u()},get attempts(){return i()}},g=j(()=>(t.data,i(),o.stillFailing(a())));return $(wd.Provider,{value:f,get children(){var p=vw(),v=p.firstChild;return D(p,C(()=>e.rootProps,{novalidate:!0,get"aria-busy"(){return u()||void 0},get"aria-disabled"(){return c()||void 0},get name(){return q(e.props.name)||void 0},onSubmit:m=>{m.preventDefault(),m.stopPropagation(),d()}}),!1,!0),x(p,$(ee,{get when(){return Z(()=>!!re(e.props.summary))()&&g().length},get children(){var m=bw(),b=m.firstChild,y=b.nextSibling;return D(m,C(()=>n("summary"),{role:"alert",get id(){return`${e.node.id}.summary`}}),!1,!0),x(b,()=>t.t("invalidFields")),x(y,$(xe,{get each(){return g()},children:h=>(()=>{var k=xw();return x(k,()=>h.message),k})()})),m}}),v),x(v,()=>e.children),te(()=>v.disabled=c()),p}})}function ct(e){const t=kd(),n=ae(),r=j(()=>Kv(e.props().checks,n.t("invalidValue"))),[o,i]=X(!1),[s,a]=X(!1),[l,c]=X(!1),u=j(()=>bx({validateOn:q(e.props().validateOn,yx(e.node().component)??"blur"),submitted:l(),attempts:t?.attempts??0,dirty:s(),touched:o()})),d=j(()=>q(e.props().name));he(()=>{const p=d(),v=e.domId();!t||!p||ce(t.register({name:p,domId:v,value:()=>N(e.value),errors:()=>N(r),focus:()=>e.focusEl()?.focus(),element:()=>e.focusEl()??null}))});const f=j(()=>u()?r():[]),g=()=>`${e.domId()}.error`;return{get errors(){return f()},get invalid(){return f().length>0},get errorId(){return g()},get describedBy(){return f().length?g():void 0},touch:()=>i(!0),change:p=>{a(!0);const v=N(d);t&&v&&t.changed(v,p)},submit:()=>{c(!0),t?.submit()},form:t}}function ut(e){return $(ee,{get when(){return e.field.errors.length},get children(){var t=$w();return D(t,C(()=>e.part("error"),{get id(){return e.field.errorId},role:"alert"}),!1,!0),x(t,$(xe,{get each(){return e.field.errors},children:n=>(()=>{var r=ww();return x(r,n),r})()})),t}})}const Wl=e=>e==null;function vs(e,t){te(n=>{const r=t()??{};for(const o in n)!(o in r)&&!Wl(n[o])&&e.removeAttribute(o);for(const o in r){const i=r[o];i!==n[o]&&(Wl(i)?e.removeAttribute(o):e.setAttribute(o,String(i)))}return r},{})}var Sw=F("<div>"),Cw=F("<div class=xui-list-item>"),Aw=F("<div class=xui-list-gap aria-hidden=true>");function Sd(e){let t;const n=new Map,r=new Map,o=new Map,i=new WeakMap;let s=null;const[a,l]=X(0),[c,u]=X(null,{equals:(I,R)=>I===R||!!I&&!!R&&I.scroll===R.scroll&&I.viewport===R.viewport}),d=()=>e.axis??"vertical",f=()=>d()==="horizontal",g=()=>f()&&e.direction==="rtl",p=()=>e.gap??0,v=()=>e.estimatedItemHeight??40,m=()=>{const I=v(),R=e.count,W=e.itemKey;if(typeof I=="number")return rm(Array.from({length:R},(L,Y)=>n.get(W(Y))),I);const H=new Array(R);for(let L=0;L<R;L++)H[L]=n.get(W(L))??I(L);return H};he(()=>{const I=f();if(typeof ResizeObserver>"u")return;const R=new ResizeObserver(W=>{let H=!1;for(const L of W){const Y=i.get(L.target),ne=L.borderBoxSize?.[0],se=ne?ne.inlineSize:L.contentRect.width,ue=ne?ne.blockSize:L.contentRect.height,oe=I?se:ue,ve=I?ue:se;Y===void 0||oe<=0||(n.get(Y)!==oe&&(n.set(Y,oe),H=!0),r.get(Y)!==ve&&(r.set(Y,ve),H=!0))}H&&l(L=>L+1)});s=R;for(const W of o.values())R.observe(W);ce(()=>{R.disconnect(),s=null})});const[b,y]=X(void 0);he(()=>{const I=b(),R=d(),W=g();if(!t||I===void 0)return;const H=t,L=()=>{const se=Ml(H,R,W,I);u({scroll:se.scroll,viewport:se.viewport})};L();const Y=I??window;Y.addEventListener("scroll",L,{passive:!0}),window.addEventListener("resize",L);const ne=typeof ResizeObserver>"u"?null:new ResizeObserver(L);ne&&(I&&ne.observe(I),ne.observe(H)),ce(()=>{Y.removeEventListener("scroll",L),window.removeEventListener("resize",L),ne?.disconnect()})});const h=j(()=>(a(),m())),k=j(()=>qs(h(),p())),w=j(()=>k()[e.count]??0);he(()=>{e.count,w();const I=d();if(!t)return;const R=pd(t,I);y(()=>R)});const _=()=>typeof window<"u"?f()?window.innerWidth:window.innerHeight:800,A=()=>c()?.scroll??0,S=()=>c()?.viewport||_(),E=j(()=>om(h(),p(),A(),S(),e.overscan??xu),void 0,{equals:(I,R)=>I.start===R.start&&I.end===R.end}),O=j(()=>[...e.stickyRows??[]].filter(I=>I>=0&&I<e.count).sort((I,R)=>I-R)),P=j(()=>O().length&&A()>=0?lm(k(),h(),O(),A()):null,void 0,{equals:(I,R)=>I===R||!!I&&!!R&&I.row===R.row&&I.offset===R.offset});let M=null;const z=(I,R)=>{if(!t||I<0||I>=e.count)return!1;const W=h(),H=Ml(t,d(),g());let L=-1;for(const oe of O())oe<=I&&(L=oe);const Y=L>=0&&L!==I?W[L]:0,se=im(W,p(),I,H.viewport,Math.max(0,H.scroll),R,Y)-H.scroll;if(Math.abs(se)<.5)return!1;const ue=f()?{left:g()?-se:se}:{top:se};return H.scroller?H.scroller.scrollBy(ue):window.scrollBy(ue),!0};he(_e([h,c],()=>{const I=M;I&&(I.tries++>=12?M=null:N(()=>z(I.index,I.align)))})),he(()=>{const I=b()??window,R=()=>{M=null},W=["wheel","touchstart","pointerdown","keydown"];for(const H of W)I.addEventListener(H,R,{passive:!0});ce(()=>{for(const H of W)I.removeEventListener(H,R)})}),e.ref?.({scrollToIndex:(I,R="nearest")=>{M={index:I,align:R,tries:0},N(()=>z(I,R))||(M=null)}});const K=I=>f()?g()?{right:0,transform:`translateX(${-I}px)`}:{left:0,transform:`translateX(${I}px)`}:{transform:`translateY(${I}px)`},J=j(()=>{const I=E(),R=P(),W=[];R&&(R.row<I.start||R.row>=I.end)&&W.push(R.row);for(let H=I.start;H<I.end;H++)W.push(H);return W}),U=j(()=>{const I=new Map;for(const R of J())I.set(e.itemKey(R),R);return I}),T=j(()=>[...U().keys()],void 0,{equals:(I,R)=>I.length===R.length&&I.every((W,H)=>W===R[H])}),B=j(()=>{a();let I=0;for(const R of T())I=Math.max(I,r.get(R)??0);return I}),G=()=>me(f()?{width:w(),height:B()||void 0}:{height:w()});return(()=>{var I=Sw(),R=t;return typeof R=="function"?ie(R,I):t=I,x(I,$(xe,{get each(){return T()},children:W=>{const H=j(ue=>U().get(W)??ue),L=()=>P()?.row===H(),Y=()=>L()?P().offset:k()[H()],ne=j(()=>H()>0&&e.divider?e.divider(H()):null),se=ue=>{e.itemProps&&vs(ue,()=>e.itemProps?.(H())),o.set(W,ue),i.set(ue,W),s?.observe(ue),ce(()=>{o.get(W)===ue&&o.delete(W),s?.unobserve(ue)})};return(()=>{var ue=Cw();return ie(se,ue),x(ue,(()=>{var oe=Z(()=>!!ne());return()=>oe()?(()=>{var ve=Aw();return x(ve,ne),te(de=>{var le=d(),Ae=me(f()?{[g()?"right":"left"]:-(p()/2)}:{top:-(p()/2)});return le!==de.e&&V(ve,"data-axis",de.e=le),de.t=De(ve,Ae,de.t),de},{e:void 0,t:void 0}),ve})():null})(),null),x(ue,()=>e.renderItem(H),null),te(oe=>{var ve=H(),de=L()&&P().offset!==k()[H()]?"":void 0,le=me({...K(Y()),...L()?{zIndex:1}:{}});return ve!==oe.e&&V(ue,"data-index",oe.e=ve),de!==oe.t&&V(ue,"data-pinned",oe.t=de),oe.a=De(ue,le,oe.a),oe},{e:void 0,t:void 0,a:void 0}),ue})()}})),te(W=>{var H=e.class?`xui-list-window ${e.class}`:"xui-list-window",L=d(),Y=G(),ne=E().start,se=E().end;return H!==W.e&&en(I,W.e=H),L!==W.t&&V(I,"data-axis",W.t=L),W.a=De(I,Y,W.a),ne!==W.o&&V(I,"data-window-start",W.o=ne),se!==W.i&&V(I,"data-window-end",W.i=se),W},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),I})()}var Un=F("<div>"),Tw=F("<div class=xui-list-row>"),Iw=F("<div class=xui-list-gap aria-hidden=true>"),Ew=F("<div><span> ");function _w(e){const t=()=>re(e.props.pressable)||!!e.node.on?.press,n=r=>{r.target===r.currentTarget&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),e.emit("press"))};return $(ee,{get when(){return t()},get fallback(){return(()=>{var r=Un();return D(r,C(()=>e.rootProps),!1,!0),x(r,()=>e.children),r})()},get children(){var r=Un();return D(r,C(()=>e.rootProps,{"data-pressable":"true",role:"button",tabindex:"0",onClick:()=>{e.emit("press")},onKeyDown:n}),!1,!0),x(r,()=>e.children),r}})}const Dw=Us;function Pw(e){const t=ae(),n=be(e),r=()=>re(e.props.divided),o=()=>e.props.direction==="horizontal",i=()=>q(e.props.gap,"none"),s=()=>t.theme.tokens,a=()=>i()==="none"?0:pe(s().spacing?.[i()],0),l=()=>pe(s().control?.hairline,1),c=()=>pe(s().control?.row,40),u=j(()=>Of(t,e.node,e.scope)),d=()=>e.node.children.length,f=()=>d()+(u()?.items.length??0),g=()=>q(e.props.sectionBy),p=j(()=>{const I=u();return g()&&I?sm(I.items.map(R=>Wr(t.data,R.path)),g()):null}),v=j(()=>{const I=[],R=d();for(let H=0;H<R;H++)I.push({item:H});const W=p();if(W)for(const H of am(W))I.push("header"in H?H:{item:R+H.item});else for(let H=R,L=f();H<L;H++)I.push({item:H});return I}),m=()=>re(e.props.stickyHeaders)&&p()!==null,b=()=>f()>Dw||m(),y=()=>a()+(r()?l():0),h=()=>i()==="none"?r()?`${l()}px`:void 0:r()?`calc(var(--xui-spacing-${i()}) + ${l()}px)`:`var(--xui-spacing-${i()})`,k=()=>zt(e.rootProps,{gap:b()?void 0:h()}),w=()=>o()&&t.direction==="rtl",_=j(()=>{const I=d(),R=e.node.children,W=u()?.items;return v().map(H=>"header"in H?`s:${H.header}`:H.item<I?R[H.item].id:`t:${W[H.item-I].key}`)}),A=I=>_()[I],S=I=>{if(!r()||I===0)return null;const R=v()[I],W=v()[I-1];return"item"in R&&"item"in W?R.item:null};let E,O;const P=I=>{const R=u()?d()+I:I;return v().findIndex(W=>"item"in W&&W.item===R)};he(()=>{const I=e.domId;ce(t.registerScroller(I,(R,W)=>{const H=P(R);if(!(H<0))if(b())E?.scrollToIndex(H,W);else{const L=O?.querySelector(`:scope > [data-xui-row="${H}"]`),Y=W==="center"?"center":W==="end"?"end":W==="start"?"start":"nearest";L?.scrollIntoView(o()?{inline:Y,block:"nearest"}:{block:Y,inline:"nearest"})}}))});const M=I=>$(Ow,{get row(){return v()[I()]},get node(){return e.node},get tpl(){return u()},get sections(){return p()},get childCount(){return d()},part:n}),z=()=>e.rootProps.role==="tree"?"tree":"list",K=()=>z()==="tree"?"treeitem":"listitem",J=I=>{const R=v()[I];return"item"in R?{role:K(),"aria-setsize":f(),"aria-posinset":R.item+1}:{role:K()}},U=I=>{const R=S(I);return R===null?null:(()=>{var W=Un();return D(W,C(()=>n.at("divider",R),{role:"separator"}),!1,!1),W})()},T=()=>o()?"horizontal":"vertical",B=j(()=>_(),void 0,{equals:(I,R)=>I.length===R.length&&I.every((W,H)=>W===R[H])}),G=j(()=>new Map(B().map((I,R)=>[I,R])));return $(ee,{get when(){return b()},get fallback(){return(()=>{var I=Un(),R=O;return typeof R=="function"?ie(R,I):O=I,D(I,C(()=>e.rootProps,{get style(){return k()},get role(){return z()}}),!1,!0),x(I,$(xe,{get each(){return B()},children:W=>{const H=j(Y=>G().get(W)??Y),L=j(()=>U(H()));return(()=>{var Y=Tw();return D(Y,C({get"data-axis"(){return T()},get"data-xui-row"(){return H()}},()=>J(H())),!1,!0),x(Y,(()=>{var ne=Z(()=>!!L());return()=>ne()?(()=>{var se=Iw();return x(se,L),te(ue=>{var oe=T(),ve=me(o()?{[w()?"right":"left"]:-(y()/2)}:{top:-(y()/2)});return oe!==ue.e&&V(se,"data-axis",ue.e=oe),ue.t=De(se,ve,ue.t),ue},{e:void 0,t:void 0}),se})():null})(),null),x(Y,()=>M(H),null),Y})()}})),I})()},get children(){var I=Un(),R=O;return typeof R=="function"?ie(R,I):O=I,D(I,C(()=>e.rootProps,{get style(){return k()},get role(){return z()}}),!1,!0),x(I,$(Sd,{ref:W=>E=W,get count(){return v().length},itemKey:A,get estimatedItemHeight(){return c()},get axis(){return T()},get direction(){return t.direction},get gap(){return y()},divider:U,get stickyRows(){return Z(()=>!!m())()?v().flatMap((W,H)=>"header"in W?[H]:[]):void 0},itemProps:J,renderItem:M})),I}})}function Ow(e){const t=j(()=>{const r=e.row;return"header"in r?`h${r.header}`:r.item<e.childCount?`c${r.item}`:`t${r.item-e.childCount}`}),n=r=>{const o=Number(r.slice(1));return r[0]==="h"?$(ee,{get when(){return e.sections?.[o]},get children(){return(()=>{const i=Vn(()=>e.sections?.[o]);return(()=>{var s=Un();return D(s,C(()=>e.part.at("section",o),{role:"heading","aria-level":3}),!1,!0),x(s,(()=>{var a=Z(()=>!!e.node.slots?.section);return()=>a()?$(Mw,{get value(){return{value:i().value,count:i().count,index:o}},get pointer(){return`${Do}/${e.node.id.replace(/[~/]/g,"_")}/sections/${o}`},suffix:`.${o}`,get node(){return e.node.slots.section}}):i().value})()),s})()})()}}):r[0]==="c"?$(At,{get node(){return e.node.children[o]}}):$(ee,{get when(){return Z(()=>!!e.tpl)()&&e.tpl.items[o]},get children(){return(()=>{const i=Vn(()=>e.tpl),s=Vn(()=>e.tpl?.items[o]);return $(Mf,{get tpl(){return i().tpl},get item(){return s()}})})()}})};return Z(()=>{const r=t();return N(()=>n(r))})}function Mw(e){const t=ae(),n=qr(),r=ta(t,{data:()=>$n(t.data,e.pointer,e.value),setData:()=>(o,i)=>{o!==e.pointer&&!o.startsWith(`${e.pointer}/`)&&t.setData(o,i)}});return $(Ur.Provider,{value:r,get children(){return $(ti.Provider,{value:()=>e.pointer,get children(){return $(ni.Provider,{value:()=>`${n()}${e.suffix}`,get children(){return $(At,{get node(){return e.node}})}})}})}})}function Fw(e){const t=ae(),n=be(e);return(()=>{var r=Ew(),o=r.firstChild,i=o.firstChild;return D(r,C(()=>e.rootProps,{role:"note",get"data-xui-unknown"(){return q(e.props.component,e.node.component)}}),!1,!0),x(r,$($e,{slot:"Unknown.root",size:16}),o),D(o,C(()=>n("label")),!1,!0),x(o,()=>t.t("unknownComponent"),i),x(o,()=>q(e.props.component,e.node.component),null),r})()}const zw=["Box","List","Resizable","Text","Markdown","CodeBlock","Image","Icon","Video","AudioPlayer","Avatar","Carousel","Tabs","Segmented","Accordion","Dialog","Drawer","Popover","Tooltip","Menu","Toast","Ring","Spinner","Skeleton","Table","Chart","Button","Link","Toggle","Form","Input","Textarea","NumberField","Checkbox","Radio","ChoiceTiles","Switch","Slider","Select","SearchList","ChipInput","DatePicker","DateRangePicker","TimePicker","FileUpload","Composer","TreeGuides","Unknown"];var Rw=F("<div>");function Nw(e){return(()=>{var t=Rw();return D(t,C(()=>e.rootProps,{get"data-xui-pending"(){return e.node.component}}),!1,!0),x(t,()=>e.children),t})()}function oi(e,t,n="image"){const r=j(()=>ix(e(),t(),n)),o=j(()=>r().fetched?r().key:""),[i,s]=X(null);return he(()=>{const a=o();if(!a)return;let l=!0;const{promise:c,release:u}=r().open();c.then(d=>l&&s({for:a,url:d}),()=>l&&s({for:a,error:!0})),ce(()=>{l=!1,u()})}),j(()=>{const a=r();if(!a.fetched)return{url:a.direct,error:a.denied};const l=i();return l?.for===a.key?{url:l.url,error:l.error===!0}:{url:void 0,error:!1}},void 0,{equals:(a,l)=>a.url===l.url&&a.error===l.error})}function zo(e,t,n="image"){const r=oi(e,t,n);return()=>r().url}var Lw=F("<div class=xui-Markdown-image role=img>"),Cd=F("<p class=xui-Markdown-paragraph>"),jw=F("<img alt>"),Bw=F("<span class=xui-Markdown-imageAlt>"),Hw=F("<a class=xui-Markdown-link target=_blank rel=noreferrer>"),Ww=F("<code class=xui-Markdown-code>"),Uw=F("<strong>"),qw=F("<em>"),Kw=F("<del>"),Vw=F("<span class=xui-Markdown-link data-denied>"),Gw=F("<li class=xui-Markdown-listItem>"),Yw=F("<input type=checkbox readonly>"),Xw=F("<ol>"),Zw=F("<ul>"),Jw=F("<pre class=xui-Markdown-codeBlock><code>"),Qw=F("<blockquote class=xui-Markdown-quote>"),e0=F("<table class=xui-Markdown-table><thead><tr></tr></thead><tbody>"),t0=F("<th>"),n0=F("<tr>"),r0=F("<td>"),o0=F("<hr>"),i0=F("<div>");function s0(e){const t=oi(()=>e.host,()=>e.src);return $(ee,{get when(){return sd(e.host,e.src)!==null},get fallback(){return Z(()=>!!e.alt)()?(()=>{var n=Cd();return x(n,()=>e.alt),n})():null},get children(){var n=Lw();return x(n,(()=>{var r=Z(()=>!!(t().url&&!t().error));return()=>r()?(()=>{var o=jw();return te(()=>V(o,"src",t().url)),o})():(()=>{var o=Bw();return x(o,()=>e.alt),o})()})()),te(()=>V(n,"aria-label",e.alt)),n}})}function a0(e){const t=n=>{e.host.openUrl&&(n.preventDefault(),e.host.openUrl(e.href))};return(()=>{var n=Hw();return n.$$click=t,x(n,()=>e.children),te(()=>V(n,"href",e.href)),n})()}function Jt(e,t){return e.map(n=>{if(typeof n=="string")return n;switch(n.type){case"code":return(()=>{var r=Ww();return x(r,()=>n.text),r})();case"strong":return(()=>{var r=Uw();return x(r,()=>Jt(n.children,t)),r})();case"em":return(()=>{var r=qw();return x(r,()=>Jt(n.children,t)),r})();case"del":return(()=>{var r=Kw();return x(r,()=>n.text),r})();case"link":{const r=ei(t,n.dest),o=Jt(n.children,t);return r?$(a0,{host:t,href:r,children:o}):(()=>{var i=Vw();return x(i,o),i})()}}return null})}function Ad(e,t){const n=e.items.map(r=>(()=>{var o=Gw();return x(o,(()=>{var i=Z(()=>r.task===void 0);return()=>i()?null:(()=>{var s=Yw();return te(()=>V(s,"checked",r.task?"":void 0)),te(()=>s.checked=r.task),s})()})(),null),x(o,()=>r.task===void 0?null:" ",null),x(o,()=>Jt(r.content,t),null),x(o,()=>r.children.map(i=>Ad(i,t)),null),te(()=>V(o,"data-task",r.task===void 0?void 0:r.task?"done":"todo")),o})());return e.ordered?(()=>{var r=Xw();return x(r,n),r})():(()=>{var r=Zw();return x(r,n),r})()}function l0(e,t){switch(e.type){case"paragraph":return(()=>{var n=Cd();return x(n,()=>Jt(e.children,t)),n})();case"image":return $(s0,{host:t,get src(){return e.src},get alt(){return e.alt}});case"codeBlock":return(()=>{var n=Jw(),r=n.firstChild;return x(r,()=>e.text),te(()=>V(n,"data-lang",e.lang)),n})();case"heading":return $(An,{get component(){return`h${Math.min(e.level,6)}`},class:"xui-Markdown-heading",get"data-level"(){return e.level},get children(){return Jt(e.children,t)}});case"quote":return(()=>{var n=Qw();return x(n,()=>Td(e.children,t)),n})();case"list":return Ad(e.list,t);case"table":return(()=>{var n=e0(),r=n.firstChild,o=r.firstChild,i=r.nextSibling;return x(o,$(xe,{get each(){return e.head},children:(s,a)=>(()=>{var l=t0();return x(l,()=>Jt(s,t)),te(c=>De(l,me(e.align[a()]?{textAlign:e.align[a()]}:void 0),c)),l})()})),x(i,$(xe,{get each(){return e.rows},children:s=>(()=>{var a=n0();return x(a,$(xe,{each:s,children:(l,c)=>(()=>{var u=r0();return x(u,()=>Jt(l,t)),te(d=>De(u,me(e.align[c()]?{textAlign:e.align[c()]}:void 0),d)),u})()})),a})()})),n})();case"rule":return o0()}return null}function Td(e,t){return e.map(n=>l0(n,t))}function c0(e,t={}){return Td(gx(e),t)}function u0(e){const t=j(()=>c0(e.text,e.host));return(()=>{var n=i0();return x(n,t),te(()=>en(n,e.class?`xui-md ${e.class}`:"xui-md")),n})()}Ct(["click"]);var Id=F("<span>"),d0=F("<div>");function f0(e){const t=()=>pe(e.props.lines,0),n=()=>e.props.align==="end"?"end":e.props.align==="center"?"center":e.props.align==="start"?"start":void 0,r=()=>e.props.live==="polite"||e.props.live==="assertive"?e.props.live:void 0;return(()=>{var o=Id();return D(o,C(()=>e.rootProps,{get"aria-live"(){return r()},get"aria-atomic"(){return r()?!0:void 0},get"data-xui-align"(){return n()},get"data-lines"(){return Z(()=>t()>0)()?t():void 0},get"data-clamp"(){return t()>1?"":void 0},get"data-xui-shimmer"(){return e.props.shimmer===!0?"":void 0},get style(){return zt(e.rootProps,t()>1?{WebkitLineClamp:t()}:void 0)}}),!1,!0),x(o,()=>zr(e.props.text)),o})()}function p0(e){const t=ae(),n=()=>zr(e.props.text),r=()=>pe(e.props.lines,0);return(()=>{var o=d0();return D(o,C(()=>e.rootProps,{get"data-lines"(){return Z(()=>r()>0)()?r():void 0},get style(){return zt(e.rootProps,r()>0?{WebkitLineClamp:r()}:void 0)}}),!1,!0),x(o,(()=>{var i=Z(()=>!!t.host.Markdown);return()=>i()?$(An,{get component(){return t.host.Markdown},get text(){return n()},class:"xui-md"}):$(u0,{get text(){return n()},get host(){return t.host}})})()),o})()}function h0(e){const t=ae(),n=()=>q(e.props.name,"ui-icon-placeholder"),r=()=>q(e.props.label);return(()=>{var o=Id();return D(o,C(()=>e.rootProps,{get role(){return r()?"img":void 0},get"aria-label"(){return r()||void 0},get"aria-hidden"(){return r()?void 0:!0}}),!1,!0),x(o,$(tt,{get icons(){return t.host.icons},get name(){return n()}})),o})()}function Me(e,t,n,r,o=i=>JSON.stringify(i)??""){const i=ae(),s=j(()=>Tr(e().props,n,t())),[a,l]=X(N(r)),c=j(()=>o(r()));let u=N(c);return Ut(_e(c,f=>{u!==f&&(u=f,l(()=>N(r)))},{defer:!0})),[a,(f,g=f)=>{l(()=>f),u=o(f);const p=N(s);p&&i.setData(p,g)},s]}var g0=F("<button>"),hr=F("<span>"),m0=F("<a>"),y0=F("<button type=button>");function b0(){const[e,t]=X(!1);let n=!0;return ce(()=>n=!1),{pending:e,track:o=>{o&&typeof o.then=="function"&&(t(!0),o.then(()=>n&&t(!1),()=>n&&t(!1)))}}}function v0(e){const[t,n]=X(!1);return he(()=>{if(!e()){n(!1);return}const r=setTimeout(()=>n(!0),Gg);ce(()=>clearTimeout(r))}),()=>e()&&t()}function x0(e){const t=ae(),n=be(e),r=kd(),o=()=>re(e.props.submit)&&r!==null,{pending:i,track:s}=b0(),a=()=>q(e.props.label),l=()=>q(e.props.icon),c=()=>re(e.props.loading)||i()||o()&&r.busy,u=()=>re(e.props.disabled)||c(),d=()=>e.props.size==="icon",f=()=>e.node.children.length>0,g=v0(c),p=()=>q(e.props.pendingLabel),v=()=>g()&&p()?p():a();let m;const b=j(()=>g()&&(m?.offsetWidth??0)||null);let y=!1;const h=()=>{const w=e.rootProps.style,_=g()?b():null,A=_?{...w??{},...me({minWidth:_})}:w;return A&&(y=!0),A??(y?{}:void 0)},k=()=>[...t.states??[],u()?"disabled":"",i()?"pending":""].filter(Boolean).join(" ")||void 0;return(()=>{var w=g0(),_=m;return typeof _=="function"?ie(_,w):m=w,D(w,C(()=>e.rootProps,{get style(){return h()},type:"button",get disabled(){return u()},get"aria-busy"(){return c()||void 0},get"data-pending"(){return g()?"true":void 0},get"aria-label"(){return Z(()=>!!(d()&&a()))()?a():void 0},get"data-xs"(){return k()},get"data-submit"(){return o()?"true":void 0},onClick:A=>{A.stopPropagation(),s(e.emit("press")),o()&&r.submit()}}),!1,!0),x(w,(()=>{var A=Z(()=>!!g());return()=>A()?(()=>{var S=hr();return D(S,C(()=>n("spinner")),!1,!0),x(S,$(ra,{get icon(){return xd.spinner},"aria-hidden":"true"})),S})():Z(()=>!!l())()?(()=>{var S=hr();return D(S,C(()=>n("icon")),!1,!0),x(S,$(tt,{get icons(){return t.host.icons},get name(){return l()}})),S})():null})(),null),x(w,$(ee,{get when(){return f()},get fallback(){return Z(()=>!!(!d()&&v()))()?(()=>{var A=hr();return D(A,C(()=>n("label")),!1,!0),x(A,v),A})():null},get children(){return e.children}}),null),w})()}function $0(e){const t=ae(),n=()=>q(e.props.href),r=()=>ei(t.host,n()),o=()=>re(e.props.external),i=()=>q(e.props.label)||n();return(()=>{var s=m0();return D(s,C(()=>e.rootProps,{get href(){return r()},get"data-denied"(){return n()&&!r()?"":void 0},get target(){return r()&&o()?"_blank":void 0},get rel(){return r()&&o()?"noreferrer noopener":void 0},onClick:a=>{const l=e.emit("press"),c=r();c?!o()&&l!==void 0?a.preventDefault():t.host.openUrl&&(a.preventDefault(),t.openUrl(c)):a.preventDefault()}}),!1,!0),x(s,i),s})()}function w0(e){const t=ae(),n=be(e),[r,o]=Me(()=>e.node,()=>e.scope,"pressed",()=>re(e.props.pressed)),i=()=>q(e.props.icon),s=()=>q(e.props.label);return(()=>{var a=y0();return D(a,C({get"aria-pressed"(){return r()},get"data-state"(){return r()?"on":"off"}},()=>e.rootProps,{get"aria-label"(){return Z(()=>!!(i()&&s()))()?s():void 0},onClick:()=>{const l=!r();o(l),e.emit("change",{pressed:l},{pressed:l})}}),!1,!0),x(a,(()=>{var l=Z(()=>!!i());return()=>l()?(()=>{var c=hr();return D(c,C(()=>n("icon")),!1,!0),x(c,$(tt,{get icons(){return t.host.icons},get name(){return i()}})),c})():null})(),null),x(a,(()=>{var l=Z(()=>!!s());return()=>l()?(()=>{var c=hr();return D(c,C(()=>n("label")),!1,!0),x(c,s),c})():null})(),null),a})()}const k0={Button:x0,Link:$0,Toggle:w0};function no(e,t=!1){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>t;const n=window.matchMedia(e),[r,o]=X(n.matches),i=()=>o(n.matches);return n.addEventListener?.("change",i),Es()&&ce(()=>n.removeEventListener?.("change",i)),r}function S0(e,t=0){const[n,r]=X({width:t,height:0,measured:!1});return he(()=>{const o=e();if(!o)return;const i=()=>{const a=o.getBoundingClientRect(),l=n();!l.measured&&a.width===0&&a.height===0||l.measured&&l.width===a.width&&l.height===a.height||r({width:a.width,height:a.height,measured:!0})};if(i(),typeof ResizeObserver>"u")return;const s=new ResizeObserver(i);s.observe(o),ce(()=>s.disconnect())}),n}var C0=F("<svg><path fill-rule=evenodd stroke=var(--xui-color-background) stroke-width=1></svg>",!1,!0,!1),zi=F("<svg><text></svg>",!1,!0,!1),A0=F("<svg><g><path fill=none stroke-linejoin=round stroke-linecap=round></svg>",!1,!0,!1),T0=F("<svg><path opacity=0.18></svg>",!1,!0,!1),I0=F("<svg><circle></svg>",!1,!0,!1),E0=F("<svg><rect></svg>",!1,!0,!1),Ul=F("<div>"),_0=F("<strong>"),D0=F("<span class=xui-chart-tip-row><i>"),P0=F("<span>"),O0=F("<svg><g></svg>",!1,!0,!1),M0=F("<svg><rect class=xui-chart-band fill=currentColor opacity=0.06></svg>",!1,!0,!1),ql=F("<svg><text text-anchor=middle></svg>",!1,!0,!1),F0=F("<svg><text x=0 y=0 text-anchor=middle></svg>",!1,!0,!1),z0=F("<svg><g><line stroke=currentColor stroke-width=1 opacity=0.6 shape-rendering=crispEdges></svg>",!1,!0,!1),R0=F("<caption>"),N0=F("<table class=xui-sr-only><thead><tr><th scope=col></th></tr></thead><tbody>"),L0=F("<div><div class=xui-chart-plot><svg role=img class=xui-chart-svg>"),j0=F("<svg><line></svg>",!1,!0,!1),B0=F("<svg><text dominant-baseline=middle></svg>",!1,!0,!1),H0=F("<span><i>"),W0=F("<th scope=col>"),U0=F("<tr><th scope=row>"),q0=F("<td>");const dn=(e,t)=>vn(Fm(e,t))??"currentColor",cr=11;function K0(e){const t=ae(),n=be(e),r=Ce(),o=()=>q(e.props.kind,"bar"),i=()=>o()==="sparkline",s=()=>o()==="pie"||o()==="donut",a=j(()=>Ne(e.props.series).map(U=>({name:q(U?.name),tone:U?.tone,values:nn(U?.values).map(T=>pe(T,NaN))}))),l=j(()=>nn(e.props.categories).map(String)),c=()=>Math.max(l().length,Math.max(0,...a().map(U=>U.values.length))),u=()=>Math.max(16,pe(e.props.height,i()?24:200)),d=()=>!i()&&!s()&&e.props.showAxes!==!1,f=()=>!i()&&!s()&&e.props.showGrid!==!1,g=()=>re(e.props.showValues),[p,v]=X(null),m=S0(p,320),b=U=>t.formatter.number(U),[y,h]=X(null);let k;const w=j(()=>{const U=o(),T=i(),B=s(),G=a(),I=c(),R=Math.max(40,m().width||320),W=Math.max(16,m().measured&&m().height>0?m().height:u()),H=Pm(U,G,e.props.min===void 0?void 0:pe(e.props.min),e.props.max===void 0?void 0:pe(e.props.max)),L=T||B?{min:H.min,max:H.max,step:0,ticks:[]}:Mm(H.min,H.max,5),Y=L.min,ne=L.max===L.min?L.min+1:L.max,se=L.ticks.map(ke=>b(ke)),ue=q(e.props.yLabel),oe=q(e.props.xLabel),ve=d(),de=g(),le={l:(ve?Math.max(...se.map(ke=>ke.length),1)*cr*.62+8:T?1:4)+(ue?16:0),r:T?1:8,t:T?2:de?16:8,b:(ve?cr+10:T?2:4)+(oe?16:0)},Ae=Math.max(1,R-le.l-le.r),Te=Math.max(1,W-le.t-le.b),Ie=ke=>le.t+Te-(Math.min(ne,Math.max(Y,ke))-Y)/(ne-Y)*Te,ze=Ae/Math.max(1,I),Gt=ke=>T?le.l+(I<=1?Ae/2:Ae*ke/(I-1)):le.l+ze*(ke+.5),dt=Ie(Math.max(Y,Math.min(ne,0))),nr=t.direction==="rtl"&&!B,rr=ke=>nr?R-ke:ke,ln=ke=>rr(Gt(ke)),mi=[],Gr=[],En=[],or=[];if(B){const ke=Math.min(Ae,Te)/2,Re=le.l+Ae/2,Oe=le.t+Te/2,Ke=U==="donut"?ke*zm:0,Be=(ke-Ke)/Math.max(1,G.length);G.forEach((Q,fe)=>{const ge=Ke+Be*fe,ye=ge+Be,Je=Q.values.reduce((nt,ft)=>nt+(Number.isFinite(ft)&&ft>0?ft:0),0)||1;let Ve=-Math.PI/2;Q.values.forEach((nt,ft)=>{const we=(Number.isFinite(nt)&&nt>0?nt:0)/Je,Ge=Ve+we*2*Math.PI;if(we>0){const pt=Ge-Ve>Math.PI?1:0,ht=(ar,Xr)=>`${Re+ar*Math.cos(Xr)},${Oe+ar*Math.sin(Xr)}`,Yr=we>=.9999?`M${Re-ye},${Oe} A${ye},${ye} 0 1 1 ${Re+ye},${Oe} A${ye},${ye} 0 1 1 ${Re-ye},${Oe} ${ge>0?`M${Re-ge},${Oe} A${ge},${ge} 0 1 0 ${Re+ge},${Oe} A${ge},${ge} 0 1 0 ${Re-ge},${Oe}`:""}Z`:ge>0?`M${ht(ye,Ve)} A${ye},${ye} 0 ${pt} 1 ${ht(ye,Ge)} L${ht(ge,Ge)} A${ge},${ge} 0 ${pt} 0 ${ht(ge,Ve)} Z`:`M${Re},${Oe} L${ht(ye,Ve)} A${ye},${ye} 0 ${pt} 1 ${ht(ye,Ge)} Z`,ir=(Ve+Ge)/2,sr=(ge+ye)/2;mi.push({si:fe,i:ft,d:Yr,label:de?{x:Re+sr*Math.cos(ir),y:Oe+sr*Math.sin(ir),v:nt}:null})}Ve=Ge})})}else if(U==="line"||U==="area"||T)G.forEach((ke,Re)=>{const Oe=ke.values.map((Be,Q)=>Number.isFinite(Be)?[ln(Q),Ie(Be)]:null).filter(Be=>Be!==null);if(Oe.length===0)return void En.push(null);const Ke=`M${Oe.map(Be=>Be.join(",")).join(" L")}`;En.push({si:Re,color:dn(Re,ke.tone),line:Ke,area:U==="area"?`${Ke} L${Oe[Oe.length-1][0]},${dt} L${Oe[0][0]},${dt} Z`:null,dots:T?[]:ke.values.flatMap((Be,Q)=>Number.isFinite(Be)?[{i:Q,cx:ln(Q),cy:Ie(Be)}]:[])})}),de&&G.forEach((ke,Re)=>ke.values.forEach((Oe,Ke)=>Number.isFinite(Oe)?or.push({si:Re,i:Ke,x:ln(Ke),y:Ie(Oe)-6,v:Oe}):void 0));else{const ke=U==="stackedBar",Re=ze*.72,Oe=ke?Re:Re/Math.max(1,G.length);for(let Ke=0;Ke<I;Ke++){let Be=0;G.forEach((Q,fe)=>{const ge=Q.values[Ke];if(!Number.isFinite(ge))return;const ye=le.l+ze*Ke+(ze-Re)/2+(ke?0:Oe*fe),Je=ke?Be:0,Ve=ke?Be+Math.max(0,ge):ge;ke&&(Be=Ve);const nt=Math.min(Ie(Je),Ie(Ve)),ft=Math.abs(Ie(Je)-Ie(Ve)),we=Math.max(1,Oe-(ke?0:2));Gr.push({si:fe,i:Ke,x:nr?R-ye-we:ye,y:nt,w:we,h:Math.max(0,ft),rx:ke?0:2,fill:dn(fe,Q.tone),label:de?{x:rr(ye+Oe/2),y:ke?nt+ft/2:nt-4,middle:ke,v:ge}:null})})}}return{width:R,height:W,ticks:L,tickText:se,yLabel:ue,xLabel:oe,pad:le,innerW:Ae,innerH:Te,y:Ie,slot:ze,zero:dt,rtl:nr,mx:rr,px:ln,arcs:mi,bars:Gr,lines:En,lineValues:or}}),_=()=>s()?l().map((U,T)=>({name:U,color:dn(T)})):a().map((U,T)=>({name:U.name,color:dn(T,U.tone)})),A=()=>e.props.showLegend!==!1&&!i()&&_().length>=2,S=()=>q(e.props.title),E=()=>{const U=Om(a()),T=t.t("chartSummary",{series:U.series,min:b(U.min),max:b(U.max)});return S()?`${S()}: ${T}`:T},O=U=>{const T=c();if(T!==0)if(U.key==="ArrowRight"||U.key==="ArrowLeft"){U.preventDefault();const B=t.direction==="rtl",G=U.key==="ArrowRight"!==B?1:-1;h(I=>I===null?G>0?0:T-1:(I+G+T)%T)}else U.key==="Home"?h(0):U.key==="End"?h(T-1):U.key==="Escape"&&h(null)},P=U=>{const T=c();if(s()||T===0)return;const B=k?.getBoundingClientRect();if(!B)return;const G=w(),I=(G.rtl?B.right-U.clientX:U.clientX-B.left)-G.pad.l,R=i()?Math.round(I/G.innerW*(T-1)):Math.floor(I/G.slot);h(R>=0&&R<T?R:null)},M=(U,T)=>y()===null||y()===U?1:T,z=()=>n("valueLabel"),K=()=>{const U=w();return s()?[Z(()=>U.arcs.map(T=>(()=>{var B=C0();return B.addEventListener("pointerenter",()=>h(T.i)),te(G=>{var I=T.d,R=dn(T.i),W=T.i,H=y()===T.i?"":void 0,L=M(T.i,.55);return I!==G.e&&V(B,"d",G.e=I),R!==G.t&&V(B,"fill",G.t=R),W!==G.a&&V(B,"data-category",G.a=W),H!==G.o&&V(B,"data-active",G.o=H),L!==G.i&&V(B,"opacity",G.i=L),G},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),B})())),Z(()=>U.arcs.map(T=>T.label?(()=>{var B=zi();return D(B,C(z,{get x(){return T.label.x},get y(){return T.label.y},"text-anchor":"middle","dominant-baseline":"middle"}),!0,!0),x(B,()=>b(T.label.v)),B})():null))]:o()==="line"||o()==="area"||i()?[Z(()=>U.lines.map(T=>T?(()=>{var B=A0(),G=B.firstChild;return x(B,(()=>{var I=Z(()=>T.area!==null);return()=>I()?(()=>{var R=T0();return te(W=>{var H=T.area,L=T.color;return H!==W.e&&V(R,"d",W.e=H),L!==W.t&&V(R,"fill",W.t=L),W},{e:void 0,t:void 0}),R})():null})(),G),x(B,()=>T.dots.map(I=>(()=>{var R=I0();return te(W=>{var H=I.cx,L=I.cy,Y=y()===I.i?4:2.5,ne=T.color;return H!==W.e&&V(R,"cx",W.e=H),L!==W.t&&V(R,"cy",W.t=L),Y!==W.a&&V(R,"r",W.a=Y),ne!==W.o&&V(R,"fill",W.o=ne),W},{e:void 0,t:void 0,a:void 0,o:void 0}),R})()),null),te(I=>{var R=T.si,W=T.line,H=T.color,L=i()?1.5:2;return R!==I.e&&V(B,"data-series",I.e=R),W!==I.t&&V(G,"d",I.t=W),H!==I.a&&V(G,"stroke",I.a=H),L!==I.o&&V(G,"stroke-width",I.o=L),I},{e:void 0,t:void 0,a:void 0,o:void 0}),B})():null)),Z(()=>U.lineValues.map(T=>(()=>{var B=zi();return D(B,C(z,{get x(){return T.x},get y(){return T.y},"text-anchor":"middle"}),!0,!0),x(B,()=>b(T.v)),B})()))]:[Z(()=>U.bars.map(T=>(()=>{var B=E0();return te(G=>{var I=T.x,R=T.y,W=T.w,H=T.h,L=T.rx,Y=T.fill,ne=M(T.i,.6);return I!==G.e&&V(B,"x",G.e=I),R!==G.t&&V(B,"y",G.t=R),W!==G.a&&V(B,"width",G.a=W),H!==G.o&&V(B,"height",G.o=H),L!==G.i&&V(B,"rx",G.i=L),Y!==G.n&&V(B,"fill",G.n=Y),ne!==G.s&&V(B,"opacity",G.s=ne),G},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),B})())),Z(()=>U.bars.map(T=>T.label?(()=>{var B=zi();return D(B,C(z,{get x(){return T.label.x},get y(){return T.label.y},"text-anchor":"middle",get"dominant-baseline"(){return T.label.middle?"middle":void 0}}),!0,!0),x(B,()=>b(T.label.v)),B})():null))]},J=()=>{const U=y();if(U===null||U>=c())return null;const T=w(),B=s()?T.pad.l+T.innerW/2:T.px(U),G=l()[U];return(()=>{var I=Ul();return D(I,C(()=>n("tooltip"),{role:"presentation",get style(){return me({position:"absolute",left:Math.min(Math.max(0,B-60),T.width-120),top:T.pad.t,pointerEvents:"none"})},"data-category":U}),!1,!0),x(I,G?(()=>{var R=_0();return x(R,G),R})():null,null),x(I,()=>a().map((R,W)=>(()=>{var H=D0(),L=H.firstChild;return x(H,(()=>{var Y=Z(()=>!!R.name);return()=>Y()?`${R.name}: `:""})(),null),x(H,(()=>{var Y=Z(()=>!!Number.isFinite(R.values[U]));return()=>Y()?b(R.values[U]):"—"})(),null),te(Y=>De(L,me({background:s()?dn(U):dn(W,R.tone)}),Y)),H})()),null),I})()};return(()=>{var U=L0(),T=U.firstChild,B=T.firstChild;D(U,C(()=>e.rootProps,{get style(){return zt(e.rootProps,{height:u()})},get"data-kind"(){return o()},get"data-mirrored"(){return w().rtl?"true":void 0}}),!1,!0),x(U,$(ee,{get when(){return S()},get children(){var I=P0();return D(I,C(()=>n("title"),{id:`${r}-title`}),!1,!0),x(I,S),I}}),T),ie(v,T),B.addEventListener("blur",()=>h(null)),B.addEventListener("pointerleave",()=>h(null)),B.$$pointermove=I=>i()?void 0:P(I),B.$$keydown=I=>i()?void 0:O(I);var G=k;return typeof G=="function"?ie(G,B):k=B,x(B,$(ee,{get when(){return f()},get children(){var I=O0();return D(I,C(()=>n("grid"),{stroke:"currentColor","stroke-width":1,"shape-rendering":"crispEdges"}),!0,!0),x(I,$(xe,{get each(){return w().ticks.ticks},children:R=>(()=>{var W=j0();return te(H=>{var L=w().mx(w().pad.l),Y=w().mx(w().width-w().pad.r),ne=Math.round(w().y(R))+.5,se=Math.round(w().y(R))+.5;return L!==H.e&&V(W,"x1",H.e=L),Y!==H.t&&V(W,"x2",H.t=Y),ne!==H.a&&V(W,"y1",H.a=ne),se!==H.o&&V(W,"y2",H.o=se),H},{e:void 0,t:void 0,a:void 0,o:void 0}),W})()})),I}}),null),x(B,$(ee,{get when(){return Z(()=>!s()&&y()!==null)()&&!i()},get children(){var I=M0();return te(R=>{var W=w().rtl?w().width-w().pad.l-w().slot*(y()+1):w().pad.l+w().slot*y(),H=w().pad.t,L=w().slot,Y=w().innerH;return W!==R.e&&V(I,"x",R.e=W),H!==R.t&&V(I,"y",R.t=H),L!==R.a&&V(I,"width",R.a=L),Y!==R.o&&V(I,"height",R.o=Y),R},{e:void 0,t:void 0,a:void 0,o:void 0}),I}}),null),x(B,K,null),x(B,$(ee,{get when(){return d()},get children(){var I=z0(),R=I.firstChild;return D(I,C(()=>n("axis"),{fill:"currentColor","font-size":11}),!0,!0),x(I,$(Pt,{get each(){return w().ticks.ticks},children:(W,H)=>(()=>{var L=B0();return x(L,()=>w().tickText[H]),te(Y=>{var ne=w().mx(w().pad.l-6),se=w().y(W()),ue=w().rtl?"start":"end";return ne!==Y.e&&V(L,"x",Y.e=ne),se!==Y.t&&V(L,"y",Y.t=se),ue!==Y.a&&V(L,"text-anchor",Y.a=ue),Y},{e:void 0,t:void 0,a:void 0}),L})()}),null),x(I,$(Pt,{get each(){return l()},children:(W,H)=>(()=>{var L=ql();return x(L,W),te(Y=>{var ne=w().px(H),se=w().pad.t+w().innerH+cr+4;return ne!==Y.e&&V(L,"x",Y.e=ne),se!==Y.t&&V(L,"y",Y.t=se),Y},{e:void 0,t:void 0}),L})()}),null),x(I,$(ee,{get when(){return w().xLabel},get children(){var W=ql();return x(W,()=>w().xLabel),te(H=>{var L=w().mx(w().pad.l+w().innerW/2),Y=w().height-3;return L!==H.e&&V(W,"x",H.e=L),Y!==H.t&&V(W,"y",H.t=Y),H},{e:void 0,t:void 0}),W}}),null),x(I,$(ee,{get when(){return w().yLabel},get children(){var W=F0();return x(W,()=>w().yLabel),te(()=>V(W,"transform",`translate(${w().rtl?w().width-cr:cr}, ${w().pad.t+w().innerH/2}) rotate(${w().rtl?90:-90})`)),W}}),null),te(W=>{var H=w().mx(w().pad.l),L=w().mx(w().width-w().pad.r),Y=w().zero,ne=w().zero;return H!==W.e&&V(R,"x1",W.e=H),L!==W.t&&V(R,"x2",W.t=L),Y!==W.a&&V(R,"y1",W.a=Y),ne!==W.o&&V(R,"y2",W.o=ne),W},{e:void 0,t:void 0,a:void 0,o:void 0}),I}}),null),x(T,J,null),x(U,$(ee,{get when(){return A()},get children(){var I=Ul();return D(I,C(()=>n("legend")),!1,!0),x(I,$(xe,{get each(){return _()},children:R=>(()=>{var W=H0(),H=W.firstChild;return x(W,()=>R.name,null),te(L=>De(H,me({background:R.color}),L)),W})()})),I}}),null),x(U,$(ee,{get when(){return!i()},get children(){var I=N0(),R=I.firstChild,W=R.firstChild;W.firstChild;var H=R.nextSibling;return x(I,$(ee,{get when(){return S()},get children(){var L=R0();return x(L,S),L}}),R),x(W,$(xe,{get each(){return a()},children:L=>(()=>{var Y=W0();return x(Y,()=>L.name),Y})()}),null),x(H,$(xe,{get each(){return Array.from({length:c()},(L,Y)=>Y)},children:L=>(()=>{var Y=U0(),ne=Y.firstChild;return x(ne,()=>l()[L]??String(L+1)),x(Y,$(xe,{get each(){return a()},children:se=>(()=>{var ue=q0();return x(ue,(()=>{var oe=Z(()=>!!Number.isFinite(se.values[L]));return()=>oe()?b(se.values[L]):""})()),ue})()}),null),Y})()})),I}}),null),te(I=>{var R=w().width,W=w().height,H=`0 0 ${w().width} ${w().height}`,L=E(),Y=i()?void 0:0;return R!==I.e&&V(B,"width",I.e=R),W!==I.t&&V(B,"height",I.t=W),H!==I.a&&V(B,"viewBox",I.a=H),L!==I.o&&V(B,"aria-label",I.o=L),Y!==I.i&&V(B,"tabindex",I.i=Y),I},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),U})()}const V0={Chart:K0};Ct(["keydown","pointermove"]);function ia(e){let t=null;const n=(r,o)=>e.style.setProperty(r,o===void 0?"":o);return r=>{if(t){for(const o of Object.keys(t))o in r||n(o,"");for(const o of Object.keys(r))t[o]!==r[o]&&n(o,r[o])}else for(const o of Object.keys(r))n(o,r[o]);t={...r}}}function _r(e,t){const n=ia(e);te(()=>n(t()))}function rn(e){return $(ee,{get when(){return e.mount},children:t=>{const n=t(),r=$o(()=>e.children),o=document.createTextNode("");return n.appendChild(o),x(n,r,o),ce(()=>{for(const i of[r()].flat(1/0))i instanceof Node&&i.parentNode===n&&n.removeChild(i);o.remove()}),null}})}function Ed(e,t){e.appendChild(t),ce(()=>t.parentNode?.removeChild(t))}function wn(e){const[t,n]=X(N(e));let r,o="none",i;const s=a=>getComputedStyle(a).animationName||"none";return he(_e(e,a=>{if(i?.(),i=void 0,a){n(!0);return}const l=r;if(!l||!l.isConnected)return n(!1);const c=getComputedStyle(l),u=c.animationName||"none";if(u==="none"||c.display==="none"||u===o)return n(!1);const d=f=>{f.target!==l||!s(l).split(",").map(g=>g.trim()).includes(f.animationName)||(i?.(),n(!1))};l.addEventListener("animationend",d),l.addEventListener("animationcancel",d),i=()=>{l.removeEventListener("animationend",d),l.removeEventListener("animationcancel",d)}},{defer:!0})),ce(()=>i?.()),{mounted:t,ref:a=>{r=a,a.addEventListener("animationstart",l=>{l.target===a&&N(e)&&(o=s(a))})}}}const Rt=[],Tt=[],[G0,Kl]=X(0);let Vl="";const ii=sn();function xs(e,t){if(!t)return!1;if(e.el?.contains(t))return!0;for(const n of e.kids)if(xs(n,t))return!0;return!1}const Gl=e=>{const t={target:e.target,detail:{originalEvent:e},defaultPrevented:!1,preventDefault:()=>t.defaultPrevented=!0};return t};function si(e){const t=qt(ii),n={parent:t,kids:new Set},r=()=>e.disableOutsidePointerEvents?.()??!1,o=()=>{const a=Tt[Tt.length-1];return Rt.indexOf(n)>=(a?Rt.indexOf(a):-1)};return{layer:n,attach:a=>{n.el=a;const l=a.ownerDocument,c=N(r);c&&(Tt.length===0&&(Vl=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),Tt.push(n)),Rt.push(n),t?.kids.add(n),Kl(v=>v+1);let u;const d=v=>{if(v.target&&!xs(n,v.target)){const m=()=>{if(!o())return;const b=Gl(v);e.onPointerDownOutside?.(b),e.onInteractOutside?.(b),b.defaultPrevented||e.onDismiss()};v.pointerType==="touch"?(u&&l.removeEventListener("click",u),u=m,l.addEventListener("click",u,{once:!0})):m()}else u&&l.removeEventListener("click",u)},f=v=>{if(!v.target||xs(n,v.target))return;const m=Gl(v);e.onFocusOutside?.(m),e.onInteractOutside?.(m),m.defaultPrevented||e.onDismiss()},g=v=>{v.key==="Escape"&&Rt.indexOf(n)===Rt.length-1&&(e.onEscapeKeyDown?.(v),v.defaultPrevented||(v.preventDefault(),e.onDismiss()))},p=setTimeout(()=>l.addEventListener("pointerdown",d),0);l.addEventListener("focusin",f),l.addEventListener("keydown",g,{capture:!0}),ce(()=>{clearTimeout(p),l.removeEventListener("pointerdown",d),u&&l.removeEventListener("click",u),l.removeEventListener("focusin",f),l.removeEventListener("keydown",g,{capture:!0}),c&&Tt.length===1&&(l.body.style.pointerEvents=Vl),Rt.splice(Rt.indexOf(n),1);const v=Tt.indexOf(n);v>=0&&Tt.splice(v,1),t?.kids.delete(n),Kl(m=>m+1)})},pointerEvents:a=>{if(G0(),Tt.length===0)return;const l=Tt[Tt.length-1];return(a?Rt.indexOf(n):-1)>=Rt.indexOf(l)?"auto":"none"}}}const ur=[];function _d(e){Le(()=>{const t=e.layer();if(!t)return;ur.push(t);const n=a=>a instanceof Node&&(t.contains(a)||!!e.isInside?.(a)),r=a=>{a.key!=="Escape"||ur[ur.length-1]!==t||(a.preventDefault(),a.stopImmediatePropagation(),e.onDismiss())},o=a=>{n(a.target)||(e.onOutside?.(),e.onDismiss())},i=a=>{e.keepOnFocusOutside||n(a.target)||(e.onOutside?.(),e.onDismiss())};document.addEventListener("keydown",r,{capture:!0}),document.addEventListener("focusin",i);const s=window.setTimeout(()=>document.addEventListener("pointerdown",o));ce(()=>{window.clearTimeout(s),document.removeEventListener("keydown",r,{capture:!0}),document.removeEventListener("focusin",i),document.removeEventListener("pointerdown",o);const a=ur.indexOf(t);a>=0&&ur.splice(a,1)})})}let gn=[];const Y0=e=>{const t=gn[0];t&&t!==e&&(t.paused=!0),gn=[e,...gn.filter(n=>n!==e)]},X0=e=>{gn=gn.filter(t=>t!==e),gn[0]&&(gn[0].paused=!1)};function Yl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r,i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xl(e,t){if(e&&getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xt(e,t=!1){if(!e?.focus)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&t&&e instanceof HTMLInputElement&&"select"in e&&e.select()}function Ro(e,t=!1){const n=document.activeElement;for(const r of e)if(Xt(r,t),document.activeElement!==n)return}const Ri="focusScope.autoFocusOnMount",Ni="focusScope.autoFocusOnUnmount";function sa(e){const t={paused:!1};let n;return{attach:i=>{let s=!1,a=!1,l=null,c=null;const u=g=>{if(!N(e.trapped)||t.paused)return;const p=g.target;i.contains(p)?c=p:Xt(c,!0)},d=g=>{if(!N(e.trapped)||t.paused)return;const p=g.relatedTarget;p!==null&&(i.contains(p)||Xt(c,!0))},f=new MutationObserver(g=>{if(!(!N(e.trapped)||t.paused)&&document.activeElement===document.body)for(const p of g)p.removedNodes.length>0&&Xt(i)});queueMicrotask(()=>{if(!(a||!i.isConnected)){if(s=!0,n=i,Y0(t),l=document.activeElement,!i.contains(l)){const g=new CustomEvent(Ri,{bubbles:!1,cancelable:!0}),p=v=>e.onMountAutoFocus?.(v);i.addEventListener(Ri,p),i.dispatchEvent(g),i.removeEventListener(Ri,p),g.defaultPrevented||(Ro(Yl(i).filter(v=>v.tagName!=="A"),!0),document.activeElement===l&&Xt(i))}document.addEventListener("focusin",u),document.addEventListener("focusout",d),f.observe(i,{childList:!0,subtree:!0})}}),ce(()=>{if(a=!0,!s)return;document.removeEventListener("focusin",u),document.removeEventListener("focusout",d),f.disconnect();const g=l;setTimeout(()=>{const p=new CustomEvent(Ni,{bubbles:!1,cancelable:!0}),v=m=>e.onUnmountAutoFocus?.(m);i.addEventListener(Ni,v),i.dispatchEvent(p),p.defaultPrevented||Xt(g??document.body,!0),i.removeEventListener(Ni,v),X0(t)},0)})},onKeyDown:i=>{if(!e.loop&&!N(e.trapped)||t.paused||!n)return;const s=i.key==="Tab"&&!i.altKey&&!i.ctrlKey&&!i.metaKey,a=document.activeElement;if(!s||!a)return;const l=Yl(n),c=l.find(d=>!Xl(d,n)),u=[...l].reverse().find(d=>!Xl(d,n));!c||!u?a===n&&i.preventDefault():!i.shiftKey&&a===u?(i.preventDefault(),e.loop&&Xt(c,!0)):i.shiftKey&&a===c&&(i.preventDefault(),e.loop&&Xt(u,!0))}}}let Li=0;function Zl(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function aa(){const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??Zl()),document.body.insertAdjacentElement("beforeend",e[1]??Zl()),Li++,ce(()=>{Li===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Li--})}const Fn="data-scroll-locked";let ro=0,fn=null;function Dd(){const e=document.body,t=()=>{const n=parseInt(e.getAttribute(Fn)||"0",10);return isFinite(n)?n:0};if(e.setAttribute(Fn,String(t()+1)),ro===0){const n=getComputedStyle(e),r=u=>parseInt(u||"",10)||0,[o,i,s]=[r(n.marginLeft),r(n.marginTop),r(n.marginRight)],a=Math.max(0,window.innerWidth-document.documentElement.clientWidth+s-o),l="!important",c=`
427
+ .with-scroll-bars-hidden {
428
+ overflow: hidden ${l};
429
+ padding-right: ${a}px ${l};
430
+ }
431
+ body[${Fn}] {
432
+ overflow: hidden ${l};
433
+ overscroll-behavior: contain;
434
+ ${[`position: relative ${l};`,`
435
+ padding-left: ${o}px;
436
+ padding-top: ${i}px;
437
+ padding-right: ${s}px;
438
+ margin-left:0;
439
+ margin-top:0;
440
+ margin-right: ${a}px ${l};
441
+ `].join("")}
442
+ }
443
+
444
+ .right-scroll-bar-position {
445
+ right: ${a}px ${l};
446
+ }
447
+
448
+ .width-before-scroll-bar {
449
+ margin-right: ${a}px ${l};
450
+ }
451
+
452
+ .right-scroll-bar-position .right-scroll-bar-position {
453
+ right: 0 ${l};
454
+ }
455
+
456
+ .width-before-scroll-bar .width-before-scroll-bar {
457
+ margin-right: 0 ${l};
458
+ }
459
+
460
+ body[${Fn}] {
461
+ --removed-body-scroll-bar-size: ${a}px;
462
+ }
463
+ `;fn=document.createElement("style"),fn.type="text/css",fn.appendChild(document.createTextNode(c)),(document.head||document.getElementsByTagName("head")[0]).appendChild(fn)}ro++,ce(()=>{const n=t()-1;n<=0?e.removeAttribute(Fn):e.setAttribute(Fn,String(n)),ro--,!ro&&fn&&(fn.remove(),fn=null)})}var Z0=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zn=new WeakMap,oo=new WeakMap,io={},ji=0,Pd=function(e){return e&&(e.host||Pd(e.parentNode))},J0=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Q0=function(e,t,n,r){var o=J0(t,Array.isArray(e)?e:[e]);io[n]||(io[n]=new WeakMap);var i=io[n],s=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var g=f.getAttribute(r),p=g!==null&&g!=="false",v=(zn.get(f)||0)+1,m=(i.get(f)||0)+1;zn.set(f,v),i.set(f,m),s.push(f),v===1&&p&&oo.set(f,!0),m===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return u(t),a.clear(),ji++,function(){s.forEach(function(d){var f=zn.get(d)-1,g=i.get(d)-1;zn.set(d,f),i.set(d,g),f||(oo.has(d)||d.removeAttribute(r),oo.delete(d)),g||d.removeAttribute(n)}),ji--,ji||(zn=new WeakMap,zn=new WeakMap,oo=new WeakMap,io={})}},ek=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Z0(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Q0(r,o,n,"aria-hidden")):function(){return null}};function Od(e,t){const n=ek(e);ce(n),t&&Dd()}const Yn=Math.min,it=Math.max,No=Math.round,so=Math.floor,Ot=e=>({x:e,y:e}),tk={left:"right",right:"left",bottom:"top",top:"bottom"};function Jl(e,t,n){return it(e,Yn(t,n))}function kn(e,t){return typeof e=="function"?e(t):e}function Wt(e){return e.split("-")[0]}function Kr(e){return e.split("-")[1]}function la(e){return e==="x"?"y":"x"}function Md(e){return e==="y"?"height":"width"}function Dt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fd(e){return la(Dt(e))}function nk(e,t,n){n===void 0&&(n=!1);const r=Kr(e),o=Fd(e),i=Md(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Lo(s)),[s,Lo(s)]}function rk(e){const t=Lo(e);return[$s(e),t,$s(t)]}function $s(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ql=["left","right"],ec=["right","left"],ok=["top","bottom"],ik=["bottom","top"];function sk(e,t,n){switch(e){case"top":case"bottom":return n?t?ec:Ql:t?Ql:ec;case"left":case"right":return t?ok:ik;default:return[]}}function ak(e,t,n,r){const o=Kr(e);let i=sk(Wt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map($s)))),i}function Lo(e){const t=Wt(e);return tk[t]+e.slice(t.length)}function lk(e){return{top:0,right:0,bottom:0,left:0,...e}}function ck(e){return typeof e!="number"?lk(e):{top:e,right:e,bottom:e,left:e}}function jo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function tc(e,t,n){let{reference:r,floating:o}=e;const i=Dt(t),s=Fd(t),a=Md(s),l=Wt(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:d};break;case"left":g={x:r.x-o.width,y:d};break;default:g={x:r.x,y:r.y}}switch(Kr(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}async function uk(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:g=0}=kn(t,e),p=ck(g),m=a[f?d==="floating"?"reference":"floating":d],b=jo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,h=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(h))?await(i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},w=jo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:h,strategy:l}):y);return{top:(b.top-w.top+p.top)/k.y,bottom:(w.bottom-b.bottom+p.bottom)/k.y,left:(b.left-w.left+p.left)/k.x,right:(w.right-b.right+p.right)/k.x}}const dk=50,fk=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:uk},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=tc(c,r,l),f=r,g=0;const p={};for(let v=0;v<i.length;v++){const m=i[v];if(!m)continue;const{name:b,fn:y}=m,{x:h,y:k,data:w,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=h??u,d=k??d,p[b]={...p[b],...w},_&&g<dk&&(g++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:u,y:d}=tc(c,f,l)),v=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}},pk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...m}=kn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Wt(o),y=Dt(a),h=Wt(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(h||!v?[Lo(a)]:rk(a)),_=p!=="none";!f&&_&&w.push(...ak(a,v,p,k));const A=[a,...w],S=await l.detectOverflow(t,m),E=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&E.push(S[b]),d){const K=nk(o,s,k);E.push(S[K[0]],S[K[1]])}if(O=[...O,{placement:o,overflows:E}],!E.every(K=>K<=0)){var P,M;const K=(((P=i.flip)==null?void 0:P.index)||0)+1,J=A[K];if(J&&(!(d==="alignment"?y!==Dt(J):!1)||O.every(B=>Dt(B.placement)===y?B.overflows[0]>0:!0)))return{data:{index:K,overflows:O},reset:{placement:J}};let U=(M=O.filter(T=>T.overflows[0]<=0).sort((T,B)=>T.overflows[1]-B.overflows[1])[0])==null?void 0:M.placement;if(!U)switch(g){case"bestFit":{var z;const T=(z=O.filter(B=>{if(_){const G=Dt(B.placement);return G===y||G==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(G=>G>0).reduce((G,I)=>G+I,0)]).sort((B,G)=>B[1]-G[1])[0])==null?void 0:z[0];T&&(U=T);break}case"initialPlacement":U=a;break}if(o!==U)return{reset:{placement:U}}}return{}}}},zd=new Set(["left","top"]);async function hk(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Wt(n),a=Kr(n),l=Dt(n)==="y",c=zd.has(s)?-1:1,u=i&&l?-1:1,d=kn(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(g=a==="end"?p*-1:p),l?{x:g*u,y:f*c}:{x:f*c,y:g*u}}const gk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await hk(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},mk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:b=>{let{x:y,y:h}=b;return{x:y,y:h}}},...c}=kn(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=Dt(Wt(o)),g=la(f);let p=u[g],v=u[f];if(s){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=p+d[b],k=p-d[y];p=Jl(h,p,k)}if(a){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",h=v+d[b],k=v-d[y];v=Jl(h,v,k)}const m=l.fn({...t,[g]:p,[f]:v});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[g]:s,[f]:a}}}}}},yk=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=kn(e,t),u={x:n,y:r},d=Dt(o),f=la(d);let g=u[f],p=u[d];const v=kn(a,t),m=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const h=f==="y"?"height":"width",k=i.reference[f]-i.floating[h]+m.mainAxis,w=i.reference[f]+i.reference[h]-m.mainAxis;g<k?g=k:g>w&&(g=w)}if(c){var b,y;const h=f==="y"?"width":"height",k=zd.has(Wt(o)),w=i.reference[d]-i.floating[h]+(k&&((b=s.offset)==null?void 0:b[d])||0)+(k?0:m.crossAxis),_=i.reference[d]+i.reference[h]+(k?0:((y=s.offset)==null?void 0:y[d])||0)-(k?m.crossAxis:0);p<w?p=w:p>_&&(p=_)}return{[f]:g,[d]:p}}}},bk=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=kn(e,t),u=await s.detectOverflow(t,c),d=Wt(o),f=Kr(o),g=Dt(o)==="y",{width:p,height:v}=i.floating;let m,b;d==="top"||d==="bottom"?(m=d,b=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,m=f==="end"?"top":"bottom");const y=v-u.top-u.bottom,h=p-u.left-u.right,k=Yn(v-u[m],y),w=Yn(p-u[b],h),_=!t.middlewareData.shift;let A=k,S=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=h),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),_&&!f){const O=it(u.left,0),P=it(u.right,0),M=it(u.top,0),z=it(u.bottom,0);g?S=p-2*(O!==0||P!==0?O+P:it(u.left,u.right)):A=v-2*(M!==0||z!==0?M+z:it(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:A});const E=await s.getDimensions(a.floating);return p!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}};function ai(){return typeof window<"u"}function tr(e){return Rd(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(Rd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rd(e){return ai()?e instanceof Node||e instanceof st(e).Node:!1}function kt(e){return ai()?e instanceof Element||e instanceof st(e).Element:!1}function Vt(e){return ai()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function nc(e){return!ai()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function Vr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=St(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function vk(e){return/^(table|td|th)$/.test(tr(e))}function li(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const xk=/transform|translate|scale|rotate|perspective|filter/,$k=/paint|layout|strict|content/,pn=e=>!!e&&e!=="none";let Bi;function ca(e){const t=kt(e)?St(e):e;return pn(t.transform)||pn(t.translate)||pn(t.scale)||pn(t.rotate)||pn(t.perspective)||!ua()&&(pn(t.backdropFilter)||pn(t.filter))||xk.test(t.willChange||"")||$k.test(t.contain||"")}function wk(e){let t=on(e);for(;Vt(t)&&!Xn(t);){if(ca(t))return t;if(li(t))return null;t=on(t)}return null}function ua(){return Bi==null&&(Bi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Bi}function Xn(e){return/^(html|body|#document)$/.test(tr(e))}function St(e){return st(e).getComputedStyle(e)}function ci(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nc(e)&&e.host||Ft(e);return nc(t)?t.host:t}function Nd(e){const t=on(e);return Xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vt(t)&&Vr(t)?t:Nd(t)}function Dr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Nd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=st(o);if(i){const a=ws(s);return t.concat(s,s.visualViewport||[],Vr(o)?o:[],a&&n?Dr(a):[])}else return t.concat(o,Dr(o,[],n))}function ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ld(e){const t=St(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=No(n)!==i||No(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function da(e){return kt(e)?e:e.contextElement}function qn(e){const t=da(e);if(!Vt(t))return Ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ld(t);let s=(i?No(n.width):n.width)/r,a=(i?No(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const kk=Ot(0);function jd(e){const t=st(e);return!ua()||!t.visualViewport?kk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==st(e)?!1:t}function Sn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=da(e);let s=Ot(1);t&&(r?kt(r)&&(s=qn(r)):s=qn(e));const a=Sk(i,n,r)?jd(i):Ot(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=st(i),g=r&&kt(r)?st(r):r;let p=f,v=ws(p);for(;v&&r&&g!==p;){const m=qn(v),b=v.getBoundingClientRect(),y=St(v),h=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*m.x,k=b.top+(v.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=h,c+=k,p=st(v),v=ws(p)}}return jo({width:u,height:d,x:l,y:c})}function ui(e,t){const n=ci(e).scrollLeft;return t?t.left+n:Sn(Ft(e)).left+n}function Bd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ui(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ck(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ft(r),a=t?li(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ot(1);const u=Ot(0),d=Vt(r);if((d||!d&&!i)&&((tr(r)!=="body"||Vr(s))&&(l=ci(r)),d)){const g=Sn(r);c=qn(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const f=s&&!d&&!i?Bd(s,l):Ot(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Ak(e){return Array.from(e.getClientRects())}function Tk(e){const t=Ft(e),n=ci(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ui(e);const a=-n.scrollTop;return St(r).direction==="rtl"&&(s+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const rc=25;function Ik(e,t){const n=st(e),r=Ft(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=ua();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=ui(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),g=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-g);p<=rc&&(i-=p)}else c<=rc&&(i+=c);return{width:i,height:s,x:a,y:l}}function Ek(e,t){const n=Sn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vt(e)?qn(e):Ot(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function oc(e,t,n){let r;if(t==="viewport")r=Ik(e,n);else if(t==="document")r=Tk(Ft(e));else if(kt(t))r=Ek(t,n);else{const o=jd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jo(r)}function Hd(e,t){const n=on(e);return n===t||!kt(n)||Xn(n)?!1:St(n).position==="fixed"||Hd(n,t)}function _k(e,t){const n=t.get(e);if(n)return n;let r=Dr(e,[],!1).filter(a=>kt(a)&&tr(a)!=="body"),o=null;const i=St(e).position==="fixed";let s=i?on(e):e;for(;kt(s)&&!Xn(s);){const a=St(s),l=ca(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Vr(s)&&!l&&Hd(e,s))?r=r.filter(u=>u!==s):o=a,s=on(s)}return t.set(e,r),r}function Dk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?li(t)?[]:_k(t,this._c):[].concat(n),r],a=oc(t,s[0],o);let l=a.top,c=a.right,u=a.bottom,d=a.left;for(let f=1;f<s.length;f++){const g=oc(t,s[f],o);l=it(g.top,l),c=Yn(g.right,c),u=Yn(g.bottom,u),d=it(g.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Pk(e){const{width:t,height:n}=Ld(e);return{width:t,height:n}}function Ok(e,t,n){const r=Vt(t),o=Ft(t),i=n==="fixed",s=Sn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ot(0);function c(){l.x=ui(o)}if(r||!r&&!i)if((tr(t)!=="body"||Vr(o))&&(a=ci(t)),r){const g=Sn(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Bd(o,a):Ot(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Hi(e){return St(e).position==="static"}function ic(e,t){if(!Vt(e)||St(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ft(e)===n&&(n=n.ownerDocument.body),n}function Wd(e,t){const n=st(e);if(li(e))return n;if(!Vt(e)){let o=on(e);for(;o&&!Xn(o);){if(kt(o)&&!Hi(o))return o;o=on(o)}return n}let r=ic(e,t);for(;r&&vk(r)&&Hi(r);)r=ic(r,t);return r&&Xn(r)&&Hi(r)&&!ca(r)?n:r||wk(e)||n}const Mk=async function(e){const t=this.getOffsetParent||Wd,n=this.getDimensions,r=await n(e.floating);return{reference:Ok(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fk(e){return St(e).direction==="rtl"}const zk={convertOffsetParentRelativeRectToViewportRelativeRect:Ck,getDocumentElement:Ft,getClippingRect:Dk,getOffsetParent:Wd,getElementRects:Mk,getClientRects:Ak,getDimensions:Pk,getScale:qn,isElement:kt,isRTL:Fk};function Ud(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rk(e,t){let n=null,r;const o=Ft(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:g}=c;if(a||t(),!f||!g)return;const p=so(d),v=so(o.clientWidth-(u+f)),m=so(o.clientHeight-(d+g)),b=so(u),h={rootMargin:-p+"px "+-v+"px "+-m+"px "+-b+"px",threshold:it(0,Yn(1,l))||1};let k=!0;function w(_){const A=_[0].intersectionRatio;if(A!==l){if(!k)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!Ud(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(w,{...h,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,h)}n.observe(e)}return s(!0),i}function fa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=da(e),u=o||i?[...c?Dr(c):[],...t?Dr(t):[]]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const d=c&&a?Rk(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=g)==null||h.observe(t)})),n()}),c&&!l&&g.observe(c),t&&g.observe(t));let p,v=l?Sn(e):null;l&&m();function m(){const b=Sn(e);v&&!Ud(v,b)&&n(),v=b,p=requestAnimationFrame(m)}return n(),()=>{var b;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d?.(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(p)}}const pa=gk,ha=mk,ga=pk,ma=bk,ya=yk,ba=(e,t,n)=>{const r=new Map,o={platform:zk,...n},i={...o.platform,_c:r};return fk(e,t,{...o,platform:i})};var qd=F("<div data-radix-popper-content-wrapper>");const va={name:"transformOrigin",fn(e){const[t,n="center"]=e.placement.split("-"),r={start:"0%",center:"50%",end:"100%"}[n];let o="",i="";return t==="bottom"?(o=r,i="0px"):t==="top"?(o=r,i=`${e.rects.floating.height+0}px`):t==="right"?(o="0px",i=r):t==="left"&&(o=`${e.rects.floating.width+0}px`,i=r),{data:{x:o,y:i}}}};function xa(e){const t=()=>e.align==="center"?e.side:`${e.side}-${e.align}`,[n,r]=X(N(t)),[o,i]=X(!1),[s,a]=X();let l={x:0,y:0,origin:void 0},c=!1,u,d=!1;const f=(()=>{var y=qd();return te(()=>V(y,"dir",e.dir)),y})(),g=ia(f),p=()=>f.ownerDocument.defaultView?.devicePixelRatio||1,v=y=>Math.round(y*p())/p(),m=()=>{const y={position:"fixed",left:"0",top:"0"};c&&(y.transform=`translate(${v(l.x)}px, ${v(l.y)}px)`,p()>=1.5&&(y["will-change"]="transform")),y.transform=N(o)?y.transform:"translate(0, -200%)",y["min-width"]="max-content",y["z-index"]=u||void 0,y["--radix-popper-transform-origin"]=[l.origin?.x,l.origin?.y].join(" "),g(y)};m();const b={placedSide:()=>n().split("-")[0],placedAlign:()=>n().split("-")[1]??"center",isPositioned:o,setContent:a};return x(f,N(()=>e.children(b))),he(()=>{const y=e.anchor,h=s();if(!y||!h)return;N(()=>{c=!0,m(),u=getComputedStyle(h).zIndex,m()});const w={padding:e.collisionPadding,boundary:[],altBoundary:!1},_=[pa({mainAxis:e.sideOffset,alignmentAxis:e.alignOffset??0}),ha({mainAxis:!0,crossAxis:!1,limiter:ya(),...w}),ga({...w}),ma({...w,apply:({elements:O,rects:P,availableWidth:M,availableHeight:z})=>{const K=O.floating.style;K.setProperty("--radix-popper-available-width",`${M}px`),K.setProperty("--radix-popper-available-height",`${z}px`),K.setProperty("--radix-popper-anchor-width",`${P.reference.width}px`),K.setProperty("--radix-popper-anchor-height",`${P.reference.height}px`)}}),va],A=t(),E=fa(y,f,()=>{ba(y,f,{strategy:"fixed",placement:A,middleware:_}).then(O=>{if(d)return;const P=O.middlewareData.transformOrigin;N(o)&&l.x===O.x&&l.y===O.y&&l.origin?.x===P?.x&&l.origin?.y===P?.y&&N(n)===O.placement||(l={x:O.x,y:O.y,origin:P},r(O.placement),i(!0),m())})},{animationFrame:!1});ce(E)}),ce(()=>d=!0),f}function $a(e,t,n,r,o={}){return{...o,"pointer-events":n,[`--radix-${e}-content-transform-origin`]:"var(--radix-popper-transform-origin)",[`--radix-${e}-content-available-width`]:"var(--radix-popper-available-width)",[`--radix-${e}-content-available-height`]:"var(--radix-popper-available-height)",[`--radix-${e}-${t}-width`]:"var(--radix-popper-anchor-width)",[`--radix-${e}-${t}-height`]:"var(--radix-popper-anchor-height)",animation:r?void 0:"none"}}function Kd(e){const[t,n]=X(null),[r,o]=X();let i;const s=()=>typeof window>"u"?1:window.devicePixelRatio||1,a=d=>Math.round(d*s())/s(),l=j(()=>{const d=t(),[f,g="center"]=(d?.placement??`bottom-${e.align}`).split("-");return{side:f,align:e.align==="center"&&!d?"center":g,positioned:d!==null}}),c=()=>{const d=t(),f={position:"fixed",left:0,top:0,transform:d?`translate(${a(d.x)}px, ${a(d.y)}px)`:"translate(0, -200%)"};return s()>=1.5&&(f.willChange="transform"),f.minWidth="max-content",f.zIndex=r(),f["--radix-popper-transform-origin"]=d?d.origin.join(" "):" ",me(f)},u=(()=>{var d=qd();return x(d,()=>e.content(l,f=>i=f)),te(f=>{var g=c(),p=e.dir?.();return f.e=De(d,g,f.e),p!==f.t&&V(d,"dir",f.t=p),f},{e:void 0,t:void 0}),d})();return Le(()=>{i&&o(getComputedStyle(i).zIndex);const d=e.anchor();if(!d)return;const f={padding:e.collisionPadding,boundary:[],altBoundary:!1};let g=!0;const v=fa(d,u,()=>{ba(d,u,{strategy:"fixed",placement:e.align==="center"?"bottom":`bottom-${e.align}`,middleware:[pa({mainAxis:e.sideOffset,alignmentAxis:0}),ha({mainAxis:!0,crossAxis:!1,limiter:ya(),...f}),ga({...f}),ma({...f,apply:({elements:m,rects:b,availableWidth:y,availableHeight:h})=>{const k=m.floating.style;k.setProperty("--radix-popper-available-width",`${y}px`),k.setProperty("--radix-popper-available-height",`${h}px`),k.setProperty("--radix-popper-anchor-width",`${b.reference.width}px`),k.setProperty("--radix-popper-anchor-height",`${b.reference.height}px`)}}),va]}).then(m=>{if(!g)return;const b=t()===null,y=m.middlewareData.transformOrigin;n({x:m.x,y:m.y,placement:m.placement,origin:[y?.x??"",y?.y??""]}),b&&e.onPlaced?.()})},{animationFrame:!1});ce(()=>{g=!1,v()})}),u}function Vd(e,t){let n=!1;for(let r=0,o=t.length-1;r<t.length;o=r++){const i=t[r],s=t[o];i.y>e.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(n=!n)}return n}function Nk(e){const t=[...e].sort((i,s)=>i.x<s.x?-1:i.x>s.x?1:i.y<s.y?-1:i.y>s.y?1:0);if(t.length<=1)return t;const n=(i,s,a)=>(s.x-i.x)*(a.y-i.y)-(s.y-i.y)*(a.x-i.x),r=[];for(const i of t){for(;r.length>=2&&n(r[r.length-2],r[r.length-1],i)>=0;)r.pop();r.push(i)}r.pop();const o=[];for(let i=t.length-1;i>=0;i--){const s=t[i];for(;o.length>=2&&n(o[o.length-2],o[o.length-1],s)>=0;)o.pop();o.push(s)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}function Lk(e,t,n){const o=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x),l=Math.min(o,i,s,a),c=l===a?[{x:e.x+5,y:e.y-5},{x:e.x+5,y:e.y+5}]:l===s?[{x:e.x-5,y:e.y-5},{x:e.x-5,y:e.y+5}]:l===o?[{x:e.x-5,y:e.y+5},{x:e.x+5,y:e.y+5}]:[{x:e.x-5,y:e.y-5},{x:e.x+5,y:e.y-5}];return Nk([...c,{x:n.left,y:n.top},{x:n.right,y:n.top},{x:n.right,y:n.bottom},{x:n.left,y:n.bottom}])}var jk=F("<span role=tooltip>");function Bk(e){const t=(()=>{var n=jk();return x(n,()=>e.children),te(()=>V(n,"id",e.id)),n})();return ia(t)({position:"absolute",border:"0",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)","white-space":"nowrap","word-wrap":"normal"}),t}const Gd=(e,t)=>e.map((n,r)=>e[(t+r)%e.length]);function Hk(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=Gd(e,Math.max(i,0));o.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function Yd(e){let t="",n=0;const r=o=>{t=o,window.clearTimeout(n),o!==""&&(n=window.setTimeout(()=>r(""),1e3))};return ce(()=>window.clearTimeout(n)),{get search(){return t},type:o=>{const i=t+o;e(i),r(i)},reset:()=>{t="",window.clearTimeout(n)}}}function Xd(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=e.map((l,c)=>e[(Math.max(i,0)+c)%e.length]);o.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.label.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}var Wk=F("<div role=menu aria-orientation=vertical data-radix-menu-content>");let Bo=!1,sc=0;function Uk(){const e=()=>Bo=!0,t=()=>Bo=!1;sc++===0&&(document.addEventListener("keydown",e,{capture:!0}),document.addEventListener("pointerdown",t,{capture:!0}),document.addEventListener("pointermove",t,{capture:!0})),ce(()=>{--sc===0&&(document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0}))})}const Zd=sn(),qk=["ArrowDown","PageUp","Home"],ac=["ArrowUp","PageDown","End"],yo=e=>e?Array.from(e.querySelectorAll(":scope [data-radix-collection-item]")).filter(t=>t.closest("[data-radix-menu-content]")===e):[];function wa(e){const t=si({disableOutsidePointerEvents:()=>e.root,onEscapeKeyDown:y=>e.onEscapeKeyDown?.(y),onFocusOutside:y=>{e.root&&y.preventDefault(),e.onFocusOutside?.(y)},onInteractOutside:y=>e.onInteractOutside?.(y),onDismiss:()=>e.onDismiss()}),n=sa({trapped:()=>e.root,loop:!1,onMountAutoFocus:y=>{y.preventDefault(),(e.root||Bo)&&c?.focus({preventScroll:!0})},onUnmountAutoFocus:y=>e.onCloseAutoFocus(y)}),[r,o]=X(!1),[i,s]=X(),[a,l]=X();let c,u="",d,f=null,g="right",p=0;const v=y=>!!(f&&g===f.side&&Vd({x:y.clientX,y:y.clientY},f.area)),m={content:()=>c,highlighted:i,setHighlighted:s,tabStop:a,setTabStop:l,search:()=>u,onItemEnter:y=>v(y),onItemLeave:y=>{v(y)||(c?.focus({preventScroll:!0}),l(void 0))},onTriggerLeave:y=>v(y),setGrace:y=>f=y};ce(()=>clearTimeout(d));const b=y=>{const h=u+y,k=yo(c).filter(P=>!P.hasAttribute("data-disabled")),w=document.activeElement,_=k.find(P=>P===w)?.textContent??void 0,A=k.map(P=>P.textContent??""),S=Hk(A,h,_),E=k.find(P=>(P.textContent??"")===S),O=P=>{u=P,clearTimeout(d),P!==""&&(d=setTimeout(()=>O(""),1e3))};O(h),E&&setTimeout(()=>E.focus())};return $(xa,{get anchor(){return e.anchor},get side(){return e.side},get align(){return e.align},get sideOffset(){return e.sideOffset},get alignOffset(){return e.alignOffset},get collisionPadding(){return e.collisionPadding??Qn},get dir(){return e.dir},children:y=>{const h=(()=>{var k=Wk();return D(k,C({get"data-side"(){return y.placedSide()},get"data-align"(){return y.placedAlign()},get"data-state"(){return e.state()},get dir(){return e.dir},get id(){return e.id},get"aria-labelledby"(){return e.labelledBy}},()=>e.attrs(),{tabindex:"-1","data-orientation":"vertical",onKeyDown:w=>{n.onKeyDown(w);const A=w.target.closest("[data-radix-menu-content]")===h,S=w.ctrlKey||w.altKey||w.metaKey;if(A&&(w.key==="Tab"&&w.preventDefault(),!S&&w.key.length===1&&b(w.key)),e.onKeyDown?.(w),w.target!==h||!qk.includes(w.key)&&!ac.includes(w.key))return;w.preventDefault();const E=yo(h).filter(O=>!O.hasAttribute("data-disabled"));ac.includes(w.key)&&E.reverse(),Ro(E)},onFocus:w=>{if(w.target!==h||!Bo)return;const _=yo(h).filter(S=>!S.hasAttribute("data-disabled")),A=N(a);Ro([A,..._].filter(Boolean))},onPointerMove:w=>{w.pointerType==="mouse"&&h.contains(w.target)&&p!==w.clientX&&(g=w.clientX>p?"right":"left",p=w.clientX)}}),!1,!0),x(k,$(ii.Provider,{get value(){return t.layer},get children(){return $(Zd.Provider,{value:m,get children(){return e.children}})}})),k})();return c=h,e.setContent?.(h),ce(()=>e.setContent?.(void 0)),y.setContent(h),_r(h,()=>$a(e.kind,"trigger",e.lagParentLayer&&!r()?void 0:t.pointerEvents(r()),y.isPositioned(),{outline:"none"})),Le(()=>{t.attach(h),o(!0),n.attach(h),aa(),e.root&&Od(h,!0)}),h}})}function Jd(e){const t=qt(Zd);let n;return{attrs:()=>({tabindex:t.tabStop()===n&&n!==void 0?"0":"-1","data-orientation":"vertical","data-radix-collection-item":"","data-highlighted":t.highlighted()===n&&n!==void 0?"":void 0,"aria-disabled":e()?"true":void 0,"data-disabled":e()?"":void 0}),handlers:{onFocus:()=>{t.setHighlighted(n),N(e)||t.setTabStop(n)},onBlur:()=>{N(t.highlighted)===n&&t.setHighlighted(void 0)},onPointerMove:i=>{i.pointerType==="mouse"&&(N(e)?t.onItemLeave(i):t.onItemEnter(i)||n?.focus({preventScroll:!0}))},onPointerLeave:i=>{i.pointerType==="mouse"&&t.onItemLeave(i)},onKeyDown:i=>{if(i.target!==i.currentTarget)return;const s=i.key==="ArrowUp"?"prev":i.key==="ArrowDown"?"next":i.key==="Home"||i.key==="PageUp"?"first":i.key==="End"||i.key==="PageDown"?"last":void 0;if(!s||i.metaKey||i.ctrlKey||i.altKey||i.shiftKey)return;i.preventDefault();let a=yo(t.content()).filter(l=>!l.hasAttribute("data-disabled"));if(s==="last")a.reverse();else if(s==="prev"||s==="next"){s==="prev"&&a.reverse();const l=a.indexOf(i.currentTarget);a=a.slice(l+1)}Ro(a)}},ref:i=>n=i,level:t}}function Qd(e,t,n){const r=Jd(e);let o=!1;const i=()=>{if(N(e))return;const a=new CustomEvent("menu.itemSelect",{bubbles:!0,cancelable:!0});t(a),a.defaultPrevented?o=!1:n()},s={...r.handlers,onClick:i,onPointerDown:()=>o=!0,onPointerUp:a=>{o||a.currentTarget?.click()},onKeyDown:a=>{if(r.handlers.onKeyDown(a),a.defaultPrevented)return;const l=r.level.search()!=="";N(e)||l&&a.key===" "||(a.key==="Enter"||a.key===" ")&&(a.currentTarget.click(),a.preventDefault())}};return{...r,handlers:s}}const ef={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kk(e,t,n){let r=e.key;if(n==="rtl"&&(r=r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r),!(t==="vertical"&&(r==="ArrowLeft"||r==="ArrowRight"))&&!(t==="horizontal"&&(r==="ArrowUp"||r==="ArrowDown")))return ef[r]}function Ho(e){const t=document.activeElement;for(const n of e)if(n&&(n===t||(n.focus(),document.activeElement!==t)))return}function tf(e){const[t,n]=X(null),[r,o]=X(!1);let i=!1;return{group:()=>({tabindex:r()?-1:0,"data-orientation":e.orientation}),groupHandlers:{onMouseDown:()=>{i=!0},onFocusIn:c=>{const u=!i;if(c.target===c.currentTarget&&u&&!r()){const d=e.items().filter(e.focusable),f=d.find(e.active),g=d.find(p=>p===t());Ho([f,g,...d].filter(p=>!!p))}i=!1},onFocusOut:()=>o(!1)},item:(c,u)=>({tabindex:()=>t()!==null&&t()===c()?0:-1,onMouseDown:d=>{u()?n(c()??null):d.preventDefault()},onFocus:()=>n(c()??null),onKeyDown:d=>{if(d.key==="Tab"&&d.shiftKey){o(!0);return}if(d.target!==d.currentTarget)return;const f=Kk(d,e.orientation,e.dir());if(f===void 0||d.metaKey||d.ctrlKey||d.altKey||d.shiftKey)return;d.preventDefault();let g=e.items().filter(e.focusable);if(f==="last")g.reverse();else if(f==="prev"||f==="next"){f==="prev"&&g.reverse();const p=g.indexOf(d.currentTarget);g=e.loop?Gd(g,p+1):g.slice(p+1)}setTimeout(()=>Ho(g))}})}}function nf(e){const t=e.isDisabled??(()=>!1),n=e.labelOf??(()=>""),r=e.typeahead??(()=>!1),[o,i]=X(e.initial??-1);let s={text:"",at:0};he(()=>{const c=e.count();o()>=c&&i(c-1)});const a=(c,u)=>hd(e.count(),c,u,t);return{active:o,setActive:i,onKeyDown:c=>{const u=e.count(),d=o();if(c.key==="ArrowDown")c.preventDefault(),i(a(d<0?-1:d,1));else if(c.key==="ArrowUp")c.preventDefault(),i(a(d<0?0:d,-1));else if(c.key==="Home")c.preventDefault(),i(a(-1,1));else if(c.key==="End")c.preventDefault(),i(a(0,-1));else if(c.key==="Enter"||c.key===" "&&r()&&s.text==="")d>=0&&d<u&&!t(d)&&(c.preventDefault(),e.onPick(d));else if(r()&&c.key.length===1&&!c.metaKey&&!c.ctrlKey&&!c.altKey){const f=gd(s,c.key,Date.now(),d,u,t,n);s=f.buffer,f.index>=0&&i(f.index)}}}}function Vk(e){const t=e.isDisabled??(()=>!1),n=e.labelOf??(()=>""),[r,o]=X(e.initial??-1);let i={text:"",at:0};Ut(()=>{const l=e.count();N(r)>=l&&o(l-1)});const s=(l,c)=>hd(e.count(),l,c,t);return{active:r,setActive:l=>o(l),onKeyDown:l=>{const c=e.count(),u=r();if(l.key==="ArrowDown")l.preventDefault(),o(s(u<0?-1:u,1));else if(l.key==="ArrowUp")l.preventDefault(),o(s(u<0?0:u,-1));else if(l.key==="Home")l.preventDefault(),o(s(-1,1));else if(l.key==="End")l.preventDefault(),o(s(0,-1));else if(l.key==="Enter"||l.key===" "&&e.typeahead&&i.text==="")u>=0&&u<c&&!t(u)&&(l.preventDefault(),e.onPick(u));else if(e.typeahead&&l.key.length===1&&!l.metaKey&&!l.ctrlKey&&!l.altKey){const d=gd(i,l.key,Date.now(),u,c,t,n);i=d.buffer,d.index>=0&&o(d.index)}}}}const Gk=[" ","Enter","ArrowUp","ArrowDown"],Yk=[" ","Enter"];var Xk=F("<div role=dialog>");const Zk="button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),a[href],[tabindex]";function Jk(e){return Array.from(e.querySelectorAll(Zk)).filter(t=>t.tabIndex>=0&&!t.closest("[hidden],[inert]"))}function ka(e){const[t,n]=X(N(()=>e.open));let r,o="none";const i=()=>r&&getComputedStyle(r).animationName||"none";he(_e(()=>e.open,(a,l)=>{if(a){n(!0);return}if(!r||!l){n(!1);return}const c=i();(c==="none"||getComputedStyle(r).display==="none"||o===c)&&n(!1)},{defer:!0}));const s={mount:a=>{r=a,o=i()},unmount:()=>{r=void 0,o="none"},start:a=>{a.target===r&&(o=i())},end:a=>{if(!r||a.target!==r||!i().includes(CSS.escape(a.animationName))||N(()=>e.open))return;const l=r.style.animationFillMode,c=r;c.style.animationFillMode="forwards",setTimeout(()=>{c.style.animationFillMode==="forwards"&&(c.style.animationFillMode=l)}),n(!1)}};return $(ee,{get when(){return t()},get children(){return $(Qk,C(e,{presence:s}))}})}function Qk(e){const[t,n]=X("bottom-start"),[r,o]=X(!1),[i,s]=X();let a,l=!1,c=!1;const u=()=>t().split("-")[0],d=()=>t().split("-")[1]??"center",f=b=>{b.setAttribute("data-radix-popper-content-wrapper",""),b.style.position="fixed",b.style.left="0px",b.style.top="0px",b.style.transform="translate(0, -200%)",b.style.minWidth="max-content",s(b)};he(()=>i()?.setAttribute("dir",e.dir));const g=(b,y)=>{l=!0,y==="pointerdown"&&(c=!0);const h=e.trigger();return!(h&&b instanceof Node&&h.contains(b)||y==="focusin"&&c)},p=b=>b instanceof Node&&!!a?.contains(b);Le(()=>{const b=i(),y=e.trigger();if(!b||!y||!a)return;const h=getComputedStyle(a).zIndex;h&&(b.style.zIndex=h);let k=!0;const w={padding:Qn,boundary:[],altBoundary:!1},A=fa(y,b,()=>{ba(y,b,{strategy:"fixed",placement:"bottom-start",middleware:[pa({mainAxis:Jn,alignmentAxis:0}),ha({mainAxis:!0,crossAxis:!1,limiter:ya(),...w}),ga({...w}),ma({...w,apply:({elements:z,rects:K,availableWidth:J,availableHeight:U})=>{const T=z.floating.style;T.setProperty("--radix-popper-available-width",`${J}px`),T.setProperty("--radix-popper-available-height",`${U}px`),T.setProperty("--radix-popper-anchor-width",`${K.reference.width}px`),T.setProperty("--radix-popper-anchor-height",`${K.reference.height}px`)}}),va]}).then(({x:z,y:K,placement:J,middlewareData:U})=>{if(!k)return;const T=window.devicePixelRatio||1,B=I=>Math.round(I*T)/T;b.style.transform=`translate(${B(z)}px, ${B(K)}px)`,T>=1.5&&(b.style.willChange="transform");const G=U.transformOrigin;b.style.setProperty("--radix-popper-transform-origin",[G?.x,G?.y].join(" ")),n(J),o(!0)})}),S=a.ownerDocument,E=z=>{p(z.target)||g(z.target,"pointerdown")&&e.setOpen(!1)},O=z=>{p(z.target)||g(z.target,"focusin")&&e.setOpen(!1)},P=z=>{z.key!=="Escape"||!e.open||(z.stopPropagation(),e.setOpen(!1))},M=setTimeout(()=>S.addEventListener("pointerdown",E));S.addEventListener("focusin",O),S.addEventListener("keydown",P,{capture:!0}),e.presence.mount(a),e.onOpenAutoFocus(a),ce(()=>{e.presence.unmount(),k=!1,A(),clearTimeout(M),S.removeEventListener("pointerdown",E),S.removeEventListener("focusin",O),S.removeEventListener("keydown",P,{capture:!0});const z=!l,K=e.trigger();setTimeout(()=>{z&&K?.focus()})})});const v=b=>{if(b.key!=="Tab"||b.altKey||b.ctrlKey||b.metaKey||!a)return;const y=document.activeElement,h=Jk(a);if(!h.length){y===a&&b.preventDefault();return}const k=h[0],w=h[h.length-1];!b.shiftKey&&y===w?(b.preventDefault(),k.focus()):b.shiftKey&&y===k&&(b.preventDefault(),w.focus())},m=()=>({"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)",...r()?{}:{animation:"none"}});return $(gp,{get mount(){return e.portal??void 0},ref:f,get children(){var b=Xk(),y=a;return typeof y=="function"?ie(y,b):a=b,D(b,C({get"data-side"(){return u()},get"data-align"(){return d()},get id(){return e.contentId},get"data-state"(){return e.open?"open":"closed"}},()=>e.attrs,{tabindex:"-1",get style(){return m()},onKeyDown:v,onPointerOver:h=>e.onPointerOver?.(h),onFocusIn:h=>e.onFocusIn?.(h),onAnimationStart:h=>e.presence.start(h),onAnimationEnd:h=>e.presence.end(h),onAnimationCancel:h=>e.presence.end(h)}),!1,!0),x(b,()=>e.children),b}})}function e1(e,t){const[n,r]=X(N(e)),o=()=>e()||n(),[i,s]=X({h:0,w:0});let a,l=null,c={h:0,w:0},u=N(o);const d=()=>{const b=a;if(!b)return;l??={transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const y=b.getBoundingClientRect();c={h:y.height,w:y.width},u||(b.style.transitionDuration=l.transitionDuration,b.style.animationName=l.animationName)};let f="none",g=null;const p=()=>a&&getComputedStyle(a).animationName||"none",v=()=>{d(),N(n)&&(r(!1),s(c))};return Le(()=>{d(),s(c),f=N(o)?p():"none";const b=h=>{h.target===a&&(f=p())};a?.addEventListener("animationstart",b);const y=requestAnimationFrame(()=>u=!1);ce(()=>{cancelAnimationFrame(y),a?.removeEventListener("animationstart",b),g?.()})}),he(_e(e,b=>{if(g?.(),d(),b){N(n)||(r(!0),s(c)),f=p();return}const y=a,h=p();if(!y||h==="none"||getComputedStyle(y).display==="none"||f===h)return v();const k=w=>{w.target!==y||!p().includes(CSS.escape(w.animationName))||(g?.(),f="none",v())};y.addEventListener("animationend",k),y.addEventListener("animationcancel",k),g=()=>{y.removeEventListener("animationend",k),y.removeEventListener("animationcancel",k),g=null}},{defer:!0})),{shown:o,ref:b=>a=b,style:()=>{const b=i(),y={};return b.h&&(y["--radix-collapsible-content-height"]=`${b.h}px`),b.w&&(y["--radix-collapsible-content-width"]=`${b.w}px`),y[`--radix-${t}-content-height`]="var(--radix-collapsible-content-height)",y[`--radix-${t}-content-width`]="var(--radix-collapsible-content-width)",y}}}function t1(e,t,n,r){let o,i=null;const s=()=>e()==="bottom"||e()==="right"?1:-1,a=()=>e()==="left"||e()==="right"?"x":"y",l=u=>i?Math.max(0,(a()==="x"?u.clientX-i.x:u.clientY-i.y)*s()):0,c=(u,d)=>{o&&(o.style.transition=d&&!r()?"transform var(--xui-motion-standard) var(--xui-ease-decelerate)":"none",o.style.transform=u?`translate${a()==="x"?"X":"Y"}(${u*s()}px)`:"")};return{setPanel:u=>o=u,onPointerDown:u=>{!N(t)||u.button!==0||(i={id:u.pointerId,x:u.clientX,y:u.clientY,at:performance.now()},u.currentTarget.setPointerCapture?.(u.pointerId))},onPointerMove:u=>{N(t)&&i?.id===u.pointerId&&c(l(u),!1)},onPointerUp:u=>{if(!N(t)||i?.id!==u.pointerId)return;const d=l(u),f=performance.now()-i.at;i=null,d>80||d>24&&f>0&&d/f>.6?(c(0,!1),n()):c(0,!0)},onPointerCancel:()=>{N(t)&&(i=null,c(0,!0))}}}function rf(e){const[t,n]=X(void 0,{equals:(r,o)=>r?.width===o?.width&&r?.height===o?.height});return he(()=>{const r=e();if(!r)return n(void 0);if(n({width:r.offsetWidth,height:r.offsetHeight}),typeof ResizeObserver>"u")return;const o=new ResizeObserver(i=>{const s=i[0];if(!s)return;let a,l;if("borderBoxSize"in s&&s.borderBoxSize){const c=Array.isArray(s.borderBoxSize)?s.borderBoxSize[0]:s.borderBoxSize;a=c.inlineSize,l=c.blockSize}else a=r.offsetWidth,l=r.offsetHeight;n({width:a,height:l})});o.observe(r,{box:"border-box"}),ce(()=>o.unobserve(r))}),t}var n1=F("<input aria-hidden=true tabindex=-1>"),r1=F("<input>"),o1=F("<select aria-hidden=true tabindex=-1>"),i1=F("<option value>"),s1=F("<option>");function di(e){const[t,n]=X(!1);return Le(()=>n(!!e()?.closest("form"))),t}function of(e,t,n,r,o=()=>!0){he(_e(t,i=>{const s=e();s&&(n(s,i),s.dispatchEvent(new Event(r,{bubbles:o()})))},{defer:!0}))}const a1=(e,t)=>Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked")?.set?.call(e,t);function Sa(e){let t;const n=rf(()=>e.control),r=N(()=>e.checked);of(()=>t,()=>e.checked,a1,"click",e.bubbles);const o=()=>{const i=n(),s=i?{width:i.width,height:i.height}:{},a={position:"absolute",pointerEvents:"none",opacity:0,margin:0};return me(e.transformFirst?{transform:"translateX(-100%)",...s,...a}:{...s,...a,transform:"translateX(-100%)"})};return(()=>{var i=n1(),s=t;return typeof s=="function"?ie(s,i):t=i,V(i,"checked",r?"":void 0),te(a=>{var l=e.type,c=e.name,u=e.disabled,d=o();return l!==a.e&&V(i,"type",a.e=l),c!==a.t&&V(i,"name",a.t=c),u!==a.a&&(i.disabled=a.a=u),a.o=De(i,d,a.o),a},{e:void 0,t:void 0,a:void 0,o:void 0}),te(()=>i.value=e.value),i})()}function l1(e){let t;const n=N(()=>String(e.value));return of(()=>t,()=>e.value,(r,o)=>Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(r,o),"input"),(()=>{var r=r1(),o=t;return typeof o=="function"?ie(o,r):t=r,V(r,"value",n),te(i=>{var s=me({display:"none"}),a=e.name;return i.e=De(r,s,i.e),a!==i.t&&V(r,"name",i.t=a),i},{e:void 0,t:void 0}),r})()}function c1(e){let t;const n=N(()=>e.value);he(_e(()=>e.value,o=>{t&&(Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value")?.set?.call(t,o),t.dispatchEvent(new Event("change",{bubbles:!0})))},{defer:!0}));const r=me({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});return(()=>{var o=o1();o.addEventListener("change",s=>e.onChange(s.currentTarget.value));var i=t;return typeof i=="function"?ie(i,o):t=o,x(o,n===void 0?i1():null,null),x(o,$(xe,{get each(){return e.options},children:s=>(()=>{var a=s1();return x(a,()=>q(s.label)),te(l=>{var c=re(s.disabled),u=n!==void 0&&s.value===n?"":void 0;return c!==l.e&&(a.disabled=l.e=c),u!==l.t&&V(a,"selected",l.t=u),l},{e:void 0,t:void 0}),te(()=>a.value=s.value),a})()}),null),te(s=>{var a=e.name,l=e.disabled,c=r;return a!==s.e&&V(o,"name",s.e=a),l!==s.t&&(o.disabled=s.t=l),s.a=De(o,c,s.a),s},{e:void 0,t:void 0,a:void 0}),o})()}const lc=["PageUp","PageDown"],u1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"]},sf=(e,t)=>n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])},d1=e=>(String(e).split(".")[1]||"").length,f1=(e,t)=>{const n=Math.pow(10,t);return Math.round(e*n)/n},af=(e,[t,n])=>Math.min(n,Math.max(t,e)),p1=(e,t,n)=>af(100/(n-t)*(e-t),[0,100]),h1=(e,t,n)=>{const r=e/2,o=sf([0,50],[0,r]);return(r-o(t)*n)*n};function g1(e){const[t,n]=X("idle"),r=typeof window>"u"?null:new window.Image,o=i=>r?i?(r.src!==i&&(r.src=i),r.complete&&r.naturalWidth>0?"loaded":"loading"):"error":"idle";if(Ut(()=>n(o(e()))),r){const i=()=>n("loaded"),s=()=>n("error");r.addEventListener("load",i),r.addEventListener("error",s),ce(()=>{r.removeEventListener("load",i),r.removeEventListener("error",s)})}return t}function lf(e,t){const n=t.trim().toLowerCase();return n===""||q(e.label).toLowerCase().includes(n)||q(e.identifier).toLowerCase().includes(n)}var m1=F("<div role=listbox class=xui-ChipInput-suggestions>"),y1=F("<div><div><ul class=xui-chip-list></ul><input>"),b1=F("<button type=button tabindex=-1>"),v1=F("<li><span>"),x1=F("<div role=option class=xui-ChipInput-suggestion>"),cc=F("<span>"),$1=F("<ul class=xui-file-list>"),w1=F("<div>"),k1=F("<div><div><span></span><span></span><span></span><input type=file class=xui-sr-only tabindex=-1>"),S1=F("<button type=button>"),C1=F("<li><span></span><span>"),A1=F("<a target=_blank rel=noreferrer>"),T1=F("<span class=xui-field-error>");function I1(e){const t=be(e),n=ae(),r=Ce(),o=`${r}-suggestions`,[i,s]=Me(()=>e.node,()=>e.scope,"values",()=>nn(e.props.values).map(String)),[a,l]=X(""),[c,u]=X(!1);let d;const f=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:i,focusEl:()=>d}),g=()=>re(e.props.disabled)||!!f.form?.disabled,p=()=>e.props.max===void 0?1/0:pe(e.props.max,1/0),v=j(()=>Ne(e.props.suggestions)),m=j(()=>{const P=a();return P?v().filter(M=>!i().includes(M.value)&&q(M.label).toLowerCase().includes(P.toLowerCase())):[]}),b=P=>(s(P),f.change(P),e.emit("change",{values:P},{values:P}),P),y=P=>{const M=P.trim(),z=N(i);if(!M||z.includes(M)||z.length>=N(p))return!1;const K=b([...z,M]);return e.emit("add",{value:M},{values:K}),l(""),!0};let h;const k=P=>h?.querySelectorAll("[data-chip]")[P]??null,w=(P,M)=>{const z=b(N(i).filter(K=>K!==P));e.emit("remove",{value:P},{values:z}),setTimeout(()=>{((M!==void 0&&M>=0?k(M):null)??d)?.focus()},0)},_=(P,M)=>{const z=n.direction==="rtl",K=z?"ArrowRight":"ArrowLeft",J=z?"ArrowLeft":"ArrowRight",U=N(i);P.key===K?(P.preventDefault(),k(Math.max(0,M-1))?.focus()):P.key===J?(P.preventDefault(),M+1<U.length?k(M+1)?.focus():d?.focus()):(P.key==="Backspace"||P.key==="Delete")&&!N(g)&&(P.preventDefault(),w(U[M],P.key==="Backspace"?M-1:M<U.length-1?M:M-1))},A=nf({count:()=>m().length,isDisabled:P=>re(N(m)[P]?.disabled),onPick:P=>y(N(m)[P].value)}),S=()=>A.active()>=0&&A.active()<m().length?`${o}-${A.active()}`:void 0,E=()=>c()&&m().length>0,O=()=>q(e.props.placeholder);return(()=>{var P=y1(),M=P.firstChild,z=M.firstChild,K=z.nextSibling;D(P,C(()=>e.rootProps),!1,!0),x(P,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),M),D(M,C(()=>t("field",c()&&"focus",g()&&"disabled",f.invalid&&"invalid"),{onClick:()=>d?.focus(),"data-xui-chipfield":""}),!1,!0);var J=h;typeof J=="function"?ie(J,z):h=z,x(z,$(xe,{get each(){return i()},children:(T,B)=>(()=>{var G=v1(),I=G.firstChild;return D(G,C(()=>t.at("chip",B()),{"data-chip":"",tabindex:"-1",onKeyDown:R=>_(R,B()),onFocus:R=>R.currentTarget.setAttribute("data-xs","focus"),onBlur:R=>R.currentTarget.removeAttribute("data-xs")}),!1,!0),D(I,C(()=>t.at("chipLabel",B())),!1,!0),x(I,T),x(G,$(ee,{get when(){return!g()},get children(){var R=b1();return D(R,C(()=>t.at("remove",B()),{get"aria-label"(){return pr(n,"removeItem",{name:T},()=>`${n.t("remove")} ${T}`)},onClick:W=>{W.stopPropagation(),w(T)}}),!1,!0),x(R,$($e,{slot:"ChipInput.remove"})),R}}),null),G})()}));var U=d;return typeof U=="function"?ie(U,K):d=K,V(K,"id",r),D(K,C(()=>t("input"),{get value(){return a()},get disabled(){return g()||i().length>=p()},get placeholder(){return Z(()=>i().length===0)()&&O()||void 0},role:"combobox","aria-autocomplete":"list",get"aria-expanded"(){return E()},get"aria-controls"(){return E()?o:void 0},get"aria-activedescendant"(){return Z(()=>!!E())()?S():void 0},get"aria-invalid"(){return f.invalid||void 0},get"aria-describedby"(){return Ir(f.describedBy)},onFocus:()=>u(!0),onBlur:()=>{u(!1),f.touch()},onInput:T=>{const B=T.currentTarget.value;if(B.includes(",")){const G=B.split(","),I=G.pop()??"";for(const R of G)y(R);l(I),T.currentTarget.value=I}else l(B)},onKeyDown:T=>{const B=N(a),G=N(i);if(N(E)&&(T.key==="ArrowDown"||T.key==="ArrowUp"||T.key==="Enter"&&N(A.active)>=0)){A.onKeyDown(T);return}T.key==="Enter"?(T.preventDefault(),B.trim()?y(B):f.submit()):T.key==="Backspace"&&B===""&&G.length||(T.key==="ArrowLeft"||T.key==="ArrowRight")&&B===""&&G.length&&T.key===(n.direction==="rtl"?"ArrowRight":"ArrowLeft")?(T.preventDefault(),k(G.length-1)?.focus()):T.key==="Escape"&&l("")}}),!1,!1),x(P,$(ee,{get when(){return E()},get children(){var T=m1();return V(T,"id",o),x(T,$(xe,{get each(){return m()},children:(B,G)=>(()=>{var I=x1();return I.$$click=()=>y(B.value),I.$$mousedown=R=>R.preventDefault(),x(I,()=>q(B.label)),te(R=>{var W=`${o}-${G()}`,H=G()===A.active(),L=G()===A.active()?"":void 0;return W!==R.e&&V(I,"id",R.e=W),H!==R.t&&V(I,"aria-selected",R.t=H),L!==R.a&&V(I,"data-active",R.a=L),R},{e:void 0,t:void 0,a:void 0}),I})()})),T}}),null),x(P,$(ut,{part:t,field:f}),null),te(T=>{var B=q(e.props.label)||void 0,G=a();return B!==T.e&&V(z,"aria-label",T.e=B),G!==T.t&&V(K,"value",T.t=G),T},{e:void 0,t:void 0}),P})()}function E1(e){const t=be(e),n=ae(),r=Ce(),[o,i]=Me(()=>e.node,()=>e.scope,"files",()=>Ne(e.props.files));let s,a;const l=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:o,focusEl:()=>s}),c=()=>re(e.props.disabled)||!!l.form?.disabled,u=()=>re(e.props.multiple),d=()=>q(e.props.accept),f=()=>e.props.maxSize===void 0?1/0:pe(e.props.maxSize,1/0),[g,p]=X(!1),[v,m]=X(!1),[b,y]=X([]),h=()=>q(e.props.name,e.node.id),k=E=>E===void 0?"":Uv(E,n.locale),w=E=>{if(!E||N(c))return;const O=N(u),P=Array.from(E).slice(0,O?void 0:1),M=[],z=[];for(const T of P)qv(N(d),T)?T.size>N(f)?z.push(pr(n,"fileTooLargeNamed",{name:T.name},()=>`${T.name}: ${n.t("fileTooLarge")}`)):M.push(T):z.push(pr(n,"unsupportedFileNamed",{name:T.name},()=>`${T.name}: ${n.t("unsupportedFile")}`));if(y(z),M.length===0)return;const K=M.map(T=>({name:T.name,size:T.size,type:T.type})),J=O?[...N(o).filter(T=>!K.some(B=>B.name===T.name)),...K]:K;i(J),l.change(J),e.emit("upload",{files:J,added:K},{files:J});const U=n.host.onUpload?.(M,{nodeId:N(()=>e.domId),name:N(h)});U&&typeof U.then=="function"&&(m(!0),U.finally(()=>m(!1)))},_=E=>{const O=N(o).filter(P=>P.name!==E);i(O),l.change(O),e.emit("remove",{name:E,files:O},{files:O})},A=(E,O)=>{E.preventDefault(),!N(c)&&p(O)},S=()=>q(e.props.hint);return(()=>{var E=k1(),O=E.firstChild,P=O.firstChild,M=P.nextSibling,z=M.nextSibling,K=z.nextSibling;D(E,C(()=>e.rootProps),!1,!0),x(E,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),O);var J=s;typeof J=="function"?ie(J,O):s=O,D(O,C(()=>t("dropzone",g()&&"dragover",c()&&"disabled",l.invalid&&"invalid"),{role:"button",get tabindex(){return c()?-1:0},get"aria-disabled"(){return c()||void 0},get"aria-busy"(){return v()||void 0},get"aria-describedby"(){return Ir(S()&&`${r}-hint`,b().length>0&&`${r}-refused`,l.describedBy)},get"aria-label"(){return q(e.props.label)||n.t("dropFiles")},get"data-dragover"(){return g()?"":void 0},onClick:()=>!N(c)&&a?.click(),onKeyDown:T=>{N(c)||(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),a?.click())},onDragEnter:T=>A(T,!0),onDragOver:T=>A(T,!0),onDragLeave:T=>A(T,!1),onDrop:T=>{A(T,!1),w(T.dataTransfer?.files??null)}}),!1,!0),D(P,C(()=>t("icon")),!1,!0),x(P,$($e,{slot:"FileUpload.icon"})),D(M,C(()=>t("title")),!1,!0),x(M,()=>n.t("dropFiles")),x(O,$(ee,{get when(){return S()},get children(){var T=cc();return D(T,C(()=>t("hint"),{id:`${r}-hint`}),!1,!0),x(T,S),T}}),z),D(z,C(()=>t("browse"),{get class(){return`${t("browse").class} ${xn("Button","root")}`},"data-r-variant":"outline","data-r-size":"sm","aria-hidden":"true"}),!1,!0),x(z,()=>n.t("browse")),K.addEventListener("change",T=>{w(T.currentTarget.files),T.currentTarget.value=""});var U=a;return typeof U=="function"?ie(U,K):a=K,V(K,"id",r),x(E,$(ee,{get when(){return o().length},get children(){var T=$1();return x(T,$(xe,{get each(){return o()},children:(B,G)=>{const I=()=>ei(n.host,B.url);return(()=>{var R=C1(),W=R.firstChild,H=W.nextSibling;return D(R,C(()=>t.at("file",G())),!1,!0),D(W,C(()=>t.at("fileIcon",G())),!1,!0),x(W,$($e,{slot:"FileUpload.file"})),D(H,C(()=>t.at("fileName",G())),!1,!0),x(H,(()=>{var L=Z(()=>!!I());return()=>L()?(()=>{var Y=A1();return x(Y,()=>B.name),te(()=>V(Y,"href",I())),Y})():B.name})()),x(R,$(ee,{get when(){return B.size!==void 0},get children(){var L=cc();return D(L,C(()=>t.at("fileMeta",G())),!1,!0),x(L,()=>k(B.size)),L}}),null),x(R,$(ee,{get when(){return!c()},get children(){var L=S1();return D(L,C(()=>t.at("remove",G()),{get"aria-label"(){return pr(n,"removeItem",{name:B.name},()=>`${n.t("remove")} ${B.name}`)},onClick:()=>_(B.name)}),!1,!0),x(L,$($e,{slot:"FileUpload.remove"})),L}}),null),R})()}})),T}}),null),x(E,$(ee,{get when(){return b().length},get children(){var T=w1();return D(T,C(()=>t("error"),{id:`${r}-refused`,role:"alert"}),!1,!0),x(T,$(xe,{get each(){return b()},children:B=>(()=>{var G=T1();return x(G,B),G})()})),T}}),null),x(E,$(ut,{part:t,field:l}),null),te(T=>{var B=d()||void 0,G=u(),I=c(),R=h();return B!==T.e&&V(K,"accept",T.e=B),G!==T.t&&(K.multiple=T.t=G),I!==T.a&&(K.disabled=T.a=I),R!==T.o&&V(K,"name",T.o=R),T},{e:void 0,t:void 0,a:void 0,o:void 0}),E})()}const _1={ChipInput:I1,FileUpload:E1};Ct(["mousedown","click"]);var D1=F("<img alt loading=lazy decoding=async>",!0,!1,!1),P1=F("<div>"),O1=F("<span aria-hidden=true>"),M1=F("<span>"),F1=F("<button type=button><span>");function z1(e){const t=typeof e=="number"&&Number.isFinite(e)?Math.round(e):2;return Math.min(4,Math.max(1,t))}function R1(e,t){if(Array.isArray(e))return e.map(String).filter(Boolean);const n=e==null?"":String(e);return t?n.split(",").map(r=>r.trim()).filter(Boolean):n?[n]:[]}function N1(e,t,n,r){if(!n)return[t];const o=e.includes(t)?e.filter(s=>s!==t):[...e,t],i=s=>{const a=r.indexOf(s);return a<0?Number.MAX_SAFE_INTEGER:a};return o.slice().sort((s,a)=>i(s)-i(a))}function L1(e){const t=ae(),n=oi(()=>t.host,()=>e.src??"");return $(ee,{get when(){return Z(()=>!!(e.src&&n().url))()&&!n().error},get fallback(){return $($e,{slot:"Image.fallback"})},get children(){var r=D1();return te(()=>V(r,"src",n().url)),r}})}function j1(e){const t=be(e),n=ae(),r=()=>q(e.props.type,"single")==="multiple",o=j(()=>Ne(e.props.options).map(S=>({value:q(S.value),label:q(S.label),description:S.description===void 0?null:q(S.description),image:typeof S.image=="string"&&S.image?S.image:null,disabled:re(S.disabled)})),void 0,{equals:(S,E)=>JSON.stringify(S)===JSON.stringify(E)}),[i,s]=Me(()=>e.node,()=>e.scope,"value",()=>q(e.props.value));let a;const l=[],c=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:i,focusEl:()=>a?.querySelector('button[tabindex="0"]')??a?.querySelector("button")}),u=()=>re(e.props.disabled)||!!c.form?.disabled,d=j(()=>R1(i(),r())),f=j(()=>o().map(S=>S.value)),g=()=>o().some(S=>!!S.image),p=S=>!u()&&!o()[S]?.disabled,v=()=>{const S=o().findIndex((E,O)=>d().includes(E.value)&&p(O));return S>=0?S:o().findIndex((E,O)=>p(O))},m=()=>n.direction==="rtl"?"rtl":"ltr",b=S=>{const E=S.join(",");s(E),c.change(E),c.touch(),e.emit("change",{value:E},{value:E})},y=S=>b(N1(d(),o()[S].value,r(),f())),h=(S,E)=>{const O=o().length;for(let P=1;P<=O;P++){const M=((S+E*P)%O+O)%O;if(p(M))return M}return-1},k=(S,E)=>{const O=m()==="rtl"?"ArrowLeft":"ArrowRight",P=m()==="rtl"?"ArrowRight":"ArrowLeft",M=E.key===O||E.key==="ArrowDown"?1:E.key===P||E.key==="ArrowUp"?-1:0;if(M===0)return;E.preventDefault();const z=h(S,M);z<0||(l[z]?.focus(),!r()&&!d().includes(o()[z].value)&&y(z))},w=j(()=>{const{class:S,style:E,...O}=e.rootProps;return{...O,class:`${q(S)} xui-choice-tiles`,"aria-describedby":c.describedBy}}),_=()=>({display:"grid","grid-template-columns":`repeat(${z1(e.props.columns)}, minmax(0, 1fr))`,...e.rootProps.style??{}}),A=(S,E)=>[S&&"selected",E&&"disabled",c.invalid&&"invalid"];return(()=>{var S=P1(),E=a;return typeof E=="function"?ie(E,S):a=S,D(S,C({get role(){return r()?"group":"radiogroup"},get"aria-invalid"(){return c.invalid||void 0},get"aria-disabled"(){return u()||void 0},get dir(){return m()}},w,{get style(){return _()}}),!1,!0),x(S,$(Pt,{get each(){return o()},children:(O,P)=>{const M=()=>P,z={get value(){return O().value},get label(){return O().label},get description(){return O().description},get image(){return O().image}},K=()=>d().includes(z.value),J=()=>!p(M()),U=()=>z.description?String(z.description):"";return(()=>{var T=F1(),B=T.firstChild;return T.$$keydown=G=>k(M(),G),T.$$click=()=>y(M()),ie(G=>l[M()]=G,T),D(T,C({get role(){return r()?"checkbox":"radio"},get"aria-checked"(){return K()},get"aria-label"(){return z.label},get disabled(){return J()},get tabindex(){return M()===v()?0:-1},get"data-state"(){return K()?"checked":"unchecked"},get"data-value"(){return z.value}},()=>t.at("tile",M(),...A(K(),J()))),!1,!0),x(T,$(ee,{get when(){return g()},get children(){var G=O1();return D(G,C(()=>t.at("picture",M(),...A(K(),J()))),!1,!0),x(G,$(L1,{get src(){return Z(()=>!!z.image)()?String(z.image):null}})),G}}),B),D(B,C(()=>t.at("label",M(),...A(K(),J()))),!1,!0),x(B,()=>z.label),x(T,$(ee,{get when(){return U()},get children(){var G=M1();return D(G,C(()=>t.at("description",M(),...A(K(),J()))),!1,!0),x(G,U),G}}),null),T})()}}),null),x(S,$(ut,{part:t,field:c}),null),S})()}const B1={ChoiceTiles:j1};Ct(["click","keydown"]);var uc=F("<span>"),H1=F("<button type=button>"),W1=F("<div>"),U1=F("<div><div><pre class=xui-codeblock-pre><code>"),q1=F("<span class=xui-codeblock-spacer>"),K1=F("<span><span>"),V1=F(`<span><span></span>
464
+ `);function G1(e){const t=ae(),n=be(e),r=()=>q(e.props.code),o=()=>q(e.props.language,"plain"),i=j(()=>_m(r(),o())),s=j(()=>new Set(nn(e.props.highlight).map(h=>pe(h)))),a=()=>re(e.props.lineNumbers),l=()=>e.props.copyable!==!1,c=()=>q(e.props.title),u=()=>c()||(o()==="plain"?"":o()),d=()=>e.props.maxLines===void 0?0:pe(e.props.maxLines),[f,g]=X(!1);let p=null;ce(()=>{p&&clearTimeout(p)});const v=async()=>{const h=typeof navigator>"u"?void 0:navigator.clipboard;if(h?.writeText){try{await h.writeText(Em(r(),o()))}catch{return}g(!0),t.announce(t.t("copied")),p&&clearTimeout(p),p=setTimeout(()=>g(!1),1500)}},m=()=>`${String(i().length).length+1}ch`,b=()=>`${n("body").class} xui-codeblock-scroll`,y=()=>`${n("code").class} xui-codeblock-text`;return(()=>{var h=U1(),k=h.firstChild,w=k.firstChild,_=w.firstChild;return D(h,C(()=>e.rootProps,{role:"region",get"aria-label"(){return c()||t.t("codeBlock")},get"data-language"(){return o()}}),!1,!0),x(h,$(ee,{get when(){return u()||l()},get children(){var A=W1();return D(A,C(()=>n("header")),!1,!0),x(A,$(ee,{get when(){return u()},get fallback(){return q1()},get children(){var S=uc();return D(S,C(()=>n("title")),!1,!0),x(S,u),S}}),null),x(A,$(ee,{get when(){return l()},get children(){var S=H1();return D(S,C(()=>n("copy",f()&&"checked"),{get"aria-label"(){return Z(()=>!!f())()?t.t("copied"):t.t("copy")},onClick:()=>{v()}}),!1,!0),x(S,$($e,{get slot(){return f()?"CodeBlock.copied":"CodeBlock.copy"}})),S}}),null),A}}),k),D(k,C(()=>n("body"),{get class(){return b()},get"data-wrap"(){return re(e.props.wrap)?"true":void 0},get style(){return Z(()=>d()>0)()?me({"--xui-code-lines":d()}):void 0},get"data-max-lines"(){return Z(()=>d()>0)()?d():void 0},tabindex:0}),!1,!0),x(_,$(Pt,{get each(){return i()},children:(A,S)=>(()=>{var E=V1(),O=E.firstChild;return D(E,C(()=>n.at("line",S,s().has(S+1)&&"selected"),{"data-line":S+1}),!1,!0),x(E,$(ee,{get when(){return a()},get children(){var P=K1(),M=P.firstChild;return D(P,C(()=>n("gutter"),{get style(){return{"min-width":m()}},"aria-hidden":"true"}),!1,!0),D(M,C(()=>n.at("lineNumber",S)),!1,!0),x(M,S+1),P}}),O),D(O,C(()=>n.at("code",S),{get class(){return y()}}),!1,!0),x(O,()=>A().length===0?"​":null,null),x(O,$(Pt,{get each(){return A()},children:P=>(()=>{var M=uc();return D(M,C(()=>n.with("token",{kind:P().kind})),!1,!0),x(M,()=>P().text),M})()}),null),E})()})),te(()=>V(w,"id",`${e.domId}.code`)),h})()}const Y1={CodeBlock:G1};var X1=F("<div class=xui-calendar-head><button type=button class=xui-calendar-nav></button><span aria-live=polite></span><button type=button class=xui-calendar-nav>"),Z1=F("<div class=xui-calendar-grid role=grid><div role=row class=xui-calendar-row>"),J1=F("<span role=columnheader class=xui-calendar-weekday>"),Q1=F("<div role=row class=xui-calendar-row>"),eS=F("<span role=gridcell class=xui-calendar-cell><button type=button><span class=xui-calendar-day-label>"),fi=F("<span>"),cf=F("<div><button><span>"),tS=F("<div role=listbox tabindex=0 class=xui-TimePicker-listbox>"),nS=F("<div><button type=button><span>"),rS=F("<div role=option>");const uf=(e,t)=>({type:"button","aria-haspopup":"dialog","aria-expanded":e,"aria-controls":t,"data-state":e?"open":"closed"});function df(e){const t=N(()=>e.initial),[n,r]=X(t),[o,i]=X(new Date(t.getFullYear(),t.getMonth(),1));let s,a=!1;const l=j(()=>Xv(o(),e.firstDay)),c=j(()=>{const y=new Intl.DateTimeFormat(e.formatter.locale,{weekday:"narrow"});return Array.from({length:7},(h,k)=>{const w=new Date(2023,0,1+(e.firstDay+k)%7);return{short:e.formatter.date(lt(w),{format:"EEE"}),narrow:y.format(w)}})}),u=()=>e.formatter.date(lt(o()),{format:"MMMM yyyy"}),d=j(()=>new Intl.DateTimeFormat(e.formatter.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric"})),f=y=>e.min!==null&&y<e.min||e.max!==null&&y>e.max,g=y=>{const h=Di(n(),y);Yi(()=>{r(h),i(new Date(h.getFullYear(),h.getMonth(),1))})},p=j(()=>Zv(l(),o(),n(),f)),v=y=>{a=!0,Yi(()=>{r(y);const h=o();(y.getMonth()!==h.getMonth()||y.getFullYear()!==h.getFullYear())&&i(new Date(y.getFullYear(),y.getMonth(),1))})};he(_e([n,o],()=>{a&&(a=!1,s?.querySelector(`[data-date="${lt(n())}"]`)?.focus())}));const m=y=>{const h=y.key,k=n(),w=e.direction==="rtl";let _=null;if(h==="ArrowLeft")_=On(k,w?1:-1);else if(h==="ArrowRight")_=On(k,w?-1:1);else if(h==="ArrowUp")_=On(k,-7);else if(h==="ArrowDown")_=On(k,7);else if(h==="PageUp")_=Di(k,y.shiftKey?-12:-1);else if(h==="PageDown")_=Di(k,y.shiftKey?12:1);else if(h==="Home")_=On(k,-((k.getDay()-e.firstDay+7)%7));else if(h==="End")_=On(k,6-(k.getDay()-e.firstDay+7)%7);else if(h==="Enter"||h===" "){y.preventDefault(),f(k)||e.onPick(k);return}_&&(y.preventDefault(),v(_))},b=j(()=>{const y=[],h=l();for(let k=0;k<6;k++)y.push(h.slice(k*7,k*7+7));return y});return[(()=>{var y=X1(),h=y.firstChild,k=h.nextSibling,w=k.nextSibling;return h.$$click=()=>g(-1),x(h,$($e,{slot:"DatePicker.previousMonth"})),x(k,u),w.$$click=()=>g(1),x(w,$($e,{slot:"DatePicker.nextMonth"})),te(_=>{var A=e.t("previousMonth"),S=e.t("nextMonth");return A!==_.e&&V(h,"aria-label",_.e=A),S!==_.t&&V(w,"aria-label",_.t=S),_},{e:void 0,t:void 0}),y})(),(()=>{var y=Z1(),h=y.firstChild;y.$$keydown=m;var k=s;return typeof k=="function"?ie(k,y):s=y,x(h,$(Pt,{get each(){return c()},children:w=>(()=>{var _=J1();return x(_,()=>w().narrow),te(A=>{var S=w().short,E=w().short;return S!==A.e&&V(_,"aria-label",A.e=S),E!==A.t&&V(_,"title",A.t=E),A},{e:void 0,t:void 0}),_})()})),x(y,$(Pt,{get each(){return b()},children:w=>(()=>{var _=Q1();return x(_,$(Pt,{get each(){return w()},children:A=>{const S=A,E=()=>e.isSelected(S()),O=()=>e.inRange?.(S())??!1,P=()=>S().getMonth()!==o().getMonth(),M=()=>f(S()),z=()=>Qt(S(),p()),K=()=>Qt(S(),new Date);return(()=>{var J=eS(),U=J.firstChild,T=U.firstChild;return D(U,C(()=>e.part(e.dayPart,E()&&"selected",M()&&"disabled"),{get"data-date"(){return lt(S())},get"data-outside"(){return P()?"":void 0},get"data-range"(){return O()?"":void 0},get"data-today"(){return K()?"":void 0},get disabled(){return M()},get tabindex(){return z()?0:-1},onFocus:()=>{Qt(S(),n())||r(S())},get"aria-label"(){return d().format(S())},get"aria-current"(){return K()?"date":void 0},onClick:()=>{r(S()),e.onPick(S())}}),!1,!0),x(U,(()=>{var B=Z(()=>!!(O()&&!E()));return()=>B()?(()=>{var G=fi();return D(G,C(()=>e.part("range"),{"aria-hidden":"true"}),!1,!1),G})():null})(),T),x(T,()=>S().getDate()),te(()=>V(J,"aria-selected",E())),J})()}})),_})()}),null),te(()=>V(y,"aria-label",u())),y})()]}function ff(e,t){return e.firstDayOfWeek===void 0?vm(t):(Math.round(pe(e.firstDayOfWeek))%7+7)%7}const pf=e=>e.querySelector('.xui-calendar-grid button[tabindex="0"]')?.focus();function oS(e){const t=be(e),n=ae(),r=Ce(),o=Ce(),[i,s]=Me(()=>e.node,()=>e.scope,"value",()=>q(e.props.value));let a;const l=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:i,focusEl:()=>a}),[c,u]=X(!1),d=j(()=>i()?Lt(i()):null),f=j(()=>e.props.min?Lt(q(e.props.min)):null),g=j(()=>e.props.max?Lt(q(e.props.max)):null),p=()=>ff(e.props,n.locale),v=()=>{const y=d();return y?n.formatter.date(lt(y)):""},m=()=>re(e.props.disabled)||!!l.form?.disabled,b=y=>{const h=lt(y);s(h),l.change(h),l.touch(),e.emit("change",{value:h},{value:h}),u(!1)};return(()=>{var y=cf(),h=y.firstChild,k=h.firstChild;D(y,C(()=>e.rootProps),!1,!0),x(y,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),h);var w=a;return typeof w=="function"?ie(w,h):a=h,D(h,C(()=>uf(c(),o),{id:r},()=>t("trigger",c()&&"open",l.invalid&&"invalid",m()&&"disabled"),{get disabled(){return m()},get"data-value"(){return i()||void 0},"aria-haspopup":"dialog",get"aria-invalid"(){return l.invalid||void 0},get"aria-describedby"(){return l.describedBy},onClick:()=>u(!c())}),!1,!0),x(k,()=>v()||(()=>{var _=fi();return D(_,C(()=>t("placeholder")),!1,!0),x(_,()=>q(e.props.placeholder)),_})()),x(h,$($e,{slot:"DatePicker.trigger"}),null),x(y,$(ka,{get portal(){return n.portal},get dir(){return n.direction},get open(){return c()},setOpen:u,trigger:()=>a,contentId:o,get attrs(){return{...t("calendar",c()&&"open"),dir:n.direction,role:"dialog","aria-label":q(e.props.label)||void 0,"data-xui-overlay":"DatePicker"}},onOpenAutoFocus:pf,get children(){return $(df,{part:t,dayPart:"day",get locale(){return n.locale},get formatter(){return n.formatter},get firstDay(){return p()},get min(){return f()},get max(){return g()},isSelected:_=>Qt(_,d()),get initial(){return d()??new Date},onPick:b,get t(){return n.t},get direction(){return n.direction}})}}),null),x(y,$(ut,{part:t,field:l}),null),y})()}function iS(e){const t=be(e),n=ae(),r=Ce(),o=Ce(),[i,s]=Me(()=>e.node,()=>e.scope,"start",()=>q(e.props.start)),[a,l]=Me(()=>e.node,()=>e.scope,"end",()=>q(e.props.end));let c;const u=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:()=>({start:i(),end:a()}),focusEl:()=>c}),[d,f]=X(!1),[g,p]=X(null),[v,m]=X(null),b=j(()=>i()?Lt(i()):null),y=j(()=>a()?Lt(a()):null),h=j(()=>e.props.min?Lt(q(e.props.min)):null),k=j(()=>e.props.max?Lt(q(e.props.max)):null),w=()=>ff(e.props,n.locale),_=O=>n.formatter.date(lt(O)),A=()=>{const O=b(),P=y();return O?`${_(O)} – ${P?_(P):""}`:""};Ut(_e(d,O=>{O||(p(null),m(null))}));const S=O=>{const P=g();if(!P){p(O);return}const[M,z]=O<P?[O,P]:[P,O],K={start:lt(M),end:lt(z)};s(K.start),l(K.end),p(null),u.change(K),u.touch(),e.emit("change",K,K),f(!1)},E=j(()=>{const O=g()??b(),P=g()?v():y();return O&&P?P<O?[P,O]:[O,P]:[O,P]});return(()=>{var O=cf(),P=O.firstChild,M=P.firstChild;D(O,C(()=>e.rootProps),!1,!0),x(O,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),P);var z=c;return typeof z=="function"?ie(z,P):c=P,D(P,C(()=>uf(d(),o),{id:r},()=>t("trigger",d()&&"open",u.invalid&&"invalid"),{get"data-start"(){return i()||void 0},get"data-end"(){return a()||void 0},"aria-haspopup":"dialog",get"aria-describedby"(){return u.describedBy},onClick:()=>f(!d())}),!1,!0),x(M,()=>A()||(()=>{var K=fi();return D(K,C(()=>t("placeholder")),!1,!0),x(K,()=>q(e.props.placeholder)),K})()),x(P,$($e,{slot:"DateRangePicker.trigger"}),null),x(O,$(ka,{get portal(){return n.portal},get dir(){return n.direction},get open(){return d()},setOpen:f,trigger:()=>c,contentId:o,get attrs(){return{...t("calendar",d()&&"open"),dir:n.direction,role:"dialog","aria-label":q(e.props.label)||void 0,"data-xui-overlay":"DateRangePicker","data-pending":g()?lt(g()):void 0}},onOpenAutoFocus:pf,onPointerOver:K=>{const J=K.target.closest?.("[data-date]")?.getAttribute("data-date");g()&&J&&m(Lt(J))},onFocusIn:K=>{const J=K.target.getAttribute?.("data-date");g()&&J&&m(Lt(J))},get children(){return $(df,{part:t,dayPart:"day",get locale(){return n.locale},get formatter(){return n.formatter},get firstDay(){return w()},get min(){return h()},get max(){return k()},isSelected:K=>Qt(K,g())||!g()&&(Qt(K,b())||Qt(K,y())),inRange:K=>{const[J,U]=E();return!!(J&&U&&K>J&&K<U)},get initial(){return b()??new Date},onPick:S,get t(){return n.t},get direction(){return n.direction}})}}),null),x(O,$(ut,{part:t,field:u}),null),O})()}const Wi=e=>{const t=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!t)return null;const n=Number(t[1]),r=Number(t[2]);return n<24&&r<60?n*60+r:null},dc=e=>`${String(Math.floor(e/60)).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`;function sS(e){const t=be(e),n=ae(),r=Ce(),o=Ce(),i=`${r}-list`,[s,a]=Me(()=>e.node,()=>e.scope,"value",()=>q(e.props.value));let l;const c=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:s,focusEl:()=>l}),u=()=>re(e.props.disabled)||!!c.form?.disabled,[d,f]=X(!1),g=()=>Math.max(1,Math.round(pe(e.props.step,15))),p=()=>Wi(q(e.props.min))??0,v=()=>Wi(q(e.props.max))??1439,m=j(()=>{const S=[];for(let E=p();E<=v();E+=g())S.push(E);return S}),b=j(()=>new Intl.DateTimeFormat(n.locale,{hour:"numeric",minute:"2-digit"})),y=S=>b().format(new Date(2e3,0,1,Math.floor(S/60),S%60)),h=()=>Wi(s()),k=S=>{const E=dc(m()[S]);a(E),c.change(E),c.touch(),e.emit("change",{value:E},{value:E}),f(!1),l?.focus()},w=Vk({count:()=>m().length,labelOf:S=>y(m()[S]),onPick:k,typeahead:!0});let _;Ut(_e(d,S=>{if(!S)return;const E=N(h),O=E===null?0:N(m).findIndex(P=>P>=E);w.setActive(O<0?0:O)},{defer:!0}));const A=()=>w.active()>=0?`${i}-${w.active()}`:void 0;return he(_e(A,S=>{S&&_?.querySelector(`[id="${S}"]`)?.scrollIntoView?.({block:"nearest"})})),(()=>{var S=nS(),E=S.firstChild,O=E.firstChild;D(S,C(()=>e.rootProps),!1,!0),x(S,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),E);var P=l;return typeof P=="function"?ie(P,E):l=E,V(E,"id",r),D(E,C({get"data-state"(){return d()?"open":"closed"}},()=>t("trigger",d()&&"open",u()&&"disabled",c.invalid&&"invalid"),{get disabled(){return u()},role:"combobox","aria-haspopup":"listbox",get"aria-expanded"(){return d()},get"aria-controls"(){return d()?i:void 0},get"data-value"(){return s()||void 0},get"aria-describedby"(){return c.describedBy},onClick:()=>f(!d())}),!1,!0),x(O,(()=>{var M=Z(()=>h()!==null);return()=>M()?y(h()):(()=>{var z=fi();return D(z,C(()=>t("placeholder")),!1,!0),x(z,()=>q(e.props.placeholder)),z})()})()),x(E,$($e,{slot:"TimePicker.trigger"}),null),x(S,$(ka,{get portal(){return n.portal},get dir(){return n.direction},get open(){return d()},setOpen:f,trigger:()=>l,contentId:o,get attrs(){return{...t("list",d()&&"open"),dir:n.direction,"data-xui-overlay":"TimePicker"}},onOpenAutoFocus:()=>_?.focus(),get children(){var M=tS();Nn(M,"keydown",w.onKeyDown,!0);var z=_;return typeof z=="function"?ie(z,M):_=M,V(M,"id",i),V(M,"aria-labelledby",r),x(M,$(xe,{get each(){return m()},children:(K,J)=>{const U=()=>K===h();return(()=>{var T=rS();return D(T,C({get id(){return`${i}-${J()}`},get"aria-selected"(){return U()},get"data-value"(){return dc(K)}},()=>t("item",(U()||J()===w.active())&&"selected"),{onPointerMove:()=>w.setActive(J()),onMouseDown:B=>B.preventDefault(),onClick:()=>k(J())}),!1,!0),x(T,()=>y(K)),T})()}})),te(()=>V(M,"aria-activedescendant",A())),M}}),null),x(S,$(ut,{part:t,field:c}),null),S})()}const aS={DatePicker:oS,DateRangePicker:iS,TimePicker:sS};Ct(["click","keydown"]);var pi=F("<span>"),lS=F("<span><svg><circle></circle><circle>"),fc=F("<div>"),cS=F("<div><span></span><span>"),pc=F("<i>"),uS=F("<span class=xui-tree-col>");function Ca(e,t,n,r,o){const i=ds(e.theme,{component:t,part:n,props:wr(t,r,e.extensionDefs)},e.mode);return typeof i.width=="number"?i.width:o}function dS(e){const t=ae(),n=be(e),r=j(()=>{const i=Ca(t,"Ring","root",e.props,32),s=Math.max(0,Math.min(1,pe(e.props.value,0))),a=ds(t.theme,{component:"Ring",part:"track",props:wr("Ring",e.props)},t.mode),l=ds(t.theme,{component:"Ring",part:"fill",props:wr("Ring",e.props)},t.mode),c=typeof a.borderWidth=="number"?a.borderWidth:2,u=i/2-c/2,d=2*Math.PI*u;return{size:i,value:s,trackStyle:a,fillStyle:l,stroke:c,r:u,c:d,fillStroke:typeof l.borderWidth=="number"?l.borderWidth:c}}),o=()=>q(e.props.label);return(()=>{var i=lS(),s=i.firstChild,a=s.firstChild,l=a.nextSibling;return D(i,C(()=>e.rootProps,{role:"progressbar","aria-valuemin":0,"aria-valuemax":1,get"aria-valuenow"(){return r().value},get"aria-label"(){return o()||void 0},get style(){return zt(e.rootProps,{width:r().size,height:r().size})}}),!1,!0),D(a,C(()=>n("track"),{get cx(){return r().size/2},get cy(){return r().size/2},get r(){return r().r},fill:"none",stroke:"currentColor",get"stroke-width"(){return r().stroke},get style(){return me({color:String(r().trackStyle.color??"currentColor")})}}),!0,!1),D(l,C(()=>n("fill"),{get cx(){return r().size/2},get cy(){return r().size/2},get r(){return r().r},fill:"none",stroke:"currentColor",get"stroke-width"(){return r().fillStroke},get"stroke-dasharray"(){return`${r().c*r().value} ${r().c}`},"stroke-linecap":"round",get transform(){return`rotate(-90 ${r().size/2} ${r().size/2})`},get style(){return me({color:String(r().fillStyle.color??"currentColor")})}}),!0,!1),x(i,$(ee,{get when(){return o()},get children(){var c=pi();return D(c,C(()=>n("label")),!1,!0),x(c,o),c}}),null),te(c=>{var u=`0 0 ${r().size} ${r().size}`,d=r().size,f=r().size;return u!==c.e&&V(s,"viewBox",c.e=u),d!==c.t&&V(s,"width",c.t=d),f!==c.a&&V(s,"height",c.a=f),c},{e:void 0,t:void 0,a:void 0}),i})()}function fS(e){const t=ae(),n=()=>Ca(t,"Spinner","root",e.props,20),r=()=>q(e.props.label)||t.t("loading");return(()=>{var o=pi();return D(o,C(()=>e.rootProps,{role:"status",get"aria-label"(){return r()},get style(){return zt(e.rootProps,{width:n(),height:n()})}}),!1,!0),x(o,$(ra,{get icon(){return xd.spinner},"aria-hidden":"true"})),o})()}const hc=[[56,168],[56,120],[56,192]];function pS(e){const t=be(e),n=()=>Math.min(50,Math.floor(pe(e.props.rows,0))),r=()=>{const a=q(e.props.width,"100%"),l=q(e.props.height,"16px");return(()=>{var c=fc();return D(c,C(()=>e.rootProps,{"aria-hidden":"true",get style(){return zt(e.rootProps,{width:a,height:l,borderRadius:re(e.props.rounded)?9999:void 0})}}),!1,!1),c})()},o=()=>e.props.dot===void 0?!0:re(e.props.dot),i=()=>e.props.rowHeight===void 0?"var(--xui-control-row)":`${pe(e.props.rowHeight)}px`,s=j(()=>Array.from({length:Math.max(0,n())},(a,l)=>l));return $(ee,{get when(){return n()>=1},get fallback(){return r()},get children(){var a=fc();return D(a,C(()=>e.rootProps,{"data-rows":"","aria-hidden":"true"}),!1,!0),x(a,$(xe,{get each(){return s()},children:l=>{const[c,u]=hc[l%hc.length];return(()=>{var d=cS(),f=d.firstChild,g=f.nextSibling;return D(d,C(()=>t.at("row",l),{get style(){return me({height:i()})}}),!1,!0),x(d,$(ee,{get when(){return o()},get children(){var p=pi();return D(p,C(()=>t.at("dot",l)),!1,!1),p}}),f),D(f,C(()=>t.at("bar",`${l}.0`),{get style(){return me({width:c})}}),!1,!1),D(g,C(()=>t.at("bar",`${l}.1`),{"data-title":"",get style(){return me({width:u})}}),!1,!1),d})()}})),a}})}function hS(e){const t=ae(),n=be(e),r=()=>Math.max(0,Math.floor(pe(e.props.depth,0))),o=()=>e.props.elbowAt===void 0||e.props.elbowAt===null?-1:pe(e.props.elbowAt),i=()=>re(e.props.tee),s=j(()=>new Set(nn(e.props.passThrough).map(d=>pe(d)))),a=()=>Ca(t,"TreeGuides","line",e.props,1),l=Si/2,c=()=>(()=>{var d=pc();return D(d,C(()=>n("line"),{"data-vertical":"",get style(){return me({left:l,width:a(),top:-Ci,bottom:0})}}),!1,!1),d})(),u=j(()=>Array.from({length:r()},(d,f)=>f));return(()=>{var d=pi();return D(d,C(()=>e.rootProps,{"aria-hidden":"true",get"data-tee"(){return i()?"true":void 0}}),!1,!0),x(d,$(xe,{get each(){return u()},children:f=>{const g=()=>f===o();return(()=>{var p=uS();return V(p,"data-col",f),x(p,(()=>{var v=Z(()=>!!(s().has(f)&&!g()));return()=>v()?c():null})(),null),x(p,(()=>{var v=Z(()=>!!(g()&&i()));return()=>v()?c():null})(),null),x(p,(()=>{var v=Z(()=>!!g());return()=>v()?(()=>{var m=pc();return D(m,C(()=>n("line"),{"data-elbow":"",get style(){return me({left:l,top:-Ci,width:Si-l,height:`calc(50% + ${Ci+a()/2}px)`,borderLeftWidth:a(),borderBottomWidth:a(),borderBottomLeftRadius:Vg})}}),!1,!1),m})():null})(),null),te(v=>De(p,me({width:Si}),v)),p})()}})),d})()}const gS={Ring:dS,Spinner:fS,Skeleton:pS,TreeGuides:hS};function hf(e){const[t,n]=X(0,{equals:!1}),r=new Jv({initial:N(e.external),send:(o,i,s)=>e.send(o,i,s),writeLocal:o=>e.writeLocal?.(o),debounceMs:e.debounceMs??Er,onChange:()=>n(0)});return r.attach(),ce(()=>r.dispose()),he(_e(e.external,o=>{r.push(o)},{defer:!0})),{get value(){return t(),r.value},get revision(){return t(),r.revision},get pending(){return t(),r.pending},get focused(){return t(),r.focused},onFocus:()=>r.focus(),onBlur:()=>r.blur(),edit:o=>r.edit(o),commit:()=>r.commit()}}var mS=F("<textarea>"),yS=F("<div>"),bS=F("<input>"),vS=F("<div><div><button type=button></button><input><button type=button>"),xS=F("<span>"),gf=F("<span data-state=checked>"),$S=F("<div><button type=button role=checkbox value=on></button><div class=xui-field-text>"),wS=F("<div><div></div><button type=button role=switch value=on><span>"),kS=F("<div><div role=radiogroup>"),SS=F("<label class=xui-radio-row><button type=button role=radio data-radix-collection-item></button><span>"),CS=F("<div><div><span></span></div><span data-orientation=horizontal class=xui-slider-root><span data-orientation=horizontal><span data-orientation=horizontal></span></span><span><span role=slider aria-orientation=horizontal data-orientation=horizontal tabindex=0 data-radix-collection-item style>"),AS=F("<div><textarea></textarea><div class=xui-composer-bar><button type=button>"),TS=F("<button type=button>");function mf(e,t){const n=ae(),r=j(()=>Tr(e.node.props,t,e.scope)),o=()=>q(e.node.props.name,e.node.id);return{send:(a,l,c)=>N(()=>{const u={surfaceId:n.surfaceId,componentId:e.domId,name:o(),path:wv(r()),value:a,revision:l,kind:c};return n.host.onInput?.(u)}),writeLocal:a=>{const l=N(r);l&&n.setData(l,a)},path:r,name:o}}function IS(e){return $(yf,C(e,{multiline:!1}))}function ES(e){return $(yf,C(e,{multiline:!0}))}function _S(e,t,n){const r=getComputedStyle(e),o=parseFloat(r.lineHeight)||parseFloat(r.fontSize)*1.4||20,i=(parseFloat(r.paddingTop)||0)+(parseFloat(r.paddingBottom)||0)+(parseFloat(r.borderTopWidth)||0)+(parseFloat(r.borderBottomWidth)||0),s=t*o+i,a=n?n*o+i:1/0;e.style.height="auto";const l=Math.min(a,Math.max(s,e.scrollHeight+(parseFloat(r.borderTopWidth)||0)+(parseFloat(r.borderBottomWidth)||0)));e.style.height=`${l}px`,e.style.overflowY=e.scrollHeight>l?"auto":"hidden"}function yf(e){const t=be(e),n=Ce(),{send:r,writeLocal:o}=mf(e,"value"),i=hf({external:()=>q(e.props.value),send:r,writeLocal:o});let s;const a=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:()=>i.value,focusEl:()=>s}),l=()=>re(e.props.disabled)||!!a.form?.disabled,c=()=>q(e.props.label),u=()=>q(e.props.placeholder),d=()=>q(e.props.description),f=()=>Math.max(1,pe(e.props.rows,3)),g=()=>e.props.maxRows===void 0?null:Math.max(f(),pe(e.props.maxRows,f())),p=()=>e.multiline&&re(e.props.autosize);he(()=>{const h=p();i.value;const k=f(),w=g();h&&s&&_S(s,k,w)});const v=()=>[l()&&"disabled",i.focused&&"focus",a.invalid&&"invalid"],m=()=>{i.onFocus(),e.emit("focus")},b=()=>{i.onBlur(),a.touch(),e.emit("blur")},y=h=>{const k=h.currentTarget.value,w=i.revision+1;i.edit(k),a.change(k),e.emit("change",{value:k,revision:w},{value:k})};return(()=>{var h=yS();return D(h,C(()=>e.rootProps,{get"data-pending"(){return i.pending?"true":void 0},get"data-revision"(){return i.revision}}),!1,!0),x(h,$(Ze,{get part(){return t("label")},get text(){return c()},as:"label",htmlFor:n}),null),x(h,$(ee,{get when(){return e.multiline},get fallback(){return(()=>{var k=bS();return ie(w=>s=w,k),D(k,C(()=>t("field",...v()),{id:n,get name(){return q(e.props.name,e.node.id)},get value(){return i.value},get placeholder(){return u()||void 0},get disabled(){return l()},get"aria-invalid"(){return a.invalid?!0:void 0},get"aria-describedby"(){return Ir(d()&&`${n}-d`,a.describedBy)},onFocus:m,onBlur:b,onInput:y,get type(){return q(e.props.type,"text")},onKeyDown:w=>{w.key==="Enter"&&(w.preventDefault(),i.commit(),e.emit("submit",{value:i.value}),a.submit())}}),!1,!1),te(()=>k.defaultValue=i.value),k})()},get children(){var k=mS();return ie(w=>s=w,k),D(k,C(()=>t("field",...v()),{id:n,get name(){return q(e.props.name,e.node.id)},get value(){return i.value},get placeholder(){return u()||void 0},get disabled(){return l()},get"aria-invalid"(){return a.invalid?!0:void 0},get"aria-describedby"(){return Ir(d()&&`${n}-d`,a.describedBy)},onFocus:m,onBlur:b,onInput:y,get rows(){return f()},get"data-autosize"(){return p()?"true":void 0}}),!1,!1),te(()=>k.defaultValue=i.value),k}}),null),x(h,$(Ze,{get part(){return t("description")},get text(){return d()},id:`${n}-d`}),null),x(h,$(ut,{part:t,field:a}),null),h})()}const DS=e=>{const t=String(e),n=t.indexOf(".");return n<0?0:t.length-n-1};function PS(e){const t=ae(),n=be(e),r=Ce(),o=()=>e.props.min===void 0?null:pe(e.props.min),i=()=>e.props.max===void 0?null:pe(e.props.max),s=()=>pe(e.props.step,1)||1,a=()=>e.props.precision===void 0?DS(s()):Math.max(0,pe(e.props.precision)),l=()=>e.props.value===void 0||e.props.value===null||e.props.value===""?null:pe(e.props.value),[c,u]=Me(()=>e.node,()=>e.scope,"value",l),[d,f]=X(null);let g;const p=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:c,focusEl:()=>g}),v=()=>re(e.props.disabled)||!!p.form?.disabled,m=j(()=>new Intl.NumberFormat(t.locale).formatToParts(1.1).find(A=>A.type==="decimal")?.value??"."),b=A=>t.formatter.number(A,{decimals:a()}),y=A=>{let S=A;const E=o(),O=i();return E!==null&&(S=Math.max(E,S)),O!==null&&(S=Math.min(O,S)),Number(S.toFixed(a()))},h=A=>{u(A),p.change(A),e.emit("change",{value:A},{value:A})},k=A=>{const S=o(),E=c()??(S!==null&&S>0?S:0);h(y(E+A)),f(null)},w=()=>d()??(c()===null?"":b(c())),_=()=>q(e.props.unit);return(()=>{var A=vS(),S=A.firstChild,E=S.firstChild,O=E.nextSibling,P=O.nextSibling;return D(A,C(()=>e.rootProps),!1,!0),x(A,$(Ze,{get part(){return n("label")},get text(){return e.props.label},as:"label",htmlFor:r}),S),D(S,C(()=>n("field",v()&&"disabled",p.invalid&&"invalid"),{"data-xui-numberfield":""}),!1,!0),D(E,C(()=>n("decrement",v()&&"disabled"),{get"aria-label"(){return t.t("decrement")},tabindex:-1,get disabled(){return v()||o()!==null&&c()!==null&&c()<=o()},onClick:()=>k(-s())}),!1,!0),x(E,$($e,{slot:"NumberField.decrement"})),ie(M=>g=M,O),V(O,"id",r),D(O,C(()=>n("input"),{type:"text",get inputmode(){return a()>0?"decimal":"numeric"},role:"spinbutton",get"aria-valuenow"(){return c()??void 0},get"aria-valuemin"(){return o()??void 0},get"aria-valuemax"(){return i()??void 0},get"aria-valuetext"(){return Z(()=>c()===null)()?void 0:`${b(c())}${_()?` ${_()}`:""}`},get"aria-invalid"(){return p.invalid||void 0},get"aria-describedby"(){return p.describedBy},get name(){return q(e.props.name,e.node.id)},get placeholder(){return q(e.props.placeholder)||void 0},get disabled(){return v()},get value(){return w()},onFocus:()=>{const M=c();f(M===null?"":String(M).replace(".",m())),e.emit("focus")},onInput:M=>{const z=M.currentTarget.value;f(z);const K=ex(z,t.locale);(K!==null||z.trim()==="")&&h(K)},onBlur:()=>{const M=c();M!==null&&y(M)!==M&&h(y(M)),f(null),p.touch(),e.emit("blur")},onKeyDown:M=>{const z=M.shiftKey?10:1,K=o(),J=i();if(M.key==="ArrowUp")M.preventDefault(),k(s()*z);else if(M.key==="ArrowDown")M.preventDefault(),k(-s()*z);else if(M.key==="PageUp")M.preventDefault(),k(s()*10);else if(M.key==="PageDown")M.preventDefault(),k(-s()*10);else if(M.key==="Home"&&K!==null)M.preventDefault(),h(K),f(null);else if(M.key==="End"&&J!==null)M.preventDefault(),h(J),f(null);else if(M.key==="Enter"){M.preventDefault();const U=c(),T=U===null?null:y(U);T!==U&&h(T),f(null),e.emit("submit",{value:T},T!==U?{value:T}:void 0),p.submit()}}}),!1,!1),x(S,(()=>{var M=Z(()=>!!_());return()=>M()?(()=>{var z=xS();return D(z,C(()=>n("unit")),!1,!0),x(z,_),z})():null})(),P),D(P,C(()=>n("increment",v()&&"disabled"),{get"aria-label"(){return t.t("increment")},tabindex:-1,get disabled(){return v()||i()!==null&&c()!==null&&c()>=i()},onClick:()=>k(s())}),!1,!0),x(P,$($e,{slot:"NumberField.increment"})),x(A,$(ut,{part:n,field:p}),null),te(()=>O.defaultValue=w()),A})()}function OS(e){const t=be(e),n=Ce(),[r,o]=Me(()=>e.node,()=>e.scope,"checked",()=>re(e.props.checked)),[i,s]=X(),a=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:r,focusEl:i}),l=()=>re(e.props.disabled)||!!a.form?.disabled,c=di(i);let u=!1;return(()=>{var d=$S(),f=d.firstChild,g=f.nextSibling;return D(d,C(()=>e.rootProps),!1,!0),ie(s,f),V(f,"id",n),D(f,C({get"aria-checked"(){return r()},get"data-state"(){return r()?"checked":"unchecked"},get"data-disabled"(){return l()?"":void 0},get disabled(){return l()}},()=>t("box",r()&&"checked",l()&&"disabled",a.invalid&&"invalid"),{get"aria-invalid"(){return a.invalid||void 0},get"aria-describedby"(){return a.describedBy},onKeyDown:p=>{p.key==="Enter"&&p.preventDefault()},onClick:p=>{const v=!r();o(v),a.change(v),a.touch(),e.emit("change",{checked:v},{checked:v}),c()&&(u=p.cancelBubble,u||p.stopPropagation())}}),!1,!0),x(f,$(ee,{get when(){return r()},get children(){var p=gf();return D(p,C({get"data-disabled"(){return l()?"":void 0}},()=>t("check"),{get style(){return me({pointerEvents:"none"})}}),!1,!0),x(p,$($e,{slot:"Checkbox.check"})),p}})),x(d,$(ee,{get when(){return c()},get children(){return $(Sa,{type:"checkbox",get control(){return i()},get checked(){return r()},get name(){return q(e.props.name,e.node.id)},value:"on",get disabled(){return l()},transformFirst:!1,bubbles:()=>!u})}}),g),x(g,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:n}),null),x(g,$(Ze,{get part(){return t("description")},get text(){return e.props.description}}),null),x(g,$(ut,{part:t,field:a}),null),d})()}function MS(e){const t=be(e),n=Ce(),r=ae(),[o,i]=Me(()=>e.node,()=>e.scope,"checked",()=>re(e.props.checked)),[s,a]=X(),l=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:o,focusEl:s}),c=()=>re(e.props.disabled)||!!l.form?.disabled,u=di(s);let d=!1;const f=j(()=>{const v=pe(r.theme.recipes.Switch?.track?.[0]?.style?.width,32),m=pe(r.theme.recipes.Switch?.thumb?.[0]?.style?.width,16);return Math.max(0,v-m-4)}),g=()=>q(e.props.description),p=v=>{const m=v.target;c()||m.closest("button,label,a,input")||s()?.click()};return(()=>{var v=wS(),m=v.firstChild,b=m.nextSibling,y=b.firstChild;return D(v,C(()=>e.rootProps,{onClick:p}),!1,!0),D(m,C(()=>t("body")),!1,!0),x(m,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:n}),null),x(m,$(Ze,{get part(){return t("description")},get text(){return g()},id:`${n}-d`}),null),x(m,$(ut,{part:t,field:l}),null),ie(a,b),V(b,"id",n),D(b,C({get"aria-checked"(){return o()},get"data-state"(){return o()?"checked":"unchecked"},get"data-disabled"(){return c()?"":void 0},get disabled(){return c()}},()=>t("track",o()&&"checked",c()&&"disabled"),{get"aria-describedby"(){return Ir(g()&&`${n}-d`,l.describedBy)},get style(){return me({"--xui-switch-travel":`${f()}px`})},onClick:h=>{const k=!o();i(k),l.change(k),e.emit("change",{checked:k},{checked:k}),u()&&(d=h.cancelBubble,d||h.stopPropagation())}}),!1,!0),D(y,C({get"data-state"(){return o()?"checked":"unchecked"},get"data-disabled"(){return c()?"":void 0}},()=>t("thumb",o()&&"checked")),!1,!1),x(v,$(ee,{get when(){return u()},get children(){return $(Sa,{type:"checkbox",get control(){return s()},get checked(){return o()},get name(){return q(e.props.name,e.node.id)},value:"on",get disabled(){return c()},transformFirst:!0,bubbles:()=>!d})}}),null),v})()}const ks=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function FS(e){const t=be(e),n=ae(),r=Ce(),o=j(()=>Ne(e.props.options)),[i,s]=Me(()=>e.node,()=>e.scope,"value",()=>q(e.props.value));let a;const c=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:i,focusEl:()=>a?.querySelector('[data-state="checked"]')??a?.querySelector("button")}),u=()=>q(e.props.orientation,"vertical"),d=()=>q(e.props.name,e.node.id),f=di(()=>a),[g,p]=X(null),[v,m]=X(!1),b=()=>o().filter(E=>!re(E.disabled)).length;let y=!1,h=!1;const k=E=>{ks.includes(E.key)&&(h=!0)},w=()=>h=!1;Le(()=>{document.addEventListener("keydown",k),document.addEventListener("keyup",w)}),ce(()=>{document.removeEventListener("keydown",k),document.removeEventListener("keyup",w)});const _=()=>Array.from(a?.querySelectorAll('[role="radio"]')??[]).filter(E=>!E.disabled),A=E=>{s(E),c.change(E),e.emit("change",{value:E},{value:E})};let S=!1;return(()=>{var E=kS(),O=E.firstChild;D(E,C(()=>e.rootProps,{role:"group",get"aria-labelledby"(){return e.props.label?`${r}-l`:void 0},get"aria-describedby"(){return c.describedBy}}),!1,!0),x(E,$(Ze,{get part(){return t("label")},get text(){return e.props.label},id:`${r}-l`}),O);var P=a;return typeof P=="function"?ie(P,O):a=O,V(O,"aria-required",!1),D(O,C({get"aria-orientation"(){return u()},get dir(){return n.direction},get tabindex(){return v()||b()===0?-1:0},get"data-orientation"(){return u()}},()=>t("items"),{get class(){return`${t("items").class} xui-radio-items`},get"aria-invalid"(){return c.invalid||void 0},get style(){return me({outline:"none"})},onMouseDown:()=>y=!0,onFocus:M=>{const z=!y;if(M.target===M.currentTarget&&z&&!v()){const K=_(),J=K.find(T=>T.value===N(i)),U=K.find(T=>T.value===N(g));Ho([J,U,...K])}y=!1},onBlur:()=>m(!1)}),!1,!0),x(O,$(xe,{get each(){return o()},children:(M,z)=>{const K=()=>M.value===i(),J=()=>re(M.disabled),U=`${r}-${M.value}`;let T;const[B,G]=X();return(()=>{var I=SS(),R=I.firstChild,W=R.nextSibling;return V(I,"for",U),ie(H=>{T=H,G(H)},R),V(R,"id",U),D(R,C({get tabindex(){return g()===M.value?0:-1},get"data-orientation"(){return u()},get"aria-checked"(){return K()},get"data-state"(){return K()?"checked":"unchecked"},get"data-disabled"(){return J()?"":void 0},get disabled(){return J()},get value(){return M.value}},()=>t("item",K()&&"checked",J()&&"disabled",c.invalid&&"invalid"),{get"data-xui-id"(){return`${t.domId}.dot.${z()}`},onMouseDown:H=>{J()?H.preventDefault():p(M.value)},onFocus:()=>{p(M.value),h&&T?.click()},onKeyDown:H=>{if(H.key==="Tab"&&H.shiftKey){m(!0);return}if(H.target!==H.currentTarget)return;const L=n.direction!=="rtl"?H.key:H.key==="ArrowLeft"?"ArrowRight":H.key==="ArrowRight"?"ArrowLeft":H.key,Y=u()==="vertical";if(Y&&(L==="ArrowLeft"||L==="ArrowRight")||!Y&&(L==="ArrowUp"||L==="ArrowDown"))return;const ne=ef[L];if(ne!==void 0){if(H.metaKey||H.ctrlKey||H.altKey||H.shiftKey)return;H.preventDefault();let se=_();if(ne==="last")se.reverse();else if(ne==="prev"||ne==="next"){ne==="prev"&&se.reverse();const ue=se.indexOf(H.currentTarget);se=se.map((oe,ve)=>se[(ue+1+ve)%se.length])}setTimeout(()=>Ho(se))}else H.key==="Enter"&&H.preventDefault()},onClick:H=>{K()||A(M.value),f()&&(S=H.cancelBubble,S||H.stopPropagation())}}),!1,!0),x(R,$(ee,{get when(){return K()},get children(){var H=gf();return D(H,C({get"data-disabled"(){return J()?"":void 0}},()=>t("dot",K()&&"checked")),!1,!1),H}})),x(I,$(ee,{get when(){return f()},get children(){return $(Sa,{type:"radio",get control(){return B()},get checked(){return K()},get name(){return d()},get value(){return M.value},get disabled(){return J()},transformFirst:!0,bubbles:()=>!S})}}),W),x(I,(()=>{var H=Z(()=>!!M.icon);return()=>H()?$(tt,{get icons(){return n.host.icons},get name(){return M.icon},class:"xui-icon",width:16,height:16}):null})(),W),D(W,C(()=>t.at("label",z())),!1,!0),x(W,()=>q(M.label)),te(()=>V(I,"data-xui-id",`${t.domId}.item.${z()}`)),I})()}})),x(E,$(ut,{part:t,field:c}),null),E})()}function zS(e){const t=be(e),n=ae(),r=Ce(),o=()=>pe(e.props.min,0),i=()=>pe(e.props.max,100),s=()=>pe(e.props.step,1),[a,l]=Me(()=>e.node,()=>e.scope,"value",()=>pe(e.props.value,o()));let c;const[u,d]=X(),f=rf(u),g=di(u),p=()=>n.direction!=="rtl",v=()=>p()?"left":"right",m=()=>p()?"right":"left",b=()=>p1(a(),o(),i()),y=()=>{const E=f()?.width;return E?h1(E,b(),p()?1:-1):0},h=(E,O)=>{const P=f1(Math.round((E-o())/s())*s()+o(),d1(s())),M=af(P,[o(),i()]);M!==a()&&(u()?.focus(),l(M),O&&e.emit("change",{value:M},{value:M}))};let k,w=0;const _=E=>{const O=k??c.getBoundingClientRect();return k=O,sf([0,O.width],p()?[o(),i()]:[i(),o()])(E-O.left)},A=()=>{const E={};return E[v()]="0%",E[m()]=`${100-b()}%`,E},S=()=>{const E={transform:"var(--radix-slider-thumb-transform)",position:"absolute"};return E[v()]=`calc(${b()}% + ${y()}px)`,E};return(()=>{var E=CS(),O=E.firstChild,P=O.firstChild,M=O.nextSibling,z=M.firstChild,K=z.firstChild,J=z.nextSibling,U=J.firstChild;D(E,C(()=>e.rootProps),!1,!0),D(O,C(()=>t("header"),{get class(){return`${t("header").class} xui-slider-head`}}),!1,!0),x(O,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),P),D(P,C(()=>t("value")),!1,!0),x(P,()=>n.formatter.number(a())),M.$$pointerup=B=>{const G=B.target;if(G.hasPointerCapture?.(B.pointerId)){G.releasePointerCapture(B.pointerId),k=void 0;const I=a();I!==w&&e.emit("change",{value:I},{value:I})}},M.$$pointermove=B=>{B.target.hasPointerCapture?.(B.pointerId)&&h(_(B.clientX),!1)},M.$$pointerdown=B=>{w=a();const G=B.target;G.setPointerCapture?.(B.pointerId),B.preventDefault(),G===u()?G.focus():h(_(B.clientX),!1)},M.$$keydown=B=>{if(B.key==="Home")h(o(),!0),B.preventDefault();else if(B.key==="End")h(i(),!0),B.preventDefault();else if(lc.includes(B.key)||ks.includes(B.key)){const G=u1[p()?"from-left":"from-right"].includes(B.key),I=lc.includes(B.key)||B.shiftKey&&ks.includes(B.key);h(a()+s()*(I?10:1)*(G?-1:1),!0),B.preventDefault()}};var T=c;return typeof T=="function"?ie(T,M):c=M,V(M,"aria-disabled",!1),D(z,C(()=>t("track")),!1,!0),D(K,C(()=>t("range"),{get style(){return A()}}),!1,!1),ie(d,U),V(U,"id",r),D(U,C({get"aria-label"(){return q(e.props.label)||void 0},get"aria-valuemin"(){return o()},get"aria-valuenow"(){return a()},get"aria-valuemax"(){return i()}},()=>t("thumb")),!1,!1),x(J,$(ee,{get when(){return g()},get children(){return $(l1,{get name(){return q(e.props.name)||void 0},get value(){return a()}})}}),null),te(B=>{var G=n.direction,I=me({"--radix-slider-thumb-transform":"translateX(-50%)"}),R=S();return G!==B.e&&V(M,"dir",B.e=G),B.t=De(M,I,B.t),B.a=De(J,R,B.a),B},{e:void 0,t:void 0,a:void 0}),E})()}function RS(e){const t=be(e),n=ae(),{send:r,writeLocal:o}=mf(e,"value"),i=hf({external:()=>q(e.props.value),send:r,writeLocal:o}),s=()=>re(e.props.busy);let a;const l=()=>{const f=a;f&&(f.style.height="auto",f.style.height=`${Math.min(200,f.scrollHeight)}px`)};he(()=>{i.value,l()});const c=()=>{if(s()){e.emit("stop");return}const f=i.value.trim();f&&(i.commit(),e.emit("submit",{value:f}),i.edit(""))},u=()=>q(e.props.placeholder),d=()=>q(e.props.submitLabel)||n.t("send");return(()=>{var f=AS(),g=f.firstChild,p=g.nextSibling,v=p.firstChild;D(f,C(()=>e.rootProps,{get"data-busy"(){return s()?"true":void 0}}),!1,!0);var m=a;return typeof m=="function"?ie(m,g):a=g,D(g,C(()=>t("field",i.focused&&"focus"),{rows:1,get placeholder(){return u()||void 0},get value(){return i.value},get"aria-label"(){return n.t("message")},onFocus:()=>i.onFocus(),onBlur:()=>i.onBlur(),onInput:b=>{i.edit(b.currentTarget.value),e.emit("change",{value:b.currentTarget.value},{value:b.currentTarget.value})},onKeyDown:b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),c())}}),!1,!1),x(p,(()=>{var b=Z(()=>!!re(e.props.attachments));return()=>b()?(()=>{var y=TS();return D(y,C(()=>t("attachment"),{get"aria-label"(){return n.t("browse")},onClick:()=>{e.emit("attach")}}),!1,!0),x(y,$($e,{slot:"Composer.attachment"})),y})():null})(),v),D(v,C(()=>t("send",s()&&"pressed"),{get"aria-label"(){return Z(()=>!!s())()?n.t("stop"):d()},get disabled(){return Z(()=>!s())()&&i.value.trim()===""},onClick:c}),!1,!0),x(v,(()=>{var b=Z(()=>!!s());return()=>b()?$($e,{slot:"Composer.stop"}):$($e,{slot:"Composer.send"})})()),te(()=>g.defaultValue=i.value),f})()}const NS={Input:IS,Textarea:ES,NumberField:PS,Checkbox:OS,Radio:FS,Switch:MS,Slider:zS,Composer:RS};Ct(["keydown","pointerdown","pointermove","pointerup"]);var LS=F("<svg class=xui-media-sizer aria-hidden=true height=1>"),jS=F("<img decoding=async>",!0,!1,!1),Wo=F("<div>"),BS=F("<div><video>"),Ss=F("<span>"),HS=F("<div><audio>"),WS=F("<img>"),US=F("<div><button type=button></button><button type=button>"),qS=F("<div><div class=xui-carousel-track aria-live=polite>"),KS=F("<button type=button>");function bf(){return(()=>{var e=LS();return V(e,"width",Kg),e})()}const vf=(e,t)=>({...e,...t});function VS(e){const t=ae(),n=be(e),r=()=>q(e.props.src),o=()=>q(e.props.alt),i=()=>q(e.props.fit,"cover"),[s,a]=X("loading");Ut(_e(r,()=>a("loading"),{defer:!0}));const l=j(()=>{const m=e.props,b={};return m.width!==void 0&&(b.width=pe(m.width)),m.height!==void 0&&(b.height=pe(m.height)),m.aspectRatio!==void 0?b.aspectRatio=String(pe(m.aspectRatio)):m.height===void 0&&(b.aspectRatio=String(os)),Object.keys(b).length?b:void 0}),c=()=>i()==="scaleDown"?"scale-down":i(),u=()=>Math.max(0,Math.min(1,pe(e.props.focalX,.5))),d=()=>Math.max(0,Math.min(1,pe(e.props.focalY,.5))),f=oi(()=>t.host,r),g=()=>f().error?"error":s(),p=()=>!r()||g()==="error",v=()=>q(e.props.fallback);return(()=>{var m=Wo();return D(m,C(()=>vf(e.rootProps,{style:zt(e.rootProps,l()),role:p()?"img":void 0,"aria-label":p()?o():void 0,"data-state":r()?g():"empty"})),!1,!0),x(m,$(ee,{get when(){return Z(()=>!!(r()&&f().url))()&&g()!=="error"},get children(){var b=jS();return b.addEventListener("error",()=>a("error")),b.addEventListener("load",()=>a("loaded")),te(y=>{var h=f().url,k=o(),w=e.props.loading==="eager"?"eager":"lazy",_=me({objectFit:c(),objectPosition:`${u()*100}% ${d()*100}%`});return h!==y.e&&V(b,"src",y.e=h),k!==y.t&&V(b,"alt",y.t=k),w!==y.a&&V(b,"loading",y.a=w),y.o=De(b,_,y.o),y},{e:void 0,t:void 0,a:void 0,o:void 0}),b}}),null),x(m,$(bf,{}),null),x(m,$(ee,{get when(){return p()},get children(){var b=Wo();return D(b,C(()=>n("fallback"),{"aria-hidden":"true"}),!1,!0),x(b,$(ee,{get when(){return v()},get fallback(){return $($e,{slot:"Image.fallback"})},get children(){return $(tt,{get icons(){return t.host.icons},get name(){return v()}})}})),b}}),null),m})()}function GS(e){const t=ae(),n=be(e),r=zo(()=>t.host,()=>q(e.props.src),"stream"),o=zo(()=>t.host,()=>q(e.props.poster)),i=()=>pe(e.props.aspectRatio,os)||os,s=()=>re(e.props.autoplay);return(()=>{var a=BS(),l=a.firstChild;return D(a,C(()=>e.rootProps,{get style(){return zt(e.rootProps,{aspectRatio:String(i())})}}),!1,!0),x(a,$(bf,{}),l),ie(c=>te(()=>c.muted=s()),l),D(l,C(()=>n("controls"),{get src(){return r()},get poster(){return o()},controls:!0,get autoplay(){return s()},playsinline:!0,preload:"metadata",get"data-duration-ms"(){return Z(()=>e.props.durationMs!==void 0)()?pe(e.props.durationMs):void 0}}),!1,!1),a})()}function YS(e){const t=ae(),n=be(e),r=()=>q(e.props.title),o=zo(()=>t.host,()=>q(e.props.src),"stream");return(()=>{var i=HS(),s=i.firstChild;return D(i,C(()=>e.rootProps,{get style(){return zt(e.rootProps,{flexDirection:"column",gap:"var(--xui-spacing-xs)"})}}),!1,!0),x(i,$(ee,{get when(){return r()},get children(){var a=Ss();return D(a,C(()=>n("track")),!1,!0),x(a,r),a}}),s),D(s,C(()=>n("controls"),{get src(){return o()},controls:!0,preload:"metadata",get"aria-label"(){return r()||void 0},get"data-duration-ms"(){return Z(()=>e.props.durationMs!==void 0)()?pe(e.props.durationMs):void 0}}),!1,!1),i})()}function XS(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(t=>t[0]).join("").toUpperCase()}function ZS(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t%360}function JS(e){const t=ae(),n=be(e),r=()=>q(e.props.name),o=()=>q(e.props.src),i=()=>q(e.props.seed)||r(),s=()=>i()?ZS(i()):null,a=zo(()=>t.host,o),l=()=>{const p=s();return p===null?void 0:me({backgroundColor:`color-mix(in oklab, hsl(${p} 70% 55%) 22%, transparent)`,color:`hsl(${p} 60% ${t.mode==="dark"?72:38}%)`})},c=g1(()=>o()?a():void 0),u=()=>o()?c():"idle",d=()=>o()?300:0,[f,g]=X(!1);return Ut(_e(d,p=>p===0&&g(!0))),he(_e(d,p=>{if(p===0)return;const v=setTimeout(()=>g(!0),p);ce(()=>clearTimeout(v))})),(()=>{var p=Ss();return D(p,C(()=>vf(e.rootProps,{"aria-label":r()||void 0,role:"img"})),!1,!0),x(p,$(ee,{get when(){return Z(()=>!!o())()&&u()==="loaded"},get children(){var v=WS();return D(v,C(()=>n("image"),{get src(){return a()},get alt(){return r()}}),!1,!1),v}}),null),x(p,$(ee,{get when(){return Z(()=>!!f())()&&u()!=="loaded"},get children(){var v=Ss();return D(v,C(()=>n("fallback"),{get style(){return l()}}),!1,!0),x(v,()=>XS(r())||"?"),v}}),null),p})()}function QS(e){const t=ae(),n=be(e);let r;const o=()=>e.node.children,i=()=>pe(e.props.page,0),[s,a]=Me(()=>e.node,()=>e.scope,"page",i),l=v=>{const m=r;m&&m.children[v]&&typeof m.scrollTo=="function"&&m.scrollTo({left:m.children[v].offsetLeft,behavior:t.reducedMotion?"auto":"smooth"})};he(_e(i,v=>l(v)));const c=()=>{const v=r;if(!v||v.clientWidth===0)return;const m=Math.round(Math.abs(v.scrollLeft)/v.clientWidth);m!==s()&&(a(m),e.emit("change",{page:m},{page:m}))},u=v=>{const m=o().length;if(m===0)return;const b=re(e.props.loop)?(v%m+m)%m:Math.max(0,Math.min(m-1,v));a(b),e.emit("change",{page:b},{page:b}),l(b)},d=()=>o().length>1,f=j(()=>new Map(o().map((v,m)=>[v.id,{node:v,index:m}]))),g=j(()=>o().map(v=>v.id),void 0,{equals:(v,m)=>v.length===m.length&&v.every((b,y)=>b===m[y])}),p=v=>t.t("pageOf",{page:v+1,total:o().length});return(()=>{var v=qS(),m=v.firstChild;D(v,C(()=>e.rootProps,{role:"region",get"aria-roledescription"(){return t.t("carousel")},onKeyDown:y=>{const h=t.direction==="rtl";y.key==="ArrowRight"?u(s()+(h?-1:1)):y.key==="ArrowLeft"&&u(s()+(h?1:-1))}}),!1,!0),m.addEventListener("scroll",c);var b=r;return typeof b=="function"?ie(b,m):r=m,x(m,$(xe,{get each(){return g()},children:y=>{const h=j(_=>f().get(y)??_),k=()=>h().index===s(),w=()=>{const _={...n("page",k()&&"selected")};return k()||delete _["data-xui-id"],_};return(()=>{var _=Wo();return ie(A=>te(()=>A.toggleAttribute("inert",!k())),_),D(_,C(w,{role:"group",get"aria-roledescription"(){return t.t("slide")},get"aria-label"(){return p(h().index)},get"aria-hidden"(){return k()?void 0:!0},get"data-xui-inactive"(){return k()?void 0:""}}),!1,!0),x(_,$(At,{get node(){return h().node}})),_})()}})),x(v,$(ee,{get when(){return d()},get children(){var y=US(),h=y.firstChild,k=h.nextSibling;return D(y,C(()=>Ki(n("controls"),"xui-carousel-controls")),!1,!0),D(h,C(()=>Ki(n("previous"),"xui-carousel-nav"),{get"aria-label"(){return t.t("previous")},get disabled(){return Z(()=>!re(e.props.loop))()&&s()===0},onClick:()=>u(s()-1)}),!1,!0),x(h,$($e,{slot:"Carousel.previous"})),x(y,$(ee,{get when(){return e.props.indicators!==!1},get children(){var w=Wo();return D(w,C(()=>n("indicator"),{class:"xui-carousel-dots","data-xui-part":"Carousel/indicators",role:"tablist"}),!1,!0),x(w,$(xe,{get each(){return g()},children:_=>{const A=()=>f().get(_)?.index??0,S=()=>{const E={...n("indicator",A()===s()&&"selected")};return delete E["data-xui-id"],E};return(()=>{var E=KS();return D(E,C(S,{role:"tab",get"aria-selected"(){return A()===s()},get"aria-label"(){return p(A())},onClick:()=>u(A())}),!1,!1),E})()}})),w}}),k),D(k,C(()=>Ki(n("next"),"xui-carousel-nav"),{get"aria-label"(){return t.t("next")},get disabled(){return Z(()=>!re(e.props.loop))()&&s()===o().length-1},onClick:()=>u(s()+1)}),!1,!0),x(k,$($e,{slot:"Carousel.next"})),y}}),null),v})()}const eC={Image:VS,Video:GS,AudioPlayer:YS,Avatar:JS,Carousel:QS};var Uo=F("<button type=button>"),tC=F("<div><div role=tablist aria-orientation=horizontal>"),nC=F("<button type=button role=tab><span class=xui-Tabs-tab-body><span></span></span><span>"),rC=F("<span data-count>"),oC=F("<div data-orientation=horizontal role=tabpanel tabindex=0>"),Cs=F("<span>"),xf=F("<div>"),iC=F("<nav>"),sC=F("<div data-orientation=vertical><div data-orientation=vertical><button type=button><span class=xui-accordion-title></span></button></div><div role=region data-orientation=vertical>");const aC=(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]);function Aa(e,t){return j(()=>e().map(t),void 0,{equals:aC})}const $f=(e,t)=>j(()=>e().children[t()]);function lC(e){const t=ae(),n=be(e),r=j(()=>Ne(e.props.tabs)),o=()=>q(e.props.value)||r()[0]?.value||"",[i,s]=Me(()=>e.node,()=>e.scope,"value",o),a=()=>re(e.props.fill),l=()=>e.props.closable==="hover"||e.props.closable==="always",[c,u]=X(null),d=(A,S)=>u(E=>S?{index:A,state:S}:E?.index===A?null:E),f=()=>l()&&e.props.closable==="hover",g=Ce(),p=A=>`${g}-trigger-${A}`,v=A=>`${g}-content-${A}`;let m;const y=tf({orientation:"horizontal",dir:()=>t.direction,loop:!0,items:()=>m?Array.from(m.querySelectorAll(':scope > [role="tab"]')):[],focusable:A=>!A.disabled,active:A=>A.getAttribute("aria-selected")==="true"}),h=A=>{A!==N(i)&&(s(A),e.emit("change",{value:A},{value:A}))},k=Aa(r,A=>A.value),w=N(i);let _=!0;return Le(()=>{const A=requestAnimationFrame(()=>_=!1);ce(()=>cancelAnimationFrame(A))}),(()=>{var A=tC(),S=A.firstChild;D(A,C(()=>e.rootProps,{get dir(){return t.direction},"data-orientation":"horizontal"}),!1,!0);var E=m;return typeof E=="function"?ie(E,S):m=S,D(S,C(()=>n("list"),{get"data-fill"(){return a()?"true":void 0}},()=>y.group(),{style:{outline:"none"}},()=>y.groupHandlers),!1,!0),x(S,$(xe,{get each(){return k()},children:(O,P)=>{const M=j(()=>r()[P()]),z=()=>O===i();let K;const J=y.item(()=>K,()=>!0);return[(()=>{var T=nC(),B=T.firstChild,G=B.firstChild,I=B.nextSibling,R=K;return typeof R=="function"?ie(R,T):K=T,D(T,C({get"aria-selected"(){return z()},get"aria-controls"(){return v(O)},get"data-state"(){return z()?"active":"inactive"},get id(){return p(O)}},()=>n.at("tab",P(),z()&&"selected"),{get tabindex(){return J.tabindex()},"data-orientation":"horizontal","data-radix-collection-item":"",onPointerEnter:()=>f()&&d(P(),"hover"),onPointerLeave:()=>f()&&d(P(),null),onBlur:()=>f()&&d(P(),null),onMouseDown:W=>{J.onMouseDown(W),W.button===0&&!W.ctrlKey?h(O):W.preventDefault()},onKeyDown:W=>{J.onKeyDown(W),(W.key===" "||W.key==="Enter")&&h(O)},onFocus:W=>{J.onFocus(),f()&&W.currentTarget.matches(":focus-visible")&&d(P(),"focus"),z()||h(O)}}),!1,!0),x(B,(()=>{var W=Z(()=>!!M().icon);return()=>W()?$(tt,{get icons(){return t.host.icons},get name(){return M().icon},class:"xui-icon",width:16,height:16}):null})(),G),x(G,()=>q(M().label)),x(B,(()=>{var W=Z(()=>M().count!==void 0);return()=>W()?(()=>{var H=rC();return x(H,()=>t.formatter.number(pe(M().count))),H})():null})(),null),D(I,C(()=>n("indicator",z()&&"selected"),{"aria-hidden":"true"}),!1,!1),T})(),$(ee,{get when(){return l()},get children(){var T=Uo();return D(T,C(()=>n.at("close",P(),c()?.index===P()&&c().state),{get"aria-label"(){return t.t("closeTab",{name:q(M().label)})},onPointerEnter:()=>f()&&d(P(),"hover"),onPointerLeave:()=>f()&&d(P(),null),onClick:()=>{e.emit("close",{value:O})}}),!1,!0),x(T,$($e,{slot:"Tabs.close"})),T}})]}}),null),x(S,$(ee,{get when(){return re(e.props.addable)},get children(){var O=Uo();return D(O,C(()=>n("new"),{get"aria-label"(){return t.t("newTab")},onClick:()=>{e.emit("new")}}),!1,!0),x(O,$($e,{slot:"Tabs.new"})),O}}),null),x(A,$(xe,{get each(){return k()},children:(O,P)=>{const M=$f(()=>e.node,P),z=()=>O===i(),K=()=>{const T=n("content");return z()||delete T["data-xui-id"],T},J=O===w,U=()=>(i(),J?_?{"animation-duration":"0s"}:{}:void 0);return(()=>{var T=oC();return D(T,C({get"data-state"(){return z()?"active":"inactive"},get"aria-labelledby"(){return p(O)},get hidden(){return!z()},get id(){return v(O)}},K,{get style(){return U()}}),!1,!0),x(T,$(ee,{get when(){return Z(()=>!!z())()&&M()},get children(){return $(At,{get node(){return M()}})}})),T})()}}),null),A})()}const Kn=(e,t)=>Array.isArray(e)?t:t.join(","),qo=e=>Array.isArray(e)?e:e?e.split(","):[];function cC(e){const t=ae(),n=be(e),r=j(()=>Ne(e.props.items)),o=()=>q(e.props.variant,"segmented"),i=()=>o()==="bar",s=()=>!i()&&e.props.type==="multiple",a=()=>{const b=e.props.value;return s()?Array.isArray(b)?b.map(String):b?String(b).split(","):[]:q(b)},[l,c]=Me(()=>e.node,()=>e.scope,"value",a),u=b=>c(Array.isArray(b)?Kn(N(()=>e.props.value),b):b),d=b=>s()?qo(l()).includes(b.value):l()===b.value,f=(b,y)=>[Z(()=>Z(()=>!!b().icon)()?(()=>{var h=Cs();return D(h,C(()=>n("icon",y()&&"selected"),{"aria-hidden":"true"}),!1,!0),x(h,$(tt,{get icons(){return t.host.icons},get name(){return b().icon},class:"xui-icon",get width(){return i()?20:16},get height(){return i()?20:16}})),h})():null),Z(()=>Z(()=>!!b().label)()?(()=>{var h=Cs();return D(h,C(()=>n("label",y()&&"selected")),!1,!0),x(h,()=>q(b().label)),h})():null)],g=Aa(r,b=>b.value);let p;const v=tf({dir:()=>t.direction,loop:!0,items:()=>p?Array.from(p.querySelectorAll(":scope > button")):[],focusable:b=>!b.disabled,active:b=>b.getAttribute("data-state")==="on"}),m=b=>{const y=N(()=>e.props.value);if(s()){const h=qo(N(l)),k=h.includes(b.value)?h.filter(w=>w!==b.value):[...h,b.value];u(k),e.emit("change",{value:Kn(y,k)},{value:Kn(y,k)});return}N(l)!==b.value&&(u(b.value),e.emit("change",{value:b.value},{value:b.value}))};return $(ee,{get when(){return i()},get fallback(){return(()=>{var b=xf(),y=p;return typeof y=="function"?ie(y,b):p=b,D(b,C(()=>v.group(),{role:"group"},()=>e.rootProps,{get dir(){return t.direction},get style(){return{outline:"none",...e.rootProps.style??{}}}},()=>v.groupHandlers),!1,!0),x(b,$(xe,{get each(){return g()},children:(h,k)=>{const w=j(()=>r()[k()]),_=()=>d(w()),A=()=>re(w().disabled);let S;const E=v.item(()=>S,()=>!A());return(()=>{var O=Uo(),P=S;return typeof P=="function"?ie(P,O):S=O,D(O,C({get role(){return s()?void 0:"radio"},get"aria-checked"(){return Z(()=>!!s())()?void 0:_()},get"aria-pressed"(){return Z(()=>!!s())()?_():void 0},get"data-state"(){return _()?"on":"off"},get"data-disabled"(){return A()?"":void 0},get disabled(){return A()},get"aria-label"(){return w().label?void 0:h}},()=>n("item",_()&&"selected",A()&&"disabled"),{get tabindex(){return E.tabindex()},"data-radix-collection-item":"",get onMouseDown(){return E.onMouseDown},get onFocus(){return E.onFocus},get onKeyDown(){return E.onKeyDown},onClick:()=>{A()||m(w())}}),!1,!0),x(O,()=>f(w,_)),O})()}})),b})()},get children(){return $(uC,{get rootProps(){return e.rootProps},items:r,keys:g,value:()=>l(),part:n,content:f,onPick:b=>{u(b),e.emit("change",{value:b},{value:b})}})}})}function uC(e){const t=ae(),n=[],r=j(()=>e.items().map((c,u)=>re(c.disabled)?-1:u).filter(c=>c>=0)),o=()=>e.items().findIndex(c=>c.value===e.value()&&!re(c.disabled)),[i,s]=X(null),a=()=>i()??(o()>=0?o():r()[0]??-1),l=(c,u)=>{const d=r();if(!d.length)return;const f=d.indexOf(c),g=t.direction==="rtl",p=u==="ArrowDown"||u===(g?"ArrowLeft":"ArrowRight"),v=u==="ArrowUp"||u===(g?"ArrowRight":"ArrowLeft");let m=null;return p?m=d[(f+1)%d.length]:v?m=d[(f-1+d.length)%d.length]:u==="Home"?m=d[0]:u==="End"&&(m=d[d.length-1]),m==null?!1:(s(m),n[m]?.focus(),!0)};return(()=>{var c=iC();return D(c,C(()=>e.rootProps,{get dir(){return t.direction}}),!1,!0),x(c,$(xe,{get each(){return e.keys()},children:(u,d)=>{const f=j(()=>e.items()[d()]),g=()=>u===e.value(),p=()=>re(f().disabled);return(()=>{var v=Uo();return ie(m=>{n[d()]=m},v),D(v,C(()=>e.part("item",g()&&"selected",p()&&"disabled"),{get disabled(){return p()},get tabindex(){return d()===a()?0:-1},get"aria-current"(){return g()?"page":void 0},get"aria-label"(){return f().label?void 0:u},onFocus:()=>s(d()),onKeyDown:m=>{l(d(),m.key)&&m.preventDefault()},onClick:()=>e.onPick(u)}),!1,!0),x(v,()=>e.content(f,g)),v})()}})),c})()}const dC=new Set(["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"]);function fC(e){const t=be(e),n=j(()=>Ne(e.props.items)),r=()=>e.props.type==="multiple",o=()=>{const p=e.props.value;return r()?Array.isArray(p)?p.map(String):p?String(p).split(","):[]:q(p)},[i,s]=Me(()=>e.node,()=>e.scope,"value",o),a=p=>s(Array.isArray(p)?Kn(N(()=>e.props.value),p):p),l=p=>r()?qo(i()).includes(p):i()===p,c=p=>{const v=N(()=>e.props.value);if(r()){const b=qo(N(i)),y=b.includes(p)?b.filter(h=>h!==p):[...b,p];a(y),e.emit("change",{value:Kn(v,y)},{value:Kn(v,y)});return}const m=N(i)===p?"":p;a(m),e.emit("change",{value:m},{value:m})};let u;const d=p=>{if(!dC.has(p.key)||!u)return;const v=Array.from(u.querySelectorAll(":scope > div > div > button[data-radix-collection-item]")).filter(h=>!h.disabled),m=v.indexOf(p.target);if(m===-1)return;p.preventDefault();const b=v.length;let y=m;p.key==="Home"?y=0:p.key==="End"?y=b-1:p.key==="ArrowDown"?y=m+1>b-1?0:m+1:p.key==="ArrowUp"&&(y=m-1<0?b-1:m-1),v[y%b]?.focus()},f=Aa(n,p=>p.value),g=()=>{const{dir:p,...v}=e.rootProps;return v};return(()=>{var p=xf(),v=u;return typeof v=="function"?ie(v,p):u=p,D(p,C(g,{"data-orientation":"vertical",onKeyDown:d}),!1,!0),x(p,$(xe,{get each(){return f()},children:(m,b)=>{const y=j(()=>n()[b()]);return $(pC,{part:t,index:b,item:y,open:()=>l(m),get child(){return $f(()=>e.node,b)},onToggle:()=>c(m)})}})),p})()}function pC(e){const t=ae(),n=Ce(),r=Ce(),o=e1(e.open,"accordion"),i=o.shown,s=()=>e.open()?"open":"closed";return(()=>{var a=sC(),l=a.firstChild,c=l.firstChild,u=c.firstChild,d=l.nextSibling;D(a,C(()=>e.part.at("item",e.index(),e.open()&&"open"),{get"data-state"(){return s()}}),!1,!0),V(c,"aria-controls",r),D(c,C({get"aria-expanded"(){return e.open()},get"data-state"(){return s()}},()=>e.part.at("trigger",e.index(),e.open()&&"open"),{"data-orientation":"vertical",id:n,"data-radix-collection-item":"",onClick:()=>e.onToggle()}),!1,!0),x(u,()=>q(e.item().title),null),x(u,(()=>{var g=Z(()=>e.item().count!==void 0);return()=>g()?(()=>{var p=Cs();return D(p,C(()=>e.part.at("count",e.index())),!1,!0),x(p,()=>t.formatter.number(pe(e.item().count))),p})():null})(),null),x(c,$($e,{slot:"Accordion.trigger",size:16}),null);var f=o.ref;return typeof f=="function"?ie(f,d):o.ref=d,V(d,"id",r),V(d,"aria-labelledby",n),D(d,C({get"data-state"(){return s()},get hidden(){return!i()}},()=>e.part.at("content",e.index(),e.open()&&"open"),{get style(){return o.style()}}),!1,!0),x(d,$(ee,{get when(){return Z(()=>!!i())()&&e.child()},get children(){return $(At,{get node(){return e.child()}})}})),te(g=>{var p=s(),v=me({display:"flex"});return p!==g.e&&V(l,"data-state",g.e=p),g.t=De(l,v,g.t),g},{e:void 0,t:void 0}),a})()}const hC={Tabs:lC,Segmented:cC,Accordion:fC};var dr=F("<span>"),gC=F("<div><div><input type=text role=combobox aria-expanded=true aria-autocomplete=list>"),As=F("<div>"),mC=F("<div><div>"),yC=F("<div role=option>");function wf(e){const t=ae(),n=Ce(),[r,o]=X(0);let i,s;const[a,l]=X(!1),c=j(()=>Math.min(r(),Math.max(0,e.rows.length-1))),u=m=>{const b=e.part(m);return e.suffix&&b["data-xui-id"]&&(b["data-xui-id"]=`${b["data-xui-id"]}${e.suffix}`),b};he(_e(()=>e.query,()=>o(0),{defer:!0}));const d=()=>{const m=i;m&&l(m.scrollTop+m.clientHeight<m.scrollHeight-1)};he(_e([()=>e.rows.length,()=>e.maxRows],()=>{d()})),he(_e(c,()=>{const m=i,b=m?.querySelector('[data-active="true"]');if(!m||!b)return;const y=m.getBoundingClientRect(),h=b.getBoundingClientRect();h.top<y.top?m.scrollTop-=y.top-h.top:h.bottom>y.bottom&&(m.scrollTop+=h.bottom-y.bottom)})),Le(()=>{e.autoFocus&&s?.focus()});const f=m=>{const b=e.rows[m];b&&!re(b.item.disabled)&&e.onPick(b.item)},g=m=>{if(m.isComposing)return;const b=e.rows.length;m.key==="ArrowDown"||m.key==="ArrowUp"?(m.preventDefault(),m.stopPropagation(),o(y=>Math.max(0,Math.min(b-1,y+(m.key==="ArrowDown"?1:-1))))):m.key==="Enter"||m.key==="Tab"&&!m.shiftKey&&b>0?(m.preventDefault(),m.stopPropagation(),f(N(c))):e.leaveBubbles&&m.key===(t.direction==="rtl"?"ArrowRight":"ArrowLeft")&&m.currentTarget.selectionStart===0&&m.currentTarget.selectionEnd===0||m.key!=="Escape"&&m.stopPropagation()},p=()=>{const m=e.rows[c()];return m?`${n}-${m.index}`:void 0},v=j(()=>e.rows.map(m=>m.index),void 0,{equals:(m,b)=>m.length===b.length&&m.every((y,h)=>y===b[h])});return[(()=>{var m=gC(),b=m.firstChild,y=b.firstChild;D(m,C(()=>u("head")),!1,!0),D(b,C(()=>u("search")),!1,!0),x(b,$($e,{slot:"SearchList.search"}),y),y.$$keydown=g,y.$$input=k=>e.onQuery(k.currentTarget.value);var h=s;return typeof h=="function"?ie(h,y):s=y,V(y,"aria-controls",n),x(m,$(ee,{get when(){return Z(()=>!!e.showCount)()&&e.query.trim()!==""},get children(){var k=dr();return D(k,C(()=>u("count"),{role:"status","aria-live":"polite"}),!1,!0),x(k,()=>t.formatter.number(e.rows.length)),k}}),null),te(k=>{var w=p(),_=e.query,A=e.placeholder;return w!==k.e&&V(y,"aria-activedescendant",k.e=w),_!==k.t&&V(y,"value",k.t=_),A!==k.a&&V(y,"placeholder",k.a=A),k},{e:void 0,t:void 0,a:void 0}),te(()=>y.value=e.query),m})(),(()=>{var m=mC(),b=m.firstChild;D(m,C(()=>u("body")),!1,!0);var y=i;return typeof y=="function"?ie(y,b):i=b,D(b,C(()=>u("list"),{id:n,role:"listbox",onScroll:d,get style(){return me({maxHeight:`calc(${e.maxRows} * var(--xui-control-row, 32px))`})}}),!1,!0),x(b,$(xe,{get each(){return v()},children:h=>{const k=j(S=>{const E=v().indexOf(h);return E>=0?E:S}),w=j(S=>e.rows[k()]?.item??S),_=()=>k()===c(),A=()=>re(w().disabled);return(()=>{var S=yC();return V(S,"id",`${n}-${h}`),D(S,C({get"aria-selected"(){return _()},get"aria-disabled"(){return A()||void 0},get"data-active"(){return _()?"true":void 0}},()=>e.rowPart?e.rowPart(w(),h,_()):e.part.at("item",`${e.suffix?`${e.suffix.slice(1)}.`:""}${h}`,_()&&"selected",A()&&"disabled"),{onPointerMove:()=>k()!==N(c)&&o(N(k)),onPointerDown:E=>E.preventDefault(),onClick:()=>f(N(k))}),!1,!0),x(S,(()=>{var E=Z(()=>!!e.renderRow);return()=>E()?e.renderRow(w(),h):[$(ee,{get when(){return w().icon},get children(){var O=dr();return D(O,C(()=>e.part.at("icon",h),{"aria-hidden":"true"}),!1,!0),x(O,$(tt,{get icons(){return t.host.icons},get name(){return w().icon}})),O}}),$(ee,{get when(){return q(w().identifier)},get children(){var O=dr();return D(O,C(()=>e.part.at("identifier",h)),!1,!0),x(O,()=>q(w().identifier)),O}}),(()=>{var O=dr();return D(O,C(()=>e.part.at("label",h)),!1,!0),x(O,()=>q(w().label)),O})(),$(ee,{get when(){return Z(()=>e.picked!==void 0&&e.picked!=="")()&&w().value===e.picked},get children(){var O=dr();return D(O,C(()=>e.part.at("check",h),{"aria-hidden":"true"}),!1,!0),x(O,$($e,{slot:"SearchList.check"})),O}})]})()),S})()}}),null),x(b,$(ee,{get when(){return e.rows.length===0},get children(){var h=As();return D(h,C(()=>u("empty")),!1,!0),x(h,()=>e.emptyText),h}}),null),x(m,$(ee,{get when(){return Z(()=>!!a())()&&e.rows.length>e.maxRows},get children(){var h=As();return D(h,C(()=>u("fade"),{"aria-hidden":"true"}),!1,!1),h}}),null),m})()]}function bC(e){const t=ae(),n=be(e),r=j(()=>Ne(e.props.items)),[o,i]=Me(()=>e.node,()=>e.scope,"query",()=>q(e.props.query)),[s,a]=Me(()=>e.node,()=>e.scope,"value",()=>q(e.props.value)),l=()=>!!e.node.on?.search;let c=!1;he(_e(o,f=>{if(!c)return;const g=setTimeout(()=>{e.emit("search",{query:f})},Er);ce(()=>clearTimeout(g))}));const u=j(()=>r().map((f,g)=>({index:g,item:f})).filter(({item:f})=>l()||lf(f,o()))),d=()=>Math.max(1,Math.floor(pe(e.props.maxRows,8)));return(()=>{var f=As();return D(f,C(()=>e.rootProps),!1,!0),x(f,$(wf,{part:n,owner:"SearchList",suffix:"",get rows(){return u()},get query(){return o()},onQuery:g=>{c=!0,i(g)},get placeholder(){return q(e.props.placeholder)||t.t("search")},get emptyText(){return q(e.props.emptyText)||t.t("noResults")},get maxRows(){return d()},get showCount(){return Z(()=>e.props.showCount===void 0)()?!0:re(e.props.showCount)},get picked(){return s()},onPick:g=>{a(g.value),e.emit("select",{value:g.value},{value:g.value})}})),f})()}const vC={SearchList:bC};Ct(["input","keydown"]);var xC=F("<div class=xui-overlay-body>"),vt=F("<div>"),gc=F("<div class=xui-overlay-head>"),kf=F("<h2 class=xui-sr-only>"),Ts=F("<button type=button>"),Ta=F("<span class=xui-trigger>"),$C=F("<h2>"),wC=F("<p>"),hi=F("<span>"),kC=F("<div><div>"),SC=F("<div role=separator aria-orientation=horizontal>"),CC=F("<div role=menuitem><span class=xui-menu-label>"),AC=F("<span data-state=checked>"),TC=F("<div role=menuitemcheckbox><span></span><span class=xui-menu-label>"),IC=F("<div role=menuitem aria-haspopup=menu><span class=xui-menu-label></span><span>"),EC=F("<div class=xui-menu-search>"),_C=F("<span class=xui-menu-label>"),DC=F("<button>"),PC=F("<div><span></span><div class=xui-toast-text><span>");const Sf={type:"button"};function Cf(e){const[t,n]=Me(()=>e.node,()=>e.scope,"open",()=>re(e.props.open));return[t,o=>{n(o),e.emit("change",{open:o},{open:o})}]}function Ia(e,t,n){return t?{...e,"data-xui-overlay-root":n?.component==="Link"?"stretch":""}:{...e,"data-xui-overlay-root":"none"}}function OC(e){return $(Af,C(e,{kind:"Dialog"}))}function MC(e){return $(Af,C(e,{kind:"Drawer"}))}function Af(e){const t=ae(),n=be(e),[r,o]=Cf(e),i=()=>e.props.dismissible!==!1,s=()=>q(e.props.side,"bottom"),a=()=>q(e.props.title),l=()=>q(e.props.description),c=Ce(),u=Ce(),d=Ce(),f=_=>_||N(i)?o(_):void 0,g=()=>o(!1),p=t1(s,()=>e.kind==="Drawer"&&e.props.dragToDismiss!==!1&&i(),()=>o(!1),()=>t.reducedMotion),v=()=>!!e.node.slots?.trigger;let m;const b=()=>r()?"open":"closed",y=wn(r),h=wn(r),k=()=>{const _=si({disableOutsidePointerEvents:()=>!0,onEscapeKeyDown:P=>{N(i)||P.preventDefault()},onPointerDownOutside:P=>{const M=P.detail.originalEvent,z=M.button===0&&M.ctrlKey===!0;(M.button===2||z)&&P.preventDefault(),N(i)||P.preventDefault()},onFocusOutside:P=>P.preventDefault(),onInteractOutside:P=>{N(i)||P.preventDefault()},onDismiss:()=>f(!1)}),A=sa({trapped:()=>!0,loop:!0,onMountAutoFocus:P=>{const M=P.currentTarget,z=M?.querySelector("[data-xui-autofocus]")??M?.querySelector('[data-xui-part="AlertDialog/cancel"]'),K=z&&(z.matches("button,input,textarea,select,a[href],[tabindex]")?z:z.querySelector("button,input,textarea,select,a[href],[tabindex]"));K&&(P.preventDefault(),K.focus())},onUnmountAutoFocus:P=>{P.preventDefault(),m?.focus()}}),[S,E]=X(!1),O=(()=>{var P=vt();return D(P,C(()=>n("content",r()&&"open"),{get"data-side"(){return Z(()=>e.kind==="Drawer")()?s():void 0},get"data-xui-overlay"(){return e.kind},get dir(){return t.direction},get role(){return e.kind==="Dialog"&&!i()?"alertdialog":"dialog"},id:c,get"aria-describedby"(){return l()?d:void 0},"aria-labelledby":u,get"data-state"(){return b()},tabindex:"-1",get onKeyDown(){return A.onKeyDown}}),!1,!0),x(P,(()=>{var M=Z(()=>e.kind==="Drawer"&&(s()==="bottom"||s()==="top"));return()=>M()?(()=>{var z=vt();return D(z,C(()=>n("handle"),{"aria-hidden":"true",get onPointerDown(){return p.onPointerDown},get onPointerMove(){return p.onPointerMove},get onPointerUp(){return p.onPointerUp},get"on:pointercancel"(){return p.onPointerCancel}}),!1,!1),z})():null})(),null),x(P,(()=>{var M=Z(()=>!!(a()||l()));return()=>M()?Z(()=>e.kind==="Drawer")()?(()=>{var z=gc();return Nn(z,"pointercancel",p.onPointerCancel),Nn(z,"pointerup",p.onPointerUp,!0),Nn(z,"pointermove",p.onPointerMove,!0),Nn(z,"pointerdown",p.onPointerDown,!0),x(z,$(mc,{part:n,get title(){return a()},get description(){return l()},titleId:u,descriptionId:d,get fallback(){return t.t("dialog")}})),z})():(()=>{var z=gc();return x(z,$(mc,{part:n,get title(){return a()},get description(){return l()},titleId:u,descriptionId:d,get fallback(){return t.t("dialog")}})),z})():(()=>{var z=kf();return V(z,"id",u),x(z,()=>t.t("dialog")),z})()})(),null),x(P,$(oa.Provider,{value:()=>N(i)?g():void 0,get children(){return $(ii.Provider,{get value(){return _.layer},get children(){return[(()=>{var M=xC();return x(M,()=>e.children),M})(),$(ee,{get when(){return e.node.slots?.footer},get children(){var M=vt();return D(M,C(()=>n("footer")),!1,!0),x(M,()=>e.slots.footer),M}})]}})}}),null),x(P,(()=>{var M=Z(()=>!!(e.kind==="Dialog"&&i()));return()=>M()?(()=>{var z=Ts();return D(z,C(()=>n("close"),{get"aria-label"(){return t.t("close")},onClick:()=>f(!1)}),!1,!0),x(z,$($e,{slot:"Dialog.close"})),z})():null})(),null),P})();return h.ref(O),p.setPanel(O),_r(O,()=>({"pointer-events":_.pointerEvents(S())})),Le(()=>{_.attach(O),E(!0),A.attach(O),aa(),Od(O,!1)}),O},w=()=>{const _=(()=>{var A=vt();return D(A,C(()=>n("overlay",r()&&"open"),{get"data-xui-overlay-backdrop"(){return e.kind},get"data-state"(){return b()}}),!1,!1),A})();return y.ref(_),_r(_,()=>({"pointer-events":"auto"})),Le(()=>Dd()),_};return[(()=>{var _=vt();return D(_,C(()=>Ia(e.rootProps,v(),e.node.slots?.trigger)),!1,!0),x(_,$(ee,{get when(){return v()},get children(){var A=Ta(),S=m;return typeof S=="function"?ie(S,A):m=A,D(A,C(Sf,{"aria-haspopup":"dialog",get"aria-expanded"(){return r()},"aria-controls":c,get"data-state"(){return b()},onClick:()=>f(!N(r))}),!1,!0),x(A,()=>e.slots.trigger),A}})),_})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return y.mounted()},get children(){return $(w,{})}})}}),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return h.mounted()},get children(){return $(k,{})}})}})]}function mc(e){return[Z(()=>Z(()=>!!e.title)()?(()=>{var t=$C();return D(t,C(()=>e.part("title"),{get id(){return e.titleId}}),!1,!0),x(t,()=>e.title),t})():(()=>{var t=kf();return x(t,()=>e.fallback),te(()=>V(t,"id",e.titleId)),t})()),Z(()=>Z(()=>!!e.description)()?(()=>{var t=wC();return D(t,C(()=>e.part("description"),{get id(){return e.descriptionId}}),!1,!0),x(t,()=>e.description),t})():null)]}const FC=200,zC=150;function RC(e){const t=ae(),n=be(e),[r,o]=Cf(e),i=()=>q(e.props.side,"bottom"),s=()=>e.props.openOn==="hover"&&t.hover,a=Ce(),l=()=>!!e.node.slots?.trigger;let c,u;const d=b=>{c&&clearTimeout(c),c=setTimeout(()=>{N(r)!==b&&o(b)},b?FC:zC)};ce(()=>c&&clearTimeout(c));const[f,g]=X(),p=()=>r()?"open":"closed",v=wn(r),m=()=>{let b=!1,y=!1;const h=si({onInteractOutside:A=>{A.defaultPrevented||(b=!0,A.detail.originalEvent.type==="pointerdown"&&(y=!0));const S=A.target;S&&f()?.contains(S)&&l()&&A.preventDefault(),A.detail.originalEvent.type==="focusin"&&y&&A.preventDefault()},onDismiss:()=>o(!1)}),k=sa({trapped:()=>!1,loop:!0,onMountAutoFocus:A=>{N(s)&&A.preventDefault()},onUnmountAutoFocus:A=>{!b&&l()&&f()?.focus(),A.preventDefault(),b=!1,y=!1}}),[w,_]=X(!1);return $(xa,{get anchor(){return f()},get side(){return i()},align:"center",sideOffset:Jn,collisionPadding:Qn,get dir(){return t.direction},children:A=>{const S=(()=>{var E=vt();return D(E,C(()=>n("content",r()&&"open"),{get"data-side"(){return A.placedSide()},get"data-align"(){return A.placedAlign()},get"data-state"(){return p()},role:"dialog",id:a,"data-xui-overlay":"Popover",get"data-open-on"(){return s()?"hover":void 0},get dir(){return t.direction},tabindex:"-1",get onKeyDown(){return k.onKeyDown},onPointerEnter:()=>s()&&d(!0),onPointerLeave:()=>s()&&d(!1)}),!1,!0),x(E,$(oa.Provider,{value:null,get children(){return $(ii.Provider,{get value(){return h.layer},get children(){return e.children}})}})),E})();return u=S,v.ref(S),A.setContent(S),_r(S,()=>$a("popover","trigger",h.pointerEvents(w()),A.isPositioned())),Le(()=>{h.attach(S),_(!0),k.attach(S),aa()}),S}})};return[(()=>{var b=vt();return D(b,C(()=>Ia(e.rootProps,l(),e.node.slots?.trigger)),!1,!0),x(b,$(ee,{get when(){return l()},get fallback(){return(()=>{var y=hi();return ie(g,y),te(h=>De(y,me({display:"inline-flex"}),h)),y})()},get children(){var y=Ta();return ie(g,y),D(y,C(Sf,{"aria-haspopup":"dialog",get"aria-expanded"(){return r()},"aria-controls":a,get"data-state"(){return p()},onClick:()=>o(!N(r)),onPointerEnter:h=>s()&&h.pointerType!=="touch"&&d(!0),onPointerLeave:h=>s()&&h.pointerType!=="touch"&&d(!1),onFocusIn:()=>s()&&d(!0),onFocusOut:h=>{if(!s())return;const k=h.relatedTarget;(!k||!u?.contains(k))&&d(!1)}}),!1,!0),x(y,()=>e.slots.trigger),y}})),b})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return v.mounted()},get children(){return $(m,{})}})}})]}const Ui="tooltip.open",NC=300,LC=300;function jC(e){const t=ae(),n=be(e),r=()=>q(e.props.side,"top"),o=()=>q(e.props.content)||q(e.props.text),i=Ce(),[s,a]=X(!1),[l,c]=X(!1);let u=!0,d,f,g=!1,p=!1,v,m;const b=P=>{P?(clearTimeout(f),u=!1,document.dispatchEvent(new CustomEvent(Ui))):(clearTimeout(f),f=setTimeout(()=>u=!0,LC)),a(P)},y=()=>{clearTimeout(d),c(!1),b(!0)},h=()=>{clearTimeout(d),N(s)&&b(!1)},k=()=>{clearTimeout(d),d=setTimeout(()=>{c(!0),b(!0)},NC)};ce(()=>{clearTimeout(d),clearTimeout(f)});const w=()=>s()?l()?"delayed-open":"instant-open":"closed";let _=null;const A=P=>{if(!_)return;const M=P.target,z={x:P.clientX,y:P.clientY},K=v?.contains(M)??!1,J=m?.contains(M)??!1;K||J?_=null:Vd(z,_)||(_=null,h())},S=(P,M,z)=>{if(!M||!z||!N(s))return;const K=Lk({x:P.clientX,y:P.clientY},M.getBoundingClientRect(),z.getBoundingClientRect());setTimeout(()=>_=K,0)};document.addEventListener("pointermove",A),ce(()=>document.removeEventListener("pointermove",A));const E=wn(s),O=()=>{const P=si({onFocusOutside:U=>U.preventDefault(),onDismiss:h}),[M,z]=X(!1),K=()=>h(),J=U=>{const T=U.target;T&&v&&T.contains?.(v)&&h()};return $(xa,{anchor:v,get side(){return r()},align:"center",sideOffset:Jn,collisionPadding:Qn,children:U=>{const T=(()=>{var B=vt();return D(B,C(()=>n("content"),{get"data-side"(){return U.placedSide()},get"data-align"(){return U.placedAlign()},get"data-state"(){return w()},"data-xui-overlay":"Tooltip",onPointerLeave:G=>S(G,m,v)}),!1,!0),x(B,o,null),x(B,$(Bk,{id:i,get children(){return o()}}),null),B})();return m=T,E.ref(T),U.setContent(T),_r(T,()=>$a("tooltip","trigger",P.pointerEvents(M()),U.isPositioned())),Le(()=>{P.attach(T),z(!0),setTimeout(()=>document.addEventListener(Ui,K),0),window.addEventListener("scroll",J,{capture:!0}),ce(()=>{document.removeEventListener(Ui,K),window.removeEventListener("scroll",J,{capture:!0})})}),T}})};return[(()=>{var P=kC(),M=P.firstChild;D(P,C(()=>e.rootProps,{"data-xui-overlay-root":""}),!1,!0);var z=v;return typeof z=="function"?ie(z,M):v=M,D(M,C(()=>n("anchor"),{tabindex:"0",get"aria-describedby"(){return s()?i:void 0},get"data-state"(){return w()},onPointerMove:K=>{K.pointerType!=="touch"&&!g&&!_&&(u?k():y(),g=!0)},onPointerLeave:K=>{clearTimeout(d),g=!1,S(K,v,m)},onPointerDown:()=>{N(s)&&h(),p=!0,document.addEventListener("pointerup",()=>setTimeout(()=>p=!1,0),{once:!0})},onFocusIn:()=>{p||y()},onFocusOut:h,onClick:h}),!1,!0),x(M,()=>e.children),P})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return E.mounted()},get children(){return $(O,{})}})}})]}const gi=sn(),Ea=e=>e.openOn==="contextmenu"?"context-menu":"dropdown-menu";function BC(e){const t=qt(gi),n=()=>e.item.separator?"separator":e.item.kind??"item";return $(An,{get component(){const r=n();return r==="separator"?HC:r==="label"?WC:r==="submenu"?KC:r==="checkbox"?qC:UC},get item(){return e.item},get raw(){return e.raw},get path(){return e.path},root:t})}function HC(e){return(()=>{var t=SC();return D(t,C(()=>e.root.part("separator")),!1,!1),t})()}function WC(e){return(()=>{var t=vt();return D(t,C(()=>e.root.part("label")),!1,!0),x(t,()=>q(e.item.label)),t})()}function Tf(e){const t=ae();return $(ee,{get when(){return e.name},children:n=>$(tt,{get icons(){return t.host.icons},get name(){return n()}})})}function If(e){return $(ee,{get when(){return e.text},children:t=>(()=>{var n=hi();return D(n,C(()=>e.part("shortcut")),!1,!0),x(n,t),n})()})}function UC(e){const t=()=>re(e.item.disabled),n=Qd(t,()=>{e.root.emit("select",{value:e.item.value??e.item.label})},e.root.close);return(()=>{var r=CC(),o=r.firstChild,i=n.ref;return typeof i=="function"?ie(i,r):n.ref=r,D(r,C(()=>e.root.part("item",t()&&"disabled"),{get"data-destructive"(){return e.item.destructive?"true":void 0}},()=>n.attrs(),{get onClick(){return n.handlers.onClick},get onPointerDown(){return n.handlers.onPointerDown},get onPointerUp(){return n.handlers.onPointerUp},get onPointerMove(){return n.handlers.onPointerMove},get onPointerLeave(){return n.handlers.onPointerLeave},get onKeyDown(){return n.handlers.onKeyDown},get onFocus(){return n.handlers.onFocus},get onBlur(){return n.handlers.onBlur}}),!1,!0),x(r,$(Tf,{get name(){return e.item.icon}}),o),x(o,()=>q(e.item.label)),x(r,$(If,{get text(){return e.item.shortcut},get part(){return e.root.part}}),null),r})()}function qC(e){const t=ae(),n=()=>re(e.item.disabled),r=()=>re(e.item.checked),o=Qd(n,i=>{const s=!N(r),a=e.raw?.checked;Hr(a)&&t.setData(er(a.path,e.root.scope()),s),e.root.emit("select",{value:e.item.value??e.item.label,checked:s}),i.preventDefault()},e.root.close);return(()=>{var i=TC(),s=i.firstChild,a=s.nextSibling,l=o.ref;return typeof l=="function"?ie(l,i):o.ref=i,D(i,C({get"aria-checked"(){return r()?"true":"false"}},()=>e.root.part("item",n()&&"disabled",r()&&"checked"),{get"data-state"(){return r()?"checked":"unchecked"}},()=>o.attrs(),{get onClick(){return o.handlers.onClick},get onPointerDown(){return o.handlers.onPointerDown},get onPointerUp(){return o.handlers.onPointerUp},get onPointerMove(){return o.handlers.onPointerMove},get onPointerLeave(){return o.handlers.onPointerLeave},get onKeyDown(){return o.handlers.onKeyDown},get onFocus(){return o.handlers.onFocus},get onBlur(){return o.handlers.onBlur}}),!1,!0),D(s,C(()=>e.root.part("check")),!1,!0),x(s,$(ee,{get when(){return r()},get children(){var c=AC();return x(c,$($e,{slot:"Menu.check"})),c}})),x(a,()=>q(e.item.label)),x(i,$(If,{get text(){return e.item.shortcut},get part(){return e.root.part}}),null),i})()}function KC(e){const t=ae(),n=()=>re(e.item.disabled),r=Jd(n),[o,i]=X(!1),s=Ce(),a=Ce(),[l,c]=X(),[u,d]=X();let f,g;ce(()=>{clearTimeout(f),clearTimeout(g)});const p=()=>e.root.dir()==="rtl",v=()=>["Enter"," ",p()?"ArrowLeft":"ArrowRight"],m=()=>p()?"ArrowRight":"ArrowLeft",b=wn(o);return[(()=>{var y=IC(),h=y.firstChild,k=h.nextSibling;return ie(w=>{r.ref(w),c(w)},y),V(y,"id",s),V(y,"aria-controls",a),D(y,C({get"aria-expanded"(){return o()?"true":"false"},get"data-state"(){return o()?"open":"closed"}},()=>e.root.part("item",n()&&"disabled"),()=>r.attrs(),{onClick:()=>{!N(n)&&!N(o)&&i(!0)},onPointerMove:w=>{r.handlers.onPointerMove(w),w.pointerType==="mouse"&&!N(n)&&!N(o)&&!f&&(r.level.setGrace(null),f=setTimeout(()=>{i(!0),f=void 0},100))},onPointerLeave:w=>{if(w.pointerType!=="mouse")return;clearTimeout(f),f=void 0;const _=u()?.getBoundingClientRect();if(_){const A=u()?.dataset.side,S=A==="right",E=S?-5:5,O=_[S?"left":"right"],P=_[S?"right":"left"];r.level.setGrace({area:[{x:w.clientX+E,y:w.clientY},{x:O,y:_.top},{x:P,y:_.top},{x:P,y:_.bottom},{x:O,y:_.bottom}],side:A}),clearTimeout(g),g=setTimeout(()=>r.level.setGrace(null),300)}else{if(r.level.onTriggerLeave(w))return;r.level.setGrace(null),r.handlers.onPointerLeave(w)}},onKeyDown:w=>{const _=r.level.search()!=="";if(!(N(n)||_&&w.key===" ")){if(v().includes(w.key)){N(o)?u()?.focus({preventScroll:!0}):i(!0),w.preventDefault();return}r.handlers.onKeyDown(w)}},get onFocus(){return r.handlers.onFocus},get onBlur(){return r.handlers.onBlur}}),!1,!0),x(y,$(Tf,{get name(){return e.item.icon}}),h),x(h,()=>q(e.item.label)),D(k,C(()=>e.root.part("submenuIndicator")),!1,!0),x(k,$($e,{slot:"Menu.submenuIndicator"})),y})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return b.mounted()},get children(){return $(wa,{get anchor(){return l()},get side(){return p()?"left":"right"},align:"start",sideOffset:2,get dir(){return e.root.dir()},get kind(){return Ea(e.root)},root:!1,id:a,labelledBy:s,state:()=>o()?"open":"closed",attrs:()=>({...e.root.part("content"),"data-xui-overlay":`${e.root.overlay}.sub`,"data-searchable":e.item.searchable?"true":void 0}),setContent:y=>{d(y),y&&b.ref(y)},onDismiss:()=>i(!1),onEscapeKeyDown:y=>{e.root.close(),y.preventDefault()},onFocusOutside:y=>{y.target!==l()&&i(!1)},onCloseAutoFocus:y=>y.preventDefault(),onKeyDown:y=>{u()?.contains(y.target)&&y.key===m()&&(i(!1),l()?.focus(),y.preventDefault())},get children(){return $(ee,{get when(){return e.item.searchable},get fallback(){return $(_a,{get items(){return Ne(e.item.items)},get raws(){return Ne(e.raw?.items)},get path(){return`${e.path}.`}})},get children(){return $(VC,{get item(){return e.item},get i(){return e.path}})}})}})}})}})]}function VC(e){const t=ae(),n=qt(gi),[r,o]=X("");let i;Le(()=>{const a=requestAnimationFrame(()=>i?.querySelector("input")?.focus({preventScroll:!0}));ce(()=>cancelAnimationFrame(a))});const s=j(()=>Ne(e.item.items).map((a,l)=>({index:l,entry:a})).filter(({entry:a})=>a.kind!=="separator"&&a.kind!=="label"&&!a.separator&&lf({label:q(a.label)},r())).map(({index:a,entry:l})=>({index:a,item:{label:q(l.label),value:q(l.value??l.label),icon:l.icon,disabled:re(l.disabled)}})));return(()=>{var a=EC();a.addEventListener("pointerenter",c=>{const u=c.currentTarget.querySelector("input");u&&!c.currentTarget.contains(document.activeElement)&&u.focus({preventScroll:!0})});var l=i;return typeof l=="function"?ie(l,a):i=a,x(a,$(wf,{get part(){return n.part},owner:"Menu",get suffix(){return`.${e.i}`},get rows(){return s()},get query(){return r()},onQuery:o,get placeholder(){return q(e.item.placeholder)||t.t("search")},get emptyText(){return t.t("noResults")},maxRows:8,showCount:!0,autoFocus:!0,leaveBubbles:!0,onPick:c=>{n.emit("select",{value:c.value}),n.close()},rowPart:(c,u,d)=>n.part("item",d&&"selected"),renderRow:c=>[Z(()=>Z(()=>!!c.icon)()?$(tt,{get icons(){return t.host.icons},get name(){return c.icon}}):null),(()=>{var u=_C();return x(u,()=>c.label),u})()]})),a})()}function _a(e){const t=j(()=>e.items.map((n,r)=>r),void 0,{equals:(n,r)=>n.length===r.length});return $(xe,{get each(){return t()},children:n=>$(BC,{get item(){return e.items[n]},get raw(){return e.raws[n]},get path(){return`${e.path}${n}`}})})}function GC(e){return $(ee,{get when(){return e.props.openOn==="contextmenu"},get fallback(){return $(YC,e)},get children(){return $(XC,e)}})}function Ef(e,t,n,r){const o=ae();return Uk(),{close:n,dir:()=>o.direction,overlay:"Menu",openOn:r,part:t,emit:e.emit,scope:()=>e.scope}}function YC(e){const t=ae(),n=be(e),r=()=>Ne(e.props.items),o=()=>q(e.props.label),i=()=>q(e.props.icon),[s,a]=X(!1),l=()=>e.node.children.length>0,c=Ce(),u=Ce(),[d,f]=X(),g=Ef(e,n,()=>a(!1),"press"),p=wn(s);let v=!1;const m=()=>({type:"button",id:c,"aria-haspopup":"menu","aria-expanded":s()?"true":"false","aria-controls":s()?u:void 0,"data-state":s()?"open":"closed"}),b=h=>{if(h.button===0&&h.ctrlKey===!1){const k=N(s);a(!k),k||h.preventDefault()}},y=h=>{["Enter"," "].includes(h.key)&&a(!N(s)),h.key==="ArrowDown"&&a(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault()};return $(gi.Provider,{value:g,get children(){return[(()=>{var h=vt();return D(h,C(()=>Ia(e.rootProps,!0,e.node.children[0]??null)),!1,!0),x(h,$(ee,{get when(){return l()},get fallback(){return(()=>{var k=DC();return ie(f,k),D(k,C(m,()=>n("trigger",s()&&"open"),{get"aria-label"(){return o()||t.t("menu")},onPointerDown:b,onKeyDown:y}),!1,!0),x(k,(()=>{var w=Z(()=>!!i());return()=>w()?$(tt,{get icons(){return t.host.icons},get name(){return i()},class:"xui-icon",width:16,height:16}):null})(),null),x(k,(()=>{var w=Z(()=>!!(o()||!i()));return()=>w()?(()=>{var _=hi();return x(_,()=>o()||t.t("menu")),_})():null})(),null),k})()},get children(){var k=Ta();return ie(f,k),D(k,C(m,{onPointerDown:b,onKeyDown:y}),!1,!0),x(k,()=>e.children),k}})),h})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return p.mounted()},get children(){return $(wa,{get anchor(){return d()},side:"bottom",align:"start",sideOffset:Jn,get dir(){return g.dir()},get kind(){return Ea(g)},root:!0,id:u,labelledBy:c,state:()=>s()?"open":"closed",attrs:()=>({...n("content",s()&&"open"),"data-xui-overlay":"Menu","data-open-on":"press"}),setContent:h=>h&&p.ref(h),onDismiss:()=>a(!1),onInteractOutside:h=>{const k=h.detail.originalEvent,w=k.button===0&&k.ctrlKey===!0;(k.button===2||w)&&(v=!0)},onCloseAutoFocus:h=>{v||d()?.focus(),v=!1,h.preventDefault()},get children(){return $(_a,{get items(){return r()},get raws(){return Ne(e.node.props.items)},path:""})}})}})}})]}})}function XC(e){const t=ae(),n=be(e),r=()=>Ne(e.props.items),[o,i]=X(!1),[s,a]=X({x:0,y:0}),l=Ef(e,n,()=>i(!1),"contextmenu"),c=wn(o);let u;const d=()=>clearTimeout(u);ce(d);const f=p=>{a({x:p.clientX,y:p.clientY}),i(!0)},g={getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s()})};return $(gi.Provider,{value:l,get children(){return[(()=>{var p=vt();return D(p,C(()=>e.rootProps,{get"data-state"(){return o()?"open":"closed"},"on:contextmenu":v=>{d(),f(v),v.preventDefault()},onPointerDown:v=>{v.pointerType!=="mouse"&&(d(),u=setTimeout(()=>f(v),700))},onPointerMove:v=>v.pointerType!=="mouse"&&d(),"on:pointercancel":v=>v.pointerType!=="mouse"&&d(),onPointerUp:v=>v.pointerType!=="mouse"&&d(),onKeyDown:v=>{if(v.key==="F10"&&v.shiftKey||v.key==="ContextMenu"){v.preventDefault();const m=v.currentTarget.getBoundingClientRect();v.currentTarget.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:m.left+8,clientY:m.top+8}))}}}),!1,!0),x(p,()=>e.children),p})(),$(rn,{get mount(){return t.portal},get children(){return $(ee,{get when(){return c.mounted()},get children(){return $(wa,{anchor:g,side:"right",align:"start",sideOffset:2,get dir(){return l.dir()},get kind(){return Ea(l)},root:!0,state:()=>o()?"open":"closed",attrs:()=>({...n("content",o()&&"open"),"data-xui-overlay":"Menu","data-open-on":"contextmenu"}),setContent:p=>p&&c.ref(p),onDismiss:()=>i(!1),onCloseAutoFocus:()=>{},get children(){return $(_a,{get items(){return r()},get raws(){return Ne(e.node.props.items)},path:""})}})}})}})]}})}function ZC(e){const t=ae(),n=be(e),[r,o]=Me(()=>e.node,()=>e.scope,"open",()=>e.props.open===void 0?!0:re(e.props.open)),[i,s]=X(!1),[a,l]=X(!1),c=()=>e.props.duration===void 0?5e3:Math.max(0,pe(e.props.duration,5e3)),u=()=>q(e.props.type,"info");let d=N(c),f=0;const g=()=>{o(!1),e.emit("dismiss",void 0,{open:!1}),e.emit("change",{open:!1},{open:!1})},[p,v]=X(N(r));he(_e(r,b=>{if(b){v(!0),s(!1),d=N(c);return}if(!N(p))return;s(!0);const y=t.reducedMotion?0:t.theme.tokens.motion?.standard??180,h=setTimeout(()=>{v(!1),s(!1)},y);ce(()=>clearTimeout(h))},{defer:!0})),he(()=>{if(!r()||c()===0||a())return;f=Date.now();const b=setTimeout(g,d);ce(()=>{clearTimeout(b),d=Math.max(0,d-(Date.now()-f))})});const m=()=>u()==="error";return $(rn,{get mount(){return Z(()=>!!p())()?t.toastLayer:null},get children(){var b=PC(),y=b.firstChild,h=y.nextSibling,k=h.firstChild;return D(b,C(()=>e.rootProps,{get role(){return m()?"alert":"status"},get"aria-live"(){return m()?"assertive":"polite"},"aria-atomic":"true",get"data-state"(){return i()?"closed":"open"},"data-xui-overlay":"Toast",onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),onFocusIn:()=>l(!0),onFocusOut:()=>l(!1),onKeyDown:w=>{w.key==="Escape"&&e.props.dismissible!==!1&&(w.stopPropagation(),g())}}),!1,!0),D(y,C(()=>n("icon")),!1,!0),x(y,$($e,{get slot(){return`Toast.icon.${u()}`}})),D(k,C(()=>n("title")),!1,!0),x(k,()=>q(e.props.title)),x(h,(()=>{var w=Z(()=>!!q(e.props.description));return()=>w()?(()=>{var _=hi();return D(_,C(()=>n("description")),!1,!0),x(_,()=>q(e.props.description)),_})():null})(),null),x(b,(()=>{var w=Z(()=>!!q(e.props.actionLabel));return()=>w()?(()=>{var _=Ts();return D(_,C(()=>n("action"),{onClick:()=>{e.emit("action")}}),!1,!0),x(_,()=>q(e.props.actionLabel)),_})():null})(),null),x(b,(()=>{var w=Z(()=>e.props.dismissible!==!1);return()=>w()?(()=>{var _=Ts();return D(_,C(()=>n("close"),{get"aria-label"(){return t.t("dismiss")},onClick:g}),!1,!0),x(_,$($e,{slot:"Toast.close"})),_})():null})(),null),b}})}const JC={Dialog:OC,Drawer:MC,Popover:RC,Tooltip:jC,Menu:GC,Toast:ZC};Ct(["pointerdown","pointermove","pointerup"]);var yc=F("<div>"),QC=F("<div><span class=xui-resize-hit aria-hidden=true>"),eA=F("<span>");const tA=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","Enter"]),nA=(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]);function rA(e){const t=ae(),n=be(e),r=()=>e.props.direction==="vertical"?"vertical":"horizontal",o=()=>e.node.children.length,i=j(()=>nn(e.props.panels)),s=j(()=>cm(nn(e.props.sizes),o(),i())),[a,l]=Me(()=>e.node,()=>e.scope,"sizes",s),[c,u]=X(null);let d=null;const f=()=>c()??(a().length===o()?a():s()),g=()=>pe(t.theme.tokens.control?.hairline,1);let p,v=null;const m=S=>{l(S),e.emit("change",{sizes:S},{sizes:S})},b=S=>N(r)==="horizontal"?S.clientX:S.clientY,y=S=>E=>{if(E.button!==0)return;const O=p?.getBoundingClientRect();if(!O)return;E.preventDefault();const P=E.currentTarget;try{P.setPointerCapture?.(E.pointerId)}catch{}P.focus(),v={id:E.pointerId,handle:S,start:N(f),at:b(E),container:N(r)==="horizontal"?O.width:O.height},d=null},h=S=>{const E=v;if(!E||E.id!==S.pointerId)return;const O=dm(b(S)-E.at,E.container,N(o),N(r),t.direction,N(g)),P=fo(E.start,E.handle,O,N(i));d=P,u(P)},k=S=>{const E=v;if(!E||E.id!==S.pointerId)return;v=null;const O=d;d=null,u(null),O&&O.some((P,M)=>P!==E.start[M])&&m(O)},w=S=>E=>{if(!tA.has(E.key))return;E.preventDefault();const O=N(f),P=um(O,S,E.key,N(r),t.direction,N(i));P.some((M,z)=>M!==O[z])&&m(P)},_=j(()=>new Map(e.node.children.map(S=>[S.id,S]))),A=j(()=>e.node.children.map(S=>S.id),void 0,{equals:nA});return(()=>{var S=yc(),E=p;return typeof E=="function"?ie(E,S):p=S,D(S,C(()=>e.rootProps,{role:"group",get"data-orientation"(){return r()},get"data-dragging"(){return c()?"":void 0}}),!1,!0),x(S,$(xe,{get each(){return A()},children:(O,P)=>{const M=j(T=>_().get(O)??T),z=()=>f()[P()]??0,K=()=>`${e.domId}.panel.${P()}`,J=()=>i()[P()]??{},U=()=>c()!==null&&v?.handle===P();return[(()=>{var T=yc();return D(T,C(()=>n.at("panel",P()),{get id(){return K()},get"data-size"(){return z()},get style(){return{flex:`${z()} 1 0px`}}}),!1,!0),x(T,$(At,{get node(){return M()}})),T})(),$(ee,{get when(){return P()<o()-1},get children(){var T=QC(),B=T.firstChild;return D(T,C(()=>n.at("handle",P(),U()&&"pressed"),{role:"separator",tabindex:0,get"aria-orientation"(){return r()==="horizontal"?"vertical":"horizontal"},get"aria-valuenow"(){return Math.round(z())},get"aria-valuemin"(){return Z(()=>typeof J().min=="number")()?J().min:void 0},get"aria-valuemax"(){return Z(()=>typeof J().max=="number")()?J().max:void 0},get"aria-controls"(){return K()},get"aria-label"(){return t.t("resize")},onPointerDown:G=>y(P())(G),onPointerMove:h,onPointerUp:k,onPointerCancel:k,onKeyDown:G=>w(P())(G)}),!1,!0),x(T,(()=>{var G=Z(()=>!!re(e.props.handle));return()=>G()?(()=>{var I=eA();return D(I,C(()=>n.at("grip",P()),{"aria-hidden":"true"}),!1,!1),I})():null})(),null),te(G=>De(B,me(r()==="horizontal"?{width:Xa}:{height:Xa}),G)),T}})]}})),S})()}const oA={Resizable:rA};var Da=F("<div>"),iA=F("<button type=button role=combobox aria-autocomplete=none><span>"),Ko=F("<span>"),sA=F("<div role=listbox data-state=open tabindex=-1><style>[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-select-viewport role=presentation>"),aA=F("<span aria-hidden=true>"),_f=F("<div role=option><span>"),lA=F("<button type=button aria-haspopup=listbox><span>"),cA=F("<div data-state=open role=dialog><div role=listbox class=xui-Select-listbox>"),uA=F("<div class=xui-Select-searchbox><input>");const dA=e=>Array.isArray(e)?e.map(String):e==null||e===""?[]:String(e).split(",");function fA(e){const t=be(e),n=ae(),r=Ce(),o=`${r}-list`,i=()=>re(e.props.multiple),s=()=>re(e.props.searchable),a=()=>q(e.props.placeholder)||n.t("choose"),l=()=>e.props.value,[c,u]=Me(()=>e.node,()=>e.scope,"value",()=>i()?dA(l()):q(l())),[d,f]=X(),g=ct({node:()=>e.node,domId:()=>e.domId,props:()=>e.props,value:c,focusEl:d}),p=()=>re(e.props.disabled)||!!g.form?.disabled,[v,m]=X(!1),[b,y]=X(""),h=()=>q(e.props.source),k=()=>Tr(e.node.props,"options",e.scope)!==void 0,[w,_]=X(null);let A=0;const S=z=>{const K=N(h),J=N(()=>n.host);if(!K||!J.optionSource)return;const U=++A,T=J.optionSource(K,z),B=G=>{U===A&&_(Ne(G))};T&&typeof T.then=="function"?T.then(B,()=>{}):B(T)};ce(()=>A++);const E=j(()=>Ne(e.props.options)),O=()=>w()??E(),P=z=>{const K=N(l),J=N(i)&&!Array.isArray(K)&&typeof K=="string"?z.join(","):z;u(z,J),g.change(J),g.touch(),e.emit("change",{value:J},{value:J})};he(_e([b,v,s,h],([z,K,J])=>{if(!J||!K)return;const U=setTimeout(()=>{e.emit("search",{query:z}),S(z)},Er);ce(()=>clearTimeout(U))})),he(_e([h,()=>n.host,s],([z,K,J])=>{!z||!K.optionSource||J||S("")}));const M={part:t,id:r,listId:o,multiple:i,searchable:s,placeholder:a,options:O,value:c,commit:P,open:v,setOpen:m,query:b,setQuery:y,disabled:p,setTrigger:f,trigger:d,source:h,localFilter:()=>!k()&&!h(),field:g};return(()=>{var z=Da();return D(z,C(()=>e.rootProps,{get"data-source"(){return h()||void 0}}),!1,!0),x(z,$(Ze,{get part(){return t("label")},get text(){return e.props.label},as:"label",htmlFor:r}),null),x(z,$(ee,{get when(){return Z(()=>!i())()&&!s()},get fallback(){return $(gA,{s:M,get emptyText(){return q(e.props.emptyText)}})},get children(){return $(pA,{s:M,get name(){return q(e.props.name,e.node.id)},get emptyText(){return q(e.props.emptyText)}})}}),null),x(z,$(ut,{part:t,field:g}),null),z})()}function pA(e){const t=ae(),n=e.s,r=n.part,o=Ce(),i=()=>n.value()||void 0,s=()=>n.options().find(v=>v.value===n.value()),a=()=>n.options().filter(v=>!re(v.disabled)),[l,c]=X(!1);Le(()=>c(!!n.trigger()?.closest("form")));let u="touch",d=null;const f=Yd(v=>{const m=a(),b=Xd(m.map(y=>({label:q(y.label),o:y})),v,m.map(y=>({label:q(y.label),o:y})).find(y=>y.o.value===i()));b&&n.commit(b.o.value)}),g=v=>{n.disabled()||(n.setOpen(!0),f.reset()),v&&(d={x:Math.round(v.pageX),y:Math.round(v.pageY)})},p=j(()=>n.options().map(v=>v.value).join(";"));return[(()=>{var v=iA(),m=v.firstChild,b=n.setTrigger;return typeof b=="function"?ie(b,v):n.setTrigger=v,V(v,"aria-controls",o),D(v,C({get"aria-expanded"(){return n.open()},get dir(){return t.direction},get"data-state"(){return n.open()?"open":"closed"},get disabled(){return n.disabled()},get"data-disabled"(){return n.disabled()?"":void 0},get"data-placeholder"(){return i()===void 0?"":void 0},get id(){return n.id}},()=>r("trigger",n.open()&&"open",n.disabled()&&"disabled",n.field.invalid&&"invalid"),{get"aria-invalid"(){return n.field.invalid||void 0},get"aria-describedby"(){return n.field.describedBy},onClick:y=>{y.currentTarget.focus(),u!=="mouse"&&g(y)},onPointerDown:y=>{u=y.pointerType;const h=y.target;h.hasPointerCapture?.(y.pointerId)&&h.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(g(y),y.preventDefault())},onKeyDown:y=>{const h=f.search!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&f.type(y.key),!(h&&y.key===" ")&&Gk.includes(y.key)&&(g(),y.preventDefault())}}),!1,!0),x(m,(()=>{var y=Z(()=>!!s());return()=>y()?(()=>{var h=Ko();return x(h,()=>q(s().label)),te(k=>De(h,me({pointerEvents:"none"}),k)),h})():(()=>{var h=Ko();return D(h,C(()=>r("placeholder")),!1,!0),x(h,()=>n.placeholder()),h})()})()),x(v,$($e,{slot:"Select.trigger"}),null),v})(),$(ee,{get when(){return Z(()=>!!l())()?`${p()}#`:!1},keyed:!0,children:v=>$(c1,{get name(){return e.name},get value(){return i()},get disabled(){return n.disabled()},get options(){return n.options()},onChange:m=>n.commit(m)})}),$(ee,{get when(){return n.open()},get children(){return $(hA,{s:n,contentId:o,current:i,get emptyText(){return e.emptyText},downAt:()=>d,clearDownAt:()=>d=null})}})]}function hA(e){const t=ae(),n=e.s,r=n.part;let o,i;const s=[],[a,l]=X(-1),c=()=>n.setOpen(!1),u=b=>{re(b.disabled)||(b.value!==n.value()&&n.commit(b.value),c())},d=()=>s.filter((b,y)=>b&&!re(n.options()[y]?.disabled)),f=b=>{const[y,...h]=s,[k]=h.slice(-1),w=document.activeElement;for(const _ of b)if(_&&(_===w||(_.scrollIntoView?.({block:"nearest"}),_===y&&i&&(i.scrollTop=0),_===k&&i&&(i.scrollTop=i.scrollHeight),_.focus(),document.activeElement!==w)))return},g=()=>{const b=n.options(),y=b.findIndex(h=>e.current()!==void 0&&h.value===e.current());return s[y>=0?y:b.findIndex(h=>!re(h.disabled))]},p=Yd(b=>{const y=n.options(),h=d().map(w=>({el:w,label:q(y[s.indexOf(w)]?.label)})),k=Xd(h,b,h.find(w=>w.el===document.activeElement));k&&setTimeout(()=>k.el.focus())}),v=()=>c();Le(()=>{if(window.addEventListener("blur",v),window.addEventListener("resize",v),e.downAt()!==null){let b={x:0,y:0};const y=k=>{const w=e.downAt();b={x:Math.abs(Math.round(k.pageX)-(w?.x??0)),y:Math.abs(Math.round(k.pageY)-(w?.y??0))}},h=k=>{b.x<=10&&b.y<=10?k.preventDefault():o?.contains(k.target)||c(),document.removeEventListener("pointermove",y),e.clearDownAt()};document.addEventListener("pointermove",y),document.addEventListener("pointerup",h,{capture:!0,once:!0}),ce(()=>{document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",h,{capture:!0})})}}),ce(()=>{window.removeEventListener("blur",v),window.removeEventListener("resize",v);const b=n.trigger();setTimeout(()=>b?.focus({preventScroll:!0}))}),_d({layer:()=>o,onDismiss:c,keepOnFocusOutside:!0});const m=Kd({anchor:n.trigger,sideOffset:Jn,align:"start",collisionPadding:Qn,onPlaced:()=>f([g(),o]),content:(b,y)=>(()=>{var h=sA(),k=h.firstChild,w=k.nextSibling;ie(A=>{o=A,y(A)},h),D(h,C({get"data-side"(){return b().side},get"data-align"(){return b().align},get id(){return e.contentId},get dir(){return t.direction}},()=>r("content","open"),{"data-xui-overlay":"Select",get style(){return me({boxSizing:"border-box",pointerEvents:"auto",display:"flex",flexDirection:"column",outline:"none",minWidth:"var(--radix-select-trigger-width)","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)",animation:b().positioned?void 0:"none"})},onContextMenu:A=>A.preventDefault(),onKeyDown:A=>{const S=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!S&&A.key.length===1&&p.type(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let E=d();["ArrowUp","End"].includes(A.key)&&(E=E.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)&&(E=E.slice(E.indexOf(A.target)+1)),setTimeout(()=>f(E)),A.preventDefault()}}}),!1,!0);var _=i;return typeof _=="function"?ie(_,w):i=w,x(w,(()=>{var A=Z(()=>n.options().length===0);return()=>A()?(()=>{var S=Da();return D(S,C(()=>r("empty")),!1,!0),x(S,()=>e.emptyText||t.t("noResults")),S})():null})(),null),x(w,$(xe,{get each(){return n.options()},children:(A,S)=>{const E=Ce(),O=()=>A.value===e.current(),P=()=>a()===S(),M=()=>re(A.disabled);let z="touch";return(()=>{var K=_f(),J=K.firstChild;return ie(U=>s[S()]=U,K),V(K,"aria-labelledby",E),D(K,C({get"data-highlighted"(){return P()?"":void 0},get"aria-selected"(){return Z(()=>!!O())()&&P()},get"data-state"(){return O()?"checked":"unchecked"},get"aria-disabled"(){return M()||void 0},get"data-disabled"(){return M()?"":void 0},get tabindex(){return M()?void 0:-1}},()=>r("item",A.value===n.value()&&"selected",M()&&"disabled"),{onFocus:()=>l(S()),onBlur:()=>l(U=>U===S()?-1:U),onClick:()=>{z!=="mouse"&&u(A)},onPointerUp:U=>{!U.defaultPrevented&&z==="mouse"&&u(A)},onPointerDown:U=>z=U.pointerType,onPointerMove:U=>{z=U.pointerType,M()?o?.focus():z==="mouse"&&U.currentTarget.focus({preventScroll:!0})},onPointerLeave:U=>{U.currentTarget===document.activeElement&&o?.focus()},onKeyDown:U=>{p.search!==""&&U.key===" "||(Yk.includes(U.key)&&u(A),U.key===" "&&U.preventDefault())}}),!1,!0),x(K,(()=>{var U=Z(()=>!!A.icon);return()=>U()?$(tt,{get icons(){return t.host.icons},get name(){return A.icon}}):null})(),J),V(J,"id",E),x(J,()=>q(A.label)),x(K,$(ee,{get when(){return O()},get children(){var U=aA();return D(U,C(()=>r("check"),{get class(){return`${r("check").class} xui-Select-check`}}),!1,!0),x(U,$($e,{slot:"Select.check",size:16})),U}}),null),K})()}}),null),te(A=>De(w,me({position:"relative",flex:1,overflow:"hidden auto"}),A)),h})()});return Ed(t.portal??document.body,m),null}function gA(e){const t=e.s,n=t.part,r=Ce(),o=()=>{const f=t.value();return t.multiple()?f:f?[f]:[]},i=()=>t.options().filter(f=>o().includes(f.value)),s=j(()=>{const f=t.query();return f&&t.localFilter()?t.options().filter(g=>q(g.label).toLowerCase().includes(f.toLowerCase())):t.options()});let a;const l=f=>{const g=s()[f];if(!(!g||re(g.disabled)))if(t.multiple()){const p=o();t.commit(p.includes(g.value)?p.filter(v=>v!==g.value):[...p,g.value])}else t.commit(g.value),t.setOpen(!1)},c=nf({count:()=>s().length,isDisabled:f=>re(s()[f]?.disabled),labelOf:f=>q(s()[f]?.label),onPick:l,typeahead:()=>!t.searchable()});he(_e(t.open,f=>{if(f){const g=s().findIndex(p=>o().includes(p.value));c.setActive(g>=0?g:s().findIndex(p=>!re(p.disabled)))}else t.setQuery("")})),he(_e(t.query,()=>{!N(t.searchable)||!N(t.open)||c.setActive(N(s).findIndex(f=>!re(f.disabled)))},{defer:!0}));const u=f=>`${t.listId}-${f}`,d=()=>c.active()>=0&&c.active()<s().length?u(c.active()):void 0;return he(()=>{const f=d();f&&a?.querySelector(`[id="${f}"]`)?.scrollIntoView?.({block:"nearest"})}),[(()=>{var f=lA(),g=f.firstChild,p=t.setTrigger;return typeof p=="function"?ie(p,f):t.setTrigger=f,D(f,C({get"aria-expanded"(){return t.open()},get"aria-controls"(){return Z(()=>!!t.open())()?t.listId:void 0},get"data-state"(){return t.open()?"open":"closed"},get id(){return t.id}},()=>n("trigger",t.open()&&"open",t.disabled()&&"disabled",t.field.invalid&&"invalid"),{get disabled(){return t.disabled()},role:"combobox",get"aria-invalid"(){return t.field.invalid||void 0},get"aria-describedby"(){return t.field.describedBy},onKeyDown:v=>{!t.open()&&(v.key==="ArrowDown"||v.key==="ArrowUp")&&(v.preventDefault(),t.setOpen(!0))},onClick:()=>t.setOpen(!t.open())}),!1,!0),x(g,(()=>{var v=Z(()=>!!i().length);return()=>v()?i().map(m=>q(m.label)).join(", "):(()=>{var m=Ko();return D(m,C(()=>n("placeholder")),!1,!0),x(m,()=>t.placeholder()),m})()})()),x(f,$($e,{slot:"Select.trigger"}),null),f})(),$(ee,{get when(){return t.open()},get children(){return $(mA,{s:t,contentId:r,shown:s,selected:o,nav:c,pick:l,optionId:u,activeId:d,get emptyText(){return e.emptyText},listRef:f=>a=f})}})]}function mA(e){const t=ae(),n=e.s,r=n.part;let o,i,s=!1;_d({layer:()=>o,onDismiss:()=>n.setOpen(!1),isInside:c=>!!n.trigger()?.contains(c),onOutside:()=>s=!0}),ce(()=>{const c=n.trigger();s||setTimeout(()=>c?.focus())});const l=Kd({anchor:n.trigger,sideOffset:Jn,align:"start",collisionPadding:Qn,dir:()=>{},content:(c,u)=>(()=>{var d=cA(),f=d.firstChild;return ie(g=>{o=g,u(g)},d),D(d,C({get"data-side"(){return c().side},get"data-align"(){return c().align},get id(){return e.contentId}},()=>r("content","open"),{get dir(){return t.direction},"data-xui-overlay":"Select",tabindex:-1,get style(){return me({minWidth:"var(--radix-popover-trigger-width)",animation:c().positioned?void 0:"none","--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"})}}),!1,!0),x(d,(()=>{var g=Z(()=>!!n.searchable());return()=>g()?(()=>{var p=uA(),v=p.firstChild;return x(p,$($e,{slot:"Select.search",size:16}),v),D(v,C(()=>r("search"),{get class(){return`${r("search").class} xui-Select-search`},role:"combobox","aria-expanded":!0,get"aria-controls"(){return n.listId},get"aria-activedescendant"(){return e.activeId()},"aria-autocomplete":"list",get placeholder(){return t.t("search")},get"aria-label"(){return t.t("search")},get value(){return n.query()},onInput:m=>n.setQuery(m.currentTarget.value),get onKeyDown(){return e.nav.onKeyDown}}),!1,!1),te(()=>v.defaultValue=n.query()),p})():null})(),f),f.$$keydown=g=>{n.searchable()||e.nav.onKeyDown(g)},ie(g=>{i=g,e.listRef(g)},f),x(f,(()=>{var g=Z(()=>e.shown().length===0);return()=>g()?(()=>{var p=Da();return D(p,C(()=>r("empty")),!1,!0),x(p,()=>e.emptyText||t.t("noResults")),p})():null})(),null),x(f,$(xe,{get each(){return e.shown()},children:(g,p)=>{const v=()=>e.selected().includes(g.value),m=()=>p()===e.nav.active();return(()=>{var b=_f(),y=b.firstChild;return D(b,C({get id(){return e.optionId(p())},get"aria-selected"(){return v()},get"aria-disabled"(){return re(g.disabled)||void 0},get"data-active"(){return m()?"":void 0}},()=>r("item",(v()||m())&&"selected",re(g.disabled)&&"disabled",m()&&"hover"),{onPointerMove:()=>e.nav.setActive(p()),onMouseDown:h=>h.preventDefault(),onClick:()=>e.pick(p())}),!1,!0),x(b,(()=>{var h=Z(()=>!!g.icon);return()=>h()?$(tt,{get icons(){return t.host.icons},get name(){return g.icon}}):null})(),y),x(y,()=>q(g.label)),x(b,(()=>{var h=Z(()=>!!v());return()=>h()?(()=>{var k=Ko();return D(k,C(()=>r("check"),{get class(){return`${r("check").class} xui-Select-check`}}),!1,!0),x(k,$($e,{slot:"Select.check",size:16})),k})():null})(),null),b})()}}),null),te(g=>{var p=n.listId,v=n.searchable()?-1:0,m=n.multiple()||void 0,b=n.searchable()?void 0:e.activeId(),y=n.id;return p!==g.e&&V(f,"id",g.e=p),v!==g.t&&V(f,"tabindex",g.t=v),m!==g.a&&V(f,"aria-multiselectable",g.a=m),b!==g.o&&V(f,"aria-activedescendant",g.o=b),y!==g.i&&V(f,"aria-labelledby",g.i=y),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d})()});return Ed(t.portal??document.body,l),Le(()=>{n.searchable()?o?.querySelector("input")?.focus():i?.focus()}),null}const yA={Select:fA};Ct(["keydown"]);var bA=F("<span class=xui-Checkbox-check>"),vA=F("<button>"),xA=F("<input type=checkbox aria-hidden=true value=on tabindex=-1>"),$A=F("<span class=xui-sr-only>—"),wA=F("<span data-xui-part=Badge/root data-m-variant=secondary><span data-xui-part=Badge/label data-m-variant=secondary>"),kA=F("<div role=gridcell class=xui-table-check>"),SA=F("<div role=row>"),bc=F("<div>"),CA=F("<div role=columnheader class=xui-table-check>"),AA=F("<span class=xui-sr-only aria-live=polite>"),TA=F("<div><div role=rowgroup><div role=row aria-rowindex=1 class=xui-table-row></div></div><div role=rowgroup>"),IA=F("<button type=button class=xui-table-sort><span></span><span>"),EA=F("<div role=columnheader>"),_A=F("<span>"),DA=F("<div role=row><div role=cell>");const PA=/^[A-Za-z]{3}$/,OA=e=>typeof e=="number"?e:typeof e=="string"&&e.trim()!==""?Number(e):NaN,MA=e=>e==="indeterminate"?"indeterminate":e?"checked":"unchecked";function vc(e){let t;const[n,r]=X(!0),[o,i]=X(void 0),s=N(()=>e.checked===!0);Le(()=>{r(!!t?.closest("form")),t&&i({width:t.offsetWidth,height:t.offsetHeight})});const a=()=>MA(e.checked);return[(()=>{var l=vA(),c=t;return typeof c=="function"?ie(c,l):t=l,D(l,C(()=>e.attrs,{get class(){return e.class},type:"button",role:"checkbox",get"aria-checked"(){return Z(()=>e.checked==="indeterminate")()?"mixed":e.checked},get"data-state"(){return a()},value:"on",get"aria-label"(){return e.label},onKeyDown:u=>{u.key==="Enter"&&u.preventDefault()},onClick:u=>{e.stop&&u.stopPropagation();const d=e.checked;e.onChange(d==="indeterminate"?!0:!d),n()&&!e.stop&&u.stopPropagation()}}),!1,!0),x(l,$(ee,{get when(){return e.checked!==!1},get children(){var u=bA();return x(u,$($e,{slot:"Checkbox.check"})),te(d=>{var f=a(),g=me({pointerEvents:"none"});return f!==d.e&&V(u,"data-state",d.e=f),d.t=De(u,g,d.t),d},{e:void 0,t:void 0}),u}})),l})(),$(ee,{get when(){return n()},get children(){var l=xA();return V(l,"checked",s?"":void 0),te(c=>De(l,me({...o()??{},position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}),c)),l}})]}function FA(e){const t=ae(),n=be(e),r=j(()=>Ne(e.props.columns)),o=j(()=>Ne(e.props.rows)),i=()=>q(e.props.rowKey,"id"),s=()=>q(e.props.selectable,"none"),a=()=>re(e.props.striped),l=j(()=>Tr(e.node.props,"rows",e.scope)),c=j(()=>Tr(e.node.props,"sort",e.scope)!==void 0),[u,d]=Me(()=>e.node,()=>e.scope,"sort",()=>{const L=e.props.sort;return L&&L.key?{key:L.key,direction:L.direction==="desc"?"desc":"asc"}:null}),[f,g]=Me(()=>e.node,()=>e.scope,"selected",()=>nn(e.props.selected).map(String)),p=j(()=>em(o(),i())),v=L=>p()[L]??String(L),m=j(()=>{const L=u();return c()?o().map((Y,ne)=>ne):Yv(o(),L,r().find(Y=>Y.key===L?.key),t.locale)}),b=j(()=>[s()==="multiple"?"var(--xui-control-checkbox, 16px)":null,...r().map(L=>L.width?`${L.width}px`:"minmax(0, 1fr)")].filter(Boolean).join(" ")),y=L=>{const Y=N(u),ne=Y?.key===L.key&&Y.direction==="asc"?{key:L.key,direction:"desc"}:{key:L.key,direction:"asc"};d(ne),e.emit("sort",{sort:ne},{sort:ne})},h=L=>{g(L),e.emit("select",{selected:L},{selected:L})},k=j(()=>o().map((L,Y)=>v(Y))),w=j(()=>k().length>0&&k().every(L=>f().includes(L))),_=j(()=>!w()&&k().some(L=>f().includes(L))),A=()=>s()!=="none"||!!e.node.on?.rowPress,S=()=>o().length>Us,[E,O]=X(null),P=j(()=>m().map(L=>v(L)),void 0,{equals:(L,Y)=>L.length===Y.length&&L.every((ne,se)=>ne===Y[se])}),M=j(()=>{const L=E(),Y=P();return L!==null&&Y.includes(L)?L:Y.find(ne=>f().includes(ne))??Y[0]??null});let z,K,J=null;const U=L=>{const Y=`[role="row"][data-key="${typeof CSS<"u"&&CSS.escape?CSS.escape(L):L.replace(/"/g,'\\"')}"]`;return z?.querySelector(`:scope > ${Y}, :scope > .xui-list-window > .xui-list-item > ${Y}`)??null},T=L=>{const Y=N(P);if(Y.length===0)return;const ne=Math.max(0,Math.min(Y.length-1,L)),se=Y[ne];O(se);const ue=U(se);ue?ue.focus():(J=se,K?.scrollToIndex(ne))};he(()=>{const L=e.domId;ce(t.registerScroller(L,(Y,ne)=>{const se=N(m).indexOf(Y);se<0||(N(S)?K?.scrollToIndex(se,ne):U(N(()=>v(Y)))?.scrollIntoView({block:ne==="center"||ne==="start"||ne==="end"?ne:"nearest"}))}))});const[B,G]=X({}),I=(L,Y,ne,se)=>{G(ue=>({...ue,[L]:$n(ue[L]??Y,ne,se)}))},R=(L,Y)=>{const ne=Y?.[L.key],se=ne==null||ne==="",ue=L.decimals===void 0?void 0:pe(L.decimals),oe=OA(ne),ve=de=>de===""?null:de;switch(L.type){case"number":return ve(Number.isFinite(oe)?t.formatter.number(oe,{decimals:ue}):"");case"currency":{const de=L.currency===void 0?"USD":L.currency;return ve(Number.isFinite(oe)&&typeof de=="string"&&PA.test(de)?t.formatter.currency(oe,de,{decimals:ue}):"")}case"percent":return ve(Number.isFinite(oe)?t.formatter.percent(oe,{decimals:ue}):"");case"date":return ve(se?"":t.formatter.date(ne));case"relativeTime":return ve(se?"":t.formatter.relativeTime(ne,t.now()));case"boolean":return ne?$($e,{slot:"Checkbox.check",size:16}):$A();case"badge":return se?null:(()=>{var de=wA(),le=de.firstChild;return x(le,()=>String(ne)),te(Ae=>{var Te=`${t.compiled.scope} ${xn("Badge","root")} xui-table-badge`,Ie=`${t.compiled.scope} ${xn("Badge","label")}`;return Te!==Ae.e&&en(de,Ae.e=Te),Ie!==Ae.t&&en(le,Ae.t=Ie),Ae},{e:void 0,t:void 0}),de})();default:return ve(zr(ne))}},W=L=>{const Y=L.rowKey,ne=j(de=>m()[L.pos()]??de),se=()=>o()[ne()],ue=()=>f().includes(Y),oe=()=>L.pos()%2===1,ve=()=>{const de=N(ue);N(s)==="single"&&h(de?[]:[Y]),e.node.on?.rowPress&&e.emit("rowPress",{key:Y,row:N(se)})};return(()=>{var de=SA();return de.$$keydown=le=>{if(le.target===le.currentTarget)if(le.key==="Enter"||le.key===" "&&s()==="single")le.preventDefault(),ve();else if(le.key==="ArrowDown"||le.key==="ArrowUp"){le.preventDefault();const Ae=N(P),Te=J===null?-1:Ae.indexOf(J);T((Te>=0?Te:N(L.pos))+(le.key==="ArrowDown"?1:-1))}else(le.key==="Home"||le.key==="End")&&(le.preventDefault(),T(le.key==="Home"?0:N(P).length-1))},de.$$click=()=>{(A()&&s()!=="multiple"||e.node.on?.rowPress)&&ve()},ie(le=>{vs(le,()=>n.atWith("row",Y,{striped:a()&&oe()},ue()&&"selected")),N(A)&&J===Y&&(J=null,queueMicrotask(()=>le.focus()))},de),de.addEventListener("focus",le=>{A()&&le.target===le.currentTarget&&Y!==E()&&O(Y)}),V(de,"data-key",Y),x(de,$(ee,{get when(){return s()==="multiple"},get children(){var le=kA();return x(le,$(vc,{get attrs(){return n.at("checkbox",Y,ue()&&"checked")},get class(){return`${n("checkbox").class} xui-Checkbox-box`},get checked(){return ue()},get label(){return t.t("selectRow")},stop:!0,onChange:Ae=>{const Te=N(f);h(Ae?[...Te,Y]:Te.filter(Ie=>Ie!==Y))}})),le}}),null),x(de,$(Pt,{get each(){return r()},children:(le,Ae)=>{const Te=j(()=>le().type);return(()=>{var Ie=bc();return ie(ze=>vs(ze,()=>n.atWith("cell",`${Y}.${Ae}`,{align:le().align??"start"})),Ie),x(Ie,()=>Te()!=="slot"?R(le(),se()):N(()=>{const ze=j(()=>le().slot?e.node.slots?.[le().slot]:void 0);return $(ee,{get when(){return ze()},get children(){return $(zA,{get rowsPath(){return l()},get row(){return Z(()=>!!l())()?se():B()[Y]??se()},rowKey:Y,get index(){return ne()},get tableId(){return e.domId},get node(){return ze()},onLiteralEdit:I})}})})),te(ze=>{var Gt=A()?"gridcell":"cell",dt=le().type??"text";return Gt!==ze.e&&V(Ie,"role",ze.e=Gt),dt!==ze.t&&V(Ie,"data-type",ze.t=dt),ze},{e:void 0,t:void 0}),Ie})()}}),null),te(le=>{var Ae=L.pos()+2,Te=s()!=="none"?ue():void 0,Ie=A()?Y===M()?0:-1:void 0,ze=me({gridTemplateColumns:b()});return Ae!==le.e&&V(de,"aria-rowindex",le.e=Ae),Te!==le.t&&V(de,"aria-selected",le.t=Te),Ie!==le.a&&V(de,"tabindex",le.a=Ie),le.o=De(de,ze,le.o),le},{e:void 0,t:void 0,a:void 0,o:void 0}),de})()},H=()=>q(e.props.caption);return(()=>{var L=TA(),Y=L.firstChild,ne=Y.firstChild,se=Y.nextSibling;D(L,C(()=>e.rootProps,{get role(){return A()?"grid":"table"},get"aria-rowcount"(){return o().length+1},get"aria-multiselectable"(){return s()==="multiple"||void 0},get"aria-describedby"(){return Z(()=>!!H())()?`${e.domId}.caption`:void 0},get"aria-label"(){return Z(()=>!!H())()?void 0:e.rootProps["aria-label"]??t.t("table")},get"data-windowed"(){return S()?"true":void 0}}),!1,!0),D(Y,C(()=>n("header"),{get"data-sticky"(){return re(e.props.stickyHeader)?"true":void 0}}),!1,!0),x(ne,$(ee,{get when(){return s()==="multiple"},get children(){var oe=CA();return x(oe,$(vc,{get attrs(){return n.at("checkbox","header",w()&&"checked")},get class(){return`${n("checkbox").class} xui-Checkbox-box`},get checked(){return Z(()=>!!w())()?!0:_()?"indeterminate":!1},get label(){return t.t("selectAll")},onChange:ve=>h(ve?N(k):[])})),oe}}),null),x(ne,$(Pt,{get each(){return r()},children:(oe,ve)=>{const de=()=>{const Ae=u();return Ae?.key===oe().key?Ae.direction:null},le=()=>de()==="asc"?"ascending":de()==="desc"?"descending":oe().sortable?"none":void 0;return(()=>{var Ae=EA();return D(Ae,C({get"aria-sort"(){return le()}},()=>n.atWith("headerCell",ve,{align:oe().align??"start"})),!1,!0),x(Ae,$(ee,{get when(){return oe().sortable},get fallback(){return(()=>{var Te=_A();return x(Te,()=>q(oe().label)),Te})()},get children(){var Te=IA(),Ie=Te.firstChild,ze=Ie.nextSibling;return Te.$$click=()=>y(N(oe)),x(Ie,()=>q(oe().label)),D(ze,C(()=>n("sortIcon"),{get"data-direction"(){return de()??void 0},"aria-hidden":"true"}),!1,!0),x(ze,(()=>{var Gt=Z(()=>!!de());return()=>Gt()?$($e,{get slot(){return`Table.sortIcon.${de()}`}}):null})()),te(()=>V(Te,"aria-label",pr(t,de()==="asc"?"sortByDescending":"sortByAscending",{name:q(oe().label)},()=>`${q(oe().label)}: ${t.t(de()==="asc"?"sortDescending":"sortAscending")}`))),Te}})),Ae})()}}),null);var ue=z;return typeof ue=="function"?ie(ue,se):z=se,D(se,C(()=>n("body"),{get class(){return`${n("body").class} xui-table-body`}}),!1,!0),x(se,$(ee,{get when(){return o().length>0},get fallback(){return(()=>{var oe=DA(),ve=oe.firstChild;return D(ve,C(()=>n("empty")),!1,!0),x(ve,()=>q(e.props.emptyText)||t.t("noResults")),oe})()},get children(){return $(ee,{get when(){return S()},get fallback(){return $(xe,{get each(){return P()},children:oe=>$(W,{rowKey:oe,get pos(){return j(ve=>{const de=P().indexOf(oe);return de>=0?de:ve})}})})},get children(){return $(Sd,{ref:oe=>K=oe,get count(){return m().length},itemKey:oe=>v(m()[oe]),get estimatedItemHeight(){return pe(t.theme.tokens.control?.row,40)},overscan:8,renderItem:oe=>$(W,{get rowKey(){return N(()=>v(m()[oe()]))},pos:oe})})}})}})),x(L,$(ee,{get when(){return H()},get children(){var oe=bc();return D(oe,C(()=>n("caption"),{get id(){return`${e.domId}.caption`}}),!1,!0),x(oe,H),oe}}),null),x(L,$(ee,{get when(){return Z(()=>s()==="multiple")()&&f().length},get children(){var oe=AA();return x(oe,()=>t.t("selectedCount",{count:f().length})),oe}}),null),te(oe=>De(ne,me({gridTemplateColumns:b()}),oe)),L})()}function zA(e){const t=ae(),n=qr(),r=()=>`${Do}/${e.tableId.replace(/[~/]/g,"_")}/${e.index}`,o=j(()=>e.rowsPath?null:$n(t.data,r(),e.row)),i=ta(t,{data:()=>o()??t.data,setData:()=>e.rowsPath?t.setData:(s,a)=>{const l=N(r);if(s===l||s.startsWith(`${l}/`)){const c=N(o);e.onLiteralEdit(e.rowKey,Wr(c,l)??N(()=>e.row),s.slice(l.length),a)}else t.setData(s,a)}});return $(Ur.Provider,{value:i,get children(){return $(ti.Provider,{value:()=>e.rowsPath?`${e.rowsPath}/${e.index}`:r(),get children(){return $(ni.Provider,{value:()=>`${n()}.${e.rowKey}`,get children(){return $(At,{get node(){return e.node}})}})}})}})}const RA={Table:FA};Ct(["click","keydown"]);const NA={Box:_w,List:Pw,Unknown:Fw,Text:f0,Markdown:p0,Icon:h0,Form:kw,...k0,...V0,..._1,...B1,...Y1,...aS,...gS,...NS,...eC,...hC,...JC,...oA,...vC,...yA,...RA},qi=Object.fromEntries(zw.map(e=>[e,NA[e]??Nw]));var LA=F("<div><div class=xui-measured>"),jA=F("<div data-xui-error>");const BA=new Set(["Box","List"]),xc=new WeakMap;function HA(e,t){let n=xc.get(t);n||(n=new Map,xc.set(t,n));let r=n.get(e);if(!r){const o=Gn(t).components[e];r=o?Object.entries(o.props).filter(([,i])=>i.responsive).map(([i])=>i):[],n.set(e,r)}return r}function WA(e){return e.styleId??e.id}function UA(e,t,n=()=>e().id,r,o){const i=ae(),s=na();return j(()=>{const a=e(),l=bd(i.extensions),c=["xui-el",Qo(WA(a)),i.compiled.scope,xn(a.component,"root")],u={};if(a.recipe){c.push(xn(a.recipe.macro,a.recipe.part)),u["data-xui-part"]=`${a.recipe.macro}/${a.recipe.part}`;const g=ed(a.recipe.macro,l);for(const[p,v]of Object.entries(r?.()??a.recipe.props))v!=null&&typeof v!="object"&&(u[Ar(g,p)]=String(v))}for(const[g,p]of Object.entries(wr(a.component,t(),i.extensionDefs)))typeof p!="object"&&(u[Ar(!1,g)]=String(p));i.states.length&&(u["data-xs"]=i.states.join(" ")),a.accessibility&&Object.assign(u,Ov(Pv(a.accessibility,ri(i,s()))));const d=o?.();d&&(u.style=d);const f=Df(a,i);return f&&(u.dir=f),{class:c.join(" "),"data-xui-id":n(),"data-xui-c":a.component,...u}})}function Ki(e,...t){const n=t.filter(Boolean).join(" ");return n?{...e,class:`${e.class} ${n}`}:e}function zt(e,t){const n=e.style,r=me(t);return n?r?{...n,...r}:n:r}function qA(e,t,n,r,o,i,s){const a=t.on?.[o];if(!a)return;const l=ri(e,r),c=s?{...l,data:sg(e.data,t.props,s,r?{base:r}:{})}:l,u=a.functionCall,d=u?$t(u.args??{},c)??{}:void 0,f=a.event?$t(a.event.context??{},c)??{}:void 0;let g;if(u&&d)if(u.call==="set")typeof d.path=="string"&&e.setData(er(d.path,r),d.value);else{const p=e.functions[u.call];p?p(d,c):g=e.host.onFunctionCall?.({surfaceId:e.surfaceId,componentId:n,name:u.call,args:d})}if(g instanceof Promise){const p=a.event?$c(e,a.event,n,o,f,i):void 0;return Promise.all([g,p]).then(()=>{})}if(a.event)return $c(e,a.event,n,o,f,i)}function $c(e,t,n,r,o,i){const s={surfaceId:e.surfaceId,event:r,name:t.name,componentId:n,context:{...o??{},...i??{}},payload:i,timestamp:new Date().toISOString()};return e.host.onAction?.(s)??void 0}function KA(e,t,n=()=>e().id){const r=ae();return(o,i,s)=>N(()=>qA(r,e(),n(),t(),o,i,s))}function Df(e,t){if(!e.style)return;let n;return Mv(e.style,t?.theme,r=>(n??=t?.xq?t.xq.split(" "):[]).includes(Oo(r)))}function At(e){const t=ae(),n=na(),r=j(()=>e.node.visible===void 0||Dv(e.node.visible,ri(t,n()))),o=j(()=>Df(e.node,t)),i=j(()=>{const s=o();return s&&s!==t.direction?s:void 0});return $(ee,{get when(){return r()},get children(){return $(ee,{get when(){return i()},get fallback(){return $(wc,{get node(){return e.node}})},get children(){return $(Ur.Provider,{get value(){return ta(t,{direction:()=>i()??t.direction})},get children(){return $(wc,{get node(){return e.node}})}})}})}})}function VA(e){const t=ae(),n=j(()=>new Map(e.nodes.map(o=>[o.id,o]))),r=j(()=>e.nodes.map(o=>o.id),void 0,{equals:Pf});return $(xe,{get each(){return r()},children:o=>{const i=t.nodeCell?.(o),s=i&&N(i)===N(n).get(o)?i:void 0,a=j(l=>(s?s():n().get(o))??l);return $(At,{get node(){return a()}})}})}function Vn(e){return j(t=>e()||t)}const Pf=(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]);function wc(e){const t=ae(),n=na(),r=qr(),o=()=>e.node,i=j(()=>`${e.node.id}${r()}`),s=j(()=>ri(t,n())),a=j(()=>{const w=e.node,_=_v(w.component,w.props,s(),t.extensionDefs);for(const A of HA(w.component,t.extensionDefs)){const S=_[A];Jo(S)&&(_[A]=pu(S,t.breakpoint))}return _}),l=j(()=>e.node.recipe?$t(e.node.recipe.props,s()):void 0),c=j(()=>{const w=rd(e.node.style);if(w.length===0)return;const _={};for(const A of w){const S=ho(A.key,$t(A.value,s()),t.theme.fonts);_[A.name]=S??"initial"}return _}),u=UA(o,a,i,l,c),d=KA(o,n,i),f=j(()=>e.node.component),g=j(()=>Ax(t.extensions,f())),p=j(()=>g()??qi[f()]??qi[br]),v=j(()=>f()===br||!qi[f()]&&!g());he(()=>{if(v()){const w=e.node;N(()=>t.host.onUnknown?.(w))}});const m=j(()=>t.measure&&!BA.has(f())?t.measure(e.node):null),b=Vn(m),y={get node(){return e.node},get props(){return a()},get theme(){return t.theme},get mode(){return t.mode},get tokens(){return t.theme.tokens},get children(){return[$(VA,{get nodes(){return e.node.children}}),$(ee,{get when(){return e.node.template},get children(){return $(tT,{get node(){return e.node},get scope(){return n()}})}})]},get slots(){const w={};for(const _ of Object.keys(e.node.slots??{}))Object.defineProperty(w,_,{enumerable:!0,get:()=>$(GA,{get node(){return e.node},name:_})});return w},emit:d,get rootProps(){return u()},get scope(){return n()},get domId(){return i()}},h=()=>$(An,C({get component(){return p()}},y)),k=j(()=>!(XA.has(f())&&!g()));return $(ee,{get when(){return m()},get fallback(){return $(ee,{get when(){return k()},get fallback(){return h()},get children(){return $(ZA,{get node(){return e.node},get domId(){return i()},get children(){return h()}})}})},get children(){var w=LA(),_=w.firstChild;return te(A=>{var S=`xui-el ${Qo(e.node.id)} xui-leaf`,E=i(),O=e.node.component,P=me({width:b().w,height:b().h});return S!==A.e&&en(w,A.e=S),E!==A.t&&V(w,"data-xui-id",A.t=E),O!==A.a&&V(w,"data-xui-c",A.a=O),A.o=De(_,P,A.o),A},{e:void 0,t:void 0,a:void 0,o:void 0}),w}})}function GA(e){const t=j(n=>e.node.slots?.[e.name]??n);return $(ee,{get when(){return t()},get children(){return $(At,{get node(){return t()}})}})}function YA(e){try{return`${e.component}\0${JSON.stringify(e.props)}`}catch{return e.component}}const XA=new Set(["Box","Text"]);function ZA(e){const t=ae();let n;he(_e(()=>e.node,()=>{const i=n;n=void 0,i?.()},{defer:!0}));let r=N(()=>e.domId);Ut(()=>r=e.domId),ce(()=>t.paintFailures?.delete(r));const o=i=>{const s=N(()=>e.node),a=N(()=>e.domId),l=t.paintFailures,c=YA(s);if(l?.get(a)===c)return;l?.set(a,c);const u=`${s.component} failed to paint: ${i instanceof Error?i.message:String(i)}`,d=t.host.onPaintError;if(d)try{d({surfaceId:t.surfaceId,componentId:s.id,message:u})}catch(f){console.error("[exponential-ui] onPaintError threw",f)}else console.error(`[exponential-ui] ${s.component} "${s.id}" failed to paint`,i)};return $(Xf,{fallback:(i,s)=>(n=s,o(i),(()=>{var a=jA();return te(l=>{var c=`xui-el ${Qo(e.node.id)}`,u=e.domId,d=e.node.component;return c!==l.e&&en(a,l.e=c),u!==l.t&&V(a,"data-xui-id",l.t=u),d!==l.a&&V(a,"data-xui-c",l.a=d),l},{e:void 0,t:void 0,a:void 0}),a})()),get children(){return[$(JA,{get domId(){return e.domId}}),Z(()=>e.children)]}})}function JA(e){const t=ae();return Le(()=>t.paintFailures?.delete(e.domId)),null}function Of(e,t,n){const r=t.template;if(!r)return null;const o=er(r.path,n),i=Wr(e.data,o),s=e.templateNode(r.component);if(!Array.isArray(i)||!s)return null;const a=$u(i,r.key),l=e.templateBudget?.allowed.get(wu(t.id,n))??i.length;return{items:i.slice(0,l).map((u,d)=>({key:a[d],path:`${o}/${d}`,index:d})),tpl:s}}const QA=(e,t)=>`${e}.${tm(t)}`;function Mf(e){const t=qr();return $(ti.Provider,{value:()=>e.item.path,get children(){return $(ni.Provider,{value:()=>QA(t(),e.item.key),get children(){return $(At,{get node(){return e.tpl}})}})}})}function eT(e){const t=j(()=>new Map(e.items.map(r=>[r.key,r]))),n=j(()=>e.items.map(r=>r.key),void 0,{equals:Pf});return $(xe,{get each(){return n()},children:r=>{const o=j(i=>t().get(r)??i);return $(Mf,{get tpl(){return e.tpl},get item(){return o()}})}})}function tT(e){const t=ae(),n=j(()=>Of(t,e.node,e.scope)),r=Vn(n);return $(ee,{get when(){return n()},get children(){return $(eT,{get items(){return r().items},get tpl(){return r().tpl}})}})}var nT=F("<div class=xui-container><div class=xui-layer data-xui-layer=overlay></div><div class=xui-toast-layer data-xui-layer=toast>"),rT=F("<div><style data-xui-style=theme> </style><div class=xui-sr-only aria-live=polite aria-atomic=true data-xui-live=polite></div><div class=xui-sr-only aria-live=assertive aria-atomic=true data-xui-live=assertive>"),oT=F("<style data-xui-style=nodes> ");const kc=new Map;function iT(e){if(!e)return{theme:Wn(_o),issues:[]};if(typeof e=="string")return hl(e);if("chain"in e&&Array.isArray(e.chain))return{theme:e,issues:[]};let t;try{t=JSON.stringify(e)}catch{return{theme:Wn(_o),issues:[{path:"theme",message:"expected a theme object {id, name, modes, tokens, recipes}"}]}}let n=kc.get(t);return n||(n=hl(e),kc.set(t,n)),n}const Sc=new WeakMap;function sT(e,t,n){if(t==="default"&&!n)return e;let r=Sc.get(e);r||(r=new Map,Sc.set(e,r));const o=`${t}/${n}`;let i=r.get(o);return i||(i=Ey(e,t),n&&(i=_y(i)),r.set(o,i)),i}const Cc=[],aT={},lT={};function cT(e,t){const n=yh(e.width,t.breakpoints),r=t.viewportHeight??e.height,o={width:e.width,height:r,hover:t.hover,reducedMotion:t.reducedMotion},i=t.queries.filter(s=>{const a=Fs(s);return a?mh(a,o):!1}).map(Oo).join(" ");return{breakpoint:n,xq:i}}const Ac='input:not([disabled]),textarea:not([disabled]),select:not([disabled]),button:not([disabled]),a[href],[tabindex]:not([tabindex="-1"]),[contenteditable="true"]',uT=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}},dT=(()=>{try{return!1}catch{return!1}})(),Tc=new Set;function fT(e,t,n){const r=o=>{const i=o.template?.component;if(typeof i=="string"&&!n[i]){const s=`${e}\0${i}`;Tc.has(s)||(Tc.add(s),console.warn(`[exponential-ui] surface "${e}": "${o.id}" templates "${i}", which is not in \`templates\` (pass the reducer's \`templates\` with \`root\`); it renders no items.`))}for(const s of o.children)r(s);for(const s of Object.values(o.slots??{}))r(s)};r(t);for(const o of Object.values(n))r(o)}const pT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Is(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!Is(e[o],t[o]))return!1;return!0}if(!pT(t)||Array.isArray(t))return!1;const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(t,o)||!Is(e[o],t[o]))return!1;return!0}function Vo(e){if(Array.isArray(e))return e.some(Vo);if(typeof e!="object"||e===null)return!1;const t=e;if(t.call==="formatRelativeTime"&&(typeof t.args!="object"||t.args===null||t.args.now===void 0))return!0;if(t.component==="Table"){const n=t.props?.columns;if(Array.isArray(n)?n.some(r=>r?.type==="relativeTime"):typeof n=="object"&&n!==null)return!0}return Object.values(t).some(Vo)}function hT(e){const t=C({mode:"system",density:"default",contrast:"system",locale:ku},e),n=Ce(),r=j(()=>t.id??t.surface?.surfaceId??n.replace(/[^a-zA-Z0-9]/g,"")),o=no("(prefers-color-scheme: dark)"),i=no("(prefers-contrast: more)"),s=no("(prefers-reduced-motion: reduce)"),a=no("(hover: hover)",!0),l=j(()=>t.mode==="system"?Iy("system",o()):t.mode),c=j(()=>iT(t.theme));he(()=>{const Q=c(),fe=t.host?.onThemeIssues;Q.issues.length>0&&N(()=>fe?.(Q.issues))});const u=j(()=>sT(c().theme,t.density,t.contrast==="high"||t.contrast==="system"&&i())),d=j(()=>[...Cx(),...t.extensions??Cc]),f=j(()=>yd(d())),g=j(()=>bd(d())),p=j(()=>vv(u(),{extensionMacros:g()})),v=j(()=>t.direction??xm(t.locale)),m=j(()=>kh(t.strings??{})),b=(Q,fe)=>Yc(m()[Q]??Q,fe??{}),[y,h]=X(N(()=>t.data)??{});let k=N(()=>t.data);he(_e(()=>t.data,Q=>{Q!==k&&!Is(Q,k)&&(k=Q,h(Q??{}))},{defer:!0}));const w=()=>t.surface?t.surface.data:y(),_=(Q,fe)=>{t.surface?t.surface.setData(Q,fe):h(ge=>$n(ge,Q,fe))},A=j(Q=>Fo(Q,t.surface?t.surface.root:t.root??null)),S=Vn(A),E=j(Q=>Fo(Q,(t.surface?t.surface.templates:t.templates)??aT)),O=Q=>E()[Q],P=j(()=>Object.values(E()));let M=new Map;const z=new Map;Ut(()=>{const Q=new Map,fe=A();for(const ge of fe?[fe,...P()]:P())for(const ye of Po(ge))Q.has(ye.id)||Q.set(ye.id,ye);M=Q;for(const[ge,ye]of z){const Je=Q.get(ge);Je===void 0?z.delete(ge):ye.set(Je)}});const K=Q=>{let fe=z.get(Q);if(!fe){const ge=M.get(Q);if(ge===void 0)return;const[ye,Je]=X(ge);fe={get:ye,set:Ve=>Je(()=>Ve)},z.set(Q,fe)}return fe.get},J=j(()=>{const Q=A();return Q?nm(Q,w(),O):void 0});he(_e(()=>[r(),J()?.issue?.id,J()?.issue?.message],([Q,fe,ge])=>{fe&&console.warn(`[exponential-ui] ${Q}: ${fe}: ${ge}`)})),he(()=>{const Q=A();dT&&Q&&fT(r(),Q,E())});const U=j(()=>{const Q=A();return Q?zv([Q,...P()],r(),u()):{css:"",queries:[],chunks:new Map}}),T=j(Q=>Rv(Q??[],U().chunks)),B=j(()=>T().length?T():[{chunks:new Map,css:U().css}]),[G,I]=X(null),[R,W]=X(null);let H;const[L,Y]=X({width:typeof N(()=>t.width)=="number"?N(()=>t.width):0,height:void 0,measured:!1}),ne=j(()=>cT(L(),{breakpoints:u().tokens.breakpoint??{},queries:U().queries,viewportHeight:t.viewportHeight,hover:a(),reducedMotion:s()}),void 0,{equals:(Q,fe)=>Q.breakpoint===fe.breakpoint&&Q.xq===fe.xq}),se=()=>ne().breakpoint,ue=()=>ne().xq;Le(()=>{const Q=H;if(!Q)return;const fe=()=>{const ye=Q.getBoundingClientRect();if(!N(L).measured&&ye.width===0&&ye.height===0)return;const Je=Q.style.height!==""&&Q.style.height!=="auto";Y({width:ye.width,height:Je?ye.height:void 0,measured:!0})};if(fe(),typeof ResizeObserver>"u")return;const ge=new ResizeObserver(fe);ge.observe(Q),ce(()=>ge.disconnect())});let oe,ve;const de=(Q,fe="polite")=>{const ge=fe==="assertive"?ve:oe;ge&&(ge.textContent="",setTimeout(()=>{ge.textContent=Q},30))},le=j(()=>({...nd,...t.host?.functions??{}})),Ae=j(()=>td(tu(t.locale,t.timeZone??uT()))),Te=j(()=>Vo(A())||Vo(P())),[Ie,ze]=X(Date.now());he(()=>{if(!Te())return;const Q=setInterval(()=>ze(Date.now()),6e4);ce(()=>clearInterval(Q))});const Gt=j(()=>(Ie(),()=>Date.now())),dt=new Map,nr=(Q,fe)=>(dt.set(Q,fe),()=>{dt.get(Q)===fe&&dt.delete(Q)}),rr=new Map,ln=j(()=>t.host??lT),Gr={get surfaceId(){return r()},get compiled(){return p()},get theme(){return u()},get mode(){return l()},get host(){return ln()},get extensions(){return d()},get extensionDefs(){return f()},get data(){return w()},setData:_,templateNode:O,nodeCell:K,get templateBudget(){return J()},get states(){return t.states??Cc},get measure(){return t.measure},get portal(){return G()},get toastLayer(){return R()},get direction(){return v()},get functions(){return le()},openUrl:Q=>Hv(N(ln),Q),get locale(){return t.locale},get formatter(){return Ae()},get now(){return Gt()},registerScroller:nr,paintFailures:rr,get strings(){return m()},t:b,get breakpoint(){return se()},get xq(){return ue()},get reducedMotion(){return s()},get hover(){return a()},announce:de},En=Q=>H?.querySelector(`[data-xui-id="${typeof CSS<"u"&&CSS.escape?CSS.escape(Q):Q.replace(/"/g,'\\"')}"]`)??null,or=Q=>{const fe=En(Q);return fe?(((fe.matches(Ac)?fe:fe.querySelector(Ac))??fe).focus(),!0):!1},ke=Q=>{const fe=En(Q);return fe?(fe.scrollIntoView({block:"nearest",behavior:N(s)?"auto":"smooth"}),!0):!1},Re=(Q,fe,ge)=>{const ye=dt.get(Q);return ye?(ye(fe,ge),!0):!1},Oe={focus:or,scrollIntoView:ke,scrollToIndex:Re,announce:de,run:Q=>{"focus"in Q?or(Q.focus.id):"announce"in Q?de(Q.announce.text,Q.announce.live):"scrollIntoView"in Q?ke(Q.scrollIntoView.id):"scrollToIndex"in Q&&Re(Q.scrollToIndex.id,Q.scrollToIndex.index,Q.scrollToIndex.align)}};N(()=>t.handleRef?.(Oe));const Ke=j(()=>{const Q=u().tokens.breakpoint?.md??768,fe=`.${ms(r())}`;return`@layer xui-base{@container xui (width >= ${Q}px){${fe} .xui-toast-layer{left:auto;right:var(--xui-spacing-lg);transform:none;align-items:flex-end}${fe}[dir="rtl"] .xui-toast-layer{right:auto;left:var(--xui-spacing-lg)}}}`}),Be=()=>t.width===void 0?t.style:{width:$d(t.width),...t.style??{}};return(()=>{var Q=rT(),fe=Q.firstChild,ge=fe.firstChild,ye=fe.nextSibling,Je=ye.nextSibling,Ve=H;typeof Ve=="function"?ie(Ve,Q):H=Q,x(Q,$(xe,{get each(){return B()},children:(we,Ge)=>(()=>{var pt=oT(),ht=pt.firstChild;return te(()=>ht.data=Ge()===0?`${we.css}${Ke()}`:we.css),pt})()}),ye),x(Q,$(Ur.Provider,{value:Gr,get children(){var we=nT(),Ge=we.firstChild,pt=Ge.nextSibling;return x(we,$(ee,{get when(){return A()},get children(){return $(At,{get node(){return S()}})}}),Ge),x(we,()=>t.children,Ge),ie(I,Ge),ie(W,pt),we}}),ye);var nt=oe;typeof nt=="function"?ie(nt,ye):oe=ye;var ft=ve;return typeof ft=="function"?ie(ft,Je):ve=Je,te(we=>{var Ge=["xui-surface",p().scope,ms(r()),t.class].filter(Boolean).join(" "),pt=r(),ht=l(),yi=u().id,Yr=t.density==="default"?void 0:t.density,ir=s()?"reduce":void 0,sr=ue()||void 0,ar=v(),Xr=Be(),Pa=`${jv}
465
+ ${p().css}`;return Ge!==we.e&&en(Q,we.e=Ge),pt!==we.t&&V(Q,"data-xui-surface",we.t=pt),ht!==we.a&&V(Q,"data-xui-mode",we.a=ht),yi!==we.o&&V(Q,"data-xui-theme",we.o=yi),Yr!==we.i&&V(Q,"data-xui-density",we.i=Yr),ir!==we.n&&V(Q,"data-xui-motion",we.n=ir),sr!==we.s&&V(Q,"data-xq",we.s=sr),ar!==we.h&&V(Q,"dir",we.h=ar),we.r=De(Q,Xr,we.r),Pa!==we.d&&(ge.data=we.d=Pa),we},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),Q})()}function gT(e={}){const t=e.surfaceId??"main",n=e.extensions??[],r={catalogId:e.catalogId??yr,components:[],nested:e.initial??null,deleted:!1},o=e.data??{},[i,s]=X(r),[a,l]=X(o),c=d=>{if(d.createSurface){if(d.createSurface.surfaceId!==t)return;const f=d.createSurface.catalogId;s(g=>({...g,catalogId:f,components:[],nested:null,deleted:!1}))}else if(d.updateComponents){if(d.updateComponents.surfaceId!==t)return;const f=d.updateComponents.components;s(g=>{const p=new Map(g.components.map(v=>[v.id,v]));for(const v of f)p.set(v.id,v);return{...g,components:[...p.values()],nested:null,deleted:!1}})}else if(d.updateDataModel){if(d.updateDataModel.surfaceId!==t)return;const{path:f,value:g}=d.updateDataModel;l(p=>$n(p,f??"",g))}else if(d.deleteSurface){if(d.deleteSurface.surfaceId!==t)return;s(f=>({...f,components:[],nested:null,deleted:!0}))}},u=j(()=>{const d=i();return d.deleted?{root:null,issues:[]}:d.nested?qm(d.nested,{catalogId:d.catalogId,extensions:n}):d.components.length===0?{root:null,issues:[]}:Du(d.components,{catalogId:d.catalogId,extensions:n})});return{surfaceId:t,get catalogId(){return i().catalogId},get root(){return u().root},get issues(){return u().issues},get templates(){return u().templates},get data(){return a()},get deleted(){return i().deleted},get components(){return i().components},extensions:n,apply:c,setData:(d,f)=>l(g=>$n(g,d,f)),setNested:d=>s(f=>({...f,nested:d,components:[],deleted:!1})),reset:()=>{s(r),l(o)}}}function mT(e,t={}){return{...t,onAction:n=>(e.action({surfaceId:n.surfaceId,componentId:n.componentId,name:n.name,context:n.context,payload:n.payload,timestamp:n.timestamp}),t.onAction?.(n)),onFunctionCall:async n=>{const r=await e.callFunction(n);return await t.onFunctionCall?.(n),r},openUrl:n=>{e.openUrl(n)},urls:e.urlPolicy(),media:e.mediaOptions(),mediaRequest:t.mediaRequest??(n=>e.mediaRequest(n)),onPaintError:n=>{e.paintError(n),t.onPaintError?.(n)}}}function yT(e){const[t,n]=X(0);return ce(e.subscribe(()=>n(r=>r+1))),t}function bT(e,t){const n=yT(e),r=j(()=>(n(),e.surface(t)??null)),[o,i]=X(0);return he(()=>{const s=r();s&&ce(s.subscribe(()=>i(a=>a+1)))}),j(()=>{o();const s=r();return s?vT(e,s):null})}function vT(e,t){return{surfaceId:t.surfaceId,catalogId:t.catalogId,root:t.root,issues:t.issues,templates:t.templates,theme:t.theme,data:t.data,deleted:!1,components:t.components,extensions:e.extensionDefs,apply:n=>{e.receive(n)},setData:(n,r)=>t.setData(n,r),setNested:()=>{throw new Error("exponential-ui: a host surface is fed by its transport, not setNested")},reset:()=>{}}}function It(e,t,n,r=!1){return e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:r}))}const xT=e=>typeof e=="object"&&e!==null&&typeof e.then=="function";function Vi(e){const t=e.filter(xT);if(t.length!==0)return Promise.all(t).then(()=>{})}function Gi(e,t,n){const r=[],o={...n,waitUntil:i=>{r.push(Promise.resolve(i))}};return It(e,t,o),r}function Ff(e){return e.transport==="ws"||/^wss?:/i.test(e.src)?"ws":e.transport==="sse"?"sse":"jsonl"}function $T(e){const t=Ff(e),n=e.post||void 0;return t==="ws"?new nv({url:e.src}):t==="sse"?new tv({url:e.src,postUrl:n}):new ev({url:e.src,postUrl:n})}const wT={http:"ws",https:"wss"};function kT(e){const t=(e?.schemes??Lu).filter(n=>n==="http"||n==="https");return[...t,...t.map(n=>wT[n])]}const ST=()=>typeof document<"u"&&document.baseURI?document.baseURI:void 0;function Ic(e,t,n){const r=t?.baseUrl??ST();let o;try{o=new URL(e.trim(),r)}catch{return{allowed:!1,reason:"invalid"}}const i=o.protocol.replace(/:$/,"").toLowerCase();if(!n.includes(i))return{allowed:!1,url:o.href,reason:"scheme"};const s=i==="ws"?`http:${o.href.slice(3)}`:i==="wss"?`https:${o.href.slice(4)}`:o.href,a=id(),l=a.length?[...t?.allowPrivate??[],...a]:t?.allowPrivate,c=Br({schemes:["http","https"],hosts:t?.hosts,allowPrivate:l,baseUrl:r},s);return c.allowed?{allowed:!0,url:o.href}:{allowed:!1,url:o.href,reason:c.reason}}function zf(e,t){const n=kT(t),r=Ic(e.src,t,n),o=e.post?Ic(e.post,t,n):void 0,i=r.allowed?o&&!o.allowed?["post",o]:void 0:["src",r];return i?{allowed:!1,src:r,post:o,reason:`${i[0]} denied by the URL policy (${i[1].reason})`}:{allowed:!0,src:r,post:o}}function CT(e,t=[],n){const r=zf(e,n);if(!r.allowed)throw new Error(`exponential-ui: ${r.reason}`);return new Qb({transport:$T(e),extensions:t})}const AT=e=>`${Ff(e)}\0${e.src}\0${e.post??""}`,Ec="exponential-surface",Go={theme:"theme",mode:"mode",density:"density",contrast:"contrast",locale:"locale","time-zone":"timeZone",direction:"direction",width:"width",height:"height","surface-id":"surfaceId",src:"src",post:"post",transport:"transport"},TT=Object.fromEntries(Object.entries(Go).map(([e,t])=>[t,e])),ao=(e,t)=>typeof e=="string"&&t.includes(e)?e:void 0;function _c(e){if(e==null||e==="")return;if(typeof e=="number")return Number.isFinite(e)?e:void 0;const t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?Number(t):t}const IT=[...Object.values(Go),"surface","root","templates","data","host","plugin","extensions","strings","states","measure","viewportHeight"],ET=e=>e.hasTransport&&e.status==="closed";let Rn=null;class lo extends HTMLElement{static get observedAttributes(){return Object.keys(Go)}#p=X(void 0);#h=X(void 0);#g=X(void 0);#m=X(void 0);#y=X(void 0);#b=X(void 0);#v=X(void 0);#x=X(void 0);#$=X(void 0);#F=X(void 0);#w=X(void 0);#k=X(void 0);#S=X(void 0);#n=X(void 0);#C=X(void 0);#A=X(void 0);#u=X(void 0);#o=X(void 0);#d=X(void 0);#f=X(void 0);#T=X(void 0);#I=X(void 0);#E=X(void 0);#_=X(void 0);#z=X(null);#R;#i;#s=X(void 0);#r=X(void 0);#a;#D=()=>null;#t=null;#P=!1;#l;#O=!1;attributeChangedCallback(t,n,r){if(this.#O)return;const o=Go[t];o&&this.#N(o)[1](()=>r??void 0)}#N(t){switch(t){case"theme":return this.#p;case"mode":return this.#h;case"density":return this.#g;case"contrast":return this.#m;case"locale":return this.#y;case"timeZone":return this.#b;case"direction":return this.#v;case"width":return this.#x;case"height":return this.#$;case"surfaceId":return this.#F;case"src":return this.#w;case"post":return this.#k;case"transport":return this.#S}}#e(t,n){const r=TT[t];if(typeof n=="string"||n===null||n===void 0){this.#O=!0;try{typeof n=="string"?this.setAttribute(r,n):this.removeAttribute(r)}finally{this.#O=!1}}this.#N(t)[1](()=>n??void 0)}get theme(){return this.#p[0]()}set theme(t){this.#e("theme",t)}get mode(){return this.#h[0]()}set mode(t){this.#e("mode",t)}get density(){return this.#g[0]()}set density(t){this.#e("density",t)}get contrast(){return this.#m[0]()}set contrast(t){this.#e("contrast",t)}get locale(){return this.#y[0]()}set locale(t){this.#e("locale",t)}get timeZone(){return this.#b[0]()}set timeZone(t){this.#e("timeZone",t)}get direction(){return this.#v[0]()}set direction(t){this.#e("direction",t)}get width(){return this.#x[0]()}set width(t){this.#e("width",t)}get height(){return this.#$[0]()}set height(t){this.#e("height",t)}get surfaceId(){return this.#F[0]()||"main"}set surfaceId(t){this.#e("surfaceId",t)}get src(){return this.#w[0]()}set src(t){this.#e("src",t)}get post(){return this.#k[0]()}set post(t){this.#e("post",t)}get transport(){return this.#S[0]()}set transport(t){this.#e("transport",t)}get surface(){return this.#n[0]()}set surface(t){this.#n[1](()=>t??void 0)}get root(){return this.#C[0]()}set root(t){this.#C[1](()=>t)}get templates(){return this.#A[0]()}set templates(t){this.#A[1](()=>t??void 0)}get data(){return this.#u[0]()}set data(t){this.#u[1](()=>t??void 0)}get host(){return this.#o[0]()}set host(t){this.#o[1](()=>t??void 0)}get plugin(){return this.#d[0]()}set plugin(t){this.#d[1](()=>t??void 0)}get extensions(){return this.#f[0]()}set extensions(t){this.#f[1](()=>t??void 0)}get strings(){return this.#T[0]()}set strings(t){this.#T[1](()=>t??void 0)}get states(){return this.#I[0]()}set states(t){this.#I[1](()=>t??void 0)}get measure(){return this.#E[0]()}set measure(t){this.#E[1](()=>t??void 0)}get viewportHeight(){return this.#_[0]()}set viewportHeight(t){this.#_[1](()=>t??void 0)}get handle(){return this.#t}get issues(){return this.surfaceState?.issues??[]}get status(){return(this.#a??this.#o[0]())?.status??this.#s[0]()?.status}get statusDetail(){return(this.#a??this.#o[0]())?.statusDetail??this.#s[0]()?.detail}get surfaceState(){return N(()=>this.#n[0]()??this.#D()??this.#M())}#M(){const t=this.#z[0]();return t&&t.surfaceId===this.surfaceId?t:null}#L(){const t=this.#o[0]();if(t)return this.#c(),this.#r[1](void 0),t;const n=this.#w[0]();if(!n){this.#c(),this.#r[1](void 0);return}const r={src:n,post:this.#k[0](),transport:this.#S[0]()},o=this.#d[0]()?.urls,i=zf(r,o);if(!i.allowed){this.#c(),this.#r[1](i.reason);return}this.#r[1](void 0);const s=AT(r);return this.#i?.key!==s&&(this.#c(),this.#i={key:s,host:CT(r,yd(N(()=>this.#f[0]())??[]),o)}),this.#i.host}#c(){const t=this.#i;this.#i=void 0,t?.host.close()}apply(t){const n=N(()=>this.#n[0]());if(n)return n.apply(t);const r=N(()=>this.#L());if(r){r.receive(t);return}let o=N(()=>this.#M());if(!o){this.#R?.();const i=this.surfaceId;o=Bt(s=>(this.#R=s,gT({surfaceId:i}))),this.#z[1](()=>o)}o.apply(t)}setData(t,n){const r=this.surfaceState;r?r.setData(t,n):this.data=$n(N(()=>this.#u[0]())??{},t,n)}reset(){this.surfaceState?.reset()}run(t){this.#t?.run(t)}focus(t){return typeof t!="string"?(super.focus(t),!0):this.#t?.focus(t)??!1}announce(t,n){this.#t?.announce(t,n)}scrollIntoView(t){return typeof t!="string"?(super.scrollIntoView(t),!0):this.#t?.scrollIntoView(t)??!1}scrollToIndex(t,n,r){return this.#t?.scrollToIndex(t,n,r)??!1}#j(t){return{...t,onAction:n=>{const r=t.onAction?.(n);return Vi([r,...Gi(this,"xui-action",n)])},onInput:n=>{const r=t.onInput?.(n);return Vi([r,...Gi(this,"xui-input",n)])},onUpload:(n,r)=>{const o=t.onUpload?.(n,r);return Vi([o,...Gi(this,"xui-upload",{files:n,target:r})])},onFunctionCall:n=>{const r=t.onFunctionCall?.(n);let o=!1,i;return It(this,"xui-function-call",{call:n,respond:s=>{o||(o=!0,i=s)}}),o?i:r},openUrl:n=>{It(this,"xui-open-url",{url:n},!0)&&(t.openUrl?t.openUrl(n):typeof window<"u"&&window.open(n,"_blank","noopener,noreferrer"))},onPaintError:n=>{t.onPaintError?.(n),It(this,"xui-paint-error",{error:n})},onThemeIssues:n=>{t.onThemeIssues?.(n),It(this,"xui-theme-issues",{issues:n})},onUnknown:n=>{t.onUnknown?.(n),It(this,"xui-unknown",{node:n})}}}#H(t,n){return{...mT(t,this.#j(n)),openUrl:o=>{It(this,"xui-open-url",{url:o},!0)&&(n.openUrl?n.openUrl(o):t.openUrl(o))}}}#W(){for(const t of IT){if(!Object.prototype.hasOwnProperty.call(this,t))continue;const n=this[t];delete this[t],this[t]=n}}connectedCallback(){if(this.#W(),!this.#l){if(Rn){Rn.add(this);return}Rn=new Set,queueMicrotask(()=>{const t=Rn;Rn=null,t?.size&&Yi(()=>t.forEach(n=>n.#B()))}),this.#B()}}#B(){this.#l||!this.isConnected||(this.replaceChildren(),this.#P=!1,this.#l=ap(()=>this.#U(),this))}disconnectedCallback(){Rn?.delete(this);const t=this.#l;this.#l=void 0,t?.(),this.#t=null,this.#D=()=>null,this.#c(),this.#s[1](void 0)}#U(){const t=j(()=>this.#L());he(()=>{const u=t();if(this.#a=u,!u){const p=this.#r[0](),v=p?{status:"closed",detail:p}:void 0;this.#s[1](v),v&&It(this,"xui-status",v);return}let d;const f=()=>{d&&d.status===u.status&&d.detail===u.statusDetail||(d={status:u.status,detail:u.statusDetail},this.#s[1](d),It(this,"xui-status",u.statusDetail===void 0?{status:u.status}:{status:u.status,detail:u.statusDetail}))},g=u.subscribe(f);ET(u)&&u.connect(),f(),ce(()=>{g(),this.#a===u&&(this.#a=void 0)})});const n=j(()=>{const u=t();return u?bT(u,this.surfaceId):void 0}),r=j(()=>this.#n[0]()??n()?.()??this.#M());this.#D=r;const o=j(()=>{const u=this.#d[0]()??{},d=t();return d?this.#H(d,u):this.#j(u)}),i=()=>!r(),s=()=>_c(this.#$[0]()),a=u=>{this.#t=u,!this.#P&&(this.#P=!0,queueMicrotask(()=>{this.#t===u&&this.isConnected&&It(this,"xui-ready",{handle:u})}))},l=this,c={get surface(){return r()??void 0},get root(){return i()?l.#C[0]():void 0},get templates(){return i()?l.#A[0]():void 0},get data(){return i()?l.#u[0]():void 0},get theme(){return r()?.theme??l.#p[0]()},get mode(){return ao(l.#h[0](),["light","dark","system"])},get density(){return ao(l.#g[0](),["compact","default","comfortable"])},get contrast(){return ao(l.#m[0](),["normal","high","system"])},get locale(){return l.#y[0]()||void 0},get timeZone(){return l.#b[0]()||void 0},get direction(){return ao(l.#v[0](),["ltr","rtl"])},get width(){return _c(l.#x[0]())},get style(){const u=s();return u===void 0?void 0:{height:$d(u)}},get viewportHeight(){return l.#_[0]()},get strings(){return l.#T[0]()},get extensions(){return l.#f[0]()},get states(){return l.#I[0]()},get measure(){return l.#E[0]()},get host(){return o()},get id(){return l.surfaceId},handleRef:a};return $(ee,{get when(){return!t()&&!l.#r[0]()||l.#n[0]()!==void 0||r()!==null},get children(){return $(hT,c)}})}}const _T=new Set(["size","class","color","strokeWidth","absoluteStrokeWidth","children","ref","width","height"]);function DT(e){for(const t of Array.from(e.querySelectorAll("script,foreignObject")))t.remove();for(const t of[e,...Array.from(e.querySelectorAll("*"))])for(const n of Array.from(t.attributes))(/^on/i.test(n.name)||/(^|:)href$/i.test(n.name)&&/^\s*javascript:/i.test(n.value))&&t.removeAttribute(n.name)}function PT(e){if(typeof document>"u")return null;const t=document.createElement("template");t.innerHTML=e.trim();const n=t.content.firstElementChild;return!n||n.localName!=="svg"?null:(DT(n),n)}const OT=(...e)=>e.flatMap(t=>(t??"").split(/\s+/)).filter((t,n,r)=>t!==""&&r.indexOf(t)===n).join(" ");function MT(e){let t;return(n=>{if(t===void 0&&(t=PT(e)),!t)return null;const r=t.cloneNode(!0),o=t.getAttribute("class");let i=new Set;return te(()=>{const s=new Set,a=(f,g)=>{g==null||g===!1||(r.setAttribute(f,String(g)),s.add(f))},l=n.size;a("width",n.width??l??24),a("height",n.height??l??24);const c=OT(o,n.class);c&&a("class",c),n.color!==void 0&&a("stroke",n.color),n.strokeWidth!==void 0&&a("stroke-width",n.strokeWidth);const u=Object.keys(n);u.some(f=>f.startsWith("aria-")||f==="role"||f==="title")||a("aria-hidden","true");for(const f of u){if(_T.has(f))continue;const g=n[f];(typeof g=="string"||typeof g=="number"||g===!0)&&a(f,g)}for(const f of i){if(s.has(f))continue;const g=t.getAttribute(f);g===null?r.removeAttribute(f):r.setAttribute(f,g)}i=s}),r})}function BT(e){const t=new Map;return n=>{const r=e(n);if(!r)return;let o=t.get(r);return o||(o=MT(r),t.set(r,o)),o}}function FT(e,t){for(const[n,r]of Object.entries(t))if(r!=null)if(n==="class")for(const o of String(r).split(/\s+/))o&&e.classList.add(o);else if(n==="style"){const o=e.style;if(!o||typeof r!="object")continue;for(const[i,s]of Object.entries(r))s!=null&&o.setProperty(i,String(s))}else e.setAttribute(n,String(r))}const Dc=e=>{const t=[],n=r=>{Array.isArray(r)?r.forEach(n):typeof r=="function"?n(r()):r instanceof Node?t.push(r):(typeof r=="string"||typeof r=="number")&&t.push(document.createTextNode(String(r)))};return n(e),t};function zT(e){return t=>{const n=Es(),r=$o(()=>t.children),o=new Map,i=a=>{let l=o.get(a);return l||(l=zc(n,()=>$o(()=>N(()=>t.slots)[a])),o.set(a,l)),l};for(const a of Object.keys(N(()=>t.node.slots)??{}))i(a);return j(()=>{const a=t.rootProps,l={node:t.node,props:t.props,theme:t.theme,mode:t.mode,tokens:t.tokens,emit:t.emit,rootProps:a,applyRootProps:c=>FT(c,a),children:()=>Dc(r()),slot:c=>t.node.slots?.[c]?Dc(i(c)()):[]};return e(l)})}}function HT(e){const t={};for(const[n,r]of Object.entries(e.components))t[n]=zT(r);return md({catalog:e.catalog,components:t})}function WT(e){const t="catalog"in e&&e.catalog===null?{components:e.components}:e;return Sx(t)}function RT(e=Ec){if(typeof customElements>"u")return;const t=customElements.get(e);if(t){if(t===lo||t.prototype instanceof lo)return;throw new Error(`exponential-ui: <${e}> is already defined by another class (a second copy of @exponential-at/ui-element, or another library); pick another tag with define("my-surface")`)}customElements.define(e,e===Ec?lo:class extends lo{}),NT(e)}function NT(e){if(typeof document>"u"||!document.head||document.head.querySelector(`style[data-xui-element="${e}"]`))return;const t=document.createElement("style");t.setAttribute("data-xui-element",e),t.textContent=`:where(${e}){display:contents}`,document.head.appendChild(t)}RT();export{lo as ExponentialSurfaceElement,Ec as TAG,FT as applyRootProps,CT as createHost,gT as createSurface,$T as createTransport,zf as decideTransport,RT as define,HT as defineElementExtension,md as defineSolidExtension,BT as iconsFromSvg,NT as installHostRule,_c as lengthOf,WT as registerExtension,MT as svgIcon,Ff as transportKind,kT as transportSchemes};
466
+ //# sourceMappingURL=standalone.js.map