@domphy/ui 0.21.2 → 0.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var ha=Object.defineProperty,ga=Object.defineProperties;var fa=Object.getOwnPropertyDescriptors;var Sn=Object.getOwnPropertySymbols;var ya=Object.prototype.hasOwnProperty,ba=Object.prototype.propertyIsEnumerable;var vn=(r,n,o)=>n in r?ha(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,E=(r,n)=>{for(var o in n||(n={}))ya.call(n,o)&&vn(r,o,n[o]);if(Sn)for(var o of Sn(n))ba.call(n,o)&&vn(r,o,n[o]);return r},O=(r,n)=>ga(r,fa(n));import{toState as Cn}from"@domphy/core";import{themeColor as gt,themeSize as Sa,themeSpacing as va}from"@domphy/theme";function Sc(r={}){var e,s;let n=Cn((e=r.color)!=null?e:"neutral","color"),o=Cn((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Sa(t),backgroundColor:t=>gt(t),color:t=>gt(t,"shift-10",n.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>gt(t,"shift-7",n.get(t)),textUnderlineOffset:va(.72),cursor:"help","&:hover":{color:t=>gt(t,"shift-11",o.get(t)),textDecorationColor:t=>gt(t,"shift-9",o.get(t))}}}}import{toState as En}from"@domphy/core";import{themeColor as ho,themeDensity as Ca,themeSpacing as xa}from"@domphy/theme";import{themeColor as xn}from"@domphy/theme";function S(r,n="primary"){let o=xn(r,"surface"),e=xn(r,"shift-9",n);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function Tc(r={}){var s,t;let{type:n="single"}=r,o=En((s=r.color)!=null?s:"neutral","color"),e=En((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(n!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>xa(Ca(a)*1.5),outline:a=>`1px solid ${ho(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>ho(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${ho(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}import{toState as Ea}from"@domphy/core";import{themeColor as go,themeDensity as fo,themeSize as ka,themeSpacing as ft}from"@domphy/theme";function Lc(r={}){var o;let n=Ea((o=r.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:ft(3),paddingBlock:e=>ft(fo(e)*2),paddingInline:e=>ft(fo(e)*4),borderRadius:e=>ft(fo(e)*1.5),boxShadow:e=>`inset ${ft(1)} 0 0 0 ${go(e,"shift-8",n.get(e))}`,backgroundColor:e=>go(e,"inherit",n.get(e)),color:e=>go(e,"shift-10",n.get(e)),fontSize:e=>ka(e,"inherit")}}}import{toState as wa}from"@domphy/core";import{themeColor as yo,themeSize as Ta,themeSpacing as kn}from"@domphy/theme";function Rc(r={}){var o;let n=wa((o=r.color)!=null?o:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:kn(9),height:kn(9),fontSize:e=>Ta(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>yo(e,"inherit",n.get(e)),color:e=>yo(e,"shift-11",n.get(e)),boxShadow:e=>`0 0 0 1px ${yo(e,"border",n.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as wn}from"@domphy/core";import{themeColor as bo,themeDensity as So,themeSize as Da,themeSpacing as zt}from"@domphy/theme";function $c(r={}){var s;let{label:n=999}=r,o=wn(n),e=wn((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>zt(So(t)*1.5),minWidth:zt(5),height:t=>zt(So(t)*5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Da(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>zt(So(t)*999),backgroundColor:t=>bo(t,"shift-9",e.get(t)),color:t=>bo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${bo(t,"shift-0",e.get(t))}`}}}}import{toState as Pa}from"@domphy/core";import{themeColor as vo,themeDensity as Tn,themeSize as Ia,themeSpacing as Co}from"@domphy/theme";function Fc(r={}){var o;let n=Pa((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Ia(e,"inherit"),backgroundColor:e=>vo(e,"inherit",n.get(e)),color:e=>vo(e,"text",n.get(e)),boxShadow:e=>`inset ${Co(1)} 0 0 0 ${vo(e,"shift-4",n.get(e))}`,border:"none",paddingBlock:e=>Co(Tn(e)*2),paddingInline:e=>Co(Tn(e)*4),margin:0}}}import{toState as La}from"@domphy/core";import{themeColor as yt,themeSize as Oa,themeSpacing as Dn}from"@domphy/theme";function qc(r={}){var e;let{separator:n="/"}=r,o=La((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>Oa(s,"inherit"),gap:Dn(1),color:s=>yt(s,"text",o.get(s)),backgroundColor:s=>yt(s,"inherit",o.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>yt(s,"text",o.get(s))},"& > *:not(:last-child)::after":{content:`"${n}"`,color:s=>yt(s,"shift-4",o.get(s)),paddingInlineStart:Dn(1)},"& > [aria-current=page]":{color:s=>yt(s,"shift-10",o.get(s)),pointerEvents:"none"}}}}import{toState as za}from"@domphy/core";import{themeColor as xo,themeSize as Va,themeSpacing as Pn}from"@domphy/theme";function Zc(r={}){var o;let n=za((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Va(e,"inherit"),paddingInline:Pn(1),border:"none",background:"none",cursor:"pointer",color:e=>xo(e,"text",n.get(e)),borderRadius:Pn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>xo(e,"shift-10",n.get(e)),backgroundColor:e=>xo(e,"hover",n.get(e))},"&:focus-visible":{boxShadow:e=>S(e,n.get(e))}}}}import{toState as Na}from"@domphy/core";import{themeColor as G,themeDensity as Mt,themeSize as $a,themeSpacing as _t}from"@domphy/theme";var et={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as Ra}from"@domphy/core";import{themeColor as tt,themeDensity as Vt,themeSize as Ma,themeSpacing as Rt}from"@domphy/theme";var _a={small:.5,medium:1,large:1.5};function In(r={}){var s,t,a;let n=Ra((s=r.color)!=null?s:"neutral","color"),o=_a[(t=r.size)!=null?t:"medium"],e=et[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>Ma(i,e),paddingBlock:i=>Rt(Vt(i)*o),paddingInline:i=>Rt(Vt(i)*o),borderRadius:i=>Rt(Vt(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>Rt(Vt(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>tt(i,"text",n.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>tt(i,"text",n.get(i)),backgroundColor:i=>tt(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>tt(i,"text",n.get(i)),backgroundColor:i=>tt(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>S(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>tt(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ba={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function mm(r={}){var a,i,m,u;let n=(a=r.variant)!=null?a:"outline";if(n==="ghost")return In({color:r.color,size:r.size});let o=Na((i=r.color)!=null?i:"primary","color"),e=n==="solid",s=Ba[(m=r.size)!=null?m:"medium"],t=et[(u=r.size)!=null?u:"medium"];return O(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>$a(l,t),paddingBlock:l=>_t(Mt(l)*s.block),paddingInline:l=>_t(Mt(l)*s.inline),borderRadius:l=>_t(Mt(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>_t(Mt(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${G(l,"border-strong",o.get(l))}`,color:l=>e?G(l,"shift-0","neutral"):G(l,"shift-13",o.get(l)),backgroundColor:l=>e?G(l,"shift-13",o.get(l)):G(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?G(l,"shift-0","neutral"):G(l,"shift-14",o.get(l)),backgroundColor:l=>e?G(l,"shift-14",o.get(l)):G(l,"hover",o.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?G(l,"shift-15",o.get(l)):G(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>G(l,"shift-2","neutral"),outline:l=>`1px solid ${G(l,"border-strong","neutral")}`,color:l=>G(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Eo}from"@domphy/core";import{themeColor as Ae,themeSize as Aa,themeSpacing as ee}from"@domphy/theme";function fm(r={}){var t,a;let{checked:n=!1}=r,o=Eo(n),e=Eo((t=r.color)!=null?t:"neutral","color"),s=Eo((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>o.get(i),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>Aa(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${Ae(i,"border",e.get(i))}`,minWidth:ee(12),minHeight:ee(6),borderRadius:ee(999),paddingLeft:ee(7),paddingRight:ee(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>Ae(i,"inherit",e.get(i)),color:i=>Ae(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:ee(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:ee(5),height:ee(5),borderRadius:ee(999),color:i=>Ae(i,"text"),backgroundColor:i=>Ae(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>Ae(i,"increase-3",s.get(i)),outline:"none",color:i=>Ae(i,"decrease-2"),paddingLeft:ee(2),paddingRight:ee(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${ee(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Fa}from"@domphy/core";import{themeColor as He,themeDensity as ye,themeSpacing as ce}from"@domphy/theme";var Ha={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function V(r){return Ha[r]}function xm(r={}){var o;let n=Fa((o=r.color)!=null?o:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>ce(ye(e)*2),backgroundColor:e=>He(e,"inherit",n.get(e)),color:e=>He(e,"shift-10",n.get(e)),outline:e=>`1px solid ${He(e,"border-strong",n.get(e))}`,outlineOffset:"-1px",boxShadow:V("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>ce(ye(e)*2),paddingInline:e=>ce(ye(e)*4),fontWeight:"600",color:e=>He(e,"shift-11",n.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>ce(ye(e)*4),paddingBottom:e=>ce(ye(e)*2),color:e=>He(e,"text",n.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>ce(ye(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>ce(ye(e)*4),color:e=>He(e,"shift-10",n.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:ce(2),paddingBlock:e=>ce(ye(e)*2),paddingInline:e=>ce(ye(e)*4),borderTop:e=>`1px solid ${He(e,"border",n.get(e))}`}}}}import{toState as Ka}from"@domphy/core";import{themeColor as Ln,themeDensity as ko,themeSize as Wa,themeSpacing as wo}from"@domphy/theme";function Tm(r={}){var o;let n=Ka((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>Wa(e,"inherit"),color:e=>Ln(e,"text",n.get(e)),backgroundColor:e=>Ln(e,"inherit",n.get(e)),height:e=>wo(ko(e)*6),paddingInline:e=>wo(ko(e)*1.5),borderRadius:e=>wo(ko(e)*1)}}}import{behavior as ii,merge as To,toState as Bt}from"@domphy/core";import{themeColor as ke,themeDensity as At,themeSize as On,themeSpacing as we}from"@domphy/theme";import{behavior as ja,merge as qa,toState as Ya}from"@domphy/core";import{autoUpdate as Ga,computePosition as Ua,flip as Xa,offset as Za,shift as Ja}from"@domphy/floating";function X(r,n){return`domphy-${r}-${n.nodeId}`}function Qa(r,n){var $e,fe,le,Be;let{openState:o,placement:e,content:s,keepOpenOnContentHover:t}=n,{kind:a}=n,i=`floating:${a}`,m=null,u=null,l=null,c=null,d=!1,p=r.domElement,y=r.getRoot(),T=X(a,r),v={style:{position:"fixed",pointerEvents:"auto",visibility:I=>o.get(I)?"visible":"hidden"},onKeyDown:I=>{I.key==="Escape"&&k()},onMouseEnter:()=>t&&D(),onMouseLeave:()=>t&&k(),_onMount:I=>{var W;if(l=I.domElement,l.id||(l.id=T),p&&l&&!l.hasAttribute("data-theme")){let J=(W=p.closest("[data-theme]"))==null?void 0:W.getAttribute("data-theme");J&&l.setAttribute("data-theme",J)}},_portal:I=>{let W=p.closest("dialog");if(W){let se=W.querySelector(":scope > #domphy-floating");return se||(se=W.ownerDocument.createElement("div"),se.id="domphy-floating",Object.assign(se.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),W.appendChild(se)),se}let J=I.domElement.querySelector("#domphy-floating");if(!J){let se={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};J=I.children.insert(se).domElement}return J}},f=I=>qa(I,v);f(s);let b=()=>{d||(d=!0,c=y.children.insert(s),c._behaviorInstances.set(i,ne))},x=()=>{d&&(!l||!l.isConnected)&&(u==null||u(),u=null,c=null,l=null,d=!1),b(),p&&l&&(u==null||u(),u=Ga(p,l,()=>{Ua(p,l,{placement:e.get(),middleware:[Za(12),Xa(),Ja()],strategy:"fixed"}).then(({x:I,y:W,placement:J})=>{l&&(Object.assign(l.style,{left:`${I}px`,top:`${W}px`}),e.set(J))})}),o.set(!0))},h=()=>{u==null||u(),u=null,c&&(c.remove(),c=null),l=null,d=!1,o.set(!1)},D=()=>{m&&clearTimeout(m),m=setTimeout(x,100)},k=()=>{m&&clearTimeout(m),m=setTimeout(h,100)},R=I=>{if(!o.get()||!p||!l)return;let W=I.target;!p.contains(W)&&!l.contains(W)&&k()};($e=y.domElement)==null||$e.addEventListener("click",R);let j=I=>{I.key==="Escape"&&o.get()&&k()},K=(Be=(le=(fe=y.domElement)==null?void 0:fe.ownerDocument)!=null?le:y.domElement)!=null?Be:null;K==null||K.addEventListener("keydown",j);let _=I=>{I?d||x():d&&h()},U=o.addListener(_),B=!1,q=!1,ne,re=I=>{var W;I._behaviors=O(E({},(W=I._behaviors)!=null?W:{}),{[i]:{attach:()=>ne,props:{}}})};return ne={show:D,hide:k,panelId:T,update(I){if(!q&&(I.openState!==o&&(U(),o=I.openState,U=o.addListener(_),o.get()&&x()),e=I.placement,s=I.content,t=I.keepOpenOnContentHover,f(s),re(s),c)){q=!0;try{c.patch(s)}finally{q=!1}}},destroy(){var I;B||(B=!0,m&&clearTimeout(m),m=null,u==null||u(),u=null,c==null||c.remove(),c=null,l=null,d=!1,U(),U=()=>{},(I=y.domElement)==null||I.removeEventListener("click",R),K==null||K.removeEventListener("keydown",j))}},re(s),_(o.get()),ne}function me(r){let{kind:n,open:o=!1,placement:e}=r,s=Ya(o),t=`floating:${n}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},ja(t,Qa,{kind:n,openState:s,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}import{behavior as ei,ElementNode as ti,rawHtml as oi,toState as ni}from"@domphy/core";import{themeColor as Nt,themeDensity as Fe,themeSize as ri,themeSpacing as Ee}from"@domphy/theme";var ai='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function $t(r={}){var e;let{removable:n=!1}=r,o=ni((e=r.color)!=null?e:"neutral","color");return O(E({dataTone:"shift-2"},ei("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:oi(ai),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>Ee(Fe(l)*1),width:l=>Ee(Fe(l)*4),height:l=>Ee(Fe(l)*4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>Nt(l,"shift-4",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof ti&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:n})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>Ee(Fe(s)*6),paddingBlock:0,borderRadius:s=>Ee(Fe(s)*999),paddingInlineStart:s=>Ee(Fe(s)*2.5),paddingInlineEnd:s=>Ee(Fe(s)*(n?1:2.5)),gap:Ee(1.5),fontSize:s=>ri(s,"decrease-1"),backgroundColor:s=>Nt(s,"inherit",o.get(s)),color:s=>Nt(s,"text",o.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${Nt(s,"border-strong",o.get(s))}`}})}function Km(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=Bt(r.value),i=Bt(s),{show:m,hide:u,anchorPartial:l}=me({kind:"combobox",open:i,placement:Bt(o),content:r.content}),c={onClick:(h,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:h=>ke(h,"inherit"),color:h=>ke(h,"text"),borderRadius:h=>we(At(h)*2),outline:h=>`1px solid ${ke(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};To(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:we(6),marginInlineStart:we(2),fontSize:h=>On(h,"inherit"),color:h=>ke(h,"text",e),backgroundColor:h=>ke(h,"inherit",e)},p=h=>{var D,k;return(k=(D=h==null?void 0:h.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:k.query},y=h=>{let D=h;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return h},T={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:h=>i.get(h),ariaControls:h=>h!=null&&h.elementNode?X("combobox",y(h.elementNode)):void 0},v=h=>h?(To(h,E({onFocus:(D,k)=>m(k),style:d,_key:"combobox-input"},T)),h):E({input:null,ariaLabel:"Filter options",onFocus:(D,k)=>m(k),value:D=>{var k,R;return(R=(k=p(D))==null?void 0:k.get(D))!=null?R:""},onInput:(D,k)=>{var R;(R=k.getBehavior("comboboxInner"))==null||R.query.set(D.target.value)},style:d,_key:"combobox-input"},T),f=h=>({div:D=>{i.get(D);let k=h.state.get(D),R=Array.isArray(k)?k:[k],K=h.options.filter(_=>R.includes(_.value)).map(_=>({span:_.label,$:[$t({color:h.color,removable:!0})],_key:_.value,_onRemove:U=>{let B=h.state.get(),ne=(Array.isArray(B)?B:[B]).filter(re=>re!==_.value);h.multiple?h.state.set(ne):h.state.set(ne[0])}}));return K.push(v(h.input)),K},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:we(1)}}),x=O(E({_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(h,D)=>{D[h.tagName]=[f({options:n,multiple:t,color:e,state:a,input:r.input})]}},ii("comboboxInner",(h,D)=>{let k=h.getMetadata("comboboxQuery");return k||(k=Bt(""),h.setMetadata("comboboxQuery",k)),{query:k,update(R){h.children.update([f(R)])}}},{options:n,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:we(32),outlineOffset:"-1px",outline:h=>`1px solid ${ke(h,"border-strong","neutral")}`,paddingBlock:h=>we(At(h)*1),paddingInline:h=>we(At(h)*1),borderRadius:h=>we(At(h)*1.5),fontSize:h=>On(h,"inherit"),color:h=>ke(h,"text",e),backgroundColor:h=>ke(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>S(h,e)}}});return To(l,x),l}import{merge as li,toState as si}from"@domphy/core";import{themeColor as be,themeDensity as Ht,themeSize as zn,themeSpacing as Ft}from"@domphy/theme";function Um(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,n)=>{li(n,{_context:{command:{query:si("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Xm(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>zn(e,"inherit"),paddingInline:e=>Ft(Ht(e)*3),paddingBlock:e=>Ft(Ht(e)*2),border:"none",borderBottom:e=>`1px solid ${be(e,"border",n)}`,outline:"none",color:e=>be(e,"shift-10",n),backgroundColor:e=>be(e,"inherit",n),"&::placeholder":{color:e=>be(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>be(e,"shift-6",o),boxShadow:e=>S(e,o)}}}}function Zm(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>zn(e,"inherit"),height:e=>Ft(6+Ht(e)*2),paddingInline:e=>Ft(Ht(e)*3),border:"none",outline:"none",color:e=>be(e,"shift-13",n),backgroundColor:e=>be(e,"inherit",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>be(e,"shift-13",n),backgroundColor:e=>be(e,"hover",n)},"&:focus-visible":{boxShadow:e=>S(e,o)}}}}import{behavior as ci,merge as mi,toState as ue}from"@domphy/core";import{themeColor as H,themeDensity as ui,themeSize as ot,themeSpacing as $}from"@domphy/theme";var A=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Ke=(r,n)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+n),Do=(r,n)=>new Date(r.getFullYear(),r.getMonth()+n,r.getDate()),bt=(r,n)=>!!r&&!!n&&r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,n)=>Ke(r,-((r.getDay()-n+7)%7));function di(r){var n,o;try{let e=new Intl.Locale(r),s=(o=(n=e.getWeekInfo)==null?void 0:n.call(e))!=null?o:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function pi(r,n){let o=n,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(o),{update(a){a.selectionIsCallerOwned||t(a.selection,o.selection),t(a.viewYear,o.viewYear),t(a.viewMonth,o.viewMonth),t(a.focused,o.focused),t(a.hovered,o.hovered),t(a.hour,o.hour),t(a.minute,o.minute),t(a.open,o.open),(a.selection!==o.selection||a.onChange!==o.onChange)&&s(a),o=a},destroy(){e==null||e(),e=null}}}function ru(r={}){var gn,fn,yn,bn;let{mode:n="single",time:o=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(gn=r.weekStartsOn)!=null?gn:di(a),l=ue((fn=r.accentColor)!=null?fn:"primary","accentColor"),c=ue((yn=r.placement)!=null?yn:"bottom-start"),d=ue((bn=r.value)!=null?bn:n==="range"?[null,null]:null),p=(()=>{let g=d.get(),C=n==="range"?g==null?void 0:g[0]:g;return C instanceof Date?C:new Date})(),y=ue(p.getFullYear(),"viewYear"),T=ue(p.getMonth(),"viewMonth"),v=ue(A(p),"focused"),f=ue(null,"hovered"),b=ue(p.getHours(),"hour"),x=ue(p.getMinutes(),"minute"),h=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),k=new Intl.DateTimeFormat(a,{weekday:"short"}),R=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=g=>g?h.format(g):"",K=g=>{if(i)return i(g);if(n==="range"){let[C,w]=g!=null?g:[null,null];return C?`${j(C)} \u2013 ${j(w)}`:""}return j(g)},_=Array.from({length:7},(g,C)=>k.format(new Date(2023,0,1+(C+u)%7))),U=g=>!!e&&A(g)<A(e)||!!s&&A(g)>A(s)||!!t&&t(g),B=g=>{if(!o)return A(g);let C=A(g);return C.setHours(b.get(),x.get(),0,0),C},q=(g,C)=>{var P;if(U(g))return;if(n==="single"){d.set(B(g)),o||Ot(C);return}let[w,L]=(P=d.get())!=null?P:[null,null];!w||w&&L?d.set([B(g),null]):A(g)<A(w)?(d.set([B(g),B(w)]),o||Ot(C)):(d.set([w,B(g)]),o||Ot(C))},ne=()=>{var g;if(o)if(n==="single"){let C=d.get();C&&d.set(B(C))}else{let[C,w]=(g=d.get())!=null?g:[null,null];d.set([C&&B(C),w&&B(w)])}},re=(g,C)=>{var Qe;if(n!=="range")return!1;let[w,L]=(Qe=d.get(C))!=null?Qe:[null,null],P=L!=null?L:f.get(C);if(!w||!P)return!1;let z=A(w)<=A(P)?w:P,Q=A(w)<=A(P)?P:w,Y=A(g);return Y>=A(z)&&Y<=A(Q)},$e=(g,C)=>{let w=d.get(C);if(n==="range"){let[L,P]=w!=null?w:[null,null];return bt(g,L)||bt(g,P)}return bt(g,w)},fe=g=>{y.set(g.getFullYear()),T.set(g.getMonth())},le=g=>{let C=Do(new Date(y.get(),T.get(),1),g);fe(C)},Be=g=>y.set(y.get()+g),I=g=>{var w;let C=(w=g==null?void 0:g.getRoot())==null?void 0:w.domElement;setTimeout(()=>{var L;(L=C==null?void 0:C.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},W=la(),J=ue(!1),{show:se,hide:Ot,anchorPartial:hn}=me({kind:"datePicker",open:J,placement:c,content:W}),aa=E({type:"text",readonly:!0,value:g=>K(d.get(g)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:g=>J.get(g),ariaControls:g=>g!=null&&g.elementNode?X("datePicker",g.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,C)=>{po(C)},onFocus:(g,C)=>{po(C)},onKeyDown:(g,C)=>{let w=g.key;(w==="ArrowDown"||w==="Enter")&&(g.preventDefault(),po(C))}},ci("datePicker",pi,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:y,viewMonth:T,focused:v,hovered:f,hour:b,minute:x,open:J,onChange:m}));function po(g){var w;let C=(w=ia())!=null?w:new Date;v.set(A(C)),fe(C),se(g),I(g)}function ia(){var C;let g=d.get();return n==="range"?(C=g==null?void 0:g[0])!=null?C:null:g!=null?g:null}return mi(hn,aa),hn;function la(){let g=(z,Q,Y)=>({button:z,type:"button",ariaLabel:Q,onClick:Y,style:hi()}),C={div:[g("\xAB","Previous year",()=>Be(-1)),g("\u2039","Previous month",()=>le(-1)),{div:z=>D.format(new Date(y.get(z),T.get(z),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:z=>ot(z)}},g("\u203A","Next month",()=>le(1)),g("\xBB","Next year",()=>Be(1))],style:{display:"flex",alignItems:"center",gap:$(1),marginBottom:$(2)}},w={div:_.map((z,Q)=>({div:z,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:Y=>ot(Y,"decrease-1"),fontWeight:"bold",color:Y=>H(Y,"shift-7"),paddingBlock:$(1)},_key:Q})),role:"row",style:Vn()},L={div:z=>sa(z),role:"grid",ariaLabel:"Calendar",onKeyDown:da,onMouseLeave:()=>n==="range"&&f.set(null),style:{display:"flex",flexDirection:"column",gap:$(.5)}},P=[C,w,L];return o&&P.push(ma()),P.push(ua()),{div:P,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:$(70),padding:$(3),borderRadius:z=>$(ui(z)*2),backgroundColor:z=>H(z,"inherit"),color:z=>H(z,"text"),outline:z=>`1px solid ${H(z,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}}}function sa(g){let C=new Date(y.get(g),T.get(g),1),w=T.get(g),L=Io(C,u),P=[];for(let z=0;z<6;z++){let Q=[];for(let Y=0;Y<7;Y++){let Qe=Ke(L,z*7+Y);Q.push(ca(Qe,w,g))}P.push({div:Q,role:"row",style:Vn(),_key:z})}return P}function ca(g,C,w){let L=U(g),P=$e(g,w),z=re(g,w),Q=g.getMonth()!==C,Y=bt(g,v.get(w)),Qe=bt(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:Y?0:-1,ariaSelected:P,ariaDisabled:L,disabled:L,ariaLabel:R.format(g),dataDate:Po(g),onClick:(M,pa)=>q(g,pa),onMouseEnter:()=>n==="range"&&f.set(g),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:$(1),fontSize:M=>ot(M),fontFamily:"inherit",opacity:L?.35:Q?.5:1,backgroundColor:M=>P?H(M,"shift-7",l.get(M)):z?H(M,"hover",l.get(M)):"transparent",color:M=>P?H(M,"shift-0",l.get(M)):H(M,"text"),outline:Qe?M=>`1px solid ${H(M,"shift-6",l.get(M))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:M=>P?H(M,"shift-7",l.get(M)):H(M,"shift-3",l.get(M))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:M=>S(M,l.get(M))}},_key:Po(g)}}function ma(){let g=(C,w,L)=>({select:Array.from({length:C},(P,z)=>({option:String(z).padStart(2,"0"),value:String(z),selected:Q=>w.get(Q)===z,_key:z})),ariaLabel:L,onChange:P=>{w.set(Number(P.target.value)),ne()},style:gi()});return{div:[g(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},g(60,x,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:$(1),marginTop:$(3)}}}function ua(){let g=(C,w)=>({button:C,type:"button",onClick:(L,P)=>w(P),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>ot(L,"decrease-1"),color:L=>H(L,"muted",l.get(L)),padding:$(1)}});return{div:[g("Today",C=>{let w=new Date;v.set(A(w)),fe(w),I(C)}),g("Clear",()=>{d.set(n==="range"?[null,null]:null),f.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:$(2),paddingTop:$(2),borderTop:C=>`1px solid ${H(C,"border")}`}}}function da(g,C){let w=g,L=v.get(),P=null;switch(w.key){case"ArrowLeft":P=Ke(L,-1);break;case"ArrowRight":P=Ke(L,1);break;case"ArrowUp":P=Ke(L,-7);break;case"ArrowDown":P=Ke(L,7);break;case"Home":P=Io(L,u);break;case"End":P=Ke(Io(L,u),6);break;case"PageUp":P=Do(L,w.shiftKey?-12:-1);break;case"PageDown":P=Do(L,w.shiftKey?12:1);break;case"Enter":case" ":w.preventDefault(),q(L,C);return;default:return}w.preventDefault(),v.set(P),fe(P),I(C)}}function Vn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:$(.5)}}function hi(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>ot(r),color:r=>H(r,"muted"),width:$(7),height:$(7),borderRadius:$(1),"&:hover":{backgroundColor:r=>H(r,"shift-3")}}}function gi(){return{fontFamily:"inherit",fontSize:r=>ot(r),padding:$(1),borderRadius:$(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${H(r,"border-strong")}`,backgroundColor:r=>H(r,"inherit"),color:r=>H(r,"text")}}import{toState as fi}from"@domphy/core";import{themeColor as Rn,themeSize as Mn,themeSpacing as _n}from"@domphy/theme";function cu(r={}){var o;let n=fi((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${_n(24)}, max-content) 1fr`,columnGap:_n(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Mn(e,"inherit"),color:e=>Rn(e,"shift-10",n.get(e))},"& dd":{margin:0,fontSize:e=>Mn(e,"inherit"),color:e=>Rn(e,"text",n.get(e))}}}}import{toState as Nn}from"@domphy/core";import{themeColor as We,themeDensity as St,themeSize as $n,themeSpacing as te}from"@domphy/theme";function hu(r={}){var s,t;let{duration:n=240}=r,o=Nn((s=r.color)!=null?s:"neutral","color"),e=Nn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>$n(a,"inherit"),color:a=>We(a,"text",o.get(a)),backgroundColor:a=>We(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>We(a,"shift-2",o.get(a)),color:a=>We(a,"shift-10",o.get(a)),fontSize:a=>$n(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:te(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>te(St(a)*4),height:te(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:te(2),height:te(2),flexShrink:0,marginTop:te(-.5),borderInlineEnd:a=>`${te(.5)} solid ${We(a,"shift-9",o.get(a))}`,borderBottom:a=>`${te(.5)} solid ${We(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${n}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>We(a,"shift-3",o.get(a))},"& > summary:focus-visible":{borderRadius:a=>te(St(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>te(St(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${n}ms ease, opacity ${n}ms ease, padding ${n}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>te(St(a)*1),paddingBottom:a=>te(St(a)*3)}}}}import{behavior as yi,toState as bi}from"@domphy/core";import{themeColor as Lo,themeDensity as Bn,themeSize as Si,themeSpacing as An}from"@domphy/theme";var vt=0;function Kt(){vt++,vt===1&&(document.body.style.overflow="hidden")}function nt(){vt=Math.max(0,vt-1),vt===0&&(document.body.style.overflow="")}var Hn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function vi(r,n){let{state:o}=n,e=null,s=!1,t=!1,a=null,i=r.domElement;i.setAttribute("aria-modal","true");let m=()=>{s=!1,typeof i.close=="function"&&i.close(),i.style.visibility="hidden",i.style.pointerEvents="none",t&&(nt(),t=!1),e==null||e.focus(),e=null},u=p=>{if(p.key!=="Tab")return;let y=Array.from(i.querySelectorAll(Hn)).filter(f=>!f.closest("[aria-hidden='true']")&&f.offsetParent!==null);if(!y.length){p.preventDefault();return}let T=y[0],v=y[y.length-1];p.shiftKey?(document.activeElement===T||document.activeElement===i)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),T.focus())},l=p=>{p.preventDefault(),o.set(!1)};i.addEventListener("cancel",l);let c=p=>{p?(s=!1,a&&(clearTimeout(a),a=null),e=document.activeElement,i.style.visibility="visible",i.style.pointerEvents="auto",typeof i.showModal=="function"&&!i.open&&i.showModal(),t||(Kt(),t=!0),i.addEventListener("keydown",u),requestAnimationFrame(()=>{i.style.opacity="1";let y=i.querySelector(Hn);y==null||y.focus()})):(s=!0,i.style.opacity="0",i.removeEventListener("keydown",u),a=setTimeout(()=>{a=null,s&&m()},350))};c(o.get());let d=o.addListener(c);return{requestClose:()=>o.set(!1),onTransitionEnd:p=>{s&&p.target===i&&p.propertyName==="opacity"&&m()},update(p){p.state!==o&&(d(),o=p.state,d=o.addListener(c))},destroy(){a&&(clearTimeout(a),a=null),d(),i.removeEventListener("cancel",l),t&&(nt(),t=!1),i.removeEventListener("keydown",u),e==null||e.focus(),e=null}}}function Cu(r={}){let{color:n="neutral",open:o=!1,labelledBy:e,describedBy:s}=r,t=bi(o);return O(E({_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},yi("dialog",vi,{state:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(a,i)=>{var l;if(a.target!==i.domElement)return;let m=i.domElement.getBoundingClientRect();a.clientX>=m.left&&a.clientX<=m.right&&a.clientY>=m.top&&a.clientY<=m.bottom||(l=i.getBehavior("dialog"))==null||l.requestClose()},onTransitionEnd:(a,i)=>{var m;return(m=i.getBehavior("dialog"))==null?void 0:m.onTransitionEnd(a)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:a=>Si(a,"inherit"),color:a=>Lo(a,"shift-10",n),backgroundColor:a=>Lo(a,"inherit",n),border:"none",borderRadius:a=>An(Bn(a)*2),padding:a=>An(Bn(a)*3),boxShadow:V("high"),"&::backdrop":{backgroundColor:a=>Lo(a,"shift-2","neutral"),opacity:.75}}})}import{toState as Ci}from"@domphy/core";import{themeColor as Wt,themeSize as xi,themeSpacing as Ei}from"@domphy/theme";function Tu(r={}){var o;let n=Ci((o=r.color)!=null?o:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Ei(2),fontSize:e=>xi(e,"inherit"),backgroundColor:e=>Wt(e),color:e=>Wt(e,"text",n.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Wt(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Wt(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as ki,toState as wi}from"@domphy/core";import{themeColor as Oo,themeDensity as Ti,themeSize as Di,themeSpacing as Ct}from"@domphy/theme";var zo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Fn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=r=>r==="left"||r==="right";function Kn(r,n){return r==="start"?n?"right":"left":r==="end"?n?"left":"right":r}function Pi(r,n){let{state:o,placement:e,size:s}=n,t=r.domElement;t.setAttribute("aria-modal","true");let a=v=>{v.preventDefault(),o.set(!1)};t.addEventListener("cancel",a);let i=(v,f)=>{let x=(v==="start"||v==="end")&&(t.ownerDocument.documentElement.dir==="rtl"||t.ownerDocument.dir==="rtl"),h=Kn(v,x),D=f!=null?f:rt(h)?Ct(80):Ct(64);return t.style.margin=Fn[h],t.style.width=rt(h)?D:"100dvw",t.style.height=rt(h)?"100dvh":D,h},m=i(e,s),u=!1,l=!1,c=null,d=()=>{c=null,u&&(u=!1,typeof t.close=="function"&&t.close(),t.style.visibility="hidden",t.style.pointerEvents="none",l&&(nt(),l=!1))},p=v=>{v.target===t&&v.propertyName==="transform"&&d()};t.addEventListener("transitionend",p);let y=v=>{v?(u=!1,c&&(clearTimeout(c),c=null),t.style.visibility="visible",t.style.pointerEvents="auto",typeof t.showModal=="function"&&!t.open&&t.showModal(),l||(Kt(),l=!0),requestAnimationFrame(()=>{t.style.transform="translate(0, 0)"})):(u=!0,t.style.transform=zo[m],c=setTimeout(d,350))};y(o.get());let T=o.addListener(y);return{requestClose:()=>o.set(!1),update(v){v.state!==o&&(T(),o=v.state,T=o.addListener(y)),(v.placement!==e||v.size!==s)&&(e=v.placement,s=v.size,m=i(e,s),o.get()||(t.style.transform=zo[m]))},destroy(){c&&(clearTimeout(c),c=null),T(),t.removeEventListener("cancel",a),t.removeEventListener("transitionend",p),l&&(nt(),l=!1)}}}function zu(r={}){let{color:n="neutral",open:o=!1,placement:e="end",size:s}=r,t=wi(o),a=Kn(e,!1),i=rt(a)?Ct(80):Ct(64),m=s!=null?s:i;return O(E({_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},ki("drawer",Pi,{state:t,placement:e,size:s})),{onClick:(u,l)=>{var p;if(u.target!==l.domElement)return;let c=l.domElement.getBoundingClientRect();u.clientX>=c.left&&u.clientX<=c.right&&u.clientY>=c.top&&u.clientY<=c.bottom||(p=l.getBehavior("drawer"))==null||p.requestClose()},style:{transform:zo[a],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:u=>Di(u,"inherit"),color:u=>Oo(u,"shift-10",n),backgroundColor:u=>Oo(u,"inherit",n),border:"none",padding:u=>Ct(Ti(u)*3),margin:Fn[a],width:rt(a)?m:"100dvw",height:rt(a)?"100dvh":m,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:V("high"),"&::backdrop":{backgroundColor:u=>Oo(u,"shift-2","neutral"),opacity:.75}}})}import{toState as Ii}from"@domphy/core";import{themeColor as Li,themeSize as Oi}from"@domphy/theme";function Nu(r={}){var o;let n=Ii((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Oi(e,"inherit"),fontStyle:"italic",color:e=>Li(e,"shift-10",n.get(e))}}}import{toState as zi}from"@domphy/core";import{themeColor as Vo,themeSpacing as Ro}from"@domphy/theme";function Hu(r={}){var o;let n=zi((o=r.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:Ro(3),paddingBlock:Ro(12),paddingInline:Ro(6),textAlign:"center",color:e=>Vo(e,"muted",n.get(e)),"& > :first-child":{color:e=>Vo(e,"shift-5",n.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>Vo(e,"text",n.get(e))}}}}var Mo="errorBoundaryOriginal";function Vi(r){var o;let n=r.getMetadata(Mo);if(typeof n=="function"){(o=r._childrenRelease)==null||o.call(r),r._setupFunctionChildren(n);return}if(n!=null){r.children.update(Array.isArray(n)?n:[n]);return}r.children.update([])}function Ku(r={}){return{_onSchedule:(n,o)=>{n.getMetadata(Mo)===void 0&&n.setMetadata(Mo,o[n.tagName])},_onError:(n,o)=>{var t,a;(t=r.onError)==null||t.call(r,o);let e=()=>Vi(n),s=typeof r.fallback=="function"?r.fallback(o,e):(a=r.fallback)!=null?a:{div:"An error occurred."};n.children.update([s])}}}import{toState as Ri}from"@domphy/core";import{themeColor as jt,themeSize as Mi,themeSpacing as _i}from"@domphy/theme";var Ni={small:8,medium:10,large:14};function Uu(r={}){var e,s;let n=Ri((e=r.color)!=null?e:"primary","color"),o=_i(Ni[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:"50%",fontSize:t=>Mi(t,"inherit"),backgroundColor:t=>jt(t,"shift-13",n.get(t)),color:t=>jt(t,"shift-0","neutral"),boxShadow:V("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>jt(t,"shift-14",n.get(t)),boxShadow:V("medium")},"&:active:not([disabled])":{backgroundColor:t=>jt(t,"shift-15",n.get(t)),boxShadow:V("low")},"&:focus-visible":{boxShadow:t=>`${V("medium")}, ${S(t,n.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as $i}from"@domphy/core";import{themeColor as Wn,themeSize as Bi,themeSpacing as qt}from"@domphy/theme";function Qu(r={}){var o;let n=$i((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:qt(2),marginInline:0,marginTop:qt(3),marginBottom:qt(3),color:e=>Wn(e,"text",n.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:qt(2)},"& figcaption":{fontSize:e=>Bi(e,"decrease-1"),color:e=>Wn(e,"muted",n.get(e)),lineHeight:1.45}}}}import{toState as Ai}from"@domphy/core";import{themeColor as xt,themeDensity as at,themeSize as _o,themeSpacing as Se}from"@domphy/theme";function nd(r={}){var s;let{layout:n="horizontal"}=r,o=Ai((s=r.color)!=null?s:"neutral","color"),e=n==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>Se(at(t)*3),paddingBlock:t=>Se(at(t)*3),border:"none",borderRadius:t=>Se(at(t)*2),fontSize:t=>_o(t,"inherit"),backgroundColor:t=>xt(t,"inherit",o.get(t)),color:t=>xt(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:Se(4),rowGap:Se(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>_o(t,"inherit"),fontWeight:600,paddingBlock:t=>Se(at(t)*1),borderRadius:t=>Se(at(t)*2),color:t=>xt(t,"text",o.get(t)),backgroundColor:t=>xt(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:Se(at(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${Se(2)} * -1)`,fontSize:t=>_o(t,"decrease-1"),color:t=>xt(t,"text",o.get(t))}}}}import{themeDensity as Hi,themeSpacing as Fi}from"@domphy/theme";function id(r={}){let{columns:n=1,gap:o=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof n=="number"?`repeat(${n}, minmax(0, 1fr))`:n,gap:s=>Fi(Hi(s)*o)},e?{alignItems:e}:{})}}import{toState as Ki}from"@domphy/core";import{themeColor as Wi,themeSize as ji,themeSpacing as qi}from"@domphy/theme";var Yi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function ud(r={}){var o;let n=Ki((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Wi(e,"shift-11",n.get(e)),marginTop:0,marginBottom:qi(2),fontSize:e=>{let s=Yi[e.elementNode.tagName]||"inherit";return ji(e,s)}}}}import{toState as Gi}from"@domphy/core";import{themeColor as jn,themeSpacing as qn}from"@domphy/theme";function gd(r={}){var o;let n=Gi((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:qn(3),marginBottom:qn(3),backgroundColor:e=>jn(e,"inherit",n.get(e)),color:e=>jn(e,"text",n.get(e))}}}import{toState as Ui}from"@domphy/core";import{themeColor as Xi,themeSize as Zi,themeSpacing as Yn}from"@domphy/theme";function Sd(r={}){var o;let n=Ui((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:Yn(4),height:Yn(4),flexShrink:"0",fontSize:e=>Zi(e),backgroundColor:"transparent",color:e=>Xi(e,"text",n.get(e))}}}import{toState as Ji}from"@domphy/core";import{themeColor as Gn,themeSpacing as Qi}from"@domphy/theme";function Ed(r={}){var o;let n=Ji((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:Qi(2),backgroundColor:e=>Gn(e,"inherit",n.get(e)),color:e=>Gn(e,"text",n.get(e))}}}import{toState as Un}from"@domphy/core";import{themeColor as Z,themeSize as el,themeSpacing as je}from"@domphy/theme";function Pd(r={}){var e,s;let n=Un((e=r.color)!=null?e:"neutral","color"),o=Un((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>el(t,"inherit"),color:t=>Z(t,"text",n.get(t)),display:"inline-flex",position:"relative",width:je(6),height:je(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:je(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Z(t,"border-strong",n.get(t))}`,color:t=>Z(t,"text",n.get(t)),width:je(4),height:je(4)},"&:hover::before":{backgroundColor:t=>Z(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${Z(t,"shift-6",o.get(t))}`,backgroundColor:t=>Z(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>Z(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${je(.5)} solid ${Z(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${Z(t,"shift-6",o.get(t))}`,backgroundColor:t=>Z(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>Z(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>Z(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:je(1.5),boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>Z(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as tl}from"@domphy/core";import{themeColor as No,themeDensity as it,themeSize as ol,themeSpacing as lt}from"@domphy/theme";function Vd(r={}){var o;let n=tl((o=r.color)!=null?o:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>ol(e,"inherit"),color:e=>No(e,"text",n.get(e)),paddingBlock:e=>lt(it(e)*1),paddingInline:e=>lt(it(e)*1),blockSize:e=>lt(6+it(e)*2),inlineSize:e=>lt(6+it(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>lt(it(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>lt(it(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>No(e,"shift-2","neutral"),outline:e=>`1px solid ${No(e,"border-strong","neutral")}`}}}}import{toState as Xn}from"@domphy/core";import{themeColor as Te,themeDensity as $o,themeSize as nl,themeSpacing as Yt}from"@domphy/theme";function $d(r={}){var s,t;let{mode:n="datetime-local"}=r,o=Xn((s=r.color)!=null?s:"neutral","color"),e=Xn((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>nl(a,"inherit"),lineHeight:"inherit",color:a=>Te(a,"text",o.get(a)),backgroundColor:a=>Te(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Te(a,"border-strong",o.get(a))}`,borderRadius:a=>Yt($o(a)*1.5),paddingInline:a=>Yt($o(a)*3),height:a=>Yt(6+$o(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Te(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Te(a,"muted","neutral"),backgroundColor:a=>Te(a,"shift-2","neutral"),outline:a=>`1px solid ${Te(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Yt(.5)} solid ${Te(a,"shift-6","error")}`}}}}import{toState as Zn}from"@domphy/core";import{themeColor as ae,themeDensity as Gt,themeSize as rl,themeSpacing as qe}from"@domphy/theme";function Kd(r={}){var e,s;let n=Zn((e=r.color)!=null?e:"neutral","color"),o=Zn((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>rl(t,"inherit"),lineHeight:"inherit",color:t=>ae(t,"text",n.get(t)),backgroundColor:t=>ae(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ae(t,"border-strong",n.get(t))}`,borderRadius:t=>qe(Gt(t)*1.5),height:t=>qe(6+Gt(t)*2),paddingInline:t=>qe(Gt(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>qe(Gt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:qe(1),height:qe(6),paddingInline:qe(2),cursor:"pointer",color:t=>ae(t,"shift-11",n.get(t)),backgroundColor:t=>ae(t,"surface",n.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${ae(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>ae(t,"muted","neutral"),outline:t=>`1px solid ${ae(t,"border-strong","neutral")}`,backgroundColor:t=>ae(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>ae(t,"muted","neutral"),backgroundColor:t=>ae(t,"shift-3","neutral")}}}}import{toState as Jn}from"@domphy/core";import{themeColor as Ye,themeDensity as Ut,themeSize as al,themeSpacing as Et}from"@domphy/theme";function Gd(r={}){var e,s;let n=Jn((e=r.color)!=null?e:"neutral","color"),o=Jn((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Et(10),paddingInlineStart:t=>Et(Ut(t)*3),paddingInlineEnd:t=>Et(Ut(t)*1.5),paddingBlock:t=>Et(Ut(t)*1),borderRadius:t=>Et(Ut(t)*1.5),fontSize:t=>al(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ye(t,"border-strong",n.get(t))}`,color:t=>Ye(t,"text",n.get(t)),backgroundColor:t=>Ye(t,"inherit",n.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Ye(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ye(t,"shift-2","neutral"),outline:t=>`1px solid ${Ye(t,"border-strong","neutral")}`,color:t=>Ye(t,"muted","neutral")}}}}import{themeSpacing as Qn}from"@domphy/theme";function Zd(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:Qn(2),"& > *":{minWidth:`${Qn(9)}!important`}},_onMount:r=>{let n=r.domElement,o=()=>Array.from(n.querySelectorAll("input")),e=a=>{let i=o(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=o(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,p,y;a.preventDefault();let i=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((T,v)=>{let f=m[l+v];f&&(f.value=T,f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(y=m[c])==null||y.focus()};n.addEventListener("input",e),n.addEventListener("keydown",s),n.addEventListener("paste",t),r.addHook("Remove",()=>{n.removeEventListener("input",e),n.removeEventListener("keydown",s),n.removeEventListener("paste",t)})}}}import{isState as il,rawHtml as ll,toState as Bo}from"@domphy/core";import{themeColor as Xt,themeDensity as Zt,themeSize as sl,themeSpacing as Jt}from"@domphy/theme";var cl='<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" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',ml='<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" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>',ul=["name","value","onInput","disabled","required"];function er(r){if(r!=null)return typeof r=="function"?r:il(r)?n=>r.get(n):r}function op(r={}){var t,a;let n=Bo((t=r.color)!=null?t:"neutral","color"),o=Bo((a=r.accentColor)!=null?a:"primary","accentColor"),e=Bo(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of ul)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var T,v,f,b,x,h,D;let m=(T=r.name)!=null?T:s.name,u=er((v=r.value)!=null?v:s.value),l=(f=r.onInput)!=null?f:s.onInput,c=er((b=r.disabled)!=null?b:s.disabled),d=(x=r.required)!=null?x:s.required,p=O(E(E(E(E(E({input:null,type:k=>e.get(k)?"text":"password",ariaLabel:(h=r.ariaLabel)!=null?h:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),y={button:k=>ll(e.get(k)?ml:cl),type:"button",ariaLabel:k=>e.get(k)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(p),i.children.insert(y)},style:{display:"flex",alignItems:"center",gap:i=>Jt(Zt(i)*1),paddingBlock:i=>Jt(Zt(i)*1),paddingInline:i=>Jt(Zt(i)*3),borderRadius:i=>Jt(Zt(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Xt(i,"border-strong",n.get(i))}`,color:i=>Xt(i,"text",n.get(i)),backgroundColor:i=>Xt(i,"inherit",n.get(i)),fontSize:i=>sl(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${Xt(i,"shift-5",o.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,o.get(i))}}}}import{toState as tr}from"@domphy/core";import{themeColor as De,themeSize as dl,themeSpacing as Qt}from"@domphy/theme";function sp(r={}){var e,s;let n=tr((e=r.color)!=null?e:"neutral","color"),o=tr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>dl(t,"inherit"),color:t=>De(t,"text",n.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:Qt(6),height:Qt(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${De(t,"border-strong",n.get(t))}`,color:t=>De(t,"text",n.get(t)),width:Qt(4),height:Qt(4)},"&:hover::before":{backgroundColor:t=>De(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${De(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>De(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>De(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>De(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as or}from"@domphy/core";import{themeColor as Ao,themeSpacing as ve}from"@domphy/theme";function pp(r={}){var e,s;let n=or((e=r.color)!=null?e:"neutral","color"),o=or((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:ve(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:ve(1.5),borderRadius:ve(999),backgroundColor:t=>Ao(t,"shift-3",n.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:ve(4),height:ve(4),borderRadius:ve(999),border:"none",marginTop:`calc((${ve(1.5)} - ${ve(4)}) / 2)`,backgroundColor:t=>Ao(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Ao(t,"shift-10",o.get(t))},borderRadius:ve(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as nr}from"@domphy/core";import{themeColor as Pe,themeDensity as Ho,themeSize as pl,themeSpacing as eo}from"@domphy/theme";function bp(r={}){var e,s;let n=nr((e=r.color)!=null?e:"neutral","color"),o=nr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>pl(t,"inherit"),lineHeight:"inherit",color:t=>Pe(t,"text",n.get(t)),backgroundColor:t=>Pe(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Pe(t,"border-strong",n.get(t))}`,borderRadius:t=>eo(Ho(t)*1.5),minWidth:eo(32),paddingInline:t=>eo(Ho(t)*3),paddingBlock:t=>eo(Ho(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>Pe(t,"shift-7",n.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Pe(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Pe(t,"muted","neutral"),backgroundColor:t=>Pe(t,"shift-2","neutral"),outline:t=>`1px solid ${Pe(t,"border-strong","neutral")}`}}}}import{toState as hl}from"@domphy/core";import{themeColor as kt,themeSize as rr,themeSpacing as de}from"@domphy/theme";function Ep(r={}){var o;let n=hl((o=r.accentColor)!=null?o:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>rr(e,"inherit"),backgroundColor:e=>kt(e,"inherit"),color:e=>kt(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:de(9),height:de(6),cursor:"pointer",margin:"0",paddingBlock:de(1),transition:"box-shadow 140ms ease",borderRadius:de(999),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&:checked":{"&::before":{backgroundColor:e=>kt(e,"increase-3",n.get(e))},"&::after":{left:`calc(100% - ${de(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:de(3),height:de(3),borderRadius:de(999),left:de(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>kt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:de(999),display:"inline-block",fontSize:e=>rr(e,"inherit"),lineHeight:1,backgroundColor:e=>kt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ar}from"@domphy/core";import{themeColor as oe,themeDensity as Fo,themeSize as gl,themeSpacing as Ge}from"@domphy/theme";function Pp(r={}){var s,t;let{type:n="text"}=r,o=ar((s=r.color)!=null?s:"neutral","color"),e=ar((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Ge(10),paddingInline:a=>Ge(Fo(a)*3),paddingBlock:a=>Ge(Fo(a)*1),borderRadius:a=>Ge(Fo(a)*1.5),fontSize:a=>gl(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${oe(a,"border-strong",o.get(a))}`,color:a=>oe(a,"text",o.get(a)),backgroundColor:a=>oe(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>oe(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>oe(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${oe(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>oe(a,"shift-2","neutral"),outline:a=>`1px solid ${oe(a,"border-strong","neutral")}`,color:a=>oe(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","warning")}`}}}}import{toState as fl}from"@domphy/core";import{themeColor as Ko,themeDensity as Wo,themeSize as yl,themeSpacing as jo}from"@domphy/theme";function zp(r={}){var o;let n=fl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>yl(e,"inherit"),color:e=>Ko(e,"text",n.get(e)),backgroundColor:e=>Ko(e,"inherit",n.get(e)),paddingBlock:e=>jo(Wo(e)*.5),paddingInline:e=>jo(Wo(e)*1.5),borderRadius:e=>jo(Wo(e)*1),outline:e=>`1px solid ${Ko(e,"border-strong",n.get(e))}`}}}import{toState as ir}from"@domphy/core";import{themeColor as qo,themeSize as bl,themeSpacing as Sl}from"@domphy/theme";function _p(r={}){var e,s;let n=ir((e=r.color)!=null?e:"neutral","color"),o=ir((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Sl(2),fontSize:t=>bl(t,"inherit"),color:t=>qo(t,"text",n.get(t)),cursor:"pointer","&:focus-within":{color:t=>qo(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>qo(t,"muted","neutral")}}}}import{toState as lr}from"@domphy/core";import{themeColor as wt,themeSize as vl,themeSpacing as Cl}from"@domphy/theme";function Hp(r={}){var e,s;let n=lr((e=r.color)!=null?e:"primary","color"),o=lr((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>vl(t,"inherit"),backgroundColor:t=>wt(t),color:t=>wt(t,"shift-13",n.get(t)),textDecoration:"none","&:visited":{color:t=>wt(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>wt(t,"shift-14",n.get(t)),textDecoration:"underline"},borderRadius:Cl(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>wt(t,"muted","neutral")}}}}import{toState as xl}from"@domphy/core";import{themeColor as N,themeDensity as Ie,themeSize as sr,themeSpacing as Le}from"@domphy/theme";var El={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},kl={small:.5,medium:1,large:1.5};function Yp(r={}){var i,m,u;let n=(i=r.variant)!=null?i:"outline",o=xl((m=r.color)!=null?m:n==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=et[e];if(n==="ghost"){let l=kl[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>sr(c,s),textDecoration:"none",paddingBlock:c=>Le(Ie(c)*l),paddingInline:c=>Le(Ie(c)*l),borderRadius:c=>Le(Ie(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>Le(Ie(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>N(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>N(c,"text",o.get(c)),backgroundColor:c=>N(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>N(c,"text",o.get(c)),backgroundColor:c=>N(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>S(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>N(c,"border-strong","neutral")}}}}let t=n==="solid",a=El[e];return O(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>sr(l,s),textDecoration:"none",paddingBlock:l=>Le(Ie(l)*a.block),paddingInline:l=>Le(Ie(l)*a.inline),borderRadius:l=>Le(Ie(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>Le(Ie(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${N(l,"border-strong",o.get(l))}`,color:l=>t?N(l,"shift-0","neutral"):N(l,"shift-13",o.get(l)),backgroundColor:l=>t?N(l,"shift-13",o.get(l)):N(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?N(l,"shift-0","neutral"):N(l,"shift-14",o.get(l)),backgroundColor:l=>t?N(l,"shift-14",o.get(l)):N(l,"hover",o.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?N(l,"shift-15",o.get(l)):N(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>N(l,"shift-2","neutral"),outline:l=>`1px solid ${N(l,"border-strong","neutral")}`,color:l=>N(l,"muted","neutral")}}})}import{toState as wl}from"@domphy/core";import{themeColor as Oe,themeDensity as Ue,themeSize as cr,themeSpacing as Xe}from"@domphy/theme";function Qp(r={}){var o;let n=(o=r.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Oe(e,"inherit",n),color:e=>Oe(e,"text",n)}}}function eh(r={}){let{dense:n=!1}=r;return{style:{display:"flex",alignItems:"center",gap:o=>Xe(Ue(o)*2),paddingBlock:o=>Xe(n?1:Ue(o)*2),paddingInline:o=>Xe(Ue(o)*3),fontSize:o=>cr(o,"inherit"),color:o=>Oe(o,"text")}}}function th(r={}){var s,t;let n=wl((s=r.color)!=null?s:"neutral","color"),o=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>Xe(Ue(a)*2),paddingBlock:a=>Xe(e?1:Ue(a)*2),paddingInline:a=>Xe(Ue(a)*3),fontSize:a=>cr(a,"inherit"),color:a=>Oe(a,"text",n.get(a)),borderRadius:a=>Xe(Ue(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>Oe(a,"hover",n.get(a))},"&:active:not([disabled])":{backgroundColor:a=>Oe(a,"increase-2",n.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Oe(a,"shift-3",o),color:a=>Oe(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>S(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Tl}from"@domphy/core";import{themeColor as mr,themeDensity as Yo,themeSize as Dl,themeSpacing as Go}from"@domphy/theme";function ah(r={}){var o;let n=Tl((o=r.accentColor)!=null?o:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>Dl(e,"inherit"),color:e=>mr(e,"text",n.get(e)),backgroundColor:e=>mr(e,"inherit",n.get(e)),height:e=>Go(Yo(e)*6),borderRadius:e=>Go(Yo(e)*1),paddingInline:e=>Go(Yo(e)*1.5)}}}import{behavior as Pl,toState as Il}from"@domphy/core";import{themeColor as ze,themeDensity as Tt,themeSize as ur,themeSpacing as st}from"@domphy/theme";function uh(r={items:[]}){var l;let{items:n=[],selectable:o=!0,color:e="neutral",accentColor:s="primary"}=r,t=Il((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let p=c.nodeId;return d.items.map((y,T)=>{var f;let v=(f=y.key)!=null?f:T;return O(E({button:typeof y.label=="string"?[{span:y.label}]:[y.label],_key:v,type:"button",id:`menuitem${p}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=y.onClick)==null||b.call(y)},onKeyDown:b=>{var R;let x=b.key;if(x==="Enter"||x===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(x))return;b.preventDefault();let h=d.items.map((j,K)=>{var _;return(_=j.key)!=null?_:K}),D=h.indexOf(v),k=D;x==="ArrowDown"?k=(D+1)%h.length:x==="ArrowUp"?k=(D-1+h.length)%h.length:x==="Home"?k=0:x==="End"&&(k=h.length-1),(R=document.getElementById(`menuitem${p}${h[k]}`))==null||R.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:st(2),width:"100%",fontSize:b=>ur(b,"inherit"),height:b=>st(6+Tt(b)*2),paddingInline:b=>st(Tt(b)*3),border:"none",outline:"none",color:b=>ze(b,"text",d.color),backgroundColor:b=>ze(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>ze(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>ze(b,"shift-3",d.accentColor),color:b=>ze(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let p=d;return{update(y){y.activeKey!==p.activeKey&&!y.activeKeyIsCallerOwned&&y.activeKey.set(p.activeKey.get()),p=y,p.items.length!==0&&c.children.update(i(c,p))}}},u={items:n,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:s};return O(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{n.length!==0&&(d[c.tagName]=i(c,u))}},Pl("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>st(Tt(c)*2),paddingInline:c=>st(Tt(c)*2),fontSize:c=>ur(c,"inherit"),backgroundColor:c=>ze(c,"inherit",e),color:c=>ze(c,"text",e),borderRadius:c=>st(Tt(c)*2),outline:c=>`1px solid ${ze(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:V("medium")}})}import{behavior as Ll}from"@domphy/core";var dr=r=>!!r&&typeof r.get=="function"&&r._isState===!0,pe=r=>{let n={},o=[];for(let e in r){let s=r[e];e==="x"?o.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?o.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?o.push(`scale(${s})`):e==="rotate"?o.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):n[e]=s}return o.length&&(n.transform=o.join(" ")),n};function Uo(r={}){var n,o,e,s;return{duration:(n=r.duration)!=null?n:300,delay:(o=r.delay)!=null?o:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Xo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Ol(r,n){let o=r.domElement,e=n,s,t=i=>{s==null||s(),s=void 0,!(!o||!dr(i))&&(s=i.addListener(m=>{Xo()?Object.assign(o.style,pe(m)):typeof o.animate=="function"&&o.animate([pe(m)],Uo(e.transition))}))},a=(i,m)=>{if(!o)return;let u=dr(i.animate)?i.animate.get():i.animate;if(Xo()){u?Object.assign(o.style,pe(u)):m==="enter"&&i.initial&&Object.assign(o.style,pe(i.initial));return}if(typeof o.animate=="function")if(u){let l=m==="enter"&&i.initial?[pe(i.initial),pe(u)]:[pe(u)];o.animate(l,Uo(i.transition))}else m==="enter"&&i.initial&&Object.assign(o.style,pe(i.initial))};return a(n,"enter"),t(n.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function gh(r={}){return O(E({},Ll("motion",(n,o)=>Ol(n,o),r)),{_onBeforeRemove:(n,o)=>{var a,i;let e=n.domElement,s=n.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return o();if(Xo())return Object.assign(e.style,pe(t)),o();e.animate([pe(t)],Uo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(o,o)}})}import{toState as zl}from"@domphy/core";import{themeColor as pr,themeSize as Vl,themeSpacing as Rl}from"@domphy/theme";function vh(r={}){var o;let n=zl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Vl(e,"inherit"),backgroundColor:e=>pr(e),color:e=>pr(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:Rl(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as Ml,isState as _l,toState as gr}from"@domphy/core";import{themeColor as Ze,themeDensity as Dt,themeSize as Nl,themeSpacing as ct}from"@domphy/theme";function $l(r,n){if(n<=7)return Array.from({length:n},(t,a)=>a+1);let o=[1];r>3&&o.push("...");let e=Math.max(2,r-1),s=Math.min(n-1,r+1);for(let t=e;t<=s;t++)o.push(t);return r<n-2&&o.push("..."),o.push(n),o}function Bl(r,n,o,e){if(_l(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=gr(o!=null?o:e),r.setMetadata(n,s)),s}function hr(r,n){let o=r.getMetadata("paginationTotal");return o||(o=gr(n),r.setMetadata("paginationTotal",o)),o}function wh(r){let{total:n,color:o="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>ct(6+Dt(a)*2),height:a=>ct(6+Dt(a)*2),paddingInline:a=>ct(Dt(a)*2),borderRadius:a=>ct(Dt(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>Nl(a,"inherit"),backgroundColor:"transparent",color:a=>Ze(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>Ze(a,"shift-13",o),backgroundColor:a=>Ze(a,"hover",o)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=O(E({},s),{backgroundColor:a=>Ze(a,"shift-13",e),color:a=>Ze(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>Ze(a,"shift-13",e)}});return O(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=Bl(a,"paginationPage",r.value,1),m=hr(a,n),u={div:l=>{let c=i.get(l),d=m.get(l),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let y=0;for(let T of $l(c,d))if(T==="...")p.push({span:"\u2026",_key:`ellipsis-${y++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>ct(Dt(v)*2),color:v=>Ze(v,"shift-7",o)}});else{let v=T===c;p.push({button:String(T),_key:`page-${T}`,type:"button",ariaLabel:`Page ${T}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(T),style:v?t:s})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),p},style:{display:"flex",alignItems:"center",gap:ct(1)}};a.children.insert(u)}},Ml("pagination-total",a=>({update(i){hr(a,i.total).set(i.total)}}),{total:n})),{style:{display:"inline-flex"}})}import{toState as Al}from"@domphy/core";import{themeColor as Hl,themeDensity as Fl,themeSpacing as Kl}from"@domphy/theme";function Lh(r={}){var s;let{padding:n=4,divider:o=!1}=r,e=Al((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>Kl(Fl(t)*n)},o?{borderBottom:t=>`1px solid ${Hl(t,"border",e.get(t))}`}:{})}}import{toState as Wl}from"@domphy/core";import{themeColor as jl,themeSize as ql}from"@domphy/theme";function Mh(r={}){var o;let n=Wl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>ql(e,"inherit"),color:e=>jl(e,"text",n.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Yl,toState as fr}from"@domphy/core";import{themeColor as Zo,themeDensity as Gl,themeSpacing as Ul}from"@domphy/theme";function Hh(r){var c;let{open:n=!1,placement:o="bottom",openOn:e="click"}=r,s=fr(n),t=fr(o),{show:a,hide:i,anchorPartial:m}=me({kind:"popover",open:s,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>Zo(d,"inherit"),color:d=>Zo(d,"text"),borderRadius:d=>Ul(Gl(d)*2),outline:d=>`1px solid ${Zo(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),Yl(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?X("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&i(p),onClick:(d,p)=>{e==="click"&&(s.get()?i(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&s.get()&&i(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let y=d.relatedTarget,v=p.getRoot().domElement.querySelector(`#${X("popover",p)}`);y&&(v!=null&&v.contains(y))||i(p)}}),m}import{toState as Xl}from"@domphy/core";import{themeColor as to,themeSize as Zl,themeSpacing as Jo}from"@domphy/theme";function yr(r={}){let{placement:n="bottom-end",color:o="neutral",sideOffset:e=Jo(6),bordered:s=!0}=r,t=Xl(n),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>Zl(l),backgroundColor:l=>to(l),color:l=>to(l,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:Jo(1.5),height:Jo(1.5),backgroundColor:l=>to(l,"inherit",o),borderWidth:s?"1px":0,borderColor:l=>to(l,"border-strong",o),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",p=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${p}) rotate(45deg)`}}}}}import{toState as Jl}from"@domphy/core";import{themeColor as br,themeDensity as Qo,themeSize as Ql,themeSpacing as en}from"@domphy/theme";function Gh(r={}){var o;let n=Jl((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Ql(e,"inherit"),color:e=>br(e,"text",n.get(e)),backgroundColor:e=>br(e,"inherit",n.get(e)),border:"none",paddingBlock:e=>en(Qo(e)*2),paddingInline:e=>en(Qo(e)*3),borderRadius:e=>en(Qo(e)*2)}}}import{toState as Sr}from"@domphy/core";import{themeColor as oo,themeSpacing as no}from"@domphy/theme";function Jh(r={}){var e,s;let n=Sr((e=r.color)!=null?e:"neutral","color"),o=Sr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:no(2),border:0,borderRadius:no(999),overflow:"hidden",backgroundColor:t=>oo(t,"inherit",n.get(t)),color:t=>oo(t,"text",n.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>oo(t,"inherit",n.get(t)),borderRadius:no(999)},"&::-webkit-progress-value":{backgroundColor:t=>oo(t,"shift-9",o.get(t)),borderRadius:no(999),transition:"width 220ms ease"}}}}import{behavior as es,isState as ts,rawHtml as os,toState as vr}from"@domphy/core";import{themeColor as ns,themeSize as rs,themeSpacing as xr}from"@domphy/theme";var as='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Cr(r,n){var o,e,s;r.onChange=n.onChange,r.readOnly=(o=n.readOnly)!=null?o:!1,r.max=(e=n.max)!=null?e:5,r.color=(s=n.color)!=null?s:"warning",ts(n.value)?n.value!==r.valueState&&r.valueState.set(n.value.get()):n.value!==void 0&&r.valueState.set(n.value)}function ls(r,n,o,e){let s=a=>{let i=e.get(a);return i>0?i:o.valueState.get(a)},t={button:a=>os(n<=s(a)?as:is),_key:n,type:"button",ariaLabel:`${n} star${n>1?"s":""}`,onClick:()=>{var i;if(o.readOnly)return;let a=n===o.valueState.get()?0:n;o.valueState.set(a),(i=o.onChange)==null||i.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(n)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(o.readOnly)return;let i=o.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(o.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;o.valueState.set(m),(l=o.onChange)==null||l.call(o,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:xr(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,o.color)}}};r.children.insert(t)}function tn(r,n,o){let e=r.children.items;for(;e.length>n.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=n.max;s++)ls(r,s,n,o)}function ng(r={}){var e,s,t,a,i,m,u;let n={valueState:vr((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},o=vr(0);return O(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:xr(.5),fontSize:l=>rs(l,"increase-1"),cursor:n.readOnly?"default":"pointer",color:l=>ns(l,"muted",n.color)}},es("rating",(l,c)=>(Cr(n,c),tn(l,n,o),{update(d){Cr(n,d),tn(l,n,o)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{tn(l,n,o)}})}import{toState as on}from"@domphy/core";import{themeColor as nn,themeSpacing as Er}from"@domphy/theme";function sg(r={}){var m,u,l;let{size:n=16,thickness:o=.25}=r,e=on((m=r.value)!=null?m:0,"value"),s=on((u=r.color)!=null?u:"primary","color"),t=on((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-o)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Er(n),height:Er(n),borderRadius:"50%",color:c=>nn(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${nn(c,"shift-9",s.get(c))} ${e.get(c)}%, ${nn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}import{themeDensity as ss,themeSpacing as cs}from"@domphy/theme";function kr(r={}){let{gap:n=4,align:o="center",justify:e,wrap:s=!1}=r;return{style:E(E({display:"flex",alignItems:o,gap:t=>cs(ss(t)*n)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}import{toState as ms}from"@domphy/core";import{themeColor as ro,themeSpacing as ao}from"@domphy/theme";function gg(r={}){var o;let n=ms((o=r.color)!=null?o:"neutral","color");return{style:{overflow:"auto",color:e=>ro(e,"text",n.get(e)),"&::-webkit-scrollbar":{width:ao(2),height:ao(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>ro(e,"shift-5",n.get(e)),borderRadius:ao(999),border:`${ao(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>ro(e,"shift-7",n.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${ro(e,"shift-5",n.get(e))} transparent`}}}import{behavior as us,isState as ds,toState as Dr}from"@domphy/core";import{themeColor as Je,themeSize as ps,themeSpacing as Ve}from"@domphy/theme";function wr(r,n,o,e){if(ds(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Dr(o!=null?o:e),r.setMetadata(n,s)),s}function hs(r,n,o,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=n.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(o),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Tr(r,n,o,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>n.get(u)===a,tabIndex:u=>{var c,d;let l=n.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>n.set(a),onKeyDown:u=>hs(u,r,a,n),style:{cursor:"pointer",fontSize:u=>ps(u,"inherit"),height:Ve(6),paddingBlock:Ve(1),paddingInline:Ve(3),border:"none",borderRadius:Ve(10),color:u=>Je(u,"text",o),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Je(u,"shift-3",o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Je(u,"increase-2",o)},"&[aria-checked=true]":{backgroundColor:u=>Je(u,"shift-0",e),color:u=>Je(u,"shift-10",e),boxShadow:V("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${V("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Cg(r={items:[]}){var t,a,i;let{items:n=[],color:o="neutral",accentColor:e="primary"}=r,s={items:n,color:o,accentColor:e};return O(E({role:"radiogroup",_context:{segmented:{value:Dr((i=(a=r.value)!=null?a:(t=n[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=wr(m,"segmentedValue",r.value,(d=(c=n[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Tr(n,l,o,e)}},us("segmented-items",m=>({update(u){var c,d;let l=wr(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Tr(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:Ve(1),paddingInline:Ve(1),gap:Ve(.5),borderRadius:Ve(10),backgroundColor:m=>Je(m,"inherit",o),color:m=>Je(m,"text",o)}})}import{themeColor as Ce,themeColorToken as gs,themeDensity as Pt,themeSize as fs,themeSpacing as Re}from"@domphy/theme";function Tg(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>fs(e,"inherit"),lineHeight:"inherit",color:e=>Ce(e,"text",n),backgroundColor:e=>Ce(e,"inherit",n),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Ce(e,"border-strong",n)}`,borderRadius:e=>Re(Pt(e)*1.5),paddingBlock:e=>Re(Pt(e)*1),paddingLeft:e=>Re(Pt(e)*3),paddingRight:e=>Re(Pt(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${gs(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${Re(2)} center`,backgroundSize:`${Re(2.5)} ${Re(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>Re(6+Pt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Ce(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>S(e,o)},"& optgroup":{color:e=>Ce(e,"shift-11",n)},"& option[disabled]":{color:e=>Ce(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Ce(e,"muted","neutral"),outline:e=>`1px solid ${Ce(e,"border-strong","neutral")}`,backgroundColor:e=>Ce(e,"shift-2","neutral")}}}}import{behavior as ys,merge as Pr,toState as rn}from"@domphy/core";import{themeColor as mt,themeDensity as io,themeSize as bs,themeSpacing as ut}from"@domphy/theme";var Ss=1e3;function vs(r){let n=r.getMetadata("selectBoxTypeahead");return n||(n={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",n)),n}var Ir=(r,n)=>r.trim().toLowerCase().startsWith(n);function Cs(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(n=>n.getAttribute("aria-disabled")!=="true"&&!n.hasAttribute("disabled")):[]}function Rg(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=rn(r.value),i=rn(s),{show:m,hide:u,anchorPartial:l}=me({kind:"selectBox",open:i,placement:rn(o),content:r.content}),c={onClick:(f,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:f=>mt(f,"inherit"),color:f=>mt(f,"text"),borderRadius:f=>ut(io(f)*2),outline:f=>`1px solid ${mt(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};Pr(r.content,c);let d=f=>({div:b=>{let x=f.state.get(b),h=Array.isArray(x)?x:[x];return f.options.filter(k=>h.includes(k.value)).map(k=>({span:k.label,$:[$t({color:f.color,removable:f.multiple})],_key:k.value,_onRemove:R=>{let j=f.state.get(),_=(Array.isArray(j)?j:[j]).filter(U=>U!==k.value);f.multiple?f.state.set(_):f.state.set(_[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:ut(1),flex:1}}),p=(f,b)=>({update(x){f.children.update([d(x)])}}),y=f=>i.get()?u(f):m(f),T=(f,b)=>{var K,_,U,B;let x=vs(b);x.timer&&clearTimeout(x.timer),x.buffer+=f.toLowerCase(),x.timer=setTimeout(()=>{x.buffer=""},Ss);let h=x.buffer.length>1&&new Set(x.buffer).size===1,D=h?x.buffer[0]:x.buffer;if(i.get()){let q=b.getRoot().domElement,ne=(K=q==null?void 0:q.querySelector(`#${X("selectBox",b)}`))!=null?K:null,re=Cs(ne).filter(Be=>{var I;return Ir((I=Be.textContent)!=null?I:"",D)});if(!re.length)return;let $e=(U=(_=b.domElement)==null?void 0:_.ownerDocument)==null?void 0:U.activeElement,fe=h&&$e?re.indexOf($e):-1,le=re[(fe+1)%re.length];le.focus(),(B=le.scrollIntoView)==null||B.call(le,{block:"nearest"});return}if(t)return;let k=n.filter(q=>Ir(q.label,D));if(!k.length)return;let R=h?k.findIndex(q=>q.value===a.get()):-1,j=k[(R+1)%k.length];a.set(j.value)},v=O(E({_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(f,b)=>{b[f.tagName]=[d({options:n,multiple:t,color:e,state:a})]}},ys("selectBoxInner",p,{options:n,multiple:t,color:e,state:a})),{onClick:(f,b)=>y(b),tabindex:0,role:"button",ariaExpanded:f=>i.get(f),ariaHaspopup:"listbox",ariaControls:f=>f!=null&&f.elementNode?X("selectBox",f.elementNode):void 0,onKeyDown:(f,b)=>{let x=f.key;if(x==="Escape"){u(b);return}if(x==="Enter"||x===" "){f.preventDefault(),y(b);return}if(x==="ArrowDown"&&!i.get()){f.preventDefault(),m(b);return}let h=f;x.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&T(x,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>ut(6+io(f)*2),minWidth:ut(32),outlineOffset:"-1px",outline:f=>`1px solid ${mt(f,"border-strong","neutral")}`,paddingInline:f=>ut(io(f)*2),borderRadius:f=>ut(io(f)*1.5),fontSize:f=>bs(f,"inherit"),color:f=>mt(f,"text",e),backgroundColor:f=>mt(f,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>S(f,e)}}});return Pr(l,v),l}import{themeColor as It,themeDensity as Lr,themeSize as xs,themeSpacing as Or}from"@domphy/theme";function Bg(r={}){let{accentColor:n="primary",color:o="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>xs(t,"inherit"),height:t=>Or(6+Lr(t)*2),paddingInline:t=>Or(Lr(t)*3),border:"none",outline:"none",color:t=>It(t,"text",o),backgroundColor:t=>It(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>It(t,"hover",o)},"&[aria-selected=true]":{backgroundColor:t=>It(t,"shift-6",n),color:t=>It(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n)}}}}import{toState as Es}from"@domphy/core";import{themeColor as zr,themeDensity as Vr,themeSize as ks,themeSpacing as Rr}from"@domphy/theme";function Kg(r={}){var a;let{color:n="neutral",multiple:o=!1}=r,e=Es((a=r.value)!=null?a:o?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,_context:{select:{value:e,multiple:o}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>Rr(Vr(i)*2),paddingInline:i=>Rr(Vr(i)*2),fontSize:i=>ks(i,"inherit"),backgroundColor:i=>zr(i,"inherit",n),color:i=>zr(i,"text",n)}}}import{hashString as ws,toState as Ts}from"@domphy/core";import{themeColor as Lt,themeSize as Ds,themeSpacing as Mr}from"@domphy/theme";function Yg(r={}){var s;let n=Ts((s=r.color)!=null?s:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=ws(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>Ds(t),color:t=>Lt(t,"text",n.get(t)),height:Mr(6),display:"block",borderRadius:Mr(1),backgroundColor:t=>Lt(t,"inherit",n.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Lt(t,"inherit",n.get(t))} 0%, ${Lt(t,"shift-2",n.get(t))} 50%, ${Lt(t,"inherit",n.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}import{toState as Ps}from"@domphy/core";import{themeColor as Is,themeSize as Ls}from"@domphy/theme";function Zg(r={}){var o;let n=Ps((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>Ls(e,"inherit"),color:e=>Is(e,"shift-10",n.get(e))}}}import{hashString as Os,toState as zs}from"@domphy/core";import{themeColor as lo,themeSize as Vs,themeSpacing as an}from"@domphy/theme";var Nr={to:{transform:"rotate(360deg)"}},_r=Os(JSON.stringify(Nr));function tf(r={}){var o;let n=zs((o=r.color)!=null?o:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Vs(e),backgroundColor:e=>lo(e),color:e=>lo(e,"text",n.get(e)),display:"inline-block",margin:0,flexShrink:0,width:an(6),height:an(6),borderRadius:"50%",border:e=>`${an(.5)} solid ${lo(e,"border-strong",n.get(e))}`,borderTopColor:e=>lo(e,"shift-9",n.get(e)),boxSizing:"border-box",padding:0,animation:`${_r} 0.7s linear infinite`,[`@keyframes ${_r}`]:Nr}}}import{ElementNode as Rs,merge as Ms,toState as _s}from"@domphy/core";import{themeColor as so,themeSpacing as ln}from"@domphy/theme";function lf(r={}){let{direction:n="horizontal",defaultSize:o=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{Ms(a,{_context:{splitter:{direction:n,size:_s(o),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:n==="horizontal"?"row":"column",overflow:"hidden"}}}function Ns(r){let n=r.parent;if(!n)return!0;for(let o of n.children.items)if(o instanceof Rs&&o.getMetadata("splitterPanel"))return o===r;return!0}function sf(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal"?"width":"height",s=a=>{o.style[e]=`${Ns(r)?a:100-a}%`};s(n.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=n.size.addListener(s);r.addHook("Remove",()=>{var a;n.panelCount=Math.max(0,((a=n.panelCount)!=null?a:1)-1),t()})}}}function cf(){return{role:"separator",tabindex:0,_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal";o.style.cursor=e?"col-resize":"row-resize",o.setAttribute("aria-orientation",e?"vertical":"horizontal"),o.setAttribute("aria-valuemin",String(n.min)),o.setAttribute("aria-valuemax",String(n.max)),o.setAttribute("aria-valuenow",String(Math.round(n.size.get())));let s=n.size.addListener(m=>{o.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowLeft"&&(l=Math.max(n.size.get()-u,n.min)):m.key==="ArrowDown"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowUp"&&(l=Math.max(n.size.get()-u,n.min)),m.key==="Home"?l=n.min:m.key==="End"&&(l=n.max),l!==null&&(m.preventDefault(),n.size.set(l))},a=null,i=m=>{m.preventDefault();let u=o.parentElement,l=d=>{let p=u.getBoundingClientRect(),y=e?(d.clientX-p.left)/p.width*100:(d.clientY-p.top)/p.height*100;n.size.set(Math.min(Math.max(y,n.min),n.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};o.addEventListener("keydown",t),o.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),o.removeEventListener("keydown",t),o.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>so(r,"inherit"),color:r=>so(r,"text"),"&:hover":{backgroundColor:r=>so(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:ln(1),height:ln(1),borderRadius:ln(999),backgroundColor:r=>so(r,"shift-4")}}}}import{themeDensity as $s,themeSpacing as Bs}from"@domphy/theme";function df(r={}){let{gap:n=3,align:o}=r;return{style:E({display:"flex",flexDirection:"column",gap:e=>Bs($s(e)*n)},o?{alignItems:o}:{})}}import{behavior as As,isState as Hs,toState as Hr}from"@domphy/core";import{themeColor as F,themeSize as $r,themeSpacing as ie}from"@domphy/theme";function Br(r,n,o,e){if(Hs(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Hr(o!=null?o:e),r.setMetadata(n,s)),s}function Fs(r,n,o){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:ie(3),top:ie(6),bottom:`-${ie(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>F(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>F(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:ie(3),right:`calc(50% + ${ie(3)})`,left:`calc(-50% + ${ie(3)})`,height:"2px",backgroundColor:e=>F(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>F(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>F(e,"shift-9",o)}}}function Ar(r,n,o,e,s){let t=o==="vertical",a=Fs(o,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=n.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>n.get(c)===m?"step":void 0,style:O(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:ie(1),flex:t?"none":"1",fontSize:c=>$r(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ie(6),height:ie(6),borderRadius:ie(999),fontSize:c=>$r(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${F(c,"border-strong",e)}`,backgroundColor:c=>F(c,"inherit"),color:c=>F(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>F(c,"shift-9",s),borderColor:c=>F(c,"shift-9",s),color:c=>F(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${F(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>F(c,"shift-9",s),borderColor:c=>F(c,"shift-9",s),color:c=>F(c,"shift-0",s)},"&[data-status=pending]":{color:c=>F(c,"muted")},"&[data-status=active]":{color:c=>F(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>F(c,"text",e)}})}})}function yf(r={items:[]}){var a;let{items:n=[],direction:o="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:n,direction:o,color:e,accentColor:s};return O(E({_doctorDisable:"inline-typography",_context:{steps:{current:Hr((a=r.current)!=null?a:0),direction:o,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Br(i,"stepsCurrent",r.current,0);m[i.tagName]=Ar(n,u,o,e,s)}},As("steps-items",i=>({update(m){let u=Br(i,"stepsCurrent",r.current,0);i.children.update(Ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:ie(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as Ks}from"@domphy/core";import{themeColor as Fr,themeSize as Ws}from"@domphy/theme";function xf(r={}){var o;let n=Ks((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Ws(e,"inherit"),fontWeight:"bold",color:e=>Fr(e,"shift-11",n.get(e)),backgroundColor:e=>Fr(e)}}}import{toState as js}from"@domphy/core";import{themeColor as qs,themeSize as Ys}from"@domphy/theme";function Tf(r={}){var o;let n=js((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Ys(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>qs(e,"text",n.get(e))}}}import{toState as Gs}from"@domphy/core";import{themeColor as Us,themeSize as Xs}from"@domphy/theme";function Lf(r={}){var o;let n=Gs((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Xs(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Us(e,"text",n.get(e))}}}import{toState as Zs}from"@domphy/core";import{themeColor as he,themeDensity as dt,themeSize as Kr,themeSpacing as pt}from"@domphy/theme";function Rf(r={}){var o;let n=Zs((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>Kr(e,"inherit"),color:e=>he(e,"text",n.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"shift-10",n.get(e)),backgroundColor:e=>he(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"text",n.get(e)),boxShadow:e=>`inset 0 1px 0 ${he(e,"shift-3",n.get(e))}`,fontSize:e=>Kr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"shift-10",n.get(e)),backgroundColor:e=>he(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${he(e,"shift-4",n.get(e))}`},"& tr":{backgroundColor:e=>he(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>he(e,"hover")}}}}import{behavior as Js,isState as Qs,toState as ec}from"@domphy/core";import{themeColor as Me,themeDensity as co,themeSize as tc,themeSpacing as _e}from"@domphy/theme";function Wr(r,n,o,e){if(Qs(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=ec(o!=null?o:e),r.setMetadata(n,s)),s}function jr(r,n,o,e,s){let t=r.nodeId,i={div:n.map((u,l)=>{var p;let c=(p=u.key)!=null?p:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:y=>o.get(y)===c,tabIndex:y=>o.get(y)===c?0:-1,onClick:()=>o.set(c),onKeyDown:y=>{var h;let T=y.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;y.preventDefault();let v=n.map((D,k)=>{var R;return(R=D.key)!=null?R:k}),f=v.indexOf(c),b=f;T==="ArrowRight"?b=(f+1)%v.length:T==="ArrowLeft"?b=(f-1+v.length)%v.length:T==="Home"?b=0:T==="End"&&(b=v.length-1),o.set(v[b]);let x=y.target.closest("[role=tablist]");(h=x==null?void 0:x.querySelectorAll("[role=tab]")[b])==null||h.focus()},style:{cursor:"pointer",fontSize:y=>tc(y,"inherit"),height:y=>_e(6+co(y)*2),paddingInline:y=>_e(co(y)*4),border:"none",outline:"none",color:y=>Me(y,"shift-13"),backgroundColor:y=>Me(y,"inherit"),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:y=>Me(y,"shift-13"),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:y=>Me(y,"shift-13",e),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-8",e)}`},"&:focus-visible":{boxShadow:y=>S(y,e)},"&[aria-selected=true]:focus-visible":{boxShadow:y=>`${S(y,e)}, inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=n.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>_e(co(p)*2),paddingInline:p=>_e(co(p)*2)}}});return[i,...m]}function Bf(r={items:[]}){let{items:n=[],accentColor:o="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=Wr(t,"tabsActiveKey",r.activeKey,(u=(m=n[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=jr(t,n,i,o,e)}},Js("tabs-items",t=>({update(a){var m,u;let i=Wr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(jr(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:n,accentColor:o,color:e}))}import{behavior as oc,toState as qr}from"@domphy/core";import{themeColor as xe,themeDensity as sn,themeSize as nc,themeSpacing as mo}from"@domphy/theme";function jf(r={}){var s,t;let n=qr((s=r.color)!=null?s:"neutral","color"),o=qr((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return O(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},oc("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=()=>{u&&(m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return m.addEventListener("input",l),a.attributes.addListener("value",l),u&&l(),{resize:l,update(c){u=c.autoResize,a.attributes.addListener("value",l),u&&l()},destroy(){m.removeEventListener("input",l)}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>mo(sn(a)*2),paddingBlock:a=>mo(sn(a)*1.5),border:"none",borderRadius:a=>mo(sn(a)*1.5),fontSize:a=>nc(a,"inherit"),color:a=>xe(a,"text",n.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${xe(a,"border-strong",n.get(a))}`,backgroundColor:a=>xe(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>xe(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${xe(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,o.get(a))},"&:invalid":{outline:a=>`${mo(.5)} solid ${xe(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>xe(a,"muted","neutral"),outline:a=>`1px solid ${xe(a,"border-strong","neutral")}`,backgroundColor:a=>xe(a,"shift-2","neutral")}}})}import{toState as rc}from"@domphy/core";import{themeColor as Yr,themeDensity as cn,themeSpacing as uo}from"@domphy/theme";function Xf(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Zf(r={}){var t,a,i;let{last:n=!1}=r,o=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=rc((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>uo(cn(m)*2),paddingBottom:m=>n?"0":uo(cn(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:uo(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>Yr(m,"shift-8",s.get(m)?e:o),opacity:m=>s.get(m)?"1":"0.4"}},n?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>uo(cn(m)*-4),width:"2px",backgroundColor:m=>Yr(m,"shift-3",o)}})}}import{toState as ac}from"@domphy/core";import{themeColor as Gr,themeDensity as mn,themeSize as ic,themeSpacing as ht}from"@domphy/theme";function un(r){let n=r.getMetadata("toastOpen");return n||(n=ac(!1),r.setMetadata("toastOpen",n)),n}var Ur=r=>{let n=r==null?void 0:r.elementNode;return n?un(n).get(r):!1};function ny(r={}){let{position:n="top-center",color:o="neutral"}=r,e=n.startsWith("top"),s=n.endsWith("center"),t=n.endsWith("right"),a={div:[],id:`domphy-toast-${n}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:ht(4),zIndex:30,padding:ht(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${n}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:ht(32),pointerEvents:"auto",paddingBlock:i=>ht(mn(i)*2),paddingInline:i=>ht(mn(i)*4),borderRadius:i=>ht(mn(i)*2),fontSize:i=>ic(i,"inherit"),color:i=>Gr(i,"text",o),backgroundColor:i=>Gr(i,"inherit",o),boxShadow:V("medium"),opacity:i=>Number(Ur(i)),transform:i=>Ur(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>un(i).set(!0)),_onBeforeRemove:(i,m)=>{var f,b;let u=!1,l=null,c=!1,d=i.getRoot(),p=(b=(f=i.domElement)==null?void 0:f.parentElement)!=null?b:null,y=()=>{var h;if(c||!p||p.id!==`domphy-toast-${n}`||p.childElementCount>0)return;c=!0;let x=(h=d.children)==null?void 0:h.items.find(D=>D.domElement===p);x?d.children.remove(x):p.remove()},T=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),y())},v=x=>{x.propertyName==="transform"&&T()};i.domElement.addEventListener("transitionend",v),l=setTimeout(T,350),i.addHook("Remove",()=>{var x;l&&(clearTimeout(l),l=null),(x=i.domElement)==null||x.removeEventListener("transitionend",v),y()}),un(i).set(!1)}}}import{behavior as lc,isState as sc,toState as Jr}from"@domphy/core";import{themeColor as ge,themeSize as Qr,themeSpacing as Ne}from"@domphy/theme";function Xr(r,n,o,e){if(sc(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Jr(o!=null?o:e),r.setMetadata(n,s)),s}function cc(r,n){return Array.isArray(r)?r.includes(n):r===n}function mc(r,n,o,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=n.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),i=a.indexOf(o),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function Zr(r,n,o,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>cc(n.get(l),i),tabIndex:l=>{var d,p,y,T,v;let c=n.get(l);if(o){let b=(y=(p=(Array.isArray(c)?c:[])[0])!=null?p:(d=r[0])==null?void 0:d.key)!=null?y:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(T=r[0])==null?void 0:T.key)!=null?v:"0")?0:-1},onClick:()=>{let l=n.get();if(o){let c=Array.isArray(l)?[...l]:[];n.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else n.set(l===i?"":i)},onKeyDown:l=>mc(l,r,i,n,o),style:{cursor:"pointer",fontSize:l=>Qr(l,"inherit"),height:Ne(6),paddingBlock:Ne(1),paddingInline:Ne(2),border:"none",borderRadius:Ne(1.5),color:l=>ge(l,"shift-13",e),backgroundColor:l=>ge(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>ge(l,"shift-13",e),backgroundColor:l=>ge(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>ge(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>ge(l,"shift-3",s),color:l=>ge(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function sy(r={items:[]}){var a;let{items:n=[],multiple:o=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:n,multiple:o,color:e,accentColor:s};return O(E({role:"group",_context:{toggleGroup:{value:Jr((a=r.value)!=null?a:o?[]:""),multiple:o}},_onSchedule:(i,m)=>{let u=Xr(i,"toggleGroupValue",r.value,o?[]:"");m[i.tagName]=Zr(n,u,o,e,s)}},lc("toggle-items",i=>({update(m){let u=Xr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(Zr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:Ne(1),paddingInline:Ne(1),gap:Ne(1),borderRadius:Ne(2),fontSize:i=>Qr(i,"inherit"),backgroundColor:i=>ge(i,"inherit",e),color:i=>ge(i,"text",e),outline:i=>`1px solid ${ge(i,"border",e)}`,outlineOffset:"-1px"}})}function dy(r={}){return kr({gap:r.gap})}function py(){return{div:null,style:{flex:"1 1 0"}}}import{merge as uc,toState as ea}from"@domphy/core";import{themeColor as ta,themeDensity as dn,themeSize as dc,themeSpacing as pn}from"@domphy/theme";function vy(r={}){let{open:n=!1,placement:o="top",content:e="Tooltip Content"}=r,s=ea(o),t=ea(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=me({kind:"tooltip",open:n,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>pn(dn(d)*1),paddingInline:d=>pn(dn(d)*3),borderRadius:d=>pn(dn(d)*1.5),color:d=>ta(d,"text"),backgroundColor:d=>ta(d),fontSize:d=>dc(d,"inherit"),boxShadow:V("low")},$:[yr({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),uc(u,{ariaDescribedby:d=>d!=null&&d.elementNode?X("tooltip",d.elementNode):void 0,onMouseEnter:(d,p)=>i(p),onMouseLeave:(d,p)=>m(p),onFocus:(d,p)=>i(p),onBlur:(d,p)=>m(p),onKeyDown:(d,p)=>d.key==="Escape"&&m(p)}),u}import{ElementNode as oa}from"@domphy/core";function na(r,n){return r.key!==void 0&&r.key!==null?String(r.key):`index-${n}`}function Ey(r={}){let{duration:n=300,delay:o=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof oa))return;let l=m.domElement;l&&e.set(na(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof oa))return;let l=m.domElement;if(!l)return;let c=na(m,u),d=e.get(c);if(!d)return;let p=l.getBoundingClientRect(),y=d.left-p.left,T=d.top-p.top;if(Math.abs(y)<.5&&Math.abs(T)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${y}px, ${T}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${n}ms ease ${o}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let f=!1,b=null,x=()=>{f||(f=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h),l.style.transition="",l.style.transform="")},h=k=>{k.propertyName==="transform"&&x()};s.set(l,()=>{f=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h)}),l.addEventListener("transitionend",h),b=setTimeout(x,n+o+34),t.add(b)}),e.clear()}}}import{toState as pc}from"@domphy/core";import{themeColor as ra,themeSize as hc,themeSpacing as gc}from"@domphy/theme";function Dy(r={}){var o;let n=pc((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>hc(e,"inherit"),backgroundColor:e=>ra(e),color:e=>ra(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:gc(3),listStyleType:"disc",listStylePosition:"outside"}}}function Iy(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}export{Sc as abbreviation,Tc as accordion,Lc as alert,Rc as avatar,$c as badge,Fc as blockquote,qc as breadcrumb,Zc as breadcrumbEllipsis,mm as button,In as buttonGhost,fm as buttonSwitch,xm as card,Tm as code,Km as combobox,Um as command,Zm as commandItem,Xm as commandSearch,ru as datePicker,cu as descriptionList,hu as details,Cu as dialog,Tu as divider,zu as drawer,V as elevation,Nu as emphasis,Hu as empty,Ku as errorBoundary,Uu as fab,Qu as figure,S as focusRing,nd as formGroup,id as grid,ud as heading,gd as horizontalRule,Sd as icon,Ed as image,Pd as inputCheckbox,Vd as inputColor,$d as inputDateTime,Kd as inputFile,Gd as inputNumber,Zd as inputOTP,op as inputPassword,sp as inputRadio,pp as inputRange,bp as inputSearch,Ep as inputSwitch,Pp as inputText,zp as keyboard,_p as label,Hp as link,Yp as linkButton,Qp as list,eh as listItem,th as listItemButton,ah as mark,uh as menu,gh as motion,vh as orderedList,wh as pagination,Lh as panelSection,Mh as paragraph,Hh as popover,yr as popoverArrow,Gh as preformated,Jh as progress,ng as rating,sg as ringProgress,kr as row,gg as scrollArea,Cg as segmented,Tg as select,Rg as selectBox,Bg as selectItem,Kg as selectList,Yg as skeleton,Zg as small,tf as spinner,lf as splitter,cf as splitterHandle,sf as splitterPanel,df as stack,yf as steps,xf as strong,Tf as subscript,Lf as superscript,Rf as table,Bf as tabs,$t as tag,jf as textarea,Xf as timeline,Zf as timelineItem,ny as toast,sy as toggleGroup,dy as toolbar,py as toolbarSpacer,vy as tooltip,Ey as transitionGroup,Dy as unorderedList,Iy as visuallyHidden};
1
+ var ha=Object.defineProperty,ga=Object.defineProperties;var fa=Object.getOwnPropertyDescriptors;var Sn=Object.getOwnPropertySymbols;var ya=Object.prototype.hasOwnProperty,ba=Object.prototype.propertyIsEnumerable;var vn=(r,n,o)=>n in r?ha(r,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[n]=o,E=(r,n)=>{for(var o in n||(n={}))ya.call(n,o)&&vn(r,o,n[o]);if(Sn)for(var o of Sn(n))ba.call(n,o)&&vn(r,o,n[o]);return r},O=(r,n)=>ga(r,fa(n));import{toState as Cn}from"@domphy/core";import{themeColor as gt,themeSize as Sa,themeSpacing as va}from"@domphy/theme";function Sc(r={}){var e,s;let n=Cn((e=r.color)!=null?e:"neutral","color"),o=Cn((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Sa(t),backgroundColor:t=>gt(t),color:t=>gt(t,"shift-10",n.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>gt(t,"shift-7",n.get(t)),textUnderlineOffset:va(.72),cursor:"help","&:hover":{color:t=>gt(t,"shift-11",o.get(t)),textDecorationColor:t=>gt(t,"shift-9",o.get(t))}}}}import{toState as En}from"@domphy/core";import{themeColor as ho,themeDensity as Ca,themeSpacing as xa}from"@domphy/theme";import{themeColor as xn}from"@domphy/theme";function S(r,n="primary"){let o=xn(r,"surface"),e=xn(r,"shift-9",n);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function Tc(r={}){var s,t;let{type:n="single"}=r,o=En((s=r.color)!=null?s:"neutral","color"),e=En((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(n!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>xa(Ca(a)*1.5),outline:a=>`1px solid ${ho(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>ho(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${ho(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}import{toState as Ea}from"@domphy/core";import{themeColor as go,themeDensity as fo,themeSize as ka,themeSpacing as ft}from"@domphy/theme";function Lc(r={}){var o;let n=Ea((o=r.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:ft(3),paddingBlock:e=>ft(fo(e)*2),paddingInline:e=>ft(fo(e)*4),borderRadius:e=>ft(fo(e)*1.5),boxShadow:e=>`inset ${ft(1)} 0 0 0 ${go(e,"shift-8",n.get(e))}`,backgroundColor:e=>go(e,"inherit",n.get(e)),color:e=>go(e,"shift-10",n.get(e)),fontSize:e=>ka(e,"inherit")}}}import{toState as wa}from"@domphy/core";import{themeColor as yo,themeSize as Ta,themeSpacing as kn}from"@domphy/theme";function Rc(r={}){var o;let n=wa((o=r.color)!=null?o:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:kn(9),height:kn(9),fontSize:e=>Ta(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>yo(e,"inherit",n.get(e)),color:e=>yo(e,"shift-11",n.get(e)),boxShadow:e=>`0 0 0 1px ${yo(e,"border",n.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as wn}from"@domphy/core";import{themeColor as bo,themeDensity as So,themeSize as Da,themeSpacing as zt}from"@domphy/theme";function $c(r={}){var s;let{label:n=999}=r,o=wn(n),e=wn((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>zt(So(t)*1.5),minWidth:zt(5),height:t=>zt(So(t)*5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Da(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>zt(So(t)*999),backgroundColor:t=>bo(t,"shift-9",e.get(t)),color:t=>bo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${bo(t,"shift-0",e.get(t))}`}}}}import{toState as Pa}from"@domphy/core";import{themeColor as vo,themeDensity as Tn,themeSize as Ia,themeSpacing as Co}from"@domphy/theme";function Fc(r={}){var o;let n=Pa((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Ia(e,"inherit"),backgroundColor:e=>vo(e,"inherit",n.get(e)),color:e=>vo(e,"text",n.get(e)),boxShadow:e=>`inset ${Co(1)} 0 0 0 ${vo(e,"shift-4",n.get(e))}`,border:"none",paddingBlock:e=>Co(Tn(e)*2),paddingInline:e=>Co(Tn(e)*4),margin:0}}}import{toState as La}from"@domphy/core";import{themeColor as yt,themeSize as Oa,themeSpacing as Dn}from"@domphy/theme";function qc(r={}){var e;let{separator:n="/"}=r,o=La((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>Oa(s,"inherit"),gap:Dn(1),color:s=>yt(s,"text",o.get(s)),backgroundColor:s=>yt(s,"inherit",o.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>yt(s,"text",o.get(s))},"& > *:not(:last-child)::after":{content:`"${n}"`,color:s=>yt(s,"shift-4",o.get(s)),paddingInlineStart:Dn(1)},"& > [aria-current=page]":{color:s=>yt(s,"shift-10",o.get(s)),pointerEvents:"none"}}}}import{toState as za}from"@domphy/core";import{themeColor as xo,themeSize as Va,themeSpacing as Pn}from"@domphy/theme";function Zc(r={}){var o;let n=za((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Va(e,"inherit"),paddingInline:Pn(1),border:"none",background:"none",cursor:"pointer",color:e=>xo(e,"text",n.get(e)),borderRadius:Pn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>xo(e,"shift-10",n.get(e)),backgroundColor:e=>xo(e,"hover",n.get(e))},"&:focus-visible":{boxShadow:e=>S(e,n.get(e))}}}}import{toState as Na}from"@domphy/core";import{themeColor as G,themeDensity as Mt,themeSize as $a,themeSpacing as _t}from"@domphy/theme";var et={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as Ra}from"@domphy/core";import{themeColor as tt,themeDensity as Vt,themeSize as Ma,themeSpacing as Rt}from"@domphy/theme";var _a={small:.5,medium:1,large:1.5};function In(r={}){var s,t,a;let n=Ra((s=r.color)!=null?s:"neutral","color"),o=_a[(t=r.size)!=null?t:"medium"],e=et[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>Ma(i,e),paddingBlock:i=>Rt(Vt(i)*o),paddingInline:i=>Rt(Vt(i)*o),borderRadius:i=>Rt(Vt(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>Rt(Vt(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>tt(i,"text",n.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>tt(i,"text",n.get(i)),backgroundColor:i=>tt(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>tt(i,"text",n.get(i)),backgroundColor:i=>tt(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>S(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>tt(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ba={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function mm(r={}){var a,i,m,u;let n=(a=r.variant)!=null?a:"outline";if(n==="ghost")return In({color:r.color,size:r.size});let o=Na((i=r.color)!=null?i:"primary","color"),e=n==="solid",s=Ba[(m=r.size)!=null?m:"medium"],t=et[(u=r.size)!=null?u:"medium"];return O(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>$a(l,t),paddingBlock:l=>_t(Mt(l)*s.block),paddingInline:l=>_t(Mt(l)*s.inline),borderRadius:l=>_t(Mt(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>_t(Mt(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${G(l,"border-strong",o.get(l))}`,color:l=>e?G(l,"shift-0","neutral"):G(l,"shift-13",o.get(l)),backgroundColor:l=>e?G(l,"shift-13",o.get(l)):G(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?G(l,"shift-0","neutral"):G(l,"shift-14",o.get(l)),backgroundColor:l=>e?G(l,"shift-14",o.get(l)):G(l,"hover",o.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?G(l,"shift-15",o.get(l)):G(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>G(l,"shift-2","neutral"),outline:l=>`1px solid ${G(l,"border-strong","neutral")}`,color:l=>G(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Eo}from"@domphy/core";import{themeColor as Ae,themeSize as Aa,themeSpacing as ee}from"@domphy/theme";function fm(r={}){var t,a;let{checked:n=!1}=r,o=Eo(n),e=Eo((t=r.color)!=null?t:"neutral","color"),s=Eo((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>o.get(i),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>Aa(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${Ae(i,"border",e.get(i))}`,minWidth:ee(12),minHeight:ee(6),borderRadius:ee(999),paddingLeft:ee(7),paddingRight:ee(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>Ae(i,"inherit",e.get(i)),color:i=>Ae(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:ee(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:ee(5),height:ee(5),borderRadius:ee(999),color:i=>Ae(i,"text"),backgroundColor:i=>Ae(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>Ae(i,"increase-3",s.get(i)),outline:"none",color:i=>Ae(i,"decrease-2"),paddingLeft:ee(2),paddingRight:ee(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${ee(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Fa}from"@domphy/core";import{themeColor as He,themeDensity as ye,themeSpacing as ce}from"@domphy/theme";var Ha={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function V(r){return Ha[r]}function xm(r={}){var o;let n=Fa((o=r.color)!=null?o:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>ce(ye(e)*2),backgroundColor:e=>He(e,"inherit",n.get(e)),color:e=>He(e,"shift-10",n.get(e)),outline:e=>`1px solid ${He(e,"border-strong",n.get(e))}`,outlineOffset:"-1px",boxShadow:V("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>ce(ye(e)*2),paddingInline:e=>ce(ye(e)*4),fontWeight:"600",color:e=>He(e,"shift-11",n.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>ce(ye(e)*4),paddingBottom:e=>ce(ye(e)*2),color:e=>He(e,"text",n.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>ce(ye(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>ce(ye(e)*4),color:e=>He(e,"shift-10",n.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:ce(2),paddingBlock:e=>ce(ye(e)*2),paddingInline:e=>ce(ye(e)*4),borderTop:e=>`1px solid ${He(e,"border",n.get(e))}`}}}}import{toState as Ka}from"@domphy/core";import{themeColor as Ln,themeDensity as ko,themeSize as Wa,themeSpacing as wo}from"@domphy/theme";function Tm(r={}){var o;let n=Ka((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>Wa(e,"inherit"),color:e=>Ln(e,"text",n.get(e)),backgroundColor:e=>Ln(e,"inherit",n.get(e)),height:e=>wo(ko(e)*6),paddingInline:e=>wo(ko(e)*1.5),borderRadius:e=>wo(ko(e)*1)}}}import{behavior as ii,merge as To,toState as Bt}from"@domphy/core";import{themeColor as ke,themeDensity as At,themeSize as On,themeSpacing as we}from"@domphy/theme";import{behavior as ja,merge as qa,toState as Ya}from"@domphy/core";import{autoUpdate as Ga,computePosition as Ua,flip as Xa,offset as Za,shift as Ja}from"@domphy/floating";function X(r,n){return`domphy-${r}-${n.nodeId}`}function Qa(r,n){var $e,fe,le,Be;let{openState:o,placement:e,content:s,keepOpenOnContentHover:t}=n,{kind:a}=n,i=`floating:${a}`,m=null,u=null,l=null,c=null,d=!1,p=r.domElement,y=r.getRoot(),T=X(a,r),v={style:{position:"fixed",pointerEvents:"auto",visibility:I=>o.get(I)?"visible":"hidden"},onKeyDown:I=>{I.key==="Escape"&&k()},onMouseEnter:()=>t&&D(),onMouseLeave:()=>t&&k(),_onMount:I=>{var W;if(l=I.domElement,l.id||(l.id=T),p&&l&&!l.hasAttribute("data-theme")){let J=(W=p.closest("[data-theme]"))==null?void 0:W.getAttribute("data-theme");J&&l.setAttribute("data-theme",J)}},_portal:I=>{let W=p.closest("dialog");if(W){let se=W.querySelector(":scope > #domphy-floating");return se||(se=W.ownerDocument.createElement("div"),se.id="domphy-floating",Object.assign(se.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),W.appendChild(se)),se}let J=I.domElement.querySelector("#domphy-floating");if(!J){let se={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};J=I.children.insert(se).domElement}return J}},f=I=>qa(I,v);f(s);let b=()=>{d||(d=!0,c=y.children.insert(s),c._behaviorInstances.set(i,ne))},x=()=>{d&&(!l||!l.isConnected)&&(u==null||u(),u=null,c=null,l=null,d=!1),b(),p&&l&&(u==null||u(),u=Ga(p,l,()=>{Ua(p,l,{placement:e.get(),middleware:[Za(12),Xa(),Ja()],strategy:"fixed"}).then(({x:I,y:W,placement:J})=>{l&&(Object.assign(l.style,{left:`${I}px`,top:`${W}px`}),e.set(J))})}),o.set(!0))},h=()=>{u==null||u(),u=null,c&&(c.remove(),c=null),l=null,d=!1,o.set(!1)},D=()=>{m&&clearTimeout(m),m=setTimeout(x,100)},k=()=>{m&&clearTimeout(m),m=setTimeout(h,100)},R=I=>{if(!o.get()||!p||!l)return;let W=I.target;!p.contains(W)&&!l.contains(W)&&k()};($e=y.domElement)==null||$e.addEventListener("click",R);let j=I=>{I.key==="Escape"&&o.get()&&k()},K=(Be=(le=(fe=y.domElement)==null?void 0:fe.ownerDocument)!=null?le:y.domElement)!=null?Be:null;K==null||K.addEventListener("keydown",j);let _=I=>{I?d||x():d&&h()},U=o.addListener(_),B=!1,q=!1,ne,re=I=>{var W;I._behaviors=O(E({},(W=I._behaviors)!=null?W:{}),{[i]:{attach:()=>ne,props:{}}})};return ne={show:D,hide:k,panelId:T,update(I){if(!q&&(I.openState!==o&&(U(),o=I.openState,U=o.addListener(_),o.get()&&x()),e=I.placement,s=I.content,t=I.keepOpenOnContentHover,f(s),re(s),c)){q=!0;try{c.patch(s)}finally{q=!1}}},destroy(){var I;B||(B=!0,m&&clearTimeout(m),m=null,u==null||u(),u=null,c==null||c.remove(),c=null,l=null,d=!1,U(),U=()=>{},(I=y.domElement)==null||I.removeEventListener("click",R),K==null||K.removeEventListener("keydown",j))}},re(s),_(o.get()),ne}function me(r){let{kind:n,open:o=!1,placement:e}=r,s=Ya(o),t=`floating:${n}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},ja(t,Qa,{kind:n,openState:s,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}import{behavior as ei,ElementNode as ti,rawHtml as oi,toState as ni}from"@domphy/core";import{themeColor as Nt,themeDensity as Fe,themeSize as ri,themeSpacing as Ee}from"@domphy/theme";var ai='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function $t(r={}){var e;let{removable:n=!1}=r,o=ni((e=r.color)!=null?e:"neutral","color");return O(E({dataTone:"shift-2"},ei("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:oi(ai),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>Ee(Fe(l)*1),width:l=>Ee(Fe(l)*4),height:l=>Ee(Fe(l)*4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>Nt(l,"shift-4",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof ti&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:n})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>Ee(Fe(s)*6),paddingBlock:0,borderRadius:s=>Ee(Fe(s)*999),paddingInlineStart:s=>Ee(Fe(s)*2.5),paddingInlineEnd:s=>Ee(Fe(s)*(n?1:2.5)),gap:Ee(1.5),fontSize:s=>ri(s,"decrease-1"),backgroundColor:s=>Nt(s,"inherit",o.get(s)),color:s=>Nt(s,"text",o.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${Nt(s,"border-strong",o.get(s))}`}})}function Km(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=Bt(r.value),i=Bt(s),{show:m,hide:u,anchorPartial:l}=me({kind:"combobox",open:i,placement:Bt(o),content:r.content}),c={onClick:(h,D)=>!t&&u(D),dataTone:"shift-14",style:{backgroundColor:h=>ke(h,"inherit"),color:h=>ke(h,"text"),borderRadius:h=>we(At(h)*2),outline:h=>`1px solid ${ke(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};To(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:we(6),marginInlineStart:we(2),fontSize:h=>On(h,"inherit"),color:h=>ke(h,"text",e),backgroundColor:h=>ke(h,"inherit",e)},p=h=>{var D,k;return(k=(D=h==null?void 0:h.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:k.query},y=h=>{let D=h;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return h},T={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:h=>i.get(h),ariaControls:h=>h!=null&&h.elementNode?X("combobox",y(h.elementNode)):void 0},v=h=>h?(To(h,E({onFocus:(D,k)=>m(k),style:d,_key:"combobox-input"},T)),h):E({input:null,ariaLabel:"Filter options",onFocus:(D,k)=>m(k),value:D=>{var k,R;return(R=(k=p(D))==null?void 0:k.get(D))!=null?R:""},onInput:(D,k)=>{var R;(R=k.getBehavior("comboboxInner"))==null||R.query.set(D.target.value)},style:d,_key:"combobox-input"},T),f=h=>({div:D=>{i.get(D);let k=h.state.get(D),R=Array.isArray(k)?k:[k],K=h.options.filter(_=>R.includes(_.value)).map(_=>({span:_.label,$:[$t({color:h.color,removable:!0})],_key:_.value,_onRemove:U=>{let B=h.state.get(),ne=(Array.isArray(B)?B:[B]).filter(re=>re!==_.value);h.multiple?h.state.set(ne):h.state.set(ne[0])}}));return K.push(v(h.input)),K},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:we(1)}}),x=O(E({_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(h,D)=>{D[h.tagName]=[f({options:n,multiple:t,color:e,state:a,input:r.input})]}},ii("comboboxInner",(h,D)=>{let k=h.getMetadata("comboboxQuery");return k||(k=Bt(""),h.setMetadata("comboboxQuery",k)),{query:k,update(R){h.children.update([f(R)])}}},{options:n,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:we(32),outlineOffset:"-1px",outline:h=>`1px solid ${ke(h,"border-strong","neutral")}`,paddingBlock:h=>we(At(h)*1),paddingInline:h=>we(At(h)*1),borderRadius:h=>we(At(h)*1.5),fontSize:h=>On(h,"inherit"),color:h=>ke(h,"text",e),backgroundColor:h=>ke(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>S(h,e)}}});return To(l,x),l}import{merge as li,toState as si}from"@domphy/core";import{themeColor as be,themeDensity as Ht,themeSize as zn,themeSpacing as Ft}from"@domphy/theme";function Um(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,n)=>{li(n,{_context:{command:{query:si("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Xm(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>zn(e,"inherit"),paddingInline:e=>Ft(Ht(e)*3),paddingBlock:e=>Ft(Ht(e)*2),border:"none",borderBottom:e=>`1px solid ${be(e,"border",n)}`,outline:"none",color:e=>be(e,"shift-10",n),backgroundColor:e=>be(e,"inherit",n),"&::placeholder":{color:e=>be(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>be(e,"shift-6",o),boxShadow:e=>S(e,o)}}}}function Zm(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>zn(e,"inherit"),height:e=>Ft(6+Ht(e)*2),paddingInline:e=>Ft(Ht(e)*3),border:"none",outline:"none",color:e=>be(e,"shift-13",n),backgroundColor:e=>be(e,"inherit",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>be(e,"shift-13",n),backgroundColor:e=>be(e,"hover",n)},"&:focus-visible":{boxShadow:e=>S(e,o)}}}}import{behavior as ci,merge as mi,toState as ue}from"@domphy/core";import{themeColor as H,themeDensity as ui,themeSize as ot,themeSpacing as $}from"@domphy/theme";var A=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Ke=(r,n)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+n),Do=(r,n)=>new Date(r.getFullYear(),r.getMonth()+n,r.getDate()),bt=(r,n)=>!!r&&!!n&&r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,n)=>Ke(r,-((r.getDay()-n+7)%7));function di(r){var n,o;try{let e=new Intl.Locale(r),s=(o=(n=e.getWeekInfo)==null?void 0:n.call(e))!=null?o:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function pi(r,n){let o=n,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(o),{update(a){a.selectionIsCallerOwned||t(a.selection,o.selection),t(a.viewYear,o.viewYear),t(a.viewMonth,o.viewMonth),t(a.focused,o.focused),t(a.hovered,o.hovered),t(a.hour,o.hour),t(a.minute,o.minute),t(a.open,o.open),(a.selection!==o.selection||a.onChange!==o.onChange)&&s(a),o=a},destroy(){e==null||e(),e=null}}}function ru(r={}){var gn,fn,yn,bn;let{mode:n="single",time:o=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(gn=r.weekStartsOn)!=null?gn:di(a),l=ue((fn=r.accentColor)!=null?fn:"primary","accentColor"),c=ue((yn=r.placement)!=null?yn:"bottom-start"),d=ue((bn=r.value)!=null?bn:n==="range"?[null,null]:null),p=(()=>{let g=d.get(),C=n==="range"?g==null?void 0:g[0]:g;return C instanceof Date?C:new Date})(),y=ue(p.getFullYear(),"viewYear"),T=ue(p.getMonth(),"viewMonth"),v=ue(A(p),"focused"),f=ue(null,"hovered"),b=ue(p.getHours(),"hour"),x=ue(p.getMinutes(),"minute"),h=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),k=new Intl.DateTimeFormat(a,{weekday:"short"}),R=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=g=>g?h.format(g):"",K=g=>{if(i)return i(g);if(n==="range"){let[C,w]=g!=null?g:[null,null];return C?`${j(C)} \u2013 ${j(w)}`:""}return j(g)},_=Array.from({length:7},(g,C)=>k.format(new Date(2023,0,1+(C+u)%7))),U=g=>!!e&&A(g)<A(e)||!!s&&A(g)>A(s)||!!t&&t(g),B=g=>{if(!o)return A(g);let C=A(g);return C.setHours(b.get(),x.get(),0,0),C},q=(g,C)=>{var P;if(U(g))return;if(n==="single"){d.set(B(g)),o||Ot(C);return}let[w,L]=(P=d.get())!=null?P:[null,null];!w||w&&L?d.set([B(g),null]):A(g)<A(w)?(d.set([B(g),B(w)]),o||Ot(C)):(d.set([w,B(g)]),o||Ot(C))},ne=()=>{var g;if(o)if(n==="single"){let C=d.get();C&&d.set(B(C))}else{let[C,w]=(g=d.get())!=null?g:[null,null];d.set([C&&B(C),w&&B(w)])}},re=(g,C)=>{var Qe;if(n!=="range")return!1;let[w,L]=(Qe=d.get(C))!=null?Qe:[null,null],P=L!=null?L:f.get(C);if(!w||!P)return!1;let z=A(w)<=A(P)?w:P,Q=A(w)<=A(P)?P:w,Y=A(g);return Y>=A(z)&&Y<=A(Q)},$e=(g,C)=>{let w=d.get(C);if(n==="range"){let[L,P]=w!=null?w:[null,null];return bt(g,L)||bt(g,P)}return bt(g,w)},fe=g=>{y.set(g.getFullYear()),T.set(g.getMonth())},le=g=>{let C=Do(new Date(y.get(),T.get(),1),g);fe(C)},Be=g=>y.set(y.get()+g),I=g=>{var w;let C=(w=g==null?void 0:g.getRoot())==null?void 0:w.domElement;setTimeout(()=>{var L;(L=C==null?void 0:C.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},W=la(),J=ue(!1),{show:se,hide:Ot,anchorPartial:hn}=me({kind:"datePicker",open:J,placement:c,content:W}),aa=E({type:"text",readonly:!0,value:g=>K(d.get(g)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:g=>J.get(g),ariaControls:g=>g!=null&&g.elementNode?X("datePicker",g.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,C)=>{po(C)},onFocus:(g,C)=>{po(C)},onKeyDown:(g,C)=>{let w=g.key;(w==="ArrowDown"||w==="Enter")&&(g.preventDefault(),po(C))}},ci("datePicker",pi,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:y,viewMonth:T,focused:v,hovered:f,hour:b,minute:x,open:J,onChange:m}));function po(g){var w;let C=(w=ia())!=null?w:new Date;v.set(A(C)),fe(C),se(g),I(g)}function ia(){var C;let g=d.get();return n==="range"?(C=g==null?void 0:g[0])!=null?C:null:g!=null?g:null}return mi(hn,aa),hn;function la(){let g=(z,Q,Y)=>({button:z,type:"button",ariaLabel:Q,onClick:Y,style:hi()}),C={div:[g("\xAB","Previous year",()=>Be(-1)),g("\u2039","Previous month",()=>le(-1)),{div:z=>D.format(new Date(y.get(z),T.get(z),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:z=>ot(z)}},g("\u203A","Next month",()=>le(1)),g("\xBB","Next year",()=>Be(1))],style:{display:"flex",alignItems:"center",gap:$(1),marginBottom:$(2)}},w={div:_.map((z,Q)=>({div:z,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:Y=>ot(Y,"decrease-1"),fontWeight:"bold",color:Y=>H(Y,"shift-7"),paddingBlock:$(1)},_key:Q})),role:"row",style:Vn()},L={div:z=>sa(z),role:"grid",ariaLabel:"Calendar",onKeyDown:da,onMouseLeave:()=>n==="range"&&f.set(null),style:{display:"flex",flexDirection:"column",gap:$(.5)}},P=[C,w,L];return o&&P.push(ma()),P.push(ua()),{div:P,role:"dialog",ariaModal:"false",dataTone:"shift-14",style:{minWidth:$(70),padding:$(3),borderRadius:z=>$(ui(z)*2),backgroundColor:z=>H(z,"inherit"),color:z=>H(z,"text"),outline:z=>`1px solid ${H(z,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}}}function sa(g){let C=new Date(y.get(g),T.get(g),1),w=T.get(g),L=Io(C,u),P=[];for(let z=0;z<6;z++){let Q=[];for(let Y=0;Y<7;Y++){let Qe=Ke(L,z*7+Y);Q.push(ca(Qe,w,g))}P.push({div:Q,role:"row",style:Vn(),_key:z})}return P}function ca(g,C,w){let L=U(g),P=$e(g,w),z=re(g,w),Q=g.getMonth()!==C,Y=bt(g,v.get(w)),Qe=bt(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:Y?0:-1,ariaSelected:P,ariaDisabled:L,disabled:L,ariaLabel:R.format(g),dataDate:Po(g),onClick:(M,pa)=>q(g,pa),onMouseEnter:()=>n==="range"&&f.set(g),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:$(1),fontSize:M=>ot(M),fontFamily:"inherit",opacity:L?.35:Q?.5:1,backgroundColor:M=>P?H(M,"shift-7",l.get(M)):z?H(M,"hover",l.get(M)):"transparent",color:M=>P?H(M,"shift-0",l.get(M)):H(M,"text"),outline:Qe?M=>`1px solid ${H(M,"shift-6",l.get(M))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:M=>P?H(M,"shift-7",l.get(M)):H(M,"shift-3",l.get(M))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:M=>S(M,l.get(M))}},_key:Po(g)}}function ma(){let g=(C,w,L)=>({select:Array.from({length:C},(P,z)=>({option:String(z).padStart(2,"0"),value:String(z),selected:Q=>w.get(Q)===z,_key:z})),ariaLabel:L,onChange:P=>{w.set(Number(P.target.value)),ne()},style:gi()});return{div:[g(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},g(60,x,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:$(1),marginTop:$(3)}}}function ua(){let g=(C,w)=>({button:C,type:"button",onClick:(L,P)=>w(P),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>ot(L,"decrease-1"),color:L=>H(L,"muted",l.get(L)),padding:$(1)}});return{div:[g("Today",C=>{let w=new Date;v.set(A(w)),fe(w),I(C)}),g("Clear",()=>{d.set(n==="range"?[null,null]:null),f.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:$(2),paddingTop:$(2),borderTop:C=>`1px solid ${H(C,"border")}`}}}function da(g,C){let w=g,L=v.get(),P=null;switch(w.key){case"ArrowLeft":P=Ke(L,-1);break;case"ArrowRight":P=Ke(L,1);break;case"ArrowUp":P=Ke(L,-7);break;case"ArrowDown":P=Ke(L,7);break;case"Home":P=Io(L,u);break;case"End":P=Ke(Io(L,u),6);break;case"PageUp":P=Do(L,w.shiftKey?-12:-1);break;case"PageDown":P=Do(L,w.shiftKey?12:1);break;case"Enter":case" ":w.preventDefault(),q(L,C);return;default:return}w.preventDefault(),v.set(P),fe(P),I(C)}}function Vn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:$(.5)}}function hi(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>ot(r),color:r=>H(r,"muted"),width:$(7),height:$(7),borderRadius:$(1),"&:hover":{backgroundColor:r=>H(r,"shift-3")}}}function gi(){return{fontFamily:"inherit",fontSize:r=>ot(r),padding:$(1),borderRadius:$(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${H(r,"border-strong")}`,backgroundColor:r=>H(r,"inherit"),color:r=>H(r,"text")}}import{toState as fi}from"@domphy/core";import{themeColor as Rn,themeSize as Mn,themeSpacing as _n}from"@domphy/theme";function cu(r={}){var o;let n=fi((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${_n(24)}, max-content) 1fr`,columnGap:_n(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Mn(e,"inherit"),color:e=>Rn(e,"shift-10",n.get(e))},"& dd":{margin:0,fontSize:e=>Mn(e,"inherit"),color:e=>Rn(e,"text",n.get(e))}}}}import{toState as Nn}from"@domphy/core";import{themeColor as We,themeDensity as St,themeSize as $n,themeSpacing as te}from"@domphy/theme";function hu(r={}){var s,t;let{duration:n=240}=r,o=Nn((s=r.color)!=null?s:"neutral","color"),e=Nn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>$n(a,"inherit"),color:a=>We(a,"text",o.get(a)),backgroundColor:a=>We(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>We(a,"shift-2",o.get(a)),color:a=>We(a,"shift-10",o.get(a)),fontSize:a=>$n(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:te(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>te(St(a)*4),height:te(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:te(2),height:te(2),flexShrink:0,marginTop:te(-.5),borderInlineEnd:a=>`${te(.5)} solid ${We(a,"shift-9",o.get(a))}`,borderBottom:a=>`${te(.5)} solid ${We(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${n}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>We(a,"shift-3",o.get(a))},"& > summary:focus-visible":{borderRadius:a=>te(St(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>te(St(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${n}ms ease, opacity ${n}ms ease, padding ${n}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>te(St(a)*1),paddingBottom:a=>te(St(a)*3)}}}}import{behavior as yi,toState as bi}from"@domphy/core";import{themeColor as Lo,themeDensity as Bn,themeSize as Si,themeSpacing as An}from"@domphy/theme";var vt=0;function Kt(){vt++,vt===1&&(document.body.style.overflow="hidden")}function nt(){vt=Math.max(0,vt-1),vt===0&&(document.body.style.overflow="")}var Hn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function vi(r,n){let{state:o}=n,e=null,s=!1,t=!1,a=null,i=r.domElement;i.setAttribute("aria-modal","true");let m=()=>{s=!1,typeof i.close=="function"&&i.close(),i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="none",t&&(nt(),t=!1),e==null||e.focus(),e=null},u=p=>{if(p.key!=="Tab")return;let y=Array.from(i.querySelectorAll(Hn)).filter(f=>!f.closest("[aria-hidden='true']")&&f.offsetParent!==null);if(!y.length){p.preventDefault();return}let T=y[0],v=y[y.length-1];p.shiftKey?(document.activeElement===T||document.activeElement===i)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),T.focus())},l=p=>{p.preventDefault(),o.set(!1)};i.addEventListener("cancel",l);let c=p=>{if(p)s=!1,a&&(clearTimeout(a),a=null),e=document.activeElement,i.style.visibility="visible",i.style.pointerEvents="auto",i.style.display="",typeof i.showModal=="function"&&!i.open&&i.showModal(),t||(Kt(),t=!0),i.addEventListener("keydown",u),requestAnimationFrame(()=>{i.style.opacity="1";let y=i.querySelector(Hn);y==null||y.focus()});else{if(s=!0,i.style.opacity="0",i.removeEventListener("keydown",u),!i.open){m();return}a=setTimeout(()=>{a=null,s&&m()},350)}};c(o.get());let d=o.addListener(c);return{requestClose:()=>o.set(!1),onTransitionEnd:p=>{s&&p.target===i&&p.propertyName==="opacity"&&m()},update(p){p.state!==o&&(d(),o=p.state,d=o.addListener(c))},destroy(){a&&(clearTimeout(a),a=null),d(),i.removeEventListener("cancel",l),t&&(nt(),t=!1),i.removeEventListener("keydown",u),e==null||e.focus(),e=null}}}function Cu(r={}){let{color:n="neutral",open:o=!1,labelledBy:e,describedBy:s}=r,t=bi(o);return O(E({_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},yi("dialog",vi,{state:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(a,i)=>{var l;if(a.target!==i.domElement)return;let m=i.domElement.getBoundingClientRect();a.clientX>=m.left&&a.clientX<=m.right&&a.clientY>=m.top&&a.clientY<=m.bottom||(l=i.getBehavior("dialog"))==null||l.requestClose()},onTransitionEnd:(a,i)=>{var m;return(m=i.getBehavior("dialog"))==null?void 0:m.onTransitionEnd(a)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:a=>Si(a,"inherit"),color:a=>Lo(a,"shift-10",n),backgroundColor:a=>Lo(a,"inherit",n),border:"none",borderRadius:a=>An(Bn(a)*2),padding:a=>An(Bn(a)*3),boxShadow:V("high"),"&::backdrop":{backgroundColor:a=>Lo(a,"shift-2","neutral"),opacity:.75}}})}import{toState as Ci}from"@domphy/core";import{themeColor as Wt,themeSize as xi,themeSpacing as Ei}from"@domphy/theme";function Tu(r={}){var o;let n=Ci((o=r.color)!=null?o:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:Ei(2),fontSize:e=>xi(e,"inherit"),backgroundColor:e=>Wt(e),color:e=>Wt(e,"text",n.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Wt(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Wt(e,"border-strong",n.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as ki,toState as wi}from"@domphy/core";import{themeColor as Oo,themeDensity as Ti,themeSize as Di,themeSpacing as Ct}from"@domphy/theme";var zo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Fn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=r=>r==="left"||r==="right";function Kn(r,n){return r==="start"?n?"right":"left":r==="end"?n?"left":"right":r}function Pi(r,n){let{state:o,placement:e,size:s}=n,t=r.domElement;t.setAttribute("aria-modal","true");let a=v=>{v.preventDefault(),o.set(!1)};t.addEventListener("cancel",a);let i=(v,f)=>{let x=(v==="start"||v==="end")&&(t.ownerDocument.documentElement.dir==="rtl"||t.ownerDocument.dir==="rtl"),h=Kn(v,x),D=f!=null?f:rt(h)?Ct(80):Ct(64);return t.style.margin=Fn[h],t.style.width=rt(h)?D:"100dvw",t.style.height=rt(h)?"100dvh":D,h},m=i(e,s),u=!1,l=!1,c=null,d=()=>{c=null,u&&(u=!1,typeof t.close=="function"&&t.close(),t.style.visibility="hidden",t.style.pointerEvents="none",t.style.display="none",l&&(nt(),l=!1))},p=v=>{v.target===t&&v.propertyName==="transform"&&d()};t.addEventListener("transitionend",p);let y=v=>{if(v)u=!1,c&&(clearTimeout(c),c=null),t.style.visibility="visible",t.style.pointerEvents="auto",t.style.display="",typeof t.showModal=="function"&&!t.open&&t.showModal(),l||(Kt(),l=!0),requestAnimationFrame(()=>{t.style.transform="translate(0, 0)"});else{if(u=!0,t.style.transform=zo[m],!t.open){d();return}c=setTimeout(d,350)}};y(o.get());let T=o.addListener(y);return{requestClose:()=>o.set(!1),update(v){v.state!==o&&(T(),o=v.state,T=o.addListener(y)),(v.placement!==e||v.size!==s)&&(e=v.placement,s=v.size,m=i(e,s),o.get()||(t.style.transform=zo[m]))},destroy(){c&&(clearTimeout(c),c=null),T(),t.removeEventListener("cancel",a),t.removeEventListener("transitionend",p),l&&(nt(),l=!1)}}}function zu(r={}){let{color:n="neutral",open:o=!1,placement:e="end",size:s}=r,t=wi(o),a=Kn(e,!1),i=rt(a)?Ct(80):Ct(64),m=s!=null?s:i;return O(E({_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},ki("drawer",Pi,{state:t,placement:e,size:s})),{onClick:(u,l)=>{var p;if(u.target!==l.domElement)return;let c=l.domElement.getBoundingClientRect();u.clientX>=c.left&&u.clientX<=c.right&&u.clientY>=c.top&&u.clientY<=c.bottom||(p=l.getBehavior("drawer"))==null||p.requestClose()},style:{transform:zo[a],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:u=>Di(u,"inherit"),color:u=>Oo(u,"shift-10",n),backgroundColor:u=>Oo(u,"inherit",n),border:"none",padding:u=>Ct(Ti(u)*3),margin:Fn[a],width:rt(a)?m:"100dvw",height:rt(a)?"100dvh":m,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:V("high"),"&::backdrop":{backgroundColor:u=>Oo(u,"shift-2","neutral"),opacity:.75}}})}import{toState as Ii}from"@domphy/core";import{themeColor as Li,themeSize as Oi}from"@domphy/theme";function Nu(r={}){var o;let n=Ii((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Oi(e,"inherit"),fontStyle:"italic",color:e=>Li(e,"shift-10",n.get(e))}}}import{toState as zi}from"@domphy/core";import{themeColor as Vo,themeSpacing as Ro}from"@domphy/theme";function Hu(r={}){var o;let n=zi((o=r.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:Ro(3),paddingBlock:Ro(12),paddingInline:Ro(6),textAlign:"center",color:e=>Vo(e,"muted",n.get(e)),"& > :first-child":{color:e=>Vo(e,"shift-5",n.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>Vo(e,"text",n.get(e))}}}}var Mo="errorBoundaryOriginal";function Vi(r){var o;let n=r.getMetadata(Mo);if(typeof n=="function"){(o=r._childrenRelease)==null||o.call(r),r._setupFunctionChildren(n);return}if(n!=null){r.children.update(Array.isArray(n)?n:[n]);return}r.children.update([])}function Ku(r={}){return{_onSchedule:(n,o)=>{n.getMetadata(Mo)===void 0&&n.setMetadata(Mo,o[n.tagName])},_onError:(n,o)=>{var t,a;(t=r.onError)==null||t.call(r,o);let e=()=>Vi(n),s=typeof r.fallback=="function"?r.fallback(o,e):(a=r.fallback)!=null?a:{div:"An error occurred."};n.children.update([s])}}}import{toState as Ri}from"@domphy/core";import{themeColor as jt,themeSize as Mi,themeSpacing as _i}from"@domphy/theme";var Ni={small:8,medium:10,large:14};function Uu(r={}){var e,s;let n=Ri((e=r.color)!=null?e:"primary","color"),o=_i(Ni[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:"50%",fontSize:t=>Mi(t,"inherit"),backgroundColor:t=>jt(t,"shift-13",n.get(t)),color:t=>jt(t,"shift-0","neutral"),boxShadow:V("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>jt(t,"shift-14",n.get(t)),boxShadow:V("medium")},"&:active:not([disabled])":{backgroundColor:t=>jt(t,"shift-15",n.get(t)),boxShadow:V("low")},"&:focus-visible":{boxShadow:t=>`${V("medium")}, ${S(t,n.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as $i}from"@domphy/core";import{themeColor as Wn,themeSize as Bi,themeSpacing as qt}from"@domphy/theme";function Qu(r={}){var o;let n=$i((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:qt(2),marginInline:0,marginTop:qt(3),marginBottom:qt(3),color:e=>Wn(e,"text",n.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:qt(2)},"& figcaption":{fontSize:e=>Bi(e,"decrease-1"),color:e=>Wn(e,"muted",n.get(e)),lineHeight:1.45}}}}import{toState as Ai}from"@domphy/core";import{themeColor as xt,themeDensity as at,themeSize as _o,themeSpacing as Se}from"@domphy/theme";function nd(r={}){var s;let{layout:n="horizontal"}=r,o=Ai((s=r.color)!=null?s:"neutral","color"),e=n==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>Se(at(t)*3),paddingBlock:t=>Se(at(t)*3),border:"none",borderRadius:t=>Se(at(t)*2),fontSize:t=>_o(t,"inherit"),backgroundColor:t=>xt(t,"inherit",o.get(t)),color:t=>xt(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:Se(4),rowGap:Se(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>_o(t,"inherit"),fontWeight:600,paddingBlock:t=>Se(at(t)*1),borderRadius:t=>Se(at(t)*2),color:t=>xt(t,"text",o.get(t)),backgroundColor:t=>xt(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:Se(at(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${Se(2)} * -1)`,fontSize:t=>_o(t,"decrease-1"),color:t=>xt(t,"text",o.get(t))}}}}import{themeDensity as Hi,themeSpacing as Fi}from"@domphy/theme";function id(r={}){let{columns:n=1,gap:o=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof n=="number"?`repeat(${n}, minmax(0, 1fr))`:n,gap:s=>Fi(Hi(s)*o)},e?{alignItems:e}:{})}}import{toState as Ki}from"@domphy/core";import{themeColor as Wi,themeSize as ji,themeSpacing as qi}from"@domphy/theme";var Yi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function ud(r={}){var o;let n=Ki((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Wi(e,"shift-11",n.get(e)),marginTop:0,marginBottom:qi(2),fontSize:e=>{let s=Yi[e.elementNode.tagName]||"inherit";return ji(e,s)}}}}import{toState as Gi}from"@domphy/core";import{themeColor as jn,themeSpacing as qn}from"@domphy/theme";function gd(r={}){var o;let n=Gi((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:qn(3),marginBottom:qn(3),backgroundColor:e=>jn(e,"inherit",n.get(e)),color:e=>jn(e,"text",n.get(e))}}}import{toState as Ui}from"@domphy/core";import{themeColor as Xi,themeSize as Zi,themeSpacing as Yn}from"@domphy/theme";function Sd(r={}){var o;let n=Ui((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:Yn(4),height:Yn(4),flexShrink:"0",fontSize:e=>Zi(e),backgroundColor:"transparent",color:e=>Xi(e,"text",n.get(e))}}}import{toState as Ji}from"@domphy/core";import{themeColor as Gn,themeSpacing as Qi}from"@domphy/theme";function Ed(r={}){var o;let n=Ji((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:Qi(2),backgroundColor:e=>Gn(e,"inherit",n.get(e)),color:e=>Gn(e,"text",n.get(e))}}}import{toState as Un}from"@domphy/core";import{themeColor as Z,themeSize as el,themeSpacing as je}from"@domphy/theme";function Pd(r={}){var e,s;let n=Un((e=r.color)!=null?e:"neutral","color"),o=Un((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>el(t,"inherit"),color:t=>Z(t,"text",n.get(t)),display:"inline-flex",position:"relative",width:je(6),height:je(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:je(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Z(t,"border-strong",n.get(t))}`,color:t=>Z(t,"text",n.get(t)),width:je(4),height:je(4)},"&:hover::before":{backgroundColor:t=>Z(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${Z(t,"shift-6",o.get(t))}`,backgroundColor:t=>Z(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>Z(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${je(.5)} solid ${Z(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${Z(t,"shift-6",o.get(t))}`,backgroundColor:t=>Z(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>Z(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>Z(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:je(1.5),boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>Z(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as tl}from"@domphy/core";import{themeColor as No,themeDensity as it,themeSize as ol,themeSpacing as lt}from"@domphy/theme";function Vd(r={}){var o;let n=tl((o=r.color)!=null?o:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>ol(e,"inherit"),color:e=>No(e,"text",n.get(e)),paddingBlock:e=>lt(it(e)*1),paddingInline:e=>lt(it(e)*1),blockSize:e=>lt(6+it(e)*2),inlineSize:e=>lt(6+it(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>lt(it(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>lt(it(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>No(e,"shift-2","neutral"),outline:e=>`1px solid ${No(e,"border-strong","neutral")}`}}}}import{toState as Xn}from"@domphy/core";import{themeColor as Te,themeDensity as $o,themeSize as nl,themeSpacing as Yt}from"@domphy/theme";function $d(r={}){var s,t;let{mode:n="datetime-local"}=r,o=Xn((s=r.color)!=null?s:"neutral","color"),e=Xn((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>nl(a,"inherit"),lineHeight:"inherit",color:a=>Te(a,"text",o.get(a)),backgroundColor:a=>Te(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Te(a,"border-strong",o.get(a))}`,borderRadius:a=>Yt($o(a)*1.5),paddingInline:a=>Yt($o(a)*3),height:a=>Yt(6+$o(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Te(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Te(a,"muted","neutral"),backgroundColor:a=>Te(a,"shift-2","neutral"),outline:a=>`1px solid ${Te(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Yt(.5)} solid ${Te(a,"shift-6","error")}`}}}}import{toState as Zn}from"@domphy/core";import{themeColor as ae,themeDensity as Gt,themeSize as rl,themeSpacing as qe}from"@domphy/theme";function Kd(r={}){var e,s;let n=Zn((e=r.color)!=null?e:"neutral","color"),o=Zn((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>rl(t,"inherit"),lineHeight:"inherit",color:t=>ae(t,"text",n.get(t)),backgroundColor:t=>ae(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ae(t,"border-strong",n.get(t))}`,borderRadius:t=>qe(Gt(t)*1.5),height:t=>qe(6+Gt(t)*2),paddingInline:t=>qe(Gt(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>qe(Gt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:qe(1),height:qe(6),paddingInline:qe(2),cursor:"pointer",color:t=>ae(t,"shift-11",n.get(t)),backgroundColor:t=>ae(t,"surface",n.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${ae(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>ae(t,"muted","neutral"),outline:t=>`1px solid ${ae(t,"border-strong","neutral")}`,backgroundColor:t=>ae(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>ae(t,"muted","neutral"),backgroundColor:t=>ae(t,"shift-3","neutral")}}}}import{toState as Jn}from"@domphy/core";import{themeColor as Ye,themeDensity as Ut,themeSize as al,themeSpacing as Et}from"@domphy/theme";function Gd(r={}){var e,s;let n=Jn((e=r.color)!=null?e:"neutral","color"),o=Jn((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Et(10),paddingInlineStart:t=>Et(Ut(t)*3),paddingInlineEnd:t=>Et(Ut(t)*1.5),paddingBlock:t=>Et(Ut(t)*1),borderRadius:t=>Et(Ut(t)*1.5),fontSize:t=>al(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ye(t,"border-strong",n.get(t))}`,color:t=>Ye(t,"text",n.get(t)),backgroundColor:t=>Ye(t,"inherit",n.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Ye(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ye(t,"shift-2","neutral"),outline:t=>`1px solid ${Ye(t,"border-strong","neutral")}`,color:t=>Ye(t,"muted","neutral")}}}}import{themeSpacing as Qn}from"@domphy/theme";function Zd(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:Qn(2),"& > *":{minWidth:`${Qn(9)}!important`}},_onMount:r=>{let n=r.domElement,o=()=>Array.from(n.querySelectorAll("input")),e=a=>{let i=o(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=o(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,p,y;a.preventDefault();let i=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((T,v)=>{let f=m[l+v];f&&(f.value=T,f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(y=m[c])==null||y.focus()};n.addEventListener("input",e),n.addEventListener("keydown",s),n.addEventListener("paste",t),r.addHook("Remove",()=>{n.removeEventListener("input",e),n.removeEventListener("keydown",s),n.removeEventListener("paste",t)})}}}import{isState as il,rawHtml as ll,toState as Bo}from"@domphy/core";import{themeColor as Xt,themeDensity as Zt,themeSize as sl,themeSpacing as Jt}from"@domphy/theme";var cl='<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" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',ml='<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" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>',ul=["name","value","onInput","disabled","required"];function er(r){if(r!=null)return typeof r=="function"?r:il(r)?n=>r.get(n):r}function op(r={}){var t,a;let n=Bo((t=r.color)!=null?t:"neutral","color"),o=Bo((a=r.accentColor)!=null?a:"primary","accentColor"),e=Bo(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of ul)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var T,v,f,b,x,h,D;let m=(T=r.name)!=null?T:s.name,u=er((v=r.value)!=null?v:s.value),l=(f=r.onInput)!=null?f:s.onInput,c=er((b=r.disabled)!=null?b:s.disabled),d=(x=r.required)!=null?x:s.required,p=O(E(E(E(E(E({input:null,type:k=>e.get(k)?"text":"password",ariaLabel:(h=r.ariaLabel)!=null?h:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),y={button:k=>ll(e.get(k)?ml:cl),type:"button",ariaLabel:k=>e.get(k)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(p),i.children.insert(y)},style:{display:"flex",alignItems:"center",gap:i=>Jt(Zt(i)*1),paddingBlock:i=>Jt(Zt(i)*1),paddingInline:i=>Jt(Zt(i)*3),borderRadius:i=>Jt(Zt(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Xt(i,"border-strong",n.get(i))}`,color:i=>Xt(i,"text",n.get(i)),backgroundColor:i=>Xt(i,"inherit",n.get(i)),fontSize:i=>sl(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${Xt(i,"shift-5",o.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,o.get(i))}}}}import{toState as tr}from"@domphy/core";import{themeColor as De,themeSize as dl,themeSpacing as Qt}from"@domphy/theme";function sp(r={}){var e,s;let n=tr((e=r.color)!=null?e:"neutral","color"),o=tr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>dl(t,"inherit"),color:t=>De(t,"text",n.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:Qt(6),height:Qt(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${De(t,"border-strong",n.get(t))}`,color:t=>De(t,"text",n.get(t)),width:Qt(4),height:Qt(4)},"&:hover::before":{backgroundColor:t=>De(t,"hover",n.get(t))},"&:checked::before":{outline:t=>`1px solid ${De(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>De(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>De(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,o.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>De(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as or}from"@domphy/core";import{themeColor as Ao,themeSpacing as ve}from"@domphy/theme";function pp(r={}){var e,s;let n=or((e=r.color)!=null?e:"neutral","color"),o=or((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:ve(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:ve(1.5),borderRadius:ve(999),backgroundColor:t=>Ao(t,"shift-3",n.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:ve(4),height:ve(4),borderRadius:ve(999),border:"none",marginTop:`calc((${ve(1.5)} - ${ve(4)}) / 2)`,backgroundColor:t=>Ao(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Ao(t,"shift-10",o.get(t))},borderRadius:ve(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as nr}from"@domphy/core";import{themeColor as Pe,themeDensity as Ho,themeSize as pl,themeSpacing as eo}from"@domphy/theme";function bp(r={}){var e,s;let n=nr((e=r.color)!=null?e:"neutral","color"),o=nr((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>pl(t,"inherit"),lineHeight:"inherit",color:t=>Pe(t,"text",n.get(t)),backgroundColor:t=>Pe(t,"inherit",n.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Pe(t,"border-strong",n.get(t))}`,borderRadius:t=>eo(Ho(t)*1.5),minWidth:eo(32),paddingInline:t=>eo(Ho(t)*3),paddingBlock:t=>eo(Ho(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>Pe(t,"shift-7",n.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Pe(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Pe(t,"muted","neutral"),backgroundColor:t=>Pe(t,"shift-2","neutral"),outline:t=>`1px solid ${Pe(t,"border-strong","neutral")}`}}}}import{toState as hl}from"@domphy/core";import{themeColor as kt,themeSize as rr,themeSpacing as de}from"@domphy/theme";function Ep(r={}){var o;let n=hl((o=r.accentColor)!=null?o:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>rr(e,"inherit"),backgroundColor:e=>kt(e,"inherit"),color:e=>kt(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:de(9),height:de(6),cursor:"pointer",margin:"0",paddingBlock:de(1),transition:"box-shadow 140ms ease",borderRadius:de(999),"&:focus-visible":{boxShadow:e=>S(e,n.get(e))},"&:checked":{"&::before":{backgroundColor:e=>kt(e,"increase-3",n.get(e))},"&::after":{left:`calc(100% - ${de(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:de(3),height:de(3),borderRadius:de(999),left:de(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>kt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:de(999),display:"inline-block",fontSize:e=>rr(e,"inherit"),lineHeight:1,backgroundColor:e=>kt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ar}from"@domphy/core";import{themeColor as oe,themeDensity as Fo,themeSize as gl,themeSpacing as Ge}from"@domphy/theme";function Pp(r={}){var s,t;let{type:n="text"}=r,o=ar((s=r.color)!=null?s:"neutral","color"),e=ar((t=r.accentColor)!=null?t:"primary","accentColor");return{type:n,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Ge(10),paddingInline:a=>Ge(Fo(a)*3),paddingBlock:a=>Ge(Fo(a)*1),borderRadius:a=>Ge(Fo(a)*1.5),fontSize:a=>gl(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${oe(a,"border-strong",o.get(a))}`,color:a=>oe(a,"text",o.get(a)),backgroundColor:a=>oe(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>oe(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>oe(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${oe(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>oe(a,"shift-2","neutral"),outline:a=>`1px solid ${oe(a,"border-strong","neutral")}`,color:a=>oe(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Ge(.5)} solid ${oe(a,"shift-6","warning")}`}}}}import{toState as fl}from"@domphy/core";import{themeColor as Ko,themeDensity as Wo,themeSize as yl,themeSpacing as jo}from"@domphy/theme";function zp(r={}){var o;let n=fl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>yl(e,"inherit"),color:e=>Ko(e,"text",n.get(e)),backgroundColor:e=>Ko(e,"inherit",n.get(e)),paddingBlock:e=>jo(Wo(e)*.5),paddingInline:e=>jo(Wo(e)*1.5),borderRadius:e=>jo(Wo(e)*1),outline:e=>`1px solid ${Ko(e,"border-strong",n.get(e))}`}}}import{toState as ir}from"@domphy/core";import{themeColor as qo,themeSize as bl,themeSpacing as Sl}from"@domphy/theme";function _p(r={}){var e,s;let n=ir((e=r.color)!=null?e:"neutral","color"),o=ir((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Sl(2),fontSize:t=>bl(t,"inherit"),color:t=>qo(t,"text",n.get(t)),cursor:"pointer","&:focus-within":{color:t=>qo(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>qo(t,"muted","neutral")}}}}import{toState as lr}from"@domphy/core";import{themeColor as wt,themeSize as vl,themeSpacing as Cl}from"@domphy/theme";function Hp(r={}){var e,s;let n=lr((e=r.color)!=null?e:"primary","color"),o=lr((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>vl(t,"inherit"),backgroundColor:t=>wt(t),color:t=>wt(t,"shift-13",n.get(t)),textDecoration:"none","&:visited":{color:t=>wt(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>wt(t,"shift-14",n.get(t)),textDecoration:"underline"},borderRadius:Cl(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>wt(t,"muted","neutral")}}}}import{toState as xl}from"@domphy/core";import{themeColor as N,themeDensity as Ie,themeSize as sr,themeSpacing as Le}from"@domphy/theme";var El={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},kl={small:.5,medium:1,large:1.5};function Yp(r={}){var i,m,u;let n=(i=r.variant)!=null?i:"outline",o=xl((m=r.color)!=null?m:n==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=et[e];if(n==="ghost"){let l=kl[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>sr(c,s),textDecoration:"none",paddingBlock:c=>Le(Ie(c)*l),paddingInline:c=>Le(Ie(c)*l),borderRadius:c=>Le(Ie(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>Le(Ie(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>N(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>N(c,"text",o.get(c)),backgroundColor:c=>N(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>N(c,"text",o.get(c)),backgroundColor:c=>N(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>S(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>N(c,"border-strong","neutral")}}}}let t=n==="solid",a=El[e];return O(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>sr(l,s),textDecoration:"none",paddingBlock:l=>Le(Ie(l)*a.block),paddingInline:l=>Le(Ie(l)*a.inline),borderRadius:l=>Le(Ie(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>Le(Ie(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${N(l,"border-strong",o.get(l))}`,color:l=>t?N(l,"shift-0","neutral"):N(l,"shift-13",o.get(l)),backgroundColor:l=>t?N(l,"shift-13",o.get(l)):N(l,"inherit",o.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?N(l,"shift-0","neutral"):N(l,"shift-14",o.get(l)),backgroundColor:l=>t?N(l,"shift-14",o.get(l)):N(l,"hover",o.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?N(l,"shift-15",o.get(l)):N(l,"increase-2",o.get(l))},"&:focus-visible":{boxShadow:l=>S(l,o.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>N(l,"shift-2","neutral"),outline:l=>`1px solid ${N(l,"border-strong","neutral")}`,color:l=>N(l,"muted","neutral")}}})}import{toState as wl}from"@domphy/core";import{themeColor as Oe,themeDensity as Ue,themeSize as cr,themeSpacing as Xe}from"@domphy/theme";function Qp(r={}){var o;let n=(o=r.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Oe(e,"inherit",n),color:e=>Oe(e,"text",n)}}}function eh(r={}){let{dense:n=!1}=r;return{style:{display:"flex",alignItems:"center",gap:o=>Xe(Ue(o)*2),paddingBlock:o=>Xe(n?1:Ue(o)*2),paddingInline:o=>Xe(Ue(o)*3),fontSize:o=>cr(o,"inherit"),color:o=>Oe(o,"text")}}}function th(r={}){var s,t;let n=wl((s=r.color)!=null?s:"neutral","color"),o=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>Xe(Ue(a)*2),paddingBlock:a=>Xe(e?1:Ue(a)*2),paddingInline:a=>Xe(Ue(a)*3),fontSize:a=>cr(a,"inherit"),color:a=>Oe(a,"text",n.get(a)),borderRadius:a=>Xe(Ue(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>Oe(a,"hover",n.get(a))},"&:active:not([disabled])":{backgroundColor:a=>Oe(a,"increase-2",n.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Oe(a,"shift-3",o),color:a=>Oe(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>S(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Tl}from"@domphy/core";import{themeColor as mr,themeDensity as Yo,themeSize as Dl,themeSpacing as Go}from"@domphy/theme";function ah(r={}){var o;let n=Tl((o=r.accentColor)!=null?o:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>Dl(e,"inherit"),color:e=>mr(e,"text",n.get(e)),backgroundColor:e=>mr(e,"inherit",n.get(e)),height:e=>Go(Yo(e)*6),borderRadius:e=>Go(Yo(e)*1),paddingInline:e=>Go(Yo(e)*1.5)}}}import{behavior as Pl,toState as Il}from"@domphy/core";import{themeColor as ze,themeDensity as Tt,themeSize as ur,themeSpacing as st}from"@domphy/theme";function uh(r={items:[]}){var l;let{items:n=[],selectable:o=!0,color:e="neutral",accentColor:s="primary"}=r,t=Il((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let p=c.nodeId;return d.items.map((y,T)=>{var f;let v=(f=y.key)!=null?f:T;return O(E({button:typeof y.label=="string"?[{span:y.label}]:[y.label],_key:v,type:"button",id:`menuitem${p}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=y.onClick)==null||b.call(y)},onKeyDown:b=>{var R;let x=b.key;if(x==="Enter"||x===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(x))return;b.preventDefault();let h=d.items.map((j,K)=>{var _;return(_=j.key)!=null?_:K}),D=h.indexOf(v),k=D;x==="ArrowDown"?k=(D+1)%h.length:x==="ArrowUp"?k=(D-1+h.length)%h.length:x==="Home"?k=0:x==="End"&&(k=h.length-1),(R=document.getElementById(`menuitem${p}${h[k]}`))==null||R.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:st(2),width:"100%",fontSize:b=>ur(b,"inherit"),height:b=>st(6+Tt(b)*2),paddingInline:b=>st(Tt(b)*3),border:"none",outline:"none",color:b=>ze(b,"text",d.color),backgroundColor:b=>ze(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>ze(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>ze(b,"shift-3",d.accentColor),color:b=>ze(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let p=d;return{update(y){y.activeKey!==p.activeKey&&!y.activeKeyIsCallerOwned&&y.activeKey.set(p.activeKey.get()),p=y,p.items.length!==0&&c.children.update(i(c,p))}}},u={items:n,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:s};return O(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{n.length!==0&&(d[c.tagName]=i(c,u))}},Pl("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>st(Tt(c)*2),paddingInline:c=>st(Tt(c)*2),fontSize:c=>ur(c,"inherit"),backgroundColor:c=>ze(c,"inherit",e),color:c=>ze(c,"text",e),borderRadius:c=>st(Tt(c)*2),outline:c=>`1px solid ${ze(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:V("medium")}})}import{behavior as Ll}from"@domphy/core";var dr=r=>!!r&&typeof r.get=="function"&&r._isState===!0,pe=r=>{let n={},o=[];for(let e in r){let s=r[e];e==="x"?o.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?o.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?o.push(`scale(${s})`):e==="rotate"?o.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):n[e]=s}return o.length&&(n.transform=o.join(" ")),n};function Uo(r={}){var n,o,e,s;return{duration:(n=r.duration)!=null?n:300,delay:(o=r.delay)!=null?o:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Xo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Ol(r,n){let o=r.domElement,e=n,s,t=i=>{s==null||s(),s=void 0,!(!o||!dr(i))&&(s=i.addListener(m=>{Xo()?Object.assign(o.style,pe(m)):typeof o.animate=="function"&&o.animate([pe(m)],Uo(e.transition))}))},a=(i,m)=>{if(!o)return;let u=dr(i.animate)?i.animate.get():i.animate;if(Xo()){u?Object.assign(o.style,pe(u)):m==="enter"&&i.initial&&Object.assign(o.style,pe(i.initial));return}if(typeof o.animate=="function")if(u){let l=m==="enter"&&i.initial?[pe(i.initial),pe(u)]:[pe(u)];o.animate(l,Uo(i.transition))}else m==="enter"&&i.initial&&Object.assign(o.style,pe(i.initial))};return a(n,"enter"),t(n.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function gh(r={}){return O(E({},Ll("motion",(n,o)=>Ol(n,o),r)),{_onBeforeRemove:(n,o)=>{var a,i;let e=n.domElement,s=n.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return o();if(Xo())return Object.assign(e.style,pe(t)),o();e.animate([pe(t)],Uo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(o,o)}})}import{toState as zl}from"@domphy/core";import{themeColor as pr,themeSize as Vl,themeSpacing as Rl}from"@domphy/theme";function vh(r={}){var o;let n=zl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Vl(e,"inherit"),backgroundColor:e=>pr(e),color:e=>pr(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:Rl(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as Ml,isState as _l,toState as gr}from"@domphy/core";import{themeColor as Ze,themeDensity as Dt,themeSize as Nl,themeSpacing as ct}from"@domphy/theme";function $l(r,n){if(n<=7)return Array.from({length:n},(t,a)=>a+1);let o=[1];r>3&&o.push("...");let e=Math.max(2,r-1),s=Math.min(n-1,r+1);for(let t=e;t<=s;t++)o.push(t);return r<n-2&&o.push("..."),o.push(n),o}function Bl(r,n,o,e){if(_l(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=gr(o!=null?o:e),r.setMetadata(n,s)),s}function hr(r,n){let o=r.getMetadata("paginationTotal");return o||(o=gr(n),r.setMetadata("paginationTotal",o)),o}function wh(r){let{total:n,color:o="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>ct(6+Dt(a)*2),height:a=>ct(6+Dt(a)*2),paddingInline:a=>ct(Dt(a)*2),borderRadius:a=>ct(Dt(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>Nl(a,"inherit"),backgroundColor:"transparent",color:a=>Ze(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>Ze(a,"shift-13",o),backgroundColor:a=>Ze(a,"hover",o)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=O(E({},s),{backgroundColor:a=>Ze(a,"shift-13",e),color:a=>Ze(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>Ze(a,"shift-13",e)}});return O(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=Bl(a,"paginationPage",r.value,1),m=hr(a,n),u={div:l=>{let c=i.get(l),d=m.get(l),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let y=0;for(let T of $l(c,d))if(T==="...")p.push({span:"\u2026",_key:`ellipsis-${y++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>ct(Dt(v)*2),color:v=>Ze(v,"shift-7",o)}});else{let v=T===c;p.push({button:String(T),_key:`page-${T}`,type:"button",ariaLabel:`Page ${T}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(T),style:v?t:s})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),p},style:{display:"flex",alignItems:"center",gap:ct(1)}};a.children.insert(u)}},Ml("pagination-total",a=>({update(i){hr(a,i.total).set(i.total)}}),{total:n})),{style:{display:"inline-flex"}})}import{toState as Al}from"@domphy/core";import{themeColor as Hl,themeDensity as Fl,themeSpacing as Kl}from"@domphy/theme";function Lh(r={}){var s;let{padding:n=4,divider:o=!1}=r,e=Al((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>Kl(Fl(t)*n)},o?{borderBottom:t=>`1px solid ${Hl(t,"border",e.get(t))}`}:{})}}import{toState as Wl}from"@domphy/core";import{themeColor as jl,themeSize as ql}from"@domphy/theme";function Mh(r={}){var o;let n=Wl((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>ql(e,"inherit"),color:e=>jl(e,"text",n.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Yl,toState as fr}from"@domphy/core";import{themeColor as Zo,themeDensity as Gl,themeSpacing as Ul}from"@domphy/theme";function Hh(r){var c;let{open:n=!1,placement:o="bottom",openOn:e="click"}=r,s=fr(n),t=fr(o),{show:a,hide:i,anchorPartial:m}=me({kind:"popover",open:s,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-14",style:{backgroundColor:d=>Zo(d,"inherit"),color:d=>Zo(d,"text"),borderRadius:d=>Ul(Gl(d)*2),outline:d=>`1px solid ${Zo(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};return(c=r.content).$||(c.$=[]),r.content.$.push(u),Yl(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?X("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&i(p),onClick:(d,p)=>{e==="click"&&(s.get()?i(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&s.get()&&i(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let y=d.relatedTarget,v=p.getRoot().domElement.querySelector(`#${X("popover",p)}`);y&&(v!=null&&v.contains(y))||i(p)}}),m}import{toState as Xl}from"@domphy/core";import{themeColor as to,themeSize as Zl,themeSpacing as Jo}from"@domphy/theme";function yr(r={}){let{placement:n="bottom-end",color:o="neutral",sideOffset:e=Jo(6),bordered:s=!0}=r,t=Xl(n),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>Zl(l),backgroundColor:l=>to(l),color:l=>to(l,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:Jo(1.5),height:Jo(1.5),backgroundColor:l=>to(l,"inherit",o),borderWidth:s?"1px":0,borderColor:l=>to(l,"border-strong",o),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",p=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${p}) rotate(45deg)`}}}}}import{toState as Jl}from"@domphy/core";import{themeColor as br,themeDensity as Qo,themeSize as Ql,themeSpacing as en}from"@domphy/theme";function Gh(r={}){var o;let n=Jl((o=r.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Ql(e,"inherit"),color:e=>br(e,"text",n.get(e)),backgroundColor:e=>br(e,"inherit",n.get(e)),border:"none",paddingBlock:e=>en(Qo(e)*2),paddingInline:e=>en(Qo(e)*3),borderRadius:e=>en(Qo(e)*2)}}}import{toState as Sr}from"@domphy/core";import{themeColor as oo,themeSpacing as no}from"@domphy/theme";function Jh(r={}){var e,s;let n=Sr((e=r.color)!=null?e:"neutral","color"),o=Sr((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:no(2),border:0,borderRadius:no(999),overflow:"hidden",backgroundColor:t=>oo(t,"inherit",n.get(t)),color:t=>oo(t,"text",n.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>oo(t,"inherit",n.get(t)),borderRadius:no(999)},"&::-webkit-progress-value":{backgroundColor:t=>oo(t,"shift-9",o.get(t)),borderRadius:no(999),transition:"width 220ms ease"}}}}import{behavior as es,isState as ts,rawHtml as os,toState as vr}from"@domphy/core";import{themeColor as ns,themeSize as rs,themeSpacing as xr}from"@domphy/theme";var as='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function Cr(r,n){var o,e,s;r.onChange=n.onChange,r.readOnly=(o=n.readOnly)!=null?o:!1,r.max=(e=n.max)!=null?e:5,r.color=(s=n.color)!=null?s:"warning",ts(n.value)?n.value!==r.valueState&&r.valueState.set(n.value.get()):n.value!==void 0&&r.valueState.set(n.value)}function ls(r,n,o,e){let s=a=>{let i=e.get(a);return i>0?i:o.valueState.get(a)},t={button:a=>os(n<=s(a)?as:is),_key:n,type:"button",ariaLabel:`${n} star${n>1?"s":""}`,onClick:()=>{var i;if(o.readOnly)return;let a=n===o.valueState.get()?0:n;o.valueState.set(a),(i=o.onChange)==null||i.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(n)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(o.readOnly)return;let i=o.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(o.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;o.valueState.set(m),(l=o.onChange)==null||l.call(o,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:xr(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,o.color)}}};r.children.insert(t)}function tn(r,n,o){let e=r.children.items;for(;e.length>n.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=n.max;s++)ls(r,s,n,o)}function ng(r={}){var e,s,t,a,i,m,u;let n={valueState:vr((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},o=vr(0);return O(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:xr(.5),fontSize:l=>rs(l,"increase-1"),cursor:n.readOnly?"default":"pointer",color:l=>ns(l,"muted",n.color)}},es("rating",(l,c)=>(Cr(n,c),tn(l,n,o),{update(d){Cr(n,d),tn(l,n,o)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{tn(l,n,o)}})}import{toState as on}from"@domphy/core";import{themeColor as nn,themeSpacing as Er}from"@domphy/theme";function sg(r={}){var m,u,l;let{size:n=16,thickness:o=.25}=r,e=on((m=r.value)!=null?m:0,"value"),s=on((u=r.color)!=null?u:"primary","color"),t=on((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-o)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:Er(n),height:Er(n),borderRadius:"50%",color:c=>nn(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${nn(c,"shift-9",s.get(c))} ${e.get(c)}%, ${nn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}import{themeDensity as ss,themeSpacing as cs}from"@domphy/theme";function kr(r={}){let{gap:n=4,align:o="center",justify:e,wrap:s=!1}=r;return{style:E(E({display:"flex",alignItems:o,gap:t=>cs(ss(t)*n)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}import{toState as ms}from"@domphy/core";import{themeColor as ro,themeSpacing as ao}from"@domphy/theme";function gg(r={}){var o;let n=ms((o=r.color)!=null?o:"neutral","color");return{style:{overflow:"auto",color:e=>ro(e,"text",n.get(e)),"&::-webkit-scrollbar":{width:ao(2),height:ao(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>ro(e,"shift-5",n.get(e)),borderRadius:ao(999),border:`${ao(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>ro(e,"shift-7",n.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${ro(e,"shift-5",n.get(e))} transparent`}}}import{behavior as us,isState as ds,toState as Dr}from"@domphy/core";import{themeColor as Je,themeSize as ps,themeSpacing as Ve}from"@domphy/theme";function wr(r,n,o,e){if(ds(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Dr(o!=null?o:e),r.setMetadata(n,s)),s}function hs(r,n,o,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=n.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(o),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Tr(r,n,o,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>n.get(u)===a,tabIndex:u=>{var c,d;let l=n.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>n.set(a),onKeyDown:u=>hs(u,r,a,n),style:{cursor:"pointer",fontSize:u=>ps(u,"inherit"),height:Ve(6),paddingBlock:Ve(1),paddingInline:Ve(3),border:"none",borderRadius:Ve(10),color:u=>Je(u,"text",o),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Je(u,"shift-3",o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Je(u,"increase-2",o)},"&[aria-checked=true]":{backgroundColor:u=>Je(u,"shift-0",e),color:u=>Je(u,"shift-10",e),boxShadow:V("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${V("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Cg(r={items:[]}){var t,a,i;let{items:n=[],color:o="neutral",accentColor:e="primary"}=r,s={items:n,color:o,accentColor:e};return O(E({role:"radiogroup",_context:{segmented:{value:Dr((i=(a=r.value)!=null?a:(t=n[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=wr(m,"segmentedValue",r.value,(d=(c=n[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Tr(n,l,o,e)}},us("segmented-items",m=>({update(u){var c,d;let l=wr(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Tr(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:Ve(1),paddingInline:Ve(1),gap:Ve(.5),borderRadius:Ve(10),backgroundColor:m=>Je(m,"inherit",o),color:m=>Je(m,"text",o)}})}import{themeColor as Ce,themeColorToken as gs,themeDensity as Pt,themeSize as fs,themeSpacing as Re}from"@domphy/theme";function Tg(r={}){let{color:n="neutral",accentColor:o="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>fs(e,"inherit"),lineHeight:"inherit",color:e=>Ce(e,"text",n),backgroundColor:e=>Ce(e,"inherit",n),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Ce(e,"border-strong",n)}`,borderRadius:e=>Re(Pt(e)*1.5),paddingBlock:e=>Re(Pt(e)*1),paddingLeft:e=>Re(Pt(e)*3),paddingRight:e=>Re(Pt(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${gs(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${Re(2)} center`,backgroundSize:`${Re(2.5)} ${Re(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>Re(6+Pt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Ce(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>S(e,o)},"& optgroup":{color:e=>Ce(e,"shift-11",n)},"& option[disabled]":{color:e=>Ce(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Ce(e,"muted","neutral"),outline:e=>`1px solid ${Ce(e,"border-strong","neutral")}`,backgroundColor:e=>Ce(e,"shift-2","neutral")}}}}import{behavior as ys,merge as Pr,toState as rn}from"@domphy/core";import{themeColor as mt,themeDensity as io,themeSize as bs,themeSpacing as ut}from"@domphy/theme";var Ss=1e3;function vs(r){let n=r.getMetadata("selectBoxTypeahead");return n||(n={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",n)),n}var Ir=(r,n)=>r.trim().toLowerCase().startsWith(n);function Cs(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(n=>n.getAttribute("aria-disabled")!=="true"&&!n.hasAttribute("disabled")):[]}function Rg(r){let{options:n=[],placement:o="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=rn(r.value),i=rn(s),{show:m,hide:u,anchorPartial:l}=me({kind:"selectBox",open:i,placement:rn(o),content:r.content}),c={onClick:(f,b)=>!t&&u(b),dataTone:"shift-14",style:{backgroundColor:f=>mt(f,"inherit"),color:f=>mt(f,"text"),borderRadius:f=>ut(io(f)*2),outline:f=>`1px solid ${mt(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:V("medium")}};Pr(r.content,c);let d=f=>({div:b=>{let x=f.state.get(b),h=Array.isArray(x)?x:[x];return f.options.filter(k=>h.includes(k.value)).map(k=>({span:k.label,$:[$t({color:f.color,removable:f.multiple})],_key:k.value,_onRemove:R=>{let j=f.state.get(),_=(Array.isArray(j)?j:[j]).filter(U=>U!==k.value);f.multiple?f.state.set(_):f.state.set(_[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:ut(1),flex:1}}),p=(f,b)=>({update(x){f.children.update([d(x)])}}),y=f=>i.get()?u(f):m(f),T=(f,b)=>{var K,_,U,B;let x=vs(b);x.timer&&clearTimeout(x.timer),x.buffer+=f.toLowerCase(),x.timer=setTimeout(()=>{x.buffer=""},Ss);let h=x.buffer.length>1&&new Set(x.buffer).size===1,D=h?x.buffer[0]:x.buffer;if(i.get()){let q=b.getRoot().domElement,ne=(K=q==null?void 0:q.querySelector(`#${X("selectBox",b)}`))!=null?K:null,re=Cs(ne).filter(Be=>{var I;return Ir((I=Be.textContent)!=null?I:"",D)});if(!re.length)return;let $e=(U=(_=b.domElement)==null?void 0:_.ownerDocument)==null?void 0:U.activeElement,fe=h&&$e?re.indexOf($e):-1,le=re[(fe+1)%re.length];le.focus(),(B=le.scrollIntoView)==null||B.call(le,{block:"nearest"});return}if(t)return;let k=n.filter(q=>Ir(q.label,D));if(!k.length)return;let R=h?k.findIndex(q=>q.value===a.get()):-1,j=k[(R+1)%k.length];a.set(j.value)},v=O(E({_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(f,b)=>{b[f.tagName]=[d({options:n,multiple:t,color:e,state:a})]}},ys("selectBoxInner",p,{options:n,multiple:t,color:e,state:a})),{onClick:(f,b)=>y(b),tabindex:0,role:"button",ariaExpanded:f=>i.get(f),ariaHaspopup:"listbox",ariaControls:f=>f!=null&&f.elementNode?X("selectBox",f.elementNode):void 0,onKeyDown:(f,b)=>{let x=f.key;if(x==="Escape"){u(b);return}if(x==="Enter"||x===" "){f.preventDefault(),y(b);return}if(x==="ArrowDown"&&!i.get()){f.preventDefault(),m(b);return}let h=f;x.length===1&&!h.ctrlKey&&!h.metaKey&&!h.altKey&&T(x,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>ut(6+io(f)*2),minWidth:ut(32),outlineOffset:"-1px",outline:f=>`1px solid ${mt(f,"border-strong","neutral")}`,paddingInline:f=>ut(io(f)*2),borderRadius:f=>ut(io(f)*1.5),fontSize:f=>bs(f,"inherit"),color:f=>mt(f,"text",e),backgroundColor:f=>mt(f,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>S(f,e)}}});return Pr(l,v),l}import{themeColor as It,themeDensity as Lr,themeSize as xs,themeSpacing as Or}from"@domphy/theme";function Bg(r={}){let{accentColor:n="primary",color:o="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>xs(t,"inherit"),height:t=>Or(6+Lr(t)*2),paddingInline:t=>Or(Lr(t)*3),border:"none",outline:"none",color:t=>It(t,"text",o),backgroundColor:t=>It(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>It(t,"hover",o)},"&[aria-selected=true]":{backgroundColor:t=>It(t,"shift-6",n),color:t=>It(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n)}}}}import{toState as Es}from"@domphy/core";import{themeColor as zr,themeDensity as Vr,themeSize as ks,themeSpacing as Rr}from"@domphy/theme";function Kg(r={}){var a;let{color:n="neutral",multiple:o=!1}=r,e=Es((a=r.value)!=null?a:o?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,_context:{select:{value:e,multiple:o}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>Rr(Vr(i)*2),paddingInline:i=>Rr(Vr(i)*2),fontSize:i=>ks(i,"inherit"),backgroundColor:i=>zr(i,"inherit",n),color:i=>zr(i,"text",n)}}}import{hashString as ws,toState as Ts}from"@domphy/core";import{themeColor as Lt,themeSize as Ds,themeSpacing as Mr}from"@domphy/theme";function Yg(r={}){var s;let n=Ts((s=r.color)!=null?s:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=ws(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>Ds(t),color:t=>Lt(t,"text",n.get(t)),height:Mr(6),display:"block",borderRadius:Mr(1),backgroundColor:t=>Lt(t,"inherit",n.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Lt(t,"inherit",n.get(t))} 0%, ${Lt(t,"shift-2",n.get(t))} 50%, ${Lt(t,"inherit",n.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}import{toState as Ps}from"@domphy/core";import{themeColor as Is,themeSize as Ls}from"@domphy/theme";function Zg(r={}){var o;let n=Ps((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>Ls(e,"inherit"),color:e=>Is(e,"shift-10",n.get(e))}}}import{hashString as Os,toState as zs}from"@domphy/core";import{themeColor as lo,themeSize as Vs,themeSpacing as an}from"@domphy/theme";var Nr={to:{transform:"rotate(360deg)"}},_r=Os(JSON.stringify(Nr));function tf(r={}){var o;let n=zs((o=r.color)!=null?o:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Vs(e),backgroundColor:e=>lo(e),color:e=>lo(e,"text",n.get(e)),display:"inline-block",margin:0,flexShrink:0,width:an(6),height:an(6),borderRadius:"50%",border:e=>`${an(.5)} solid ${lo(e,"border-strong",n.get(e))}`,borderTopColor:e=>lo(e,"shift-9",n.get(e)),boxSizing:"border-box",padding:0,animation:`${_r} 0.7s linear infinite`,[`@keyframes ${_r}`]:Nr}}}import{ElementNode as Rs,merge as Ms,toState as _s}from"@domphy/core";import{themeColor as so,themeSpacing as ln}from"@domphy/theme";function lf(r={}){let{direction:n="horizontal",defaultSize:o=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{Ms(a,{_context:{splitter:{direction:n,size:_s(o),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:n==="horizontal"?"row":"column",overflow:"hidden"}}}function Ns(r){let n=r.parent;if(!n)return!0;for(let o of n.children.items)if(o instanceof Rs&&o.getMetadata("splitterPanel"))return o===r;return!0}function sf(){return{_metadata:{splitterPanel:!0},_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal"?"width":"height",s=a=>{o.style[e]=`${Ns(r)?a:100-a}%`};s(n.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=n.size.addListener(s);r.addHook("Remove",()=>{var a;n.panelCount=Math.max(0,((a=n.panelCount)!=null?a:1)-1),t()})}}}function cf(){return{role:"separator",tabindex:0,_onMount:r=>{let n=r.getContext("splitter");if(!n){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let o=r.domElement,e=n.direction==="horizontal";o.style.cursor=e?"col-resize":"row-resize",o.setAttribute("aria-orientation",e?"vertical":"horizontal"),o.setAttribute("aria-valuemin",String(n.min)),o.setAttribute("aria-valuemax",String(n.max)),o.setAttribute("aria-valuenow",String(Math.round(n.size.get())));let s=n.size.addListener(m=>{o.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowLeft"&&(l=Math.max(n.size.get()-u,n.min)):m.key==="ArrowDown"?l=Math.min(n.size.get()+u,n.max):m.key==="ArrowUp"&&(l=Math.max(n.size.get()-u,n.min)),m.key==="Home"?l=n.min:m.key==="End"&&(l=n.max),l!==null&&(m.preventDefault(),n.size.set(l))},a=null,i=m=>{m.preventDefault();let u=o.parentElement,l=d=>{let p=u.getBoundingClientRect(),y=e?(d.clientX-p.left)/p.width*100:(d.clientY-p.top)/p.height*100;n.size.set(Math.min(Math.max(y,n.min),n.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};o.addEventListener("keydown",t),o.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),o.removeEventListener("keydown",t),o.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>so(r,"inherit"),color:r=>so(r,"text"),"&:hover":{backgroundColor:r=>so(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:ln(1),height:ln(1),borderRadius:ln(999),backgroundColor:r=>so(r,"shift-4")}}}}import{themeDensity as $s,themeSpacing as Bs}from"@domphy/theme";function df(r={}){let{gap:n=3,align:o}=r;return{style:E({display:"flex",flexDirection:"column",gap:e=>Bs($s(e)*n)},o?{alignItems:o}:{})}}import{behavior as As,isState as Hs,toState as Hr}from"@domphy/core";import{themeColor as F,themeSize as $r,themeSpacing as ie}from"@domphy/theme";function Br(r,n,o,e){if(Hs(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Hr(o!=null?o:e),r.setMetadata(n,s)),s}function Fs(r,n,o){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:ie(3),top:ie(6),bottom:`-${ie(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>F(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>F(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:ie(3),right:`calc(50% + ${ie(3)})`,left:`calc(-50% + ${ie(3)})`,height:"2px",backgroundColor:e=>F(e,"shift-3",n),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>F(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>F(e,"shift-9",o)}}}function Ar(r,n,o,e,s){let t=o==="vertical",a=Fs(o,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=n.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>n.get(c)===m?"step":void 0,style:O(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:ie(1),flex:t?"none":"1",fontSize:c=>$r(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:ie(6),height:ie(6),borderRadius:ie(999),fontSize:c=>$r(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${F(c,"border-strong",e)}`,backgroundColor:c=>F(c,"inherit"),color:c=>F(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>F(c,"shift-9",s),borderColor:c=>F(c,"shift-9",s),color:c=>F(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${F(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>F(c,"shift-9",s),borderColor:c=>F(c,"shift-9",s),color:c=>F(c,"shift-0",s)},"&[data-status=pending]":{color:c=>F(c,"muted")},"&[data-status=active]":{color:c=>F(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>F(c,"text",e)}})}})}function yf(r={items:[]}){var a;let{items:n=[],direction:o="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:n,direction:o,color:e,accentColor:s};return O(E({_doctorDisable:"inline-typography",_context:{steps:{current:Hr((a=r.current)!=null?a:0),direction:o,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=Br(i,"stepsCurrent",r.current,0);m[i.tagName]=Ar(n,u,o,e,s)}},As("steps-items",i=>({update(m){let u=Br(i,"stepsCurrent",r.current,0);i.children.update(Ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:ie(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as Ks}from"@domphy/core";import{themeColor as Fr,themeSize as Ws}from"@domphy/theme";function xf(r={}){var o;let n=Ks((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Ws(e,"inherit"),fontWeight:"bold",color:e=>Fr(e,"shift-11",n.get(e)),backgroundColor:e=>Fr(e)}}}import{toState as js}from"@domphy/core";import{themeColor as qs,themeSize as Ys}from"@domphy/theme";function Tf(r={}){var o;let n=js((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Ys(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>qs(e,"text",n.get(e))}}}import{toState as Gs}from"@domphy/core";import{themeColor as Us,themeSize as Xs}from"@domphy/theme";function Lf(r={}){var o;let n=Gs((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Xs(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Us(e,"text",n.get(e))}}}import{toState as Zs}from"@domphy/core";import{themeColor as he,themeDensity as dt,themeSize as Kr,themeSpacing as pt}from"@domphy/theme";function Rf(r={}){var o;let n=Zs((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>Kr(e,"inherit"),color:e=>he(e,"text",n.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"shift-10",n.get(e)),backgroundColor:e=>he(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"text",n.get(e)),boxShadow:e=>`inset 0 1px 0 ${he(e,"shift-3",n.get(e))}`,fontSize:e=>Kr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>pt(dt(e)*3),paddingBlock:e=>pt(dt(e)*1),color:e=>he(e,"shift-10",n.get(e)),backgroundColor:e=>he(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${he(e,"shift-4",n.get(e))}`},"& tr":{backgroundColor:e=>he(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>he(e,"hover")}}}}import{behavior as Js,isState as Qs,toState as ec}from"@domphy/core";import{themeColor as Me,themeDensity as co,themeSize as tc,themeSpacing as _e}from"@domphy/theme";function Wr(r,n,o,e){if(Qs(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=ec(o!=null?o:e),r.setMetadata(n,s)),s}function jr(r,n,o,e,s){let t=r.nodeId,i={div:n.map((u,l)=>{var p;let c=(p=u.key)!=null?p:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:y=>o.get(y)===c,tabIndex:y=>o.get(y)===c?0:-1,onClick:()=>o.set(c),onKeyDown:y=>{var h;let T=y.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(T))return;y.preventDefault();let v=n.map((D,k)=>{var R;return(R=D.key)!=null?R:k}),f=v.indexOf(c),b=f;T==="ArrowRight"?b=(f+1)%v.length:T==="ArrowLeft"?b=(f-1+v.length)%v.length:T==="Home"?b=0:T==="End"&&(b=v.length-1),o.set(v[b]);let x=y.target.closest("[role=tablist]");(h=x==null?void 0:x.querySelectorAll("[role=tab]")[b])==null||h.focus()},style:{cursor:"pointer",fontSize:y=>tc(y,"inherit"),height:y=>_e(6+co(y)*2),paddingInline:y=>_e(co(y)*4),border:"none",outline:"none",color:y=>Me(y,"shift-13"),backgroundColor:y=>Me(y,"inherit"),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:y=>Me(y,"shift-13"),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:y=>Me(y,"shift-13",e),boxShadow:y=>`inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-8",e)}`},"&:focus-visible":{boxShadow:y=>S(y,e)},"&[aria-selected=true]:focus-visible":{boxShadow:y=>`${S(y,e)}, inset 0 ${_e(-.5)} 0 0 ${Me(y,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=n.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>_e(co(p)*2),paddingInline:p=>_e(co(p)*2)}}});return[i,...m]}function Bf(r={items:[]}){let{items:n=[],accentColor:o="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=Wr(t,"tabsActiveKey",r.activeKey,(u=(m=n[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=jr(t,n,i,o,e)}},Js("tabs-items",t=>({update(a){var m,u;let i=Wr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(jr(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:n,accentColor:o,color:e}))}import{behavior as oc,toState as qr}from"@domphy/core";import{themeColor as xe,themeDensity as sn,themeSize as nc,themeSpacing as mo}from"@domphy/theme";function jf(r={}){var s,t;let n=qr((s=r.color)!=null?s:"neutral","color"),o=qr((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return O(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},oc("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=()=>{u&&(m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return m.addEventListener("input",l),a.attributes.addListener("value",l),u&&l(),{resize:l,update(c){u=c.autoResize,a.attributes.addListener("value",l),u&&l()},destroy(){m.removeEventListener("input",l)}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>mo(sn(a)*2),paddingBlock:a=>mo(sn(a)*1.5),border:"none",borderRadius:a=>mo(sn(a)*1.5),fontSize:a=>nc(a,"inherit"),color:a=>xe(a,"text",n.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${xe(a,"border-strong",n.get(a))}`,backgroundColor:a=>xe(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>xe(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${xe(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,o.get(a))},"&:invalid":{outline:a=>`${mo(.5)} solid ${xe(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>xe(a,"muted","neutral"),outline:a=>`1px solid ${xe(a,"border-strong","neutral")}`,backgroundColor:a=>xe(a,"shift-2","neutral")}}})}import{toState as rc}from"@domphy/core";import{themeColor as Yr,themeDensity as cn,themeSpacing as uo}from"@domphy/theme";function Xf(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Zf(r={}){var t,a,i;let{last:n=!1}=r,o=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=rc((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>uo(cn(m)*2),paddingBottom:m=>n?"0":uo(cn(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:uo(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>Yr(m,"shift-8",s.get(m)?e:o),opacity:m=>s.get(m)?"1":"0.4"}},n?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>uo(cn(m)*-4),width:"2px",backgroundColor:m=>Yr(m,"shift-3",o)}})}}import{toState as ac}from"@domphy/core";import{themeColor as Gr,themeDensity as mn,themeSize as ic,themeSpacing as ht}from"@domphy/theme";function un(r){let n=r.getMetadata("toastOpen");return n||(n=ac(!1),r.setMetadata("toastOpen",n)),n}var Ur=r=>{let n=r==null?void 0:r.elementNode;return n?un(n).get(r):!1};function ny(r={}){let{position:n="top-center",color:o="neutral"}=r,e=n.startsWith("top"),s=n.endsWith("center"),t=n.endsWith("right"),a={div:[],id:`domphy-toast-${n}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:ht(4),zIndex:30,padding:ht(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${n}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:ht(32),pointerEvents:"auto",paddingBlock:i=>ht(mn(i)*2),paddingInline:i=>ht(mn(i)*4),borderRadius:i=>ht(mn(i)*2),fontSize:i=>ic(i,"inherit"),color:i=>Gr(i,"text",o),backgroundColor:i=>Gr(i,"inherit",o),boxShadow:V("medium"),opacity:i=>Number(Ur(i)),transform:i=>Ur(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>un(i).set(!0)),_onBeforeRemove:(i,m)=>{var f,b;let u=!1,l=null,c=!1,d=i.getRoot(),p=(b=(f=i.domElement)==null?void 0:f.parentElement)!=null?b:null,y=()=>{var h;if(c||!p||p.id!==`domphy-toast-${n}`||p.childElementCount>0)return;c=!0;let x=(h=d.children)==null?void 0:h.items.find(D=>D.domElement===p);x?d.children.remove(x):p.remove()},T=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),y())},v=x=>{x.propertyName==="transform"&&T()};i.domElement.addEventListener("transitionend",v),l=setTimeout(T,350),i.addHook("Remove",()=>{var x;l&&(clearTimeout(l),l=null),(x=i.domElement)==null||x.removeEventListener("transitionend",v),y()}),un(i).set(!1)}}}import{behavior as lc,isState as sc,toState as Jr}from"@domphy/core";import{themeColor as ge,themeSize as Qr,themeSpacing as Ne}from"@domphy/theme";function Xr(r,n,o,e){if(sc(o))return r.setMetadata(n,o),o;let s=r.getMetadata(n);return s||(s=Jr(o!=null?o:e),r.setMetadata(n,s)),s}function cc(r,n){return Array.isArray(r)?r.includes(n):r===n}function mc(r,n,o,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=n.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),i=a.indexOf(o),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function Zr(r,n,o,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>cc(n.get(l),i),tabIndex:l=>{var d,p,y,T,v;let c=n.get(l);if(o){let b=(y=(p=(Array.isArray(c)?c:[])[0])!=null?p:(d=r[0])==null?void 0:d.key)!=null?y:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(T=r[0])==null?void 0:T.key)!=null?v:"0")?0:-1},onClick:()=>{let l=n.get();if(o){let c=Array.isArray(l)?[...l]:[];n.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else n.set(l===i?"":i)},onKeyDown:l=>mc(l,r,i,n,o),style:{cursor:"pointer",fontSize:l=>Qr(l,"inherit"),height:Ne(6),paddingBlock:Ne(1),paddingInline:Ne(2),border:"none",borderRadius:Ne(1.5),color:l=>ge(l,"shift-13",e),backgroundColor:l=>ge(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>ge(l,"shift-13",e),backgroundColor:l=>ge(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>ge(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>ge(l,"shift-3",s),color:l=>ge(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function sy(r={items:[]}){var a;let{items:n=[],multiple:o=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:n,multiple:o,color:e,accentColor:s};return O(E({role:"group",_context:{toggleGroup:{value:Jr((a=r.value)!=null?a:o?[]:""),multiple:o}},_onSchedule:(i,m)=>{let u=Xr(i,"toggleGroupValue",r.value,o?[]:"");m[i.tagName]=Zr(n,u,o,e,s)}},lc("toggle-items",i=>({update(m){let u=Xr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(Zr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:Ne(1),paddingInline:Ne(1),gap:Ne(1),borderRadius:Ne(2),fontSize:i=>Qr(i,"inherit"),backgroundColor:i=>ge(i,"inherit",e),color:i=>ge(i,"text",e),outline:i=>`1px solid ${ge(i,"border",e)}`,outlineOffset:"-1px"}})}function dy(r={}){return kr({gap:r.gap})}function py(){return{div:null,style:{flex:"1 1 0"}}}import{merge as uc,toState as ea}from"@domphy/core";import{themeColor as ta,themeDensity as dn,themeSize as dc,themeSpacing as pn}from"@domphy/theme";function vy(r={}){let{open:n=!1,placement:o="top",content:e="Tooltip Content"}=r,s=ea(o),t=ea(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=me({kind:"tooltip",open:n,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>pn(dn(d)*1),paddingInline:d=>pn(dn(d)*3),borderRadius:d=>pn(dn(d)*1.5),color:d=>ta(d,"text"),backgroundColor:d=>ta(d),fontSize:d=>dc(d,"inherit"),boxShadow:V("low")},$:[yr({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),uc(u,{ariaDescribedby:d=>d!=null&&d.elementNode?X("tooltip",d.elementNode):void 0,onMouseEnter:(d,p)=>i(p),onMouseLeave:(d,p)=>m(p),onFocus:(d,p)=>i(p),onBlur:(d,p)=>m(p),onKeyDown:(d,p)=>d.key==="Escape"&&m(p)}),u}import{ElementNode as oa}from"@domphy/core";function na(r,n){return r.key!==void 0&&r.key!==null?String(r.key):`index-${n}`}function Ey(r={}){let{duration:n=300,delay:o=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof oa))return;let l=m.domElement;l&&e.set(na(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof oa))return;let l=m.domElement;if(!l)return;let c=na(m,u),d=e.get(c);if(!d)return;let p=l.getBoundingClientRect(),y=d.left-p.left,T=d.top-p.top;if(Math.abs(y)<.5&&Math.abs(T)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${y}px, ${T}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${n}ms ease ${o}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let f=!1,b=null,x=()=>{f||(f=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h),l.style.transition="",l.style.transform="")},h=k=>{k.propertyName==="transform"&&x()};s.set(l,()=>{f=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",h)}),l.addEventListener("transitionend",h),b=setTimeout(x,n+o+34),t.add(b)}),e.clear()}}}import{toState as pc}from"@domphy/core";import{themeColor as ra,themeSize as hc,themeSpacing as gc}from"@domphy/theme";function Dy(r={}){var o;let n=pc((o=r.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>hc(e,"inherit"),backgroundColor:e=>ra(e),color:e=>ra(e,"text",n.get(e)),marginTop:0,marginBottom:0,paddingLeft:gc(3),listStyleType:"disc",listStylePosition:"outside"}}}function Iy(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}export{Sc as abbreviation,Tc as accordion,Lc as alert,Rc as avatar,$c as badge,Fc as blockquote,qc as breadcrumb,Zc as breadcrumbEllipsis,mm as button,In as buttonGhost,fm as buttonSwitch,xm as card,Tm as code,Km as combobox,Um as command,Zm as commandItem,Xm as commandSearch,ru as datePicker,cu as descriptionList,hu as details,Cu as dialog,Tu as divider,zu as drawer,V as elevation,Nu as emphasis,Hu as empty,Ku as errorBoundary,Uu as fab,Qu as figure,S as focusRing,nd as formGroup,id as grid,ud as heading,gd as horizontalRule,Sd as icon,Ed as image,Pd as inputCheckbox,Vd as inputColor,$d as inputDateTime,Kd as inputFile,Gd as inputNumber,Zd as inputOTP,op as inputPassword,sp as inputRadio,pp as inputRange,bp as inputSearch,Ep as inputSwitch,Pp as inputText,zp as keyboard,_p as label,Hp as link,Yp as linkButton,Qp as list,eh as listItem,th as listItemButton,ah as mark,uh as menu,gh as motion,vh as orderedList,wh as pagination,Lh as panelSection,Mh as paragraph,Hh as popover,yr as popoverArrow,Gh as preformated,Jh as progress,ng as rating,sg as ringProgress,kr as row,gg as scrollArea,Cg as segmented,Tg as select,Rg as selectBox,Bg as selectItem,Kg as selectList,Yg as skeleton,Zg as small,tf as spinner,lf as splitter,cf as splitterHandle,sf as splitterPanel,df as stack,yf as steps,xf as strong,Tf as subscript,Lf as superscript,Rf as table,Bf as tabs,$t as tag,jf as textarea,Xf as timeline,Zf as timelineItem,ny as toast,sy as toggleGroup,dy as toolbar,py as toolbarSpacer,vy as tooltip,Ey as transitionGroup,Dy as unorderedList,Iy as visuallyHidden};
2
2
  //# sourceMappingURL=index.js.map