@domphy/ui 0.20.2 → 0.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-theme-ui.global.js +4 -4
- 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 +30 -40
- package/dist/index.d.ts +30 -40
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Ar=Object.defineProperty,Br=Object.defineProperties;var Nr=Object.getOwnPropertyDescriptors;var Uo=Object.getOwnPropertySymbols;var Hr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable;var Xo=(n,o,r)=>o in n?Ar(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,V=(n,o)=>{for(var r in o||(o={}))Hr.call(o,r)&&Xo(n,r,o[r]);if(Uo)for(var r of Uo(o))Fr.call(o,r)&&Xo(n,r,o[r]);return n},Ie=(n,o)=>Br(n,Nr(o));import{toState as Jo}from"@domphy/core";import{themeColor as qe,themeSize as Wr,themeSpacing as Kr}from"@domphy/theme";function ts(n={}){var e,i;let o=Jo((e=n.color)!=null?e:"neutral","color"),r=Jo((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=>Wr(t),backgroundColor:t=>qe(t),color:t=>qe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>qe(t,"shift-7",o.get(t)),textUnderlineOffset:Kr(.72),cursor:"help","&:hover":{color:t=>qe(t,"shift-11",r.get(t)),textDecorationColor:t=>qe(t,"shift-9",r.get(t))}}}}import{toState as Zo}from"@domphy/core";import{themeColor as Jt,themeDensity as jr,themeSpacing as Qo}from"@domphy/theme";function as(n={}){var i,t;let{type:o="single"}=n,r=Zo((i=n.color)!=null?i:"neutral","color"),e=Zo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let c=a.domElement;if(!c)return;let s=d=>{let l=d.target.closest("summary");if(!l)return;let m=l.closest("details");!m||m.parentElement!==c||m.open||Array.from(c.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};c.addEventListener("click",s),a.addHook("Remove",()=>c.removeEventListener("click",s))},style:{display:"flex",flexDirection:"column",borderRadius:a=>Qo(jr(a)*1.5),outline:a=>`1px solid ${Jt(a,"border-strong",r.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${Jt(a,"border-strong",r.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${Qo(.5)} solid ${Jt(a,"shift-6",e.get(a))}`}}}}import{toState as Yr}from"@domphy/core";import{themeColor as Zt,themeDensity as en,themeSize as qr,themeSpacing as ut}from"@domphy/theme";function cs(n={}){var r;let o=Yr((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:ut(3),paddingBlock:e=>ut(en(e)*2),paddingInline:e=>ut(en(e)*4),boxShadow:e=>`inset ${ut(1)} 0 0 0 ${Zt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Zt(e,"inherit",o.get(e)),color:e=>Zt(e,"shift-10",o.get(e)),fontSize:e=>qr(e,"inherit")}}}import{toState as Gr}from"@domphy/core";import{themeColor as tn,themeSize as Ur,themeSpacing as on}from"@domphy/theme";function ps(n={}){var r;let o=Gr((r=n.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:on(9),height:on(9),fontSize:e=>Ur(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>tn(e,"inherit",o.get(e)),color:e=>tn(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as nn}from"@domphy/core";import{themeColor as rn,themeSize as Xr,themeSpacing as Qt}from"@domphy/theme";function ys(n={}){var i;let{label:o=999}=n,r=nn(o),e=nn((i=n.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Qt(1),minWidth:Qt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Xr(t,"decrease-1"),borderRadius:Qt(999),backgroundColor:t=>rn(t,"shift-9",e.get(t)),color:t=>rn(t,"shift-0",e.get(t))}}}}import{toState as Jr}from"@domphy/core";import{themeColor as an,themeDensity as ln,themeSize as Zr,themeSpacing as eo}from"@domphy/theme";function vs(n={}){var r;let o=Jr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Zr(e,"inherit"),backgroundColor:e=>an(e,"inherit",o.get(e)),boxShadow:e=>`inset ${eo(1)} 0 0 0 ${an(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>eo(ln(e)*2),paddingInline:e=>eo(ln(e)*4),margin:0}}}import{toState as Qr}from"@domphy/core";import{themeColor as Ge,themeSize as ea,themeSpacing as sn}from"@domphy/theme";function ws(n={}){var e;let{separator:o="/"}=n,r=Qr((e=n.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>ea(i,"inherit"),gap:sn(1),color:i=>Ge(i,"text",r.get(i)),backgroundColor:i=>Ge(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>Ge(i,"muted",r.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>Ge(i,"shift-4",r.get(i)),paddingInlineStart:sn(1)},"& > [aria-current=page]":{color:i=>Ge(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}import{toState as ta}from"@domphy/core";import{themeColor as dt,themeSize as oa,themeSpacing as pt}from"@domphy/theme";function Os(n={}){var r;let o=ta((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>oa(e,"inherit"),paddingInline:pt(1),border:"none",background:"none",cursor:"pointer",color:e=>dt(e,"muted",o.get(e)),borderRadius:pt(1),"&:hover":{color:e=>dt(e,"shift-10",o.get(e)),backgroundColor:e=>dt(e,"hover",o.get(e))},"&:focus-visible":{outline:e=>`${pt(.5)} solid ${dt(e,"shift-6",o.get(e))}`,outlineOffset:pt(.5)}}}}import{toState as la}from"@domphy/core";import{themeColor as F,themeDensity as bt,themeSize as sa,themeSpacing as St}from"@domphy/theme";var ht={small:"decrease-1",medium:"inherit",large:"increase-1"};import{themeColor as na}from"@domphy/theme";function T(n,o="primary"){return`0 0 0 2px ${na(n,"shift-6",o)}`}import{toState as ra}from"@domphy/core";import{themeColor as gt,themeDensity as ft,themeSize as aa,themeSpacing as yt}from"@domphy/theme";var ia={small:.5,medium:1,large:1.5};function cn(n={}){var i,t,a;let o=ra((i=n.color)!=null?i:"neutral","color"),r=ia[(t=n.size)!=null?t:"medium"],e=ht[(a=n.size)!=null?a:"medium"];return{_onInsert:c=>{c.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:c=>aa(c,e),paddingBlock:c=>yt(ft(c)*r),paddingInline:c=>yt(ft(c)*r),borderRadius:c=>yt(ft(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>yt(ft(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>gt(c,"shift-6",o.get(c)),"&:hover:not([disabled]):not([aria-busy=true])":{color:c=>gt(c,"text",o.get(c)),backgroundColor:c=>gt(c,"hover",o.get(c))},"&:focus-visible":{boxShadow:c=>T(c,o.get(c))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:c=>gt(c,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var ca={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Ks(n={}){var a,c,s,d;let o=(a=n.variant)!=null?a:"outline";if(o==="ghost")return cn({color:n.color,size:n.size});let r=la((c=n.color)!=null?c:"primary","color"),e=o==="solid",i=ca[(s=n.size)!=null?s:"medium"],t=ht[(d=n.size)!=null?d:"medium"];return{_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>sa(l,t),paddingBlock:l=>St(bt(l)*i.block),paddingInline:l=>St(bt(l)*i.inline),borderRadius:l=>St(bt(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>St(bt(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${F(l,"border-strong",r.get(l))}`,color:l=>e?F(l,"shift-0",r.get(l)):F(l,"text",r.get(l)),backgroundColor:l=>e?F(l,"shift-9",r.get(l)):F(l,"inherit",r.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?F(l,"shift-0",r.get(l)):F(l,"shift-10",r.get(l)),backgroundColor:l=>e?F(l,"shift-10",r.get(l)):F(l,"hover",r.get(l))},"&:focus-visible":{boxShadow:l=>T(l,r.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>F(l,"shift-2","neutral"),outline:l=>`1px solid ${F(l,"border-strong","neutral")}`,color:l=>F(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as to}from"@domphy/core";import{themeColor as ze,themeSize as ma,themeSpacing as W}from"@domphy/theme";function Gs(n={}){var t,a;let{checked:o=!1}=n,r=to(o),e=to((t=n.color)!=null?t:"neutral","color"),i=to((a=n.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>r.get(c),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>ma(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${ze(c,"border",e.get(c))}`,minWidth:W(12),minHeight:W(6),borderRadius:W(999),paddingLeft:W(7),paddingRight:W(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>ze(c,"inherit",e.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:W(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:W(5),height:W(5),borderRadius:W(999),color:c=>ze(c,"text"),backgroundColor:c=>ze(c,"decrease-2",e.get(c))},"&[aria-checked=true]":{backgroundColor:c=>ze(c,"increase-3",i.get(c)),outline:"none",color:c=>ze(c,"decrease-2"),paddingLeft:W(2),paddingRight:W(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${W(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ua}from"@domphy/core";import{themeColor as Ve,themeDensity as ie,themeSpacing as X}from"@domphy/theme";function Zs(n={}){var r;let o=ua((r=n.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>X(ie(e)*2),backgroundColor:e=>Ve(e,"inherit",o.get(e)),color:e=>Ve(e,"shift-10",o.get(e)),outline:e=>`1px solid ${Ve(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>X(ie(e)*2),paddingInline:e=>X(ie(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>X(ie(e)*4),color:e=>Ve(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>X(ie(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>X(ie(e)*4),color:e=>Ve(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:X(2),paddingBlock:e=>X(ie(e)*2),paddingInline:e=>X(ie(e)*4),borderTop:e=>`1px solid ${Ve(e,"border",o.get(e))}`}}}}import{toState as da}from"@domphy/core";import{themeColor as mn,themeSize as pa,themeSpacing as oo}from"@domphy/theme";function oc(n={}){var r;let o=da((r=n.color)!=null?r:"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=>pa(e,"inherit"),color:e=>mn(e,"text",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:oo(6),paddingInline:oo(1.5),borderRadius:oo(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as ve,themeDensity as xt,themeSize as un,themeSpacing as le}from"@domphy/theme";var ha={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function I(n){return ha[n]}import{behavior as ga,merge as fa,toState as ya}from"@domphy/core";import{autoUpdate as ba,computePosition as Sa,flip as Ca,offset as va,shift as xa}from"@domphy/floating";function Ea(n,o){var P;let{openState:r,placement:e,content:i,keepOpenOnContentHover:t}=o,a=null,c=null,s=null,d=null,l=!1,m=n.domElement,y=n.getRoot(),f={style:{position:"fixed",pointerEvents:"auto",visibility:E=>r.get(E)?"visible":"hidden"},onKeyDown:E=>{E.key==="Escape"&&C()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&C(),_onMount:E=>{var O;if(s=E.domElement,m&&s&&!s.hasAttribute("data-theme")){let j=(O=m.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");j&&s.setAttribute("data-theme",j)}},_portal:E=>{let O=E.domElement.querySelector("#domphy-floating");if(!O){let j={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=E.children.insert(j).domElement}return O}},u=E=>fa(E,f);u(i);let p=()=>{l||(l=!0,d=y.children.insert(i))},h=()=>{p(),m&&s&&(c==null||c(),c=ba(m,s,()=>{Sa(m,s,{placement:e.get(),middleware:[va(12),Ca(),xa()],strategy:"fixed"}).then(({x:E,y:O,placement:j})=>{s&&(Object.assign(s.style,{left:`${E}px`,top:`${O}px`}),e.set(j))})}),r.set(!0))},S=()=>{c==null||c(),c=null,d&&(d.remove(),d=null),s=null,l=!1,r.set(!1)},v=()=>{a&&clearTimeout(a),a=setTimeout(h,100)},C=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},D=E=>{if(!r.get()||!m||!s)return;let O=E.target;!m.contains(O)&&!s.contains(O)&&C()};return(P=y.domElement)==null||P.addEventListener("click",D),{show:v,hide:C,update(E){r=E.openState,e=E.placement,i=E.content,t=E.keepOpenOnContentHover,u(i),d&&d.patch(i)},destroy(){var E;a&&clearTimeout(a),c==null||c(),d==null||d.remove(),(E=y.domElement)==null||E.removeEventListener("click",D)}}}function G(n){let{kind:o,open:r=!1,placement:e}=n,i=ya(r),t=`floating:${o}`,a=d=>{var l;return(l=d==null?void 0:d.getBehavior(t))==null?void 0:l.show()},c=d=>{var l;return(l=d==null?void 0:d.getBehavior(t))==null?void 0:l.hide()},s=V({onKeyDown:(d,l)=>d.key==="Escape"&&c(l)},ga(t,Ea,{openState:i,placement:e,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover}));return{show:a,hide:c,anchorPartial:s}}import{toState as ka}from"@domphy/core";import{themeColor as Ct,themeSize as wa,themeSpacing as J}from"@domphy/theme";var Ta='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function vt(n={}){var e;let{removable:o=!1}=n,r=ka((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:Ta,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:J(1),width:J(4),height:J(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ct(a,"shift-4",r.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:J(6),paddingBlock:0,borderRadius:J(1),paddingInlineStart:J(2),paddingInlineEnd:o?J(1):J(2),gap:J(2),fontSize:i=>wa(i,"inherit"),backgroundColor:i=>Ct(i,"inherit",r.get(i)),color:i=>Ct(i,"text",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Ct(i,"border-strong",r.get(i))}`}}}function yc(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=ro(n.value),c=ro(i),{show:s,hide:d,anchorPartial:l}=G({kind:"combobox",open:c,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&d(S),dataTone:"shift-14",style:{backgroundColor:h=>ve(h,"inherit"),borderRadius:h=>le(xt(h)*2),outline:h=>`1px solid ${ve(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")}};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:le(6),marginInlineStart:le(2),fontSize:h=>un(h,"inherit"),color:h=>ve(h,"text",e),backgroundColor:h=>ve(h,"inherit",e)},f;if(n.input){let h={onFocus:(S,v)=>s(v),style:y,_key:"combobox-input"};no(n.input,h),f=n.input}else f={input:null,onFocus:(h,S)=>s(S),value:h=>(a.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=a.get(h),v=Array.isArray(S)?S:[S],D=o.filter(P=>v.includes(P.value)).map(P=>({span:P.label,$:[vt({color:e,removable:!0})],_key:P.value,_onRemove:E=>{let O=a.get(),Ce=(Array.isArray(O)?O:[O]).filter(re=>re!==P.value);t?a.set(Ce):a.set(Ce[0])}}));return D.push(f),D},style:{display:"flex",flexWrap:"wrap",gap:le(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:le(32),outlineOffset:"-1px",outline:h=>`1px solid ${ve(h,"border-strong","neutral")}`,paddingBlock:h=>le(xt(h)*1),paddingInline:h=>le(xt(h)*1),borderRadius:h=>le(xt(h)*1.5),fontSize:h=>un(h,"inherit"),color:h=>ve(h,"text",e),backgroundColor:h=>ve(h,"inherit",e)}};return no(l,p),l}import{merge as Da,toState as Pa}from"@domphy/core";import{themeColor as Z,themeDensity as Et,themeSize as dn,themeSpacing as $e}from"@domphy/theme";function vc(){return{_onSchedule:(n,o)=>{Da(o,{_context:{command:{query:Pa("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function xc(n={}){let{color:o="neutral",accentColor:r="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:{fontFamily:"inherit",fontSize:e=>dn(e,"inherit"),paddingInline:e=>$e(Et(e)*3),paddingBlock:e=>$e(Et(e)*2),border:"none",borderBottom:e=>`1px solid ${Z(e,"border",o)}`,outline:"none",color:e=>Z(e,"shift-10",o),backgroundColor:e=>Z(e,"inherit",o),"&::placeholder":{color:e=>Z(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>Z(e,"shift-6",r)}}}}function Ec(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var d,l;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?l:"",c=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};c(i.query.get());let s=i.query.addListener(c);e.addHook("Remove",s)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>dn(e,"inherit"),height:e=>$e(6+Et(e)*2),paddingInline:e=>$e(Et(e)*3),border:"none",outline:"none",color:e=>Z(e,"text",o),backgroundColor:e=>Z(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>Z(e,"hover",o)},"&:focus-visible":{outline:e=>`${$e(.5)} solid ${Z(e,"shift-6",r)}`,outlineOffset:`-${$e(.5)}`}}}}import{merge as Oa,toState as Q}from"@domphy/core";import{themeColor as $,themeDensity as La,themeSize as Re,themeSpacing as R}from"@domphy/theme";var _=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),xe=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),Ue=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),io=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,lo=(n,o)=>xe(n,-((n.getDay()-o+7)%7));function Ia(n){var o,r;try{let e=new Intl.Locale(n),i=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function Oc(n={}){var jo,Yo,qo,Go;let{mode:o="single",time:r=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:s}=n,d=(jo=n.weekStartsOn)!=null?jo:Ia(a),l=Q((Yo=n.accentColor)!=null?Yo:"primary","accentColor"),m=Q((qo=n.placement)!=null?qo:"bottom-start"),y=Q((Go=n.value)!=null?Go:o==="range"?[null,null]:null),f=s?y.addListener(g=>s(g)):null,u=(()=>{let g=y.get(),b=o==="range"?g==null?void 0:g[0]:g;return b instanceof Date?b:new Date})(),p=Q(u.getFullYear(),"viewYear"),h=Q(u.getMonth(),"viewMonth"),S=Q(_(u),"focused"),v=Q(null,"hovered"),C=Q(u.getHours(),"hour"),D=Q(u.getMinutes(),"minute"),P=null,E=new Intl.DateTimeFormat(a,V({dateStyle:"medium"},r?{timeStyle:"short"}:{})),O=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),j=new Intl.DateTimeFormat(a,{weekday:"short"}),Ce=new Intl.DateTimeFormat(a,{dateStyle:"full"}),re=g=>g?E.format(g):"",xr=g=>{if(c)return c(g);if(o==="range"){let[b,x]=g!=null?g:[null,null];return b?`${re(b)} \u2013 ${re(x)}`:""}return re(g)},Er=Array.from({length:7},(g,b)=>j.format(new Date(2023,0,1+(b+d)%7))),Ho=g=>!!e&&_(g)<_(e)||!!i&&_(g)>_(i)||!!t&&t(g),ae=g=>{if(!r)return _(g);let b=_(g);return b.setHours(C.get(),D.get(),0,0),b},Fo=g=>{var k;if(Ho(g))return;if(o==="single"){y.set(ae(g)),r||Ut();return}let[b,x]=(k=y.get())!=null?k:[null,null];!b||b&&x?y.set([ae(g),null]):_(g)<_(b)?(y.set([ae(g),ae(b)]),r||Ut()):(y.set([b,ae(g)]),r||Ut())},kr=()=>{var g;if(r)if(o==="single"){let b=y.get();b&&y.set(ae(b))}else{let[b,x]=(g=y.get())!=null?g:[null,null];y.set([b&&ae(b),x&&ae(x)])}},wr=(g,b)=>{var Le;if(o!=="range")return!1;let[x,k]=(Le=y.get(b))!=null?Le:[null,null],L=k!=null?k:v.get(b);if(!x||!L)return!1;let w=_(x)<=_(L)?x:L,H=_(x)<=_(L)?L:x,B=_(g);return B>=_(w)&&B<=_(H)},Tr=(g,b)=>{let x=y.get(b);if(o==="range"){let[k,L]=x!=null?x:[null,null];return Ue(g,k)||Ue(g,L)}return Ue(g,x)},mt=g=>{p.set(g.getFullYear()),h.set(g.getMonth())},Wo=g=>{let b=ao(new Date(p.get(),h.get(),1),g);mt(b)},Ko=g=>p.set(p.get()+g),qt=()=>{setTimeout(()=>{var g;(g=P==null?void 0:P.querySelector(`[data-date="${io(S.get())}"]`))==null||g.focus()},0)},Dr=zr(),{show:Pr,hide:Or,anchorPartial:Gt}=G({kind:"datePicker",open:!1,placement:m,content:Dr});function Ut(){Or()}Gt.onClick=()=>{};let Lr={type:"text",readonly:!0,value:g=>xr(y.get(g)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(g,b)=>{Xt(b)},onFocus:(g,b)=>{Xt(b)},onKeyDown:(g,b)=>{let x=g.key;(x==="ArrowDown"||x==="Enter")&&(g.preventDefault(),Xt(b))},_onMount:g=>f&&g.addHook("Remove",()=>{f()})};function Xt(g){var x;let b=(x=Ir())!=null?x:new Date;S.set(_(b)),mt(b),Pr(g),qt()}function Ir(){var b;let g=y.get();return o==="range"?(b=g==null?void 0:g[0])!=null?b:null:g!=null?g:null}return Oa(Gt,Lr),Gt;function zr(){let g=(w,H,B)=>({button:w,type:"button",ariaLabel:H,onClick:B,style:za()}),b={div:[g("\xAB","Previous year",()=>Ko(-1)),g("\u2039","Previous month",()=>Wo(-1)),{div:w=>O.format(new Date(p.get(w),h.get(w),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:w=>Re(w)}},g("\u203A","Next month",()=>Wo(1)),g("\xBB","Next year",()=>Ko(1))],style:{display:"flex",alignItems:"center",gap:R(1),marginBottom:R(2)}},x={div:Er.map((w,H)=>({div:w,style:{textAlign:"center",fontSize:B=>Re(B,"decrease-1"),fontWeight:"600",color:B=>$(B,"shift-7"),paddingBlock:R(1)},_key:H})),role:"row",style:pn()},k={div:w=>Vr(w),role:"grid",ariaLabel:"Calendar",onKeyDown:Mr,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:R(.5)}},L=[b,x,k];return r&&L.push(Rr()),L.push(_r()),{div:L,role:"dialog",ariaModal:"false",_onMount:w=>{P=w.domElement},style:{minWidth:R(70),padding:R(3),borderRadius:w=>R(La(w)*2),backgroundColor:w=>$(w,"base"),color:w=>$(w,"shift-10"),border:w=>`1px solid ${$(w,"border-strong")}`,boxShadow:I("medium")}}}function Vr(g){let b=new Date(p.get(g),h.get(g),1),x=h.get(g),k=lo(b,d),L=[];for(let w=0;w<6;w++){let H=[];for(let B=0;B<7;B++){let Le=xe(k,w*7+B);H.push($r(Le,x,g))}L.push({div:H,role:"row",style:pn(),_key:w})}return L}function $r(g,b,x){let k=Ho(g),L=Tr(g,x),w=wr(g,x),H=g.getMonth()!==b,B=Ue(g,S.get(x)),Le=Ue(g,new Date);return{button:String(g.getDate()),type:"button",role:"gridcell",tabIndex:B?0:-1,ariaSelected:L,ariaDisabled:k,disabled:k,ariaLabel:Ce.format(g),dataDate:io(g),onClick:()=>Fo(g),onMouseEnter:()=>o==="range"&&v.set(g),style:{appearance:"none",border:"none",cursor:k?"not-allowed":"pointer",aspectRatio:"1",borderRadius:R(1),fontSize:z=>Re(z),fontFamily:"inherit",opacity:k?.35:H?.5:1,backgroundColor:z=>L?$(z,"shift-7",l.get(z)):w?$(z,"hover",l.get(z)):"transparent",color:z=>L?$(z,"shift-0",l.get(z)):$(z,"text"),outline:Le?z=>`1px solid ${$(z,"shift-6",l.get(z))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:z=>L?$(z,"shift-7",l.get(z)):$(z,"shift-3",l.get(z))},"&:focus-visible":{outline:z=>`2px solid ${$(z,"shift-6",l.get(z))}`}},_key:io(g)}}function Rr(){let g=(b,x,k)=>({select:Array.from({length:b},(L,w)=>({option:String(w).padStart(2,"0"),value:String(w),selected:H=>x.get(H)===w,_key:w})),ariaLabel:k,onChange:L=>{x.set(Number(L.target.value)),kr()},style:Va()});return{div:[g(24,C,"Hour"),{span:":",style:{fontWeight:"600"}},g(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:R(1),marginTop:R(3)}}}function _r(){let g=(b,x)=>({button:b,type:"button",onClick:x,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:k=>Re(k,"decrease-1"),color:k=>$(k,"muted",l.get(k)),padding:R(1)}});return{div:[g("Today",()=>{let b=new Date;S.set(_(b)),mt(b),qt()}),g("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:R(2),paddingTop:R(2),borderTop:b=>`1px solid ${$(b,"border")}`}}}function Mr(g){let b=g,x=S.get(),k=null;switch(b.key){case"ArrowLeft":k=xe(x,-1);break;case"ArrowRight":k=xe(x,1);break;case"ArrowUp":k=xe(x,-7);break;case"ArrowDown":k=xe(x,7);break;case"Home":k=lo(x,d);break;case"End":k=xe(lo(x,d),6);break;case"PageUp":k=ao(x,b.shiftKey?-12:-1);break;case"PageDown":k=ao(x,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Fo(x);return;default:return}b.preventDefault(),S.set(k),mt(k),qt()}}function pn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:R(.5)}}function za(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>Re(n),color:n=>$(n,"muted"),width:R(7),height:R(7),borderRadius:R(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function Va(){return{fontFamily:"inherit",fontSize:n=>Re(n),padding:R(1),borderRadius:R(1),border:n=>`1px solid ${$(n,"border-strong")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"text")}}import{toState as $a}from"@domphy/core";import{themeColor as hn,themeSize as gn,themeSpacing as fn}from"@domphy/theme";function $c(n={}){var r;let o=$a((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${fn(24)}, max-content) 1fr`,columnGap:fn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>gn(e,"inherit"),color:e=>hn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>gn(e,"inherit"),color:e=>hn(e,"text",o.get(e))}}}}import{toState as yn}from"@domphy/core";import{themeColor as se,themeDensity as Xe,themeSize as bn,themeSpacing as M}from"@domphy/theme";function Ac(n={}){var i,t;let{duration:o=240}=n,r=yn((i=n.color)!=null?i:"neutral","color"),e=yn((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=>bn(a,"inherit"),color:a=>se(a,"text",r.get(a)),backgroundColor:a=>se(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>se(a,"shift-2",r.get(a)),color:a=>se(a,"shift-10",r.get(a)),fontSize:a=>bn(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:M(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>M(Xe(a)*4),height:M(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:M(2),height:M(2),flexShrink:0,marginTop:`-${M(.5)}`,borderInlineEnd:a=>`${M(.5)} solid ${se(a,"shift-9",r.get(a))}`,borderBottom:a=>`${M(.5)} solid ${se(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>se(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>M(Xe(a)*2),outlineOffset:`-${M(.5)}`,outline:a=>`${M(.5)} solid ${se(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>M(Xe(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:M(250),opacity:1,paddingTop:a=>M(Xe(a)*1),paddingBottom:a=>M(Xe(a)*3)}}}}import{toState as Ra}from"@domphy/core";import{themeColor as so,themeDensity as Sn,themeSize as _a,themeSpacing as Cn}from"@domphy/theme";var Je=0;function kt(){Je++,Je===1&&(document.body.style.overflow="hidden")}function _e(){Je=Math.max(0,Je-1),Je===0&&(document.body.style.overflow="")}var vn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function jc(n={}){let{color:o="neutral",open:r=!1}=n,e=Ra(r),i=null,t=!1,a=!1,c=s=>{t=!1,typeof s.close=="function"&&s.close(),s.style.visibility="hidden",s.style.pointerEvents="none",a&&(_e(),a=!1),i==null||i.focus(),i=null};return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(s,d)=>{if(s.target!==d.domElement)return;let l=d.domElement.getBoundingClientRect();s.clientX>=l.left&&s.clientX<=l.right&&s.clientY>=l.top&&s.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(s,d)=>{t&&s.target===d.domElement&&s.propertyName==="opacity"&&c(d.domElement)},_onMount:s=>{let d=s.domElement;d.setAttribute("aria-modal","true");let l=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(vn)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!h.length){p.preventDefault();return}let S=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===S||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),S.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let f=p=>{p?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(kt(),a=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(vn);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),l=setTimeout(()=>{l=null,t&&c(d)},350))};f(e.get());let u=e.addListener(f);s.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),u(),d.removeEventListener("cancel",y),a&&(_e(),a=!1),d.removeEventListener("keydown",m),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:s=>_a(s,"inherit"),color:s=>so(s,"shift-10",o),backgroundColor:s=>so(s,"inherit",o),border:"none",borderRadius:s=>Cn(Sn(s)*2),padding:s=>Cn(Sn(s)*3),boxShadow:I("high"),"&::backdrop":{backgroundColor:s=>so(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Ma}from"@domphy/core";import{themeColor as wt,themeSize as Aa,themeSpacing as Ba}from"@domphy/theme";function Uc(n={}){var r;let o=Ma((r=n.color)!=null?r:"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:Ba(2),fontSize:e=>Aa(e,"inherit"),backgroundColor:e=>wt(e),color:e=>wt(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>wt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>wt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Na}from"@domphy/core";import{themeColor as co,themeDensity as Ha,themeSize as Fa,themeSpacing as mo}from"@domphy/theme";var uo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},xn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Ze=n=>n==="left"||n==="right";function En(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function tm(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:i}=n,t=Na(r),a=e==="start"||e==="end",c=En(e,!1),s=Ze(c)?mo(80):mo(64),d=i!=null?i:s;return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(l,m)=>{l.target===m.domElement&&t.set(!1)},_onMount:l=>{let m=l.domElement;m.setAttribute("aria-modal","true");let y=E=>{E.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let f=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=En(e,f);a&&(m.style.transform=uo[u],m.style.margin=xn[u],m.style.width=Ze(u)?d:"100dvw",m.style.height=Ze(u)?"100dvh":d);let p=!1,h=!1,S=null,v=()=>{S=null,p&&(p=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",h&&(_e(),h=!1))},C=E=>{E.target===m&&E.propertyName==="transform"&&v()};m.addEventListener("transitionend",C);let D=E=>{E?(p=!1,m.style.visibility="visible",m.style.pointerEvents="auto",typeof m.showModal=="function"&&m.showModal(),h||(kt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=uo[u],S=setTimeout(v,350))};D(t.get());let P=t.addListener(D);l.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),P(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",C),h&&(_e(),h=!1)})},style:{transform:uo[c],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>Fa(l,"inherit"),color:l=>co(l,"shift-10",o),backgroundColor:l=>co(l,"inherit",o),border:"none",padding:l=>mo(Ha(l)*3),margin:xn[c],width:Ze(c)?d:"100dvw",height:Ze(c)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:I("high"),"&::backdrop":{backgroundColor:l=>co(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Wa}from"@domphy/core";import{themeColor as Ka,themeSize as ja}from"@domphy/theme";function am(n={}){var r;let o=Wa((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>ja(e,"inherit"),fontStyle:"italic",color:e=>Ka(e,"shift-10",o.get(e))}}}import{toState as Ya}from"@domphy/core";import{themeColor as kn,themeSpacing as po}from"@domphy/theme";function cm(n={}){var r;let o=Ya((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:po(3),paddingBlock:po(12),paddingInline:po(6),textAlign:"center",color:e=>kn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>kn(e,"shift-5",o.get(e))}}}}function um(n={}){return{_onError:(o,r,e)=>{var t,a;(t=n.onError)==null||t.call(n,r);let i=typeof n.fallback=="function"?n.fallback(r,e):(a=n.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}import{toState as qa}from"@domphy/core";import{themeColor as ho,themeSize as Ga,themeSpacing as Ua}from"@domphy/theme";var Xa={small:8,medium:10,large:14};function ym(n={}){var e,i;let o=qa((e=n.color)!=null?e:"primary","color"),r=Ua(Xa[(i=n.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:t=>Ga(t,"inherit"),backgroundColor:t=>ho(t,"shift-9",o.get(t)),color:t=>ho(t,"shift-0",o.get(t)),boxShadow:I("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>ho(t,"shift-10",o.get(t)),boxShadow:I("medium")},"&:focus-visible":{boxShadow:t=>`${I("medium")}, ${T(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ja}from"@domphy/core";import{themeColor as wn,themeSize as Za,themeSpacing as Tt}from"@domphy/theme";function vm(n={}){var r;let o=Ja((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Tt(2),marginInline:0,marginTop:Tt(3),marginBottom:Tt(3),color:e=>wn(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Tt(2)},"& figcaption":{fontSize:e=>Za(e,"decrease-1"),color:e=>wn(e,"muted",o.get(e)),lineHeight:1.45}}}}import{toState as Qa}from"@domphy/core";import{themeColor as Dt,themeDensity as Me,themeSize as go,themeSpacing as ee}from"@domphy/theme";function wm(n={}){var i;let{layout:o="horizontal"}=n,r=Qa((i=n.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>ee(Me(t)*3),paddingBlock:t=>ee(Me(t)*3),border:"none",borderRadius:t=>ee(Me(t)*2),fontSize:t=>go(t,"inherit"),backgroundColor:t=>Dt(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ee(4),rowGap:ee(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>go(t,"inherit"),fontWeight:600,paddingBlock:t=>ee(Me(t)*1),borderRadius:t=>ee(Me(t)*2),color:t=>Dt(t,"text",r.get(t)),backgroundColor:t=>Dt(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ee(Me(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ee(2)} * -1)`,fontSize:t=>go(t,"decrease-1"),color:t=>Dt(t,"text",r.get(t))}}}}import{toState as ei}from"@domphy/core";import{themeColor as ti,themeSize as oi,themeSpacing as ni}from"@domphy/theme";var ri={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Om(n={}){var r;let o=ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>ti(e,"shift-11",o.get(e)),marginTop:0,marginBottom:ni(2),fontSize:e=>{let i=ri[e.elementNode.tagName]||"inherit";return oi(e,i)}}}}import{toState as ai}from"@domphy/core";import{themeColor as ii,themeSpacing as Tn}from"@domphy/theme";function Vm(n={}){var r;let o=ai((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:Tn(3),marginBottom:Tn(3),backgroundColor:e=>ii(e,"shift-4",o.get(e))}}}import{toState as li}from"@domphy/core";import{themeColor as si,themeSize as ci,themeSpacing as Dn}from"@domphy/theme";function Mm(n={}){var r;let o=li((r=n.color)!=null?r:"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:Dn(4),height:Dn(4),flexShrink:"0",fontSize:e=>ci(e),backgroundColor:"transparent",color:e=>si(e,"text",o.get(e))}}}import{toState as mi}from"@domphy/core";import{themeColor as ui,themeSpacing as di}from"@domphy/theme";function Hm(n={}){var r;let o=mi((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:di(2),backgroundColor:e=>ui(e,"inherit",o.get(e))}}}import{toState as Pn}from"@domphy/core";import{themeColor as N,themeSize as pi,themeSpacing as ce}from"@domphy/theme";function jm(n={}){var e,i;let o=Pn((e=n.color)!=null?e:"neutral","color"),r=Pn((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=>pi(t,"inherit"),display:"inline-flex",position:"relative",width:ce(6),height:ce(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:ce(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"border-strong",o.get(t))}`,color:t=>N(t,"text",o.get(t)),width:ce(4),height:ce(4)},"&:hover::before":{backgroundColor:t=>N(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${N(t,"shift-6",r.get(t))}`,backgroundColor:t=>N(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>N(t,"shift-7",r.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${ce(.5)} solid ${N(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${N(t,"shift-6",r.get(t))}`,backgroundColor:t=>N(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>N(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>N(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:ce(1.5),outline:t=>`${ce(.5)} solid ${N(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>N(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as On,themeDensity as Qe,themeSize as hi,themeSpacing as et}from"@domphy/theme";function Gm(n={}){return{type:"color",_onSchedule:(o,r)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),r.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>hi(o,"inherit"),paddingBlock:o=>et(Qe(o)*1),paddingInline:o=>et(Qe(o)*1),blockSize:o=>et(6+Qe(o)*2),inlineSize:o=>et(6+Qe(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>et(Qe(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>On(o,"shift-2","neutral"),outline:o=>`1px solid ${On(o,"border-strong","neutral")}`}}}}import{toState as Ln}from"@domphy/core";import{themeColor as me,themeDensity as fo,themeSize as gi,themeSpacing as Pt}from"@domphy/theme";function Qm(n={}){var i,t;let{mode:o="datetime-local"}=n,r=Ln((i=n.color)!=null?i:"neutral","color"),e=Ln((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=o},style:{fontFamily:"inherit",fontSize:a=>gi(a,"inherit"),lineHeight:"inherit",color:a=>me(a,"text",r.get(a)),backgroundColor:a=>me(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${me(a,"border-strong",r.get(a))}`,borderRadius:a=>Pt(fo(a)*1.5),paddingInline:a=>Pt(fo(a)*3),height:a=>Pt(6+fo(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 ${me(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>T(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>me(a,"muted","neutral"),backgroundColor:a=>me(a,"shift-2","neutral"),outline:a=>`1px solid ${me(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${Pt(.5)} solid ${me(a,"shift-6","error")}`}}}}import{toState as In}from"@domphy/core";import{themeColor as Y,themeDensity as Ot,themeSize as fi,themeSpacing as Ee}from"@domphy/theme";function ru(n={}){var e,i;let o=In((e=n.color)!=null?e:"neutral","color"),r=In((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>fi(t,"inherit"),lineHeight:"inherit",color:t=>Y(t,"text",o.get(t)),backgroundColor:t=>Y(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Y(t,"border-strong",o.get(t))}`,borderRadius:t=>Ee(Ot(t)*1.5),height:t=>Ee(6+Ot(t)*2),paddingInline:t=>Ee(Ot(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Ee(Ot(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:Ee(1),height:Ee(6),paddingInline:Ee(2),cursor:"pointer",color:t=>Y(t,"shift-11",o.get(t)),backgroundColor:t=>Y(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${Y(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>Y(t,"muted","neutral"),outline:t=>`1px solid ${Y(t,"border-strong","neutral")}`,backgroundColor:t=>Y(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>Y(t,"muted","neutral"),backgroundColor:t=>Y(t,"shift-3","neutral")}}}}import{toState as zn}from"@domphy/core";import{themeColor as ke,themeDensity as Lt,themeSize as yi,themeSpacing as tt}from"@domphy/theme";function cu(n={}){var e,i;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:tt(10),paddingInlineStart:t=>tt(Lt(t)*3),paddingInlineEnd:t=>tt(Lt(t)*1.5),paddingBlock:t=>tt(Lt(t)*1),borderRadius:t=>tt(Lt(t)*1.5),fontSize:t=>yi(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ke(t,"border-strong",o.get(t))}`,color:t=>ke(t,"text",o.get(t)),backgroundColor:t=>ke(t,"inherit",o.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 ${ke(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>ke(t,"shift-2","neutral"),outline:t=>`1px solid ${ke(t,"border-strong","neutral")}`,color:t=>ke(t,"muted","neutral")}}}}import{toState as yo}from"@domphy/core";import{themeColor as It,themeDensity as zt,themeSize as bi,themeSpacing as Vt}from"@domphy/theme";var Si='<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>',Ci='<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>';function hu(n={}){var i,t;let o=yo((i=n.color)!=null?i:"neutral","color"),r=yo((t=n.accentColor)!=null?t:"primary","accentColor"),e=yo(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let c={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},s={button:d=>e.get(d)?Ci:Si,type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(c),a.children.insert(s)},style:{display:"flex",alignItems:"center",gap:a=>Vt(zt(a)*1),paddingBlock:a=>Vt(zt(a)*1),paddingInline:a=>Vt(zt(a)*3),borderRadius:a=>Vt(zt(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${It(a,"border-strong",o.get(a))}`,color:a=>It(a,"text",o.get(a)),backgroundColor:a=>It(a,"inherit",o.get(a)),fontSize:a=>bi(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${It(a,"shift-5",r.get(a))}`},"&:focus-within":{boxShadow:a=>T(a,r.get(a))}}}}import{themeSpacing as Vn}from"@domphy/theme";function yu(){return{style:{display:"flex",alignItems:"center",gap:Vn(2),"& > *":{minWidth:`${Vn(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=a=>{let c=r(),s=a.target,d=c.indexOf(s);s.value&&d<c.length-1&&c[d+1].focus()},i=a=>{let c=r(),s=a.target,d=c.indexOf(s);a.key==="Backspace"&&!s.value&&d>0&&c[d-1].focus(),a.key==="ArrowLeft"&&d>0&&c[d-1].focus(),a.key==="ArrowRight"&&d<c.length-1&&c[d+1].focus()},t=a=>{var y,f,u;a.preventDefault();let c=(f=(y=a.clipboardData)==null?void 0:y.getData("text"))!=null?f:"",s=r(),d=s.indexOf(a.target),l=d===-1?0:d;[...c].forEach((p,h)=>{s[l+h]&&(s[l+h].value=p)});let m=Math.min(l+c.length-1,s.length-1);(u=s[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}import{toState as $n}from"@domphy/core";import{themeColor as ue,themeSize as vi,themeSpacing as ot}from"@domphy/theme";function vu(n={}){var e,i;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((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=>vi(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:ot(6),height:ot(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 ${ue(t,"border-strong",o.get(t))}`,color:t=>ue(t,"text",o.get(t)),width:ot(4),height:ot(4)},"&:hover::before":{backgroundColor:t=>ue(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${ue(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>ue(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>ue(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${ot(.5)} solid ${ue(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>ue(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Rn}from"@domphy/core";import{themeColor as $t,themeSpacing as q}from"@domphy/theme";function wu(n={}){var e,i;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((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",width:"100%",margin:0,padding:0,height:q(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:q(1.5),borderRadius:q(999),backgroundColor:t=>$t(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:q(4),height:q(4),borderRadius:q(999),border:"none",marginTop:`calc((${q(1.5)} - ${q(4)}) / 2)`,backgroundColor:t=>$t(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>$t(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${q(.5)} solid ${$t(t,"shift-6",r.get(t))}`,outlineOffset:q(1),borderRadius:q(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as _n}from"@domphy/core";import{themeColor as de,themeDensity as bo,themeSize as xi,themeSpacing as Rt}from"@domphy/theme";function Lu(n={}){var e,i;let o=_n((e=n.color)!=null?e:"neutral","color"),r=_n((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>xi(t,"inherit"),lineHeight:"inherit",color:t=>de(t,"text",o.get(t)),backgroundColor:t=>de(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${de(t,"border-strong",o.get(t))}`,borderRadius:t=>Rt(bo(t)*1.5),minWidth:Rt(32),paddingInline:t=>Rt(bo(t)*3),paddingBlock:t=>Rt(bo(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>de(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${de(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>de(t,"muted","neutral"),backgroundColor:t=>de(t,"shift-2","neutral"),outline:t=>`1px solid ${de(t,"border-strong","neutral")}`}}}}import{toState as Ei}from"@domphy/core";import{themeColor as So,themeSize as Mn,themeSpacing as te}from"@domphy/theme";function $u(n={}){var r;let o=Ei((r=n.accentColor)!=null?r:"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=>Mn(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:te(9),height:te(6),cursor:"pointer",margin:"0",paddingBlock:te(1),"&:checked":{"&::before":{backgroundColor:e=>So(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${te(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:te(3),height:te(3),borderRadius:te(999),left:te(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>So(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:te(999),display:"inline-block",fontSize:e=>Mn(e,"inherit"),lineHeight:1,backgroundColor:e=>So(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as An}from"@domphy/core";import{themeColor as K,themeDensity as Co,themeSize as ki,themeSpacing as we}from"@domphy/theme";function Bu(n={}){var e,i;let o=An((e=n.color)!=null?e:"neutral","color"),r=An((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:we(10),paddingInline:t=>we(Co(t)*3),paddingBlock:t=>we(Co(t)*1),borderRadius:t=>we(Co(t)*1.5),fontSize:t=>ki(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${K(t,"border-strong",o.get(t))}`,color:t=>K(t,"text",o.get(t)),backgroundColor:t=>K(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>K(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>K(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${K(t,"shift-5",r.get(t))}`},"&:focus-visible":{boxShadow:t=>T(t,r.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>K(t,"shift-2","neutral"),outline:t=>`1px solid ${K(t,"border-strong","neutral")}`,color:t=>K(t,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${we(.5)} solid ${K(t,"shift-6","warning")}`}}}}import{toState as wi}from"@domphy/core";import{themeColor as vo,themeSize as Ti,themeSpacing as xo}from"@domphy/theme";function Wu(n={}){var r;let o=wi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Ti(e,"inherit"),color:e=>vo(e,"text",o.get(e)),backgroundColor:e=>vo(e,"inherit",o.get(e)),paddingBlock:xo(.5),paddingInline:xo(1.5),borderRadius:xo(1),outline:e=>`1px solid ${vo(e,"border-strong",o.get(e))}`}}}import{toState as Bn}from"@domphy/core";import{themeColor as Eo,themeSize as Di,themeSpacing as Pi}from"@domphy/theme";function qu(n={}){var e,i;let o=Bn((e=n.color)!=null?e:"neutral","color"),r=Bn((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:Pi(2),fontSize:t=>Di(t,"inherit"),color:t=>Eo(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Eo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Eo(t,"muted","neutral")}}}}import{toState as Nn}from"@domphy/core";import{themeColor as Ae,themeSize as Oi,themeSpacing as ko}from"@domphy/theme";function Ju(n={}){var e,i;let o=Nn((e=n.color)!=null?e:"primary","color"),r=Nn((i=n.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>Oi(t,"inherit"),backgroundColor:t=>Ae(t),color:t=>Ae(t,"text",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ae(t,"text",r.get(t))},"&:hover:not([disabled])":{color:t=>Ae(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:ko(1),outlineOffset:ko(1),outline:t=>`${ko(.5)} solid ${Ae(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Ae(t,"muted","neutral")}}}}import{toState as Li}from"@domphy/core";import{themeColor as pe,themeDensity as _t,themeSize as Ii,themeSpacing as Mt}from"@domphy/theme";function od(n={}){var r;let o=Li((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:e=>Ii(e,"inherit"),textDecoration:"none",paddingBlock:e=>Mt(_t(e)*1),paddingInline:e=>Mt(_t(e)*3),borderRadius:e=>Mt(_t(e)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Mt(_t(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${pe(e,"border-strong",o.get(e))}`,color:e=>pe(e,"text",o.get(e)),backgroundColor:e=>pe(e,"inherit",o.get(e)),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>pe(e,"shift-10",o.get(e)),backgroundColor:e=>pe(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>T(e,o.get(e))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>pe(e,"shift-2","neutral"),outline:e=>`1px solid ${pe(e,"border-strong","neutral")}`,color:e=>pe(e,"muted","neutral")}}}}import{toState as zi}from"@domphy/core";import{themeColor as nt,themeDensity as Te,themeSize as Hn,themeSpacing as De}from"@domphy/theme";function id(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function ld(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>De(Te(r)*2),paddingBlock:r=>De(o?1:Te(r)*2),paddingInline:r=>De(Te(r)*3),fontSize:r=>Hn(r,"inherit")}}}function sd(n={}){var i,t;let o=zi((i=n.color)!=null?i:"neutral","color"),r=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>De(Te(a)*2),paddingBlock:a=>De(e?1:Te(a)*2),paddingInline:a=>De(Te(a)*3),fontSize:a=>Hn(a,"inherit"),color:a=>nt(a,"text",o.get(a)),borderRadius:a=>De(Te(a)*1.5),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>nt(a,"hover",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>nt(a,"shift-3",r),color:a=>nt(a,"shift-12",r)},"&:focus-visible":{outline:a=>`2px solid ${nt(a,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Vi}from"@domphy/core";import{themeColor as Fn,themeSize as $i,themeSpacing as wo}from"@domphy/theme";function dd(n={}){var r;let o=Vi((r=n.accentColor)!=null?r:"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=>$i(e,"inherit"),color:e=>Fn(e,"text",o.get(e)),backgroundColor:e=>Fn(e,"inherit",o.get(e)),height:wo(6),borderRadius:wo(1),paddingInline:wo(1.5)}}}import{toState as Ri}from"@domphy/core";import{themeColor as he,themeDensity as rt,themeSize as Wn,themeSpacing as ge}from"@domphy/theme";function yd(n={items:[]}){var a;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:i="primary"}=n,t=Ri((a=n.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(c,s)=>{if(o.length===0)return;let d=c.nodeId,l=o.map((m,y)=>{var u;let f=(u=m.key)!=null?u:y;return Ie(V({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:f,type:"button",id:`menuitem${d}${f}`,role:"menuitem"},r?{ariaCurrent:p=>t.get(p)===f||void 0}:{}),{onClick:()=>{var p;r&&t.set(f),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var D;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let S=o.map((P,E)=>{var O;return(O=P.key)!=null?O:E}),v=S.indexOf(f),C=v;h==="ArrowDown"?C=(v+1)%S.length:h==="ArrowUp"?C=(v-1+S.length)%S.length:h==="Home"?C=0:h==="End"&&(C=S.length-1),(D=document.getElementById(`menuitem${d}${S[C]}`))==null||D.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:ge(2),width:"100%",fontSize:p=>Wn(p,"inherit"),height:p=>ge(6+rt(p)*2),paddingInline:p=>ge(rt(p)*3),border:"none",outline:"none",color:p=>he(p,"text",e),backgroundColor:p=>he(p,"inherit",e),transition:"background-color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>he(p,"hover",e)},"&[aria-current=true]":{backgroundColor:p=>he(p,"shift-3",i),color:p=>he(p,"shift-10")},"&:focus-visible":{outline:p=>`${ge(.5)} solid ${he(p,"shift-6",i)}`,outlineOffset:`-${ge(.5)}`}}})});s[c.tagName]=l},style:{display:"flex",flexDirection:"column",paddingBlock:c=>ge(rt(c)*2),paddingInline:c=>ge(rt(c)*2),fontSize:c=>Wn(c,"inherit"),backgroundColor:c=>he(c,"inherit",e),borderRadius:c=>ge(rt(c)*2),outline:c=>`1px solid ${he(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:I("medium")}}}var Kn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Be=n=>{let o={},r=[];for(let e in n){let i=n[e];e==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?r.push(`scale(${i})`):e==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return r.length&&(o.transform=r.join(" ")),o};function Cd(n={}){var a,c,s,d;let{initial:o,animate:r,exit:e,transition:i={}}=n,t={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(s=i.easing)!=null?s:"ease",iterations:(d=i.iterations)!=null?d:1,fill:"both"};return{_onMount:l=>{let m=l.domElement;if(!m||typeof m.animate!="function")return;let y=Kn(r)?r.get():r;if(y?m.animate(o?[Be(o),Be(y)]:[Be(y)],t):o&&Object.assign(m.style,Be(o)),Kn(r)){let f=r.addListener(u=>{m.animate([Be(u)],t)});l.setMetadata("motionRelease",f)}},_onBeforeRemove:(l,m)=>{let y=l.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Be(e)],t).finished.then(m,m)},_onRemove:l=>{let m=l.getMetadata("motionRelease");m==null||m()}}}import{toState as _i}from"@domphy/core";import{themeColor as jn,themeSize as Mi,themeSpacing as Ai}from"@domphy/theme";function kd(n={}){var r;let o=_i((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Mi(e,"inherit"),backgroundColor:e=>jn(e),color:e=>jn(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Ai(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Bi}from"@domphy/core";import{themeColor as Ne,themeDensity as at,themeSize as Ni,themeSpacing as He}from"@domphy/theme";function Hi(n,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),i=Math.min(o-1,n+1);for(let t=e;t<=i;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Od(n){var c;let{total:o,color:r="neutral",accentColor:e="primary"}=n,i=Bi((c=n.value)!=null?c:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>He(6+at(s)*2),height:s=>He(6+at(s)*2),paddingInline:s=>He(at(s)*2),borderRadius:s=>He(at(s)*1.5),border:"none",cursor:"pointer",fontSize:s=>Ni(s,"inherit"),backgroundColor:"transparent",color:s=>Ne(s,"text",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:s=>Ne(s,"hover",r)},"&:focus-visible":{boxShadow:s=>T(s,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Ie(V({},t),{backgroundColor:s=>Ne(s,"shift-6",e),color:s=>Ne(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>Ne(s,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let d={div:l=>{let m=i.get(l),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});let f=0;for(let u of Hi(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${f++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>He(at(p)*2),color:p=>Ne(p,"shift-7",r)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>i.set(u),style:p?a:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:He(1)}};s.children.insert(d)},style:{display:"inline-flex"}}}import{toState as Fi}from"@domphy/core";import{themeColor as Wi,themeDensity as Ki,themeSpacing as ji}from"@domphy/theme";function $d(n={}){var i;let{padding:o=4,divider:r=!1}=n,e=Fi((i=n.color)!=null?i:"neutral","color");return{style:V({padding:t=>ji(Ki(t)*o)},r?{borderBottom:t=>`1px solid ${Wi(t,"border",e.get(t))}`}:{})}}import{toState as Yi}from"@domphy/core";import{themeColor as qi,themeSize as Gi}from"@domphy/theme";function Bd(n={}){var r;let o=Yi((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Gi(e,"inherit"),color:e=>qi(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Ui,toState as Yn}from"@domphy/core";import{themeColor as qn,themeDensity as Xi,themeSpacing as Ji}from"@domphy/theme";function jd(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,i=null,t=Yn(o),a=Yn(r),{show:c,hide:s,anchorPartial:d}=G({kind:"popover",open:t,placement:a,content:n.content,keepOpenOnContentHover:e==="hover"}),l={role:"dialog",dataTone:"shift-14",style:{backgroundColor:f=>qn(f,"inherit"),borderRadius:f=>Ji(Xi(f)*2),outline:f=>`1px solid ${qn(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")},_onInsert:f=>{let u=f.attributes.get("id");i=u||f.nodeId,!u&&f.attributes.set("id",i)}};return(y=n.content).$||(y.$=[]),n.content.$.push(l),Ui(d,{ariaHaspopup:"dialog",ariaExpanded:f=>t.get(f),onMouseEnter:(f,u)=>e==="hover"&&c(u),onMouseLeave:(f,u)=>e==="hover"&&s(u),onClick:(f,u)=>{e==="click"&&(t.get()?s(u):c(u))},onKeyDown:(f,u)=>{f.key==="Escape"&&t.get()&&s(u)},onFocus:(f,u)=>e==="hover"&&c(u),onBlur:(f,u)=>{let p=f.relatedTarget,h=u.getRoot().domElement,S=i?h.querySelector(`#${CSS.escape(i)}`):null;p&&(S!=null&&S.contains(p))||s(u)},_onMount:f=>i&&f.attributes.set("ariaControls",i)}),d}import{toState as Zi}from"@domphy/core";import{themeColor as At,themeSize as Qi,themeSpacing as To}from"@domphy/theme";function Gn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=To(6),bordered:i=!0}=n,t=Zi(o),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"},c=l=>{var m;return(m=a[t.get(l)])!=null?m:a["bottom-end"]},s=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",d=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>Qi(l),backgroundColor:l=>At(l),color:l=>At(l,"text",r),position:"relative","&::after":{content:'""',position:"absolute",width:To(1.5),height:To(1.5),backgroundColor:l=>At(l,"inherit",r),borderWidth:i?"1px":0,borderColor:l=>At(l,"inherit",r),borderTopStyle:l=>{let m=c(l);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:l=>{let m=c(l);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:l=>{let m=c(l);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:l=>{let m=c(l);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:l=>{let m=c(l);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:l=>{let m=c(l);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:l=>{let m=c(l);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:l=>{let m=c(l);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:l=>{let m=c(l),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",f=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${f}) rotate(45deg)`}}}}}import{toState as el}from"@domphy/core";import{themeColor as Un,themeDensity as Do,themeSize as tl,themeSpacing as Po}from"@domphy/theme";function Zd(n={}){var r;let o=el((r=n.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>tl(e,"inherit"),color:e=>Un(e,"text",o.get(e)),backgroundColor:e=>Un(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>Po(Do(e)*2),paddingInline:e=>Po(Do(e)*3),borderRadius:e=>Po(Do(e)*2)}}}import{toState as Xn}from"@domphy/core";import{themeColor as Oo,themeSpacing as Bt}from"@domphy/theme";function op(n={}){var e,i;let o=Xn((e=n.color)!=null?e:"neutral","color"),r=Xn((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Bt(2),border:0,borderRadius:Bt(999),overflow:"hidden",backgroundColor:t=>Oo(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Oo(t,"shift-3",o.get(t)),borderRadius:Bt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Oo(t,"shift-9",r.get(t)),borderRadius:Bt(999),transition:"width 220ms ease"}}}}import{toState as Jn}from"@domphy/core";import{themeColor as ol,themeSpacing as Zn}from"@domphy/theme";var nl='<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>',rl='<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 lp(n={}){var s,d;let{max:o=5,readOnly:r=!1,onChange:e}=n,i=(s=n.color)!=null?s:"warning",t=Jn((d=n.value)!=null?d:0),a=Jn(0),c=l=>{let m=a.get(l);return m>0?m:t.get(l)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Zn(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:l=>ol(l,"muted",i)},_onInit:l=>{for(let m=1;m<=o;m++){let y=m,f=r?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),a.set(0)},onMouseEnter:()=>a.set(y),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var C,D;let h=t.get(),S=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")S=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")S=Math.max(0,h-1),p.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(D=(C=l.domElement)==null?void 0:C.children[v])==null||D.focus()}},u=Ie(V({button:p=>y<=c(p)?nl:rl,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},f),{style:{background:"none",border:"none",outline:"none",borderRadius:Zn(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>T(p,i)}}});l.children.insert(u)}}}}import{toState as Lo}from"@domphy/core";import{themeColor as Qn,themeSpacing as er}from"@domphy/theme";function dp(n={}){var s,d,l;let{size:o=16,thickness:r=.25}=n,e=Lo((s=n.value)!=null?s:0,"value"),i=Lo((d=n.color)!=null?d:"primary","color"),t=Lo((l=n.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-r)*100),c=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:er(o),height:er(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Qn(m,"shift-9",i.get(m))} ${e.get(m)}%, ${Qn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:c,mask:c}}}import{themeDensity as al,themeSpacing as il}from"@domphy/theme";function tr(n={}){let{gap:o=4,align:r="center",justify:e,wrap:i=!1}=n;return{style:V(V({display:"flex",alignItems:r,gap:t=>il(al(t)*o)},e?{justifyContent:e}:{}),i?{flexWrap:"wrap"}:{})}}import{toState as ll}from"@domphy/core";import{themeColor as Io,themeSpacing as Nt}from"@domphy/theme";function Sp(n={}){var r;let o=ll((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Nt(2),height:Nt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Io(e,"shift-5",o.get(e)),borderRadius:Nt(999),border:`${Nt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Io(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Io(e,"shift-5",o.get(e))} transparent`}}}import{toState as sl}from"@domphy/core";import{themeColor as it,themeSize as cl,themeSpacing as fe}from"@domphy/theme";function kp(n={items:[]}){var t,a,c;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,i=sl((c=(a=n.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?c:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(s,d)=>{let l=o.map((m,y)=>{var p;let f=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:f,type:"button",role:"radio",ariaChecked:h=>i.get(h)===f,onClick:()=>i.set(f),style:{cursor:"pointer",fontSize:h=>cl(h,"inherit"),height:fe(6),paddingBlock:fe(1),paddingInline:fe(3),border:"none",borderRadius:fe(10),color:h=>it(h,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>it(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>it(h,"shift-0",e),color:h=>it(h,"shift-10",e)},"&:focus-visible":{boxShadow:h=>T(h,e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[s.tagName]=l},style:{display:"inline-flex",paddingBlock:fe(1),paddingInline:fe(1),gap:fe(.5),borderRadius:fe(10),backgroundColor:s=>it(s,"shift-2",r)}}}import{themeColor as oe,themeColorToken as ml,themeDensity as lt,themeSize as ul,themeSpacing as ye}from"@domphy/theme";function Pp(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>ul(e,"inherit"),lineHeight:"inherit",color:e=>oe(e,"text",o),backgroundColor:e=>oe(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${oe(e,"border-strong",o)}`,borderRadius:e=>ye(lt(e)*1.5),paddingBlock:e=>ye(lt(e)*1),paddingLeft:e=>ye(lt(e)*3),paddingRight:e=>ye(lt(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="${ml(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:`right ${ye(2)} center`,backgroundSize:`${ye(2.5)} ${ye(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>ye(6+lt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${oe(e,"shift-5",r)}`},"&:focus-visible":{boxShadow:e=>T(e,r)},"& optgroup":{color:e=>oe(e,"shift-11",o)},"& option[disabled]":{color:e=>oe(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>oe(e,"muted","neutral"),outline:e=>`1px solid ${oe(e,"border-strong","neutral")}`,backgroundColor:e=>oe(e,"shift-2","neutral")}}}}import{merge as or,toState as zo}from"@domphy/core";import{themeColor as st,themeDensity as Ht,themeSize as dl,themeSpacing as Fe}from"@domphy/theme";function Rp(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=zo(n.value),c=zo(i),{show:s,hide:d,anchorPartial:l}=G({kind:"selectBox",open:c,placement:zo(r),content:n.content}),m={onClick:(u,p)=>!t&&d(p),dataTone:"shift-14",style:{backgroundColor:u=>st(u,"inherit"),borderRadius:u=>Fe(Ht(u)*2),outline:u=>`1px solid ${st(u,"border-strong")}`,outlineOffset:"-1px",boxShadow:I("medium")}};or(n.content,m);let y={div:u=>{let p=a.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[vt({color:e,removable:t})],_key:v.value,_onRemove:C=>{let D=a.get(),E=(Array.isArray(D)?D:[D]).filter(O=>O!==v.value);t?a.set(E):a.set(E[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Fe(1),flex:1}},f={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>c.get()?d(p):s(p),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>Fe(6+Ht(u)*2),minWidth:Fe(32),outlineOffset:"-1px",outline:u=>`1px solid ${st(u,"border-strong","neutral")}`,paddingInline:u=>Fe(Ht(u)*2),borderRadius:u=>Fe(Ht(u)*1.5),fontSize:u=>dl(u,"inherit"),color:u=>st(u,"text",e),backgroundColor:u=>st(u,"inherit",e)}};return or(l,f),l}import{themeColor as We,themeDensity as nr,themeSize as pl,themeSpacing as Ft}from"@domphy/theme";function Ap(n={}){let{accentColor:o="primary",color:r="neutral",value:e=null}=n;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let c=a.value;t.attributes.set("ariaSelected",s=>{let d=c.get(s);return a.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let s=c.get();a.multiple?s.includes(e)?c.set(s.filter(d=>d!==e)):c.set(s.concat([e])):s!==e&&c.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>pl(t,"inherit"),height:t=>Ft(6+nr(t)*2),paddingInline:t=>Ft(nr(t)*3),border:"none",outline:"none",color:t=>We(t,"text",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"hover",r)},"&[aria-selected=true]":{backgroundColor:t=>We(t,"shift-6",o),color:t=>We(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ft(.5)} solid ${We(t,"shift-6",o)}`,outlineOffset:`-${Ft(.5)}`}}}}import{toState as hl}from"@domphy/core";import{themeColor as gl,themeDensity as rr,themeSize as fl,themeSpacing as ar}from"@domphy/theme";function Fp(n={}){var a;let{color:o="neutral",multiple:r=!1}=n,e=hl((a=n.value)!=null?a:r?[]:null),i={div:c=>{let s=e.get(c);return(Array.isArray(s)?s:[s]).map(l=>({input:null,name:n.name,value:l==null?"":String(l)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:r}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>ar(rr(c)*2),paddingInline:c=>ar(rr(c)*2),fontSize:c=>fl(c,"inherit"),backgroundColor:c=>gl(c,"inherit",o)}}}import{hashString as yl,toState as bl}from"@domphy/core";import{themeColor as ir,themeSize as Sl,themeSpacing as lr}from"@domphy/theme";function Yp(n={}){var i;let o=bl((i=n.color)!=null?i:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=yl(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Sl(t),color:t=>ir(t,"text",o.get(t)),height:lr(6),display:"block",borderRadius:lr(1),backgroundColor:t=>ir(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as Cl}from"@domphy/core";import{themeColor as vl,themeSize as xl}from"@domphy/theme";function Xp(n={}){var r;let o=Cl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>xl(e,"inherit"),color:e=>vl(e,"text",o.get(e))}}}import{hashString as El,toState as kl}from"@domphy/core";import{themeColor as Wt,themeSize as wl,themeSpacing as Vo}from"@domphy/theme";var cr={to:{transform:"rotate(360deg)"}},sr=El(JSON.stringify(cr));function eh(n={}){var r;let o=kl((r=n.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>wl(e),backgroundColor:e=>Wt(e),color:e=>Wt(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Vo(6),height:Vo(6),borderRadius:"50%",border:e=>`${Vo(.5)} solid ${Wt(e,"border-strong",o.get(e))}`,borderTopColor:e=>Wt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${sr} 0.7s linear infinite`,[`@keyframes ${sr}`]:cr}}}import{merge as Tl,toState as Dl}from"@domphy/core";import{themeColor as Kt,themeSpacing as $o}from"@domphy/theme";function rh(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:i=90}=n;return{_onSchedule:(t,a)=>{Tl(a,{_context:{splitter:{direction:o,size:Dl(r),min:e,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ah(){return{_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal"?"width":"height",i=o.panelCount++===0,t=c=>{r.style[e]=`${i?c:100-c}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let a=o.size.addListener(t);n.addHook("Remove",a)}}}function ih(){return{role:"separator",tabindex:0,_onMount:n=>{let o=n.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=n.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize",r.setAttribute("aria-orientation",e?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(o.min)),r.setAttribute("aria-valuemax",String(o.max)),r.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let i=o.size.addListener(s=>{r.setAttribute("aria-valuenow",String(Math.round(s)))}),t=s=>{let d=s.shiftKey?10:1,l=null;e?s.key==="ArrowRight"?l=Math.min(o.size.get()+d,o.max):s.key==="ArrowLeft"&&(l=Math.max(o.size.get()-d,o.min)):s.key==="ArrowDown"?l=Math.min(o.size.get()+d,o.max):s.key==="ArrowUp"&&(l=Math.max(o.size.get()-d,o.min)),s.key==="Home"?l=o.min:s.key==="End"&&(l=o.max),l!==null&&(s.preventDefault(),o.size.set(l))},a=null,c=s=>{s.preventDefault();let d=r.parentElement,l=y=>{let f=d.getBoundingClientRect(),u=e?(y.clientX-f.left)/f.width*100:(y.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",c),n.addHook("Remove",()=>{a==null||a(),i(),r.removeEventListener("keydown",t),r.removeEventListener("mousedown",c)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n=>Kt(n,"shift-2"),"&:hover":{backgroundColor:n=>Kt(n,"shift-3")},"&:focus-visible":{outline:n=>`2px solid ${Kt(n,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:$o(1),height:$o(1),borderRadius:$o(999),backgroundColor:n=>Kt(n,"shift-4")}}}}import{themeDensity as Pl,themeSpacing as Ol}from"@domphy/theme";function ch(n={}){let{gap:o=3,align:r}=n;return{style:V({display:"flex",flexDirection:"column",gap:e=>Ol(Pl(e)*o)},r?{alignItems:r}:{})}}import{toState as Ll}from"@domphy/core";import{themeColor as A,themeSize as mr,themeSpacing as be}from"@domphy/theme";function hh(n={items:[]}){var a;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:i="primary"}=n,t=Ll((a=n.current)!=null?a:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:i}},_onSchedule:(c,s)=>{let d=o.map((l,m)=>{var f;return{li:[typeof l.label=="string"?{span:l.label}:l.label],_key:(f=l.key)!=null?f:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:be(1),flex:"1",fontSize:u=>mr(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:be(6),height:be(6),borderRadius:be(999),fontSize:u=>mr(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${A(u,"border-strong",e)}`,backgroundColor:u=>A(u,"inherit"),color:u=>A(u,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:be(3),right:`calc(50% + ${be(3)})`,left:`calc(-50% + ${be(3)})`,height:"2px",backgroundColor:u=>A(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>A(u,"shift-6",i),borderColor:u=>A(u,"shift-6",i),color:u=>A(u,"shift-15",i)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>A(u,"shift-3",e),borderColor:u=>A(u,"border",e),color:u=>A(u,"text",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>A(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>A(u,"shift-6",i)},"&[data-status=pending]":{color:u=>A(u,"shift-7")},"&[data-status=active]":{color:u=>A(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>A(u,"muted")}}}});s[c.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:be(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as Il}from"@domphy/core";import{themeColor as ur,themeSize as zl}from"@domphy/theme";function bh(n={}){var r;let o=Il((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>zl(e,"inherit"),fontWeight:700,color:e=>ur(e,"shift-11",o.get(e)),backgroundColor:e=>ur(e)}}}import{toState as Vl}from"@domphy/core";import{themeColor as $l,themeSize as Rl}from"@domphy/theme";function xh(n={}){var r;let o=Vl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Rl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>$l(e,"text",o.get(e))}}}import{toState as _l}from"@domphy/core";import{themeColor as Ml,themeSize as Al}from"@domphy/theme";function Th(n={}){var r;let o=_l((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Al(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Ml(e,"text",o.get(e))}}}import{toState as Bl}from"@domphy/core";import{themeColor as U,themeDensity as Ke,themeSize as dr,themeSpacing as je}from"@domphy/theme";function Lh(n={}){var r;let o=Bl((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>dr(e,"inherit"),color:e=>U(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${U(e,"shift-3",o.get(e))}`,fontSize:e=>dr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>U(e,"shift-10",o.get(e)),backgroundColor:e=>U(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${U(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>U(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>U(e,"hover")}}}}import{toState as Nl}from"@domphy/core";import{themeColor as ct,themeDensity as jt,themeSize as Hl,themeSpacing as Pe}from"@domphy/theme";function Rh(n={items:[]}){var t,a,c;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,i=Nl((c=(a=n.activeKey)!=null?a:(t=o[0])==null?void 0:t.key)!=null?c:0);return{_onSchedule:(s,d)=>{let l=s.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${l}${h}`,ariaControls:`panel${l}${h}`,ariaSelected:C=>i.get(C)===h,onClick:()=>i.set(h),onKeyDown:C=>{let D=C.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(D))return;C.preventDefault();let P=o.map((j,Ce)=>{var re;return(re=j.key)!=null?re:Ce}),E=P.indexOf(h),O=E;D==="ArrowRight"?O=(E+1)%P.length:D==="ArrowLeft"?O=(E-1+P.length)%P.length:D==="Home"?O=0:D==="End"&&(O=P.length-1),i.set(P[O])},style:{cursor:"pointer",fontSize:C=>Hl(C,"inherit"),height:C=>Pe(6+jt(C)*2),paddingInline:C=>Pe(jt(C)*4),border:"none",outline:"none",color:C=>ct(C,"text"),backgroundColor:C=>ct(C,"inherit"),boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-1",e)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:C=>`inset 0 -${Pe(.5)} 0 0 ${ct(C,"shift-6",r)}`},"&:focus-visible":{boxShadow:C=>T(C,r)}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},f=o.map((u,p)=>{var S;let h=(S=u.key)!=null?S:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${l}${h}`,ariaLabelledby:`tab${l}${h}`,hidden:v=>i.get(v)!==h,style:{paddingBlock:v=>Pe(jt(v)*2),paddingInline:v=>Pe(jt(v)*2)}}});d[s.tagName]=[y,...f]}}}import{toState as pr}from"@domphy/core";import{themeColor as ne,themeDensity as Ro,themeSize as Fl,themeSpacing as Yt}from"@domphy/theme";function Nh(n={}){var i,t;let o=pr((i=n.color)!=null?i:"neutral","color"),r=pr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let c=a.domElement;c.style.overflow="hidden";let s=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",s),s(),a.addHook("Remove",()=>c.removeEventListener("input",s))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>Yt(Ro(a)*2),paddingBlock:a=>Yt(Ro(a)*1.5),border:"none",borderRadius:a=>Yt(Ro(a)*1.5),fontSize:a=>Fl(a,"inherit"),color:a=>ne(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${ne(a,"border-strong",o.get(a))}`,backgroundColor:a=>ne(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>ne(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${ne(a,"shift-5",r.get(a))}`},"&:focus-visible":{boxShadow:a=>T(a,r.get(a))},"&:invalid":{outline:a=>`${Yt(.5)} solid ${ne(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>ne(a,"muted","neutral"),outline:a=>`1px solid ${ne(a,"border-strong","neutral")}`,backgroundColor:a=>ne(a,"shift-2","neutral")}}}}import{toState as Wl}from"@domphy/core";import{themeColor as hr,themeDensity as _o,themeSpacing as Mo}from"@domphy/theme";function Kh(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function jh(n={}){var t,a,c;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(a=n.accentColor)!=null?a:"primary",i=Wl((c=n.active)!=null?c:!1);return{style:V({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:s=>Mo(_o(s)*2),paddingBottom:s=>o?"0":Mo(_o(s)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:s=>hr(s,"shift-8",i.get(s)?e:r),opacity:s=>i.get(s)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:s=>`-${Mo(_o(s)*4)}`,width:"2px",backgroundColor:s=>hr(s,"shift-3",r)}})}}import{toState as Kl}from"@domphy/core";import{themeColor as gr,themeDensity as Ao,themeSize as jl,themeSpacing as Ye}from"@domphy/theme";function Jh(n={}){let{position:o="top-center",color:r="neutral"}=n,e=Kl(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),c={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:Ye(4),zIndex:30,padding:Ye(6),pointerEvents:"none"}};return{_portal:s=>{let d=s.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=s.children.insert(c).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Ye(32),pointerEvents:"auto",paddingBlock:s=>Ye(Ao(s)*2),paddingInline:s=>Ye(Ao(s)*4),borderRadius:s=>Ye(Ao(s)*2),fontSize:s=>jl(s,"inherit"),color:s=>gr(s,"text",r),backgroundColor:s=>gr(s,"inherit",r),boxShadow:I("medium"),opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,d)=>{let l=!1,m=null,y=()=>{l||(l=!0,m&&(clearTimeout(m),m=null),s.domElement.removeEventListener("transitionend",f),d())},f=u=>{u.propertyName==="transform"&&y()};s.domElement.addEventListener("transitionend",f),m=setTimeout(y,350),s.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=s.domElement)==null||u.removeEventListener("transitionend",f)}),e.set(!1)}}}import{toState as Yl}from"@domphy/core";import{themeColor as Oe,themeSize as fr,themeSpacing as Se}from"@domphy/theme";function og(n={items:[]}){var a;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:i="primary"}=n,t=Yl((a=n.value)!=null?a:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(c,s)=>{let d=o.map((l,m)=>{var u;let y=(u=l.key)!=null?u:String(m);return{button:[typeof l.label=="string"?{span:l.label}:l.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(r){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>fr(p,"inherit"),height:Se(6),paddingBlock:Se(1),paddingInline:Se(2),border:"none",borderRadius:Se(1.5),color:p=>Oe(p,"text",e),backgroundColor:p=>Oe(p,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:p=>Oe(p,"hover",e)},"&[aria-pressed=true]":{backgroundColor:p=>Oe(p,"shift-3",i),color:p=>Oe(p,"shift-12",i)},"&:focus-visible":{boxShadow:p=>T(p,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});s[c.tagName]=d},style:{display:"flex",paddingBlock:Se(1),paddingInline:Se(1),gap:Se(1),borderRadius:Se(2),fontSize:c=>fr(c,"inherit"),backgroundColor:c=>Oe(c,"inherit",e),outline:c=>`1px solid ${Oe(c,"border",e)}`,outlineOffset:"-1px"}}}function ag(n={}){return tr({gap:n.gap})}function ig(){return{div:null,style:{flex:"1 1 0"}}}import{merge as ql,toState as yr}from"@domphy/core";import{themeColor as br,themeDensity as Bo,themeSize as Gl,themeSpacing as No}from"@domphy/theme";function pg(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,i=yr(r),t=yr(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:f=>t.get(f),id:a},{show:s,hide:d,anchorPartial:l}=G({kind:"tooltip",open:o,placement:i,content:c}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:f=>No(Bo(f)*1),paddingInline:f=>No(Bo(f)*3),borderRadius:f=>No(Bo(f)*1.5),color:f=>br(f,"text"),backgroundColor:f=>br(f),fontSize:f=>Gl(f,"inherit"),boxShadow:I("low")},$:[Gn({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(m),ql(l,{ariaDescribedby:a,onMouseEnter:(f,u)=>s(u),onMouseLeave:(f,u)=>d(u),onFocus:(f,u)=>s(u),onBlur:(f,u)=>d(u),onKeyDown:(f,u)=>f.key==="Escape"&&d(u)}),l}import{ElementNode as Sr}from"@domphy/core";function Cr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function fg(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:c=>{c.addHook("Remove",()=>{for(let s of Array.from(i.values()))s();i.clear();for(let s of t)clearTimeout(s);t.clear();for(let s of a)cancelAnimationFrame(s);a.clear()})},_onBeforeUpdate:c=>{e=new Map,c.children.items.forEach((s,d)=>{if(!(s instanceof Sr))return;let l=s.domElement;l&&e.set(Cr(s,d),l.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((s,d)=>{var P;if(!(s instanceof Sr))return;let l=s.domElement;if(!l)return;let m=Cr(s,d),y=e.get(m);if(!y)return;let f=l.getBoundingClientRect(),u=y.left-f.left,p=y.top-f.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(P=i.get(l))==null||P(),l.style.transition="none",l.style.transform=`translate(${u}px, ${p}px)`,l.getBoundingClientRect();let h=requestAnimationFrame(()=>{a.delete(h),l.style.transition=`transform ${o}ms ease ${r}ms`,l.style.transform="translate(0px, 0px)"});a.add(h);let S=!1,v=null,C=()=>{S||(S=!0,v&&(t.delete(v),v=null),i.delete(l),l.removeEventListener("transitionend",D),l.style.transition="",l.style.transform="")},D=E=>{E.propertyName==="transform"&&C()};i.set(l,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),i.delete(l),l.removeEventListener("transitionend",D)}),l.addEventListener("transitionend",D),v=setTimeout(C,o+r+34),t.add(v)}),e.clear()}}}import{toState as Ul}from"@domphy/core";import{themeColor as vr,themeSize as Xl,themeSpacing as Jl}from"@domphy/theme";function Cg(n={}){var r;let o=Ul((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>Xl(e,"inherit"),backgroundColor:e=>vr(e),color:e=>vr(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Jl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{ts as abbreviation,as as accordion,cs as alert,ps as avatar,ys as badge,vs as blockquote,ws as breadcrumb,Os as breadcrumbEllipsis,Ks as button,cn as buttonGhost,Gs as buttonSwitch,Zs as card,oc as code,yc as combobox,vc as command,Ec as commandItem,xc as commandSearch,Oc as datePicker,$c as descriptionList,Ac as details,jc as dialog,Uc as divider,tm as drawer,am as emphasis,cm as empty,um as errorBoundary,ym as fab,vm as figure,wm as formGroup,Om as heading,Vm as horizontalRule,Mm as icon,Hm as image,jm as inputCheckbox,Gm as inputColor,Qm as inputDateTime,ru as inputFile,cu as inputNumber,yu as inputOTP,hu as inputPassword,vu as inputRadio,wu as inputRange,Lu as inputSearch,$u as inputSwitch,Bu as inputText,Wu as keyboard,qu as label,Ju as link,od as linkButton,id as list,ld as listItem,sd as listItemButton,dd as mark,yd as menu,Cd as motion,kd as orderedList,Od as pagination,$d as panelSection,Bd as paragraph,jd as popover,Gn as popoverArrow,Zd as preformated,op as progress,lp as rating,dp as ringProgress,tr as row,Sp as scrollArea,kp as segmented,Pp as select,Rp as selectBox,Ap as selectItem,Fp as selectList,Yp as skeleton,Xp as small,eh as spinner,rh as splitter,ih as splitterHandle,ah as splitterPanel,ch as stack,hh as steps,bh as strong,xh as subscript,Th as superscript,Lh as table,Rh as tabs,vt as tag,Nh as textarea,Kh as timeline,jh as timelineItem,Jh as toast,og as toggleGroup,ag as toolbar,ig as toolbarSpacer,pg as tooltip,fg as transitionGroup,Cg as unorderedList};
|
|
1
|
+
var Hr=Object.defineProperty,Fr=Object.defineProperties;var Wr=Object.getOwnPropertyDescriptors;var tn=Object.getOwnPropertySymbols;var jr=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable;var on=(r,o,n)=>o in r?Hr(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,I=(r,o)=>{for(var n in o||(o={}))jr.call(o,n)&&on(r,n,o[n]);if(tn)for(var n of tn(o))Kr.call(o,n)&&on(r,n,o[n]);return r},q=(r,o)=>Fr(r,Wr(o));import{toState as nn}from"@domphy/core";import{themeColor as Qe,themeSize as Yr,themeSpacing as Gr}from"@domphy/theme";function is(r={}){var e,l;let o=nn((e=r.color)!=null?e:"neutral","color"),n=nn((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Yr(t),backgroundColor:t=>Qe(t),color:t=>Qe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Qe(t,"shift-7",o.get(t)),textUnderlineOffset:Gr(.72),cursor:"help","&:hover":{color:t=>Qe(t,"shift-11",n.get(t)),textDecorationColor:t=>Qe(t,"shift-9",n.get(t))}}}}import{toState as rn}from"@domphy/core";import{themeColor as eo,themeDensity as Ur,themeSpacing as Xr}from"@domphy/theme";import{themeColor as qr}from"@domphy/theme";function b(r,o="primary"){return`0 0 0 2px ${qr(r,"shift-6",o)}`}function ps(r={}){var l,t;let{type:o="single"}=r,n=rn((l=r.color)!=null?l:"neutral","color"),e=rn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let c=d=>{let i=d.target.closest("summary");if(!i)return;let m=i.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};s.addEventListener("click",c),a.addHook("Remove",()=>s.removeEventListener("click",c))},style:{display:"flex",flexDirection:"column",borderRadius:a=>Xr(Ur(a)*1.5),outline:a=>`1px solid ${eo(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>eo(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${eo(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>b(a,e.get(a))}}}}import{toState as Zr}from"@domphy/core";import{themeColor as to,themeDensity as oo,themeSize as Jr,themeSpacing as et}from"@domphy/theme";function ys(r={}){var n;let o=Zr((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:et(3),paddingBlock:e=>et(oo(e)*2),paddingInline:e=>et(oo(e)*4),borderRadius:e=>et(oo(e)*1.5),boxShadow:e=>`inset ${et(1)} 0 0 0 ${to(e,"shift-8",o.get(e))}`,backgroundColor:e=>to(e,"inherit",o.get(e)),color:e=>to(e,"shift-10",o.get(e)),fontSize:e=>Jr(e,"inherit")}}}import{toState as Qr}from"@domphy/core";import{themeColor as no,themeSize as ea,themeSpacing as an}from"@domphy/theme";function Cs(r={}){var n;let o=Qr((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:an(9),height:an(9),fontSize:e=>ea(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>no(e,"inherit",o.get(e)),color:e=>no(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${no(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as ln}from"@domphy/core";import{themeColor as ro,themeSize as ta,themeSpacing as yt}from"@domphy/theme";function ws(r={}){var l;let{label:o=999}=r,n=ln(o),e=ln((l=r.color)!=null?l:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:yt(1.5),minWidth:yt(5),height:yt(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>ta(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:yt(999),backgroundColor:t=>ro(t,"shift-9",e.get(t)),color:t=>ro(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${ro(t,"shift-0",e.get(t))}`}}}}import{toState as oa}from"@domphy/core";import{themeColor as ao,themeDensity as sn,themeSize as na,themeSpacing as io}from"@domphy/theme";function Os(r={}){var n;let o=oa((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>na(e,"inherit"),backgroundColor:e=>ao(e,"inherit",o.get(e)),color:e=>ao(e,"text",o.get(e)),boxShadow:e=>`inset ${io(1)} 0 0 0 ${ao(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>io(sn(e)*2),paddingInline:e=>io(sn(e)*4),margin:0}}}import{toState as ra}from"@domphy/core";import{themeColor as tt,themeSize as aa,themeSpacing as cn}from"@domphy/theme";function Vs(r={}){var e;let{separator:o="/"}=r,n=ra((e=r.color)!=null?e:"neutral","color");return{_onInsert:l=>{l.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:l=>aa(l,"inherit"),gap:cn(1),color:l=>tt(l,"text",n.get(l)),backgroundColor:l=>tt(l,"inherit",n.get(l)),"& > *":{display:"inline-flex",alignItems:"center",color:l=>tt(l,"muted",n.get(l))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:l=>tt(l,"shift-4",n.get(l)),paddingInlineStart:cn(1)},"& > [aria-current=page]":{color:l=>tt(l,"shift-10",n.get(l)),pointerEvents:"none"}}}}import{toState as ia}from"@domphy/core";import{themeColor as lo,themeSize as la,themeSpacing as mn}from"@domphy/theme";function Bs(r={}){var n;let o=ia((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>la(e,"inherit"),paddingInline:mn(1),border:"none",background:"none",cursor:"pointer",color:e=>lo(e,"muted",o.get(e)),borderRadius:mn(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>lo(e,"shift-10",o.get(e)),backgroundColor:e=>lo(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>b(e,o.get(e))}}}}import{toState as ua}from"@domphy/core";import{themeColor as A,themeDensity as xt,themeSize as da,themeSpacing as Ct}from"@domphy/theme";var Be={small:"decrease-1",medium:"inherit",large:"increase-1"};import{toState as sa}from"@domphy/core";import{themeColor as Ne,themeDensity as bt,themeSize as ca,themeSpacing as St}from"@domphy/theme";var ma={small:.5,medium:1,large:1.5};function un(r={}){var l,t,a;let o=sa((l=r.color)!=null?l:"neutral","color"),n=ma[(t=r.size)!=null?t:"medium"],e=Be[(a=r.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>ca(s,e),paddingBlock:s=>St(bt(s)*n),paddingInline:s=>St(bt(s)*n),borderRadius:s=>St(bt(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>St(bt(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>Ne(s,"shift-6",o.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>Ne(s,"text",o.get(s)),backgroundColor:s=>Ne(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>Ne(s,"text",o.get(s)),backgroundColor:s=>Ne(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>b(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>Ne(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var pa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function Zs(r={}){var a,s,c,d;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return un({color:r.color,size:r.size});let n=ua((s=r.color)!=null?s:"primary","color"),e=o==="solid",l=pa[(c=r.size)!=null?c:"medium"],t=Be[(d=r.size)!=null?d:"medium"];return q(I({_onInsert:i=>{i.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"]}:{}),{style:{appearance:"none",fontSize:i=>da(i,t),paddingBlock:i=>Ct(xt(i)*l.block),paddingInline:i=>Ct(xt(i)*l.inline),borderRadius:i=>Ct(xt(i)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:i=>Ct(xt(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":i=>`1px solid ${A(i,"border-strong",n.get(i))}`,color:i=>e?A(i,"shift-0",n.get(i)):A(i,"text",n.get(i)),backgroundColor:i=>A(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:i=>e?A(i,"shift-0",n.get(i)):A(i,"shift-10",n.get(i)),backgroundColor:i=>e?A(i,"decrease-1",n.get(i)):A(i,"hover",n.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:i=>e?A(i,"decrease-2",n.get(i)):A(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:i=>A(i,"shift-2","neutral"),outline:i=>`1px solid ${A(i,"border-strong","neutral")}`,color:i=>A(i,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}import{toState as so}from"@domphy/core";import{themeColor as Ee,themeSize as ha,themeSpacing as j}from"@domphy/theme";function nc(r={}){var t,a;let{checked:o=!1}=r,n=so(o),e=so((t=r.color)!=null?t:"neutral","color"),l=so((a=r.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>ha(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${Ee(s,"border",e.get(s))}`,minWidth:j(12),minHeight:j(6),borderRadius:j(999),paddingLeft:j(7),paddingRight:j(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>Ee(s,"inherit",e.get(s)),color:s=>Ee(s,"text",e.get(s)),"&:focus-visible":{boxShadow:s=>b(s,l.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:j(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:j(5),height:j(5),borderRadius:j(999),color:s=>Ee(s,"text"),backgroundColor:s=>Ee(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>Ee(s,"increase-3",l.get(s)),outline:"none",color:s=>Ee(s,"decrease-2"),paddingLeft:j(2),paddingRight:j(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${j(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as fa}from"@domphy/core";import{themeColor as we,themeDensity as ee,themeSpacing as U}from"@domphy/theme";var ga={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 L(r){return ga[r]}function cc(r={}){var n;let o=fa((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>U(ee(e)*2),backgroundColor:e=>we(e,"inherit",o.get(e)),color:e=>we(e,"shift-10",o.get(e)),outline:e=>`1px solid ${we(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:L("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>U(ee(e)*2),paddingInline:e=>U(ee(e)*4),fontWeight:"600",color:e=>we(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>U(ee(e)*4),paddingBottom:e=>U(ee(e)*2),color:e=>we(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>U(ee(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>U(ee(e)*4),color:e=>we(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:U(2),paddingBlock:e=>U(ee(e)*2),paddingInline:e=>U(ee(e)*4),borderTop:e=>`1px solid ${we(e,"border",o.get(e))}`}}}}import{toState as ya}from"@domphy/core";import{themeColor as dn,themeSize as ba,themeSpacing as co}from"@domphy/theme";function pc(r={}){var n;let o=ya((n=r.color)!=null?n:"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=>ba(e,"inherit"),color:e=>dn(e,"text",o.get(e)),backgroundColor:e=>dn(e,"inherit",o.get(e)),height:co(6),paddingInline:co(1.5),borderRadius:co(1)}}}import{merge as mo,toState as uo}from"@domphy/core";import{themeColor as Te,themeDensity as Et,themeSize as pn,themeSpacing as me}from"@domphy/theme";import{behavior as Sa,merge as xa,toState as Ca}from"@domphy/core";import{autoUpdate as va,computePosition as ka,flip as Ea,offset as wa,shift as Ta}from"@domphy/floating";function Da(r,o){var P;let{openState:n,placement:e,content:l,keepOpenOnContentHover:t}=o,a=null,s=null,c=null,d=null,i=!1,m=r.domElement,y=r.getRoot(),g={style:{position:"fixed",pointerEvents:"auto",visibility:E=>n.get(E)?"visible":"hidden"},onKeyDown:E=>{E.key==="Escape"&&C()},onMouseEnter:()=>t&&v(),onMouseLeave:()=>t&&C(),_onMount:E=>{var O;if(c=E.domElement,m&&c&&!c.hasAttribute("data-theme")){let Y=(O=m.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");Y&&c.setAttribute("data-theme",Y)}},_portal:E=>{let O=E.domElement.querySelector("#domphy-floating");if(!O){let Y={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=E.children.insert(Y).domElement}return O}},u=E=>xa(E,g);u(l);let p=()=>{i||(i=!0,d=y.children.insert(l))},h=()=>{p(),m&&c&&(s==null||s(),s=va(m,c,()=>{ka(m,c,{placement:e.get(),middleware:[wa(12),Ea(),Ta()],strategy:"fixed"}).then(({x:E,y:O,placement:Y})=>{c&&(Object.assign(c.style,{left:`${E}px`,top:`${O}px`}),e.set(Y))})}),n.set(!0))},x=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),c=null,i=!1,n.set(!1)},v=()=>{a&&clearTimeout(a),a=setTimeout(h,100)},C=()=>{a&&clearTimeout(a),a=setTimeout(x,100)},D=E=>{if(!n.get()||!m||!c)return;let O=E.target;!m.contains(O)&&!c.contains(O)&&C()};return(P=y.domElement)==null||P.addEventListener("click",D),{show:v,hide:C,update(E){n=E.openState,e=E.placement,l=E.content,t=E.keepOpenOnContentHover,u(l),d&&d.patch(l)},destroy(){var E;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(E=y.domElement)==null||E.removeEventListener("click",D)}}}function X(r){let{kind:o,open:n=!1,placement:e}=r,l=Ca(n),t=`floating:${o}`,a=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.show()},s=d=>{var i;return(i=d==null?void 0:d.getBehavior(t))==null?void 0:i.hide()},c=I({onKeyDown:(d,i)=>d.key==="Escape"&&s(i)},Sa(t,Da,{openState:l,placement:e,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:c}}import{toState as Pa}from"@domphy/core";import{themeColor as vt,themeSize as Oa,themeSpacing as te}from"@domphy/theme";var La='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function kt(r={}){var e;let{removable:o=!1}=r,n=Pa((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:l=>{let t={span:La,onClick:a=>{a.stopPropagation(),l.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:te(1),width:te(4),height:te(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>vt(a,"shift-4",n.get(a))},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))}}};o&&l.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:te(6),paddingBlock:0,borderRadius:te(999),paddingInlineStart:te(2.5),paddingInlineEnd:o?te(1):te(2.5),gap:te(1.5),fontSize:l=>Oa(l,"decrease-1"),backgroundColor:l=>vt(l,"inherit",n.get(l)),color:l=>vt(l,"text",n.get(l)),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${vt(l,"border-strong",n.get(l))}`}}}function Oc(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=uo(r.value),s=uo(l),{show:c,hide:d,anchorPartial:i}=X({kind:"combobox",open:s,placement:uo(n),content:r.content}),m={onClick:(h,x)=>!t&&d(x),dataTone:"shift-14",style:{backgroundColor:h=>Te(h,"inherit"),borderRadius:h=>me(Et(h)*2),outline:h=>`1px solid ${Te(h,"border-strong")}`,outlineOffset:"-1px",boxShadow:L("medium")}};mo(r.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:me(6),marginInlineStart:me(2),fontSize:h=>pn(h,"inherit"),color:h=>Te(h,"text",e),backgroundColor:h=>Te(h,"inherit",e)},g;if(r.input){let h={onFocus:(x,v)=>c(v),style:y,_key:"combobox-input"};mo(r.input,h),g=r.input}else g={input:null,onFocus:(h,x)=>c(x),value:h=>(a.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let x=a.get(h),v=Array.isArray(x)?x:[x],D=o.filter(P=>v.includes(P.value)).map(P=>({span:P.label,$:[kt({color:e,removable:!0})],_key:P.value,_onRemove:E=>{let O=a.get(),ke=(Array.isArray(O)?O:[O]).filter(se=>se!==P.value);t?a.set(ke):a.set(ke[0])}}));return D.push(g),D},style:{display:"flex",flexWrap:"wrap",gap:me(1)}},p={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:me(32),outlineOffset:"-1px",outline:h=>`1px solid ${Te(h,"border-strong","neutral")}`,paddingBlock:h=>me(Et(h)*1),paddingInline:h=>me(Et(h)*1),borderRadius:h=>me(Et(h)*1.5),fontSize:h=>pn(h,"inherit"),color:h=>Te(h,"text",e),backgroundColor:h=>Te(h,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:h=>b(h,e)}}};return mo(i,p),i}import{merge as Ia,toState as za}from"@domphy/core";import{themeColor as ue,themeDensity as wt,themeSize as hn,themeSpacing as Tt}from"@domphy/theme";function Rc(){return{_onSchedule:(r,o)=>{Ia(o,{_context:{command:{query:za("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function $c(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let l=e.getContext("command");if(!l){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>l.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>hn(e,"inherit"),paddingInline:e=>Tt(wt(e)*3),paddingBlock:e=>Tt(wt(e)*2),border:"none",borderBottom:e=>`1px solid ${ue(e,"border",o)}`,outline:"none",color:e=>ue(e,"shift-10",o),backgroundColor:e=>ue(e,"inherit",o),"&::placeholder":{color:e=>ue(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>ue(e,"shift-6",n),boxShadow:e=>b(e,n)}}}}function _c(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var d,i;let l=e.getContext("command");if(!l){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(i=(d=t.textContent)==null?void 0:d.toLowerCase())!=null?i:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(l.query.get());let c=l.query.addListener(s);e.addHook("Remove",c)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>hn(e,"inherit"),height:e=>Tt(6+wt(e)*2),paddingInline:e=>Tt(wt(e)*3),border:"none",outline:"none",color:e=>ue(e,"text",o),backgroundColor:e=>ue(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:e=>ue(e,"hover",o)},"&:focus-visible":{boxShadow:e=>b(e,n)}}}}import{merge as Va,toState as oe}from"@domphy/core";import{themeColor as M,themeDensity as Ra,themeSize as Ae,themeSpacing as R}from"@domphy/theme";var _=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),De=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),po=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),ot=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),ho=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,go=(r,o)=>De(r,-((r.getDay()-o+7)%7));function $a(r){var o,n;try{let e=new Intl.Locale(r),l=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(l!=null&&l.firstDay)return l.firstDay%7}catch(e){}return 0}function Wc(r={}){var Zo,Jo,Qo,en;let{mode:o="single",time:n=!1,min:e,max:l,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:c}=r,d=(Zo=r.weekStartsOn)!=null?Zo:$a(a),i=oe((Jo=r.accentColor)!=null?Jo:"primary","accentColor"),m=oe((Qo=r.placement)!=null?Qo:"bottom-start"),y=oe((en=r.value)!=null?en:o==="range"?[null,null]:null),g=c?y.addListener(f=>c(f)):null,u=(()=>{let f=y.get(),S=o==="range"?f==null?void 0:f[0]:f;return S instanceof Date?S:new Date})(),p=oe(u.getFullYear(),"viewYear"),h=oe(u.getMonth(),"viewMonth"),x=oe(_(u),"focused"),v=oe(null,"hovered"),C=oe(u.getHours(),"hour"),D=oe(u.getMinutes(),"minute"),P=null,E=new Intl.DateTimeFormat(a,I({dateStyle:"medium"},n?{timeStyle:"short"}:{})),O=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),Y=new Intl.DateTimeFormat(a,{weekday:"short"}),ke=new Intl.DateTimeFormat(a,{dateStyle:"full"}),se=f=>f?E.format(f):"",wr=f=>{if(s)return s(f);if(o==="range"){let[S,k]=f!=null?f:[null,null];return S?`${se(S)} \u2013 ${se(k)}`:""}return se(f)},Tr=Array.from({length:7},(f,S)=>Y.format(new Date(2023,0,1+(S+d)%7))),Go=f=>!!e&&_(f)<_(e)||!!l&&_(f)>_(l)||!!t&&t(f),ce=f=>{if(!n)return _(f);let S=_(f);return S.setHours(C.get(),D.get(),0,0),S},qo=f=>{var w;if(Go(f))return;if(o==="single"){y.set(ce(f)),n||Jt();return}let[S,k]=(w=y.get())!=null?w:[null,null];!S||S&&k?y.set([ce(f),null]):_(f)<_(S)?(y.set([ce(f),ce(S)]),n||Jt()):(y.set([S,ce(f)]),n||Jt())},Dr=()=>{var f;if(n)if(o==="single"){let S=y.get();S&&y.set(ce(S))}else{let[S,k]=(f=y.get())!=null?f:[null,null];y.set([S&&ce(S),k&&ce(k)])}},Pr=(f,S)=>{var Me;if(o!=="range")return!1;let[k,w]=(Me=y.get(S))!=null?Me:[null,null],z=w!=null?w:v.get(S);if(!k||!z)return!1;let T=_(k)<=_(z)?k:z,W=_(k)<=_(z)?z:k,N=_(f);return N>=_(T)&&N<=_(W)},Or=(f,S)=>{let k=y.get(S);if(o==="range"){let[w,z]=k!=null?k:[null,null];return ot(f,w)||ot(f,z)}return ot(f,k)},ft=f=>{p.set(f.getFullYear()),h.set(f.getMonth())},Uo=f=>{let S=po(new Date(p.get(),h.get(),1),f);ft(S)},Xo=f=>p.set(p.get()+f),Xt=()=>{setTimeout(()=>{var f;(f=P==null?void 0:P.querySelector(`[data-date="${ho(x.get())}"]`))==null||f.focus()},0)},Lr=$r(),{show:Ir,hide:zr,anchorPartial:Zt}=X({kind:"datePicker",open:!1,placement:m,content:Lr});function Jt(){zr()}Zt.onClick=()=>{};let Vr={type:"text",readonly:!0,value:f=>wr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,S)=>{Qt(S)},onFocus:(f,S)=>{Qt(S)},onKeyDown:(f,S)=>{let k=f.key;(k==="ArrowDown"||k==="Enter")&&(f.preventDefault(),Qt(S))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Qt(f){var k;let S=(k=Rr())!=null?k:new Date;x.set(_(S)),ft(S),Ir(f),Xt()}function Rr(){var S;let f=y.get();return o==="range"?(S=f==null?void 0:f[0])!=null?S:null:f!=null?f:null}return Va(Zt,Vr),Zt;function $r(){let f=(T,W,N)=>({button:T,type:"button",ariaLabel:W,onClick:N,style:_a()}),S={div:[f("\xAB","Previous year",()=>Xo(-1)),f("\u2039","Previous month",()=>Uo(-1)),{div:T=>O.format(new Date(p.get(T),h.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:T=>Ae(T)}},f("\u203A","Next month",()=>Uo(1)),f("\xBB","Next year",()=>Xo(1))],style:{display:"flex",alignItems:"center",gap:R(1),marginBottom:R(2)}},k={div:Tr.map((T,W)=>({div:T,style:{textAlign:"center",fontSize:N=>Ae(N,"decrease-1"),fontWeight:"bold",color:N=>M(N,"shift-7"),paddingBlock:R(1)},_key:W})),role:"row",style:gn()},w={div:T=>_r(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Ar,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:R(.5)}},z=[S,k,w];return n&&z.push(Br()),z.push(Nr()),{div:z,role:"dialog",ariaModal:"false",_onMount:T=>{P=T.domElement},style:{minWidth:R(70),padding:R(3),borderRadius:T=>R(Ra(T)*2),backgroundColor:T=>M(T,"base"),color:T=>M(T,"shift-10"),border:T=>`1px solid ${M(T,"border-strong")}`,boxShadow:L("medium")}}}function _r(f){let S=new Date(p.get(f),h.get(f),1),k=h.get(f),w=go(S,d),z=[];for(let T=0;T<6;T++){let W=[];for(let N=0;N<7;N++){let Me=De(w,T*7+N);W.push(Mr(Me,k,f))}z.push({div:W,role:"row",style:gn(),_key:T})}return z}function Mr(f,S,k){let w=Go(f),z=Or(f,k),T=Pr(f,k),W=f.getMonth()!==S,N=ot(f,x.get(k)),Me=ot(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:N?0:-1,ariaSelected:z,ariaDisabled:w,disabled:w,ariaLabel:ke.format(f),dataDate:ho(f),onClick:()=>qo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:w?"not-allowed":"pointer",aspectRatio:"1",borderRadius:R(1),fontSize:V=>Ae(V),fontFamily:"inherit",opacity:w?.35:W?.5:1,backgroundColor:V=>z?M(V,"shift-7",i.get(V)):T?M(V,"hover",i.get(V)):"transparent",color:V=>z?M(V,"shift-0",i.get(V)):M(V,"text"),outline:Me?V=>`1px solid ${M(V,"shift-6",i.get(V))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:V=>z?M(V,"shift-7",i.get(V)):M(V,"shift-3",i.get(V))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:V=>b(V,i.get(V))}},_key:ho(f)}}function Br(){let f=(S,k,w)=>({select:Array.from({length:S},(z,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:W=>k.get(W)===T,_key:T})),ariaLabel:w,onChange:z=>{k.set(Number(z.target.value)),Dr()},style:Ma()});return{div:[f(24,C,"Hour"),{span:":",style:{fontWeight:"bold"}},f(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:R(1),marginTop:R(3)}}}function Nr(){let f=(S,k)=>({button:S,type:"button",onClick:k,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:w=>Ae(w,"decrease-1"),color:w=>M(w,"muted",i.get(w)),padding:R(1)}});return{div:[f("Today",()=>{let S=new Date;x.set(_(S)),ft(S),Xt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:R(2),paddingTop:R(2),borderTop:S=>`1px solid ${M(S,"border")}`}}}function Ar(f){let S=f,k=x.get(),w=null;switch(S.key){case"ArrowLeft":w=De(k,-1);break;case"ArrowRight":w=De(k,1);break;case"ArrowUp":w=De(k,-7);break;case"ArrowDown":w=De(k,7);break;case"Home":w=go(k,d);break;case"End":w=De(go(k,d),6);break;case"PageUp":w=po(k,S.shiftKey?-12:-1);break;case"PageDown":w=po(k,S.shiftKey?12:1);break;case"Enter":case" ":S.preventDefault(),qo(k);return;default:return}S.preventDefault(),x.set(w),ft(w),Xt()}}function gn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:R(.5)}}function _a(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>Ae(r),color:r=>M(r,"muted"),width:R(7),height:R(7),borderRadius:R(1),"&:hover":{backgroundColor:r=>M(r,"shift-3")}}}function Ma(){return{fontFamily:"inherit",fontSize:r=>Ae(r),padding:R(1),borderRadius:R(1),border:r=>`1px solid ${M(r,"border-strong")}`,backgroundColor:r=>M(r,"base"),color:r=>M(r,"text")}}import{toState as Ba}from"@domphy/core";import{themeColor as fn,themeSize as yn,themeSpacing as bn}from"@domphy/theme";function qc(r={}){var n;let o=Ba((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${bn(24)}, max-content) 1fr`,columnGap:bn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>yn(e,"inherit"),color:e=>fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>yn(e,"inherit"),color:e=>fn(e,"text",o.get(e))}}}}import{toState as Sn}from"@domphy/core";import{themeColor as Pe,themeDensity as nt,themeSize as xn,themeSpacing as H}from"@domphy/theme";function Qc(r={}){var l,t;let{duration:o=240}=r,n=Sn((l=r.color)!=null?l:"neutral","color"),e=Sn((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>xn(a,"inherit"),color:a=>Pe(a,"text",n.get(a)),backgroundColor:a=>Pe(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>Pe(a,"shift-2",n.get(a)),color:a=>Pe(a,"shift-10",n.get(a)),fontSize:a=>xn(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:H(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>H(nt(a)*4),height:H(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:H(2),height:H(2),flexShrink:0,marginTop:`-${H(.5)}`,borderInlineEnd:a=>`${H(.5)} solid ${Pe(a,"shift-9",n.get(a))}`,borderBottom:a=>`${H(.5)} solid ${Pe(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>Pe(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>H(nt(a)*2),boxShadow:a=>b(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>H(nt(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:H(250),opacity:1,paddingTop:a=>H(nt(a)*1),paddingBottom:a=>H(nt(a)*3)}}}}import{toState as Na}from"@domphy/core";import{themeColor as fo,themeDensity as Cn,themeSize as Aa,themeSpacing as vn}from"@domphy/theme";var rt=0;function Dt(){rt++,rt===1&&(document.body.style.overflow="hidden")}function He(){rt=Math.max(0,rt-1),rt===0&&(document.body.style.overflow="")}var kn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function im(r={}){let{color:o="neutral",open:n=!1}=r,e=Na(n),l=null,t=!1,a=!1,s=c=>{t=!1,typeof c.close=="function"&&c.close(),c.style.visibility="hidden",c.style.pointerEvents="none",a&&(He(),a=!1),l==null||l.focus(),l=null};return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(c,d)=>{if(c.target!==d.domElement)return;let i=d.domElement.getBoundingClientRect();c.clientX>=i.left&&c.clientX<=i.right&&c.clientY>=i.top&&c.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(c,d)=>{t&&c.target===d.domElement&&c.propertyName==="opacity"&&s(d.domElement)},_onMount:c=>{let d=c.domElement;d.setAttribute("aria-modal","true");let i=null,m=p=>{if(p.key!=="Tab")return;let h=Array.from(d.querySelectorAll(kn)).filter(C=>!C.closest("[aria-hidden='true']")&&C.offsetParent!==null);if(!h.length){p.preventDefault();return}let x=h[0],v=h[h.length-1];p.shiftKey?(document.activeElement===x||document.activeElement===d)&&(p.preventDefault(),v.focus()):document.activeElement===v&&(p.preventDefault(),x.focus())},y=p=>{p.preventDefault(),e.set(!1)};d.addEventListener("cancel",y);let g=p=>{p?(l=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(Dt(),a=!0),d.addEventListener("keydown",m),requestAnimationFrame(()=>{d.style.opacity="1";let h=d.querySelector(kn);h==null||h.focus()})):(t=!0,d.style.opacity="0",d.removeEventListener("keydown",m),i=setTimeout(()=>{i=null,t&&s(d)},350))};g(e.get());let u=e.addListener(g);c.addHook("Remove",()=>{i&&(clearTimeout(i),i=null),u(),d.removeEventListener("cancel",y),a&&(He(),a=!1),d.removeEventListener("keydown",m),l==null||l.focus(),l=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:c=>Aa(c,"inherit"),color:c=>fo(c,"shift-10",o),backgroundColor:c=>fo(c,"inherit",o),border:"none",borderRadius:c=>vn(Cn(c)*2),padding:c=>vn(Cn(c)*3),boxShadow:L("high"),"&::backdrop":{backgroundColor:c=>fo(c,"shift-2","neutral"),opacity:.75}}}}import{toState as Ha}from"@domphy/core";import{themeColor as Pt,themeSize as Fa,themeSpacing as Wa}from"@domphy/theme";function mm(r={}){var n;let o=Ha((n=r.color)!=null?n:"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:Wa(2),fontSize:e=>Fa(e,"inherit"),backgroundColor:e=>Pt(e),color:e=>Pt(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Pt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Pt(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as ja}from"@domphy/core";import{themeColor as yo,themeDensity as Ka,themeSize as Ya,themeSpacing as bo}from"@domphy/theme";var So={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},En={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},at=r=>r==="left"||r==="right";function wn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function fm(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:l}=r,t=ja(n),a=e==="start"||e==="end",s=wn(e,!1),c=at(s)?bo(80):bo(64),d=l!=null?l:c;return{_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(i,m)=>{i.target===m.domElement&&t.set(!1)},_onMount:i=>{let m=i.domElement;m.setAttribute("aria-modal","true");let y=E=>{E.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=wn(e,g);a&&(m.style.transform=So[u],m.style.margin=En[u],m.style.width=at(u)?d:"100dvw",m.style.height=at(u)?"100dvh":d);let p=!1,h=!1,x=null,v=()=>{x=null,p&&(p=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",h&&(He(),h=!1))},C=E=>{E.target===m&&E.propertyName==="transform"&&v()};m.addEventListener("transitionend",C);let D=E=>{E?(p=!1,m.style.visibility="visible",m.style.pointerEvents="auto",typeof m.showModal=="function"&&m.showModal(),h||(Dt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(p=!0,m.style.transform=So[u],x=setTimeout(v,350))};D(t.get());let P=t.addListener(D);i.addHook("Remove",()=>{x&&(clearTimeout(x),x=null),P(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",C),h&&(He(),h=!1)})},style:{transform:So[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:i=>Ya(i,"inherit"),color:i=>yo(i,"shift-10",o),backgroundColor:i=>yo(i,"inherit",o),border:"none",padding:i=>bo(Ka(i)*3),margin:En[s],width:at(s)?d:"100dvw",height:at(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:L("high"),"&::backdrop":{backgroundColor:i=>yo(i,"shift-2","neutral"),opacity:.75}}}}import{toState as Ga}from"@domphy/core";import{themeColor as qa,themeSize as Ua}from"@domphy/theme";function xm(r={}){var n;let o=Ga((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Ua(e,"inherit"),fontStyle:"italic",color:e=>qa(e,"shift-10",o.get(e))}}}import{toState as Xa}from"@domphy/core";import{themeColor as xo,themeSpacing as Co}from"@domphy/theme";function Em(r={}){var n;let o=Xa((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:Co(3),paddingBlock:Co(12),paddingInline:Co(6),textAlign:"center",color:e=>xo(e,"muted",o.get(e)),"& > :first-child":{color:e=>xo(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>xo(e,"text",o.get(e))}}}}function Tm(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let l=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([l])}}}import{toState as Za}from"@domphy/core";import{themeColor as Ot,themeSize as Ja,themeSpacing as Qa}from"@domphy/theme";var ei={small:8,medium:10,large:14};function zm(r={}){var e,l;let o=Za((e=r.color)!=null?e:"primary","color"),n=Qa(ei[(l=r.size)!=null?l:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>Ja(t,"inherit"),backgroundColor:t=>Ot(t,"inherit",o.get(t)),color:t=>Ot(t,"shift-0",o.get(t)),boxShadow:L("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Ot(t,"decrease-1",o.get(t)),boxShadow:L("medium")},"&:active:not([disabled])":{backgroundColor:t=>Ot(t,"decrease-2",o.get(t)),boxShadow:L("low")},"&:focus-visible":{boxShadow:t=>`${L("medium")}, ${b(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as ti}from"@domphy/core";import{themeColor as Tn,themeSize as oi,themeSpacing as Lt}from"@domphy/theme";function _m(r={}){var n;let o=ti((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Lt(2),marginInline:0,marginTop:Lt(3),marginBottom:Lt(3),color:e=>Tn(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Lt(2)},"& figcaption":{fontSize:e=>oi(e,"decrease-1"),color:e=>Tn(e,"muted",o.get(e)),lineHeight:1.45}}}}import{toState as ni}from"@domphy/core";import{themeColor as it,themeDensity as Fe,themeSize as vo,themeSpacing as ne}from"@domphy/theme";function Am(r={}){var l;let{layout:o="horizontal"}=r,n=ni((l=r.color)!=null?l:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>ne(Fe(t)*3),paddingBlock:t=>ne(Fe(t)*3),border:"none",borderRadius:t=>ne(Fe(t)*2),fontSize:t=>vo(t,"inherit"),backgroundColor:t=>it(t,"inherit",n.get(t)),color:t=>it(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:ne(4),rowGap:ne(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>vo(t,"inherit"),fontWeight:600,paddingBlock:t=>ne(Fe(t)*1),borderRadius:t=>ne(Fe(t)*2),color:t=>it(t,"text",n.get(t)),backgroundColor:t=>it(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:ne(Fe(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${ne(2)} * -1)`,fontSize:t=>vo(t,"decrease-1"),color:t=>it(t,"text",n.get(t))}}}}import{toState as ri}from"@domphy/core";import{themeColor as ai,themeSize as ii,themeSpacing as li}from"@domphy/theme";var si={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function jm(r={}){var n;let o=ri((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>ai(e,"shift-11",o.get(e)),marginTop:0,marginBottom:li(2),fontSize:e=>{let l=si[e.elementNode.tagName]||"inherit";return ii(e,l)}}}}import{toState as ci}from"@domphy/core";import{themeColor as Dn,themeSpacing as Pn}from"@domphy/theme";function qm(r={}){var n;let o=ci((n=r.color)!=null?n:"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:Pn(3),marginBottom:Pn(3),backgroundColor:e=>Dn(e,"inherit",o.get(e)),color:e=>Dn(e,"text",o.get(e))}}}import{toState as mi}from"@domphy/core";import{themeColor as ui,themeSize as di,themeSpacing as On}from"@domphy/theme";function Jm(r={}){var n;let o=mi((n=r.color)!=null?n:"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:On(4),height:On(4),flexShrink:"0",fontSize:e=>di(e),backgroundColor:"transparent",color:e=>ui(e,"text",o.get(e))}}}import{toState as pi}from"@domphy/core";import{themeColor as Ln,themeSpacing as hi}from"@domphy/theme";function ou(r={}){var n;let o=pi((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:hi(2),backgroundColor:e=>Ln(e,"inherit",o.get(e)),color:e=>Ln(e,"text",o.get(e))}}}import{toState as In}from"@domphy/core";import{themeColor as F,themeSize as gi,themeSpacing as Oe}from"@domphy/theme";function lu(r={}){var e,l;let o=In((e=r.color)!=null?e:"neutral","color"),n=In((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>gi(t,"inherit"),color:t=>F(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:Oe(6),height:Oe(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:Oe(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${F(t,"border-strong",o.get(t))}`,color:t=>F(t,"text",o.get(t)),width:Oe(4),height:Oe(4)},"&:hover::before":{backgroundColor:t=>F(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${F(t,"shift-6",n.get(t))}`,backgroundColor:t=>F(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>F(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${Oe(.5)} solid ${F(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${F(t,"shift-6",n.get(t))}`,backgroundColor:t=>F(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>F(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>F(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:Oe(1.5),boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>F(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as fi}from"@domphy/core";import{themeColor as ko,themeDensity as We,themeSize as yi,themeSpacing as je}from"@domphy/theme";function du(r={}){var n;let o=fi((n=r.color)!=null?n:"neutral","color");return{type:"color",_onSchedule:(e,l)=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),l.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>yi(e,"inherit"),color:e=>ko(e,"text",o.get(e)),paddingBlock:e=>je(We(e)*1),paddingInline:e=>je(We(e)*1),blockSize:e=>je(6+We(e)*2),inlineSize:e=>je(6+We(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>je(We(e)*1.5),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>je(We(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>ko(e,"shift-2","neutral"),outline:e=>`1px solid ${ko(e,"border-strong","neutral")}`}}}}import{toState as zn}from"@domphy/core";import{themeColor as de,themeDensity as Eo,themeSize as bi,themeSpacing as It}from"@domphy/theme";function yu(r={}){var l,t;let{mode:o="datetime-local"}=r,n=zn((l=r.color)!=null?l:"neutral","color"),e=zn((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:a=>bi(a,"inherit"),lineHeight:"inherit",color:a=>de(a,"text",n.get(a)),backgroundColor:a=>de(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${de(a,"border-strong",n.get(a))}`,borderRadius:a=>It(Eo(a)*1.5),paddingInline:a=>It(Eo(a)*3),height:a=>It(6+Eo(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 ${de(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>de(a,"muted","neutral"),backgroundColor:a=>de(a,"shift-2","neutral"),outline:a=>`1px solid ${de(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${It(.5)} solid ${de(a,"shift-6","error")}`}}}}import{toState as Vn}from"@domphy/core";import{themeColor as G,themeDensity as zt,themeSize as Si,themeSpacing as Le}from"@domphy/theme";function vu(r={}){var e,l;let o=Vn((e=r.color)!=null?e:"neutral","color"),n=Vn((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>Si(t,"inherit"),lineHeight:"inherit",color:t=>G(t,"text",o.get(t)),backgroundColor:t=>G(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${G(t,"border-strong",o.get(t))}`,borderRadius:t=>Le(zt(t)*1.5),height:t=>Le(6+zt(t)*2),paddingInline:t=>Le(zt(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>Le(zt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:Le(1),height:Le(6),paddingInline:Le(2),cursor:"pointer",color:t=>G(t,"shift-11",o.get(t)),backgroundColor:t=>G(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${G(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>G(t,"muted","neutral"),outline:t=>`1px solid ${G(t,"border-strong","neutral")}`,backgroundColor:t=>G(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>G(t,"muted","neutral"),backgroundColor:t=>G(t,"shift-3","neutral")}}}}import{toState as Rn}from"@domphy/core";import{themeColor as Ie,themeDensity as Vt,themeSize as xi,themeSpacing as lt}from"@domphy/theme";function Du(r={}){var e,l;let o=Rn((e=r.color)!=null?e:"neutral","color"),n=Rn((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:lt(10),paddingInlineStart:t=>lt(Vt(t)*3),paddingInlineEnd:t=>lt(Vt(t)*1.5),paddingBlock:t=>lt(Vt(t)*1),borderRadius:t=>lt(Vt(t)*1.5),fontSize:t=>xi(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ie(t,"border-strong",o.get(t))}`,color:t=>Ie(t,"text",o.get(t)),backgroundColor:t=>Ie(t,"inherit",o.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 ${Ie(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ie(t,"shift-2","neutral"),outline:t=>`1px solid ${Ie(t,"border-strong","neutral")}`,color:t=>Ie(t,"muted","neutral")}}}}import{themeSpacing as $n}from"@domphy/theme";function Lu(){return{style:{display:"flex",alignItems:"center",gap:$n(2),"& > *":{minWidth:`${$n(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),c=a.target,d=s.indexOf(c);c.value&&d<s.length-1&&s[d+1].focus()},l=a=>{let s=n(),c=a.target,d=s.indexOf(c);a.key==="Backspace"&&!c.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},t=a=>{var y,g,u;a.preventDefault();let s=(g=(y=a.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",c=n(),d=c.indexOf(a.target),i=d===-1?0:d;[...s].forEach((p,h)=>{c[i+h]&&(c[i+h].value=p)});let m=Math.min(i+s.length-1,c.length-1);(u=c[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",l),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",l),o.removeEventListener("paste",t)})}}}import{toState as wo}from"@domphy/core";import{themeColor as Rt,themeDensity as $t,themeSize as Ci,themeSpacing as _t}from"@domphy/theme";var vi='<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>',ki='<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>';function $u(r={}){var l,t;let o=wo((l=r.color)!=null?l:"neutral","color"),n=wo((t=r.accentColor)!=null?t:"primary","accentColor"),e=wo(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:d=>e.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},c={button:d=>e.get(d)?ki:vi,type:"button",ariaLabel:d=>e.get(d)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(c)},style:{display:"flex",alignItems:"center",gap:a=>_t($t(a)*1),paddingBlock:a=>_t($t(a)*1),paddingInline:a=>_t($t(a)*3),borderRadius:a=>_t($t(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${Rt(a,"border-strong",o.get(a))}`,color:a=>Rt(a,"text",o.get(a)),backgroundColor:a=>Rt(a,"inherit",o.get(a)),fontSize:a=>Ci(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${Rt(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>b(a,n.get(a))}}}}import{toState as _n}from"@domphy/core";import{themeColor as pe,themeSize as Ei,themeSpacing as Mt}from"@domphy/theme";function Au(r={}){var e,l;let o=_n((e=r.color)!=null?e:"neutral","color"),n=_n((l=r.accentColor)!=null?l:"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=>Ei(t,"inherit"),color:t=>pe(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:Mt(6),height:Mt(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 ${pe(t,"border-strong",o.get(t))}`,color:t=>pe(t,"text",o.get(t)),width:Mt(4),height:Mt(4)},"&:hover::before":{backgroundColor:t=>pe(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${pe(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>pe(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>pe(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>b(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>pe(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Mn}from"@domphy/core";import{themeColor as To,themeSpacing as re}from"@domphy/theme";function Ku(r={}){var e,l;let o=Mn((e=r.color)!=null?e:"neutral","color"),n=Mn((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:re(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:re(1.5),borderRadius:re(999),backgroundColor:t=>To(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:re(4),height:re(4),borderRadius:re(999),border:"none",marginTop:`calc((${re(1.5)} - ${re(4)}) / 2)`,backgroundColor:t=>To(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>To(t,"shift-10",n.get(t))},borderRadius:re(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Bn}from"@domphy/core";import{themeColor as he,themeDensity as Do,themeSize as wi,themeSpacing as Bt}from"@domphy/theme";function Xu(r={}){var e,l;let o=Bn((e=r.color)!=null?e:"neutral","color"),n=Bn((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>wi(t,"inherit"),lineHeight:"inherit",color:t=>he(t,"text",o.get(t)),backgroundColor:t=>he(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${he(t,"border-strong",o.get(t))}`,borderRadius:t=>Bt(Do(t)*1.5),minWidth:Bt(32),paddingInline:t=>Bt(Do(t)*3),paddingBlock:t=>Bt(Do(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>he(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${he(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>he(t,"muted","neutral"),backgroundColor:t=>he(t,"shift-2","neutral"),outline:t=>`1px solid ${he(t,"border-strong","neutral")}`}}}}import{toState as Ti}from"@domphy/core";import{themeColor as st,themeSize as Nn,themeSpacing as Z}from"@domphy/theme";function td(r={}){var n;let o=Ti((n=r.accentColor)!=null?n:"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=>Nn(e,"inherit"),backgroundColor:e=>st(e,"inherit"),color:e=>st(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:Z(9),height:Z(6),cursor:"pointer",margin:"0",paddingBlock:Z(1),transition:"box-shadow 140ms ease",borderRadius:Z(999),"&:focus-visible":{boxShadow:e=>b(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>st(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${Z(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:Z(3),height:Z(3),borderRadius:Z(999),left:Z(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>st(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:Z(999),display:"inline-block",fontSize:e=>Nn(e,"inherit"),lineHeight:1,backgroundColor:e=>st(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as An}from"@domphy/core";import{themeColor as K,themeDensity as Po,themeSize as Di,themeSpacing as ze}from"@domphy/theme";function id(r={}){var e,l;let o=An((e=r.color)!=null?e:"neutral","color"),n=An((l=r.accentColor)!=null?l:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:ze(10),paddingInline:t=>ze(Po(t)*3),paddingBlock:t=>ze(Po(t)*1),borderRadius:t=>ze(Po(t)*1.5),fontSize:t=>Di(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${K(t,"border-strong",o.get(t))}`,color:t=>K(t,"text",o.get(t)),backgroundColor:t=>K(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>K(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>K(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${K(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>K(t,"shift-2","neutral"),outline:t=>`1px solid ${K(t,"border-strong","neutral")}`,color:t=>K(t,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${ze(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${ze(.5)} solid ${K(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${ze(.5)} solid ${K(t,"shift-6","warning")}`}}}}import{toState as Pi}from"@domphy/core";import{themeColor as Oo,themeSize as Oi,themeSpacing as Lo}from"@domphy/theme";function md(r={}){var n;let o=Pi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Oi(e,"inherit"),color:e=>Oo(e,"text",o.get(e)),backgroundColor:e=>Oo(e,"inherit",o.get(e)),paddingBlock:Lo(.5),paddingInline:Lo(1.5),borderRadius:Lo(1),outline:e=>`1px solid ${Oo(e,"border-strong",o.get(e))}`}}}import{toState as Hn}from"@domphy/core";import{themeColor as Io,themeSize as Li,themeSpacing as Ii}from"@domphy/theme";function hd(r={}){var e,l;let o=Hn((e=r.color)!=null?e:"neutral","color"),n=Hn((l=r.accentColor)!=null?l:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Ii(2),fontSize:t=>Li(t,"inherit"),color:t=>Io(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Io(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Io(t,"muted","neutral")}}}}import{toState as Fn}from"@domphy/core";import{themeColor as ct,themeSize as zi,themeSpacing as Vi}from"@domphy/theme";function Sd(r={}){var e,l;let o=Fn((e=r.color)!=null?e:"primary","color"),n=Fn((l=r.accentColor)!=null?l:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>zi(t,"inherit"),backgroundColor:t=>ct(t),color:t=>ct(t,"text",o.get(t)),textDecoration:"none","&:visited":{color:t=>ct(t,"text",n.get(t))},"&:hover:not([disabled])":{color:t=>ct(t,"shift-10",o.get(t)),textDecoration:"underline"},borderRadius:Vi(1),transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>ct(t,"muted","neutral")}}}}import{toState as Ri}from"@domphy/core";import{themeColor as $,themeDensity as ge,themeSize as Wn,themeSpacing as fe}from"@domphy/theme";var $i={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},_i={small:.5,medium:1,large:1.5};function wd(r={}){var s,c,d;let o=(s=r.variant)!=null?s:"outline",n=Ri((c=r.color)!=null?c:o==="ghost"?"neutral":"primary","color"),e=(d=r.size)!=null?d:"medium",l=Be[e];if(o==="ghost"){let i=_i[e];return{_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:m=>Wn(m,l),textDecoration:"none",paddingBlock:m=>fe(ge(m)*i),paddingInline:m=>fe(ge(m)*i),borderRadius:m=>fe(ge(m)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>fe(ge(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:m=>$(m,"shift-6",n.get(m)),"&:hover:not([aria-disabled=true])":{color:m=>$(m,"text",n.get(m)),backgroundColor:m=>$(m,"hover",n.get(m)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:m=>$(m,"text",n.get(m)),backgroundColor:m=>$(m,"increase-2",n.get(m))},"&:focus-visible":{boxShadow:m=>b(m,n.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:m=>$(m,"border-strong","neutral")}}}}let t=o==="solid",a=$i[e];return q(I({_onInsert:i=>{i.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{dataTone:"shift-17",_doctorDisable:["low-contrast","color-shift-minimum"]}:{}),{style:{fontSize:i=>Wn(i,l),textDecoration:"none",paddingBlock:i=>fe(ge(i)*a.block),paddingInline:i=>fe(ge(i)*a.inline),borderRadius:i=>fe(ge(i)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>fe(ge(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":i=>`1px solid ${$(i,"border-strong",n.get(i))}`,color:i=>t?$(i,"shift-0",n.get(i)):$(i,"text",n.get(i)),backgroundColor:i=>$(i,"inherit",n.get(i)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:i=>t?$(i,"shift-0",n.get(i)):$(i,"shift-10",n.get(i)),backgroundColor:i=>t?$(i,"decrease-1",n.get(i)):$(i,"hover",n.get(i))},"&:active:not([aria-disabled=true])":{backgroundColor:i=>t?$(i,"decrease-2",n.get(i)):$(i,"increase-2",n.get(i))},"&:focus-visible":{boxShadow:i=>b(i,n.get(i))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:i=>$(i,"shift-2","neutral"),outline:i=>`1px solid ${$(i,"border-strong","neutral")}`,color:i=>$(i,"muted","neutral")}}})}import{toState as Mi}from"@domphy/core";import{themeColor as Ke,themeDensity as Ve,themeSize as jn,themeSpacing as Re}from"@domphy/theme";function Id(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function zd(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>Re(Ve(n)*2),paddingBlock:n=>Re(o?1:Ve(n)*2),paddingInline:n=>Re(Ve(n)*3),fontSize:n=>jn(n,"inherit"),color:n=>Ke(n,"text")}}}function Vd(r={}){var l,t;let o=Mi((l=r.color)!=null?l:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>Re(Ve(a)*2),paddingBlock:a=>Re(e?1:Ve(a)*2),paddingInline:a=>Re(Ve(a)*3),fontSize:a=>jn(a,"inherit"),color:a=>Ke(a,"text",o.get(a)),borderRadius:a=>Re(Ve(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>Ke(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>Ke(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>Ke(a,"shift-3",n),color:a=>Ke(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>b(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Bi}from"@domphy/core";import{themeColor as Kn,themeSize as Ni,themeSpacing as zo}from"@domphy/theme";function Md(r={}){var n;let o=Bi((n=r.accentColor)!=null?n:"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=>Ni(e,"inherit"),color:e=>Kn(e,"text",o.get(e)),backgroundColor:e=>Kn(e,"inherit",o.get(e)),height:zo(6),borderRadius:zo(1),paddingInline:zo(1.5)}}}import{toState as Ai}from"@domphy/core";import{themeColor as ye,themeDensity as mt,themeSize as Yn,themeSpacing as Ye}from"@domphy/theme";function Wd(r={items:[]}){var a;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:l="primary"}=r,t=Ai((a=r.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,c)=>{if(o.length===0)return;let d=s.nodeId,i=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return q(I({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,type:"button",id:`menuitem${d}${g}`,role:"menuitem"},n?{ariaCurrent:p=>t.get(p)===g||void 0}:{}),{onClick:()=>{var p;n&&t.set(g),(p=m.onClick)==null||p.call(m)},onKeyDown:p=>{var D;let h=p.key;if(h==="Enter"||h===" "){p.preventDefault(),p.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;p.preventDefault();let x=o.map((P,E)=>{var O;return(O=P.key)!=null?O:E}),v=x.indexOf(g),C=v;h==="ArrowDown"?C=(v+1)%x.length:h==="ArrowUp"?C=(v-1+x.length)%x.length:h==="Home"?C=0:h==="End"&&(C=x.length-1),(D=document.getElementById(`menuitem${d}${x[C]}`))==null||D.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Ye(2),width:"100%",fontSize:p=>Yn(p,"inherit"),height:p=>Ye(6+mt(p)*2),paddingInline:p=>Ye(mt(p)*3),border:"none",outline:"none",color:p=>ye(p,"text",e),backgroundColor:p=>ye(p,"inherit",e),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:p=>ye(p,"hover",e)},"&[aria-current=true]":{backgroundColor:p=>ye(p,"shift-3",l),color:p=>ye(p,"shift-10")},"&:focus-visible":{boxShadow:p=>b(p,l)}}})});c[s.tagName]=i},style:{display:"flex",flexDirection:"column",paddingBlock:s=>Ye(mt(s)*2),paddingInline:s=>Ye(mt(s)*2),fontSize:s=>Yn(s,"inherit"),backgroundColor:s=>ye(s,"inherit",e),color:s=>ye(s,"text",e),borderRadius:s=>Ye(mt(s)*2),outline:s=>`1px solid ${ye(s,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:L("medium")}}}var Vo=r=>!!r&&typeof r.get=="function"&&r._isState===!0,J=r=>{let o={},n=[];for(let e in r){let l=r[e];e==="x"?n.push(`translateX(${typeof l=="number"?`${l}px`:l})`):e==="y"?n.push(`translateY(${typeof l=="number"?`${l}px`:l})`):e==="scale"?n.push(`scale(${l})`):e==="rotate"?n.push(`rotate(${typeof l=="number"?`${l}deg`:l})`):o[e]=l}return n.length&&(o.transform=n.join(" ")),o};function Gn(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function Yd(r={}){var a,s,c,d;let{initial:o,animate:n,exit:e,transition:l={}}=r,t={duration:(a=l.duration)!=null?a:300,delay:(s=l.delay)!=null?s:0,easing:(c=l.easing)!=null?c:"ease",iterations:(d=l.iterations)!=null?d:1,fill:"both"};return{_onMount:i=>{let m=i.domElement;if(!m||typeof m.animate!="function")return;let y=Vo(n)?n.get():n;if(Gn()){if(y?Object.assign(m.style,J(y)):o&&Object.assign(m.style,J(o)),Vo(n)){let g=n.addListener(u=>{Object.assign(m.style,J(u))});i.setMetadata("motionRelease",g)}return}if(y?m.animate(o?[J(o),J(y)]:[J(y)],t):o&&Object.assign(m.style,J(o)),Vo(n)){let g=n.addListener(u=>{m.animate([J(u)],t)});i.setMetadata("motionRelease",g)}},_onBeforeRemove:(i,m)=>{let y=i.domElement;if(!y||!e||typeof y.animate!="function")return m();if(Gn())return Object.assign(y.style,J(e)),m();y.animate([J(e)],t).finished.then(m,m)},_onRemove:i=>{let m=i.getMetadata("motionRelease");m==null||m()}}}import{toState as Hi}from"@domphy/core";import{themeColor as qn,themeSize as Fi,themeSpacing as Wi}from"@domphy/theme";function Xd(r={}){var n;let o=Hi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>Fi(e,"inherit"),backgroundColor:e=>qn(e),color:e=>qn(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Wi(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as ji}from"@domphy/core";import{themeColor as Ge,themeDensity as ut,themeSize as Ki,themeSpacing as qe}from"@domphy/theme";function Yi(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),l=Math.min(o-1,r+1);for(let t=e;t<=l;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function tp(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,l=ji((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:c=>qe(6+ut(c)*2),height:c=>qe(6+ut(c)*2),paddingInline:c=>qe(ut(c)*2),borderRadius:c=>qe(ut(c)*1.5),border:"none",cursor:"pointer",fontSize:c=>Ki(c,"inherit"),backgroundColor:"transparent",color:c=>Ge(c,"text",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:c=>Ge(c,"hover",n)},"&:focus-visible":{boxShadow:c=>b(c,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=q(I({},t),{backgroundColor:c=>Ge(c,"shift-6",e),color:c=>Ge(c,"shift-11",e),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:c=>Ge(c,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:c=>{c.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:c=>{let d={div:i=>{let m=l.get(i),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&l.set(m-1),style:t});let g=0;for(let u of Yi(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:p=>qe(ut(p)*2),color:p=>Ge(p,"shift-7",n)}});else{let p=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:p?"page":void 0,disabled:p,onClick:()=>l.set(u),style:p?a:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&l.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:qe(1)}};c.children.insert(d)},style:{display:"inline-flex"}}}import{toState as Gi}from"@domphy/core";import{themeColor as qi,themeDensity as Ui,themeSpacing as Xi}from"@domphy/theme";function ip(r={}){var l;let{padding:o=4,divider:n=!1}=r,e=Gi((l=r.color)!=null?l:"neutral","color");return{style:I({padding:t=>Xi(Ui(t)*o)},n?{borderBottom:t=>`1px solid ${qi(t,"border",e.get(t))}`}:{})}}import{toState as Zi}from"@domphy/core";import{themeColor as Ji,themeSize as Qi}from"@domphy/theme";function up(r={}){var n;let o=Zi((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Qi(e,"inherit"),color:e=>Ji(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as el,toState as Un}from"@domphy/core";import{themeColor as Xn,themeDensity as tl,themeSpacing as ol}from"@domphy/theme";function yp(r){var y;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,l=null,t=Un(o),a=Un(n),{show:s,hide:c,anchorPartial:d}=X({kind:"popover",open:t,placement:a,content:r.content,keepOpenOnContentHover:e==="hover"}),i={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>Xn(g,"inherit"),borderRadius:g=>ol(tl(g)*2),outline:g=>`1px solid ${Xn(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:L("medium")},_onInsert:g=>{let u=g.attributes.get("id");l=u||g.nodeId,!u&&g.attributes.set("id",l)}};return(y=r.content).$||(y.$=[]),r.content.$.push(i),el(d,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&s(u),onMouseLeave:(g,u)=>e==="hover"&&c(u),onClick:(g,u)=>{e==="click"&&(t.get()?c(u):s(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&c(u)},onFocus:(g,u)=>e==="hover"&&s(u),onBlur:(g,u)=>{let p=g.relatedTarget,h=u.getRoot().domElement,x=l?h.querySelector(`#${CSS.escape(l)}`):null;p&&(x!=null&&x.contains(p))||c(u)},_onMount:g=>l&&g.attributes.set("ariaControls",l)}),d}import{toState as nl}from"@domphy/core";import{themeColor as Nt,themeSize as rl,themeSpacing as Ro}from"@domphy/theme";function Zn(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=Ro(6),bordered:l=!0}=r,t=nl(o),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"},s=i=>{var m;return(m=a[t.get(i)])!=null?m:a["bottom-end"]},c=i=>i.includes("start")?e:i.includes("end")?"auto":"50%",d=i=>i.includes("end")?e:i.includes("start")?"auto":"50%";return{style:{fontSize:i=>rl(i),backgroundColor:i=>Nt(i),color:i=>Nt(i,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:Ro(1.5),height:Ro(1.5),backgroundColor:i=>Nt(i,"inherit",n),borderWidth:l?"1px":0,borderColor:i=>Nt(i,"inherit",n),borderTopStyle:i=>{let m=s(i);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:i=>{let m=s(i);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:i=>{let m=s(i);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:i=>{let m=s(i);return m.includes("top")?0:m.includes("bottom")?"auto":c(m)},right:i=>{let m=s(i);return m.includes("right")?0:m.includes("left")?"auto":d(m)},bottom:i=>{let m=s(i);return m.includes("bottom")?0:m.includes("top")?"auto":d(m)},left:i=>{let m=s(i);return m.includes("left")?0:m.includes("right")?"auto":c(m)},transform:i=>{let m=s(i),y=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",g=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${y},${g}) rotate(45deg)`}}}}}import{toState as al}from"@domphy/core";import{themeColor as Jn,themeDensity as $o,themeSize as il,themeSpacing as _o}from"@domphy/theme";function Ep(r={}){var n;let o=al((n=r.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>il(e,"inherit"),color:e=>Jn(e,"text",o.get(e)),backgroundColor:e=>Jn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>_o($o(e)*2),paddingInline:e=>_o($o(e)*3),borderRadius:e=>_o($o(e)*2)}}}import{toState as Qn}from"@domphy/core";import{themeColor as At,themeSpacing as Ht}from"@domphy/theme";function Pp(r={}){var e,l;let o=Qn((e=r.color)!=null?e:"neutral","color"),n=Qn((l=r.accentColor)!=null?l:"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:Ht(2),border:0,borderRadius:Ht(999),overflow:"hidden",backgroundColor:t=>At(t,"inherit",o.get(t)),color:t=>At(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>At(t,"inherit",o.get(t)),borderRadius:Ht(999)},"&::-webkit-progress-value":{backgroundColor:t=>At(t,"shift-9",n.get(t)),borderRadius:Ht(999),transition:"width 220ms ease"}}}}import{toState as er}from"@domphy/core";import{themeColor as ll,themeSize as sl,themeSpacing as tr}from"@domphy/theme";var cl='<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>',ml='<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 Vp(r={}){var c,d;let{max:o=5,readOnly:n=!1,onChange:e}=r,l=(c=r.color)!=null?c:"warning",t=er((d=r.value)!=null?d:0),a=er(0),s=i=>{let m=a.get(i);return m>0?m:t.get(i)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:tr(.5),fontSize:i=>sl(i,"increase-1"),cursor:n?"default":"pointer",color:i=>ll(i,"muted",l)},_onInit:i=>{for(let m=1;m<=o;m++){let y=m,g=n?{}:{onClick:()=>{let p=y===t.get()?0:y;t.set(p),e==null||e(p),a.set(0)},onMouseEnter:()=>a.set(y),onMouseLeave:()=>a.set(0),onKeyDown:p=>{var C,D;let h=t.get(),x=h;if(p.key==="ArrowRight"||p.key==="ArrowUp")x=Math.min(o,h+1),p.preventDefault();else if(p.key==="ArrowLeft"||p.key==="ArrowDown")x=Math.max(0,h-1),p.preventDefault();else return;t.set(x),e==null||e(x);let v=x>0?x-1:0;(D=(C=i.domElement)==null?void 0:C.children[v])==null||D.focus()}},u=q(I({button:p=>y<=s(p)?cl:ml,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",outline:"none",borderRadius:tr(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>b(p,l)}}});i.children.insert(u)}}}}import{toState as Mo}from"@domphy/core";import{themeColor as Bo,themeSpacing as or}from"@domphy/theme";function Bp(r={}){var c,d,i;let{size:o=16,thickness:n=.25}=r,e=Mo((c=r.value)!=null?c:0,"value"),l=Mo((d=r.color)!=null?d:"primary","color"),t=Mo((i=r.trackColor)!=null?i:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:m=>String(Math.round(e.get(m))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:m=>{m.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:or(o),height:or(o),borderRadius:"50%",color:m=>Bo(m,"shift-9",l.get(m)),background:m=>`conic-gradient(from -90deg, ${Bo(m,"shift-9",l.get(m))} ${e.get(m)}%, ${Bo(m,"shift-3",t.get(m))} 0%)`,WebkitMask:s,mask:s}}}import{themeDensity as ul,themeSpacing as dl}from"@domphy/theme";function nr(r={}){let{gap:o=4,align:n="center",justify:e,wrap:l=!1}=r;return{style:I(I({display:"flex",alignItems:n,gap:t=>dl(ul(t)*o)},e?{justifyContent:e}:{}),l?{flexWrap:"wrap"}:{})}}import{toState as pl}from"@domphy/core";import{themeColor as Ft,themeSpacing as Wt}from"@domphy/theme";function Kp(r={}){var n;let o=pl((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>Ft(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:Wt(2),height:Wt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Ft(e,"shift-5",o.get(e)),borderRadius:Wt(999),border:`${Wt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Ft(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Ft(e,"shift-5",o.get(e))} transparent`}}}import{toState as hl}from"@domphy/core";import{themeColor as $e,themeSize as gl,themeSpacing as be}from"@domphy/theme";function Zp(r={items:[]}){var t,a,s;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,l=hl((s=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:l}},_onSchedule:(c,d)=>{let i=o.map((m,y)=>{var p;let g=(p=m.key)!=null?p:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,type:"button",role:"radio",ariaChecked:h=>l.get(h)===g,onClick:()=>l.set(g),style:{cursor:"pointer",fontSize:h=>gl(h,"inherit"),height:be(6),paddingBlock:be(1),paddingInline:be(3),border:"none",borderRadius:be(10),color:h=>$e(h,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>$e(h,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>$e(h,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:h=>$e(h,"shift-0",e),color:h=>$e(h,"shift-10",e),boxShadow:L("low")},"&:focus-visible":{boxShadow:h=>b(h,e)},"&[aria-checked=true]:focus-visible":{boxShadow:h=>`${L("low")}, ${b(h,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[c.tagName]=i},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:be(1),paddingInline:be(1),gap:be(.5),borderRadius:be(10),backgroundColor:c=>$e(c,"inherit",n),color:c=>$e(c,"text",n)}}}import{themeColor as ae,themeColorToken as fl,themeDensity as dt,themeSize as yl,themeSpacing as Se}from"@domphy/theme";function th(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>yl(e,"inherit"),lineHeight:"inherit",color:e=>ae(e,"text",o),backgroundColor:e=>ae(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${ae(e,"border-strong",o)}`,borderRadius:e=>Se(dt(e)*1.5),paddingBlock:e=>Se(dt(e)*1),paddingLeft:e=>Se(dt(e)*3),paddingRight:e=>Se(dt(e)*5),backgroundImage:e=>{let l=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${fl(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(l)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${Se(2)} center`,backgroundSize:`${Se(2.5)} ${Se(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>Se(6+dt(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${ae(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>b(e,n)},"& optgroup":{color:e=>ae(e,"shift-11",o)},"& option[disabled]":{color:e=>ae(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>ae(e,"muted","neutral"),outline:e=>`1px solid ${ae(e,"border-strong","neutral")}`,backgroundColor:e=>ae(e,"shift-2","neutral")}}}}import{merge as rr,toState as No}from"@domphy/core";import{themeColor as pt,themeDensity as jt,themeSize as bl,themeSpacing as Ue}from"@domphy/theme";function ch(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:l=!1,multiple:t=!1}=r,a=No(r.value),s=No(l),{show:c,hide:d,anchorPartial:i}=X({kind:"selectBox",open:s,placement:No(n),content:r.content}),m={onClick:(u,p)=>!t&&d(p),dataTone:"shift-14",style:{backgroundColor:u=>pt(u,"inherit"),borderRadius:u=>Ue(jt(u)*2),outline:u=>`1px solid ${pt(u,"border-strong")}`,outlineOffset:"-1px",boxShadow:L("medium")}};rr(r.content,m);let y={div:u=>{let p=a.get(u),h=Array.isArray(p)?p:[p];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[kt({color:e,removable:t})],_key:v.value,_onRemove:C=>{let D=a.get(),E=(Array.isArray(D)?D:[D]).filter(O=>O!==v.value);t?a.set(E):a.set(E[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Ue(1),flex:1}},g={_onInsert:u=>{u.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:u=>u.children.insert(y),onClick:(u,p)=>s.get()?d(p):c(p),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>Ue(6+jt(u)*2),minWidth:Ue(32),outlineOffset:"-1px",outline:u=>`1px solid ${pt(u,"border-strong","neutral")}`,paddingInline:u=>Ue(jt(u)*2),borderRadius:u=>Ue(jt(u)*1.5),fontSize:u=>bl(u,"inherit"),color:u=>pt(u,"text",e),backgroundColor:u=>pt(u,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:u=>b(u,e)}}};return rr(i,g),i}import{themeColor as ht,themeDensity as ar,themeSize as Sl,themeSpacing as ir}from"@domphy/theme";function ph(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let s=a.value;t.attributes.set("ariaSelected",c=>{let d=s.get(c);return a.multiple?d.includes(e):d===e}),t.addEvent("click",()=>{let c=s.get();a.multiple?c.includes(e)?s.set(c.filter(d=>d!==e)):s.set(c.concat([e])):c!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Sl(t,"inherit"),height:t=>ir(6+ar(t)*2),paddingInline:t=>ir(ar(t)*3),border:"none",outline:"none",color:t=>ht(t,"text",n),backgroundColor:t=>ht(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>ht(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>ht(t,"shift-6",o),color:t=>ht(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>b(t,o)}}}}import{toState as xl}from"@domphy/core";import{themeColor as lr,themeDensity as sr,themeSize as Cl,themeSpacing as cr}from"@domphy/theme";function yh(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=xl((a=r.value)!=null?a:n?[]:null),l={div:s=>{let c=e.get(s);return(Array.isArray(c)?c:[c]).map(i=>({input:null,name:r.name,value:i==null?"":String(i)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(l)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>cr(sr(s)*2),paddingInline:s=>cr(sr(s)*2),fontSize:s=>Cl(s,"inherit"),backgroundColor:s=>lr(s,"inherit",o),color:s=>lr(s,"text",o)}}}import{hashString as vl,toState as kl}from"@domphy/core";import{themeColor as gt,themeSize as El,themeSpacing as mr}from"@domphy/theme";function Ch(r={}){var l;let o=kl((l=r.color)!=null?l:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=vl(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>El(t),color:t=>gt(t,"text",o.get(t)),height:mr(6),display:"block",borderRadius:mr(1),backgroundColor:t=>gt(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${gt(t,"inherit",o.get(t))} 0%, ${gt(t,"shift-4",o.get(t))} 50%, ${gt(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{toState as wl}from"@domphy/core";import{themeColor as Tl,themeSize as Dl}from"@domphy/theme";function wh(r={}){var n;let o=wl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>Dl(e,"inherit"),color:e=>Tl(e,"shift-10",o.get(e))}}}import{hashString as Pl,toState as Ol}from"@domphy/core";import{themeColor as Kt,themeSize as Ll,themeSpacing as Ao}from"@domphy/theme";var dr={to:{transform:"rotate(360deg)"}},ur=Pl(JSON.stringify(dr));function Oh(r={}){var n;let o=Ol((n=r.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Ll(e),backgroundColor:e=>Kt(e),color:e=>Kt(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Ao(6),height:Ao(6),borderRadius:"50%",border:e=>`${Ao(.5)} solid ${Kt(e,"border-strong",o.get(e))}`,borderTopColor:e=>Kt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${ur} 0.7s linear infinite`,[`@keyframes ${ur}`]:dr}}}import{merge as Il,toState as zl}from"@domphy/core";import{themeColor as Yt,themeSpacing as Ho}from"@domphy/theme";function Rh(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:l=90}=r;return{_onSchedule:(t,a)=>{Il(a,{_context:{splitter:{direction:o,size:zl(n),min:e,max:l,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function $h(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height",l=o.panelCount++===0,t=s=>{n.style[e]=`${l?s:100-s}%`};t(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=o.size.addListener(t);r.addHook("Remove",a)}}}function _h(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let l=o.size.addListener(c=>{n.setAttribute("aria-valuenow",String(Math.round(c)))}),t=c=>{let d=c.shiftKey?10:1,i=null;e?c.key==="ArrowRight"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowLeft"&&(i=Math.max(o.size.get()-d,o.min)):c.key==="ArrowDown"?i=Math.min(o.size.get()+d,o.max):c.key==="ArrowUp"&&(i=Math.max(o.size.get()-d,o.min)),c.key==="Home"?i=o.min:c.key==="End"&&(i=o.max),i!==null&&(c.preventDefault(),o.size.set(i))},a=null,s=c=>{c.preventDefault();let d=n.parentElement,i=y=>{let g=d.getBoundingClientRect(),u=e?(y.clientX-g.left)/g.width*100:(y.clientY-g.top)/g.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",i),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),l(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>Yt(r,"inherit"),color:r=>Yt(r,"text"),"&:hover":{backgroundColor:r=>Yt(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>b(r,"primary")},"&::after":{content:'""',width:Ho(1),height:Ho(1),borderRadius:Ho(999),backgroundColor:r=>Yt(r,"shift-4")}}}}import{themeDensity as Vl,themeSpacing as Rl}from"@domphy/theme";function Nh(r={}){let{gap:o=3,align:n}=r;return{style:I({display:"flex",flexDirection:"column",gap:e=>Rl(Vl(e)*o)},n?{alignItems:n}:{})}}import{toState as $l}from"@domphy/core";import{themeColor as B,themeSize as pr,themeSpacing as xe}from"@domphy/theme";function jh(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:l="primary"}=r,t=$l((a=r.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:t,direction:n,color:e,accentColor:l}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var g;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(g=i.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let p=t.get(u);return m<p?"done":m===p?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:xe(1),flex:"1",fontSize:u=>pr(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:xe(6),height:xe(6),borderRadius:xe(999),fontSize:u=>pr(u,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:u=>`2px solid ${B(u,"border-strong",e)}`,backgroundColor:u=>B(u,"inherit"),color:u=>B(u,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:xe(3),right:`calc(50% + ${xe(3)})`,left:`calc(-50% + ${xe(3)})`,height:"2px",backgroundColor:u=>B(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>B(u,"shift-9",l),borderColor:u=>B(u,"shift-9",l),color:u=>B(u,"shift-0",l),boxShadow:u=>`0 0 0 3px ${B(u,"shift-3",l)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>B(u,"shift-9",l),borderColor:u=>B(u,"shift-9",l),color:u=>B(u,"shift-0",l)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>B(u,"shift-9",l)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>B(u,"shift-9",l)},"&[data-status=pending]":{color:u=>B(u,"muted")},"&[data-status=active]":{color:u=>B(u,"shift-11",l),fontWeight:"bold"},"&[data-status=done]":{color:u=>B(u,"text",e)}}}});c[s.tagName]=d},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:xe(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as _l}from"@domphy/core";import{themeColor as hr,themeSize as Ml}from"@domphy/theme";function qh(r={}){var n;let o=_l((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Ml(e,"inherit"),fontWeight:"bold",color:e=>hr(e,"shift-11",o.get(e)),backgroundColor:e=>hr(e)}}}import{toState as Bl}from"@domphy/core";import{themeColor as Nl,themeSize as Al}from"@domphy/theme";function Jh(r={}){var n;let o=Bl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Al(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Nl(e,"text",o.get(e))}}}import{toState as Hl}from"@domphy/core";import{themeColor as Fl,themeSize as Wl}from"@domphy/theme";function og(r={}){var n;let o=Hl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Wl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Fl(e,"text",o.get(e))}}}import{toState as jl}from"@domphy/core";import{themeColor as Q,themeDensity as Xe,themeSize as gr,themeSpacing as Ze}from"@domphy/theme";function ig(r={}){var n;let o=jl((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>gr(e,"inherit"),color:e=>Q(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>Ze(Xe(e)*3),paddingBlock:e=>Ze(Xe(e)*1),color:e=>Q(e,"shift-10",o.get(e)),backgroundColor:e=>Q(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>Ze(Xe(e)*3),paddingBlock:e=>Ze(Xe(e)*1),color:e=>Q(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${Q(e,"shift-3",o.get(e))}`,fontSize:e=>gr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>Ze(Xe(e)*3),paddingBlock:e=>Ze(Xe(e)*1),color:e=>Q(e,"shift-10",o.get(e)),backgroundColor:e=>Q(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${Q(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>Q(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>Q(e,"hover")}}}}import{toState as Kl}from"@domphy/core";import{themeColor as _e,themeDensity as Gt,themeSize as Yl,themeSpacing as Ce}from"@domphy/theme";function ug(r={items:[]}){var t,a,s;let{items:o=[],accentColor:n="primary",color:e="neutral"}=r,l=Kl((s=(a=r.activeKey)!=null?a:(t=o[0])==null?void 0:t.key)!=null?s:0);return{_onSchedule:(c,d)=>{let i=c.nodeId,y={div:o.map((u,p)=>{var v;let h=(v=u.key)!=null?v:p;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,type:"button",role:"tab",id:`tab${i}${h}`,ariaControls:`panel${i}${h}`,ariaSelected:C=>l.get(C)===h,onClick:()=>l.set(h),onKeyDown:C=>{let D=C.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(D))return;C.preventDefault();let P=o.map((Y,ke)=>{var se;return(se=Y.key)!=null?se:ke}),E=P.indexOf(h),O=E;D==="ArrowRight"?O=(E+1)%P.length:D==="ArrowLeft"?O=(E-1+P.length)%P.length:D==="Home"?O=0:D==="End"&&(O=P.length-1),l.set(P[O])},style:{cursor:"pointer",fontSize:C=>Yl(C,"inherit"),height:C=>Ce(6+Gt(C)*2),paddingInline:C=>Ce(Gt(C)*4),border:"none",outline:"none",color:C=>_e(C,"text"),backgroundColor:C=>_e(C,"inherit"),boxShadow:C=>`inset 0 -${Ce(.5)} 0 0 ${_e(C,"shift-1",e)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{boxShadow:C=>`inset 0 -${Ce(.5)} 0 0 ${_e(C,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{color:C=>_e(C,"shift-12",n),boxShadow:C=>`inset 0 -${Ce(.5)} 0 0 ${_e(C,"shift-6",n)}`},"&:focus-visible":{boxShadow:C=>b(C,n)},"&[aria-selected=true]:focus-visible":{boxShadow:C=>`${b(C,n)}, inset 0 -${Ce(.5)} 0 0 ${_e(C,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,p)=>{var x;let h=(x=u.key)!=null?x:p;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${i}${h}`,ariaLabelledby:`tab${i}${h}`,hidden:v=>l.get(v)!==h,style:{paddingBlock:v=>Ce(Gt(v)*2),paddingInline:v=>Ce(Gt(v)*2)}}});d[c.tagName]=[y,...g]}}}import{toState as fr}from"@domphy/core";import{themeColor as ie,themeDensity as Fo,themeSize as Gl,themeSpacing as qt}from"@domphy/theme";function fg(r={}){var l,t;let o=fr((l=r.color)!=null?l:"neutral","color"),n=fr((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let s=a.domElement;s.style.overflow="hidden";let c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",c),c(),a.addHook("Remove",()=>s.removeEventListener("input",c))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>qt(Fo(a)*2),paddingBlock:a=>qt(Fo(a)*1.5),border:"none",borderRadius:a=>qt(Fo(a)*1.5),fontSize:a=>Gl(a,"inherit"),color:a=>ie(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${ie(a,"border-strong",o.get(a))}`,backgroundColor:a=>ie(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>ie(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${ie(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>b(a,n.get(a))},"&:invalid":{outline:a=>`${qt(.5)} solid ${ie(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>ie(a,"muted","neutral"),outline:a=>`1px solid ${ie(a,"border-strong","neutral")}`,backgroundColor:a=>ie(a,"shift-2","neutral")}}}}import{toState as ql}from"@domphy/core";import{themeColor as yr,themeDensity as Wo,themeSpacing as Ut}from"@domphy/theme";function xg(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Cg(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",l=ql((s=r.active)!=null?s:!1);return{style:I({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:c=>Ut(Wo(c)*2),paddingBottom:c=>o?"0":Ut(Wo(c)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:Ut(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:c=>yr(c,"shift-8",l.get(c)?e:n),opacity:c=>l.get(c)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:c=>`-${Ut(Wo(c)*4)}`,width:"2px",backgroundColor:c=>yr(c,"shift-3",n)}})}}import{toState as Ul}from"@domphy/core";import{themeColor as br,themeDensity as jo,themeSize as Xl,themeSpacing as Je}from"@domphy/theme";function Dg(r={}){let{position:o="top-center",color:n="neutral"}=r,e=Ul(!1),l=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:l?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:Je(4),zIndex:30,padding:Je(6),pointerEvents:"none"}};return{_portal:c=>{let d=c.domElement.querySelector(`#domphy-toast-${o}`);return d||(d=c.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Je(32),pointerEvents:"auto",paddingBlock:c=>Je(jo(c)*2),paddingInline:c=>Je(jo(c)*4),borderRadius:c=>Je(jo(c)*2),fontSize:c=>Xl(c,"inherit"),color:c=>br(c,"text",n),backgroundColor:c=>br(c,"inherit",n),boxShadow:L("medium"),opacity:c=>Number(e.get(c)),transform:c=>e.get(c)?"translateY(0)":l?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(c,d)=>{let i=!1,m=null,y=()=>{i||(i=!0,m&&(clearTimeout(m),m=null),c.domElement.removeEventListener("transitionend",g),d())},g=u=>{u.propertyName==="transform"&&y()};c.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),c.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=c.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as Zl}from"@domphy/core";import{themeColor as le,themeSize as Sr,themeSpacing as ve}from"@domphy/theme";function zg(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:l="primary"}=r,t=Zl((a=r.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:n}},_onSchedule:(s,c)=>{let d=o.map((i,m)=>{var u;let y=(u=i.key)!=null?u:String(m);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:y,type:"button",role:"button",ariaPressed:p=>{let h=t.get(p);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let p=t.get();if(n){let h=Array.isArray(p)?[...p]:[];t.set(h.includes(y)?h.filter(x=>x!==y):[...h,y])}else t.set(p===y?"":y)},style:{cursor:"pointer",fontSize:p=>Sr(p,"inherit"),height:ve(6),paddingBlock:ve(1),paddingInline:ve(2),border:"none",borderRadius:ve(1.5),color:p=>le(p,"text",e),backgroundColor:p=>le(p,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{backgroundColor:p=>le(p,"hover",e)},"&:active:not([disabled])":{backgroundColor:p=>le(p,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:p=>le(p,"shift-3",l),color:p=>le(p,"shift-12",l)},"&:focus-visible":{boxShadow:p=>b(p,l)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});c[s.tagName]=d},style:{display:"flex",paddingBlock:ve(1),paddingInline:ve(1),gap:ve(1),borderRadius:ve(2),fontSize:s=>Sr(s,"inherit"),backgroundColor:s=>le(s,"inherit",e),color:s=>le(s,"text",e),outline:s=>`1px solid ${le(s,"border",e)}`,outlineOffset:"-1px"}}}function $g(r={}){return nr({gap:r.gap})}function _g(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Jl,toState as xr}from"@domphy/core";import{themeColor as Cr,themeDensity as Ko,themeSize as Ql,themeSpacing as Yo}from"@domphy/theme";function Wg(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,l=xr(n),t=xr(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:g=>t.get(g),id:a},{show:c,hide:d,anchorPartial:i}=X({kind:"tooltip",open:o,placement:l,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>Yo(Ko(g)*1),paddingInline:g=>Yo(Ko(g)*3),borderRadius:g=>Yo(Ko(g)*1.5),color:g=>Cr(g,"text"),backgroundColor:g=>Cr(g),fontSize:g=>Ql(g,"inherit"),boxShadow:L("low")},$:[Zn({placement:l,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),Jl(i,{ariaDescribedby:a,onMouseEnter:(g,u)=>c(u),onMouseLeave:(g,u)=>d(u),onFocus:(g,u)=>c(u),onBlur:(g,u)=>d(u),onKeyDown:(g,u)=>g.key==="Escape"&&d(u)}),i}import{ElementNode as vr}from"@domphy/core";function kr(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function Yg(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,l=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let c of Array.from(l.values()))c();l.clear();for(let c of t)clearTimeout(c);t.clear();for(let c of a)cancelAnimationFrame(c);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((c,d)=>{if(!(c instanceof vr))return;let i=c.domElement;i&&e.set(kr(c,d),i.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((c,d)=>{var P;if(!(c instanceof vr))return;let i=c.domElement;if(!i)return;let m=kr(c,d),y=e.get(m);if(!y)return;let g=i.getBoundingClientRect(),u=y.left-g.left,p=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;(P=l.get(i))==null||P(),i.style.transition="none",i.style.transform=`translate(${u}px, ${p}px)`,i.getBoundingClientRect();let h=requestAnimationFrame(()=>{a.delete(h),i.style.transition=`transform ${o}ms ease ${n}ms`,i.style.transform="translate(0px, 0px)"});a.add(h);let x=!1,v=null,C=()=>{x||(x=!0,v&&(t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",D),i.style.transition="",i.style.transform="")},D=E=>{E.propertyName==="transform"&&C()};l.set(i,()=>{x=!0,v&&(clearTimeout(v),t.delete(v),v=null),l.delete(i),i.removeEventListener("transitionend",D)}),i.addEventListener("transitionend",D),v=setTimeout(C,o+n+34),t.add(v)}),e.clear()}}}import{toState as es}from"@domphy/core";import{themeColor as Er,themeSize as ts,themeSpacing as os}from"@domphy/theme";function Xg(r={}){var n;let o=es((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ts(e,"inherit"),backgroundColor:e=>Er(e),color:e=>Er(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:os(3),listStyleType:"disc",listStylePosition:"outside"}}}export{is as abbreviation,ps as accordion,ys as alert,Cs as avatar,ws as badge,Os as blockquote,Vs as breadcrumb,Bs as breadcrumbEllipsis,Zs as button,un as buttonGhost,nc as buttonSwitch,cc as card,pc as code,Oc as combobox,Rc as command,_c as commandItem,$c as commandSearch,Wc as datePicker,qc as descriptionList,Qc as details,im as dialog,mm as divider,fm as drawer,xm as emphasis,Em as empty,Tm as errorBoundary,zm as fab,_m as figure,Am as formGroup,jm as heading,qm as horizontalRule,Jm as icon,ou as image,lu as inputCheckbox,du as inputColor,yu as inputDateTime,vu as inputFile,Du as inputNumber,Lu as inputOTP,$u as inputPassword,Au as inputRadio,Ku as inputRange,Xu as inputSearch,td as inputSwitch,id as inputText,md as keyboard,hd as label,Sd as link,wd as linkButton,Id as list,zd as listItem,Vd as listItemButton,Md as mark,Wd as menu,Yd as motion,Xd as orderedList,tp as pagination,ip as panelSection,up as paragraph,yp as popover,Zn as popoverArrow,Ep as preformated,Pp as progress,Vp as rating,Bp as ringProgress,nr as row,Kp as scrollArea,Zp as segmented,th as select,ch as selectBox,ph as selectItem,yh as selectList,Ch as skeleton,wh as small,Oh as spinner,Rh as splitter,_h as splitterHandle,$h as splitterPanel,Nh as stack,jh as steps,qh as strong,Jh as subscript,og as superscript,ig as table,ug as tabs,kt as tag,fg as textarea,xg as timeline,Cg as timelineItem,Dg as toast,zg as toggleGroup,$g as toolbar,_g as toolbarSpacer,Wg as tooltip,Yg as transitionGroup,Xg as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|