@domphy/ui 0.22.4 → 0.22.6
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/CHANGELOG.md +19 -0
- package/dist/core-theme-ui.global.js +6 -6
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -20
- package/dist/index.d.ts +0 -20
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var qa=Object.defineProperty,Ua=Object.defineProperties;var Ya=Object.getOwnPropertyDescriptors;var Bn=Object.getOwnPropertySymbols;var Ga=Object.prototype.hasOwnProperty,Ja=Object.prototype.propertyIsEnumerable;var Fn=(n,r,o)=>r in n?qa(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o,E=(n,r)=>{for(var o in r||(r={}))Ga.call(r,o)&&Fn(n,o,r[o]);if(Bn)for(var o of Bn(r))Ja.call(r,o)&&Fn(n,o,r[o]);return n},P=(n,r)=>Ua(n,Ya(r));import{toState as Kn}from"@domphy/core";import{themeColor as zt,themeSize as Xa,themeSpacing as Za}from"@domphy/theme";function xm(n={}){var e,i;let r=Kn((e=n.color)!=null?e:"neutral","color"),o=Kn((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Xa(t),backgroundColor:t=>zt(t),color:t=>zt(t,"shift-10",r.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>zt(t,"shift-7",r.get(t)),textUnderlineOffset:Za(.72),cursor:"help","&:hover":{color:t=>zt(t,"shift-11",o.get(t)),textDecorationColor:t=>zt(t,"shift-9",o.get(t))}}}}import{toState as jn}from"@domphy/core";import{themeColor as Lo,themeDensity as Qa,themeSpacing as ei}from"@domphy/theme";import{themeColor as Wn}from"@domphy/theme";function v(n,r="primary"){let o=Wn(n,"surface"),e=Wn(n,"shift-9",r);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function Pm(n={}){var i,t;let{type:r="single"}=n,o=jn((i=n.color)!=null?i:"neutral","color"),e=jn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{let l=a.domElement;if(!l)return;if(r==="single"){let u=s=>{let c=s.target.closest("summary");if(!c)return;let d=c.closest("details");!d||d.parentElement!==l||d.open||Array.from(l.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};l.addEventListener("click",u),a.addHook("Remove",()=>l.removeEventListener("click",u))}let m=u=>{var S;let s=u.key;if(!["ArrowUp","ArrowDown","Home","End"].includes(s))return;let c=u.target.closest("summary");if(!c)return;let d=c.closest("details");if(!d||d.parentElement!==l)return;let p=Array.from(l.querySelectorAll(":scope > details > summary")),f=p.indexOf(c);if(f===-1)return;let h=f;s==="ArrowDown"?h=(f+1)%p.length:s==="ArrowUp"?h=(f-1+p.length)%p.length:s==="Home"?h=0:s==="End"&&(h=p.length-1),u.preventDefault(),(S=p[h])==null||S.focus()};l.addEventListener("keydown",m),a.addHook("Remove",()=>l.removeEventListener("keydown",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>ei(Qa(a)*1.5),outline:a=>`1px solid ${Lo(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>Lo(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${Lo(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>v(a,e.get(a))}}}}import{toState as ti}from"@domphy/core";import{themeColor as Ro,themeDensity as zo,themeSize as oi,themeSpacing as Vt}from"@domphy/theme";function zm(n={}){var o;let r=ti((o=n.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:Vt(3),paddingBlock:e=>Vt(zo(e)*2),paddingInline:e=>Vt(zo(e)*4),borderRadius:e=>Vt(zo(e)*1.5),boxShadow:e=>`inset ${Vt(1)} 0 0 0 ${Ro(e,"shift-8",r.get(e))}`,backgroundColor:e=>Ro(e,"inherit",r.get(e)),color:e=>Ro(e,"shift-10",r.get(e)),fontSize:e=>oi(e,"inherit")}}}import{toState as ni}from"@domphy/core";import{themeColor as Vo,themeSize as ri,themeSpacing as qn,themeWeight as ai}from"@domphy/theme";function Nm(n={}){var o;let r=ni((o=n.color)!=null?o:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:qn(9),height:qn(9),fontSize:e=>ri(e,"inherit"),fontWeight:ai("semibold"),userSelect:"none",backgroundColor:e=>Vo(e,"inherit",r.get(e)),color:e=>Vo(e,"shift-11",r.get(e)),boxShadow:e=>`0 0 0 1px ${Vo(e,"border",r.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Un}from"@domphy/core";import{themeColor as Mo,themeDensity as Ao,themeSize as ii,themeSpacing as Jt,themeWeight as li}from"@domphy/theme";function Bm(n={}){var i;let{label:r=999}=n,o=Un(r),e=Un((i=n.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%,-50%)",paddingInline:t=>Jt(Ao(t)*(1.5/1.5)),minWidth:Jt(5),height:t=>Jt(Ao(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>ii(t,"decrease-2"),fontWeight:li("semibold"),lineHeight:1,borderRadius:t=>Jt(Ao(t)*999),backgroundColor:t=>Mo(t,"shift-9",e.get(t)),color:t=>Mo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${Mo(t,"shift-0",e.get(t))}`}}}}import{toState as si}from"@domphy/core";import{themeColor as No,themeDensity as Yn,themeSize as ci,themeSpacing as _o}from"@domphy/theme";function jm(n={}){var o;let r=si((o=n.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=>ci(e,"inherit"),backgroundColor:e=>No(e,"inherit",r.get(e)),color:e=>No(e,"text",r.get(e)),boxShadow:e=>`inset ${_o(1)} 0 0 0 ${No(e,"shift-4",r.get(e))}`,border:"none",paddingBlock:e=>_o(Yn(e)*2),paddingInline:e=>_o(Yn(e)*4),margin:0}}}import{toState as mi}from"@domphy/core";import{themeColor as $o,themeSize as ui,themeSpacing as Gn}from"@domphy/theme";function Gm(n={}){var e;let{separator:r="/"}=n,o=mi((e=n.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},_doctorDisable:"low-contrast",ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>ui(i,"inherit"),gap:Gn(1),color:i=>$o(i,"text",o.get(i)),backgroundColor:i=>$o(i,"inherit",o.get(i)),"& > *":{display:"inline-flex",alignItems:"center"},"& > *:not(:last-child)::after":{content:`"${r}"`,color:i=>$o(i,"muted",o.get(i)),paddingInlineStart:Gn(1)},"& > [aria-current=page]":{pointerEvents:"none"}}}}import{toState as di}from"@domphy/core";import{textToneOn as pi,themeColor as Ho,themeSize as fi,themeSpacing as Jn}from"@domphy/theme";function eu(n={}){var o;let r=di((o=n.color)!=null?o:"neutral","color");return{type:"button",_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=>fi(e,"inherit"),paddingInline:Jn(1),border:"none",background:"none",cursor:"pointer",color:e=>Ho(e,"text",r.get(e)),borderRadius:Jn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>Ho(e,pi(2),r.get(e)),backgroundColor:e=>Ho(e,"hover",r.get(e))},"&:focus-visible":{boxShadow:e=>v(e,r.get(e))}}}}import{toState as bi}from"@domphy/core";import{themeColor as Q,themeDensity as Qt,themeSize as Si,themeSpacing as eo}from"@domphy/theme";var lt={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as hi}from"@domphy/core";import{textToneOn as Xn,themeColor as st,themeDensity as Xt,themeSize as gi,themeSpacing as Zt}from"@domphy/theme";var yi={small:.5,medium:1,large:1.5};function Zn(n={}){var i,t,a;let r=hi((i=n.color)!=null?i:"neutral","color"),o=yi[(t=n.size)!=null?t:"medium"],e=lt[(a=n.size)!=null?a:"medium"];return{type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>gi(l,e),paddingBlock:l=>Zt(Xt(l)*o),paddingInline:l=>Zt(Xt(l)*o),borderRadius:l=>Zt(Xt(l)*1.5),display:"inline-flex",width:"fit-content",justifyContent:"center",alignItems:"center",gap:l=>Zt(Xt(l)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:l=>st(l,"text",r.get(l)),"&:hover:not([disabled]):not([aria-busy=true])":{color:l=>st(l,Xn(2),r.get(l)),backgroundColor:l=>st(l,"hover",r.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{color:l=>st(l,Xn(2),r.get(l)),backgroundColor:l=>st(l,"increase-2",r.get(l))},"&:focus-visible":{boxShadow:l=>v(l,r.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:l=>st(l,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var vi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function pu(n={}){var a,l,m,u;let r=(a=n.variant)!=null?a:"outline";if(r==="ghost")return Zn({color:n.color,size:n.size});let o=bi((l=n.color)!=null?l:"primary","color"),e=r==="solid",i=vi[(m=n.size)!=null?m:"medium"],t=lt[(u=n.size)!=null?u:"medium"];return P(E({type:"button",_onInsert:s=>{s.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:s=>Si(s,t),paddingBlock:s=>eo(Qt(s)*i.block),paddingInline:s=>eo(Qt(s)*i.inline),borderRadius:s=>eo(Qt(s)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:s=>eo(Qt(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":s=>`1px solid ${Q(s,"border-strong",o.get(s))}`,color:s=>e?Q(s,"shift-0","neutral"):Q(s,"shift-13",o.get(s)),backgroundColor:s=>e?Q(s,"shift-13",o.get(s)):Q(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:s=>e?Q(s,"shift-0","neutral"):Q(s,"shift-14",o.get(s)),backgroundColor:s=>e?Q(s,"shift-14",o.get(s)):Q(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:s=>e?Q(s,"shift-15",o.get(s)):Q(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:s=>Q(s,"shift-2","neutral"),outline:s=>`1px solid ${Q(s,"border-strong","neutral")}`,color:s=>Q(s,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Bo}from"@domphy/core";import{textToneOn as Ei,themeColor as Le,themeSize as xi,themeSpacing as se}from"@domphy/theme";function Su(n={}){var t,a;let{checked:r=!1}=n,o=Bo(r),e=Bo((t=n.color)!=null?t:"neutral","color"),i=Bo((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:l=>{l.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaLabel:"Toggle",ariaChecked:l=>o.get(l),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>xi(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${Le(l,"shift-7",e.get(l))}`,minWidth:se(12),minHeight:se(6),width:"fit-content",flexShrink:0,borderRadius:se(999),paddingInlineStart:se(7),paddingInlineEnd:se(2),cursor:"pointer",transition:"padding-inline-start 0.3s, padding-inline-end 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:l=>Le(l,"inherit",e.get(l)),color:l=>Le(l,"text",e.get(l)),"&:focus-visible":{boxShadow:l=>v(l,i.get(l))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",insetInlineStart:se(.5),top:"50%",transform:"translateY(-50%)",transition:"inset-inline-start 0.3s",width:se(5),height:se(5),borderRadius:se(999),color:l=>Le(l,"text"),backgroundColor:l=>Le(l,"decrease-2",e.get(l)),outline:l=>`1px solid ${Le(l,"shift-7",e.get(l))}`,outlineOffset:"-1px"},"&[aria-checked=true]":{backgroundColor:l=>Le(l,"increase-3",i.get(l)),outline:"none",color:l=>Le(l,Ei(3),i.get(l)),paddingInlineStart:se(2),paddingInlineEnd:se(7)},"&[aria-checked=true] > :first-child":{insetInlineStart:`calc(100% - ${se(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ki}from"@domphy/core";import{themeColor as ct,themeDensity as Ce,themeSpacing as he,themeWeight as wi}from"@domphy/theme";var Ci={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 A(n){return Ci[n]}function wu(n={}){var o;let r=ki((o=n.color)!=null?o:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>he(Ce(e)*2),backgroundColor:e=>ct(e,"inherit",r.get(e)),color:e=>ct(e,"shift-10",r.get(e)),outline:e=>`1px solid ${ct(e,"border-strong",r.get(e))}`,outlineOffset:"-1px",boxShadow:A("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>he(Ce(e)*2),paddingInline:e=>he(Ce(e)*4),fontWeight:wi("semibold"),color:e=>ct(e,"shift-11",r.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>he(Ce(e)*4),paddingBottom:e=>he(Ce(e)*2),color:e=>ct(e,"text",r.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>he(Ce(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>he(Ce(e)*4)},"& > footer":{gridArea:"footer",display:"flex",gap:he(2),paddingBlock:e=>he(Ce(e)*2),paddingInline:e=>he(Ce(e)*4),borderTop:e=>`1px solid ${ct(e,"border",r.get(e))}`}}}}import{toState as Ti}from"@domphy/core";import{themeColor as Qn,themeDensity as Fo,themeFont as Di,themeSize as Ii,themeSpacing as Ko}from"@domphy/theme";function Pu(n={}){var o;let r=Ti((o=n.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=>Ii(e,"inherit"),fontFamily:Di("monospace"),color:e=>Qn(e,"text",r.get(e)),backgroundColor:e=>Qn(e,"inherit",r.get(e)),height:e=>Ko(Fo(e)*(6/1.5)),paddingInline:e=>Ko(Fo(e)*(1.5/1.5)),borderRadius:e=>Ko(Fo(e)*(1/1.5))}}}import{behavior as Ji,merge as Yo,toState as ro}from"@domphy/core";import{themeColor as Ue,themeDensity as ao,themeSize as ir,themeSpacing as Ve}from"@domphy/theme";import{toState as Pi}from"@domphy/core";import{themeColor as er}from"@domphy/theme";var Oi="text",Wo="shift-11";function ce(n="neutral"){let r=Pi(n,"color");return{color:o=>er(o,Wo,r.get(o)),"&::placeholder":{color:o=>er(o,Oi,r.get(o))}}}import{behavior as zi,merge as Vi}from"@domphy/core";import{autoUpdate as Mi,computePosition as Ai,flip as Ni,offset as _i,shift as $i}from"@domphy/floating";import{effect as tr,toState as Li}from"@domphy/core";function Ri(n){return typeof n.set=="function"}function re(n,r,o=!0){if(typeof n.addListener=="function")return o&&r(n.get()),n.addListener(r);if(o)return tr(()=>{r(n.get())});let e=!0,i=tr(()=>{let t=n.get();e||r(t)});return e=!1,i}function jo(n,r){Ri(n)&&n.set(r)}function Re(n,r){r==null||r(),jo(n,!1)}function mt(n){return Li(n!=null?n:!1)}var or=100;function ee(n,r){return`domphy-${n}-${r.nodeId}`}var qo="data-domphy-floating",Uo=`:scope > [${qo}]`,nr="data-domphy-floating-kind";function to(n){let r=n.querySelector(Uo);return r?Array.from(r.children).some(o=>o.getAttribute(nr)!=="tooltip"):!1}function Hi(n,r){var Yt,at,Lt,Gt;let{openState:o,onDismiss:e,placement:i,content:t,keepOpenOnContentHover:a,openDelay:l,closeDelay:m}=r,{kind:u}=r,s=`floating:${u}`,c=null,d=null,p=null,f=null,h=!1,S=n.domElement,x=n.getRoot(),L=ee(u,n),T={style:{position:"fixed",pointerEvents:"auto",visibility:R=>o.get(R)?"visible":"hidden"},onKeyDown:R=>{R.key==="Escape"&&oe()&&(R.stopPropagation(),N())},onMouseEnter:()=>a&&G(),onMouseLeave:()=>a&&N(),_onMount:R=>{var H;if(p=R.domElement,p.id||(p.id=L),p.setAttribute(nr,u),S&&p&&!p.hasAttribute("data-theme")){let ne=(H=S.closest("[data-theme]"))==null?void 0:H.getAttribute("data-theme");ne&&p.setAttribute("data-theme",ne)}},_portal:R=>{let H=S.closest("dialog");if(H){let X=H.querySelector(Uo);return X||(X=H.ownerDocument.createElement("div"),X.setAttribute(qo,""),Object.assign(X.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),H.appendChild(X)),X}let ne=R.domElement.querySelector(Uo);if(!ne){let X={div:[],[qo]:"",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};ne=R.children.insert(X).domElement}return ne}},b=R=>Vi(R,T);b(t);let k=()=>{h||(h=!0,f=x.children.insert(t),f._behaviorInstances.set(s,nt))},C=()=>{f&&(f._behaviorInstances.delete(s),f.remove(),f=null)},g=()=>{h&&(!p||!p.isConnected)&&(d==null||d(),d=null,f=null,p=null,h=!1),k(),S&&p&&(d==null||d(),d=Mi(S,p,()=>{Ai(S,p,{placement:i.get(),middleware:[_i(12),Ni(),$i()],strategy:"fixed"}).then(({x:R,y:H,placement:ne})=>{p&&(Object.assign(p.style,{left:`${R}px`,top:`${H}px`}),i.set(ne))})}),jo(o,!0))},O=()=>{if(!p)return!1;let H=p.getRootNode().activeElement;return!!H&&p.contains(H)},I=()=>{var ne,X,Rt;if(!S)return;(ne=S.focus)==null||ne.call(S);let H=S.getRootNode().activeElement;H&&S.contains(H)||(Rt=(X=S.querySelector('input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'))==null?void 0:X.focus)==null||Rt.call(X)},_=()=>{d==null||d(),d=null;let R=O();C(),p=null,h=!1,R&&I(),Re(o,e)},G=()=>{c&&clearTimeout(c),c=setTimeout(g,l)},N=()=>{c&&clearTimeout(c),c=setTimeout(_,m)},B=R=>{if(!o.get()||!S||!p)return;let H=R.target;!S.contains(H)&&!p.contains(H)&&N()};(Yt=x.domElement)==null||Yt.addEventListener("click",B);let oe=()=>{var R;return!!p&&((R=p.parentElement)==null?void 0:R.lastElementChild)===p},K=R=>{R.key==="Escape"&&o.get()&&oe()&&N()},ae=(Gt=(Lt=(at=x.domElement)==null?void 0:at.ownerDocument)!=null?Lt:x.domElement)!=null?Gt:null;ae==null||ae.addEventListener("keydown",K);let ie=R=>{R?h||g():h&&_()},J=()=>{},We=!1,fe=!1,nt,rt=R=>{var H;R._behaviors=P(E({},(H=R._behaviors)!=null?H:{}),{[s]:{attach:()=>nt,props:{}}})};return nt={show:G,hide:N,panelId:L,update(R){if(!fe&&(e=R.onDismiss,R.openState!==o&&(J(),o=R.openState,J=re(o,ie,!1),o.get()&&g()),i=R.placement,t=R.content,a=R.keepOpenOnContentHover,l=R.openDelay,m=R.closeDelay,b(t),rt(t),f)){fe=!0;try{f.patch(t)}finally{fe=!1}}},destroy(){var R;We||(We=!0,c&&clearTimeout(c),c=null,d==null||d(),d=null,C(),p=null,h=!1,J(),J=()=>{},(R=x.domElement)==null||R.removeEventListener("click",B),ae==null||ae.removeEventListener("keydown",K))}},rt(t),J=re(o,ie),nt}function ge(n){var u,s;let{kind:r,placement:o,onDismiss:e}=n,i=mt(n.open),t=`floating:${r}`,a=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.show()},l=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.hide()},m=E({onKeyDown:(c,d)=>c.key==="Escape"&&l(d)},zi(t,Hi,{kind:r,openState:i,onDismiss:e,placement:o,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover,openDelay:(u=n.openDelay)!=null?u:or,closeDelay:(s=n.closeDelay)!=null?s:or}));return{show:a,hide:l,anchorPartial:m,openState:i}}function je(n){return n?Array.from(n.querySelectorAll("[role=option]")).filter(r=>r.getAttribute("aria-disabled")!=="true"&&!r.hasAttribute("disabled")):[]}import{behavior as Bi,ElementNode as Fi,rawHtml as Ki,toState as Wi}from"@domphy/core";import{themeColor as oo,themeDensity as qe,themeSize as ji,themeSpacing as ze}from"@domphy/theme";var qi='<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>',Mt=1.5,Ui=6/Mt,rr=2.5/Mt,Yi=1/Mt,ar=4/Mt,Gi=1/Mt;function no(n={}){var e;let{removable:r=!1}=n,o=Wi((e=n.color)!=null?e:"neutral","color");return P(E({dataTone:"shift-2"},Bi("tag-remove",(i,t)=>{let a=()=>i.remove(),l=()=>({span:Ki(qi),_key:"tag-remove",onClick:s=>{s.stopPropagation(),a()},onKeyDown:s=>{let c=s;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:s=>ze(qe(s)*Gi),width:s=>ze(qe(s)*ar),height:s=>ze(qe(s)*ar),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:s=>oo(s,"shift-4",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))}}}),m=()=>{var s;return(s=i.children.items.find(c=>c instanceof Fi&&c.key==="tag-remove"))!=null?s:null},u=s=>{let c=m();s.removable&&!c?i.children.insert(l()):!s.removable&&c&&i.children.remove(c)};return u(t),{update:u}},{removable:r})),{style:{display:"inline-flex",width:"fit-content",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:i=>ze(qe(i)*Ui),paddingBlock:0,borderRadius:i=>ze(qe(i)*999),paddingInlineStart:i=>ze(qe(i)*rr),paddingInlineEnd:i=>ze(qe(i)*(r?Yi:rr)),gap:ze(1.5),fontSize:i=>ji(i,"decrease-1"),backgroundColor:i=>oo(i,"inherit",o.get(i)),color:i=>oo(i,"text",o.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${oo(i,"border-strong",o.get(i))}`}})}function od(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=ro(n.value),l=ro(i),{show:m,hide:u,anchorPartial:s}=ge({kind:"combobox",open:l,onDismiss:n.onDismiss,placement:ro(o),content:n.content}),c={onClick:(g,O)=>!t&&u(O),dataTone:"shift-0",style:{backgroundColor:g=>Ue(g,"inherit"),color:g=>Ue(g,"text"),borderRadius:g=>Ve(ao(g)*2),outline:g=>`1px solid ${Ue(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};Yo(n.content,c);let d=P(E({border:"none",outline:"none",padding:0,margin:0,flex:1,height:Ve(6),marginInlineStart:Ve(2),fontSize:g=>ir(g,"inherit")},ce(e)),{backgroundColor:g=>Ue(g,"inherit",e)}),p=g=>{var O,I;return(I=(O=g==null?void 0:g.elementNode)==null?void 0:O.getBehavior("comboboxInner"))==null?void 0:I.query},f=g=>{let O=g;for(;O;){if(O._behaviorInstances.has("floating:combobox"))return O;O=O.parent}return g},h=(g,O)=>{var oe,K;let I=f(g),_=I.getRoot().domElement,G=(oe=_==null?void 0:_.querySelector(`#${ee("combobox",I)}`))!=null?oe:null,N=je(G);if(!N.length)return;let B=N[O?N.length-1:0];B.focus(),(K=B.scrollIntoView)==null||K.call(B,{block:"nearest"})},S=(g,O)=>{let I;I=re(l,_=>{_&&(I==null||I(),requestAnimationFrame(()=>h(g,O)))},!1),m(g)},L={role:"combobox",ariaHaspopup:"listbox",ariaAutocomplete:"list",ariaExpanded:g=>l.get(g),ariaControls:g=>g!=null&&g.elementNode?ee("combobox",f(g.elementNode)):void 0,onKeyDown:(g,O)=>{let I=g.key;if(!(I!=="ArrowDown"&&I!=="ArrowUp")){if(g.preventDefault(),l.get()){h(O,I==="ArrowUp");return}S(O,I==="ArrowUp")}}},T=g=>g?(Yo(g,E({onClick:(O,I)=>m(I),style:d,_key:"combobox-input"},L)),g):E({input:null,ariaLabel:"Filter options",onClick:(O,I)=>m(I),value:O=>{var I,_;return(_=(I=p(O))==null?void 0:I.get(O))!=null?_:""},onInput:(O,I)=>{var _;(_=I.getBehavior("comboboxInner"))==null||_.query.set(O.target.value),m(I)},style:d,_key:"combobox-input"},L),b=g=>({div:O=>{l.get(O);let I=g.state.get(O),_=Array.isArray(I)?I:[I],N=g.options.filter(B=>_.includes(B.value)).map(B=>({span:B.label,$:[no({color:g.color,removable:!0})],_key:B.value,_onRemove:oe=>{let K=g.state.get(),ie=(Array.isArray(K)?K:[K]).filter(J=>J!==B.value);g.multiple?g.state.set(ie):g.state.set(ie[0])}}));return N.push(T(g.input)),N},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:Ve(1)}}),C=P(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,O)=>{O[g.tagName]=[b({options:r,multiple:t,color:e,state:a,input:n.input})]}},Ji("comboboxInner",(g,O)=>{let I=g.getMetadata("comboboxQuery");return I||(I=ro(""),g.setMetadata("comboboxQuery",I)),{query:I,update(_){g.children.update([b(_)])}}},{options:r,multiple:t,color:e,state:a,input:n.input})),{style:{minWidth:Ve(32),outlineOffset:"-1px",outline:g=>`1px solid ${Ue(g,"border-strong","neutral")}`,paddingBlock:g=>Ve(ao(g)*1),paddingInline:g=>Ve(ao(g)*1),borderRadius:g=>Ve(ao(g)*1.5),fontSize:g=>ir(g,"inherit"),color:g=>Ue(g,"text",e),backgroundColor:g=>Ue(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>v(g,e)}}});return Yo(s,C),s}import{merge as Xi,toState as Zi}from"@domphy/core";import{themeColor as Ye,themeDensity as io,themeSize as lr,themeSpacing as lo}from"@domphy/theme";function Qi(n){return Array.from(n.querySelectorAll("[data-command-item]")).filter(r=>!r.hidden&&!r.hasAttribute("disabled"))}function el(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=Qi(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=(a+1)%i.length;else if(o==="ArrowUp")l=a<=0?i.length-1:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function cd(){return{role:"group",ariaLabel:"Commands",onKeyDown:el,_onSchedule:(n,r)=>{Xi(r,{_context:{command:{query:Zi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function md(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:P(E({fontSize:e=>lr(e,"inherit"),paddingInline:e=>lo(io(e)*3),paddingBlock:e=>lo(io(e)*2),border:"none",borderBottom:e=>`1px solid ${Ye(e,"border",r)}`,outline:"none"},ce(r)),{backgroundColor:e=>Ye(e,"inherit",r),transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>Ye(e,"shift-6",o),boxShadow:e=>v(e,o)}})}}function ud(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{type:"button",dataCommandItem:"",_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=m=>{var s,c;if(m.length===0){t.hidden=!1;return}let u=(c=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?c:"";t.hidden=!u.includes(m.toLowerCase())};a(i.query.get());let l=i.query.addListener(a);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>lr(e,"inherit"),height:e=>lo(6+io(e)*2),paddingInline:e=>lo(io(e)*3),border:"none",outline:"none",color:e=>Ye(e,"shift-13",r),backgroundColor:e=>Ye(e,"inherit",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>Ye(e,"shift-13",r),backgroundColor:e=>Ye(e,"hover",r)},"&:focus-visible":{boxShadow:e=>v(e,o)}}}}import{behavior as tl,merge as ol,toState as ye}from"@domphy/core";import{textToneOn as Qo,themeColor as F,themeDensity as nl,themeSize as ut,themeSpacing as j,themeWeight as Go}from"@domphy/theme";var q=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),Ge=(n,r)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+r),Jo=(n,r)=>new Date(n.getFullYear(),n.getMonth()+r,n.getDate()),At=(n,r)=>!!n&&!!r&&n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate(),Xo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,Zo=(n,r)=>Ge(n,-((n.getDay()-r+7)%7));function rl(n){var r,o;try{let e=new Intl.Locale(n),i=(o=(r=e.getWeekInfo)==null?void 0:r.call(e))!=null?o:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function al(n,r){let o=r,e=null,i=a=>{e==null||e(),e=a.onChange?a.selection.addListener(l=>a.onChange(l)):null},t=(a,l)=>{a!==l&&a.set(l.get())};return i(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)&&i(a),o=a},destroy(){e==null||e(),e=null}}}function Sd(n={}){var Nn,_n,$n,Hn;let{mode:r="single",time:o=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:m}=n,u=(Nn=n.weekStartsOn)!=null?Nn:rl(a),s=ye((_n=n.accentColor)!=null?_n:"primary","accentColor"),c=ye(($n=n.placement)!=null?$n:"bottom-start"),d=ye((Hn=n.value)!=null?Hn:r==="range"?[null,null]:null),p=(()=>{let y=d.get(),w=r==="range"?y==null?void 0:y[0]:y;return w instanceof Date?w:new Date})(),f=ye(p.getFullYear(),"viewYear"),h=ye(p.getMonth(),"viewMonth"),S=ye(q(p),"focused"),x=ye(null,"hovered"),L=ye(p.getHours(),"hour"),T=ye(p.getMinutes(),"minute"),b=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),k=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),C=new Intl.DateTimeFormat(a,{weekday:"short"}),g=new Intl.DateTimeFormat(a,{dateStyle:"full"}),O=y=>y?b.format(y):"",I=y=>{if(l)return l(y);if(r==="range"){let[w,D]=y!=null?y:[null,null];return w?`${O(w)} \u2013 ${O(D)}`:""}return O(y)},_=Array.from({length:7},(y,w)=>C.format(new Date(2023,0,1+(w+u)%7))),G=y=>!!e&&q(y)<q(e)||!!i&&q(y)>q(i)||!!t&&t(y),N=y=>{if(!o)return q(y);let w=q(y);return w.setHours(L.get(),T.get(),0,0),w},B=(y,w)=>{var z;if(G(y))return;if(r==="single"){d.set(N(y)),o||at(w);return}let[D,V]=(z=d.get())!=null?z:[null,null];!D||D&&V?d.set([N(y),null]):q(y)<q(D)?(d.set([N(y),N(D)]),o||at(w)):(d.set([D,N(y)]),o||at(w))},oe=()=>{var y;if(o)if(r==="single"){let w=d.get();w&&d.set(N(w))}else{let[w,D]=(y=d.get())!=null?y:[null,null];d.set([w&&N(w),D&&N(D)])}},K=(y,w)=>{var it;if(r!=="range")return!1;let[D,V]=(it=d.get(w))!=null?it:[null,null],z=V!=null?V:x.get(w);if(!D||!z)return!1;let M=q(D)<=q(z)?D:z,le=q(D)<=q(z)?z:D,Z=q(y);return Z>=q(M)&&Z<=q(le)},ae=(y,w)=>{let D=d.get(w);if(r==="range"){let[V,z]=D!=null?D:[null,null];return At(y,V)||At(y,z)}return At(y,D)},ie=y=>{f.set(y.getFullYear()),h.set(y.getMonth())},J=y=>{let w=Jo(new Date(f.get(),h.get(),1),y);ie(w)},We=y=>f.set(f.get()+y),fe=y=>{var D;let w=(D=y==null?void 0:y.getRoot())==null?void 0:D.domElement;setTimeout(()=>{var V;(V=w==null?void 0:w.querySelector(`[data-date="${Xo(S.get())}"]`))==null||V.focus()},0)},nt=ne(),rt=ye(!1),{show:Yt,hide:at,anchorPartial:Lt}=ge({kind:"datePicker",open:rt,placement:c,content:nt}),Gt=E({type:"text",readonly:!0,value:y=>I(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>rt.get(y),ariaControls:y=>y!=null&&y.elementNode?ee("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,w)=>{R(w)},onKeyDown:(y,w)=>{let D=y.key;(D==="ArrowDown"||D==="Enter")&&(y.preventDefault(),R(w))}},tl("datePicker",al,{selection:d,selectionIsCallerOwned:n.value!==void 0,viewYear:f,viewMonth:h,focused:S,hovered:x,hour:L,minute:T,open:rt,onChange:m}));function R(y){var D;let w=(D=H())!=null?D:new Date;S.set(q(w)),ie(w),Yt(y),fe(y)}function H(){var w;let y=d.get();return r==="range"?(w=y==null?void 0:y[0])!=null?w:null:y!=null?y:null}return ol(Lt,Gt),Lt;function ne(){let y=(M,le,Z)=>({button:M,type:"button",ariaLabel:le,onClick:Z,style:il()}),w={div:[y("\xAB","Previous year",()=>We(-1)),y("\u2039","Previous month",()=>J(-1)),{div:M=>k.format(new Date(f.get(M),h.get(M),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:Go("bold"),fontSize:M=>ut(M)}},y("\u203A","Next month",()=>J(1)),y("\xBB","Next year",()=>We(1))],style:{display:"flex",alignItems:"center",gap:j(1),marginBottom:j(2)}},D={div:_.map((M,le)=>({div:M,style:{textAlign:"center",fontSize:Z=>ut(Z,"decrease-1"),fontWeight:Go("bold"),color:Z=>F(Z,"shift-7"),paddingBlock:j(1)},_key:le})),role:"row",style:sr()},V={div:M=>X(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Wa,onMouseLeave:()=>r==="range"&&x.set(null),style:{display:"flex",flexDirection:"column",gap:j(.5)}},z=[w,D,V];return o&&z.push(Fa()),z.push(Ka()),{div:z,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:j(70),padding:j(3),borderRadius:M=>j(nl(M)*2),backgroundColor:M=>F(M,"inherit"),color:M=>F(M,"text"),outline:M=>`1px solid ${F(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}}}function X(y){let w=new Date(f.get(y),h.get(y),1),D=h.get(y),V=Zo(w,u),z=[];for(let M=0;M<6;M++){let le=[];for(let Z=0;Z<7;Z++){let it=Ge(V,M*7+Z);le.push(Rt(it,D,y))}z.push({div:le,role:"row",style:sr(),_key:M})}return z}function Rt(y,w,D){let V=G(y),z=ae(y,D),M=K(y,D),le=y.getMonth()!==w,Z=At(y,S.get(D)),it=At(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:Z?0:-1,ariaSelected:z,ariaDisabled:V,disabled:V,ariaLabel:g.format(y),dataDate:Xo(y),onClick:($,ja)=>B(y,ja),onMouseEnter:()=>r==="range"&&x.set(y),style:{appearance:"none",border:"none",cursor:V?"not-allowed":"pointer",aspectRatio:"1",borderRadius:j(1),fontSize:$=>ut($),opacity:V?.35:le?.5:1,backgroundColor:$=>z?F($,"shift-13",s.get($)):M?F($,"hover",s.get($)):"transparent",color:$=>z?F($,"shift-0","neutral"):M?F($,Qo(2)):F($,"text"),outline:it?$=>`1px solid ${F($,"shift-6",s.get($))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":E({backgroundColor:$=>z?F($,"shift-13",s.get($)):F($,"shift-3",s.get($))},z?{}:{color:$=>F($,Qo(3))}),transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:$=>v($,s.get($))}},_key:Xo(y)}}function Fa(){let y=(w,D,V)=>({select:Array.from({length:w},(z,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:le=>D.get(le)===M,_key:M})),ariaLabel:V,onChange:z=>{D.set(Number(z.target.value)),oe()},style:ll()});return{div:[y(24,L,"Hour"),{span:":",style:{fontWeight:Go("bold")}},y(60,T,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:j(1),marginTop:j(3)}}}function Ka(){let y=(w,D)=>({button:w,type:"button",onClick:(V,z)=>D(z),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:V=>ut(V,"decrease-1"),color:V=>F(V,"muted",s.get(V)),padding:j(1)}});return{div:[y("Today",w=>{let D=new Date;S.set(q(D)),ie(D),fe(w)}),y("Clear",()=>{d.set(r==="range"?[null,null]:null),x.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:j(2),paddingTop:j(2),borderTop:w=>`1px solid ${F(w,"border")}`}}}function Wa(y,w){let D=y,V=S.get(),z=null;switch(D.key){case"ArrowLeft":z=Ge(V,-1);break;case"ArrowRight":z=Ge(V,1);break;case"ArrowUp":z=Ge(V,-7);break;case"ArrowDown":z=Ge(V,7);break;case"Home":z=Zo(V,u);break;case"End":z=Ge(Zo(V,u),6);break;case"PageUp":z=Jo(V,D.shiftKey?-12:-1);break;case"PageDown":z=Jo(V,D.shiftKey?12:1);break;case"Enter":case" ":D.preventDefault(),B(V,w);return;default:return}D.preventDefault(),S.set(z),ie(z),fe(w)}}function sr(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:j(.5)}}function il(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:n=>ut(n),color:n=>F(n,"muted"),width:j(7),height:j(7),borderRadius:j(1),"&:hover":{backgroundColor:n=>F(n,"shift-3"),color:n=>F(n,Qo(3))}}}function ll(){return{fontSize:n=>ut(n),padding:j(1),borderRadius:j(1),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${F(n,"border-strong")}`,backgroundColor:n=>F(n,"inherit"),color:n=>F(n,"text")}}import{toState as sl}from"@domphy/core";import{themeColor as cr,themeSize as mr,themeSpacing as ur,themeWeight as cl}from"@domphy/theme";function kd(n={}){var o;let r=sl((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${ur(24)}, max-content) 1fr`,columnGap:ur(4),margin:0,"& dt":{margin:0,fontWeight:cl("semibold"),fontSize:e=>mr(e,"inherit"),color:e=>cr(e,"shift-10",r.get(e))},"& dd":{margin:0,fontSize:e=>mr(e,"inherit"),color:e=>cr(e,"text",r.get(e))}}}}import{toState as dr}from"@domphy/core";import{textToneOn as ml,themeColor as Me,themeDensity as Nt,themeSize as pr,themeSpacing as me,themeWeight as ul}from"@domphy/theme";function Pd(n={}){var i,t;let{duration:r=240}=n,o=dr((i=n.color)!=null?i:"neutral","color"),e=dr((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>pr(a,"inherit"),color:a=>Me(a,"text",o.get(a)),backgroundColor:a=>Me(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>Me(a,"shift-2",o.get(a)),color:a=>Me(a,"shift-11",o.get(a)),fontSize:a=>pr(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:me(2),cursor:"pointer",userSelect:"none",fontWeight:ul("medium"),paddingInline:a=>me(Nt(a)*4),height:me(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:me(2),height:me(2),flexShrink:0,marginTop:me(-.5),borderInlineEnd:a=>`${me(.5)} solid ${Me(a,"shift-9",o.get(a))}`,borderBottom:a=>`${me(.5)} solid ${Me(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${r}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>Me(a,"shift-3",o.get(a)),color:a=>Me(a,ml(3),o.get(a))},"& > summary:focus-visible":{borderRadius:a=>me(Nt(a)*2),boxShadow:a=>v(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>me(Nt(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${r}ms ease, opacity ${r}ms ease, padding ${r}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>me(Nt(a)*1),paddingBottom:a=>me(Nt(a)*3)}}}}import{behavior as dl}from"@domphy/core";import{themeColor as en,themeDensity as fr,themeSize as pl,themeSpacing as hr}from"@domphy/theme";var _t=0;function so(){_t++,_t===1&&(document.body.style.overflow="hidden")}function dt(){_t=Math.max(0,_t-1),_t===0&&(document.body.style.overflow="")}var gr='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function fl(n,r){let{state:o,onDismiss:e}=r,i=null,t=!1,a=!1,l=null,m=n.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(dt(),a=!1),i==null||i.focus(),i=null},s=f=>{if(f.key!=="Tab")return;let h=Array.from(m.querySelectorAll(gr)).filter(L=>!L.closest("[aria-hidden='true']")&&L.getClientRects().length>0);if(!h.length){f.preventDefault();return}let S=h[0],x=h[h.length-1];f.shiftKey?(document.activeElement===S||document.activeElement===m)&&(f.preventDefault(),x.focus()):document.activeElement===x&&(f.preventDefault(),S.focus())},c=f=>{f.preventDefault(),!to(m)&&Re(o,e)};m.addEventListener("cancel",c);let d=f=>{if(f)t=!1,l&&(clearTimeout(l),l=null),i=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(so(),a=!0),m.addEventListener("keydown",s),requestAnimationFrame(()=>{var S;m.style.opacity="1";let h=(S=m.querySelector("[autofocus]:not([disabled])"))!=null?S:m.querySelector(gr);h==null||h.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",s),!m.open){u();return}l=setTimeout(()=>{l=null,t&&u()},350)}},p=re(o,d);return{requestClose:()=>Re(o,e),onTransitionEnd:f=>{t&&f.target===m&&f.propertyName==="opacity"&&u()},update(f){e=f.onDismiss,f.state!==o&&(p(),o=f.state,p=re(o,d,!1))},destroy(){l&&(clearTimeout(l),l=null),p(),m.removeEventListener("cancel",c),a&&(dt(),a=!1),m.removeEventListener("keydown",s),i==null||i.focus(),i=null}}}function _d(n={}){let{color:r="neutral",open:o=!1,labelledBy:e,describedBy:i,onDismiss:t}=n,a=mt(o);return P(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},dl("dialog",fl,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:i,onClick:(l,m)=>{var c;if(l.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();l.clientX>=u.left&&l.clientX<=u.right&&l.clientY>=u.top&&l.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(l,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(l)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:l=>pl(l,"inherit"),color:l=>en(l,"shift-10",r),backgroundColor:l=>en(l,"inherit",r),border:"none",borderRadius:l=>hr(fr(l)*2),padding:l=>hr(fr(l)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:l=>en(l,"shift-2","neutral"),opacity:.75}}})}import{toState as hl}from"@domphy/core";import{themeColor as co,themeSize as gl,themeSpacing as yl}from"@domphy/theme";function Kd(n={}){var o;let r=hl((o=n.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:yl(2),fontSize:e=>gl(e,"inherit"),backgroundColor:e=>co(e),color:e=>co(e,"text",r.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>co(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>co(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as bl}from"@domphy/core";import{themeColor as tn,themeDensity as Sl,themeSize as vl,themeSpacing as $t}from"@domphy/theme";var on={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},yr={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},pt=n=>n==="left"||n==="right";function br(n,r){return n==="start"?r?"right":"left":n==="end"?r?"left":"right":n}function El(n,r){let{state:o,onDismiss:e,placement:i,size:t}=r,a=n.domElement;a.setAttribute("aria-modal","true");let l=x=>{x.preventDefault(),!to(a)&&Re(o,e)};a.addEventListener("cancel",l);let m=(x,L)=>{let b=(x==="start"||x==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),k=br(x,b),C=L!=null?L:pt(k)?$t(80):$t(64);return a.style.margin=yr[k],a.style.width=pt(k)?C:"100dvw",a.style.height=pt(k)?"100dvh":C,k},u=m(i,t),s=!1,c=!1,d=null,p=()=>{d=null,s&&(s=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(dt(),c=!1))},f=x=>{x.target===a&&x.propertyName==="transform"&&p()};a.addEventListener("transitionend",f);let h=x=>{if(x)s=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(so(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(s=!0,a.style.transform=on[u],!a.open){p();return}d=setTimeout(p,350)}},S=re(o,h);return{requestClose:()=>Re(o,e),update(x){e=x.onDismiss,x.state!==o&&(S(),o=x.state,S=re(o,h,!1)),(x.placement!==i||x.size!==t)&&(i=x.placement,t=x.size,u=m(i,t),o.get()||(a.style.transform=on[u]))},destroy(){d&&(clearTimeout(d),d=null),S(),a.removeEventListener("cancel",l),a.removeEventListener("transitionend",f),c&&(dt(),c=!1)}}}function Xd(n={}){let{color:r="neutral",open:o=!1,onDismiss:e,placement:i="end",size:t}=n,a=mt(o),l=br(i,!1),m=pt(l)?$t(80):$t(64),u=t!=null?t:m;return P(E({_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},bl("drawer",El,{state:a,onDismiss:e,placement:i,size:t})),{onClick:(s,c)=>{var f;if(s.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();s.clientX>=d.left&&s.clientX<=d.right&&s.clientY>=d.top&&s.clientY<=d.bottom||(f=c.getBehavior("drawer"))==null||f.requestClose()},style:{transform:on[l],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:s=>vl(s,"inherit"),color:s=>tn(s,"shift-10",r),backgroundColor:s=>tn(s,"inherit",r),border:"none",padding:s=>$t(Sl(s)*3),margin:yr[l],width:pt(l)?u:"100dvw",height:pt(l)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:s=>tn(s,"shift-2","neutral"),opacity:.75}}})}import{toState as xl}from"@domphy/core";import{themeColor as Cl,themeSize as kl}from"@domphy/theme";function op(n={}){var o;let r=xl((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>kl(e,"inherit"),fontStyle:"italic",color:e=>Cl(e,"shift-10",r.get(e))}}}import{toState as wl}from"@domphy/core";import{themeColor as nn,themeSpacing as rn}from"@domphy/theme";function ip(n={}){var o;let r=wl((o=n.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:rn(3),paddingBlock:rn(12),paddingInline:rn(6),textAlign:"center",color:e=>nn(e,"muted",r.get(e)),"& > :first-child":{color:e=>nn(e,"shift-5",r.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>nn(e,"text",r.get(e))}}}}var an="errorBoundaryOriginal";function Tl(n){var o;let r=n.getMetadata(an);if(typeof r=="function"){(o=n._childrenRelease)==null||o.call(n),n._setupFunctionChildren(r);return}if(r!=null){n.children.update(Array.isArray(r)?r:[r]);return}n.children.update([])}function sp(n={}){return{_onSchedule:(r,o)=>{r.getMetadata(an)===void 0&&r.setMetadata(an,o[r.tagName])},_onError:(r,o)=>{var t,a;(t=n.onError)==null||t.call(n,o);let e=()=>Tl(r),i=typeof n.fallback=="function"?n.fallback(o,e):(a=n.fallback)!=null?a:{div:"An error occurred."};r.children.update([i])}}}import{toState as Dl}from"@domphy/core";import{themeColor as mo,themeSize as Il,themeSpacing as Pl}from"@domphy/theme";var Ol={small:8,medium:10,large:14};function fp(n={}){var e,i;let r=Dl((e=n.color)!=null?e:"primary","color"),o=Pl(Ol[(i=n.size)!=null?i:"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=>Il(t,"inherit"),backgroundColor:t=>mo(t,"shift-13",r.get(t)),color:t=>mo(t,"shift-0","neutral"),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>mo(t,"shift-14",r.get(t)),boxShadow:A("medium")},"&:active:not([disabled])":{backgroundColor:t=>mo(t,"shift-15",r.get(t)),boxShadow:A("low")},"&:focus-visible":{boxShadow:t=>`${A("medium")}, ${v(t,r.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ll}from"@domphy/core";import{themeColor as Sr,themeSize as Rl,themeSpacing as uo}from"@domphy/theme";function bp(n={}){var o;let r=Ll((o=n.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:uo(2),marginInline:0,marginTop:uo(3),marginBottom:uo(3),color:e=>Sr(e,"text",r.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:uo(2)},"& figcaption":{fontSize:e=>Rl(e,"decrease-1"),color:e=>Sr(e,"muted",r.get(e)),lineHeight:1.45}}}}import{toState as zl}from"@domphy/core";import{themeColor as Ht,themeDensity as ft,themeSize as ln,themeSpacing as ke,themeWeight as Vl}from"@domphy/theme";function xp(n={}){var i;let{layout:r="horizontal"}=n,o=zl((i=n.color)!=null?i:"neutral","color"),e=r==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ke(ft(t)*3),paddingBlock:t=>ke(ft(t)*3),border:"none",borderRadius:t=>ke(ft(t)*2),fontSize:t=>ln(t,"inherit"),backgroundColor:t=>Ht(t,"inherit",o.get(t)),color:t=>Ht(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ke(4),rowGap:ke(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>ln(t,"inherit"),fontWeight:Vl("semibold"),paddingBlock:t=>ke(ft(t)*1),borderRadius:t=>ke(ft(t)*2),color:t=>Ht(t,"text",o.get(t)),backgroundColor:t=>Ht(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ke(ft(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p, input[type=checkbox], input[type=radio], input[type=color])":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > input[type=checkbox], & > input[type=radio], & > input[type=color]":{gridColumn:e?"1":"2",justifySelf:"start"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ke(2)} * -1)`,fontSize:t=>ln(t,"decrease-1"),color:t=>Ht(t,"text",o.get(t))}}}}import{themeDensity as Ml,themeSpacing as Al}from"@domphy/theme";function wp(n={}){let{columns:r=1,gap:o=4,align:e}=n;return{style:E({display:"grid",gridTemplateColumns:typeof r=="number"?`repeat(${r}, minmax(0, 1fr))`:r,gap:i=>Al(Ml(i)*o)},e?{alignItems:e}:{})}}import{toState as Nl}from"@domphy/core";import{themeColor as _l,themeSize as vr,themeSpacing as $l}from"@domphy/theme";var Hl={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Op(n={}){var e;let r=Nl((e=n.color)!=null?e:"neutral","color"),o=n.size;return{_onInsert:i=>{["h1","h2","h3","h4","h5","h6"].includes(i.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:i=>_l(i,"shift-11",r.get(i)),marginTop:0,marginBottom:$l(2),fontSize:i=>{if(o!==void 0)return vr(i,o);let t=Hl[i.elementNode.tagName]||"inherit";return vr(i,t)}}}}import{toState as Bl}from"@domphy/core";import{themeColor as Er,themeSpacing as xr}from"@domphy/theme";function Vp(n={}){var o;let r=Bl((o=n.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:xr(3),marginBottom:xr(3),backgroundColor:e=>Er(e,"inherit",r.get(e)),color:e=>Er(e,"text",r.get(e))}}}import{toState as Fl}from"@domphy/core";import{themeColor as Kl,themeSize as Wl,themeSpacing as Cr}from"@domphy/theme";function _p(n={}){var o;let r=Fl((o=n.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:Cr(4),height:Cr(4),flexShrink:"0",fontSize:e=>Wl(e),backgroundColor:"transparent",color:e=>Kl(e,"text",r.get(e))}}}import{toState as jl}from"@domphy/core";import{themeColor as kr,themeSpacing as ql}from"@domphy/theme";function Fp(n){var o;let r=jl((o=n.color)!=null?o:"neutral","color");return{alt:n.decorative?"":n.alt,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:ql(2),backgroundColor:e=>kr(e,"inherit",r.get(e)),color:e=>kr(e,"text",r.get(e))}}}import{toState as wr}from"@domphy/core";import{themeColor as U,themeSize as Ul,themeSpacing as Je}from"@domphy/theme";function Up(n={}){var e,i;let r=wr((e=n.color)!=null?e:"neutral","color"),o=wr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Ul(t,"inherit"),color:t=>U(t,"text",r.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 ${U(t,"border-strong",r.get(t))}`,color:t=>U(t,"text",r.get(t)),width:Je(4),height:Je(4)},"&:hover::before":{backgroundColor:t=>U(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${U(t,"shift-6",o.get(t))}`,backgroundColor:t=>U(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>U(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 ${U(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${U(t,"shift-6",o.get(t))}`,backgroundColor:t=>U(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>U(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>U(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:Je(1.5),boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${U(t,"border-strong","neutral")}`,backgroundColor:t=>U(t,"inherit","neutral")},"&[disabled]:checked::before":{backgroundColor:t=>U(t,"shift-8","neutral")},"&[disabled]:indeterminate::before":{backgroundColor:t=>U(t,"shift-3","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",borderColor:t=>U(t,"shift-0","neutral")},"&[disabled]:indeterminate::after":{pointerEvents:"none",backgroundColor:t=>U(t,"shift-8","neutral")}}}}import{toState as Yl}from"@domphy/core";import{themeColor as sn,themeDensity as ht,themeSize as Gl,themeSpacing as gt}from"@domphy/theme";function Zp(n={}){var o;let r=Yl((o=n.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=>Gl(e,"inherit"),color:e=>sn(e,"text",r.get(e)),paddingBlock:e=>gt(ht(e)*1),paddingInline:e=>gt(ht(e)*1),blockSize:e=>gt(6+ht(e)*2),inlineSize:e=>gt(6+ht(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>gt(ht(e)*1.5),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>gt(ht(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>sn(e,"shift-2","neutral"),outline:e=>`1px solid ${sn(e,"border-strong","neutral")}`}}}}import{toState as Tr}from"@domphy/core";import{themeColor as Ae,themeDensity as cn,themeSize as Jl,themeSpacing as po}from"@domphy/theme";function nf(n={}){var i,t;let{mode:r="datetime-local"}=n,o=Tr((i=n.color)!=null?i:"neutral","color"),e=Tr((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontSize:a=>Jl(a,"inherit"),lineHeight:"inherit",color:a=>Ae(a,"text",o.get(a)),backgroundColor:a=>Ae(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Ae(a,"border-strong",o.get(a))}`,borderRadius:a=>po(cn(a)*1.5),paddingInline:a=>po(cn(a)*3),height:a=>po(6+cn(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 ${Ae(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Ae(a,"muted","neutral"),backgroundColor:a=>Ae(a,"shift-2","neutral"),outline:a=>`1px solid ${Ae(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${po(.5)} solid ${Ae(a,"shift-6","error")}`}}}}import{toState as Dr}from"@domphy/core";import{themeColor as de,themeDensity as fo,themeSize as Xl,themeSpacing as Xe}from"@domphy/theme";function cf(n={}){var e,i;let r=Dr((e=n.color)!=null?e:"neutral","color"),o=Dr((i=n.accentColor)!=null?i:"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",fontSize:t=>Xl(t,"inherit"),lineHeight:"inherit",color:t=>de(t,"text",r.get(t)),backgroundColor:t=>de(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${de(t,"border-strong",r.get(t))}`,borderRadius:t=>Xe(fo(t)*1.5),height:t=>Xe(6+fo(t)*2),paddingInline:t=>Xe(fo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Xe(fo(t)),fontSize:"inherit",border:"none",borderRadius:Xe(1),height:Xe(6),paddingInline:Xe(2),cursor:"pointer",color:t=>de(t,"shift-11",r.get(t)),backgroundColor:t=>de(t,"surface",r.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${de(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>de(t,"muted","neutral"),outline:t=>`1px solid ${de(t,"border-strong","neutral")}`,backgroundColor:t=>de(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>de(t,"muted","neutral"),backgroundColor:t=>de(t,"shift-3","neutral")}}}}import{toState as Ir}from"@domphy/core";import{themeColor as yt,themeDensity as ho,themeSize as Zl,themeSpacing as Bt}from"@domphy/theme";function hf(n={}){var e,i;let r=Ir((e=n.color)!=null?e:"neutral","color"),o=Ir((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:P(E({lineHeight:"inherit",minWidth:Bt(10),paddingInlineStart:t=>Bt(ho(t)*3),paddingInlineEnd:t=>Bt(ho(t)*1.5),paddingBlock:t=>Bt(ho(t)*1),borderRadius:t=>Bt(ho(t)*1.5),fontSize:t=>Zl(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${yt(t,"border-strong",r.get(t))}`},ce(r)),{backgroundColor:t=>yt(t,"inherit",r.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 ${yt(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>yt(t,"shift-2","neutral"),outline:t=>`1px solid ${yt(t,"border-strong","neutral")}`,color:t=>yt(t,"muted","neutral")}})}}import{themeSpacing as Pr}from"@domphy/theme";function Sf(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:Pr(2),"& > input":{minWidth:Pr(9)}},_onMount:n=>{let r=n.domElement,o=()=>Array.from(r.querySelectorAll("input")),e=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);m.value&&u<l.length-1&&l[u+1].focus()},i=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&(a.preventDefault(),l[u-1].focus()),a.key==="ArrowRight"&&u<l.length-1&&(a.preventDefault(),l[u+1].focus())},t=a=>{var d,p,f;a.preventDefault();let l=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),s=u===-1?0:u;[...l].forEach((h,S)=>{let x=m[s+S];x&&(x.value=h,x.dispatchEvent(new Event("input",{bubbles:!0})),x.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(s+l.length-1,m.length-1);(f=m[c])==null||f.focus()};r.addEventListener("input",e),r.addEventListener("keydown",i),r.addEventListener("paste",t),n.addHook("Remove",()=>{r.removeEventListener("input",e),r.removeEventListener("keydown",i),r.removeEventListener("paste",t)})}}}import{isState as Ql,rawHtml as es,toState as mn}from"@domphy/core";import{themeColor as go,themeDensity as Ft,themeSize as Or,themeSpacing as Ze}from"@domphy/theme";var ts='<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>',os='<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>',ns=["name","value","onInput","disabled","required"];function Lr(n){if(n!=null)return typeof n=="function"?n:Ql(n)?r=>n.get(r):n}function wf(n={}){var t,a;let r=mn((t=n.color)!=null?t:"neutral","color"),o=mn((a=n.accentColor)!=null?a:"primary","accentColor"),e=mn(!1),i={};return{_onInsert:l=>{l.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(l,m)=>{let u=m;for(let s of ns)u[s]!==void 0&&(i[s]=u[s],delete u[s])},_onInit:l=>{var h,S,x,L,T,b,k;let m=(h=n.name)!=null?h:i.name,u=Lr((S=n.value)!=null?S:i.value),s=(x=n.onInput)!=null?x:i.onInput,c=Lr((L=n.disabled)!=null?L:i.disabled),d=(T=n.required)!=null?T:i.required,p=P(E(E(E(E(E({input:null,type:C=>e.get(C)?"text":"password",ariaLabel:(b=n.ariaLabel)!=null?b:"Password",autocomplete:(k=n.autocomplete)!=null?k:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),s!=null?{onInput:s}:{}),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"}}),f={button:C=>es(e.get(C)?os:ts),type:"button",ariaLabel:C=>e.get(C)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",fontSize:C=>Or(C,"inherit"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,minWidth:Ze(6),minHeight:Ze(6),marginInlineEnd:C=>`calc(${Ze(Ft(C)*1)} * -1)`,opacity:.6}};l.children.insert(p),l.children.insert(f)},style:{display:"flex",alignItems:"center",gap:l=>Ze(Ft(l)*1),paddingBlock:l=>Ze(Ft(l)*1),paddingInline:l=>Ze(Ft(l)*3),borderRadius:l=>Ze(Ft(l)*1.5),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${go(l,"border-strong",r.get(l))}`,color:l=>go(l,Wo,r.get(l)),backgroundColor:l=>go(l,"inherit",r.get(l)),fontSize:l=>Or(l,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:l=>`1px solid ${go(l,"shift-5",o.get(l))}`},"&:focus-within":{boxShadow:l=>v(l,o.get(l))}}}}import{toState as Rr}from"@domphy/core";import{themeColor as be,themeSize as rs,themeSpacing as yo}from"@domphy/theme";function Lf(n={}){var e,i;let r=Rr((e=n.color)!=null?e:"neutral","color"),o=Rr((i=n.accentColor)!=null?i:"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=>rs(t,"inherit"),color:t=>be(t,"text",r.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:yo(6),height:yo(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 ${be(t,"border-strong",r.get(t))}`,color:t=>be(t,"text",r.get(t)),width:yo(4),height:yo(4)},"&:hover::before":{backgroundColor:t=>be(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${be(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>be(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>be(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${be(t,"border-strong","neutral")}`,backgroundColor:t=>be(t,"inherit","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",backgroundColor:t=>be(t,"shift-8","neutral")}}}}import{toState as zr}from"@domphy/core";import{themeColor as bt,themeSize as as,themeSpacing as te}from"@domphy/theme";function Af(n={}){var e,i;let r=zr((e=n.color)!=null?e:"neutral","color"),o=zr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>as(t,"inherit"),width:"100%",margin:0,padding:0,height:te(6),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:te(1.5),borderRadius:te(999),backgroundColor:t=>bt(t,"shift-3",r.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:te(4),height:te(4),borderRadius:te(999),border:"none",marginTop:`calc((${te(1.5)} - ${te(4)}) / 2)`,backgroundColor:t=>bt(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>bt(t,"shift-10",o.get(t))},"&::-moz-range-track":{height:te(1.5),borderRadius:te(999),backgroundColor:t=>bt(t,"shift-3",r.get(t))},"&::-moz-range-thumb":{width:te(4),height:te(4),borderRadius:te(999),border:"none",backgroundColor:t=>bt(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-moz-range-thumb":{backgroundColor:t=>bt(t,"shift-10",o.get(t))},borderRadius:te(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Vr}from"@domphy/core";import{themeColor as St,themeDensity as un,themeSize as is,themeSpacing as bo}from"@domphy/theme";function Ff(n={}){var e,i;let r=Vr((e=n.color)!=null?e:"neutral","color"),o=Vr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:P(E({fontSize:t=>is(t,"inherit"),lineHeight:"inherit"},ce(r)),{backgroundColor:t=>St(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${St(t,"border-strong",r.get(t))}`,borderRadius:t=>bo(un(t)*1.5),minWidth:bo(32),paddingInline:t=>bo(un(t)*3),paddingBlock:t=>bo(un(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${St(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>St(t,"muted","neutral"),backgroundColor:t=>St(t,"shift-2","neutral"),outline:t=>`1px solid ${St(t,"border-strong","neutral")}`}})}}import{toState as ls}from"@domphy/core";import{themeColor as vt,themeSize as Mr,themeSpacing as we}from"@domphy/theme";function Yf(n={}){var o;let r=ls((o=n.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=>Mr(e,"inherit"),backgroundColor:"transparent",color:e=>vt(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:we(12),height:we(6),cursor:"pointer",margin:"0",transition:"box-shadow 140ms ease",borderRadius:we(999),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&:checked":{"&::before":{backgroundColor:e=>vt(e,"increase-3",r.get(e))},"&::after":{insetInlineStart:`calc(100% - ${we(5.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:we(5),height:we(5),borderRadius:we(999),insetInlineStart:we(.5),top:"50%",transform:"translateY(-50%)",transition:"inset-inline-start 0.3s",backgroundColor:e=>vt(e,"decrease-3"),outline:e=>`1px solid ${vt(e,"shift-7")}`,outlineOffset:"-1px"},"&::before":{content:'""',width:"100%",borderRadius:we(999),display:"inline-block",fontSize:e=>Mr(e,"inherit"),lineHeight:1,backgroundColor:e=>vt(e,"inherit"),outline:e=>`1px solid ${vt(e,"shift-7")}`,outlineOffset:"-1px"},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Ar}from"@domphy/core";import{themeColor as Te,themeDensity as dn,themeSize as ss,themeSpacing as Qe}from"@domphy/theme";function eh(n={}){var i,t;let{type:r="text"}=n,o=Ar((i=n.color)!=null?i:"neutral","color"),e=Ar((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:P(E({lineHeight:"inherit",minWidth:Qe(10),paddingInline:a=>Qe(dn(a)*3),paddingBlock:a=>Qe(dn(a)*1),borderRadius:a=>Qe(dn(a)*1.5),fontSize:a=>ss(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Te(a,"border-strong",o.get(a))}`},ce(o)),{backgroundColor:a=>Te(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Te(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>Te(a,"shift-2","neutral"),outline:a=>`1px solid ${Te(a,"border-strong","neutral")}`,color:a=>Te(a,"muted","neutral")},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${Qe(.5)} solid ${Te(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Qe(.5)} solid ${Te(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Qe(.5)} solid ${Te(a,"shift-6","warning")}`}})}}import{toState as cs}from"@domphy/core";import{themeColor as pn,themeDensity as fn,themeFont as ms,themeSize as us,themeSpacing as hn}from"@domphy/theme";function ah(n={}){var o;let r=cs((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>us(e,"inherit"),fontFamily:ms("monospace"),color:e=>pn(e,"text",r.get(e)),backgroundColor:e=>pn(e,"inherit",r.get(e)),paddingBlock:e=>hn(fn(e)*(.5/1.5)),paddingInline:e=>hn(fn(e)*(1.5/1.5)),borderRadius:e=>hn(fn(e)*(1/1.5)),outline:e=>`1px solid ${pn(e,"border-strong",r.get(e))}`}}}import{toState as Nr}from"@domphy/core";import{themeColor as gn,themeSize as ds,themeSpacing as ps}from"@domphy/theme";function ch(n={}){var e,i;let r=Nr((e=n.color)!=null?e:"neutral","color"),o=Nr((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:ps(2),fontSize:t=>ds(t,"inherit"),color:t=>gn(t,"text",r.get(t)),cursor:"pointer","&:focus-within":{color:t=>gn(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>gn(t,"muted","neutral")}}}}import{toState as _r}from"@domphy/core";import{themeColor as Kt,themeSize as fs,themeSpacing as hs}from"@domphy/theme";function fh(n={}){var e,i;let r=_r((e=n.color)!=null?e:"primary","color"),o=_r((i=n.accentColor)!=null?i:"secondary","accentColor");return{role:"link",tabIndex:0,_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag'),t.attributes.has("href")&&(t.attributes.get("role")==="link"&&t.attributes.remove("role"),t.attributes.get("tabIndex")===0&&t.attributes.remove("tabIndex"))},onClick:(t,a)=>{let l=a.domElement;(l!=null&&l.hasAttribute("disabled")||(l==null?void 0:l.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},onKeyDown:(t,a)=>{var m;if(a.attributes.has("href"))return;let l=t.key;l!=="Enter"&&l!==" "||(t.preventDefault(),(m=a.domElement)==null||m.click())},style:{fontSize:t=>fs(t,"inherit"),backgroundColor:t=>Kt(t),color:t=>Kt(t,"shift-13",r.get(t)),textDecoration:"none","&:visited":{color:t=>Kt(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>Kt(t,"shift-14",r.get(t)),textDecoration:"underline"},borderRadius:hs(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled], &[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>Kt(t,"muted","neutral")}}}}import{toState as gs}from"@domphy/core";import{textToneOn as $r,themeColor as W,themeDensity as Ne,themeSize as Hr,themeSpacing as _e}from"@domphy/theme";var ys={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},bs={small:.5,medium:1,large:1.5};function vh(n={}){var l,m,u;let r=(l=n.variant)!=null?l:"outline",o=gs((m=n.color)!=null?m:r==="ghost"?"neutral":"primary","color"),e=(u=n.size)!=null?u:"medium",i=lt[e];if(r==="ghost"){let s=bs[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>Hr(c,i),textDecoration:"none",paddingBlock:c=>_e(Ne(c)*s),paddingInline:c=>_e(Ne(c)*s),borderRadius:c=>_e(Ne(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>_e(Ne(c)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>W(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>W(c,$r(2),o.get(c)),backgroundColor:c=>W(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>W(c,$r(2),o.get(c)),backgroundColor:c=>W(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>v(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>W(c,"border-strong","neutral")}}}}let t=r==="solid",a=ys[e];return P(E({_onInsert:s=>{s.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["tone-background-inherit"]}:{}),{style:{fontSize:s=>Hr(s,i),textDecoration:"none",paddingBlock:s=>_e(Ne(s)*a.block),paddingInline:s=>_e(Ne(s)*a.inline),borderRadius:s=>_e(Ne(s)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>_e(Ne(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":s=>`1px solid ${W(s,"border-strong",o.get(s))}`,color:s=>t?W(s,"shift-0","neutral"):W(s,"shift-13",o.get(s)),backgroundColor:s=>t?W(s,"shift-13",o.get(s)):W(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:s=>t?W(s,"shift-0","neutral"):W(s,"shift-14",o.get(s)),backgroundColor:s=>t?W(s,"shift-14",o.get(s)):W(s,"hover",o.get(s))},"&:active:not([aria-disabled=true])":{backgroundColor:s=>t?W(s,"shift-15",o.get(s)):W(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:s=>W(s,"shift-2","neutral"),outline:s=>`1px solid ${W(s,"border-strong","neutral")}`,color:s=>W(s,"muted","neutral")}}})}import{toState as Ss}from"@domphy/core";import{textToneOn as Br,themeColor as Se,themeDensity as et,themeSize as Fr,themeSpacing as tt}from"@domphy/theme";function Th(n={}){var o;let r=(o=n.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Se(e,"inherit",r),color:e=>Se(e,"text",r)}}}function Dh(n={}){let{dense:r=!1}=n;return{style:{display:"flex",alignItems:"center",gap:o=>tt(et(o)*2),paddingBlock:o=>tt(r?1:et(o)*2),paddingInline:o=>tt(et(o)*3),fontSize:o=>Fr(o,"inherit"),color:o=>Se(o,"text")}}}function Ih(n={}){var i,t;let r=Ss((i=n.color)!=null?i:"neutral","color"),o=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{type:"button",style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"start",display:"flex",alignItems:"center",width:"100%",gap:a=>tt(et(a)*2),paddingBlock:a=>tt(e?1:et(a)*2),paddingInline:a=>tt(et(a)*3),fontSize:a=>Fr(a,"inherit"),color:a=>Se(a,"text",r.get(a)),borderRadius:a=>tt(et(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:a=>Se(a,Br(2),r.get(a)),backgroundColor:a=>Se(a,"hover",r.get(a))},"&:active:not([disabled])":{color:a=>Se(a,Br(2),r.get(a)),backgroundColor:a=>Se(a,"increase-2",r.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Se(a,"shift-3",o),color:a=>Se(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>v(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as vs}from"@domphy/core";import{themeColor as Kr,themeDensity as yn,themeSize as Es,themeSpacing as bn}from"@domphy/theme";function Rh(n={}){var o;let r=vs((o=n.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=>Es(e,"inherit"),color:e=>Kr(e,"text",r.get(e)),backgroundColor:e=>Kr(e,"inherit",r.get(e)),height:e=>bn(yn(e)*(6/1.5)),borderRadius:e=>bn(yn(e)*(1/1.5)),paddingInline:e=>bn(yn(e)*(1.5/1.5))}}}import{behavior as xs,toState as Wr}from"@domphy/core";import{textToneOn as Cs,themeColor as De,themeDensity as Wt,themeSize as jr,themeSpacing as Et}from"@domphy/theme";function _h(n={items:[]}){var c;let{items:r=[],selectable:o=!0,color:e="neutral",accentColor:i="primary"}=n,t=Wr((c=n.activeKey)!=null?c:null),a=n.activeKey!==void 0,l=(d,p)=>{var x;let f=d.focusedKey.get(p);if(f!==null)return f;let h=d.selectable?d.activeKey.get(p):null;if(h!==null)return h;let S=d.items[0];return S?(x=S.key)!=null?x:0:null},m=(d,p)=>{let f=d.nodeId;return p.items.map((h,S)=>{var L;let x=(L=h.key)!=null?L:S;return P(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:x,type:"button",id:`menuitem${f}${x}`,role:"menuitem",tabIndex:T=>l(p,T)===x?0:-1,onFocus:()=>p.focusedKey.set(x)},p.selectable?{ariaCurrent:T=>p.activeKey.get(T)===x||void 0}:{}),{onClick:()=>{var T;p.selectable&&p.activeKey.set(x),(T=h.onClick)==null||T.call(h)},onKeyDown:T=>{var I;let b=T.key;if(b==="Enter"||b===" "){T.preventDefault(),T.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(b))return;T.preventDefault();let k=p.items.map((_,G)=>{var N;return(N=_.key)!=null?N:G}),C=k.indexOf(x),g=C;b==="ArrowDown"?g=(C+1)%k.length:b==="ArrowUp"?g=(C-1+k.length)%k.length:b==="Home"?g=0:b==="End"&&(g=k.length-1);let O=T.target.closest("[role=menu]");(I=O==null?void 0:O.querySelectorAll("[role=menuitem]")[g])==null||I.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Et(2),width:"100%",fontSize:T=>jr(T,"inherit"),height:T=>Et(6+Wt(T)*2),paddingInline:T=>Et(Wt(T)*3),border:"none",outline:"none",color:T=>De(T,"text",p.color),backgroundColor:T=>De(T,"inherit",p.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:T=>De(T,"hover",p.color),color:T=>De(T,Cs(2),p.color)},"&[aria-current=true]":{backgroundColor:T=>De(T,"shift-3",p.accentColor),color:T=>De(T,"shift-13",p.accentColor)},"&:focus-visible":{boxShadow:T=>v(T,p.accentColor)}}})})},u=(d,p)=>{p.focusedKey.set(null);let f=p;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),h.focusedKey!==f.focusedKey&&h.focusedKey.set(f.focusedKey.get()),f=h,f.items.length!==0&&d.children.update(m(d,f))}}},s={items:r,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:i,focusedKey:Wr(null)};return P(E({role:"menu",dataTone:"shift-0",_onSchedule:(d,p)=>{r.length!==0&&(p[d.tagName]=m(d,s))}},xs("menu",u,s)),{style:{display:"flex",flexDirection:"column",paddingBlock:d=>Et(Wt(d)*2),paddingInline:d=>Et(Wt(d)*2),fontSize:d=>jr(d,"inherit"),backgroundColor:d=>De(d,"inherit",e),color:d=>De(d,"text",e),borderRadius:d=>Et(Wt(d)*2),outline:d=>`1px solid ${De(d,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:A("medium")}})}import{behavior as ks}from"@domphy/core";function xt(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(n){return!1}}var qr=n=>!!n&&typeof n.get=="function"&&n._isState===!0,ve=n=>{let r={},o=[];for(let e in n){let i=n[e];e==="x"?o.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?o.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?o.push(`scale(${i})`):e==="rotate"?o.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):r[e]=i}return o.length&&(r.transform=o.join(" ")),r};function Sn(n={}){var r,o,e,i;return{duration:(r=n.duration)!=null?r:300,delay:(o=n.delay)!=null?o:0,easing:(e=n.easing)!=null?e:"ease",iterations:(i=n.iterations)!=null?i:1,fill:"both"}}function ws(n,r){let o=n.domElement,e=r,i,t=l=>{i==null||i(),i=void 0,!(!o||!qr(l))&&(i=l.addListener(m=>{xt()?Object.assign(o.style,ve(m)):typeof o.animate=="function"&&o.animate([ve(m)],Sn(e.transition))}))},a=(l,m)=>{if(!o)return;let u=qr(l.animate)?l.animate.get():l.animate;if(xt()){u?Object.assign(o.style,ve(u)):m==="enter"&&l.initial&&Object.assign(o.style,ve(l.initial));return}if(typeof o.animate=="function")if(u){let s=m==="enter"&&l.initial?[ve(l.initial),ve(u)]:[ve(u)];o.animate(s,Sn(l.transition))}else m==="enter"&&l.initial&&Object.assign(o.style,ve(l.initial))};return a(r,"enter"),t(r.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(l){e=l,a(l,"update"),t(l.animate)},destroy(){i==null||i()}}}function Wh(n={}){return P(E({},ks("motion",(r,o)=>ws(r,o),n)),{_onBeforeRemove:(r,o)=>{var a,l;let e=r.domElement,i=r.getBehavior("motion"),t=(a=i==null?void 0:i.getExit())!=null?a:n.exit;if(!e||!t||typeof e.animate!="function")return o();if(xt())return Object.assign(e.style,ve(t)),o();e.animate([ve(t)],Sn((l=i==null?void 0:i.getTransition())!=null?l:n.transition)).finished.then(o,o)}})}import{toState as Ts}from"@domphy/core";import{themeColor as Ur,themeSize as Ds,themeSpacing as Is}from"@domphy/theme";function Gh(n={}){var o;let r=Ts((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Ds(e,"inherit"),backgroundColor:e=>Ur(e),color:e=>Ur(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:Is(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as Ps,isState as Os,toState as Gr}from"@domphy/core";import{themeColor as ot,themeDensity as jt,themeSize as Ls,themeSpacing as Ct,themeWeight as Rs}from"@domphy/theme";function zs(n,r){if(r<=7)return Array.from({length:r},(t,a)=>a+1);let o=[1];n>3&&o.push("...");let e=Math.max(2,n-1),i=Math.min(r-1,n+1);for(let t=e;t<=i;t++)o.push(t);return n<r-2&&o.push("..."),o.push(r),o}function Vs(n,r,o,e){if(Os(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=Gr(o!=null?o:e),n.setMetadata(r,i)),i}function Yr(n,r){let o=n.getMetadata("paginationTotal");return o||(o=Gr(r),n.setMetadata("paginationTotal",o)),o}function eg(n){let{total:r,color:o="neutral",accentColor:e="primary"}=n,i={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>Ct(6+jt(a)*2),height:a=>Ct(6+jt(a)*2),paddingInline:a=>Ct(jt(a)*2),borderRadius:a=>Ct(jt(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>Ls(a,"inherit"),backgroundColor:"transparent",color:a=>ot(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>ot(a,"shift-13",o),backgroundColor:a=>ot(a,"hover",o)},"&:focus-visible":{boxShadow:a=>v(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=P(E({},i),{backgroundColor:a=>ot(a,"shift-13",e),color:a=>ot(a,"shift-0","neutral"),fontWeight:Rs("bold"),cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>ot(a,"shift-13",e)}});return P(E({role:"navigation",ariaLabel:"Pagination",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let l=Vs(a,"paginationPage",n.value,1),m=Yr(a,r),u={div:s=>{let c=l.get(s),d=m.get(s),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&l.set(c-1),style:i});let f=0;for(let h of zs(c,d))if(h==="...")p.push({span:"\u2026",_key:`ellipsis-${f++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:S=>Ct(jt(S)*2),color:S=>ot(S,"shift-7",o)}});else{let S=h===c;p.push({button:String(h),_key:`page-${h}`,type:"button",ariaLabel:`Page ${h}`,ariaCurrent:S?"page":void 0,onClick:()=>l.set(h),style:S?t:i})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&l.set(c+1),style:i}),p},style:{display:"flex",alignItems:"center",gap:Ct(1)}};a.children.insert(u)}},Ps("pagination-total",a=>({update(l){Yr(a,l.total).set(l.total)}}),{total:r})),{style:{display:"inline-flex"}})}import{toState as Ms}from"@domphy/core";import{themeColor as Jr,themeDensity as As,themeSpacing as Ns}from"@domphy/theme";function ag(n={}){var i;let{padding:r=4,divider:o=!1}=n,e=Ms((i=n.color)!=null?i:"neutral","color");return{style:E({padding:t=>Ns(As(t)*r)},o?{borderBottom:t=>`1px solid ${Jr(t,"border",e.get(t))}`,color:t=>Jr(t,"text")}:{})}}import{toState as _s}from"@domphy/core";import{themeColor as $s,themeSize as Hs}from"@domphy/theme";function mg(n={}){var o;let r=_s((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Hs(e,"inherit"),color:e=>$s(e,"text",r.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Bs,toState as Xr}from"@domphy/core";import{themeColor as vn,themeDensity as Fs,themeSpacing as Ks}from"@domphy/theme";var Ws=new Set(["dialog","grid","listbox","menu","tree"]);function js(n){var e;let r;for(let i of(e=n.$)!=null?e:[]){let t=i==null?void 0:i.role;typeof t=="string"&&(r=t)}let o=n.role;return typeof o=="string"&&(r=o),typeof r!="string"?"dialog":r==="alertdialog"||r==="menubar"?r==="menubar"?"menu":"dialog":r==="treegrid"?"grid":Ws.has(r)?r:"dialog"}function qs(n){if(typeof n.dataTone=="string")return!0;let o=n.$;return o?o.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function gg(n){var c;let{open:r=!1,placement:o="bottom",openOn:e="click"}=n,i=Xr(r),t=Xr(o),{show:a,hide:l,anchorPartial:m}=ge({kind:"popover",open:i,onDismiss:n.onDismiss,placement:t,content:n.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>vn(d,"inherit"),color:d=>vn(d,"text"),borderRadius:d=>Ks(Fs(d)*2),outline:d=>`1px solid ${vn(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};qs(n.content)||((c=n.content).$||(c.$=[]),n.content.$.push(u));let s={ariaHaspopup:js(n.content),ariaExpanded:d=>i.get(d),ariaControls:d=>d!=null&&d.elementNode?ee("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&l(p),onClick:(d,p)=>{e==="click"&&(i.get()?l(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&i.get()&&l(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let f=d.relatedTarget,S=p.getRoot().domElement.querySelector(`#${ee("popover",p)}`);f&&(S!=null&&S.contains(f))||l(p)}};return Bs(m,s),m}import{toState as Us}from"@domphy/core";import{themeColor as So,themeSize as Ys,themeSpacing as En}from"@domphy/theme";function Zr(n={}){let{placement:r="bottom-end",color:o="neutral",sideOffset:e=En(6),bordered:i=!0}=n,t=Us(r),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"},l=s=>{var c;return(c=a[t.get(s)])!=null?c:a["bottom-end"]},m=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",u=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>Ys(s),backgroundColor:s=>So(s),color:s=>So(s,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:En(1.5),height:En(1.5),backgroundColor:s=>So(s,"inherit",o),borderWidth:i?"1px":0,borderColor:s=>So(s,"border-strong",o),borderTopStyle:s=>{let c=l(s);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:s=>{let c=l(s);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:s=>{let c=l(s);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:s=>{let c=l(s);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:s=>{let c=l(s);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:s=>{let c=l(s);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:s=>{let c=l(s),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 Gs}from"@domphy/core";import{themeColor as Qr,themeDensity as xn,themeFont as Js,themeSize as Xs,themeSpacing as Cn}from"@domphy/theme";function Cg(n={}){var o;let r=Gs((o=n.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=>Xs(e,"inherit"),fontFamily:Js("monospace"),color:e=>Qr(e,"text",r.get(e)),backgroundColor:e=>Qr(e,"inherit",r.get(e)),border:"none",paddingBlock:e=>Cn(xn(e)*2),paddingInline:e=>Cn(xn(e)*3),borderRadius:e=>Cn(xn(e)*2)}}}import{toState as ea}from"@domphy/core";import{themeColor as vo,themeSpacing as Eo}from"@domphy/theme";function Dg(n={}){var e,i;let r=ea((e=n.color)!=null?e:"neutral","color"),o=ea((i=n.accentColor)!=null?i:"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:Eo(2),border:0,borderRadius:Eo(999),overflow:"hidden",backgroundColor:t=>vo(t,"inherit",r.get(t)),color:t=>vo(t,"text",r.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>vo(t,"inherit",r.get(t)),borderRadius:Eo(999)},"&::-webkit-progress-value":{backgroundColor:t=>vo(t,"shift-9",o.get(t)),borderRadius:Eo(999),transition:"width 220ms ease"}}}}import{behavior as Zs,isState as Qs,rawHtml as ec,toState as ta}from"@domphy/core";import{themeColor as tc,themeSize as oc,themeSpacing as xo}from"@domphy/theme";function kn(n){return!n||typeof getComputedStyle!="function"?!1:getComputedStyle(n).direction==="rtl"}function Ee(n,r){return n!=="ArrowRight"&&n!=="ArrowLeft"?0:n==="ArrowRight"!==kn(r)?1:-1}var nc='<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>',rc='<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 oa(n,r){var o,e,i;n.onChange=r.onChange,n.readOnly=(o=r.readOnly)!=null?o:!1,n.max=(e=r.max)!=null?e:5,n.color=(i=r.color)!=null?i:"warning",Qs(r.value)?r.value!==n.valueState&&n.valueState.set(r.value.get()):r.value!==void 0&&n.valueState.set(r.value)}function ac(n,r,o,e){let i=a=>{let l=e.get(a);return l>0?l:o.valueState.get(a)},t={button:a=>ec(r<=i(a)?nc:rc),_key:r,type:"button",ariaLabel:`${r} star${r>1?"s":""}`,role:"radio",ariaChecked:a=>o.valueState.get(a)===r,tabindex:a=>{let l=o.valueState.get(a);return(l===0?1:l)===r?0:-1},onClick:()=>{var l;if(o.readOnly)return;let a=r===o.valueState.get()?0:r;o.valueState.set(a),(l=o.onChange)==null||l.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(r)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var s,c,d;if(o.readOnly)return;let l=o.valueState.get(),m=l;if(a.key==="ArrowUp")m=Math.min(o.max,l+1),a.preventDefault();else if(a.key==="ArrowDown")m=Math.max(0,l-1),a.preventDefault();else if(a.key==="ArrowRight"||a.key==="ArrowLeft")m=Ee(a.key,a.target)>0?Math.min(o.max,l+1):Math.max(0,l-1),a.preventDefault();else if(a.key==="Home")m=1,a.preventDefault();else if(a.key==="End")m=o.max,a.preventDefault();else return;o.valueState.set(m),(s=o.onChange)==null||s.call(o,m);let u=m>0?m-1:0;(d=(c=n.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:xo(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",justifyContent:"center",minWidth:xo(6),minHeight:xo(6),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>v(a,o.color)}}};n.children.insert(t)}function wn(n,r,o){let e=n.children.items;for(;e.length>r.max;)n.children.remove(e[e.length-1]);for(let i=e.length+1;i<=r.max;i++)ac(n,i,r,o)}function Vg(n={}){var e,i,t,a,l,m,u;let r={valueState:ta((e=n.value)!=null?e:0),onChange:n.onChange,readOnly:(i=n.readOnly)!=null?i:!1,max:(t=n.max)!=null?t:5,color:(a=n.color)!=null?a:"warning"},o=ta(0);return P(E({role:"radiogroup",ariaLabel:"Rating",ariaReadonly:r.readOnly?"true":void 0,style:{display:"inline-flex",gap:xo(.5),fontSize:s=>oc(s,"increase-1"),cursor:r.readOnly?"default":"pointer",color:s=>tc(s,"muted",r.color)}},Zs("rating",(s,c)=>(oa(r,c),wn(s,r,o),{update(d){oa(r,d),wn(s,r,o)}}),{value:n.value,max:(l=n.max)!=null?l:5,onChange:n.onChange,readOnly:(m=n.readOnly)!=null?m:!1,color:(u=n.color)!=null?u:"warning"})),{_onInit:s=>{wn(s,r,o)}})}import{toState as Tn}from"@domphy/core";import{themeColor as Dn,themeSpacing as na}from"@domphy/theme";function $g(n={}){var m,u,s;let{size:r=16,thickness:o=.25}=n,e=Tn((m=n.value)!=null?m:0,"value"),i=Tn((u=n.color)!=null?u:"primary","color"),t=Tn((s=n.trackColor)!=null?s:"neutral","trackColor"),a=Math.round((1-o)*100),l=`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:na(r),height:na(r),borderRadius:"50%",color:c=>Dn(c,"shift-9",i.get(c)),background:c=>`conic-gradient(from -90deg, ${Dn(c,"shift-9",i.get(c))} ${e.get(c)}%, ${Dn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:l,mask:l}}}import{themeDensity as ic,themeSpacing as ra}from"@domphy/theme";function aa(n={}){let{gap:r=4,align:o="center",justify:e,wrap:i=!1,density:t=!0}=n;return{style:E(E({display:"flex",alignItems:o,gap:t?a=>ra(ic(a)*r):()=>ra(r)},e?{justifyContent:e}:{}),i?{flexWrap:"wrap"}:{})}}import{toState as lc}from"@domphy/core";import{themeColor as Co,themeSpacing as ko}from"@domphy/theme";function qg(n={}){var o;let r=lc((o=n.color)!=null?o:"neutral","color");return P(E({},n.label?{role:"region",ariaLabel:n.label,tabIndex:0}:{}),{style:{overflow:"auto",color:e=>Co(e,"text",r.get(e)),"&::-webkit-scrollbar":{width:ko(2),height:ko(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Co(e,"shift-5",r.get(e)),borderRadius:ko(999),border:`${ko(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Co(e,"shift-7",r.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Co(e,"shift-5",r.get(e))} transparent`}})}import{behavior as sc,isState as cc,toState as mc}from"@domphy/core";import{textToneOn as ia,themeColor as Ie,themeSize as uc,themeSpacing as $e}from"@domphy/theme";function la(n,r,o,e){if(cc(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=mc(o!=null?o:e),n.setMetadata(r,i)),i}function dc(n,r,o,e){var u;let i=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(i))return;n.preventDefault();let t=r.map((s,c)=>{var d;return(d=s.key)!=null?d:String(c)}),a=t.indexOf(o),l=a;if(i==="ArrowDown")l=(a+1)%t.length;else if(i==="ArrowUp")l=(a-1+t.length)%t.length;else if(i==="ArrowRight"||i==="ArrowLeft"){let s=Ee(i,n.target);l=(a+s+t.length)%t.length}else i==="Home"?l=0:i==="End"&&(l=t.length-1);e.set(t[l]);let m=n.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[l])==null||u.focus()}function sa(n,r,o,e){return n.map((i,t)=>{var m;let a=(m=i.key)!=null?m:String(t);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:a,type:"button",role:"radio",ariaChecked:u=>r.get(u)===a,tabIndex:u=>{var c,d;let s=r.get(u);return s===a||s===""&&a===((d=(c=n[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>r.set(a),onKeyDown:u=>dc(u,n,a,r),style:{cursor:"pointer",fontSize:u=>uc(u,"inherit"),height:$e(6),paddingBlock:$e(1),paddingInline:$e(3),border:"none",borderRadius:$e(10),color:u=>Ie(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=>Ie(u,"shift-3",o),color:u=>Ie(u,ia(3),o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Ie(u,"increase-2",o),color:u=>Ie(u,ia(3),o)},"&[aria-checked=true]":{backgroundColor:u=>Ie(u,"shift-0",e),color:u=>Ie(u,"shift-10",e),boxShadow:A("low")},"&:focus-visible":{boxShadow:u=>v(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${A("low")}, ${v(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ey(n={items:[]}){let{items:r=[],color:o="neutral",accentColor:e="primary"}=n;return P(E({role:"radiogroup",_onSchedule:(t,a)=>{var m,u;let l=la(t,"segmentedValue",n.value,(u=(m=r[0])==null?void 0:m.key)!=null?u:"");t.setContext("segmented",{value:l}),a[t.tagName]=sa(r,l,o,e)}},sc("segmented-items",t=>({update(a){var m,u;let l=la(t,"segmentedValue",n.value,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:"");t.children.update(sa(a.items,l,a.color,a.accentColor),!!t.domElement,!0)}}),{items:r,color:o,accentColor:e})),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:$e(1),paddingInline:$e(1),gap:$e(.5),borderRadius:$e(10),backgroundColor:t=>Ie(t,"inherit",o),color:t=>Ie(t,"text",o)}})}import{themeColor as Pe,themeColorToken as pc,themeDensity as qt,themeSize as fc,themeSpacing as He}from"@domphy/theme";function iy(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontSize:e=>fc(e,"inherit"),lineHeight:"inherit",color:e=>Pe(e,"text",r),backgroundColor:e=>Pe(e,"inherit",r),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Pe(e,"border-strong",r)}`,borderRadius:e=>He(qt(e)*1.5),paddingBlock:e=>He(qt(e)*1),paddingInlineStart:e=>He(qt(e)*3),paddingInlineEnd:e=>He(qt(e)*5),backgroundImage:e=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${pc(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:e=>{var i;return`${kn((i=e.elementNode)==null?void 0:i.domElement)?"left":"right"} ${He(2)} center`},backgroundSize:`${He(2.5)} ${He(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>He(6+qt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Pe(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>v(e,o)},"& optgroup":{color:e=>Pe(e,"shift-11",r)},"& option[disabled]":{color:e=>Pe(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Pe(e,"muted","neutral"),outline:e=>`1px solid ${Pe(e,"border-strong","neutral")}`,backgroundColor:e=>Pe(e,"shift-2","neutral")}}}}import{behavior as hc,merge as ca,toState as In}from"@domphy/core";import{themeColor as kt,themeDensity as wo,themeSize as gc,themeSpacing as wt}from"@domphy/theme";var yc=1e3;function bc(n){let r=n.getMetadata("selectBoxTypeahead");return r||(r={buffer:"",timer:null},n.setMetadata("selectBoxTypeahead",r)),r}var ma=(n,r)=>n.trim().toLowerCase().startsWith(r);function gy(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=In(n.value),l=In(i),{show:m,hide:u,anchorPartial:s}=ge({kind:"selectBox",open:l,onDismiss:n.onDismiss,placement:In(o),content:n.content}),c={onClick:(b,k)=>!t&&u(k),dataTone:"shift-0",style:{backgroundColor:b=>kt(b,"inherit"),color:b=>kt(b,"text"),borderRadius:b=>wt(wo(b)*2),outline:b=>`1px solid ${kt(b,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};ca(n.content,c);let d=b=>({div:k=>{let C=b.state.get(k),g=Array.isArray(C)?C:[C];return b.options.filter(I=>g.includes(I.value)).map(I=>({span:I.label,$:[no({color:b.color,removable:b.multiple})],_key:I.value,_onRemove:_=>{let G=b.state.get(),B=(Array.isArray(G)?G:[G]).filter(oe=>oe!==I.value);b.multiple?b.state.set(B):b.state.set(B[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:wt(1),flex:1}}),p=(b,k)=>({update(C){b.children.update([d(C)])}}),f=b=>l.get()?u(b):m(b),h=b=>{var C;let k=b.getRoot().domElement;return(C=k==null?void 0:k.querySelector(`#${ee("selectBox",b)}`))!=null?C:null},S=(b,k)=>{var O;let C=je(h(b));if(!C.length)return;let g=C[k?C.length-1:0];g.focus(),(O=g.scrollIntoView)==null||O.call(g,{block:"nearest"})},x=(b,k)=>{let C;C=re(l,g=>{g&&(C==null||C(),requestAnimationFrame(()=>S(b,k)))},!1),m(b)},L=(b,k)=>{var N,B,oe;let C=bc(k);C.timer&&clearTimeout(C.timer),C.buffer+=b.toLowerCase(),C.timer=setTimeout(()=>{C.buffer=""},yc);let g=C.buffer.length>1&&new Set(C.buffer).size===1,O=g?C.buffer[0]:C.buffer;if(l.get()){let K=je(h(k)).filter(We=>{var fe;return ma((fe=We.textContent)!=null?fe:"",O)});if(!K.length)return;let ae=(B=(N=k.domElement)==null?void 0:N.ownerDocument)==null?void 0:B.activeElement,ie=g&&ae?K.indexOf(ae):-1,J=K[(ie+1)%K.length];J.focus(),(oe=J.scrollIntoView)==null||oe.call(J,{block:"nearest"});return}if(t)return;let I=r.filter(K=>ma(K.label,O));if(!I.length)return;let _=g?I.findIndex(K=>K.value===a.get()):-1,G=I[(_+1)%I.length];a.set(G.value)},T=P(E({_onInsert:b=>{b.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(b,k)=>{k[b.tagName]=[d({options:r,multiple:t,color:e,state:a})]}},hc("selectBoxInner",p,{options:r,multiple:t,color:e,state:a})),{onClick:(b,k)=>f(k),tabindex:0,role:"combobox",ariaLabel:"Select",ariaExpanded:b=>l.get(b),ariaHaspopup:"listbox",ariaControls:b=>b!=null&&b.elementNode?ee("selectBox",b.elementNode):void 0,onKeyDown:(b,k)=>{let C=b.key;if(C==="Escape"){u(k);return}if(C==="Enter"||C===" "){b.preventDefault(),f(k);return}if(C==="ArrowDown"||C==="ArrowUp"||C==="Home"||C==="End"){b.preventDefault();let O=C==="ArrowUp"||C==="End";l.get()?S(k,O):x(k,O);return}let g=b;C.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&L(C,k)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:b=>wt(6+wo(b)*2),minWidth:wt(32),outlineOffset:"-1px",outline:b=>`1px solid ${kt(b,"border-strong","neutral")}`,paddingInline:b=>wt(wo(b)*2),borderRadius:b=>wt(wo(b)*1.5),fontSize:b=>gc(b,"inherit"),color:b=>kt(b,"text",e),backgroundColor:b=>kt(b,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:b=>v(b,e)}}});return ca(s,T),s}import{textToneOn as Sc,themeColor as Tt,themeDensity as ua,themeSize as vc,themeSpacing as da}from"@domphy/theme";function Ey(n={}){let{accentColor:r="primary",color:o="neutral",value:e=null}=n;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 l=a.value.get(t);return a.multiple?l.includes(e):l===e},onClick:(t,a)=>{let l=a.getContext("select");if(!l)return;let m=l.value,u=m.get();l.multiple?u.includes(e)?m.set(u.filter(s=>s!==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=>vc(t,"inherit"),height:t=>da(6+ua(t)*2),paddingInline:t=>da(ua(t)*3),border:"none",outline:"none",color:t=>Tt(t,"text",o),backgroundColor:t=>Tt(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>Tt(t,"hover",o),color:t=>Tt(t,Sc(2),o)},"&[aria-selected=true]":{backgroundColor:t=>Tt(t,"shift-13",r),color:t=>Tt(t,"shift-0","neutral")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,r)}}}}import{toState as Ec}from"@domphy/core";import{themeColor as pa,themeDensity as fa,themeSize as xc,themeSpacing as ha}from"@domphy/theme";function Cc(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=je(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"||o===" "){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=Math.min(i.length-1,a+1);else if(o==="ArrowUp")l=a<=0?0:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function Ty(n={}){var a;let{color:r="neutral",multiple:o=!1}=n,e=Ec((a=n.value)!=null?a:o?[]:null),i={div:l=>{let m=e.get(l);return(Array.isArray(m)?m:[m]).map(s=>({input:null,type:"hidden",name:n.name,value:s==null?"":String(s)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,tabindex:0,onKeyDown:Cc,_onSchedule:l=>{l.setContext("select",{value:e,multiple:o})},_onInit:l=>{l.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>ha(fa(l)*2),paddingInline:l=>ha(fa(l)*2),fontSize:l=>xc(l,"inherit"),backgroundColor:l=>pa(l,"inherit",r),color:l=>pa(l,"text",r)}}}import{hashString as kc,toState as wc}from"@domphy/core";import{themeColor as Ut,themeSize as Tc,themeSpacing as ga}from"@domphy/theme";function Oy(n={}){var i;let r=wc((i=n.color)!=null?i:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=kc(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>Tc(t),color:t=>Ut(t,"text",r.get(t)),height:ga(6),display:"block",borderRadius:ga(1),backgroundColor:t=>Ut(t,"inherit",r.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Ut(t,"inherit",r.get(t))} 0%, ${Ut(t,"shift-2",r.get(t))} 50%, ${Ut(t,"inherit",r.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}import{toState as Dc}from"@domphy/core";import{themeColor as Ic,themeSize as Pc}from"@domphy/theme";function Vy(n={}){var o;let r=Dc((o=n.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=>Pc(e,"inherit"),color:e=>Ic(e,"shift-10",r.get(e))}}}import{hashString as Oc,toState as Lc}from"@domphy/core";import{themeColor as To,themeSize as Rc,themeSpacing as Pn}from"@domphy/theme";var ba={to:{transform:"rotate(360deg)"}},ya=Oc(JSON.stringify(ba));function _y(n={}){var o;let r=Lc((o=n.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=>Rc(e),backgroundColor:e=>To(e),color:e=>To(e,"text",r.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Pn(6),height:Pn(6),borderRadius:"50%",border:e=>`${Pn(.5)} solid ${To(e,"border-strong",r.get(e))}`,borderTopColor:e=>To(e,"shift-9",r.get(e)),boxSizing:"border-box",padding:0,animation:`${ya} 0.7s linear infinite`,[`@keyframes ${ya}`]:ba}}}import{ElementNode as zc,merge as Vc,toState as Mc}from"@domphy/core";import{themeColor as Do,themeSpacing as On}from"@domphy/theme";function Wy(n={}){let{direction:r="horizontal",defaultSize:o=50,min:e=10,max:i=90}=n;return{_onSchedule:(t,a)=>{Vc(a,{_context:{splitter:{direction:r,size:Mc(o),min:e,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:r==="horizontal"?"row":"column",overflow:"hidden"}}}function Ac(n){let r=n.parent;if(!r)return!0;for(let o of r.children.items)if(o instanceof zc&&o.getMetadata("splitterPanel"))return o===n;return!0}function jy(){return{_metadata:{splitterPanel:!0},_onMount:n=>{let r=n.getContext("splitter");if(!r){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=n.domElement,e=r.direction==="horizontal"?"width":"height",i=a=>{o.style[e]=`${Ac(n)?a:100-a}%`};i(r.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=r.size.addListener(i);n.addHook("Remove",()=>{var a;r.panelCount=Math.max(0,((a=r.panelCount)!=null?a:1)-1),t()})}}}function qy(n={}){let{label:r="Resize"}=n;return{role:"separator",tabindex:0,ariaLabel:r,_onMount:o=>{let e=o.getContext("splitter");if(!e){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let i=o.domElement,t=e.direction==="horizontal";i.style.cursor=t?"col-resize":"row-resize",i.setAttribute("aria-orientation",t?"vertical":"horizontal"),i.setAttribute("aria-valuemin",String(e.min)),i.setAttribute("aria-valuemax",String(e.max)),i.setAttribute("aria-valuenow",String(Math.round(e.size.get())));let a=e.size.addListener(s=>{i.setAttribute("aria-valuenow",String(Math.round(s)))}),l=s=>{let c=s.shiftKey?10:1,d=null;if(t){let p=Ee(s.key,i);p!==0&&(d=Math.min(Math.max(e.size.get()+p*c,e.min),e.max))}else s.key==="ArrowDown"?d=Math.min(e.size.get()+c,e.max):s.key==="ArrowUp"&&(d=Math.max(e.size.get()-c,e.min));s.key==="Home"?d=e.min:s.key==="End"&&(d=e.max),d!==null&&(s.preventDefault(),e.size.set(d))},m=null,u=s=>{var f;s.preventDefault();let c=i.parentElement;(f=i.setPointerCapture)==null||f.call(i,s.pointerId);let d=h=>{if(h.pointerId!==s.pointerId)return;let S=c.getBoundingClientRect(),x=t?(h.clientX-S.left)/S.width*100:(h.clientY-S.top)/S.height*100;e.size.set(Math.min(Math.max(x,e.min),e.max))};m=()=>{var h;document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),m=null,(h=i.hasPointerCapture)!=null&&h.call(i,s.pointerId)&&i.releasePointerCapture(s.pointerId)};function p(h){h.pointerId===s.pointerId&&(m==null||m())}document.addEventListener("pointermove",d),document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p)};i.addEventListener("keydown",l),i.addEventListener("pointerdown",u),o.addHook("Remove",()=>{m==null||m(),a(),i.removeEventListener("keydown",l),i.removeEventListener("pointerdown",u)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"none",backgroundColor:o=>Do(o,"inherit"),color:o=>Do(o,"text"),"&:hover":{backgroundColor:o=>Do(o,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:o=>v(o,"primary")},"&::after":{content:'""',width:On(1),height:On(1),borderRadius:On(999),backgroundColor:o=>Do(o,"shift-4")}}}}import{themeDensity as Nc,themeSpacing as Sa}from"@domphy/theme";function Gy(n={}){let{gap:r=3,align:o,justify:e,density:i=!0}=n;return{style:E(E({display:"flex",flexDirection:"column",gap:i?t=>Sa(Nc(t)*r):()=>Sa(r)},o?{alignItems:o}:{}),e?{justifyContent:e}:{})}}import{behavior as _c,isState as $c,toState as ka}from"@domphy/core";import{themeColor as Y,themeSize as va,themeSpacing as pe,themeWeight as Ea}from"@domphy/theme";function xa(n,r,o,e){if($c(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=ka(o!=null?o:e),n.setMetadata(r,i)),i}function Hc(n,r,o){return n==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",insetInlineStart:pe(3),top:pe(6),bottom:`-${pe(2)}`,width:"2px",height:"auto",insetInlineEnd:"auto",backgroundColor:e=>Y(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:pe(3),insetInlineEnd:`calc(50% + ${pe(3)})`,insetInlineStart:`calc(-50% + ${pe(3)})`,height:"2px",backgroundColor:e=>Y(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)}}}function Ca(n,r,o,e,i){let t=o==="vertical",a=Hc(o,e,i);return n.map((l,m)=>{var s;return{li:[typeof l.label=="string"?{span:l.label}:l.label],_key:(s=l.key)!=null?s:m,dataStep:String(m+1),dataStatus:c=>{let d=r.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>r.get(c)===m?"step":void 0,style:P(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:pe(1),flex:t?"none":"1",fontSize:c=>va(c,"decrease-1"),textAlign:t?"start":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:pe(6),height:pe(6),borderRadius:pe(999),fontSize:c=>va(c,"decrease-1"),fontWeight:Ea("bold"),flexShrink:"0",border:c=>`2px solid ${Y(c,"border-strong",e)}`,backgroundColor:c=>Y(c,"inherit"),color:c=>Y(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>Y(c,"shift-9",i),borderColor:c=>Y(c,"shift-9",i),color:c=>Y(c,"shift-0",i),boxShadow:c=>`0 0 0 3px ${Y(c,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>Y(c,"shift-9",i),borderColor:c=>Y(c,"shift-9",i),color:c=>Y(c,"shift-0",i)},"&[data-status=pending]":{color:c=>Y(c,"muted")},"&[data-status=active]":{color:c=>Y(c,"shift-11",i),fontWeight:Ea("bold")},"&[data-status=done]":{color:c=>Y(c,"text",e)}})}})}function eb(n={items:[]}){var a;let{items:r=[],direction:o="horizontal",color:e="neutral",accentColor:i="primary"}=n,t={items:r,direction:o,color:e,accentColor:i};return P(E({_context:{steps:{current:ka((a=n.current)!=null?a:0),direction:o,color:e,accentColor:i}},_onSchedule:(l,m)=>{let u=xa(l,"stepsCurrent",n.current,0);m[l.tagName]=Ca(r,u,o,e,i)}},_c("steps-items",l=>({update(m){let u=xa(l,"stepsCurrent",n.current,0);l.children.update(Ca(m.items,u,m.direction,m.color,m.accentColor),!!l.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:pe(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as Bc}from"@domphy/core";import{themeColor as wa,themeSize as Fc,themeWeight as Kc}from"@domphy/theme";function ab(n={}){var o;let r=Bc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Fc(e,"inherit"),fontWeight:Kc("bold"),color:e=>wa(e,"shift-11",r.get(e)),backgroundColor:e=>wa(e)}}}import{toState as Wc}from"@domphy/core";import{themeColor as jc,themeSize as qc}from"@domphy/theme";function cb(n={}){var o;let r=Wc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>qc(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>jc(e,"text",r.get(e))}}}import{toState as Uc}from"@domphy/core";import{themeColor as Yc,themeSize as Gc}from"@domphy/theme";function pb(n={}){var o;let r=Uc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Gc(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Yc(e,"text",r.get(e))}}}import{toState as Jc}from"@domphy/core";import{textToneOn as Ta,themeColor as ue,themeDensity as Dt,themeSize as Da,themeSpacing as It,themeWeight as Ia}from"@domphy/theme";function yb(n={}){var o;let r=Jc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>Da(e,"inherit"),color:e=>ue(e,"text",r.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"start",fontWeight:Ia("medium"),paddingInline:e=>It(Dt(e)*3),paddingBlock:e=>It(Dt(e)*1),color:e=>ue(e,"shift-10",r.get(e)),backgroundColor:e=>ue(e,"inherit")},"& td":{textAlign:"start",paddingInline:e=>It(Dt(e)*3),paddingBlock:e=>It(Dt(e)*1),color:e=>ue(e,"text",r.get(e)),boxShadow:e=>`inset 0 1px 0 ${ue(e,"shift-3",r.get(e))}`,fontSize:e=>Da(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"start",fontWeight:Ia("medium"),paddingInline:e=>It(Dt(e)*3),paddingBlock:e=>It(Dt(e)*1),color:e=>ue(e,"shift-10",r.get(e)),backgroundColor:e=>ue(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${ue(e,"shift-4",r.get(e))}`},"& tr":{backgroundColor:e=>ue(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>ue(e,"hover"),color:e=>ue(e,Ta(2))},"& tbody tr:hover td, & tbody tr:hover th":{color:e=>ue(e,Ta(2))}}}}import{behavior as Xc,isState as Zc,toState as Qc}from"@domphy/core";import{themeColor as Be,themeDensity as Io,themeSize as em,themeSpacing as Fe}from"@domphy/theme";function Pa(n,r,o,e){if(Zc(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=Qc(o!=null?o:e),n.setMetadata(r,i)),i}function Oa(n,r,o,e,i){let t=n.nodeId,l={div:r.map((u,s)=>{var p;let c=(p=u.key)!=null?p:s;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:f=>o.get(f)===c,tabIndex:f=>o.get(f)===c?0:-1,onClick:()=>o.set(c),onKeyDown:f=>{var b;let h=f.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;f.preventDefault();let S=r.map((k,C)=>{var g;return(g=k.key)!=null?g:C}),x=S.indexOf(c),L=x;if(h==="ArrowRight"||h==="ArrowLeft"){let k=Ee(h,f.target);L=(x+k+S.length)%S.length}else h==="Home"?L=0:h==="End"&&(L=S.length-1);o.set(S[L]);let T=f.target.closest("[role=tablist]");(b=T==null?void 0:T.querySelectorAll("[role=tab]")[L])==null||b.focus()},style:{cursor:"pointer",fontSize:f=>em(f,"inherit"),height:f=>Fe(6+Io(f)*2),paddingInline:f=>Fe(Io(f)*4),border:"none",outline:"none",color:f=>Be(f,"shift-13"),backgroundColor:f=>Be(f,"inherit"),boxShadow:f=>`inset 0 ${Fe(-.5)} 0 0 ${Be(f,"shift-1",i)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:f=>Be(f,"shift-13"),boxShadow:f=>`inset 0 ${Fe(-.5)} 0 0 ${Be(f,"shift-2",i)}`},"&[aria-selected=true]:not([disabled])":{color:f=>Be(f,"shift-13",e),boxShadow:f=>`inset 0 ${Fe(-.5)} 0 0 ${Be(f,"shift-8",e)}`},"&:focus-visible":{boxShadow:f=>v(f,e)},"&[aria-selected=true]:focus-visible":{boxShadow:f=>`${v(f,e)}, inset 0 ${Fe(-.5)} 0 0 ${Be(f,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=r.map((u,s)=>{var d;let c=(d=u.key)!=null?d:s;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,tabIndex:0,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>Fe(Io(p)*2),paddingInline:p=>Fe(Io(p)*2)}}});return[l,...m]}function Cb(n={items:[]}){let{items:r=[],accentColor:o="primary",color:e="neutral"}=n;return E({_onSchedule:(t,a)=>{var m,u;let l=Pa(t,"tabsActiveKey",n.activeKey,(u=(m=r[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=Oa(t,r,l,o,e)}},Xc("tabs-items",t=>({update(a){var m,u;let l=Pa(t,"tabsActiveKey",n.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(Oa(t,a.items,l,a.accentColor,a.color),!!t.domElement,!0)}}),{items:r,accentColor:o,color:e}))}import{behavior as tm,toState as La}from"@domphy/core";import{themeColor as Oe,themeDensity as Ln,themeSize as om,themeSpacing as Pt}from"@domphy/theme";function Ob(n={}){var i,t;let r=La((i=n.color)!=null?i:"neutral","color"),o=La((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return P(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},tm("textarea-auto-resize",(a,l)=>{let m=a.domElement,u=l.autoResize,s=!1,c,d,p=()=>{!u||s||(s=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,s=!1,u&&(d==null||d.observe(m)))},f=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(S=>{S.some(x=>x.isIntersecting)&&p()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{s||p()})),d.observe(m))},h=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",p),a.attributes.addListener("value",p),u&&(f(),p()),{resize:p,update(S){u=S.autoResize,a.attributes.addListener("value",p),u?(f(),p()):h()},destroy(){m.removeEventListener("input",p),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var l;(l=a.getBehavior("textarea-auto-resize"))==null||l.resize()},style:P(E({lineHeight:"inherit",resize:"vertical",paddingInline:a=>Pt(Ln(a)*2),paddingBlock:a=>Pt(Ln(a)*1.5),border:"none",borderRadius:a=>Pt(Ln(a)*1.5),fontSize:a=>om(a,"inherit")},ce(r)),{outlineOffset:"-1px",outline:a=>`1px solid ${Oe(a,"border-strong",r.get(a))}`,backgroundColor:a=>Oe(a,"inherit",r.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Oe(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,o.get(a))},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${Pt(.5)} solid ${Oe(a,"shift-5","error")}`},"&[data-status=error]":{outline:a=>`${Pt(.5)} solid ${Oe(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Pt(.5)} solid ${Oe(a,"shift-6","warning")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Oe(a,"muted","neutral"),outline:a=>`1px solid ${Oe(a,"border-strong","neutral")}`,backgroundColor:a=>Oe(a,"shift-2","neutral")}})})}import{toState as nm}from"@domphy/core";import{themeColor as Ra,themeDensity as Rn,themeSpacing as Po}from"@domphy/theme";function Mb(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ab(n={}){var t,a,l;let{last:r=!1}=n,o=(t=n.color)!=null?t:"neutral",e=(a=n.accentColor)!=null?a:"primary",i=nm((l=n.active)!=null?l:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>Po(Rn(m)*2),paddingBottom:m=>r?"0":Po(Rn(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:Po(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>Ra(m,"shift-8",i.get(m)?e:o),opacity:m=>i.get(m)?"1":"0.4"}},r?{}:{"&::after":{content:'""',position:"absolute",insetInlineStart:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>Po(Rn(m)*-4),width:"2px",backgroundColor:m=>Ra(m,"shift-3",o)}})}}import{behavior as rm,toState as am}from"@domphy/core";import{themeColor as za,themeDensity as zn,themeSize as im,themeSpacing as Ot}from"@domphy/theme";function Vn(n){let r=n.getMetadata("toastOpen");return r||(r=am(!1),n.setMetadata("toastOpen",r)),r}var Va=n=>{let r=n==null?void 0:n.elementNode;return r?Vn(r).get(n):!1},lm=5e3;function sm(n,r){let{duration:o,onDismiss:e}=r,i=null,t=o,a=0,l=!1,m=()=>{i&&(clearTimeout(i),i=null)},u=()=>{l||(l=!0,m(),e==null||e(),n.remove())},s=f=>{m(),!(l||!Number.isFinite(f)||f<=0)&&(a=Date.now(),i=setTimeout(u,f))};s(o);let c=()=>{i&&(t-=Date.now()-a,m())},d=()=>{l||i||s(t)},p=n.domElement;return p==null||p.addEventListener("pointerenter",c),p==null||p.addEventListener("pointerleave",d),p==null||p.addEventListener("focusin",c),p==null||p.addEventListener("focusout",d),{pause:c,resume:d,update(f){o=f.duration,e=f.onDismiss,!i&&!l&&(t=o)},destroy(){m(),p==null||p.removeEventListener("pointerenter",c),p==null||p.removeEventListener("pointerleave",d),p==null||p.removeEventListener("focusin",c),p==null||p.removeEventListener("focusout",d)}}}function Fb(n={}){let{position:r="top-center",color:o="neutral",duration:e=lm,onDismiss:i}=n,t=r.startsWith("top"),a=r.endsWith("center"),l=r.endsWith("right"),m={div:[],id:`domphy-toast-${r}`,style:{position:"fixed",display:"flex",flexDirection:t?"column":"column-reverse",alignItems:a?"center":l?"end":"start",inset:0,gap:Ot(4),zIndex:30,padding:Ot(6),pointerEvents:"none"}};return P(E({},rm("toastAutoDismiss",sm,{duration:e,onDismiss:i})),{_portal:u=>{let s=u.domElement.querySelector(`#domphy-toast-${r}`);return s||(s=u.children.insert(m).domElement),s},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Ot(32),pointerEvents:"auto",paddingBlock:u=>Ot(zn(u)*2),paddingInline:u=>Ot(zn(u)*4),borderRadius:u=>Ot(zn(u)*2),fontSize:u=>im(u,"inherit"),color:u=>za(u,"text",o),backgroundColor:u=>za(u,"inherit",o),boxShadow:A("medium"),opacity:u=>Number(Va(u)),transform:u=>Va(u)?"translateY(0)":t?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:u=>requestAnimationFrame(()=>Vn(u).set(!0)),_onBeforeRemove:(u,s)=>{var T,b;let c=!1,d=null,p=!1,f=u.getRoot(),h=(b=(T=u.domElement)==null?void 0:T.parentElement)!=null?b:null,S=()=>{var C;if(p||!h||h.id!==`domphy-toast-${r}`||h.childElementCount>0)return;p=!0;let k=(C=f.children)==null?void 0:C.items.find(g=>g.domElement===h);k?f.children.remove(k):h.remove()},x=()=>{c||(c=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",L),s(),S())},L=k=>{k.propertyName==="transform"&&x()};u.domElement.addEventListener("transitionend",L),d=setTimeout(x,350),u.addHook("Remove",()=>{var k;d&&(clearTimeout(d),d=null),(k=u.domElement)==null||k.removeEventListener("transitionend",L),S()}),Vn(u).set(!1)}})}import{behavior as cm,isState as mm,toState as um}from"@domphy/core";import{themeColor as xe,themeSize as Aa,themeSpacing as Ke}from"@domphy/theme";function Oo(n,r,o,e){if(mm(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=um(o!=null?o:e),n.setMetadata(r,i)),i}function dm(n,r){return Array.isArray(n)?n.includes(r):n===r}function pm(n,r,o,e,i){var s;let t=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t))return;n.preventDefault();let a=r.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),l=a.indexOf(o),m=l;if(t==="ArrowDown")m=(l+1)%a.length;else if(t==="ArrowUp")m=(l-1+a.length)%a.length;else if(t==="ArrowRight"||t==="ArrowLeft"){let c=Ee(t,n.target);m=(l+c+a.length)%a.length}else t==="Home"?m=0:t==="End"&&(m=a.length-1);i||e.set(a[m]);let u=n.target.closest("[role=group]");(s=u==null?void 0:u.querySelectorAll("button")[m])==null||s.focus()}function Ma(n,r,o,e,i,t){return n.map((a,l)=>{var s;let m=(s=a.key)!=null?s:String(l);return{button:[typeof a.label=="string"?{span:a.label}:a.label],_key:m,type:"button",role:"button",ariaPressed:c=>dm(r.get(c),m),tabIndex:c=>{var p,f,h,S,x;let d=r.get(c);if(e){let L=o.get(c);if(L!==null)return m===L?0:-1;let b=(h=(f=(Array.isArray(d)?d:[])[0])!=null?f:(p=n[0])==null?void 0:p.key)!=null?h:"0";return m===b?0:-1}return d===m||d===""&&m===((x=(S=n[0])==null?void 0:S.key)!=null?x:"0")?0:-1},onFocus:()=>o.set(m),onClick:()=>{let c=r.get();if(e){let d=Array.isArray(c)?[...c]:[];r.set(d.includes(m)?d.filter(p=>p!==m):[...d,m])}else r.set(c===m?"":m)},onKeyDown:c=>pm(c,n,m,r,e),style:{cursor:"pointer",fontSize:c=>Aa(c,"inherit"),height:Ke(6),paddingBlock:Ke(1),paddingInline:Ke(2),border:"none",borderRadius:Ke(1.5),color:c=>xe(c,"shift-13",i),backgroundColor:c=>xe(c,"inherit",i),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:c=>xe(c,"shift-13",i),backgroundColor:c=>xe(c,"hover",i)},"&:active:not([disabled])":{backgroundColor:c=>xe(c,"increase-2",i)},"&[aria-pressed=true]":{backgroundColor:c=>xe(c,"shift-3",t),color:c=>xe(c,"shift-13",t)},"&:focus-visible":{boxShadow:c=>v(c,t)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Gb(n={items:[]}){let{items:r=[],multiple:o=!1,color:e="neutral",accentColor:i="primary"}=n;return P(E({role:"group",_onSchedule:(a,l)=>{let m=Oo(a,"toggleGroupValue",n.value,o?[]:"");a.setContext("toggleGroup",{value:m,multiple:o});let u=Oo(a,"toggleGroupFocusedKey",void 0,null);l[a.tagName]=Ma(r,m,u,o,e,i)}},cm("toggle-items",a=>({update(l){let m=Oo(a,"toggleGroupValue",n.value,l.multiple?[]:""),u=Oo(a,"toggleGroupFocusedKey",void 0,null);a.children.update(Ma(l.items,m,u,l.multiple,l.color,l.accentColor),!!a.domElement,!0)}}),{items:r,multiple:o,color:e,accentColor:i})),{style:{display:"flex",paddingBlock:Ke(1),paddingInline:Ke(1),gap:Ke(1),borderRadius:Ke(2),fontSize:a=>Aa(a,"inherit"),backgroundColor:a=>xe(a,"inherit",e),color:a=>xe(a,"text",e),outline:a=>`1px solid ${xe(a,"border",e)}`,outlineOffset:"-1px"}})}function Qb(n={}){return aa(n)}function eS(){return{div:null,style:{flex:"1 1 0"}}}import{merge as fm,toState as Na}from"@domphy/core";import{themeColor as _a,themeDensity as Mn,themeSize as hm,themeSpacing as An}from"@domphy/theme";function lS(n={}){let{open:r=!1,placement:o="top",content:e="Tooltip Content",openDelay:i,closeDelay:t}=n,a=Na(o),l=Na(e),m={span:h=>l.get(h)},{show:u,hide:s,anchorPartial:c,openState:d}=ge({kind:"tooltip",open:r,onDismiss:n.onDismiss,placement:a,content:m,openDelay:i,closeDelay:t}),p={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:h=>An(Mn(h)*1),paddingInline:h=>An(Mn(h)*3),borderRadius:h=>An(Mn(h)*1.5),color:h=>_a(h,"text"),backgroundColor:h=>_a(h),fontSize:h=>hm(h,"inherit"),boxShadow:A("low")},$:[Zr({placement:a,bordered:!1})]};return m.$||(m.$=[]),m.$.push(p),fm(c,{ariaDescribedby:h=>h!=null&&h.elementNode&&d.get(h)?ee("tooltip",h.elementNode):void 0,onMouseEnter:(h,S)=>u(S),onMouseLeave:(h,S)=>s(S),onFocus:(h,S)=>u(S),onBlur:(h,S)=>s(S),onKeyDown:(h,S)=>h.key==="Escape"&&s(S)}),c}import{ElementNode as $a}from"@domphy/core";function Ha(n,r){return n.key!==void 0&&n.key!==null?String(n.key):`index-${r}`}function uS(n={}){let{duration:r=300,delay:o=0}=n,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:l=>{l.addHook("Remove",()=>{for(let m of Array.from(i.values()))m();i.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:l=>{e=new Map,!xt()&&l.children.items.forEach((m,u)=>{if(!(m instanceof $a))return;let s=m.domElement;s&&e.set(Ha(m,u),s.getBoundingClientRect())})},_onUpdate:l=>{l.children.items.forEach((m,u)=>{var k;if(!(m instanceof $a))return;let s=m.domElement;if(!s)return;let c=Ha(m,u),d=e.get(c);if(!d)return;let p=s.getBoundingClientRect(),f=d.left-p.left,h=d.top-p.top;if(Math.abs(f)<.5&&Math.abs(h)<.5)return;(k=i.get(s))==null||k(),s.style.transition="none",s.style.transform=`translate(${f}px, ${h}px)`,s.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),s.style.transition=`transform ${r}ms ease ${o}ms`,s.style.transform="translate(0px, 0px)"});a.add(S);let x=!1,L=null,T=()=>{x||(x=!0,L&&(t.delete(L),L=null),i.delete(s),s.removeEventListener("transitionend",b),s.style.transition="",s.style.transform="")},b=C=>{C.propertyName==="transform"&&T()};i.set(s,()=>{x=!0,L&&(clearTimeout(L),t.delete(L),L=null),i.delete(s),s.removeEventListener("transitionend",b)}),s.addEventListener("transitionend",b),L=setTimeout(T,r+o+34),t.add(L)}),e.clear()}}}import{toState as gm}from"@domphy/core";import{themeColor as Ba,themeSize as ym,themeSpacing as bm}from"@domphy/theme";function hS(n={}){var o;let r=gm((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ym(e,"inherit"),backgroundColor:e=>Ba(e),color:e=>Ba(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:bm(3),listStyleType:"disc",listStylePosition:"outside"}}}function yS(){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{xm as abbreviation,Pm as accordion,zm as alert,Nm as avatar,Bm as badge,jm as blockquote,Gm as breadcrumb,eu as breadcrumbEllipsis,pu as button,Zn as buttonGhost,Su as buttonSwitch,wu as card,Pu as code,od as combobox,cd as command,ud as commandItem,md as commandSearch,Sd as datePicker,kd as descriptionList,Pd as details,_d as dialog,Kd as divider,Xd as drawer,A as elevation,op as emphasis,ip as empty,sp as errorBoundary,fp as fab,bp as figure,v as focusRing,xp as formGroup,wp as grid,Op as heading,Vp as horizontalRule,_p as icon,Fp as image,Up as inputCheckbox,Zp as inputColor,nf as inputDateTime,cf as inputFile,hf as inputNumber,Sf as inputOTP,wf as inputPassword,Lf as inputRadio,Af as inputRange,Ff as inputSearch,Yf as inputSwitch,eh as inputText,ah as keyboard,ch as label,fh as link,vh as linkButton,Th as list,Dh as listItem,Ih as listItemButton,Rh as mark,_h as menu,Wh as motion,Gh as orderedList,eg as pagination,ag as panelSection,mg as paragraph,gg as popover,Zr as popoverArrow,Cg as preformated,Dg as progress,Vg as rating,$g as ringProgress,aa as row,qg as scrollArea,ey as segmented,iy as select,gy as selectBox,Ey as selectItem,Ty as selectList,Oy as skeleton,Vy as small,_y as spinner,Wy as splitter,qy as splitterHandle,jy as splitterPanel,Gy as stack,eb as steps,ab as strong,cb as subscript,pb as superscript,yb as table,Cb as tabs,no as tag,Ob as textarea,Mb as timeline,Ab as timelineItem,Fb as toast,Gb as toggleGroup,Qb as toolbar,eS as toolbarSpacer,lS as tooltip,uS as transitionGroup,hS as unorderedList,yS as visuallyHidden};
|
|
1
|
+
var Za=Object.defineProperty,Qa=Object.defineProperties;var ei=Object.getOwnPropertyDescriptors;var jn=Object.getOwnPropertySymbols;var ti=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable;var qn=(n,r,o)=>r in n?Za(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o,E=(n,r)=>{for(var o in r||(r={}))ti.call(r,o)&&qn(n,o,r[o]);if(jn)for(var o of jn(r))oi.call(r,o)&&qn(n,o,r[o]);return n},P=(n,r)=>Qa(n,ei(r));import{toState as Un}from"@domphy/core";import{themeColor as Mt,themeSize as ni,themeSpacing as ri}from"@domphy/theme";function Pm(n={}){var e,i;let r=Un((e=n.color)!=null?e:"neutral","color"),o=Un((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>ni(t),backgroundColor:t=>Mt(t),color:t=>Mt(t,"shift-10",r.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Mt(t,"shift-7",r.get(t)),textUnderlineOffset:ri(.72),cursor:"help","&:hover":{color:t=>Mt(t,"shift-11",o.get(t)),textDecorationColor:t=>Mt(t,"shift-9",o.get(t))}}}}import{toState as Gn}from"@domphy/core";import{themeColor as Oo,themeDensity as ai,themeSpacing as ii}from"@domphy/theme";import{themeColor as Yn}from"@domphy/theme";function v(n,r="primary"){let o=Yn(n,"surface"),e=Yn(n,"shift-9",r);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}var Ke=n=>ii(ai(n)*1.5);function Am(n={}){var i,t;let{type:r="single"}=n,o=Gn((i=n.color)!=null?i:"neutral","color"),e=Gn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{let l=a.domElement;if(!l)return;if(r==="single"){let u=s=>{let c=s.target.closest("summary");if(!c)return;let d=c.closest("details");!d||d.parentElement!==l||d.open||Array.from(l.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};l.addEventListener("click",u),a.addHook("Remove",()=>l.removeEventListener("click",u))}let m=u=>{var b;let s=u.key;if(!["ArrowUp","ArrowDown","Home","End"].includes(s))return;let c=u.target.closest("summary");if(!c)return;let d=c.closest("details");if(!d||d.parentElement!==l)return;let p=Array.from(l.querySelectorAll(":scope > details > summary")),f=p.indexOf(c);if(f===-1)return;let h=f;s==="ArrowDown"?h=(f+1)%p.length:s==="ArrowUp"?h=(f-1+p.length)%p.length:s==="Home"?h=0:s==="End"&&(h=p.length-1),u.preventDefault(),(b=p[h])==null||b.focus()};l.addEventListener("keydown",m),a.addHook("Remove",()=>l.removeEventListener("keydown",m))},style:{display:"flex",flexDirection:"column",borderRadius:Ke,outline:a=>`1px solid ${Oo(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>Oo(a,"text",o.get(a)),"& > details":{borderBottom:a=>`1px solid ${Oo(a,"border-strong",o.get(a))}`},"& > details:first-child > summary":{borderTopLeftRadius:Ke,borderTopRightRadius:Ke},"& > details:last-child:not([open]) > summary":{borderBottomLeftRadius:Ke,borderBottomRightRadius:Ke},"& > details:last-child":{borderBottom:"none",borderBottomLeftRadius:Ke,borderBottomRightRadius:Ke},"& > details > summary:focus-visible":{boxShadow:a=>v(a,e.get(a))}}}}import{toState as li}from"@domphy/core";import{themeColor as Ro,themeDensity as zo,themeSize as si,themeSpacing as At}from"@domphy/theme";function Hm(n={}){var o;let r=li((o=n.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:At(3),paddingBlock:e=>At(zo(e)*2),paddingInline:e=>At(zo(e)*4),borderRadius:e=>At(zo(e)*1.5),boxShadow:e=>`inset ${At(1)} 0 0 0 ${Ro(e,"shift-8",r.get(e))}`,backgroundColor:e=>Ro(e,"inherit",r.get(e)),color:e=>Ro(e,"shift-10",r.get(e)),fontSize:e=>si(e,"inherit")}}}import{toState as ci}from"@domphy/core";import{themeColor as Vo,themeSize as mi,themeSpacing as Jn,themeWeight as ui}from"@domphy/theme";function Wm(n={}){var o;let r=ci((o=n.color)!=null?o:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:Jn(9),height:Jn(9),fontSize:e=>mi(e,"inherit"),fontWeight:ui("semibold"),userSelect:"none",backgroundColor:e=>Vo(e,"inherit",r.get(e)),color:e=>Vo(e,"shift-11",r.get(e)),boxShadow:e=>`0 0 0 1px ${Vo(e,"border",r.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Xn}from"@domphy/core";import{themeColor as Mo,themeDensity as Ao,themeSize as di,themeSpacing as Jt,themeWeight as pi}from"@domphy/theme";function Ym(n={}){var i;let{label:r=999}=n,o=Xn(r),e=Xn((i=n.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%,-50%)",paddingInline:t=>Jt(Ao(t)*(1.5/1.5)),minWidth:Jt(5),height:t=>Jt(Ao(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>di(t,"decrease-2"),fontWeight:pi("semibold"),lineHeight:1,borderRadius:t=>Jt(Ao(t)*999),backgroundColor:t=>Mo(t,"shift-9",e.get(t)),color:t=>Mo(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${Mo(t,"shift-0",e.get(t))}`}}}}import{toState as fi}from"@domphy/core";import{themeColor as No,themeDensity as Zn,themeSize as hi,themeSpacing as _o}from"@domphy/theme";function Zm(n={}){var o;let r=fi((o=n.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=>hi(e,"inherit"),backgroundColor:e=>No(e,"inherit",r.get(e)),color:e=>No(e,"text",r.get(e)),boxShadow:e=>`inset ${_o(1)} 0 0 0 ${No(e,"shift-4",r.get(e))}`,border:"none",paddingBlock:e=>_o(Zn(e)*2),paddingInline:e=>_o(Zn(e)*4),margin:0}}}import{toState as gi}from"@domphy/core";import{themeColor as $o,themeSize as yi,themeSpacing as Qn}from"@domphy/theme";function ou(n={}){var e;let{separator:r="/"}=n,o=gi((e=n.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},_doctorDisable:"low-contrast",ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>yi(i,"inherit"),gap:Qn(1),color:i=>$o(i,"text",o.get(i)),backgroundColor:i=>$o(i,"inherit",o.get(i)),"& > *":{display:"inline-flex",alignItems:"center"},"& > *:not(:last-child)::after":{content:`"${r}"`,color:i=>$o(i,"muted",o.get(i)),paddingInlineStart:Qn(1)},"& > [aria-current=page]":{pointerEvents:"none"}}}}import{toState as bi}from"@domphy/core";import{textToneOn as Si,themeColor as Ho,themeSize as vi,themeSpacing as er}from"@domphy/theme";function lu(n={}){var o;let r=bi((o=n.color)!=null?o:"neutral","color");return{type:"button",_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=>vi(e,"inherit"),paddingInline:er(1),border:"none",background:"none",cursor:"pointer",color:e=>Ho(e,"text",r.get(e)),borderRadius:er(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>Ho(e,Si(2),r.get(e)),backgroundColor:e=>Ho(e,"hover",r.get(e))},"&:focus-visible":{boxShadow:e=>v(e,r.get(e))}}}}import{toState as ki}from"@domphy/core";import{themeColor as Q,themeDensity as Qt,themeSize as wi,themeSpacing as eo}from"@domphy/theme";var mt={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as Ei}from"@domphy/core";import{textToneOn as tr,themeColor as ut,themeDensity as Xt,themeSize as xi,themeSpacing as Zt}from"@domphy/theme";var Ci={small:.5,medium:1,large:1.5};function or(n={}){var i,t,a;let r=Ei((i=n.color)!=null?i:"neutral","color"),o=Ci[(t=n.size)!=null?t:"medium"],e=mt[(a=n.size)!=null?a:"medium"];return{type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>xi(l,e),paddingBlock:l=>Zt(Xt(l)*o),paddingInline:l=>Zt(Xt(l)*o),borderRadius:l=>Zt(Xt(l)*1.5),display:"inline-flex",width:"fit-content",justifyContent:"center",alignItems:"center",gap:l=>Zt(Xt(l)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:l=>ut(l,"text",r.get(l)),"&:hover:not([disabled]):not([aria-busy=true])":{color:l=>ut(l,tr(2),r.get(l)),backgroundColor:l=>ut(l,"hover",r.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{color:l=>ut(l,tr(2),r.get(l)),backgroundColor:l=>ut(l,"increase-2",r.get(l))},"&:focus-visible":{boxShadow:l=>v(l,r.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:l=>ut(l,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Ti={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function vu(n={}){var a,l,m,u;let r=(a=n.variant)!=null?a:"outline";if(r==="ghost")return or({color:n.color,size:n.size});let o=ki((l=n.color)!=null?l:"primary","color"),e=r==="solid",i=Ti[(m=n.size)!=null?m:"medium"],t=mt[(u=n.size)!=null?u:"medium"];return P(E({type:"button",_onInsert:s=>{s.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:s=>wi(s,t),paddingBlock:s=>eo(Qt(s)*i.block),paddingInline:s=>eo(Qt(s)*i.inline),borderRadius:s=>eo(Qt(s)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:s=>eo(Qt(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":s=>`1px solid ${Q(s,"border-strong",o.get(s))}`,color:s=>e?Q(s,"shift-0","neutral"):Q(s,"shift-13",o.get(s)),backgroundColor:s=>e?Q(s,"shift-13",o.get(s)):Q(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:s=>e?Q(s,"shift-0","neutral"):Q(s,"shift-14",o.get(s)),backgroundColor:s=>e?Q(s,"shift-14",o.get(s)):Q(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:s=>e?Q(s,"shift-15",o.get(s)):Q(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:s=>Q(s,"shift-2","neutral"),outline:s=>`1px solid ${Q(s,"border-strong","neutral")}`,color:s=>Q(s,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as Bo}from"@domphy/core";import{textToneOn as Di,themeColor as Oe,themeSize as Ii,themeSpacing as se}from"@domphy/theme";function Tu(n={}){var t,a;let{checked:r=!1}=n,o=Bo(r),e=Bo((t=n.color)!=null?t:"neutral","color"),i=Bo((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:l=>{l.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaLabel:"Toggle",ariaChecked:l=>o.get(l),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Ii(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${Oe(l,"shift-7",e.get(l))}`,minWidth:se(12),minHeight:se(6),width:"fit-content",flexShrink:0,borderRadius:se(999),paddingInlineStart:se(7),paddingInlineEnd:se(2),cursor:"pointer",transition:"padding-inline-start 0.3s, padding-inline-end 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:l=>Oe(l,"inherit",e.get(l)),color:l=>Oe(l,"text",e.get(l)),"&:focus-visible":{boxShadow:l=>v(l,i.get(l))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",insetInlineStart:se(.5),top:"50%",transform:"translateY(-50%)",transition:"inset-inline-start 0.3s",width:se(5),height:se(5),borderRadius:se(999),color:l=>Oe(l,"text"),backgroundColor:l=>Oe(l,"decrease-2",e.get(l)),outline:l=>`1px solid ${Oe(l,"shift-7",e.get(l))}`,outlineOffset:"-1px"},"&[aria-checked=true]":{backgroundColor:l=>Oe(l,"increase-3",i.get(l)),outline:"none",color:l=>Oe(l,Di(3),i.get(l)),paddingInlineStart:se(2),paddingInlineEnd:se(7)},"&[aria-checked=true] > :first-child":{insetInlineStart:`calc(100% - ${se(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Li}from"@domphy/core";import{themeColor as dt,themeDensity as Ce,themeSpacing as he,themeWeight as Oi}from"@domphy/theme";var Pi={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 A(n){return Pi[n]}function Ru(n={}){var o;let r=Li((o=n.color)!=null?o:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>he(Ce(e)*2),backgroundColor:e=>dt(e,"inherit",r.get(e)),color:e=>dt(e,"shift-10",r.get(e)),outline:e=>`1px solid ${dt(e,"border-strong",r.get(e))}`,outlineOffset:"-1px",boxShadow:A("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>he(Ce(e)*2),paddingInline:e=>he(Ce(e)*4),fontWeight:Oi("semibold"),color:e=>dt(e,"shift-11",r.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>he(Ce(e)*4),paddingBottom:e=>he(Ce(e)*2),color:e=>dt(e,"text",r.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>he(Ce(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>he(Ce(e)*4)},"& > footer":{gridArea:"footer",display:"flex",gap:he(2),paddingBlock:e=>he(Ce(e)*2),paddingInline:e=>he(Ce(e)*4),borderTop:e=>`1px solid ${dt(e,"border",r.get(e))}`}}}}import{toState as Ri}from"@domphy/core";import{themeColor as nr,themeDensity as Fo,themeFont as zi,themeSize as Vi,themeSpacing as Ko}from"@domphy/theme";function Au(n={}){var o;let r=Ri((o=n.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=>Vi(e,"inherit"),fontFamily:zi("monospace"),color:e=>nr(e,"text",r.get(e)),backgroundColor:e=>nr(e,"inherit",r.get(e)),lineHeight:"normal",minHeight:e=>Ko(Fo(e)*(6/1.5)),paddingInline:e=>Ko(Fo(e)*(1.5/1.5)),borderRadius:e=>Ko(Fo(e)*(1/1.5))}}}import{behavior as ol,merge as Yo,toState as ro}from"@domphy/core";import{themeColor as qe,themeDensity as ao,themeSize as mr,themeSpacing as Ve}from"@domphy/theme";import{toState as Mi}from"@domphy/core";import{themeColor as rr}from"@domphy/theme";var Ai="text",Wo="shift-11";function ce(n="neutral"){let r=Mi(n,"color");return{color:o=>rr(o,Wo,r.get(o)),"&::placeholder":{color:o=>rr(o,Ai,r.get(o))}}}import{behavior as $i,merge as Hi}from"@domphy/core";import{autoUpdate as Bi,computePosition as Fi,flip as Ki,offset as Wi,shift as ji}from"@domphy/floating";import{effect as ar,toState as Ni}from"@domphy/core";function _i(n){return typeof n.set=="function"}function re(n,r,o=!0){if(typeof n.addListener=="function")return o&&r(n.get()),n.addListener(r);if(o)return ar(()=>{r(n.get())});let e=!0,i=ar(()=>{let t=n.get();e||r(t)});return e=!1,i}function jo(n,r){_i(n)&&n.set(r)}function Re(n,r){r==null||r(),jo(n,!1)}function pt(n){return Ni(n!=null?n:!1)}var ir=100;function ee(n,r){return`domphy-${n}-${r.nodeId}`}var qo="data-domphy-floating",Uo=`:scope > [${qo}]`,lr="data-domphy-floating-kind";function to(n){let r=n.querySelector(Uo);return r?Array.from(r.children).some(o=>o.getAttribute(lr)!=="tooltip"):!1}function qi(n,r){var Yt,st,zt,Gt;let{openState:o,onDismiss:e,placement:i,content:t,keepOpenOnContentHover:a,openDelay:l,closeDelay:m}=r,{kind:u}=r,s=`floating:${u}`,c=null,d=null,p=null,f=null,h=!1,b=n.domElement,x=n.getRoot(),O=ee(u,n),T={style:{position:"fixed",pointerEvents:"auto",visibility:R=>o.get(R)?"visible":"hidden"},onKeyDown:R=>{R.key==="Escape"&&oe()&&(R.stopPropagation(),N())},onMouseEnter:()=>a&&G(),onMouseLeave:()=>a&&N(),_onMount:R=>{var H;if(p=R.domElement,p.id||(p.id=O),p.setAttribute(lr,u),b&&p&&!p.hasAttribute("data-theme")){let ne=(H=b.closest("[data-theme]"))==null?void 0:H.getAttribute("data-theme");ne&&p.setAttribute("data-theme",ne)}},_portal:R=>{let H=b.closest("dialog");if(H){let X=H.querySelector(Uo);return X||(X=H.ownerDocument.createElement("div"),X.setAttribute(qo,""),Object.assign(X.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),H.appendChild(X)),X}let ne=R.domElement.querySelector(Uo);if(!ne){let X={div:[],[qo]:"",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};ne=R.children.insert(X).domElement}return ne}},S=R=>Hi(R,T);S(t);let k=()=>{h||(h=!0,f=x.children.insert(t),f._behaviorInstances.set(s,it))},C=()=>{f&&(f._behaviorInstances.delete(s),f.remove(),f=null)},g=()=>{h&&(!p||!p.isConnected)&&(d==null||d(),d=null,f=null,p=null,h=!1),k(),b&&p&&(d==null||d(),d=Bi(b,p,()=>{Fi(b,p,{placement:i.get(),middleware:[Wi(12),Ki(),ji()],strategy:"fixed"}).then(({x:R,y:H,placement:ne})=>{p&&(Object.assign(p.style,{left:`${R}px`,top:`${H}px`}),i.set(ne))})}),jo(o,!0))},L=()=>{if(!p)return!1;let H=p.getRootNode().activeElement;return!!H&&p.contains(H)},I=()=>{var ne,X,Vt;if(!b)return;(ne=b.focus)==null||ne.call(b);let H=b.getRootNode().activeElement;H&&b.contains(H)||(Vt=(X=b.querySelector('input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'))==null?void 0:X.focus)==null||Vt.call(X)},_=()=>{d==null||d(),d=null;let R=L();C(),p=null,h=!1,R&&I(),Re(o,e)},G=()=>{c&&clearTimeout(c),c=setTimeout(g,l)},N=()=>{c&&clearTimeout(c),c=setTimeout(_,m)},B=R=>{if(!o.get()||!b||!p)return;let H=R.target;!b.contains(H)&&!p.contains(H)&&N()};(Yt=x.domElement)==null||Yt.addEventListener("click",B);let oe=()=>{var R;return!!p&&((R=p.parentElement)==null?void 0:R.lastElementChild)===p},K=R=>{R.key==="Escape"&&o.get()&&oe()&&N()},ae=(Gt=(zt=(st=x.domElement)==null?void 0:st.ownerDocument)!=null?zt:x.domElement)!=null?Gt:null;ae==null||ae.addEventListener("keydown",K);let ie=R=>{R?h||g():h&&_()},J=()=>{},Fe=!1,fe=!1,it,lt=R=>{var H;R._behaviors=P(E({},(H=R._behaviors)!=null?H:{}),{[s]:{attach:()=>it,props:{}}})};return it={show:G,hide:N,panelId:O,update(R){if(!fe&&(e=R.onDismiss,R.openState!==o&&(J(),o=R.openState,J=re(o,ie,!1),o.get()&&g()),i=R.placement,t=R.content,a=R.keepOpenOnContentHover,l=R.openDelay,m=R.closeDelay,S(t),lt(t),f)){fe=!0;try{f.patch(t)}finally{fe=!1}}},destroy(){var R;Fe||(Fe=!0,c&&clearTimeout(c),c=null,d==null||d(),d=null,C(),p=null,h=!1,J(),J=()=>{},(R=x.domElement)==null||R.removeEventListener("click",B),ae==null||ae.removeEventListener("keydown",K))}},lt(t),J=re(o,ie),it}function ge(n){var u,s;let{kind:r,placement:o,onDismiss:e}=n,i=pt(n.open),t=`floating:${r}`,a=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.show()},l=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.hide()},m=E({onKeyDown:(c,d)=>c.key==="Escape"&&l(d)},$i(t,qi,{kind:r,openState:i,onDismiss:e,placement:o,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover,openDelay:(u=n.openDelay)!=null?u:ir,closeDelay:(s=n.closeDelay)!=null?s:ir}));return{show:a,hide:l,anchorPartial:m,openState:i}}function We(n){return n?Array.from(n.querySelectorAll("[role=option]")).filter(r=>r.getAttribute("aria-disabled")!=="true"&&!r.hasAttribute("disabled")):[]}import{behavior as Ui,ElementNode as Yi,rawHtml as Gi,toState as Ji}from"@domphy/core";import{themeColor as oo,themeDensity as je,themeSize as Xi,themeSpacing as ze}from"@domphy/theme";var Zi='<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>',Nt=1.5,Qi=6/Nt,sr=2.5/Nt,el=1/Nt,cr=4/Nt,tl=1/Nt;function no(n={}){var e;let{removable:r=!1}=n,o=Ji((e=n.color)!=null?e:"neutral","color");return P(E({dataTone:"shift-2"},Ui("tag-remove",(i,t)=>{let a=()=>i.remove(),l=()=>({span:Gi(Zi),_key:"tag-remove",onClick:s=>{s.stopPropagation(),a()},onKeyDown:s=>{let c=s;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:s=>ze(je(s)*tl),width:s=>ze(je(s)*cr),height:s=>ze(je(s)*cr),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:s=>oo(s,"shift-4",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))}}}),m=()=>{var s;return(s=i.children.items.find(c=>c instanceof Yi&&c.key==="tag-remove"))!=null?s:null},u=s=>{let c=m();s.removable&&!c?i.children.insert(l()):!s.removable&&c&&i.children.remove(c)};return u(t),{update:u}},{removable:r})),{style:{display:"inline-flex",width:"fit-content",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",lineHeight:"normal",minHeight:i=>ze(je(i)*Qi),paddingBlock:0,borderRadius:i=>ze(je(i)*999),paddingInlineStart:i=>ze(je(i)*sr),paddingInlineEnd:i=>ze(je(i)*(r?el:sr)),gap:ze(1.5),fontSize:i=>Xi(i,"decrease-1"),backgroundColor:i=>oo(i,"inherit",o.get(i)),color:i=>oo(i,"text",o.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${oo(i,"border-strong",o.get(i))}`}})}function cd(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=ro(n.value),l=ro(i),{show:m,hide:u,anchorPartial:s}=ge({kind:"combobox",open:l,onDismiss:n.onDismiss,placement:ro(o),content:n.content}),c={onClick:(g,L)=>!t&&u(L),dataTone:"shift-0",style:{backgroundColor:g=>qe(g,"inherit"),color:g=>qe(g,"text"),borderRadius:g=>Ve(ao(g)*2),outline:g=>`1px solid ${qe(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};Yo(n.content,c);let d=P(E({border:"none",outline:"none",padding:0,margin:0,flex:1,minWidth:Ve(8),lineHeight:"inherit",marginInlineStart:Ve(2),fontSize:g=>mr(g,"inherit")},ce(e)),{backgroundColor:g=>qe(g,"inherit",e)}),p=g=>{var L,I;return(I=(L=g==null?void 0:g.elementNode)==null?void 0:L.getBehavior("comboboxInner"))==null?void 0:I.query},f=g=>{let L=g;for(;L;){if(L._behaviorInstances.has("floating:combobox"))return L;L=L.parent}return g},h=(g,L)=>{var oe,K;let I=f(g),_=I.getRoot().domElement,G=(oe=_==null?void 0:_.querySelector(`#${ee("combobox",I)}`))!=null?oe:null,N=We(G);if(!N.length)return;let B=N[L?N.length-1:0];B.focus(),(K=B.scrollIntoView)==null||K.call(B,{block:"nearest"})},b=(g,L)=>{let I;I=re(l,_=>{_&&(I==null||I(),requestAnimationFrame(()=>h(g,L)))},!1),m(g)},O={role:"combobox",ariaHaspopup:"listbox",ariaAutocomplete:"list",ariaExpanded:g=>l.get(g),ariaControls:g=>g!=null&&g.elementNode?ee("combobox",f(g.elementNode)):void 0,onKeyDown:(g,L)=>{let I=g.key;if(!(I!=="ArrowDown"&&I!=="ArrowUp")){if(g.preventDefault(),l.get()){h(L,I==="ArrowUp");return}b(L,I==="ArrowUp")}}},T=g=>g?(Yo(g,E({onClick:(L,I)=>m(I),style:d,_key:"combobox-input"},O)),g):E({input:null,ariaLabel:"Filter options",onClick:(L,I)=>m(I),value:L=>{var I,_;return(_=(I=p(L))==null?void 0:I.get(L))!=null?_:""},onInput:(L,I)=>{var _;(_=I.getBehavior("comboboxInner"))==null||_.query.set(L.target.value),m(I)},style:d,_key:"combobox-input"},O),S=g=>({div:L=>{l.get(L);let I=g.state.get(L),_=Array.isArray(I)?I:[I],N=g.options.filter(B=>_.includes(B.value)).map(B=>({span:B.label,$:[no({color:g.color,removable:!0})],_key:B.value,_onRemove:oe=>{let K=g.state.get(),ie=(Array.isArray(K)?K:[K]).filter(J=>J!==B.value);g.multiple?g.state.set(ie):g.state.set(ie[0])}}));return N.push(T(g.input)),N},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:Ve(1),flex:1,minWidth:0}}),C=P(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,L)=>{L[g.tagName]=[S({options:r,multiple:t,color:e,state:a,input:n.input})]}},ol("comboboxInner",(g,L)=>{let I=g.getMetadata("comboboxQuery");return I||(I=ro(""),g.setMetadata("comboboxQuery",I)),{query:I,update(_){g.children.update([S(_)])}}},{options:r,multiple:t,color:e,state:a,input:n.input})),{style:{display:"flex",alignItems:"center",minWidth:Ve(32),outlineOffset:"-1px",outline:g=>`1px solid ${qe(g,"border-strong","neutral")}`,paddingBlock:g=>Ve(ao(g)*1),paddingInline:g=>Ve(ao(g)*1),borderRadius:g=>Ve(ao(g)*1.5),fontSize:g=>mr(g,"inherit"),color:g=>qe(g,"text",e),backgroundColor:g=>qe(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>v(g,e)}}});return Yo(s,C),s}import{merge as nl,toState as rl}from"@domphy/core";import{themeColor as Ue,themeDensity as io,themeSize as ur,themeSpacing as lo}from"@domphy/theme";function al(n){return Array.from(n.querySelectorAll("[data-command-item]")).filter(r=>!r.hidden&&!r.hasAttribute("disabled"))}function il(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=al(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=(a+1)%i.length;else if(o==="ArrowUp")l=a<=0?i.length-1:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function gd(){return{role:"group",ariaLabel:"Commands",onKeyDown:il,_onSchedule:(n,r)=>{nl(r,{_context:{command:{query:rl("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function yd(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:P(E({fontSize:e=>ur(e,"inherit"),paddingInline:e=>lo(io(e)*3),paddingBlock:e=>lo(io(e)*2),border:"none",borderBottom:e=>`1px solid ${Ue(e,"border",r)}`,outline:"none"},ce(r)),{backgroundColor:e=>Ue(e,"inherit",r),transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>Ue(e,"shift-6",o),boxShadow:e=>v(e,o)}})}}function bd(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{type:"button",dataCommandItem:"",_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=m=>{var s,c;if(m.length===0){t.hidden=!1;return}let u=(c=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?c:"";t.hidden=!u.includes(m.toLowerCase())};a(i.query.get());let l=i.query.addListener(a);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>ur(e,"inherit"),minHeight:e=>lo(6+io(e)*2),paddingInline:e=>lo(io(e)*3),border:"none",outline:"none",color:e=>Ue(e,"shift-13",r),backgroundColor:e=>Ue(e,"inherit",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>Ue(e,"shift-13",r),backgroundColor:e=>Ue(e,"hover",r)},"&:focus-visible":{boxShadow:e=>v(e,o)}}}}import{behavior as ll,merge as sl,toState as ye}from"@domphy/core";import{textToneOn as Qo,themeColor as F,themeDensity as cl,themeSize as ft,themeSpacing as j,themeWeight as Go}from"@domphy/theme";var q=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),Ye=(n,r)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+r),Jo=(n,r)=>new Date(n.getFullYear(),n.getMonth()+r,n.getDate()),_t=(n,r)=>!!n&&!!r&&n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate(),Xo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,Zo=(n,r)=>Ye(n,-((n.getDay()-r+7)%7));function ml(n){var r,o;try{let e=new Intl.Locale(n),i=(o=(r=e.getWeekInfo)==null?void 0:r.call(e))!=null?o:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function ul(n,r){let o=r,e=null,i=a=>{e==null||e(),e=a.onChange?a.selection.addListener(l=>a.onChange(l)):null},t=(a,l)=>{a!==l&&a.set(l.get())};return i(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)&&i(a),o=a},destroy(){e==null||e(),e=null}}}function Td(n={}){var Bn,Fn,Kn,Wn;let{mode:r="single",time:o=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:m}=n,u=(Bn=n.weekStartsOn)!=null?Bn:ml(a),s=ye((Fn=n.accentColor)!=null?Fn:"primary","accentColor"),c=ye((Kn=n.placement)!=null?Kn:"bottom-start"),d=ye((Wn=n.value)!=null?Wn:r==="range"?[null,null]:null),p=(()=>{let y=d.get(),w=r==="range"?y==null?void 0:y[0]:y;return w instanceof Date?w:new Date})(),f=ye(p.getFullYear(),"viewYear"),h=ye(p.getMonth(),"viewMonth"),b=ye(q(p),"focused"),x=ye(null,"hovered"),O=ye(p.getHours(),"hour"),T=ye(p.getMinutes(),"minute"),S=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),k=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),C=new Intl.DateTimeFormat(a,{weekday:"short"}),g=new Intl.DateTimeFormat(a,{dateStyle:"full"}),L=y=>y?S.format(y):"",I=y=>{if(l)return l(y);if(r==="range"){let[w,D]=y!=null?y:[null,null];return w?`${L(w)} \u2013 ${L(D)}`:""}return L(y)},_=Array.from({length:7},(y,w)=>C.format(new Date(2023,0,1+(w+u)%7))),G=y=>!!e&&q(y)<q(e)||!!i&&q(y)>q(i)||!!t&&t(y),N=y=>{if(!o)return q(y);let w=q(y);return w.setHours(O.get(),T.get(),0,0),w},B=(y,w)=>{var z;if(G(y))return;if(r==="single"){d.set(N(y)),o||st(w);return}let[D,V]=(z=d.get())!=null?z:[null,null];!D||D&&V?d.set([N(y),null]):q(y)<q(D)?(d.set([N(y),N(D)]),o||st(w)):(d.set([D,N(y)]),o||st(w))},oe=()=>{var y;if(o)if(r==="single"){let w=d.get();w&&d.set(N(w))}else{let[w,D]=(y=d.get())!=null?y:[null,null];d.set([w&&N(w),D&&N(D)])}},K=(y,w)=>{var ct;if(r!=="range")return!1;let[D,V]=(ct=d.get(w))!=null?ct:[null,null],z=V!=null?V:x.get(w);if(!D||!z)return!1;let M=q(D)<=q(z)?D:z,le=q(D)<=q(z)?z:D,Z=q(y);return Z>=q(M)&&Z<=q(le)},ae=(y,w)=>{let D=d.get(w);if(r==="range"){let[V,z]=D!=null?D:[null,null];return _t(y,V)||_t(y,z)}return _t(y,D)},ie=y=>{f.set(y.getFullYear()),h.set(y.getMonth())},J=y=>{let w=Jo(new Date(f.get(),h.get(),1),y);ie(w)},Fe=y=>f.set(f.get()+y),fe=y=>{var D;let w=(D=y==null?void 0:y.getRoot())==null?void 0:D.domElement;setTimeout(()=>{var V;(V=w==null?void 0:w.querySelector(`[data-date="${Xo(b.get())}"]`))==null||V.focus()},0)},it=ne(),lt=ye(!1),{show:Yt,hide:st,anchorPartial:zt}=ge({kind:"datePicker",open:lt,placement:c,content:it}),Gt=E({type:"text",readonly:!0,value:y=>I(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>lt.get(y),ariaControls:y=>y!=null&&y.elementNode?ee("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,w)=>{R(w)},onKeyDown:(y,w)=>{let D=y.key;(D==="ArrowDown"||D==="Enter")&&(y.preventDefault(),R(w))}},ll("datePicker",ul,{selection:d,selectionIsCallerOwned:n.value!==void 0,viewYear:f,viewMonth:h,focused:b,hovered:x,hour:O,minute:T,open:lt,onChange:m}));function R(y){var D;let w=(D=H())!=null?D:new Date;b.set(q(w)),ie(w),Yt(y),fe(y)}function H(){var w;let y=d.get();return r==="range"?(w=y==null?void 0:y[0])!=null?w:null:y!=null?y:null}return sl(zt,Gt),zt;function ne(){let y=(M,le,Z)=>({button:M,type:"button",ariaLabel:le,onClick:Z,style:dl()}),w={div:[y("\xAB","Previous year",()=>Fe(-1)),y("\u2039","Previous month",()=>J(-1)),{div:M=>k.format(new Date(f.get(M),h.get(M),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:Go("bold"),fontSize:M=>ft(M)}},y("\u203A","Next month",()=>J(1)),y("\xBB","Next year",()=>Fe(1))],style:{display:"flex",alignItems:"center",gap:j(1),marginBottom:j(2)}},D={div:_.map((M,le)=>({div:M,style:{textAlign:"center",fontSize:Z=>ft(Z,"decrease-1"),fontWeight:Go("bold"),color:Z=>F(Z,"shift-7"),paddingBlock:j(1)},_key:le})),role:"row",style:dr()},V={div:M=>X(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Ja,onMouseLeave:()=>r==="range"&&x.set(null),style:{display:"flex",flexDirection:"column",gap:j(.5)}},z=[w,D,V];return o&&z.push(Ya()),z.push(Ga()),{div:z,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:j(70),padding:j(3),borderRadius:M=>j(cl(M)*2),backgroundColor:M=>F(M,"inherit"),color:M=>F(M,"text"),outline:M=>`1px solid ${F(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}}}function X(y){let w=new Date(f.get(y),h.get(y),1),D=h.get(y),V=Zo(w,u),z=[];for(let M=0;M<6;M++){let le=[];for(let Z=0;Z<7;Z++){let ct=Ye(V,M*7+Z);le.push(Vt(ct,D,y))}z.push({div:le,role:"row",style:dr(),_key:M})}return z}function Vt(y,w,D){let V=G(y),z=ae(y,D),M=K(y,D),le=y.getMonth()!==w,Z=_t(y,b.get(D)),ct=_t(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:Z?0:-1,ariaSelected:z,ariaDisabled:V,disabled:V,ariaLabel:g.format(y),dataDate:Xo(y),onClick:($,Xa)=>B(y,Xa),onMouseEnter:()=>r==="range"&&x.set(y),style:{appearance:"none",border:"none",cursor:V?"not-allowed":"pointer",aspectRatio:"1",borderRadius:j(1),fontSize:$=>ft($),opacity:V?.35:le?.5:1,backgroundColor:$=>z?F($,"shift-13",s.get($)):M?F($,"hover",s.get($)):"transparent",color:$=>z?F($,"shift-0","neutral"):M?F($,Qo(2)):F($,"text"),outline:ct?$=>`1px solid ${F($,"shift-6",s.get($))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":E({backgroundColor:$=>z?F($,"shift-13",s.get($)):F($,"shift-3",s.get($))},z?{}:{color:$=>F($,Qo(3))}),transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:$=>v($,s.get($))}},_key:Xo(y)}}function Ya(){let y=(w,D,V)=>({select:Array.from({length:w},(z,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:le=>D.get(le)===M,_key:M})),ariaLabel:V,onChange:z=>{D.set(Number(z.target.value)),oe()},style:pl()});return{div:[y(24,O,"Hour"),{span:":",style:{fontWeight:Go("bold")}},y(60,T,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:j(1),marginTop:j(3)}}}function Ga(){let y=(w,D)=>({button:w,type:"button",onClick:(V,z)=>D(z),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:V=>ft(V,"decrease-1"),color:V=>F(V,"muted",s.get(V)),padding:j(1)}});return{div:[y("Today",w=>{let D=new Date;b.set(q(D)),ie(D),fe(w)}),y("Clear",()=>{d.set(r==="range"?[null,null]:null),x.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:j(2),paddingTop:j(2),borderTop:w=>`1px solid ${F(w,"border")}`}}}function Ja(y,w){let D=y,V=b.get(),z=null;switch(D.key){case"ArrowLeft":z=Ye(V,-1);break;case"ArrowRight":z=Ye(V,1);break;case"ArrowUp":z=Ye(V,-7);break;case"ArrowDown":z=Ye(V,7);break;case"Home":z=Zo(V,u);break;case"End":z=Ye(Zo(V,u),6);break;case"PageUp":z=Jo(V,D.shiftKey?-12:-1);break;case"PageDown":z=Jo(V,D.shiftKey?12:1);break;case"Enter":case" ":D.preventDefault(),B(V,w);return;default:return}D.preventDefault(),b.set(z),ie(z),fe(w)}}function dr(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:j(.5)}}function dl(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:n=>ft(n),color:n=>F(n,"muted"),width:j(7),height:j(7),borderRadius:j(1),"&:hover":{backgroundColor:n=>F(n,"shift-3"),color:n=>F(n,Qo(3))}}}function pl(){return{fontSize:n=>ft(n),padding:j(1),borderRadius:j(1),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${F(n,"border-strong")}`,backgroundColor:n=>F(n,"inherit"),color:n=>F(n,"text")}}import{toState as fl}from"@domphy/core";import{themeColor as pr,themeSize as fr,themeSpacing as hr,themeWeight as hl}from"@domphy/theme";function Od(n={}){var o;let r=fl((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${hr(24)}, max-content) 1fr`,columnGap:hr(4),margin:0,"& dt":{margin:0,fontWeight:hl("semibold"),fontSize:e=>fr(e,"inherit"),color:e=>pr(e,"shift-10",r.get(e))},"& dd":{margin:0,fontSize:e=>fr(e,"inherit"),color:e=>pr(e,"text",r.get(e))}}}}import{toState as gr}from"@domphy/core";import{textToneOn as gl,themeColor as Me,themeDensity as $t,themeSize as yr,themeSpacing as me,themeWeight as yl}from"@domphy/theme";function Ad(n={}){var i,t;let{duration:r=240}=n,o=gr((i=n.color)!=null?i:"neutral","color"),e=gr((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>yr(a,"inherit"),color:a=>Me(a,"text",o.get(a)),backgroundColor:a=>Me(a,"inherit",o.get(a)),"& > summary":{backgroundColor:a=>Me(a,"shift-2",o.get(a)),color:a=>Me(a,"shift-11",o.get(a)),fontSize:a=>yr(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:me(2),cursor:"pointer",userSelect:"none",fontWeight:yl("medium"),paddingInline:a=>me($t(a)*4),minHeight:me(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:me(2),height:me(2),flexShrink:0,marginTop:me(-.5),borderInlineEnd:a=>`${me(.5)} solid ${Me(a,"shift-9",o.get(a))}`,borderBottom:a=>`${me(.5)} solid ${Me(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${r}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>Me(a,"shift-3",o.get(a)),color:a=>Me(a,gl(3),o.get(a))},"& > summary:focus-visible":{borderRadius:a=>me($t(a)*2),boxShadow:a=>v(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>me($t(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${r}ms ease, opacity ${r}ms ease, padding ${r}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>me($t(a)*1),paddingBottom:a=>me($t(a)*3)}}}}import{behavior as bl}from"@domphy/core";import{themeColor as en,themeDensity as br,themeSize as Sl,themeSpacing as Sr}from"@domphy/theme";var Ht=0;function so(){Ht++,Ht===1&&(document.body.style.overflow="hidden")}function ht(){Ht=Math.max(0,Ht-1),Ht===0&&(document.body.style.overflow="")}var vr='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function vl(n,r){let{state:o,onDismiss:e}=r,i=null,t=!1,a=!1,l=null,m=n.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(ht(),a=!1),i==null||i.focus(),i=null},s=f=>{if(f.key!=="Tab")return;let h=Array.from(m.querySelectorAll(vr)).filter(O=>!O.closest("[aria-hidden='true']")&&O.getClientRects().length>0);if(!h.length){f.preventDefault();return}let b=h[0],x=h[h.length-1];f.shiftKey?(document.activeElement===b||document.activeElement===m)&&(f.preventDefault(),x.focus()):document.activeElement===x&&(f.preventDefault(),b.focus())},c=f=>{f.preventDefault(),!to(m)&&Re(o,e)};m.addEventListener("cancel",c);let d=f=>{if(f)t=!1,l&&(clearTimeout(l),l=null),i=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(so(),a=!0),m.addEventListener("keydown",s),requestAnimationFrame(()=>{var b;m.style.opacity="1";let h=(b=m.querySelector("[autofocus]:not([disabled])"))!=null?b:m.querySelector(vr);h==null||h.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",s),!m.open){u();return}l=setTimeout(()=>{l=null,t&&u()},350)}},p=re(o,d);return{requestClose:()=>Re(o,e),onTransitionEnd:f=>{t&&f.target===m&&f.propertyName==="opacity"&&u()},update(f){e=f.onDismiss,f.state!==o&&(p(),o=f.state,p=re(o,d,!1))},destroy(){l&&(clearTimeout(l),l=null),p(),m.removeEventListener("cancel",c),a&&(ht(),a=!1),m.removeEventListener("keydown",s),i==null||i.focus(),i=null}}}function jd(n={}){let{color:r="neutral",open:o=!1,labelledBy:e,describedBy:i,onDismiss:t}=n,a=pt(o);return P(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},bl("dialog",vl,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:i,onClick:(l,m)=>{var c;if(l.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();l.clientX>=u.left&&l.clientX<=u.right&&l.clientY>=u.top&&l.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(l,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(l)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:l=>Sl(l,"inherit"),color:l=>en(l,"shift-10",r),backgroundColor:l=>en(l,"inherit",r),border:"none",borderRadius:l=>Sr(br(l)*2),padding:l=>Sr(br(l)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:l=>en(l,"shift-2","neutral"),opacity:.75}}})}import{toState as El}from"@domphy/core";import{themeColor as co,themeSize as xl,themeSpacing as Cl}from"@domphy/theme";function Jd(n={}){var o;let r=El((o=n.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:Cl(2),fontSize:e=>xl(e,"inherit"),backgroundColor:e=>co(e),color:e=>co(e,"text",r.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>co(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>co(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{behavior as kl}from"@domphy/core";import{themeColor as tn,themeDensity as wl,themeSize as Tl,themeSpacing as Bt}from"@domphy/theme";var on={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Er={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},gt=n=>n==="left"||n==="right";function xr(n,r){return n==="start"?r?"right":"left":n==="end"?r?"left":"right":n}function Dl(n,r){let{state:o,onDismiss:e,placement:i,size:t}=r,a=n.domElement;a.setAttribute("aria-modal","true");let l=x=>{x.preventDefault(),!to(a)&&Re(o,e)};a.addEventListener("cancel",l);let m=(x,O)=>{let S=(x==="start"||x==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),k=xr(x,S),C=O!=null?O:gt(k)?Bt(80):Bt(64);return a.style.margin=Er[k],a.style.width=gt(k)?C:"100dvw",a.style.height=gt(k)?"100dvh":C,k},u=m(i,t),s=!1,c=!1,d=null,p=()=>{d=null,s&&(s=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(ht(),c=!1))},f=x=>{x.target===a&&x.propertyName==="transform"&&p()};a.addEventListener("transitionend",f);let h=x=>{if(x)s=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(so(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(s=!0,a.style.transform=on[u],!a.open){p();return}d=setTimeout(p,350)}},b=re(o,h);return{requestClose:()=>Re(o,e),update(x){e=x.onDismiss,x.state!==o&&(b(),o=x.state,b=re(o,h,!1)),(x.placement!==i||x.size!==t)&&(i=x.placement,t=x.size,u=m(i,t),o.get()||(a.style.transform=on[u]))},destroy(){d&&(clearTimeout(d),d=null),b(),a.removeEventListener("cancel",l),a.removeEventListener("transitionend",f),c&&(ht(),c=!1)}}}function rp(n={}){let{color:r="neutral",open:o=!1,onDismiss:e,placement:i="end",size:t}=n,a=pt(o),l=xr(i,!1),m=gt(l)?Bt(80):Bt(64),u=t!=null?t:m;return P(E({_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},kl("drawer",Dl,{state:a,onDismiss:e,placement:i,size:t})),{onClick:(s,c)=>{var f;if(s.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();s.clientX>=d.left&&s.clientX<=d.right&&s.clientY>=d.top&&s.clientY<=d.bottom||(f=c.getBehavior("drawer"))==null||f.requestClose()},style:{transform:on[l],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:s=>Tl(s,"inherit"),color:s=>tn(s,"shift-10",r),backgroundColor:s=>tn(s,"inherit",r),border:"none",padding:s=>Bt(wl(s)*3),margin:Er[l],width:gt(l)?u:"100dvw",height:gt(l)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:s=>tn(s,"shift-2","neutral"),opacity:.75}}})}import{toState as Il}from"@domphy/core";import{themeColor as Pl,themeSize as Ll}from"@domphy/theme";function cp(n={}){var o;let r=Il((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Ll(e,"inherit"),fontStyle:"italic",color:e=>Pl(e,"shift-10",r.get(e))}}}import{toState as Ol}from"@domphy/core";import{themeColor as nn,themeSpacing as rn}from"@domphy/theme";function pp(n={}){var o;let r=Ol((o=n.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:rn(3),paddingBlock:rn(12),paddingInline:rn(6),textAlign:"center",color:e=>nn(e,"muted",r.get(e)),"& > :first-child":{color:e=>nn(e,"shift-5",r.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>nn(e,"text",r.get(e))}}}}var an="errorBoundaryOriginal";function Rl(n){var o;let r=n.getMetadata(an);if(typeof r=="function"){(o=n._childrenRelease)==null||o.call(n),n._setupFunctionChildren(r);return}if(r!=null){n.children.update(Array.isArray(r)?r:[r]);return}n.children.update([])}function hp(n={}){return{_onSchedule:(r,o)=>{r.getMetadata(an)===void 0&&r.setMetadata(an,o[r.tagName])},_onError:(r,o)=>{var t,a;(t=n.onError)==null||t.call(n,o);let e=()=>Rl(r),i=typeof n.fallback=="function"?n.fallback(o,e):(a=n.fallback)!=null?a:{div:"An error occurred."};r.children.update([i])}}}import{toState as zl}from"@domphy/core";import{themeColor as mo,themeSize as Vl,themeSpacing as Ml}from"@domphy/theme";var Al={small:8,medium:10,large:14};function Ep(n={}){var e,i;let r=zl((e=n.color)!=null?e:"primary","color"),o=Ml(Al[(i=n.size)!=null?i:"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=>Vl(t,"inherit"),backgroundColor:t=>mo(t,"shift-13",r.get(t)),color:t=>mo(t,"shift-0","neutral"),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>mo(t,"shift-14",r.get(t)),boxShadow:A("medium")},"&:active:not([disabled])":{backgroundColor:t=>mo(t,"shift-15",r.get(t)),boxShadow:A("low")},"&:focus-visible":{boxShadow:t=>`${A("medium")}, ${v(t,r.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Nl}from"@domphy/core";import{themeColor as Cr,themeSize as _l,themeSpacing as uo}from"@domphy/theme";function wp(n={}){var o;let r=Nl((o=n.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:uo(2),marginInline:0,marginTop:uo(3),marginBottom:uo(3),color:e=>Cr(e,"text",r.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:uo(2)},"& figcaption":{fontSize:e=>_l(e,"decrease-1"),color:e=>Cr(e,"muted",r.get(e)),lineHeight:1.45}}}}import{toState as $l}from"@domphy/core";import{themeColor as Ft,themeDensity as yt,themeSize as ln,themeSpacing as ke,themeWeight as Hl}from"@domphy/theme";function Pp(n={}){var i;let{layout:r="horizontal"}=n,o=$l((i=n.color)!=null?i:"neutral","color"),e=r==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ke(yt(t)*3),paddingBlock:t=>ke(yt(t)*3),border:"none",borderRadius:t=>ke(yt(t)*2),fontSize:t=>ln(t,"inherit"),backgroundColor:t=>Ft(t,"inherit",o.get(t)),color:t=>Ft(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ke(4),rowGap:ke(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>ln(t,"inherit"),fontWeight:Hl("semibold"),paddingBlock:t=>ke(yt(t)*1),borderRadius:t=>ke(yt(t)*2),color:t=>Ft(t,"text",o.get(t)),backgroundColor:t=>Ft(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ke(yt(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p, input[type=checkbox], input[type=radio], input[type=color])":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > input[type=checkbox], & > input[type=radio], & > input[type=color]":{gridColumn:e?"1":"2",justifySelf:"start"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ke(2)} * -1)`,fontSize:t=>ln(t,"decrease-1"),color:t=>Ft(t,"text",o.get(t))}}}}import{themeDensity as Bl,themeSpacing as Fl}from"@domphy/theme";function Rp(n={}){let{columns:r=1,gap:o=4,align:e}=n;return{style:E({display:"grid",gridTemplateColumns:typeof r=="number"?`repeat(${r}, minmax(0, 1fr))`:r,gap:i=>Fl(Bl(i)*o)},e?{alignItems:e}:{})}}import{toState as Kl}from"@domphy/core";import{themeColor as Wl,themeSize as kr,themeSpacing as jl}from"@domphy/theme";var ql={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Np(n={}){var e;let r=Kl((e=n.color)!=null?e:"neutral","color"),o=n.size;return{_onInsert:i=>{["h1","h2","h3","h4","h5","h6"].includes(i.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:i=>Wl(i,"shift-11",r.get(i)),marginTop:0,marginBottom:jl(2),fontSize:i=>{if(o!==void 0)return kr(i,o);let t=ql[i.elementNode.tagName]||"inherit";return kr(i,t)}}}}import{toState as Ul}from"@domphy/core";import{themeColor as wr,themeSpacing as Tr}from"@domphy/theme";function Bp(n={}){var o;let r=Ul((o=n.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:Tr(3),marginBottom:Tr(3),backgroundColor:e=>wr(e,"inherit",r.get(e)),color:e=>wr(e,"text",r.get(e))}}}import{toState as Yl}from"@domphy/core";import{themeColor as Gl,themeSize as Jl,themeSpacing as Dr}from"@domphy/theme";function jp(n={}){var o;let r=Yl((o=n.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:Dr(4),height:Dr(4),flexShrink:"0",fontSize:e=>Jl(e),backgroundColor:"transparent",color:e=>Gl(e,"text",r.get(e))}}}import{toState as Xl}from"@domphy/core";import{themeColor as Ir,themeSpacing as Zl}from"@domphy/theme";function Gp(n){var o;let r=Xl((o=n.color)!=null?o:"neutral","color");return{alt:n.decorative?"":n.alt,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:Zl(2),backgroundColor:e=>Ir(e,"inherit",r.get(e)),color:e=>Ir(e,"text",r.get(e))}}}import{toState as Pr}from"@domphy/core";import{themeColor as U,themeSize as Ql,themeSpacing as Ge}from"@domphy/theme";function ef(n={}){var e,i;let r=Pr((e=n.color)!=null?e:"neutral","color"),o=Pr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Ql(t,"inherit"),color:t=>U(t,"text",r.get(t)),display:"inline-flex",position:"relative",width:Ge(6),height:Ge(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:Ge(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${U(t,"border-strong",r.get(t))}`,color:t=>U(t,"text",r.get(t)),width:Ge(4),height:Ge(4)},"&:hover::before":{backgroundColor:t=>U(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${U(t,"shift-6",o.get(t))}`,backgroundColor:t=>U(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>U(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${Ge(.5)} solid ${U(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${U(t,"shift-6",o.get(t))}`,backgroundColor:t=>U(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>U(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>U(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:Ge(1.5),boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${U(t,"border-strong","neutral")}`,backgroundColor:t=>U(t,"inherit","neutral")},"&[disabled]:checked::before":{backgroundColor:t=>U(t,"shift-8","neutral")},"&[disabled]:indeterminate::before":{backgroundColor:t=>U(t,"shift-3","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",borderColor:t=>U(t,"shift-0","neutral")},"&[disabled]:indeterminate::after":{pointerEvents:"none",backgroundColor:t=>U(t,"shift-8","neutral")}}}}import{toState as es}from"@domphy/core";import{themeColor as sn,themeDensity as bt,themeSize as ts,themeSpacing as St}from"@domphy/theme";function af(n={}){var o;let r=es((o=n.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=>ts(e,"inherit"),color:e=>sn(e,"text",r.get(e)),paddingBlock:e=>St(bt(e)*1),paddingInline:e=>St(bt(e)*1),blockSize:e=>St(6+bt(e)*2),inlineSize:e=>St(6+bt(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>St(bt(e)*1.5),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>St(bt(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>sn(e,"shift-2","neutral"),outline:e=>`1px solid ${sn(e,"border-strong","neutral")}`}}}}import{toState as Lr}from"@domphy/core";import{themeColor as Ae,themeDensity as cn,themeSize as os,themeSpacing as po}from"@domphy/theme";function uf(n={}){var i,t;let{mode:r="datetime-local"}=n,o=Lr((i=n.color)!=null?i:"neutral","color"),e=Lr((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontSize:a=>os(a,"inherit"),lineHeight:"inherit",color:a=>Ae(a,"text",o.get(a)),backgroundColor:a=>Ae(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Ae(a,"border-strong",o.get(a))}`,borderRadius:a=>po(cn(a)*1.5),paddingInline:a=>po(cn(a)*3),paddingBlock:a=>po(cn(a)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-datetime-edit":{paddingBlock:0},"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Ae(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Ae(a,"muted","neutral"),backgroundColor:a=>Ae(a,"shift-2","neutral"),outline:a=>`1px solid ${Ae(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${po(.5)} solid ${Ae(a,"shift-6","error")}`}}}}import{toState as Or}from"@domphy/core";import{themeColor as de,themeDensity as fo,themeSize as ns,themeSpacing as Je}from"@domphy/theme";function gf(n={}){var e,i;let r=Or((e=n.color)!=null?e:"neutral","color"),o=Or((i=n.accentColor)!=null?i:"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",fontSize:t=>ns(t,"inherit"),lineHeight:"inherit",color:t=>de(t,"text",r.get(t)),backgroundColor:t=>de(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${de(t,"border-strong",r.get(t))}`,borderRadius:t=>Je(fo(t)*1.5),paddingBlock:t=>Je(fo(t)*1),paddingInline:t=>Je(fo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Je(fo(t)),fontSize:"inherit",border:"none",borderRadius:Je(1),minHeight:Je(6),paddingInline:Je(2),cursor:"pointer",color:t=>de(t,"shift-11",r.get(t)),backgroundColor:t=>de(t,"surface",r.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${de(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>de(t,"muted","neutral"),outline:t=>`1px solid ${de(t,"border-strong","neutral")}`,backgroundColor:t=>de(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>de(t,"muted","neutral"),backgroundColor:t=>de(t,"shift-3","neutral")}}}}import{toState as Rr}from"@domphy/core";import{themeColor as vt,themeDensity as ho,themeSize as rs,themeSpacing as Kt}from"@domphy/theme";function xf(n={}){var e,i;let r=Rr((e=n.color)!=null?e:"neutral","color"),o=Rr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:P(E({lineHeight:"inherit",minWidth:Kt(10),paddingInlineStart:t=>Kt(ho(t)*3),paddingInlineEnd:t=>Kt(ho(t)*1.5),paddingBlock:t=>Kt(ho(t)*1),borderRadius:t=>Kt(ho(t)*1.5),fontSize:t=>rs(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${vt(t,"border-strong",r.get(t))}`},ce(r)),{backgroundColor:t=>vt(t,"inherit",r.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 ${vt(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>vt(t,"shift-2","neutral"),outline:t=>`1px solid ${vt(t,"border-strong","neutral")}`,color:t=>vt(t,"muted","neutral")}})}}import{themeSpacing as zr}from"@domphy/theme";function Tf(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:zr(2),"& > input":{minWidth:zr(9)}},_onMount:n=>{let r=n.domElement,o=()=>Array.from(r.querySelectorAll("input")),e=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);m.value&&u<l.length-1&&l[u+1].focus()},i=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&(a.preventDefault(),l[u-1].focus()),a.key==="ArrowRight"&&u<l.length-1&&(a.preventDefault(),l[u+1].focus())},t=a=>{var d,p,f;a.preventDefault();let l=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),s=u===-1?0:u;[...l].forEach((h,b)=>{let x=m[s+b];x&&(x.value=h,x.dispatchEvent(new Event("input",{bubbles:!0})),x.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(s+l.length-1,m.length-1);(f=m[c])==null||f.focus()};r.addEventListener("input",e),r.addEventListener("keydown",i),r.addEventListener("paste",t),n.addHook("Remove",()=>{r.removeEventListener("input",e),r.removeEventListener("keydown",i),r.removeEventListener("paste",t)})}}}import{isState as as,rawHtml as is,toState as mn}from"@domphy/core";import{themeColor as go,themeDensity as Wt,themeSize as Vr,themeSpacing as Xe}from"@domphy/theme";var ls='<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>',ss='<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>',cs=["name","value","onInput","disabled","required"];function Mr(n){if(n!=null)return typeof n=="function"?n:as(n)?r=>n.get(r):n}function Rf(n={}){var t,a;let r=mn((t=n.color)!=null?t:"neutral","color"),o=mn((a=n.accentColor)!=null?a:"primary","accentColor"),e=mn(!1),i={};return{_onInsert:l=>{l.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(l,m)=>{let u=m;for(let s of cs)u[s]!==void 0&&(i[s]=u[s],delete u[s])},_onInit:l=>{var h,b,x,O,T,S,k;let m=(h=n.name)!=null?h:i.name,u=Mr((b=n.value)!=null?b:i.value),s=(x=n.onInput)!=null?x:i.onInput,c=Mr((O=n.disabled)!=null?O:i.disabled),d=(T=n.required)!=null?T:i.required,p=P(E(E(E(E(E({input:null,type:C=>e.get(C)?"text":"password",ariaLabel:(S=n.ariaLabel)!=null?S:"Password",autocomplete:(k=n.autocomplete)!=null?k:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),s!=null?{onInput:s}:{}),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"}}),f={button:C=>is(e.get(C)?ss:ls),type:"button",ariaLabel:C=>e.get(C)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",fontSize:C=>Vr(C,"inherit"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,minWidth:Xe(6),minHeight:Xe(6),marginInlineEnd:C=>`calc(${Xe(Wt(C)*1)} * -1)`,opacity:.6}};l.children.insert(p),l.children.insert(f)},style:{display:"flex",alignItems:"center",gap:l=>Xe(Wt(l)*1),paddingBlock:l=>Xe(Wt(l)*1),paddingInline:l=>Xe(Wt(l)*3),borderRadius:l=>Xe(Wt(l)*1.5),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${go(l,"border-strong",r.get(l))}`,color:l=>go(l,Wo,r.get(l)),backgroundColor:l=>go(l,"inherit",r.get(l)),fontSize:l=>Vr(l,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:l=>`1px solid ${go(l,"shift-5",o.get(l))}`},"&:focus-within":{boxShadow:l=>v(l,o.get(l))}}}}import{toState as Ar}from"@domphy/core";import{themeColor as be,themeSize as ms,themeSpacing as yo}from"@domphy/theme";function _f(n={}){var e,i;let r=Ar((e=n.color)!=null?e:"neutral","color"),o=Ar((i=n.accentColor)!=null?i:"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=>ms(t,"inherit"),color:t=>be(t,"text",r.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:yo(6),height:yo(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 ${be(t,"border-strong",r.get(t))}`,color:t=>be(t,"text",r.get(t)),width:yo(4),height:yo(4)},"&:hover::before":{backgroundColor:t=>be(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${be(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>be(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>be(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${be(t,"border-strong","neutral")}`,backgroundColor:t=>be(t,"inherit","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",backgroundColor:t=>be(t,"shift-8","neutral")}}}}import{toState as Nr}from"@domphy/core";import{themeColor as Et,themeSize as us,themeSpacing as te}from"@domphy/theme";function Kf(n={}){var e,i;let r=Nr((e=n.color)!=null?e:"neutral","color"),o=Nr((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>us(t,"inherit"),width:"100%",margin:0,padding:0,height:te(6),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:te(1.5),borderRadius:te(999),backgroundColor:t=>Et(t,"shift-3",r.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:te(4),height:te(4),borderRadius:te(999),border:"none",marginTop:`calc((${te(1.5)} - ${te(4)}) / 2)`,backgroundColor:t=>Et(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Et(t,"shift-10",o.get(t))},"&::-moz-range-track":{height:te(1.5),borderRadius:te(999),backgroundColor:t=>Et(t,"shift-3",r.get(t))},"&::-moz-range-thumb":{width:te(4),height:te(4),borderRadius:te(999),border:"none",backgroundColor:t=>Et(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-moz-range-thumb":{backgroundColor:t=>Et(t,"shift-10",o.get(t))},borderRadius:te(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as _r}from"@domphy/core";import{themeColor as xt,themeDensity as un,themeSize as ds,themeSpacing as bo}from"@domphy/theme";function Gf(n={}){var e,i;let r=_r((e=n.color)!=null?e:"neutral","color"),o=_r((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:P(E({fontSize:t=>ds(t,"inherit"),lineHeight:"inherit"},ce(r)),{backgroundColor:t=>xt(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${xt(t,"border-strong",r.get(t))}`,borderRadius:t=>bo(un(t)*1.5),minWidth:bo(32),paddingInline:t=>bo(un(t)*3),paddingBlock:t=>bo(un(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${xt(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>xt(t,"muted","neutral"),backgroundColor:t=>xt(t,"shift-2","neutral"),outline:t=>`1px solid ${xt(t,"border-strong","neutral")}`}})}}import{toState as ps}from"@domphy/core";import{themeColor as Ct,themeSize as $r,themeSpacing as we}from"@domphy/theme";var dn=12,pn=5,Hr=.5,fs=`${(dn-pn-2*Hr)/dn*100}%`;function th(n={}){var o;let r=ps((o=n.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=>$r(e,"inherit"),backgroundColor:"transparent",color:e=>Ct(e,"text"),appearance:"none",position:"relative",display:"inline-flex",verticalAlign:`calc(${we(1)} * -1)`,width:we(dn),height:we(6),cursor:"pointer",margin:"0",transition:"box-shadow 140ms ease",borderRadius:we(999),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&:checked":{"&::before":{backgroundColor:e=>Ct(e,"increase-3",r.get(e))},"&::after":{marginInlineStart:fs}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:we(pn),height:we(pn),borderRadius:we(999),insetInlineStart:we(Hr),marginInlineStart:0,top:"50%",transform:"translateY(-50%)",transition:"margin-inline-start 0.3s",backgroundColor:e=>Ct(e,"decrease-3"),outline:e=>`1px solid ${Ct(e,"shift-7")}`,outlineOffset:"-1px"},"&::before":{content:'""',width:"100%",borderRadius:we(999),display:"inline-block",fontSize:e=>$r(e,"inherit"),lineHeight:1,backgroundColor:e=>Ct(e,"inherit"),outline:e=>`1px solid ${Ct(e,"shift-7")}`,outlineOffset:"-1px"},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Br}from"@domphy/core";import{themeColor as Te,themeDensity as fn,themeSize as hs,themeSpacing as Ze}from"@domphy/theme";function lh(n={}){var i,t;let{type:r="text"}=n,o=Br((i=n.color)!=null?i:"neutral","color"),e=Br((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:P(E({lineHeight:"inherit",minWidth:Ze(10),paddingInline:a=>Ze(fn(a)*3),paddingBlock:a=>Ze(fn(a)*1),borderRadius:a=>Ze(fn(a)*1.5),fontSize:a=>hs(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Te(a,"border-strong",o.get(a))}`},ce(o)),{backgroundColor:a=>Te(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Te(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>Te(a,"shift-2","neutral"),outline:a=>`1px solid ${Te(a,"border-strong","neutral")}`,color:a=>Te(a,"muted","neutral")},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${Ze(.5)} solid ${Te(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${Ze(.5)} solid ${Te(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Ze(.5)} solid ${Te(a,"shift-6","warning")}`}})}}import{toState as gs}from"@domphy/core";import{themeColor as hn,themeDensity as gn,themeFont as ys,themeSize as bs,themeSpacing as yn}from"@domphy/theme";function dh(n={}){var o;let r=gs((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>bs(e,"inherit"),fontFamily:ys("monospace"),color:e=>hn(e,"text",r.get(e)),backgroundColor:e=>hn(e,"inherit",r.get(e)),paddingBlock:e=>yn(gn(e)*(.5/1.5)),paddingInline:e=>yn(gn(e)*(1.5/1.5)),borderRadius:e=>yn(gn(e)*(1/1.5)),outline:e=>`1px solid ${hn(e,"border-strong",r.get(e))}`}}}import{toState as Fr}from"@domphy/core";import{themeColor as bn,themeSize as Ss,themeSpacing as vs}from"@domphy/theme";function gh(n={}){var e,i;let r=Fr((e=n.color)!=null?e:"neutral","color"),o=Fr((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:vs(2),fontSize:t=>Ss(t,"inherit"),color:t=>bn(t,"text",r.get(t)),cursor:"pointer","&:focus-within":{color:t=>bn(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>bn(t,"muted","neutral")}}}}import{toState as Kr}from"@domphy/core";import{themeColor as jt,themeSize as Es,themeSpacing as xs}from"@domphy/theme";function Eh(n={}){var e,i;let r=Kr((e=n.color)!=null?e:"primary","color"),o=Kr((i=n.accentColor)!=null?i:"secondary","accentColor");return{role:"link",tabIndex:0,_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag'),t.attributes.has("href")&&(t.attributes.get("role")==="link"&&t.attributes.remove("role"),t.attributes.get("tabIndex")===0&&t.attributes.remove("tabIndex"))},onClick:(t,a)=>{let l=a.domElement;(l!=null&&l.hasAttribute("disabled")||(l==null?void 0:l.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},onKeyDown:(t,a)=>{var m;if(a.attributes.has("href"))return;let l=t.key;l!=="Enter"&&l!==" "||(t.preventDefault(),(m=a.domElement)==null||m.click())},style:{fontSize:t=>Es(t,"inherit"),backgroundColor:t=>jt(t),color:t=>jt(t,"shift-13",r.get(t)),textDecoration:"none","&:visited":{color:t=>jt(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>jt(t,"shift-14",r.get(t)),textDecoration:"underline"},borderRadius:xs(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled], &[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>jt(t,"muted","neutral")}}}}import{toState as Cs}from"@domphy/core";import{textToneOn as Wr,themeColor as W,themeDensity as Ne,themeSize as jr,themeSpacing as _e}from"@domphy/theme";var ks={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},ws={small:.5,medium:1,large:1.5};function Dh(n={}){var l,m,u;let r=(l=n.variant)!=null?l:"outline",o=Cs((m=n.color)!=null?m:r==="ghost"?"neutral":"primary","color"),e=(u=n.size)!=null?u:"medium",i=mt[e];if(r==="ghost"){let s=ws[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>jr(c,i),textDecoration:"none",paddingBlock:c=>_e(Ne(c)*s),paddingInline:c=>_e(Ne(c)*s),borderRadius:c=>_e(Ne(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>_e(Ne(c)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>W(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>W(c,Wr(2),o.get(c)),backgroundColor:c=>W(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>W(c,Wr(2),o.get(c)),backgroundColor:c=>W(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>v(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>W(c,"border-strong","neutral")}}}}let t=r==="solid",a=ks[e];return P(E({_onInsert:s=>{s.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["tone-background-inherit"]}:{}),{style:{fontSize:s=>jr(s,i),textDecoration:"none",paddingBlock:s=>_e(Ne(s)*a.block),paddingInline:s=>_e(Ne(s)*a.inline),borderRadius:s=>_e(Ne(s)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>_e(Ne(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":s=>`1px solid ${W(s,"border-strong",o.get(s))}`,color:s=>t?W(s,"shift-0","neutral"):W(s,"shift-13",o.get(s)),backgroundColor:s=>t?W(s,"shift-13",o.get(s)):W(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:s=>t?W(s,"shift-0","neutral"):W(s,"shift-14",o.get(s)),backgroundColor:s=>t?W(s,"shift-14",o.get(s)):W(s,"hover",o.get(s))},"&:active:not([aria-disabled=true])":{backgroundColor:s=>t?W(s,"shift-15",o.get(s)):W(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:s=>W(s,"shift-2","neutral"),outline:s=>`1px solid ${W(s,"border-strong","neutral")}`,color:s=>W(s,"muted","neutral")}}})}import{toState as Ts}from"@domphy/core";import{textToneOn as qr,themeColor as Se,themeDensity as Qe,themeSize as Ur,themeSpacing as et}from"@domphy/theme";function zh(n={}){var o;let r=(o=n.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>Se(e,"inherit",r),color:e=>Se(e,"text",r)}}}function Vh(n={}){let{dense:r=!1}=n;return{style:{display:"flex",alignItems:"center",gap:o=>et(Qe(o)*2),paddingBlock:o=>et(r?1:Qe(o)*2),paddingInline:o=>et(Qe(o)*3),fontSize:o=>Ur(o,"inherit"),color:o=>Se(o,"text")}}}function Mh(n={}){var i,t;let r=Ts((i=n.color)!=null?i:"neutral","color"),o=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{type:"button",style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"start",display:"flex",alignItems:"center",width:"100%",gap:a=>et(Qe(a)*2),paddingBlock:a=>et(e?1:Qe(a)*2),paddingInline:a=>et(Qe(a)*3),fontSize:a=>Ur(a,"inherit"),color:a=>Se(a,"text",r.get(a)),borderRadius:a=>et(Qe(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:a=>Se(a,qr(2),r.get(a)),backgroundColor:a=>Se(a,"hover",r.get(a))},"&:active:not([disabled])":{color:a=>Se(a,qr(2),r.get(a)),backgroundColor:a=>Se(a,"increase-2",r.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Se(a,"shift-3",o),color:a=>Se(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>v(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ds}from"@domphy/core";import{themeColor as Yr,themeDensity as Sn,themeSize as Is,themeSpacing as vn}from"@domphy/theme";function $h(n={}){var o;let r=Ds((o=n.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=>Is(e,"inherit"),color:e=>Yr(e,"text",r.get(e)),backgroundColor:e=>Yr(e,"inherit",r.get(e)),lineHeight:"normal",minHeight:e=>vn(Sn(e)*(6/1.5)),borderRadius:e=>vn(Sn(e)*(1/1.5)),paddingInline:e=>vn(Sn(e)*(1.5/1.5))}}}import{behavior as Ps,toState as Gr}from"@domphy/core";import{textToneOn as Ls,themeColor as De,themeDensity as qt,themeSize as Jr,themeSpacing as kt}from"@domphy/theme";function jh(n={items:[]}){var c;let{items:r=[],selectable:o=!0,color:e="neutral",accentColor:i="primary"}=n,t=Gr((c=n.activeKey)!=null?c:null),a=n.activeKey!==void 0,l=(d,p)=>{var x;let f=d.focusedKey.get(p);if(f!==null)return f;let h=d.selectable?d.activeKey.get(p):null;if(h!==null)return h;let b=d.items[0];return b?(x=b.key)!=null?x:0:null},m=(d,p)=>{let f=d.nodeId;return p.items.map((h,b)=>{var O;let x=(O=h.key)!=null?O:b;return P(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:x,type:"button",id:`menuitem${f}${x}`,role:"menuitem",tabIndex:T=>l(p,T)===x?0:-1,onFocus:()=>p.focusedKey.set(x)},p.selectable?{ariaCurrent:T=>p.activeKey.get(T)===x||void 0}:{}),{onClick:()=>{var T;p.selectable&&p.activeKey.set(x),(T=h.onClick)==null||T.call(h)},onKeyDown:T=>{var I;let S=T.key;if(S==="Enter"||S===" "){T.preventDefault(),T.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(S))return;T.preventDefault();let k=p.items.map((_,G)=>{var N;return(N=_.key)!=null?N:G}),C=k.indexOf(x),g=C;S==="ArrowDown"?g=(C+1)%k.length:S==="ArrowUp"?g=(C-1+k.length)%k.length:S==="Home"?g=0:S==="End"&&(g=k.length-1);let L=T.target.closest("[role=menu]");(I=L==null?void 0:L.querySelectorAll("[role=menuitem]")[g])==null||I.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:kt(2),width:"100%",fontSize:T=>Jr(T,"inherit"),minHeight:T=>kt(6+qt(T)*2),paddingInline:T=>kt(qt(T)*3),border:"none",outline:"none",color:T=>De(T,"text",p.color),backgroundColor:T=>De(T,"inherit",p.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:T=>De(T,"hover",p.color),color:T=>De(T,Ls(2),p.color)},"&[aria-current=true]":{backgroundColor:T=>De(T,"shift-3",p.accentColor),color:T=>De(T,"shift-13",p.accentColor)},"&:focus-visible":{boxShadow:T=>v(T,p.accentColor)}}})})},u=(d,p)=>{p.focusedKey.set(null);let f=p;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),h.focusedKey!==f.focusedKey&&h.focusedKey.set(f.focusedKey.get()),f=h,f.items.length!==0&&d.children.update(m(d,f))}}},s={items:r,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:i,focusedKey:Gr(null)};return P(E({role:"menu",dataTone:"shift-0",_onSchedule:(d,p)=>{r.length!==0&&(p[d.tagName]=m(d,s))}},Ps("menu",u,s)),{style:{display:"flex",flexDirection:"column",paddingBlock:d=>kt(qt(d)*2),paddingInline:d=>kt(qt(d)*2),fontSize:d=>Jr(d,"inherit"),backgroundColor:d=>De(d,"inherit",e),color:d=>De(d,"text",e),borderRadius:d=>kt(qt(d)*2),outline:d=>`1px solid ${De(d,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:A("medium")}})}import{behavior as Os}from"@domphy/core";function wt(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(n){return!1}}var Xr=n=>!!n&&typeof n.get=="function"&&n._isState===!0,ve=n=>{let r={},o=[];for(let e in n){let i=n[e];e==="x"?o.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?o.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?o.push(`scale(${i})`):e==="rotate"?o.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):r[e]=i}return o.length&&(r.transform=o.join(" ")),r};function En(n={}){var r,o,e,i;return{duration:(r=n.duration)!=null?r:300,delay:(o=n.delay)!=null?o:0,easing:(e=n.easing)!=null?e:"ease",iterations:(i=n.iterations)!=null?i:1,fill:"both"}}function Rs(n,r){let o=n.domElement,e=r,i,t=l=>{i==null||i(),i=void 0,!(!o||!Xr(l))&&(i=l.addListener(m=>{wt()?Object.assign(o.style,ve(m)):typeof o.animate=="function"&&o.animate([ve(m)],En(e.transition))}))},a=(l,m)=>{if(!o)return;let u=Xr(l.animate)?l.animate.get():l.animate;if(wt()){u?Object.assign(o.style,ve(u)):m==="enter"&&l.initial&&Object.assign(o.style,ve(l.initial));return}if(typeof o.animate=="function")if(u){let s=m==="enter"&&l.initial?[ve(l.initial),ve(u)]:[ve(u)];o.animate(s,En(l.transition))}else m==="enter"&&l.initial&&Object.assign(o.style,ve(l.initial))};return a(r,"enter"),t(r.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(l){e=l,a(l,"update"),t(l.animate)},destroy(){i==null||i()}}}function Xh(n={}){return P(E({},Os("motion",(r,o)=>Rs(r,o),n)),{_onBeforeRemove:(r,o)=>{var a,l;let e=r.domElement,i=r.getBehavior("motion"),t=(a=i==null?void 0:i.getExit())!=null?a:n.exit;if(!e||!t||typeof e.animate!="function")return o();if(wt())return Object.assign(e.style,ve(t)),o();e.animate([ve(t)],En((l=i==null?void 0:i.getTransition())!=null?l:n.transition)).finished.then(o,o)}})}import{toState as zs}from"@domphy/core";import{themeColor as Zr,themeSize as Vs,themeSpacing as Ms}from"@domphy/theme";function og(n={}){var o;let r=zs((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Vs(e,"inherit"),backgroundColor:e=>Zr(e),color:e=>Zr(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:Ms(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{behavior as As,isState as Ns,toState as ea}from"@domphy/core";import{themeColor as tt,themeDensity as ot,themeSize as _s,themeSpacing as $e,themeWeight as $s}from"@domphy/theme";function Hs(n,r){if(r<=7)return Array.from({length:r},(t,a)=>a+1);let o=[1];n>3&&o.push("...");let e=Math.max(2,n-1),i=Math.min(r-1,n+1);for(let t=e;t<=i;t++)o.push(t);return n<r-2&&o.push("..."),o.push(r),o}function Bs(n,r,o,e){if(Ns(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=ea(o!=null?o:e),n.setMetadata(r,i)),i}function Qr(n,r){let o=n.getMetadata("paginationTotal");return o||(o=ea(r),n.setMetadata("paginationTotal",o)),o}function lg(n){let{total:r,color:o="neutral",accentColor:e="primary"}=n,i={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>$e(6+ot(a)*2),minHeight:a=>$e(6+ot(a)*2),lineHeight:"inherit",paddingBlock:a=>$e(ot(a)*1),paddingInline:a=>$e(ot(a)*2),borderRadius:a=>$e(ot(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>_s(a,"inherit"),backgroundColor:"transparent",color:a=>tt(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>tt(a,"shift-13",o),backgroundColor:a=>tt(a,"hover",o)},"&:focus-visible":{boxShadow:a=>v(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=P(E({},i),{backgroundColor:a=>tt(a,"shift-13",e),color:a=>tt(a,"shift-0","neutral"),fontWeight:$s("bold"),cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>tt(a,"shift-13",e)}});return P(E({role:"navigation",ariaLabel:"Pagination",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let l=Bs(a,"paginationPage",n.value,1),m=Qr(a,r),u={div:s=>{let c=l.get(s),d=m.get(s),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&l.set(c-1),style:i});let f=0;for(let h of Hs(c,d))if(h==="...")p.push({span:"\u2026",_key:`ellipsis-${f++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",minHeight:b=>$e(6+ot(b)*2),paddingInline:b=>$e(ot(b)*2),color:b=>tt(b,"shift-7",o)}});else{let b=h===c;p.push({button:String(h),_key:`page-${h}`,type:"button",ariaLabel:`Page ${h}`,ariaCurrent:b?"page":void 0,onClick:()=>l.set(h),style:b?t:i})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&l.set(c+1),style:i}),p},style:{display:"flex",alignItems:"center",gap:$e(1)}};a.children.insert(u)}},As("pagination-total",a=>({update(l){Qr(a,l.total).set(l.total)}}),{total:r})),{style:{display:"inline-flex"}})}import{toState as Fs}from"@domphy/core";import{themeColor as ta,themeDensity as Ks,themeSpacing as Ws}from"@domphy/theme";function dg(n={}){var i;let{padding:r=4,divider:o=!1}=n,e=Fs((i=n.color)!=null?i:"neutral","color");return{style:E({padding:t=>Ws(Ks(t)*r)},o?{borderBottom:t=>`1px solid ${ta(t,"border",e.get(t))}`,color:t=>ta(t,"text")}:{})}}import{toState as js}from"@domphy/core";import{themeColor as qs,themeSize as Us}from"@domphy/theme";function yg(n={}){var o;let r=js((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Us(e,"inherit"),color:e=>qs(e,"text",r.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Ys,toState as oa}from"@domphy/core";import{themeColor as xn,themeDensity as Gs,themeSpacing as Js}from"@domphy/theme";var Xs=new Set(["dialog","grid","listbox","menu","tree"]);function Zs(n){var e;let r;for(let i of(e=n.$)!=null?e:[]){let t=i==null?void 0:i.role;typeof t=="string"&&(r=t)}let o=n.role;return typeof o=="string"&&(r=o),typeof r!="string"?"dialog":r==="alertdialog"||r==="menubar"?r==="menubar"?"menu":"dialog":r==="treegrid"?"grid":Xs.has(r)?r:"dialog"}function Qs(n){if(typeof n.dataTone=="string")return!0;let o=n.$;return o?o.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function Cg(n){var c;let{open:r=!1,placement:o="bottom",openOn:e="click"}=n,i=oa(r),t=oa(o),{show:a,hide:l,anchorPartial:m}=ge({kind:"popover",open:i,onDismiss:n.onDismiss,placement:t,content:n.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>xn(d,"inherit"),color:d=>xn(d,"text"),borderRadius:d=>Js(Gs(d)*2),outline:d=>`1px solid ${xn(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};Qs(n.content)||((c=n.content).$||(c.$=[]),n.content.$.push(u));let s={ariaHaspopup:Zs(n.content),ariaExpanded:d=>i.get(d),ariaControls:d=>d!=null&&d.elementNode?ee("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&l(p),onClick:(d,p)=>{e==="click"&&(i.get()?l(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&i.get()&&l(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let f=d.relatedTarget,b=p.getRoot().domElement.querySelector(`#${ee("popover",p)}`);f&&(b!=null&&b.contains(f))||l(p)}};return Ys(m,s),m}import{toState as ec}from"@domphy/core";import{themeColor as So,themeSize as tc,themeSpacing as Cn}from"@domphy/theme";function na(n={}){let{placement:r="bottom-end",color:o="neutral",sideOffset:e=Cn(6),bordered:i=!0}=n,t=ec(r),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"},l=s=>{var c;return(c=a[t.get(s)])!=null?c:a["bottom-end"]},m=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",u=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>tc(s),backgroundColor:s=>So(s),color:s=>So(s,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:Cn(1.5),height:Cn(1.5),backgroundColor:s=>So(s,"inherit",o),borderWidth:i?"1px":0,borderColor:s=>So(s,"border-strong",o),borderTopStyle:s=>{let c=l(s);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:s=>{let c=l(s);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:s=>{let c=l(s);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:s=>{let c=l(s);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:s=>{let c=l(s);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:s=>{let c=l(s);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:s=>{let c=l(s),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 oc}from"@domphy/core";import{themeColor as ra,themeDensity as kn,themeFont as nc,themeSize as rc,themeSpacing as wn}from"@domphy/theme";function Lg(n={}){var o;let r=oc((o=n.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=>rc(e,"inherit"),fontFamily:nc("monospace"),color:e=>ra(e,"text",r.get(e)),backgroundColor:e=>ra(e,"inherit",r.get(e)),border:"none",paddingBlock:e=>wn(kn(e)*2),paddingInline:e=>wn(kn(e)*3),borderRadius:e=>wn(kn(e)*2)}}}import{toState as aa}from"@domphy/core";import{themeColor as vo,themeSpacing as Eo}from"@domphy/theme";function Vg(n={}){var e,i;let r=aa((e=n.color)!=null?e:"neutral","color"),o=aa((i=n.accentColor)!=null?i:"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:Eo(2),border:0,borderRadius:Eo(999),overflow:"hidden",backgroundColor:t=>vo(t,"inherit",r.get(t)),color:t=>vo(t,"text",r.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>vo(t,"inherit",r.get(t)),borderRadius:Eo(999)},"&::-webkit-progress-value":{backgroundColor:t=>vo(t,"shift-9",o.get(t)),borderRadius:Eo(999),transition:"width 220ms ease"}}}}import{behavior as ac,isState as ic,rawHtml as lc,toState as ia}from"@domphy/core";import{themeColor as sc,themeSize as cc,themeSpacing as xo}from"@domphy/theme";function Tn(n){return!n||typeof getComputedStyle!="function"?!1:getComputedStyle(n).direction==="rtl"}function Ee(n,r){return n!=="ArrowRight"&&n!=="ArrowLeft"?0:n==="ArrowRight"!==Tn(r)?1:-1}var mc='<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>',uc='<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 la(n,r){var o,e,i;n.onChange=r.onChange,n.readOnly=(o=r.readOnly)!=null?o:!1,n.max=(e=r.max)!=null?e:5,n.color=(i=r.color)!=null?i:"warning",ic(r.value)?r.value!==n.valueState&&n.valueState.set(r.value.get()):r.value!==void 0&&n.valueState.set(r.value)}function dc(n,r,o,e){let i=a=>{let l=e.get(a);return l>0?l:o.valueState.get(a)},t={button:a=>lc(r<=i(a)?mc:uc),_key:r,type:"button",ariaLabel:`${r} star${r>1?"s":""}`,role:"radio",ariaChecked:a=>o.valueState.get(a)===r,tabindex:a=>{let l=o.valueState.get(a);return(l===0?1:l)===r?0:-1},onClick:()=>{var l;if(o.readOnly)return;let a=r===o.valueState.get()?0:r;o.valueState.set(a),(l=o.onChange)==null||l.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(r)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var s,c,d;if(o.readOnly)return;let l=o.valueState.get(),m=l;if(a.key==="ArrowUp")m=Math.min(o.max,l+1),a.preventDefault();else if(a.key==="ArrowDown")m=Math.max(0,l-1),a.preventDefault();else if(a.key==="ArrowRight"||a.key==="ArrowLeft")m=Ee(a.key,a.target)>0?Math.min(o.max,l+1):Math.max(0,l-1),a.preventDefault();else if(a.key==="Home")m=1,a.preventDefault();else if(a.key==="End")m=o.max,a.preventDefault();else return;o.valueState.set(m),(s=o.onChange)==null||s.call(o,m);let u=m>0?m-1:0;(d=(c=n.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:xo(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",justifyContent:"center",minWidth:xo(6),minHeight:xo(6),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>v(a,o.color)}}};n.children.insert(t)}function Dn(n,r,o){let e=n.children.items;for(;e.length>r.max;)n.children.remove(e[e.length-1]);for(let i=e.length+1;i<=r.max;i++)dc(n,i,r,o)}function Bg(n={}){var e,i,t,a,l,m,u;let r={valueState:ia((e=n.value)!=null?e:0),onChange:n.onChange,readOnly:(i=n.readOnly)!=null?i:!1,max:(t=n.max)!=null?t:5,color:(a=n.color)!=null?a:"warning"},o=ia(0);return P(E({role:"radiogroup",ariaLabel:"Rating",ariaReadonly:r.readOnly?"true":void 0,style:{display:"inline-flex",gap:xo(.5),fontSize:s=>cc(s,"increase-1"),cursor:r.readOnly?"default":"pointer",color:s=>sc(s,"muted",r.color)}},ac("rating",(s,c)=>(la(r,c),Dn(s,r,o),{update(d){la(r,d),Dn(s,r,o)}}),{value:n.value,max:(l=n.max)!=null?l:5,onChange:n.onChange,readOnly:(m=n.readOnly)!=null?m:!1,color:(u=n.color)!=null?u:"warning"})),{_onInit:s=>{Dn(s,r,o)}})}import{toState as In}from"@domphy/core";import{themeColor as Pn,themeSpacing as sa}from"@domphy/theme";function qg(n={}){var m,u,s;let{size:r=16,thickness:o=.25}=n,e=In((m=n.value)!=null?m:0,"value"),i=In((u=n.color)!=null?u:"primary","color"),t=In((s=n.trackColor)!=null?s:"neutral","trackColor"),a=Math.round((1-o)*100),l=`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:sa(r),height:sa(r),borderRadius:"50%",color:c=>Pn(c,"shift-9",i.get(c)),background:c=>`conic-gradient(from -90deg, ${Pn(c,"shift-9",i.get(c))} ${e.get(c)}%, ${Pn(c,"shift-3",t.get(c))} 0%)`,WebkitMask:l,mask:l}}}import{themeDensity as pc,themeSpacing as ca}from"@domphy/theme";function ma(n={}){let{gap:r=4,align:o="center",justify:e,wrap:i=!1,density:t=!0}=n;return{style:E(E({display:"flex",alignItems:o,gap:t?a=>ca(pc(a)*r):()=>ca(r)},e?{justifyContent:e}:{}),i?{flexWrap:"wrap"}:{})}}import{toState as fc}from"@domphy/core";import{themeColor as Co,themeSpacing as ko}from"@domphy/theme";function Qg(n={}){var o;let r=fc((o=n.color)!=null?o:"neutral","color");return P(E({},n.label?{role:"region",ariaLabel:n.label,tabIndex:0}:{}),{style:{overflow:"auto",color:e=>Co(e,"text",r.get(e)),"&::-webkit-scrollbar":{width:ko(2),height:ko(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Co(e,"shift-5",r.get(e)),borderRadius:ko(999),border:`${ko(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Co(e,"shift-7",r.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Co(e,"shift-5",r.get(e))} transparent`}})}import{behavior as hc,isState as gc,toState as yc}from"@domphy/core";import{textToneOn as ua,themeColor as Ie,themeSize as bc,themeSpacing as nt}from"@domphy/theme";function da(n,r,o,e){if(gc(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=yc(o!=null?o:e),n.setMetadata(r,i)),i}function Sc(n,r,o,e){var u;let i=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(i))return;n.preventDefault();let t=r.map((s,c)=>{var d;return(d=s.key)!=null?d:String(c)}),a=t.indexOf(o),l=a;if(i==="ArrowDown")l=(a+1)%t.length;else if(i==="ArrowUp")l=(a-1+t.length)%t.length;else if(i==="ArrowRight"||i==="ArrowLeft"){let s=Ee(i,n.target);l=(a+s+t.length)%t.length}else i==="Home"?l=0:i==="End"&&(l=t.length-1);e.set(t[l]);let m=n.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[l])==null||u.focus()}function pa(n,r,o,e){return n.map((i,t)=>{var m;let a=(m=i.key)!=null?m:String(t);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:a,type:"button",role:"radio",ariaChecked:u=>r.get(u)===a,tabIndex:u=>{var c,d;let s=r.get(u);return s===a||s===""&&a===((d=(c=n[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>r.set(a),onKeyDown:u=>Sc(u,n,a,r),style:{cursor:"pointer",fontSize:u=>bc(u,"inherit"),display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:nt(6),paddingBlock:0,paddingInline:nt(3),border:"none",borderRadius:nt(10),color:u=>Ie(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=>Ie(u,"shift-3",o),color:u=>Ie(u,ua(3),o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>Ie(u,"increase-2",o),color:u=>Ie(u,ua(3),o)},"&[aria-checked=true]":{backgroundColor:u=>Ie(u,"shift-0",e),color:u=>Ie(u,"shift-10",e),boxShadow:A("low")},"&:focus-visible":{boxShadow:u=>v(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${A("low")}, ${v(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ly(n={items:[]}){let{items:r=[],color:o="neutral",accentColor:e="primary"}=n;return P(E({role:"radiogroup",_onSchedule:(t,a)=>{var m,u;let l=da(t,"segmentedValue",n.value,(u=(m=r[0])==null?void 0:m.key)!=null?u:"");t.setContext("segmented",{value:l}),a[t.tagName]=pa(r,l,o,e)}},hc("segmented-items",t=>({update(a){var m,u;let l=da(t,"segmentedValue",n.value,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:"");t.children.update(pa(a.items,l,a.color,a.accentColor),!!t.domElement,!0)}}),{items:r,color:o,accentColor:e})),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:nt(1),paddingInline:nt(1),gap:nt(.5),borderRadius:nt(10),backgroundColor:t=>Ie(t,"inherit",o),color:t=>Ie(t,"text",o)}})}import{themeColor as Pe,themeColorToken as vc,themeDensity as wo,themeSize as Ec,themeSpacing as rt}from"@domphy/theme";function py(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontSize:e=>Ec(e,"inherit"),lineHeight:"inherit",color:e=>Pe(e,"text",r),backgroundColor:e=>Pe(e,"inherit",r),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Pe(e,"border-strong",r)}`,borderRadius:e=>rt(wo(e)*1.5),paddingBlock:e=>rt(wo(e)*1),paddingInlineStart:e=>rt(wo(e)*3),paddingInlineEnd:e=>rt(wo(e)*5),backgroundImage:e=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${vc(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:e=>{var i;return`${Tn((i=e.elementNode)==null?void 0:i.domElement)?"left":"right"} ${rt(2)} center`},backgroundSize:`${rt(2.5)} ${rt(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${Pe(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>v(e,o)},"& optgroup":{color:e=>Pe(e,"shift-11",r)},"& option[disabled]":{color:e=>Pe(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Pe(e,"muted","neutral"),outline:e=>`1px solid ${Pe(e,"border-strong","neutral")}`,backgroundColor:e=>Pe(e,"shift-2","neutral")}}}}import{behavior as xc,merge as fa,toState as Ln}from"@domphy/core";import{themeColor as Tt,themeDensity as To,themeSize as Cc,themeSpacing as Dt}from"@domphy/theme";var kc=1e3;function wc(n){let r=n.getMetadata("selectBoxTypeahead");return r||(r={buffer:"",timer:null},n.setMetadata("selectBoxTypeahead",r)),r}var ha=(n,r)=>n.trim().toLowerCase().startsWith(r);function Cy(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=Ln(n.value),l=Ln(i),{show:m,hide:u,anchorPartial:s}=ge({kind:"selectBox",open:l,onDismiss:n.onDismiss,placement:Ln(o),content:n.content}),c={onClick:(S,k)=>!t&&u(k),dataTone:"shift-0",style:{backgroundColor:S=>Tt(S,"inherit"),color:S=>Tt(S,"text"),borderRadius:S=>Dt(To(S)*2),outline:S=>`1px solid ${Tt(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};fa(n.content,c);let d=S=>({div:k=>{let C=S.state.get(k),g=Array.isArray(C)?C:[C];return S.options.filter(I=>g.includes(I.value)).map(I=>({span:I.label,$:[no({color:S.color,removable:S.multiple})],_key:I.value,_onRemove:_=>{let G=S.state.get(),B=(Array.isArray(G)?G:[G]).filter(oe=>oe!==I.value);S.multiple?S.state.set(B):S.state.set(B[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:Dt(1),flex:1}}),p=(S,k)=>({update(C){S.children.update([d(C)])}}),f=S=>l.get()?u(S):m(S),h=S=>{var C;let k=S.getRoot().domElement;return(C=k==null?void 0:k.querySelector(`#${ee("selectBox",S)}`))!=null?C:null},b=(S,k)=>{var L;let C=We(h(S));if(!C.length)return;let g=C[k?C.length-1:0];g.focus(),(L=g.scrollIntoView)==null||L.call(g,{block:"nearest"})},x=(S,k)=>{let C;C=re(l,g=>{g&&(C==null||C(),requestAnimationFrame(()=>b(S,k)))},!1),m(S)},O=(S,k)=>{var N,B,oe;let C=wc(k);C.timer&&clearTimeout(C.timer),C.buffer+=S.toLowerCase(),C.timer=setTimeout(()=>{C.buffer=""},kc);let g=C.buffer.length>1&&new Set(C.buffer).size===1,L=g?C.buffer[0]:C.buffer;if(l.get()){let K=We(h(k)).filter(Fe=>{var fe;return ha((fe=Fe.textContent)!=null?fe:"",L)});if(!K.length)return;let ae=(B=(N=k.domElement)==null?void 0:N.ownerDocument)==null?void 0:B.activeElement,ie=g&&ae?K.indexOf(ae):-1,J=K[(ie+1)%K.length];J.focus(),(oe=J.scrollIntoView)==null||oe.call(J,{block:"nearest"});return}if(t)return;let I=r.filter(K=>ha(K.label,L));if(!I.length)return;let _=g?I.findIndex(K=>K.value===a.get()):-1,G=I[(_+1)%I.length];a.set(G.value)},T=P(E({_onInsert:S=>{S.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(S,k)=>{k[S.tagName]=[d({options:r,multiple:t,color:e,state:a})]}},xc("selectBoxInner",p,{options:r,multiple:t,color:e,state:a})),{onClick:(S,k)=>f(k),tabindex:0,role:"combobox",ariaLabel:"Select",ariaExpanded:S=>l.get(S),ariaHaspopup:"listbox",ariaControls:S=>S!=null&&S.elementNode?ee("selectBox",S.elementNode):void 0,onKeyDown:(S,k)=>{let C=S.key;if(C==="Escape"){u(k);return}if(C==="Enter"||C===" "){S.preventDefault(),f(k);return}if(C==="ArrowDown"||C==="ArrowUp"||C==="Home"||C==="End"){S.preventDefault();let L=C==="ArrowUp"||C==="End";l.get()?b(k,L):x(k,L);return}let g=S;C.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&O(C,k)},style:{cursor:"pointer",display:"flex",alignItems:"center",paddingBlock:S=>Dt(To(S)*1),"&::before":{content:'"\\200b"',width:0,overflow:"hidden"},minWidth:Dt(32),outlineOffset:"-1px",outline:S=>`1px solid ${Tt(S,"border-strong","neutral")}`,paddingInline:S=>Dt(To(S)*2),borderRadius:S=>Dt(To(S)*1.5),fontSize:S=>Cc(S,"inherit"),color:S=>Tt(S,"text",e),backgroundColor:S=>Tt(S,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:S=>v(S,e)}}});return fa(s,T),s}import{textToneOn as Tc,themeColor as It,themeDensity as ga,themeSize as Dc,themeSpacing as ya}from"@domphy/theme";function Iy(n={}){let{accentColor:r="primary",color:o="neutral",value:e=null}=n;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 l=a.value.get(t);return a.multiple?l.includes(e):l===e},onClick:(t,a)=>{let l=a.getContext("select");if(!l)return;let m=l.value,u=m.get();l.multiple?u.includes(e)?m.set(u.filter(s=>s!==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=>Dc(t,"inherit"),minHeight:t=>ya(6+ga(t)*2),paddingInline:t=>ya(ga(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),color:t=>It(t,Tc(2),o)},"&[aria-selected=true]":{backgroundColor:t=>It(t,"shift-13",r),color:t=>It(t,"shift-0","neutral")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,r)}}}}import{toState as Ic}from"@domphy/core";import{themeColor as ba,themeDensity as Sa,themeSize as Pc,themeSpacing as va}from"@domphy/theme";function Lc(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=We(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"||o===" "){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=Math.min(i.length-1,a+1);else if(o==="ArrowUp")l=a<=0?0:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function zy(n={}){var a;let{color:r="neutral",multiple:o=!1}=n,e=Ic((a=n.value)!=null?a:o?[]:null),i={div:l=>{let m=e.get(l);return(Array.isArray(m)?m:[m]).map(s=>({input:null,type:"hidden",name:n.name,value:s==null?"":String(s)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,tabindex:0,onKeyDown:Lc,_onSchedule:l=>{l.setContext("select",{value:e,multiple:o})},_onInit:l=>{l.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>va(Sa(l)*2),paddingInline:l=>va(Sa(l)*2),fontSize:l=>Pc(l,"inherit"),backgroundColor:l=>ba(l,"inherit",r),color:l=>ba(l,"text",r)}}}import{hashString as Oc,toState as Rc}from"@domphy/core";import{themeColor as Ut,themeSize as zc,themeSpacing as Ea}from"@domphy/theme";function Ny(n={}){var i;let r=Rc((i=n.color)!=null?i:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=Oc(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>zc(t),color:t=>Ut(t,"text",r.get(t)),height:Ea(6),display:"block",borderRadius:Ea(1),backgroundColor:t=>Ut(t,"inherit",r.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${Ut(t,"inherit",r.get(t))} 0%, ${Ut(t,"shift-2",r.get(t))} 50%, ${Ut(t,"inherit",r.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}import{toState as Vc}from"@domphy/core";import{themeColor as Mc,themeSize as Ac}from"@domphy/theme";function By(n={}){var o;let r=Vc((o=n.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=>Ac(e,"inherit"),color:e=>Mc(e,"shift-10",r.get(e))}}}import{hashString as Nc,toState as _c}from"@domphy/core";import{themeColor as Do,themeSize as $c,themeSpacing as On}from"@domphy/theme";var Ca={to:{transform:"rotate(360deg)"}},xa=Nc(JSON.stringify(Ca));function jy(n={}){var o;let r=_c((o=n.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=>$c(e),backgroundColor:e=>Do(e),color:e=>Do(e,"text",r.get(e)),display:"inline-block",margin:0,flexShrink:0,width:On(6),height:On(6),borderRadius:"50%",border:e=>`${On(.5)} solid ${Do(e,"border-strong",r.get(e))}`,borderTopColor:e=>Do(e,"shift-9",r.get(e)),boxSizing:"border-box",padding:0,animation:`${xa} 0.7s linear infinite`,[`@keyframes ${xa}`]:Ca}}}import{ElementNode as Hc,merge as Bc,toState as Fc}from"@domphy/core";import{themeColor as Io,themeSpacing as Rn}from"@domphy/theme";function Xy(n={}){let{direction:r="horizontal",defaultSize:o=50,min:e=10,max:i=90}=n;return{_onSchedule:(t,a)=>{Bc(a,{_context:{splitter:{direction:r,size:Fc(o),min:e,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:r==="horizontal"?"row":"column",overflow:"hidden"}}}function Kc(n){let r=n.parent;if(!r)return!0;for(let o of r.children.items)if(o instanceof Hc&&o.getMetadata("splitterPanel"))return o===n;return!0}function Zy(){return{_metadata:{splitterPanel:!0},_onMount:n=>{let r=n.getContext("splitter");if(!r){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=n.domElement,e=r.direction==="horizontal"?"width":"height",i=a=>{o.style[e]=`${Kc(n)?a:100-a}%`};i(r.size.get()),o.style.flexShrink="1",o.style.overflow="auto";let t=r.size.addListener(i);n.addHook("Remove",()=>{var a;r.panelCount=Math.max(0,((a=r.panelCount)!=null?a:1)-1),t()})}}}function Qy(n={}){let{label:r="Resize"}=n;return{role:"separator",tabindex:0,ariaLabel:r,_onMount:o=>{let e=o.getContext("splitter");if(!e){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let i=o.domElement,t=e.direction==="horizontal";i.style.cursor=t?"col-resize":"row-resize",i.setAttribute("aria-orientation",t?"vertical":"horizontal"),i.setAttribute("aria-valuemin",String(e.min)),i.setAttribute("aria-valuemax",String(e.max)),i.setAttribute("aria-valuenow",String(Math.round(e.size.get())));let a=e.size.addListener(s=>{i.setAttribute("aria-valuenow",String(Math.round(s)))}),l=s=>{let c=s.shiftKey?10:1,d=null;if(t){let p=Ee(s.key,i);p!==0&&(d=Math.min(Math.max(e.size.get()+p*c,e.min),e.max))}else s.key==="ArrowDown"?d=Math.min(e.size.get()+c,e.max):s.key==="ArrowUp"&&(d=Math.max(e.size.get()-c,e.min));s.key==="Home"?d=e.min:s.key==="End"&&(d=e.max),d!==null&&(s.preventDefault(),e.size.set(d))},m=null,u=s=>{var f;s.preventDefault();let c=i.parentElement;(f=i.setPointerCapture)==null||f.call(i,s.pointerId);let d=h=>{if(h.pointerId!==s.pointerId)return;let b=c.getBoundingClientRect(),x=t?(h.clientX-b.left)/b.width*100:(h.clientY-b.top)/b.height*100;e.size.set(Math.min(Math.max(x,e.min),e.max))};m=()=>{var h;document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),m=null,(h=i.hasPointerCapture)!=null&&h.call(i,s.pointerId)&&i.releasePointerCapture(s.pointerId)};function p(h){h.pointerId===s.pointerId&&(m==null||m())}document.addEventListener("pointermove",d),document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p)};i.addEventListener("keydown",l),i.addEventListener("pointerdown",u),o.addHook("Remove",()=>{m==null||m(),a(),i.removeEventListener("keydown",l),i.removeEventListener("pointerdown",u)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"none",backgroundColor:o=>Io(o,"inherit"),color:o=>Io(o,"text"),"&:hover":{backgroundColor:o=>Io(o,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:o=>v(o,"primary")},"&::after":{content:'""',width:Rn(1),height:Rn(1),borderRadius:Rn(999),backgroundColor:o=>Io(o,"shift-4")}}}}import{themeDensity as Wc,themeSpacing as ka}from"@domphy/theme";function ob(n={}){let{gap:r=3,align:o,justify:e,density:i=!0}=n;return{style:E(E({display:"flex",flexDirection:"column",gap:i?t=>ka(Wc(t)*r):()=>ka(r)},o?{alignItems:o}:{}),e?{justifyContent:e}:{})}}import{behavior as jc,isState as qc,toState as Pa}from"@domphy/core";import{themeColor as Y,themeSize as wa,themeSpacing as pe,themeWeight as Ta}from"@domphy/theme";function Da(n,r,o,e){if(qc(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=Pa(o!=null?o:e),n.setMetadata(r,i)),i}function Uc(n,r,o){return n==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",insetInlineStart:pe(3),top:pe(6),bottom:`-${pe(2)}`,width:"2px",height:"auto",insetInlineEnd:"auto",backgroundColor:e=>Y(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:pe(3),insetInlineEnd:`calc(50% + ${pe(3)})`,insetInlineStart:`calc(-50% + ${pe(3)})`,height:"2px",backgroundColor:e=>Y(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>Y(e,"shift-9",o)}}}function Ia(n,r,o,e,i){let t=o==="vertical",a=Uc(o,e,i);return n.map((l,m)=>{var s;return{li:[typeof l.label=="string"?{span:l.label}:l.label],_key:(s=l.key)!=null?s:m,dataStep:String(m+1),dataStatus:c=>{let d=r.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>r.get(c)===m?"step":void 0,style:P(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:pe(1),flex:t?"none":"1",fontSize:c=>wa(c,"decrease-1"),textAlign:t?"start":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:pe(6),height:pe(6),borderRadius:pe(999),fontSize:c=>wa(c,"decrease-1"),fontWeight:Ta("bold"),flexShrink:"0",border:c=>`2px solid ${Y(c,"border-strong",e)}`,backgroundColor:c=>Y(c,"inherit"),color:c=>Y(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>Y(c,"shift-9",i),borderColor:c=>Y(c,"shift-9",i),color:c=>Y(c,"shift-0",i),boxShadow:c=>`0 0 0 3px ${Y(c,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>Y(c,"shift-9",i),borderColor:c=>Y(c,"shift-9",i),color:c=>Y(c,"shift-0",i)},"&[data-status=pending]":{color:c=>Y(c,"muted")},"&[data-status=active]":{color:c=>Y(c,"shift-11",i),fontWeight:Ta("bold")},"&[data-status=done]":{color:c=>Y(c,"text",e)}})}})}function lb(n={items:[]}){var a;let{items:r=[],direction:o="horizontal",color:e="neutral",accentColor:i="primary"}=n,t={items:r,direction:o,color:e,accentColor:i};return P(E({_context:{steps:{current:Pa((a=n.current)!=null?a:0),direction:o,color:e,accentColor:i}},_onSchedule:(l,m)=>{let u=Da(l,"stepsCurrent",n.current,0);m[l.tagName]=Ia(r,u,o,e,i)}},jc("steps-items",l=>({update(m){let u=Da(l,"stepsCurrent",n.current,0);l.children.update(Ia(m.items,u,m.direction,m.color,m.accentColor),!!l.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:pe(2),listStyle:"none",margin:"0",padding:"0"}})}import{toState as Yc}from"@domphy/core";import{themeColor as La,themeSize as Gc,themeWeight as Jc}from"@domphy/theme";function db(n={}){var o;let r=Yc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Gc(e,"inherit"),fontWeight:Jc("bold"),color:e=>La(e,"shift-11",r.get(e)),backgroundColor:e=>La(e)}}}import{toState as Xc}from"@domphy/core";import{themeColor as Zc,themeSize as Qc}from"@domphy/theme";function gb(n={}){var o;let r=Xc((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Qc(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Zc(e,"text",r.get(e))}}}import{toState as em}from"@domphy/core";import{themeColor as tm,themeSize as om}from"@domphy/theme";function vb(n={}){var o;let r=em((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>om(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>tm(e,"text",r.get(e))}}}import{toState as nm}from"@domphy/core";import{textToneOn as Oa,themeColor as ue,themeDensity as Pt,themeSize as Ra,themeSpacing as Lt,themeWeight as za}from"@domphy/theme";function kb(n={}){var o;let r=nm((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>Ra(e,"inherit"),color:e=>ue(e,"text",r.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"start",fontWeight:za("medium"),paddingInline:e=>Lt(Pt(e)*3),paddingBlock:e=>Lt(Pt(e)*1),color:e=>ue(e,"shift-10",r.get(e)),backgroundColor:e=>ue(e,"inherit")},"& td":{textAlign:"start",paddingInline:e=>Lt(Pt(e)*3),paddingBlock:e=>Lt(Pt(e)*1),color:e=>ue(e,"text",r.get(e)),boxShadow:e=>`inset 0 1px 0 ${ue(e,"shift-3",r.get(e))}`,fontSize:e=>Ra(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"start",fontWeight:za("medium"),paddingInline:e=>Lt(Pt(e)*3),paddingBlock:e=>Lt(Pt(e)*1),color:e=>ue(e,"shift-10",r.get(e)),backgroundColor:e=>ue(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${ue(e,"shift-4",r.get(e))}`},"& tr":{backgroundColor:e=>ue(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>ue(e,"hover"),color:e=>ue(e,Oa(2))},"& tbody tr:hover td, & tbody tr:hover th":{color:e=>ue(e,Oa(2))}}}}import{behavior as rm,isState as am,toState as im}from"@domphy/core";import{themeColor as He,themeDensity as Po,themeSize as lm,themeSpacing as Be}from"@domphy/theme";function Va(n,r,o,e){if(am(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=im(o!=null?o:e),n.setMetadata(r,i)),i}function Ma(n,r,o,e,i){let t=n.nodeId,l={div:r.map((u,s)=>{var p;let c=(p=u.key)!=null?p:s;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:f=>o.get(f)===c,tabIndex:f=>o.get(f)===c?0:-1,onClick:()=>o.set(c),onKeyDown:f=>{var S;let h=f.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;f.preventDefault();let b=r.map((k,C)=>{var g;return(g=k.key)!=null?g:C}),x=b.indexOf(c),O=x;if(h==="ArrowRight"||h==="ArrowLeft"){let k=Ee(h,f.target);O=(x+k+b.length)%b.length}else h==="Home"?O=0:h==="End"&&(O=b.length-1);o.set(b[O]);let T=f.target.closest("[role=tablist]");(S=T==null?void 0:T.querySelectorAll("[role=tab]")[O])==null||S.focus()},style:{cursor:"pointer",fontSize:f=>lm(f,"inherit"),display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:f=>Be(6+Po(f)*2),paddingInline:f=>Be(Po(f)*4),border:"none",outline:"none",color:f=>He(f,"shift-13"),backgroundColor:f=>He(f,"inherit"),boxShadow:f=>`inset 0 ${Be(-.5)} 0 0 ${He(f,"shift-1",i)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:f=>He(f,"shift-13"),boxShadow:f=>`inset 0 ${Be(-.5)} 0 0 ${He(f,"shift-2",i)}`},"&[aria-selected=true]:not([disabled])":{color:f=>He(f,"shift-13",e),boxShadow:f=>`inset 0 ${Be(-.5)} 0 0 ${He(f,"shift-8",e)}`},"&:focus-visible":{boxShadow:f=>v(f,e)},"&[aria-selected=true]:focus-visible":{boxShadow:f=>`${v(f,e)}, inset 0 ${Be(-.5)} 0 0 ${He(f,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex",flexWrap:"wrap"}},m=r.map((u,s)=>{var d;let c=(d=u.key)!=null?d:s;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,tabIndex:0,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>Be(Po(p)*2),paddingInline:p=>Be(Po(p)*2)}}});return[l,...m]}function Lb(n={items:[]}){let{items:r=[],accentColor:o="primary",color:e="neutral"}=n;return E({_onSchedule:(t,a)=>{var m,u;let l=Va(t,"tabsActiveKey",n.activeKey,(u=(m=r[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=Ma(t,r,l,o,e)}},rm("tabs-items",t=>({update(a){var m,u;let l=Va(t,"tabsActiveKey",n.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(Ma(t,a.items,l,a.accentColor,a.color),!!t.domElement,!0)}}),{items:r,accentColor:o,color:e}))}import{behavior as sm,toState as Aa}from"@domphy/core";import{themeColor as Le,themeDensity as zn,themeSize as cm,themeSpacing as Ot}from"@domphy/theme";function Nb(n={}){var i,t;let r=Aa((i=n.color)!=null?i:"neutral","color"),o=Aa((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return P(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},sm("textarea-auto-resize",(a,l)=>{let m=a.domElement,u=l.autoResize,s=!1,c,d,p=()=>{!u||s||(s=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,s=!1,u&&(d==null||d.observe(m)))},f=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(b=>{b.some(x=>x.isIntersecting)&&p()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{s||p()})),d.observe(m))},h=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",p),a.attributes.addListener("value",p),u&&(f(),p()),{resize:p,update(b){u=b.autoResize,a.attributes.addListener("value",p),u?(f(),p()):h()},destroy(){m.removeEventListener("input",p),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var l;(l=a.getBehavior("textarea-auto-resize"))==null||l.resize()},style:P(E({lineHeight:"inherit",resize:"vertical",paddingInline:a=>Ot(zn(a)*2),paddingBlock:a=>Ot(zn(a)*1.5),border:"none",borderRadius:a=>Ot(zn(a)*1.5),fontSize:a=>cm(a,"inherit")},ce(r)),{outlineOffset:"-1px",outline:a=>`1px solid ${Le(a,"border-strong",r.get(a))}`,backgroundColor:a=>Le(a,"inherit",r.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${Le(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,o.get(a))},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${Ot(.5)} solid ${Le(a,"shift-5","error")}`},"&[data-status=error]":{outline:a=>`${Ot(.5)} solid ${Le(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${Ot(.5)} solid ${Le(a,"shift-6","warning")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>Le(a,"muted","neutral"),outline:a=>`1px solid ${Le(a,"border-strong","neutral")}`,backgroundColor:a=>Le(a,"shift-2","neutral")}})})}import{toState as mm}from"@domphy/core";import{themeColor as Na,themeDensity as _a,themeSpacing as An}from"@domphy/theme";function Fb(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}var Vn="0.75rem",Mn=An(1);function Kb(n={}){var t,a,l;let{last:r=!1}=n,o=(t=n.color)!=null?t:"neutral",e=(a=n.accentColor)!=null?a:"primary",i=mm((l=n.active)!=null?l:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>An(_a(m)*2),paddingBottom:m=>r?"0":An(_a(m)*4),position:"relative","& > *":{gridColumn:2},"&::before":{content:'""',display:"block",width:Vn,height:Vn,borderRadius:"50%",justifySelf:"center",marginTop:Mn,transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>Na(m,"shift-8",i.get(m)?e:o),opacity:m=>i.get(m)?"1":"0.4"}},r?{}:{"&::after":{content:'""',position:"absolute",insetInlineStart:"calc(1rem - 1px)",top:`calc(${Mn} + ${Vn})`,bottom:`calc(-1 * ${Mn})`,width:"2px",backgroundColor:m=>Na(m,"shift-3",o)}})}}import{behavior as um,toState as dm}from"@domphy/core";import{themeColor as $a,themeDensity as Nn,themeSize as pm,themeSpacing as Rt}from"@domphy/theme";function _n(n){let r=n.getMetadata("toastOpen");return r||(r=dm(!1),n.setMetadata("toastOpen",r)),r}var Ha=n=>{let r=n==null?void 0:n.elementNode;return r?_n(r).get(n):!1},fm=5e3;function hm(n,r){let{duration:o,onDismiss:e}=r,i=null,t=o,a=0,l=!1,m=()=>{i&&(clearTimeout(i),i=null)},u=()=>{l||(l=!0,m(),e==null||e(),n.remove())},s=f=>{m(),!(l||!Number.isFinite(f)||f<=0)&&(a=Date.now(),i=setTimeout(u,f))};s(o);let c=()=>{i&&(t-=Date.now()-a,m())},d=()=>{l||i||s(t)},p=n.domElement;return p==null||p.addEventListener("pointerenter",c),p==null||p.addEventListener("pointerleave",d),p==null||p.addEventListener("focusin",c),p==null||p.addEventListener("focusout",d),{pause:c,resume:d,update(f){o=f.duration,e=f.onDismiss,!i&&!l&&(t=o)},destroy(){m(),p==null||p.removeEventListener("pointerenter",c),p==null||p.removeEventListener("pointerleave",d),p==null||p.removeEventListener("focusin",c),p==null||p.removeEventListener("focusout",d)}}}function Gb(n={}){let{position:r="top-center",color:o="neutral",duration:e=fm,onDismiss:i}=n,t=r.startsWith("top"),a=r.endsWith("center"),l=r.endsWith("right"),m={div:[],id:`domphy-toast-${r}`,style:{position:"fixed",display:"flex",flexDirection:t?"column":"column-reverse",alignItems:a?"center":l?"end":"start",inset:0,gap:Rt(4),zIndex:30,padding:Rt(6),pointerEvents:"none"}};return P(E({},um("toastAutoDismiss",hm,{duration:e,onDismiss:i})),{_portal:u=>{let s=u.domElement.querySelector(`#domphy-toast-${r}`);return s||(s=u.children.insert(m).domElement),s},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Rt(32),pointerEvents:"auto",paddingBlock:u=>Rt(Nn(u)*2),paddingInline:u=>Rt(Nn(u)*4),borderRadius:u=>Rt(Nn(u)*2),fontSize:u=>pm(u,"inherit"),color:u=>$a(u,"text",o),backgroundColor:u=>$a(u,"inherit",o),boxShadow:A("medium"),opacity:u=>Number(Ha(u)),transform:u=>Ha(u)?"translateY(0)":t?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:u=>requestAnimationFrame(()=>_n(u).set(!0)),_onBeforeRemove:(u,s)=>{var T,S;let c=!1,d=null,p=!1,f=u.getRoot(),h=(S=(T=u.domElement)==null?void 0:T.parentElement)!=null?S:null,b=()=>{var C;if(p||!h||h.id!==`domphy-toast-${r}`||h.childElementCount>0)return;p=!0;let k=(C=f.children)==null?void 0:C.items.find(g=>g.domElement===h);k?f.children.remove(k):h.remove()},x=()=>{c||(c=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",O),s(),b())},O=k=>{k.propertyName==="transform"&&x()};u.domElement.addEventListener("transitionend",O),d=setTimeout(x,350),u.addHook("Remove",()=>{var k;d&&(clearTimeout(d),d=null),(k=u.domElement)==null||k.removeEventListener("transitionend",O),b()}),_n(u).set(!1)}})}import{behavior as gm,isState as ym,toState as bm}from"@domphy/core";import{themeColor as xe,themeSize as Fa,themeSpacing as at}from"@domphy/theme";function Lo(n,r,o,e){if(ym(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=bm(o!=null?o:e),n.setMetadata(r,i)),i}function Sm(n,r){return Array.isArray(n)?n.includes(r):n===r}function vm(n,r,o,e,i){var s;let t=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t))return;n.preventDefault();let a=r.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),l=a.indexOf(o),m=l;if(t==="ArrowDown")m=(l+1)%a.length;else if(t==="ArrowUp")m=(l-1+a.length)%a.length;else if(t==="ArrowRight"||t==="ArrowLeft"){let c=Ee(t,n.target);m=(l+c+a.length)%a.length}else t==="Home"?m=0:t==="End"&&(m=a.length-1);i||e.set(a[m]);let u=n.target.closest("[role=group]");(s=u==null?void 0:u.querySelectorAll("button")[m])==null||s.focus()}function Ba(n,r,o,e,i,t){return n.map((a,l)=>{var s;let m=(s=a.key)!=null?s:String(l);return{button:[typeof a.label=="string"?{span:a.label}:a.label],_key:m,type:"button",role:"button",ariaPressed:c=>Sm(r.get(c),m),tabIndex:c=>{var p,f,h,b,x;let d=r.get(c);if(e){let O=o.get(c);if(O!==null)return m===O?0:-1;let S=(h=(f=(Array.isArray(d)?d:[])[0])!=null?f:(p=n[0])==null?void 0:p.key)!=null?h:"0";return m===S?0:-1}return d===m||d===""&&m===((x=(b=n[0])==null?void 0:b.key)!=null?x:"0")?0:-1},onFocus:()=>o.set(m),onClick:()=>{let c=r.get();if(e){let d=Array.isArray(c)?[...c]:[];r.set(d.includes(m)?d.filter(p=>p!==m):[...d,m])}else r.set(c===m?"":m)},onKeyDown:c=>vm(c,n,m,r,e),style:{cursor:"pointer",fontSize:c=>Fa(c,"inherit"),display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:at(6),paddingBlock:0,paddingInline:at(2),border:"none",borderRadius:at(1.5),color:c=>xe(c,"shift-13",i),backgroundColor:c=>xe(c,"inherit",i),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:c=>xe(c,"shift-13",i),backgroundColor:c=>xe(c,"hover",i)},"&:active:not([disabled])":{backgroundColor:c=>xe(c,"increase-2",i)},"&[aria-pressed=true]":{backgroundColor:c=>xe(c,"shift-3",t),color:c=>xe(c,"shift-13",t)},"&:focus-visible":{boxShadow:c=>v(c,t)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function oS(n={items:[]}){let{items:r=[],multiple:o=!1,color:e="neutral",accentColor:i="primary"}=n;return P(E({role:"group",_onSchedule:(a,l)=>{let m=Lo(a,"toggleGroupValue",n.value,o?[]:"");a.setContext("toggleGroup",{value:m,multiple:o});let u=Lo(a,"toggleGroupFocusedKey",void 0,null);l[a.tagName]=Ba(r,m,u,o,e,i)}},gm("toggle-items",a=>({update(l){let m=Lo(a,"toggleGroupValue",n.value,l.multiple?[]:""),u=Lo(a,"toggleGroupFocusedKey",void 0,null);a.children.update(Ba(l.items,m,u,l.multiple,l.color,l.accentColor),!!a.domElement,!0)}}),{items:r,multiple:o,color:e,accentColor:i})),{style:{display:"flex",paddingBlock:at(1),paddingInline:at(1),gap:at(1),borderRadius:at(2),fontSize:a=>Fa(a,"inherit"),backgroundColor:a=>xe(a,"inherit",e),color:a=>xe(a,"text",e),outline:a=>`1px solid ${xe(a,"border",e)}`,outlineOffset:"-1px"}})}function iS(n={}){return ma(n)}function lS(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Em,toState as Ka}from"@domphy/core";import{themeColor as Wa,themeDensity as $n,themeSize as xm,themeSpacing as Hn}from"@domphy/theme";function fS(n={}){let{open:r=!1,placement:o="top",content:e="Tooltip Content",openDelay:i,closeDelay:t}=n,a=Ka(o),l=Ka(e),m={span:h=>l.get(h)},{show:u,hide:s,anchorPartial:c,openState:d}=ge({kind:"tooltip",open:r,onDismiss:n.onDismiss,placement:a,content:m,openDelay:i,closeDelay:t}),p={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:h=>Hn($n(h)*1),paddingInline:h=>Hn($n(h)*3),borderRadius:h=>Hn($n(h)*1.5),color:h=>Wa(h,"text"),backgroundColor:h=>Wa(h),fontSize:h=>xm(h,"inherit"),boxShadow:A("low")},$:[na({placement:a,bordered:!1})]};return m.$||(m.$=[]),m.$.push(p),Em(c,{ariaDescribedby:h=>h!=null&&h.elementNode&&d.get(h)?ee("tooltip",h.elementNode):void 0,onMouseEnter:(h,b)=>u(b),onMouseLeave:(h,b)=>s(b),onFocus:(h,b)=>u(b),onBlur:(h,b)=>s(b),onKeyDown:(h,b)=>h.key==="Escape"&&s(b)}),c}import{ElementNode as ja}from"@domphy/core";function qa(n,r){return n.key!==void 0&&n.key!==null?String(n.key):`index-${r}`}function bS(n={}){let{duration:r=300,delay:o=0}=n,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:l=>{l.addHook("Remove",()=>{for(let m of Array.from(i.values()))m();i.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:l=>{e=new Map,!wt()&&l.children.items.forEach((m,u)=>{if(!(m instanceof ja))return;let s=m.domElement;s&&e.set(qa(m,u),s.getBoundingClientRect())})},_onUpdate:l=>{l.children.items.forEach((m,u)=>{var k;if(!(m instanceof ja))return;let s=m.domElement;if(!s)return;let c=qa(m,u),d=e.get(c);if(!d)return;let p=s.getBoundingClientRect(),f=d.left-p.left,h=d.top-p.top;if(Math.abs(f)<.5&&Math.abs(h)<.5)return;(k=i.get(s))==null||k(),s.style.transition="none",s.style.transform=`translate(${f}px, ${h}px)`,s.getBoundingClientRect();let b=requestAnimationFrame(()=>{a.delete(b),s.style.transition=`transform ${r}ms ease ${o}ms`,s.style.transform="translate(0px, 0px)"});a.add(b);let x=!1,O=null,T=()=>{x||(x=!0,O&&(t.delete(O),O=null),i.delete(s),s.removeEventListener("transitionend",S),s.style.transition="",s.style.transform="")},S=C=>{C.propertyName==="transform"&&T()};i.set(s,()=>{x=!0,O&&(clearTimeout(O),t.delete(O),O=null),i.delete(s),s.removeEventListener("transitionend",S)}),s.addEventListener("transitionend",S),O=setTimeout(T,r+o+34),t.add(O)}),e.clear()}}}import{toState as Cm}from"@domphy/core";import{themeColor as Ua,themeSize as km,themeSpacing as wm}from"@domphy/theme";function xS(n={}){var o;let r=Cm((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>km(e,"inherit"),backgroundColor:e=>Ua(e),color:e=>Ua(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:wm(3),listStyleType:"disc",listStylePosition:"outside"}}}function kS(){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{Pm as abbreviation,Am as accordion,Hm as alert,Wm as avatar,Ym as badge,Zm as blockquote,ou as breadcrumb,lu as breadcrumbEllipsis,vu as button,or as buttonGhost,Tu as buttonSwitch,Ru as card,Au as code,cd as combobox,gd as command,bd as commandItem,yd as commandSearch,Td as datePicker,Od as descriptionList,Ad as details,jd as dialog,Jd as divider,rp as drawer,A as elevation,cp as emphasis,pp as empty,hp as errorBoundary,Ep as fab,wp as figure,v as focusRing,Pp as formGroup,Rp as grid,Np as heading,Bp as horizontalRule,jp as icon,Gp as image,ef as inputCheckbox,af as inputColor,uf as inputDateTime,gf as inputFile,xf as inputNumber,Tf as inputOTP,Rf as inputPassword,_f as inputRadio,Kf as inputRange,Gf as inputSearch,th as inputSwitch,lh as inputText,dh as keyboard,gh as label,Eh as link,Dh as linkButton,zh as list,Vh as listItem,Mh as listItemButton,$h as mark,jh as menu,Xh as motion,og as orderedList,lg as pagination,dg as panelSection,yg as paragraph,Cg as popover,na as popoverArrow,Lg as preformated,Vg as progress,Bg as rating,qg as ringProgress,ma as row,Qg as scrollArea,ly as segmented,py as select,Cy as selectBox,Iy as selectItem,zy as selectList,Ny as skeleton,By as small,jy as spinner,Xy as splitter,Qy as splitterHandle,Zy as splitterPanel,ob as stack,lb as steps,db as strong,gb as subscript,vb as superscript,kb as table,Lb as tabs,no as tag,Nb as textarea,Fb as timeline,Kb as timelineItem,Gb as toast,oS as toggleGroup,iS as toolbar,lS as toolbarSpacer,fS as tooltip,bS as transitionGroup,xS as unorderedList,kS as visuallyHidden};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|