@kitn.ai/ui
Version:
Framework-agnostic, Shadow-DOM web components for building AI chat interfaces — works in React, Vue, Angular, Svelte, or plain HTML. Authored in SolidJS.
1 lines • 159 kB
JavaScript
const g={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Cr(this.context.count)},getNextContextId(){return Cr(this.context.count++)}};function Cr(r){const o=String(r),e=o.length-1;return g.context.id+(e?String.fromCharCode(96+e):"")+o}function ao(r){g.context=r}const _e=!1,no=(r,o)=>r===o,V=Symbol("solid-proxy"),Sr=typeof Proxy=="function",pr=Symbol("solid-track"),K={equals:no};let G=null,Ar=Tr;const N=1,Z=2,Or={owned:null,cleanups:null,context:null,owner:null},gr={};var u=null;let hr=null,Ce=null,m=null,C=null,P=null,Q=0;function L(r,o){const e=m,t=u,a=r.length===0,n=o===void 0?t:o,s=a?Or:{owned:null,cleanups:null,context:n?n.context:null,owner:n},i=a?r:()=>r(()=>x(()=>Y(s)));u=s,m=null;try{return I(i,!0)}finally{m=e,u=t}}function j(r,o){o=o?Object.assign({},K,o):K;const e={value:r,observers:null,observerSlots:null,comparator:o.equals||void 0},t=a=>(typeof a=="function"&&(a=a(e.value)),Nr(e,a));return[$r.bind(e),t]}function io(r,o,e){const t=U(r,o,!0,N);D(t)}function T(r,o,e){const t=U(r,o,!1,N);D(t)}function ur(r,o,e){Ar=bo;const t=U(r,o,!1,N);(!e||!e.render)&&(t.user=!0),P?P.push(t):D(t)}function k(r,o,e){e=e?Object.assign({},K,e):K;const t=U(r,o,!0,0);return t.observers=null,t.observerSlots=null,t.comparator=e.equals||void 0,D(t),$r.bind(t)}function so(r){return r&&typeof r=="object"&&"then"in r}function lo(r,o,e){let t,a,n;typeof o=="function"?(t=r,a=o,n={}):(t=!0,a=r,n=o||{});let s=null,i=gr,l=null,c=!1,p="initialValue"in n,d=typeof t=="function"&&k(t);const h=new Set,[w,z]=(n.storage||j)(n.initialValue),[E,M]=j(void 0),[v,b]=j(void 0,{equals:!1}),[y,A]=j(p?"ready":"unresolved");g.context&&(l=g.getNextContextId(),n.ssrLoadFrom==="initial"?i=n.initialValue:g.load&&g.has(l)&&(i=g.load(l)));function O(_,f,$,S){return s===_&&(s=null,S!==void 0&&(p=!0),(_===i||f===i)&&n.onHydrated&&queueMicrotask(()=>n.onHydrated(S,{value:f})),i=gr,lr(f,$)),f}function lr(_,f){I(()=>{f===void 0&&z(()=>_),A(f!==void 0?"errored":p?"ready":"unresolved"),M(f);for(const $ of h.keys())$.decrement();h.clear()},!1)}function cr(){const _=mo,f=w(),$=E();if($!==void 0&&!s)throw $;return m&&m.user,f}function dr(_=!0){if(_!==!1&&c)return;c=!1;const f=d?d():t;if(f==null||f===!1){O(s,x(w));return}let $;const S=i!==gr?i:x(()=>{try{return a(f,{value:w(),refetching:_})}catch(H){$=H}});if($!==void 0){O(s,void 0,er($),f);return}else if(!so(S))return O(s,S,void 0,f),S;return s=S,"v"in S?(S.s===1?O(s,S.v,void 0,f):O(s,void 0,er(S.v),f),S):(c=!0,queueMicrotask(()=>c=!1),I(()=>{A(p?"refreshing":"pending"),b()},!1),S.then(H=>O(S,H,void 0,f),H=>O(S,void 0,er(H),f)))}Object.defineProperties(cr,{state:{get:()=>y()},error:{get:()=>E()},loading:{get(){const _=y();return _==="pending"||_==="refreshing"}},latest:{get(){if(!p)return cr();const _=E();if(_&&!s)throw _;return w()}}});let _r=u;return d?io(()=>(_r=u,dr(!1))):dr(!1),[cr,{refetch:_=>Er(_r,()=>dr(_)),mutate:z}]}function co(r){return I(r,!1)}function x(r){if(m===null)return r();const o=m;m=null;try{return r()}finally{m=o}}function po(r,o,e){const t=Array.isArray(r);let a,n=e&&e.defer;return s=>{let i;if(t){i=Array(r.length);for(let c=0;c<r.length;c++)i[c]=r[c]()}else i=r();if(n)return n=!1,s;const l=x(()=>o(i,a,s));return a=i,l}}function go(r){ur(()=>x(r))}function q(r){return u===null||(u.cleanups===null?u.cleanups=[r]:u.cleanups.push(r)),r}function ho(r,o){G||(G=Symbol("error")),u=U(void 0,void 0,!0),u.context={...u.context,[G]:[o]};try{return r()}catch(e){W(e)}finally{u=u.owner}}function uo(){return m}function mr(){return u}function Er(r,o){const e=u,t=m;u=r,m=null;try{return I(o,!0)}catch(a){W(a)}finally{u=e,m=t}}const[Se,Ae]=j(!1);function jr(r,o){const e=Symbol("context");return{id:e,Provider:fo(e),defaultValue:r}}function Mr(r){let o;return u&&u.context&&(o=u.context[r.id])!==void 0?o:r.defaultValue}function Pr(r){const o=k(r),e=k(()=>wr(o()));return e.toArray=()=>{const t=e();return Array.isArray(t)?t:t!=null?[t]:[]},e}let mo;function $r(){if(this.sources&&this.state)if(this.state===N)D(this);else{const r=C;C=null,I(()=>or(this),!1),C=r}if(m){const r=this.observers;if(!r||r[r.length-1]!==m){const o=r?r.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(o)):(m.sources=[this],m.sourceSlots=[o]),r?(r.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}}return this.value}function Nr(r,o,e){let t=r.value;return(!r.comparator||!r.comparator(t,o))&&(r.value=o,r.observers&&r.observers.length&&I(()=>{for(let a=0;a<r.observers.length;a+=1){const n=r.observers[a],s=hr&&hr.running;s&&hr.disposed.has(n),(s?!n.tState:!n.state)&&(n.pure?C.push(n):P.push(n),n.observers&&Ir(n)),s||(n.state=N)}if(C.length>1e6)throw C=[],new Error},!1)),o}function D(r){if(!r.fn)return;Y(r);const o=Q;wo(r,r.value,o)}function wo(r,o,e){let t;const a=u,n=m;m=u=r;try{t=r.fn(o)}catch(s){return r.pure&&(r.state=N,r.owned&&r.owned.forEach(Y),r.owned=null),r.updatedAt=e+1,W(s)}finally{m=n,u=a}(!r.updatedAt||r.updatedAt<=e)&&(r.updatedAt!=null&&"observers"in r?Nr(r,t):r.value=t,r.updatedAt=e)}function U(r,o,e,t=N,a){const n={fn:r,state:t,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:o,owner:u,context:u?u.context:null,pure:e};return u===null||u!==Or&&(u.owned?u.owned.push(n):u.owned=[n]),n}function rr(r){if(r.state===0)return;if(r.state===Z)return or(r);if(r.suspense&&x(r.suspense.inFallback))return r.suspense.effects.push(r);const o=[r];for(;(r=r.owner)&&(!r.updatedAt||r.updatedAt<Q);)r.state&&o.push(r);for(let e=o.length-1;e>=0;e--)if(r=o[e],r.state===N)D(r);else if(r.state===Z){const t=C;C=null,I(()=>or(r,o[0]),!1),C=t}}function I(r,o){if(C)return r();let e=!1;o||(C=[]),P?e=!0:P=[],Q++;try{const t=r();return vo(e),t}catch(t){e||(P=null),C=null,W(t)}}function vo(r){if(C&&(Tr(C),C=null),r)return;const o=P;P=null,o.length&&I(()=>Ar(o),!1)}function Tr(r){for(let o=0;o<r.length;o++)rr(r[o])}function bo(r){let o,e=0;for(o=0;o<r.length;o++){const t=r[o];t.user?r[e++]=t:rr(t)}if(g.context){if(g.count){g.effects||(g.effects=[]),g.effects.push(...r.slice(0,e));return}ao()}for(g.effects&&(g.done||!g.count)&&(r=[...g.effects,...r],e+=g.effects.length,delete g.effects),o=0;o<e;o++)rr(r[o])}function or(r,o){r.state=0;for(let e=0;e<r.sources.length;e+=1){const t=r.sources[e];if(t.sources){const a=t.state;a===N?t!==o&&(!t.updatedAt||t.updatedAt<Q)&&rr(t):a===Z&&or(t,o)}}}function Ir(r){for(let o=0;o<r.observers.length;o+=1){const e=r.observers[o];e.state||(e.state=Z,e.pure?C.push(e):P.push(e),e.observers&&Ir(e))}}function Y(r){let o;if(r.sources)for(;r.sources.length;){const e=r.sources.pop(),t=r.sourceSlots.pop(),a=e.observers;if(a&&a.length){const n=a.pop(),s=e.observerSlots.pop();t<a.length&&(n.sourceSlots[s]=t,a[t]=n,e.observerSlots[t]=s)}}if(r.tOwned){for(o=r.tOwned.length-1;o>=0;o--)Y(r.tOwned[o]);delete r.tOwned}if(r.owned){for(o=r.owned.length-1;o>=0;o--)Y(r.owned[o]);r.owned=null}if(r.cleanups){for(o=r.cleanups.length-1;o>=0;o--)r.cleanups[o]();r.cleanups=null}r.state=0}function er(r){return r instanceof Error?r:new Error(typeof r=="string"?r:"Unknown error",{cause:r})}function Lr(r,o,e){try{for(const t of o)t(r)}catch(t){W(t,e&&e.owner||null)}}function W(r,o=u){const e=G&&o&&o.context&&o.context[G],t=er(r);if(!e)throw t;P?P.push({fn(){Lr(t,e,o)},state:N}):Lr(t,e,o)}function wr(r){if(typeof r=="function"&&!r.length)return wr(r());if(Array.isArray(r)){const o=[];for(let e=0;e<r.length;e++){const t=wr(r[e]);if(Array.isArray(t))if(t.length<32768)o.push.apply(o,t);else for(let a=0;a<t.length;a++)o.push(t[a]);else o.push(t)}return o}return r}function fo(r,o){return function(e){let t;return T(()=>t=x(()=>(u.context={...u.context,[r]:e.value},Pr(()=>e.children))),void 0),t}}const vr=Symbol("fallback");function tr(r){for(let o=0;o<r.length;o++)r[o]()}function xo(r,o,e={}){let t=[],a=[],n=[],s=0,i=o.length>1?[]:null;return q(()=>tr(n)),()=>{let l=r()||[],c=l.length,p,d;return l[pr],x(()=>{let w,z,E,M,v,b,y,A,O;if(c===0)s!==0&&(tr(n),n=[],t=[],a=[],s=0,i&&(i=[])),e.fallback&&(t=[vr],a[0]=L(lr=>(n[0]=lr,e.fallback())),s=1);else if(s===0){for(a=new Array(c),d=0;d<c;d++)t[d]=l[d],a[d]=L(h);s=c}else{for(E=new Array(c),M=new Array(c),i&&(v=new Array(c)),b=0,y=Math.min(s,c);b<y&&t[b]===l[b];b++);for(y=s-1,A=c-1;y>=b&&A>=b&&t[y]===l[A];y--,A--)E[A]=a[y],M[A]=n[y],i&&(v[A]=i[y]);for(w=new Map,z=new Array(A+1),d=A;d>=b;d--)O=l[d],p=w.get(O),z[d]=p===void 0?-1:p,w.set(O,d);for(p=b;p<=y;p++)O=t[p],d=w.get(O),d!==void 0&&d!==-1?(E[d]=a[p],M[d]=n[p],i&&(v[d]=i[p]),d=z[d],w.set(O,d)):n[p]();for(d=b;d<c;d++)d in E?(a[d]=E[d],n[d]=M[d],i&&(i[d]=v[d],i[d](d))):a[d]=L(h);a=a.slice(0,s=c),t=l.slice(0)}return a});function h(w){if(n[d]=w,i){const[z,E]=j(d);return i[d]=E,o(l[d],z)}return o(l[d])}}}function ko(r,o,e={}){let t=[],a=[],n=[],s=[],i=0,l;return q(()=>tr(n)),()=>{const c=r()||[],p=c.length;return c[pr],x(()=>{if(p===0)return i!==0&&(tr(n),n=[],t=[],a=[],i=0,s=[]),e.fallback&&(t=[vr],a[0]=L(h=>(n[0]=h,e.fallback())),i=1),a;for(t[0]===vr&&(n[0](),n=[],t=[],a=[],i=0),l=0;l<p;l++)l<t.length&&t[l]!==c[l]?s[l](()=>c[l]):l>=t.length&&(a[l]=L(d));for(;l<t.length;l++)n[l]();return i=s.length=n.length=p,t=c.slice(0),a=a.slice(0,i)});function d(h){n[l]=h;const[w,z]=j(c[l]);return s[l]=z,o(w,l)}}}function ar(r,o){return x(()=>r(o||{}))}function nr(){return!0}const br={get(r,o,e){return o===V?e:r.get(o)},has(r,o){return o===V?!0:r.has(o)},set:nr,deleteProperty:nr,getOwnPropertyDescriptor(r,o){return{configurable:!0,enumerable:!0,get(){return r.get(o)},set:nr,deleteProperty:nr}},ownKeys(r){return r.keys()}};function fr(r){return(r=typeof r=="function"?r():r)?r:{}}function yo(){for(let r=0,o=this.length;r<o;++r){const e=this[r]();if(e!==void 0)return e}}function zo(...r){let o=!1;for(let s=0;s<r.length;s++){const i=r[s];o=o||!!i&&V in i,r[s]=typeof i=="function"?(o=!0,k(i)):i}if(Sr&&o)return new Proxy({get(s){for(let i=r.length-1;i>=0;i--){const l=fr(r[i])[s];if(l!==void 0)return l}},has(s){for(let i=r.length-1;i>=0;i--)if(s in fr(r[i]))return!0;return!1},keys(){const s=[];for(let i=0;i<r.length;i++)s.push(...Object.keys(fr(r[i])));return[...new Set(s)]}},br);const e={},t=Object.create(null);for(let s=r.length-1;s>=0;s--){const i=r[s];if(!i)continue;const l=Object.getOwnPropertyNames(i);for(let c=l.length-1;c>=0;c--){const p=l[c];if(p==="__proto__"||p==="constructor")continue;const d=Object.getOwnPropertyDescriptor(i,p);if(!t[p])t[p]=d.get?{enumerable:!0,configurable:!0,get:yo.bind(e[p]=[d.get.bind(i)])}:d.value!==void 0?d:void 0;else{const h=e[p];h&&(d.get?h.push(d.get.bind(i)):d.value!==void 0&&h.push(()=>d.value))}}}const a={},n=Object.keys(t);for(let s=n.length-1;s>=0;s--){const i=n[s],l=t[i];l&&l.get?Object.defineProperty(a,i,l):a[i]=l?l.value:void 0}return a}function qr(r,...o){const e=o.length;if(Sr&&V in r){const a=e>1?o.flat():o[0],n=o.map(s=>new Proxy({get(i){return s.includes(i)?r[i]:void 0},has(i){return s.includes(i)&&i in r},keys(){return s.filter(i=>i in r)}},br));return n.push(new Proxy({get(s){return a.includes(s)?void 0:r[s]},has(s){return a.includes(s)?!1:s in r},keys(){return Object.keys(r).filter(s=>!a.includes(s))}},br)),n}const t=[];for(let a=0;a<=e;a++)t[a]={};for(const a of Object.getOwnPropertyNames(r)){let n=e;for(let i=0;i<o.length;i++)if(o[i].includes(a)){n=i;break}const s=Object.getOwnPropertyDescriptor(r,a);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?t[n][a]=s.value:Object.defineProperty(t[n],a,s)}return t}let _o=0;function Co(){return g.context?g.getNextContextId():`cl-${_o++}`}const Rr=r=>`Stale read from <${r}>.`;function So(r){const o="fallback"in r&&{fallback:()=>r.fallback};return k(xo(()=>r.each,r.children,o||void 0))}function Ao(r){const o="fallback"in r&&{fallback:()=>r.fallback};return k(ko(()=>r.each,r.children,o||void 0))}function Dr(r){const o=r.keyed,e=k(()=>r.when,void 0,void 0),t=o?e:k(e,void 0,{equals:(a,n)=>!a==!n});return k(()=>{const a=t();if(a){const n=r.children;return typeof n=="function"&&n.length>0?x(()=>n(o?a:()=>{if(!x(t))throw Rr("Show");return e()})):n}return r.fallback},void 0,void 0)}function Oo(r){const o=Pr(()=>r.children),e=k(()=>{const t=o(),a=Array.isArray(t)?t:[t];let n=()=>{};for(let s=0;s<a.length;s++){const i=s,l=a[s],c=n,p=k(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?p:k(p,void 0,{equals:(h,w)=>!h==!w});n=()=>c()||(d()?[i,p,l]:void 0)}return n});return k(()=>{const t=e()();if(!t)return r.fallback;const[a,n,s]=t,i=s.children;return typeof i=="function"&&i.length>0?x(()=>i(s.keyed?n():()=>{var l;if(((l=x(e)())==null?void 0:l[0])!==a)throw Rr("Match");return n()})):i},void 0,void 0)}function Eo(r){return r}let ir;function jo(r){let o;g.context&&g.load&&(o=g.load(g.getContextId()));const[e,t]=j(o,void 0);return ir||(ir=new Set),ir.add(t),q(()=>ir.delete(t)),k(()=>{let a;if(a=e()){const n=r.fallback;return typeof n=="function"&&n.length?x(()=>n(a,()=>t())):n}return ho(()=>r.children,t)},void 0,void 0)}const Mo=["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"],Po=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Mo]),$o=new Set(["innerHTML","textContent","innerText","children"]),No=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),To=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 Io(r,o){const e=To[r];return typeof e=="object"?e[o]?e.$:void 0:e}const Lo=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),qo=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"]),Ro={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Do=r=>k(()=>r());function Fo(r,o,e){let t=e.length,a=o.length,n=t,s=0,i=0,l=o[a-1].nextSibling,c=null;for(;s<a||i<n;){if(o[s]===e[i]){s++,i++;continue}for(;o[a-1]===e[n-1];)a--,n--;if(a===s){const p=n<t?i?e[i-1].nextSibling:e[n-i]:l;for(;i<n;)r.insertBefore(e[i++],p)}else if(n===i)for(;s<a;)(!c||!c.has(o[s]))&&o[s].remove(),s++;else if(o[s]===e[n-1]&&e[i]===o[a-1]){const p=o[--a].nextSibling;r.insertBefore(e[i++],o[s++].nextSibling),r.insertBefore(e[--n],p),o[a]=e[n]}else{if(!c){c=new Map;let d=i;for(;d<n;)c.set(e[d],d++)}const p=c.get(o[s]);if(p!=null)if(i<p&&p<n){let d=s,h=1,w;for(;++d<a&&d<n&&!((w=c.get(o[d]))==null||w!==p+h);)h++;if(h>p-i){const z=o[s];for(;i<p;)r.insertBefore(e[i++],z)}else r.replaceChild(e[i++],o[s++])}else s++;else o[s++].remove()}}}const Fr="_$DX_DELEGATE";function xr(r,o,e,t){let a;const n=()=>{const i=document.createElement("template");return i.innerHTML=r,i.content.firstChild},s=o?()=>x(()=>document.importNode(a||(a=n()),!0)):()=>(a||(a=n())).cloneNode(!0);return s.cloneNode=s,s}function Br(r,o=window.document){const e=o[Fr]||(o[Fr]=new Set);for(let t=0,a=r.length;t<a;t++){const n=r[t];e.has(n)||(e.add(n),o.addEventListener(n,Wo))}}function sr(r,o,e){R(r)||(e==null?r.removeAttribute(o):r.setAttribute(o,e))}function Bo(r,o,e,t){R(r)||(t==null?r.removeAttributeNS(o,e):r.setAttributeNS(o,e,t))}function Hr(r,o,e){R(r)||(e?r.setAttribute(o,""):r.removeAttribute(o))}function Vr(r,o){R(r)||(o==null?r.removeAttribute("class"):r.className=o)}function Gr(r,o,e,t){if(t)Array.isArray(e)?(r[`$$${o}`]=e[0],r[`$$${o}Data`]=e[1]):r[`$$${o}`]=e;else if(Array.isArray(e)){const a=e[0];r.addEventListener(o,e[0]=n=>a.call(r,e[1],n))}else r.addEventListener(o,e,typeof e!="function"&&e)}function Ho(r,o,e={}){const t=Object.keys(o||{}),a=Object.keys(e);let n,s;for(n=0,s=a.length;n<s;n++){const i=a[n];!i||i==="undefined"||o[i]||(Wr(r,i,!1),delete e[i])}for(n=0,s=t.length;n<s;n++){const i=t[n],l=!!o[i];!i||i==="undefined"||e[i]===l||!l||(Wr(r,i,!0),e[i]=l)}return e}function Ur(r,o,e){if(!o)return e?sr(r,"style"):o;const t=r.style;if(typeof o=="string")return t.cssText=o;typeof e=="string"&&(t.cssText=e=void 0),e||(e={}),o||(o={});let a,n;for(n in e)o[n]==null&&t.removeProperty(n),delete e[n];for(n in o)a=o[n],a!==e[n]&&(t.setProperty(n,a),e[n]=a);return e}function Vo(r,o,e){e!=null?r.style.setProperty(o,e):r.style.removeProperty(o)}function Yr(r,o={},e,t){const a={};return t||T(()=>a.children=J(r,o.children,a.children)),T(()=>typeof o.ref=="function"&&kr(o.ref,r)),T(()=>Go(r,o,e,!0,a,!0)),a}function kr(r,o,e){return x(()=>r(o,e))}function F(r,o,e,t){if(e!==void 0&&!t&&(t=[]),typeof o!="function")return J(r,o,t,e);T(a=>J(r,o(),a,e),t)}function Go(r,o,e,t,a={},n=!1){o||(o={});for(const s in a)if(!(s in o)){if(s==="children")continue;a[s]=Jr(r,s,null,a[s],e,n,o)}for(const s in o){if(s==="children")continue;const i=o[s];a[s]=Jr(r,s,i,a[s],e,n,o)}}function Uo(r){let o,e;return!R()||!(o=g.registry.get(e=Jo()))?r():(g.completed&&g.completed.add(o),g.registry.delete(e),o)}function R(r){return!!g.context&&!g.done&&(!r||r.isConnected)}function Yo(r){return r.toLowerCase().replace(/-([a-z])/g,(o,e)=>e.toUpperCase())}function Wr(r,o,e){const t=o.trim().split(/\s+/);for(let a=0,n=t.length;a<n;a++)r.classList.toggle(t[a],e)}function Jr(r,o,e,t,a,n,s){let i,l,c,p,d;if(o==="style")return Ur(r,e,t);if(o==="classList")return Ho(r,e,t);if(e===t)return t;if(o==="ref")n||e(r);else if(o.slice(0,3)==="on:"){const h=o.slice(3);t&&r.removeEventListener(h,t,typeof t!="function"&&t),e&&r.addEventListener(h,e,typeof e!="function"&&e)}else if(o.slice(0,10)==="oncapture:"){const h=o.slice(10);t&&r.removeEventListener(h,t,!0),e&&r.addEventListener(h,e,!0)}else if(o.slice(0,2)==="on"){const h=o.slice(2).toLowerCase(),w=Lo.has(h);if(!w&&t){const z=Array.isArray(t)?t[0]:t;r.removeEventListener(h,z)}(w||e)&&(Gr(r,h,e,w),w&&Br([h]))}else if(o.slice(0,5)==="attr:")sr(r,o.slice(5),e);else if(o.slice(0,5)==="bool:")Hr(r,o.slice(5),e);else if((d=o.slice(0,5)==="prop:")||(c=$o.has(o))||!a&&((p=Io(o,r.tagName))||(l=Po.has(o)))||(i=r.nodeName.includes("-")||"is"in s)){if(d)o=o.slice(5),l=!0;else if(R(r))return e;o==="class"||o==="className"?Vr(r,e):i&&!l&&!c?r[Yo(o)]=e:r[p||o]=e}else{const h=a&&o.indexOf(":")>-1&&Ro[o.split(":")[0]];h?Bo(r,h,o,e):sr(r,No[o]||o,e)}return e}function Wo(r){if(g.registry&&g.events&&g.events.find(([l,c])=>c===r))return;let o=r.target;const e=`$$${r.type}`,t=r.target,a=r.currentTarget,n=l=>Object.defineProperty(r,"target",{configurable:!0,value:l}),s=()=>{const l=o[e];if(l&&!o.disabled){const c=o[`${e}Data`];if(c!==void 0?l.call(o,c,r):l.call(o,r),r.cancelBubble)return}return o.host&&typeof o.host!="string"&&!o.host._$host&&o.contains(r.target)&&n(o.host),!0},i=()=>{for(;s()&&(o=o._$host||o.parentNode||o.host););};if(Object.defineProperty(r,"currentTarget",{configurable:!0,get(){return o||document}}),g.registry&&!g.done&&(g.done=_$HY.done=!0),r.composedPath){const l=r.composedPath();n(l[0]);for(let c=0;c<l.length-2&&(o=l[c],!!s());c++){if(o._$host){o=o._$host,i();break}if(o.parentNode===a)break}}else i();n(t)}function J(r,o,e,t,a){const n=R(r);if(n){!e&&(e=[...r.childNodes]);let l=[];for(let c=0;c<e.length;c++){const p=e[c];p.nodeType===8&&p.data.slice(0,2)==="!$"?p.remove():l.push(p)}e=l}for(;typeof e=="function";)e=e();if(o===e)return e;const s=typeof o,i=t!==void 0;if(r=i&&e[0]&&e[0].parentNode||r,s==="string"||s==="number"){if(n||s==="number"&&(o=o.toString(),o===e))return e;if(i){let l=e[0];l&&l.nodeType===3?l.data!==o&&(l.data=o):l=document.createTextNode(o),e=B(r,e,t,l)}else e!==""&&typeof e=="string"?e=r.firstChild.data=o:e=r.textContent=o}else if(o==null||s==="boolean"){if(n)return e;e=B(r,e,t)}else{if(s==="function")return T(()=>{let l=o();for(;typeof l=="function";)l=l();e=J(r,l,e,t)}),()=>e;if(Array.isArray(o)){const l=[],c=e&&Array.isArray(e);if(yr(l,o,e,a))return T(()=>e=J(r,l,e,t,!0)),()=>e;if(n){if(!l.length)return e;if(t===void 0)return e=[...r.childNodes];let p=l[0];if(p.parentNode!==r)return e;const d=[p];for(;(p=p.nextSibling)!==t;)d.push(p);return e=d}if(l.length===0){if(e=B(r,e,t),i)return e}else c?e.length===0?Xr(r,l,t):Fo(r,e,l):(e&&B(r),Xr(r,l));e=l}else if(o.nodeType){if(n&&o.parentNode)return e=i?[o]:o;if(Array.isArray(e)){if(i)return e=B(r,e,t,o);B(r,e,null,o)}else e==null||e===""||!r.firstChild?r.appendChild(o):r.replaceChild(o,r.firstChild);e=o}}return e}function yr(r,o,e,t){let a=!1;for(let n=0,s=o.length;n<s;n++){let i=o[n],l=e&&e[r.length],c;if(!(i==null||i===!0||i===!1))if((c=typeof i)=="object"&&i.nodeType)r.push(i);else if(Array.isArray(i))a=yr(r,i,l)||a;else if(c==="function")if(t){for(;typeof i=="function";)i=i();a=yr(r,Array.isArray(i)?i:[i],Array.isArray(l)?l:[l])||a}else r.push(i),a=!0;else{const p=String(i);l&&l.nodeType===3&&l.data===p?r.push(l):r.push(document.createTextNode(p))}}return a}function Xr(r,o,e=null){for(let t=0,a=o.length;t<a;t++)r.insertBefore(o[t],e)}function B(r,o,e,t){if(e===void 0)return r.textContent="";const a=t||document.createTextNode("");if(o.length){let n=!1;for(let s=o.length-1;s>=0;s--){const i=o[s];if(a!==i){const l=i.parentNode===r;!n&&!s?l?r.replaceChild(a,i):r.insertBefore(a,e):l&&i.remove()}else n=!0}}else r.insertBefore(a,e);return[a]}function Jo(){return g.getNextContextId()}const Xo="http://www.w3.org/2000/svg";function Kr(r,o=!1,e=void 0){return o?document.createElementNS(Xo,r):document.createElement(r,{is:e})}function Ko(r){const{useShadow:o}=r,e=document.createTextNode(""),t=()=>r.mount||document.body,a=mr();let n,s=!!g.context;return ur(()=>{s&&(mr().user=s=!1),n||(n=Er(a,()=>k(()=>r.children)));const i=t();if(i instanceof HTMLHeadElement){const[l,c]=j(!1),p=()=>c(!0);L(d=>F(i,()=>l()?d():n(),null)),q(p)}else{const l=Kr(r.isSVG?"g":"div",r.isSVG),c=o&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return e.parentNode},configurable:!0}),F(c,n),i.appendChild(l),r.ref&&r.ref(l),q(()=>i.removeChild(l))}},void 0,{render:!s}),e}function Zo(r,o){const e=k(r);return k(()=>{const t=e();switch(typeof t){case"function":return x(()=>t(o));case"string":const a=qo.has(t),n=g.context?Uo():Kr(t,a,x(()=>o.is));return Yr(n,o,a),n}})}function Qo(r){const[,o]=qr(r,["component"]);return Zo(()=>r.component,o)}function re(r){return Object.keys(r).reduce((o,e)=>{const t=r[e];return o[e]=Object.assign({},t),ro(t.value)&&!ne(t.value)&&!Array.isArray(t.value)&&(o[e].value=Object.assign({},t.value)),Array.isArray(t.value)&&(o[e].value=t.value.slice(0)),o},{})}function oe(r){return r?Object.keys(r).reduce((o,e)=>{const t=r[e];return o[e]=ro(t)&&"value"in t?t:{value:t},o[e].attribute||(o[e].attribute=ae(e)),o[e].parse="parse"in o[e]?o[e].parse:typeof o[e].value!="string",o},{}):{}}function ee(r){return Object.keys(r).reduce((o,e)=>(o[e]=r[e].value,o),{})}function te(r,o){const e=re(o);return Object.keys(o).forEach(t=>{const a=e[t],n=r.getAttribute(a.attribute),s=r[t];n!=null&&(a.value=a.parse?Zr(n):n),s!=null&&(a.value=Array.isArray(s)?s.slice(0):s),a.reflect&&Qr(r,a.attribute,a.value,!!a.parse),Object.defineProperty(r,t,{get(){return a.value},set(i){const l=a.value;a.value=i,a.reflect&&Qr(this,a.attribute,a.value,!!a.parse);for(let c=0,p=this.__propertyChangedCallbacks.length;c<p;c++)this.__propertyChangedCallbacks[c](t,i,l)},enumerable:!0,configurable:!0})}),e}function Zr(r){if(r)try{return JSON.parse(r)}catch{return r}}function Qr(r,o,e,t){if(e==null||e===!1)return r.removeAttribute(o);let a=t?JSON.stringify(e):e;r.__updating[o]=!0,a==="true"&&(a=""),r.setAttribute(o,a),Promise.resolve().then(()=>delete r.__updating[o])}function ae(r){return r.replace(/\.?([A-Z]+)/g,(o,e)=>"-"+e.toLowerCase()).replace("_","-").replace(/^-/,"")}function ro(r){return r!=null&&(typeof r=="object"||typeof r=="function")}function ne(r){return Object.prototype.toString.call(r)==="[object Function]"}function ie(r){return typeof r=="function"&&r.toString().indexOf("class")===0}let zr;function se(r,o){const e=Object.keys(o);return class extends r{static get observedAttributes(){return e.map(t=>o[t].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let t of e)this[t]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=te(this,o);const t=ee(this.props),a=this.Component,n=zr;try{zr=this,this.__initialized=!0,ie(a)?new a(t,{element:this}):a(t,{element:this})}finally{zr=n}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let t=null;for(;t=this.__releaseCallbacks.pop();)t(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(t,a,n){if(this.__initialized&&!this.__updating[t]&&(t=this.lookupProp(t),t in o)){if(n==null&&!this[t])return;this[t]=o[t].parse?Zr(n):n}}lookupProp(t){if(o)return e.find(a=>t===a||t===o[a].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(t){this.__releaseCallbacks.push(t)}addPropertyChangedCallback(t){this.__propertyChangedCallbacks.push(t)}}}function le(r,o={},e={}){const{BaseElement:t=HTMLElement,extension:a,customElements:n=window.customElements}=e;return s=>{if(!r)throw new Error("tag is required to register a Component");let i=n.get(r);return i?(i.prototype.Component=s,i):(i=se(t,oe(o)),i.prototype.Component=s,i.prototype.registeredTag=r,n.define(r,i,a),i)}}function ce(r){const o=Object.keys(r),e={};for(let t=0;t<o.length;t++){const[a,n]=j(r[o[t]]);Object.defineProperty(e,o[t],{get:a,set(s){n(()=>s)}})}return e}function de(r){if(r.assignedSlot&&r.assignedSlot._$owner)return r.assignedSlot._$owner;let o=r.parentNode;for(;o&&!o._$owner&&!(o.assignedSlot&&o.assignedSlot._$owner);)o=o.parentNode;return o&&o.assignedSlot?o.assignedSlot._$owner:r._$owner}function pe(r){return(o,e)=>{const{element:t}=e;return L(a=>{const n=ce(o);t.addPropertyChangedCallback((i,l)=>n[i]=l),t.addReleaseCallback(()=>{t.renderRoot.textContent="",a()});const s=r(n,e);return F(t.renderRoot,s)},de(t))}}function ge(r,o,e){return arguments.length===2&&(e=o,o={}),le(r,o)(pe(e))}const he={proseSize:()=>"sm",codeTheme:()=>"github-dark-dimmed",portalMount:()=>{},codeHighlight:()=>!0},oo=jr(he);function eo(r){const o={proseSize:()=>r.proseSize??"sm",codeTheme:()=>r.codeTheme??"github-dark-dimmed",portalMount:()=>r.portalMount,codeHighlight:()=>r.codeHighlight??!0};return ar(oo.Provider,{value:o,get children(){return r.children}})}function ue(){return Mr(oo)}function me(r){switch(r){case"xs":return"text-xs";case"sm":return"text-sm";case"base":return"text-base";case"lg":return"text-lg"}}const we=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-orange-500:oklch(70.5% .213 47.604);--color-yellow-400:oklch(85.2% .199 91.936);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-sky-400:oklch(74.6% .16 232.661);--color-blue-500:oklch(62.3% .214 259.815);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-600:oklch(54.1% .281 293.009);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--radius:var(--kai-radius,.6rem);--color-background:var(--kai-color-background,#fff);--color-foreground:var(--kai-color-foreground,#09090b);--color-card:var(--kai-color-card,#fff);--color-card-foreground:var(--kai-color-card-foreground,#09090b);--color-popover:var(--kai-color-popover,#fff);--color-popover-foreground:var(--kai-color-popover-foreground,#09090b);--color-primary:var(--kai-color-primary,#18181b);--color-primary-foreground:var(--kai-color-primary-foreground,#fafafa);--color-secondary:var(--kai-color-secondary,#f4f4f5);--color-secondary-foreground:var(--kai-color-secondary-foreground,#18181b);--color-muted:var(--kai-color-muted,#f4f4f5);--color-muted-foreground:var(--kai-color-muted-foreground,#696972);--color-surface:var(--kai-color-surface,var(--color-muted))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-surface:var(--kai-color-surface,color-mix(in srgb, var(--color-muted) 40%, var(--color-background)))}}:root,:host{--color-surface-strong:var(--kai-color-surface-strong,var(--color-muted))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-surface-strong:var(--kai-color-surface-strong,color-mix(in srgb, var(--color-muted) 60%, var(--color-background)))}}:root,:host{--color-surface-sunken:var(--kai-color-surface-sunken,var(--color-muted))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-surface-sunken:var(--kai-color-surface-sunken,color-mix(in srgb, var(--color-muted) 85%, var(--color-background)))}}:root,:host{--color-accent:var(--kai-color-accent,#f4f4f5);--color-accent-foreground:var(--kai-color-accent-foreground,#18181b);--color-destructive:var(--kai-color-destructive,#c52020);--color-destructive-foreground:var(--kai-color-destructive-foreground,#fafafa);--color-success:var(--kai-color-success,#16833e);--color-warning:var(--kai-color-warning,#935f06);--color-info:var(--kai-color-info,#0a54cd);--color-success-soft:var(--kai-color-success-soft,var(--color-success))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-success-soft:var(--kai-color-success-soft,color-mix(in oklab, var(--color-success) 14%, var(--color-background)))}}:root,:host{--color-warning-soft:var(--kai-color-warning-soft,var(--color-warning))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-warning-soft:var(--kai-color-warning-soft,color-mix(in oklab, var(--color-warning) 14%, var(--color-background)))}}:root,:host{--color-info-soft:var(--kai-color-info-soft,var(--color-info))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-info-soft:var(--kai-color-info-soft,color-mix(in oklab, var(--color-info) 14%, var(--color-background)))}}:root,:host{--color-destructive-soft:var(--kai-color-destructive-soft,var(--color-destructive))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-destructive-soft:var(--kai-color-destructive-soft,color-mix(in oklab, var(--color-destructive) 14%, var(--color-background)))}}:root,:host{--color-hover:var(--kai-color-hover,var(--color-muted))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-hover:var(--kai-color-hover,color-mix(in oklab, var(--color-muted) 60%, var(--color-background)))}}:root,:host{--color-selected:var(--kai-color-selected,var(--color-primary))}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-selected:var(--kai-color-selected,color-mix(in oklab, var(--color-primary) 8%, var(--color-background)))}}:root,:host{--color-border:var(--kai-color-border,#e4e4e7);--color-input:var(--kai-color-input,#e4e4e7);--color-ring:var(--kai-color-ring,#1a6ef4);--color-scrollbar-thumb:var(--kai-color-scrollbar-thumb,#c9c9cf);--color-scrollbar-thumb-hover:var(--kai-color-scrollbar-thumb-hover,#a0a0a7);--color-sidebar:var(--kai-color-sidebar,#fff);--color-code-foreground:var(--kai-color-code-foreground,#1d4ed8);--color-tool-blue:var(--kai-color-tool-blue,#094cb9);--color-tool-amber:var(--kai-color-tool-amber,#895906);--color-tool-green:var(--kai-color-tool-green,#137136);--color-tool-red:var(--kai-color-tool-red,#b81e1e);--text-caption:var(--kai-text-caption,.6875rem);--text-caption--line-height:1rem;--text-meta:var(--kai-text-meta,.75rem);--text-meta--line-height:1.1rem;--text-body:var(--kai-text-body,.875rem);--text-body--line-height:1.45rem;--text-title:var(--kai-text-title,1rem);--text-title--line-height:1.5rem}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{font-family:var(--kai-font-base,ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--kai-tracking,normal);display:block}code,kbd,samp,pre{font-family:var(--kai-font-code,ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace)}*{border-color:var(--color-border)}:host{color-scheme:light}.dark{color-scheme:dark}:focus-visible{outline:2px solid var(--color-ring);outline-offset:2px}*{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar-thumb) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-thumb);background-clip:padding-box;border:2px solid #0000;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--color-scrollbar-thumb-hover)}::-webkit-scrollbar-corner{background:0 0}@media(prefers-reduced-motion:reduce){.animate-in,.animate-out,[class*="animate-["]{animation:none!important}}}@layer components{.kai-radio,.kai-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:1.5px solid var(--color-input);background-color:var(--color-background);flex-shrink:0;place-content:center;block-size:1.125rem;inline-size:1.125rem;margin:0;transition:border-color .18s,background-color .18s,box-shadow .18s,transform .1s;display:inline-grid;box-shadow:0 1px 2px #0000000a}.kai-radio{border-radius:9999px}.kai-checkbox{border-radius:.3rem}.kai-radio:after{content:"";background-color:var(--color-primary);border-radius:9999px;block-size:.5rem;inline-size:.5rem;transition:transform .2s cubic-bezier(.34,1.56,.64,1);transform:scale(0)}.kai-radio:checked{border-color:var(--color-primary)}.kai-radio:checked:after{transform:scale(1)}.kai-checkbox:checked{background-color:var(--color-primary);border-color:var(--color-primary)}.kai-checkbox:after{content:"";background-color:var(--color-primary-foreground);block-size:.8rem;inline-size:.8rem;transition:transform .2s cubic-bezier(.34,1.56,.64,1);transform:scale(0);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") 50%/contain no-repeat}.kai-checkbox:checked:after{transform:scale(1)}.kai-radio:hover:not(:disabled),.kai-checkbox:hover:not(:disabled){border-color:var(--color-primary);box-shadow:0 0 0 4px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-radio:hover:not(:disabled),.kai-checkbox:hover:not(:disabled){box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary) 9%,transparent)}}.kai-radio:active:not(:disabled),.kai-checkbox:active:not(:disabled){transform:scale(.92)}.kai-checkbox:checked{box-shadow:0 1px 4px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-checkbox:checked{box-shadow:0 1px 4px color-mix(in srgb,var(--color-primary) 26%,transparent)}}.kai-radio:disabled,.kai-checkbox:disabled{opacity:.5;cursor:not-allowed}.kai-range{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background:0 0;block-size:1.25rem;inline-size:100%;margin:0}.kai-range::-webkit-slider-runnable-track{block-size:.375rem;box-shadow:none;background:linear-gradient(to right,var(--color-primary) var(--kai-range-fill,0%),var(--color-muted) var(--kai-range-fill,0%));border:none;border-radius:9999px}.kai-range::-moz-range-track{block-size:.375rem;box-shadow:none;background:var(--color-muted);border:none;border-radius:9999px}.kai-range::-moz-range-progress{background:var(--color-primary);border-radius:9999px;block-size:.375rem}.kai-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--color-background);border:2px solid var(--color-primary);border-radius:9999px;block-size:1.125rem;inline-size:1.125rem;margin-block-start:-.375rem;transition:transform .12s,box-shadow .12s;box-shadow:0 1px 3px #0000002e}.kai-range::-moz-range-thumb{background:var(--color-background);border:2px solid var(--color-primary);border-radius:9999px;block-size:1.125rem;inline-size:1.125rem;transition:transform .12s,box-shadow .12s;box-shadow:0 1px 3px #0000002e}.kai-range:hover::-webkit-slider-thumb{transform:scale(1.12)}.kai-range:hover::-moz-range-thumb{transform:scale(1.12)}.kai-range:focus-visible{outline:none}.kai-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 6px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary) 14%,transparent)}}.kai-range:active::-webkit-slider-thumb{box-shadow:0 0 0 6px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-range:active::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary) 14%,transparent)}}.kai-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 6px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary) 14%,transparent)}}.kai-range:active::-moz-range-thumb{box-shadow:0 0 0 6px var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.kai-range:active::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--color-primary) 14%,transparent)}}.kai-range:disabled{opacity:.5;cursor:not-allowed}}@layer utilities{.\\@container\\/compare{container:compare/inline-size}.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{inset-inline:0}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.inset-x-3{inset-inline:calc(var(--spacing) * 3)}.inset-y-0{inset-block:0}.inset-y-2{inset-block:calc(var(--spacing) * 2)}.inset-y-3{inset-block:calc(var(--spacing) * 3)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-3{top:calc(var(--spacing) * -3)}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-2\\.5{top:calc(var(--spacing) * 2.5)}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-2{right:calc(var(--spacing) * 2)}.right-2\\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[100\\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-m-1\\.5{margin:calc(var(--spacing) * -1.5)}.m-0{margin:0}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-1\\.5{m