@domphy/ui 0.18.17 → 0.18.18
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Ir=Object.defineProperty,zr=Object.defineProperties;var Vr=Object.getOwnPropertyDescriptors;var Xo=Object.getOwnPropertySymbols;var Mr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var Jo=(n,o,r)=>o in n?Ir(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,W=(n,o)=>{for(var r in o||(o={}))Mr.call(o,r)&&Jo(n,r,o[r]);if(Xo)for(var r of Xo(o))_r.call(o,r)&&Jo(n,r,o[r]);return n},Oe=(n,o)=>zr(n,Vr(o));import{toState as Zo}from"@domphy/core";import{themeColor as Ge,themeSize as Rr,themeSpacing as Hr}from"@domphy/theme";function _l(n={}){var e,a;let o=Zo((e=n.color)!=null?e:"neutral","color"),r=Zo((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Rr(t),backgroundColor:t=>Ge(t),color:t=>Ge(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Ge(t,"shift-7",o.get(t)),textUnderlineOffset:Hr(.72),cursor:"help","&:hover":{color:t=>Ge(t,"shift-11",r.get(t)),textDecorationColor:t=>Ge(t,"shift-9",r.get(t))}}}}import{toState as Qo}from"@domphy/core";import{themeColor as Xt,themeDensity as Ar,themeSpacing as en}from"@domphy/theme";function Nl(n={}){var a,t;let{type:o="single"}=n,r=Qo((a=n.color)!=null?a:"neutral","color"),e=Qo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:i=>{if(o!=="single")return;let c=i.domElement;if(!c)return;let l=p=>{let s=p.target.closest("summary");if(!s)return;let m=s.closest("details");!m||m.parentElement!==c||m.open||Array.from(c.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};c.addEventListener("click",l),i.addHook("Remove",()=>c.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:i=>en(Ar(i)*1),outline:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:i=>`${en(.5)} solid ${Xt(i,"shift-6",e.get(i))}`}}}}import{toState as Nr}from"@domphy/core";import{themeColor as Jt,themeDensity as tn,themeSize as Br,themeSpacing as bt}from"@domphy/theme";function Kl(n={}){var r;let o=Nr((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:bt(3),paddingBlock:e=>bt(tn(e)*2),paddingInline:e=>bt(tn(e)*4),boxShadow:e=>`inset ${bt(1)} 0 0 0 ${Jt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Jt(e,"inherit",o.get(e)),color:e=>Jt(e,"shift-10",o.get(e)),fontSize:e=>Br(e,"inherit")}}}import{toState as Fr}from"@domphy/core";import{themeColor as on,themeSize as Wr,themeSpacing as nn}from"@domphy/theme";function Gl(n={}){var r;let o=Fr((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:nn(9),height:nn(9),fontSize:e=>Wr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>on(e,"inherit",o.get(e)),color:e=>on(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as rn}from"@domphy/core";import{themeColor as an,themeSize as Kr,themeSpacing as Zt}from"@domphy/theme";function Zl(n={}){var a;let{label:o=999}=n,r=rn(o),e=rn((a=n.color)!=null?a:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Zt(1),minWidth:Zt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>Kr(t,"decrease-1"),borderRadius:Zt(999),backgroundColor:t=>an(t,"shift-9",e.get(t)),color:t=>an(t,"shift-0",e.get(t))}}}}import{toState as jr}from"@domphy/core";import{themeColor as ln,themeDensity as sn,themeSize as Yr,themeSpacing as Qt}from"@domphy/theme";function os(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=>Yr(e,"inherit"),backgroundColor:e=>ln(e,"inherit",o.get(e)),boxShadow:e=>`inset ${Qt(1)} 0 0 0 ${ln(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>Qt(sn(e)*2),paddingInline:e=>Qt(sn(e)*4),margin:0}}}import{toState as qr}from"@domphy/core";import{themeColor as Ue,themeSize as Gr,themeSpacing as cn}from"@domphy/theme";function as(n={}){var e;let{separator:o="/"}=n,r=qr((e=n.color)!=null?e:"neutral","color");return{_onInsert:a=>{a.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:a=>Gr(a,"inherit"),gap:cn(1),color:a=>Ue(a,"shift-9",r.get(a)),backgroundColor:a=>Ue(a,"inherit",r.get(a)),"& > *":{display:"inline-flex",alignItems:"center",color:a=>Ue(a,"shift-8",r.get(a))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:a=>Ue(a,"shift-4",r.get(a)),paddingInlineStart:cn(1)},"& > [aria-current=page]":{color:a=>Ue(a,"shift-10",r.get(a)),pointerEvents:"none"}}}}import{toState as Ur}from"@domphy/core";import{themeColor as St,themeSize as Xr,themeSpacing as Ct}from"@domphy/theme";function ms(n={}){var r;let o=Ur((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=>Xr(e,"inherit"),paddingInline:Ct(1),border:"none",background:"none",cursor:"pointer",color:e=>St(e,"shift-8",o.get(e)),borderRadius:Ct(1),"&:hover":{color:e=>St(e,"shift-10",o.get(e)),backgroundColor:e=>St(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Ct(.5)} solid ${St(e,"shift-6",o.get(e))}`,outlineOffset:Ct(.5)}}}}import{toState as Jr}from"@domphy/core";import{themeColor as J,themeDensity as vt,themeSize as Zr,themeSpacing as Xe}from"@domphy/theme";function hs(n={}){var r;let o=Jr((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Zr(e,"inherit"),paddingBlock:e=>Xe(vt(e)*1),paddingInline:e=>Xe(vt(e)*3),borderRadius:e=>Xe(vt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Xe(vt(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${J(e,"shift-4",o.get(e))}`,color:e=>J(e,"shift-9",o.get(e)),backgroundColor:e=>J(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>J(e,"shift-10",o.get(e)),backgroundColor:e=>J(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Xe(.5)} ${J(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>J(e,"shift-2","neutral"),outline:e=>`1px solid ${J(e,"shift-4","neutral")}`,color:e=>J(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Qr}from"@domphy/core";import{themeColor as Je,themeDensity as Et,themeSize as ei,themeSpacing as Ze}from"@domphy/theme";function bs(n={}){var r;let o=Qr((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>ei(e,"inherit"),paddingBlock:e=>Ze(Et(e)*1),paddingInline:e=>Ze(Et(e)*1),borderRadius:e=>Ze(Et(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Ze(Et(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>Je(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Je(e,"shift-9",o.get(e)),backgroundColor:e=>Je(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Ze(.5)} ${Je(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Je(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as eo}from"@domphy/core";import{themeColor as Le,themeSize as ti,themeSpacing as A}from"@domphy/theme";function Es(n={}){var t,i;let{checked:o=!1}=n,r=eo(o),e=eo((t=n.color)!=null?t:"neutral","color"),a=eo((i=n.accentColor)!=null?i:"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=>ti(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${Le(c,"shift-3",e.get(c))}`,minWidth:A(12),minHeight:A(6),borderRadius:A(999),paddingLeft:A(7),paddingRight:A(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>Le(c,"inherit",e.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:A(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:A(5),height:A(5),borderRadius:A(999),color:c=>Le(c,"shift-9"),backgroundColor:c=>Le(c,"decrease-2",e.get(c))},"&[aria-checked=true]":{backgroundColor:c=>Le(c,"increase-3",a.get(c)),outline:"none",color:c=>Le(c,"decrease-2"),paddingLeft:A(2),paddingRight:A(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${A(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as oi}from"@domphy/core";import{themeColor as $e,themeDensity as le,themeSpacing as Z}from"@domphy/theme";function Ts(n={}){var r;let o=oi((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=>Z(le(e)*2),backgroundColor:e=>$e(e,"inherit",o.get(e)),color:e=>$e(e,"shift-10",o.get(e)),outline:e=>`1px solid ${$e(e,"shift-4",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=>Z(le(e)*2),paddingInline:e=>Z(le(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Z(le(e)*4),color:e=>$e(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Z(le(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Z(le(e)*4),color:e=>$e(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Z(2),paddingBlock:e=>Z(le(e)*2),paddingInline:e=>Z(le(e)*4),borderTop:e=>`1px solid ${$e(e,"shift-3",o.get(e))}`}}}}import{toState as ni}from"@domphy/core";import{themeColor as mn,themeSize as ri,themeSpacing as to}from"@domphy/theme";function Ls(n={}){var r;let o=ni((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=>ri(e,"inherit"),color:e=>mn(e,"shift-9",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:to(6),paddingInline:to(1.5),borderRadius:to(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as Qe,themeDensity as io,themeSize as un,themeSpacing as Ce}from"@domphy/theme";import{merge as ii,toState as ai}from"@domphy/core";import{autoUpdate as li,computePosition as si,flip as ci,offset as mi,shift as ui}from"@domphy/floating";var oo=new WeakMap;function K(n){let{open:o=!1,placement:r}=n,e=null,a=null,t=null,i=null,c=null,l=null,p=!1,s=ai(o),m=()=>{e&&clearTimeout(e),a&&(a(),a=null),c&&c.remove()},y=C=>{C&&(l=C.getRoot(),t=C.domElement,t&&oo.set(t,m))},g=()=>{p||!l||(p=!0,c=l.children.insert(n.content))},u=()=>{g(),t&&i&&(a&&a(),a=li(t,i,()=>{si(t,i,{placement:r.get(),middleware:[mi(12),ci(),ui()],strategy:"fixed"}).then(({x:C,y:x,placement:D})=>{Object.assign(i.style,{left:`${C}px`,top:`${x}px`}),r.set(D)})}),s.set(!0))},d=()=>{a&&a(),a=null,s.set(!1)},h=C=>{y(C),e&&clearTimeout(e),e=setTimeout(u,100)},S=C=>{y(C),e&&clearTimeout(e),e=setTimeout(d,100)},v={style:{position:"fixed",pointerEvents:"auto",visibility:C=>s.get(C)?"visible":"hidden"},_onMount:C=>i=C.domElement,_portal:C=>{var D;let x=C.domElement.querySelector("#domphy-floating");if(!x){let P={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};x=C.children.insert(P).domElement}if(t&&x instanceof HTMLElement&&!x.hasAttribute("data-theme")){let P=(D=t.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");P&&x.setAttribute("data-theme",P)}return x}};return ii(n.content,v),{show:h,hide:S,anchorPartial:{onKeyDown:C=>C.key==="Escape"&&S(),_onMount:C=>{l=C.getRoot(),t=C.domElement,t&&oo.set(t,m);let x=D=>{if(!s.get()||!t||!i)return;let P=D.target;!t.contains(P)&&!i.contains(P)&&S()};C.getRoot().domElement.addEventListener("click",x),C.addHook("BeforeRemove",()=>{var D;t&&((D=oo.get(t))==null||D()),C.getRoot().domElement.removeEventListener("click",x)})}}}}import{toState as di}from"@domphy/core";import{themeColor as kt,themeSize as pi,themeSpacing as Q}from"@domphy/theme";var hi='<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 xt(n={}){var e;let{removable:o=!1}=n,r=di((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:a=>{let t={span:hi,onClick:i=>{i.stopPropagation(),a.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:Q(1),width:Q(4),height:Q(4),flexShrink:0,"&:hover":{backgroundColor:i=>kt(i,"shift-4",r.get(i))}}};o&&a.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:Q(6),paddingBlock:"0px",borderRadius:Q(1),paddingInlineStart:Q(2),paddingInlineEnd:o?Q(1):Q(2),gap:Q(2),fontSize:a=>pi(a,"inherit"),backgroundColor:a=>kt(a,"inherit",r.get(a)),color:a=>kt(a,"shift-9",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${kt(a,"shift-4",r.get(a))}`}}}function Fs(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=ro(n.value),c=ro(a),{show:l,hide:p,anchorPartial:s}=K({open:c,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&p(S)};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Ce(6),marginInlineStart:Ce(2),fontSize:h=>un(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)},g;if(n.input){let h={onFocus:(S,v)=>l(v),style:y,_key:"combobox-input"};no(n.input,h),g=n.input}else g={input:null,onFocus:(h,S)=>l(S),value:h=>(i.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=i.get(h),v=Array.isArray(S)?S:[S],C=o.filter(x=>v.includes(x.value)).map(x=>({span:x.label,$:[xt({color:e,removable:!0})],_key:x.value,_onRemove:D=>{let P=i.get(),De=(Array.isArray(P)?P:[P]).filter(ie=>ie!==x.value);t?i.set(De):i.set(De[0])}}));return C.push(g),C},style:{display:"flex",flexWrap:"wrap",gap:Ce(1)}},d={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:Ce(32),outlineOffset:"-1px",outline:h=>`1px solid ${Qe(h,"shift-4","neutral")}`,paddingBlock:h=>Ce(io(h)*1),paddingInline:h=>Ce(io(h)*1),borderRadius:h=>Ce(io(h)*1),fontSize:h=>un(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)}};return no(s,d),s}import{merge as fi,toState as gi}from"@domphy/core";import{themeColor as ee,themeDensity as wt,themeSize as dn,themeSpacing as Ie}from"@domphy/theme";function Ys(){return{_onSchedule:(n,o)=>{fi(o,{_context:{command:{query:gi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function qs(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 a=e.getContext("command");if(!a){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>a.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>dn(e,"inherit"),paddingInline:e=>Ie(wt(e)*3),paddingBlock:e=>Ie(wt(e)*2),border:"none",borderBottom:e=>`1px solid ${ee(e,"shift-3",o)}`,outline:"none",color:e=>ee(e,"shift-10",o),backgroundColor:e=>ee(e,"inherit",o),"&::placeholder":{color:e=>ee(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>ee(e,"shift-6",r)}}}}function Gs(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var p,s;let a=e.getContext("command");if(!a){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(s=(p=t.textContent)==null?void 0:p.toLowerCase())!=null?s:"",c=m=>{t.hidden=m.length>0&&!i.includes(m.toLowerCase())};c(a.query.get());let l=a.query.addListener(c);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>dn(e,"inherit"),height:e=>Ie(6+wt(e)*2),paddingInline:e=>Ie(wt(e)*3),border:"none",outline:"none",color:e=>ee(e,"shift-9",o),backgroundColor:e=>ee(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>ee(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${Ie(.5)} solid ${ee(e,"shift-6",r)}`,outlineOffset:`-${Ie(.5)}`}}}}import{merge as yi,toState as te}from"@domphy/core";import{themeColor as $,themeSize as ze,themeSpacing as I}from"@domphy/theme";var z=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),ve=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),et=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),lo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,so=(n,o)=>ve(n,-((n.getDay()-o+7)%7));function bi(n){var o,r;try{let e=new Intl.Locale(n),a=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(a!=null&&a.firstDay)return a.firstDay%7}catch(e){}return 0}function Qs(n={}){var Yo,qo,Go,Uo;let{mode:o="single",time:r=!1,min:e,max:a,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:l}=n,p=(Yo=n.weekStartsOn)!=null?Yo:bi(i),s=te((qo=n.accentColor)!=null?qo:"primary","accentColor"),m=te((Go=n.placement)!=null?Go:"bottom-start"),y=te((Uo=n.value)!=null?Uo:o==="range"?[null,null]:null),g=l?y.addListener(f=>l(f)):null,u=(()=>{let f=y.get(),b=o==="range"?f==null?void 0:f[0]:f;return b instanceof Date?b:new Date})(),d=te(u.getFullYear(),"viewYear"),h=te(u.getMonth(),"viewMonth"),S=te(z(u),"focused"),v=te(null,"hovered"),k=te(u.getHours(),"hour"),C=te(u.getMinutes(),"minute"),x=null,D=new Intl.DateTimeFormat(i,W({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),Se=new Intl.DateTimeFormat(i,{weekday:"short"}),De=new Intl.DateTimeFormat(i,{dateStyle:"full"}),ie=f=>f?D.format(f):"",gr=f=>{if(c)return c(f);if(o==="range"){let[b,E]=f!=null?f:[null,null];return b?`${ie(b)} \u2013 ${ie(E)}`:""}return ie(f)},yr=Array.from({length:7},(f,b)=>Se.format(new Date(2023,0,1+(b+p)%7))),Fo=f=>!!e&&z(f)<z(e)||!!a&&z(f)>z(a)||!!t&&t(f),ae=f=>{if(!r)return z(f);let b=z(f);return b.setHours(k.get(),C.get(),0,0),b},Wo=f=>{var w;if(Fo(f))return;if(o==="single"){y.set(ae(f)),r||Gt();return}let[b,E]=(w=y.get())!=null?w:[null,null];!b||b&&E?y.set([ae(f),null]):z(f)<z(b)?(y.set([ae(f),ae(b)]),r||Gt()):(y.set([b,ae(f)]),r||Gt())},br=()=>{var f;if(r)if(o==="single"){let b=y.get();b&&y.set(ae(b))}else{let[b,E]=(f=y.get())!=null?f:[null,null];y.set([b&&ae(b),E&&ae(E)])}},Sr=(f,b)=>{var Pe;if(o!=="range")return!1;let[E,w]=(Pe=y.get(b))!=null?Pe:[null,null],O=w!=null?w:v.get(b);if(!E||!O)return!1;let T=z(E)<=z(O)?E:O,H=z(E)<=z(O)?O:E,_=z(f);return _>=z(T)&&_<=z(H)},Cr=(f,b)=>{let E=y.get(b);if(o==="range"){let[w,O]=E!=null?E:[null,null];return et(f,w)||et(f,O)}return et(f,E)},yt=f=>{d.set(f.getFullYear()),h.set(f.getMonth())},Ko=f=>{let b=ao(new Date(d.get(),h.get(),1),f);yt(b)},jo=f=>d.set(d.get()+f),Yt=()=>{setTimeout(()=>{var f;(f=x==null?void 0:x.querySelector(`[data-date="${lo(S.get())}"]`))==null||f.focus()},0)},vr=Tr(),{show:Er,hide:kr,anchorPartial:qt}=K({open:!1,placement:m,content:vr});function Gt(){kr()}qt.onClick=()=>{};let xr={type:"text",readonly:!0,value:f=>gr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,b)=>{Ut(b)},onFocus:(f,b)=>{Ut(b)},onKeyDown:(f,b)=>{let E=f.key;(E==="ArrowDown"||E==="Enter")&&(f.preventDefault(),Ut(b))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Ut(f){var E;let b=(E=wr())!=null?E:new Date;S.set(z(b)),yt(b),Er(f),Yt()}function wr(){var b;let f=y.get();return o==="range"?(b=f==null?void 0:f[0])!=null?b:null:f!=null?f:null}return yi(qt,xr),qt;function Tr(){let f=(T,H,_)=>({button:T,type:"button",ariaLabel:H,onClick:_,style:Si()}),b={div:[f("\xAB","Previous year",()=>jo(-1)),f("\u2039","Previous month",()=>Ko(-1)),{div:T=>P.format(new Date(d.get(T),h.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>ze(T)}},f("\u203A","Next month",()=>Ko(1)),f("\xBB","Next year",()=>jo(1))],style:{display:"flex",alignItems:"center",gap:I(1),marginBottom:I(2)}},E={div:yr.map((T,H)=>({div:T,style:{textAlign:"center",fontSize:_=>ze(_,"decrease-1"),fontWeight:"600",color:_=>$(_,"shift-7"),paddingBlock:I(1)},_key:H})),role:"row",style:pn()},w={div:T=>Dr(T),role:"grid",ariaLabel:"Calendar",onKeyDown:$r,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:I(.5)}},O=[b,E,w];return r&&O.push(Or()),O.push(Lr()),{div:O,role:"dialog",ariaModal:"false",_onMount:T=>{x=T.domElement},style:{minWidth:I(70),padding:I(3),borderRadius:I(2),backgroundColor:T=>$(T,"base"),color:T=>$(T,"shift-10"),border:T=>`1px solid ${$(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Dr(f){let b=new Date(d.get(f),h.get(f),1),E=h.get(f),w=so(b,p),O=[];for(let T=0;T<6;T++){let H=[];for(let _=0;_<7;_++){let Pe=ve(w,T*7+_);H.push(Pr(Pe,E,f))}O.push({div:H,role:"row",style:pn(),_key:T})}return O}function Pr(f,b,E){let w=Fo(f),O=Cr(f,E),T=Sr(f,E),H=f.getMonth()!==b,_=et(f,S.get(E)),Pe=et(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:_?0:-1,ariaSelected:O,ariaDisabled:w,disabled:w,ariaLabel:De.format(f),dataDate:lo(f),onClick:()=>Wo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:w?"not-allowed":"pointer",aspectRatio:"1",borderRadius:I(1),fontSize:L=>ze(L),fontFamily:"inherit",opacity:w?.35:H?.5:1,backgroundColor:L=>O?$(L,"shift-7",s.get(L)):T?$(L,"shift-2",s.get(L)):"transparent",color:L=>O?$(L,"shift-0",s.get(L)):$(L,"shift-9"),outline:Pe?L=>`1px solid ${$(L,"shift-6",s.get(L))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:L=>O?$(L,"shift-7",s.get(L)):$(L,"shift-3",s.get(L))},"&:focus-visible":{outline:L=>`2px solid ${$(L,"shift-6",s.get(L))}`}},_key:lo(f)}}function Or(){let f=(b,E,w)=>({select:Array.from({length:b},(O,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:H=>E.get(H)===T,_key:T})),ariaLabel:w,onChange:O=>{E.set(Number(O.target.value)),br()},style:Ci()});return{div:[f(24,k,"Hour"),{span:":",style:{fontWeight:"600"}},f(60,C,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:I(1),marginTop:I(3)}}}function Lr(){let f=(b,E)=>({button:b,type:"button",onClick:E,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:w=>ze(w,"decrease-1"),color:w=>$(w,"shift-8",s.get(w)),padding:I(1)}});return{div:[f("Today",()=>{let b=new Date;S.set(z(b)),yt(b),Yt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:I(2),paddingTop:I(2),borderTop:b=>`1px solid ${$(b,"shift-3")}`}}}function $r(f){let b=f,E=S.get(),w=null;switch(b.key){case"ArrowLeft":w=ve(E,-1);break;case"ArrowRight":w=ve(E,1);break;case"ArrowUp":w=ve(E,-7);break;case"ArrowDown":w=ve(E,7);break;case"Home":w=so(E,p);break;case"End":w=ve(so(E,p),6);break;case"PageUp":w=ao(E,b.shiftKey?-12:-1);break;case"PageDown":w=ao(E,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Wo(E);return;default:return}b.preventDefault(),S.set(w),yt(w),Yt()}}function pn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:I(.5)}}function Si(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>ze(n),color:n=>$(n,"shift-8"),width:I(7),height:I(7),borderRadius:I(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function Ci(){return{fontFamily:"inherit",fontSize:n=>ze(n),padding:I(1),borderRadius:I(1),border:n=>`1px solid ${$(n,"shift-4")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"shift-9")}}import{toState as vi}from"@domphy/core";import{themeColor as hn,themeSize as fn,themeSpacing as gn}from"@domphy/theme";function rc(n={}){var r;let o=vi((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(${gn(24)}, max-content) 1fr`,columnGap:gn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>fn(e,"inherit"),color:e=>hn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>fn(e,"inherit"),color:e=>hn(e,"shift-9",o.get(e))}}}}import{toState as yn}from"@domphy/core";import{themeColor as se,themeDensity as tt,themeSize as bn,themeSpacing as V}from"@domphy/theme";function sc(n={}){var a,t;let{duration:o=240}=n,r=yn((a=n.color)!=null?a:"neutral","color"),e=yn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>bn(i,"inherit"),color:i=>se(i,"shift-9",r.get(i)),backgroundColor:i=>se(i,"inherit",r.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>se(i,"shift-2",r.get(i)),color:i=>se(i,"shift-10",r.get(i)),fontSize:i=>bn(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:V(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>V(tt(i)*4),height:V(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:V(2),height:V(2),flexShrink:0,marginTop:`-${V(.5)}`,borderInlineEnd:i=>`${V(.5)} solid ${se(i,"shift-9",r.get(i))}`,borderBottom:i=>`${V(.5)} solid ${se(i,"shift-9",r.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>se(i,"shift-3",r.get(i))},"& > summary:focus-visible":{borderRadius:i=>V(tt(i)*2),outlineOffset:`-${V(.5)}`,outline:i=>`${V(.5)} solid ${se(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>V(tt(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:V(250),opacity:1,paddingTop:i=>V(tt(i)*1),paddingBottom:i=>V(tt(i)*3)}}}}import{toState as Ei}from"@domphy/core";import{themeColor as Dt,themeDensity as ki,themeSize as xi,themeSpacing as co}from"@domphy/theme";var ot=0;function Tt(){ot++,ot===1&&(document.body.style.overflow="hidden")}function Ve(){ot=Math.max(0,ot-1),ot===0&&(document.body.style.overflow="")}var Sn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function hc(n={}){let{color:o="neutral",open:r=!1}=n,e=Ei(r),a=null,t=!1,i=!1,c=l=>{t=!1,l.close(),i&&(Ve(),i=!1),a==null||a.focus(),a=null};return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(l,p)=>{if(l.target!==p.domElement)return;let s=p.domElement.getBoundingClientRect();l.clientX>=s.left&&l.clientX<=s.right&&l.clientY>=s.top&&l.clientY<=s.bottom||e.set(!1)},onTransitionEnd:(l,p)=>{t&&l.target===p.domElement&&l.propertyName==="opacity"&&c(p.domElement)},_onMount:l=>{let p=l.domElement;p.setAttribute("aria-modal","true");let s=null,m=d=>{if(d.key!=="Tab")return;let h=Array.from(p.querySelectorAll(Sn)).filter(k=>!k.closest("[aria-hidden='true']")&&k.offsetParent!==null);if(!h.length){d.preventDefault();return}let S=h[0],v=h[h.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===p)&&(d.preventDefault(),v.focus()):document.activeElement===v&&(d.preventDefault(),S.focus())},y=d=>{d.preventDefault(),e.set(!1)};p.addEventListener("cancel",y);let g=d=>{d?(a=document.activeElement,p.showModal(),i||(Tt(),i=!0),p.addEventListener("keydown",m),requestAnimationFrame(()=>{p.style.opacity="1";let h=p.querySelector(Sn);h==null||h.focus()})):(t=!0,p.style.opacity="0",p.removeEventListener("keydown",m),s=setTimeout(()=>{s=null,t&&c(p)},350))};g(e.get());let u=e.addListener(g);l.addHook("Remove",()=>{s&&(clearTimeout(s),s=null),u(),p.removeEventListener("cancel",y),i&&(Ve(),i=!1),p.removeEventListener("keydown",m),a==null||a.focus(),a=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:l=>xi(l,"inherit"),color:l=>Dt(l,"shift-10",o),backgroundColor:l=>Dt(l,"inherit",o),border:"none",padding:l=>co(ki(l)*3),boxShadow:l=>`0 ${co(9)} ${co(16)} ${Dt(l,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:l=>Dt(l,"shift-2","neutral"),opacity:.75}}}}import{toState as wi}from"@domphy/core";import{themeColor as Pt,themeSize as Ti,themeSpacing as Di}from"@domphy/theme";function bc(n={}){var r;let o=wi((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:Di(2),fontSize:e=>Ti(e,"inherit"),backgroundColor:e=>Pt(e),color:e=>Pt(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Pi}from"@domphy/core";import{themeColor as Ot,themeDensity as Oi,themeSize as Li,themeSpacing as nt}from"@domphy/theme";var mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Cn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=n=>n==="left"||n==="right";function vn(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function kc(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:a}=n,t=Pi(r),i=e==="start"||e==="end",c=vn(e,!1),l=rt(c)?nt(80):nt(64),p=a!=null?a:l;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,m)=>{s.target===m.domElement&&t.set(!1)},_onMount:s=>{let m=s.domElement;m.setAttribute("aria-modal","true");let y=D=>{D.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=i&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=vn(e,g);i&&(m.style.transform=mo[u],m.style.margin=Cn[u],m.style.width=rt(u)?p:"100dvw",m.style.height=rt(u)?"100dvh":p);let d=!1,h=!1,S=null,v=()=>{S=null,d&&(d=!1,m.close(),h&&(Ve(),h=!1))},k=D=>{D.target===m&&D.propertyName==="transform"&&v()};m.addEventListener("transitionend",k);let C=D=>{D?(d=!1,m.showModal(),h||(Tt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(d=!0,m.style.transform=mo[u],S=setTimeout(v,350))};C(t.get());let x=t.addListener(C);s.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),x(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",k),h&&(Ve(),h=!1)})},style:{transform:mo[c],transition:"transform 0.25s ease",fontSize:s=>Li(s,"inherit"),color:s=>Ot(s,"shift-10",o),backgroundColor:s=>Ot(s,"inherit",o),border:"none",padding:s=>nt(Oi(s)*3),margin:Cn[c],width:rt(c)?p:"100dvw",height:rt(c)?"100dvh":p,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${nt(4)} ${nt(12)} ${Ot(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ot(s,"shift-2","neutral"),opacity:.75}}}}import{toState as $i}from"@domphy/core";import{themeColor as Ii,themeSize as zi}from"@domphy/theme";function Dc(n={}){var r;let o=$i((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=>zi(e,"inherit"),fontStyle:"italic",color:e=>Ii(e,"shift-10",o.get(e))}}}import{toState as Vi}from"@domphy/core";import{themeColor as En,themeSpacing as uo}from"@domphy/theme";function $c(n={}){var r;let o=Vi((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:uo(3),paddingBlock:uo(12),paddingInline:uo(6),textAlign:"center",color:e=>En(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>En(e,"shift-5",o.get(e))}}}}function zc(n={}){return{_onError:(o,r,e)=>{var t,i;(t=n.onError)==null||t.call(n,r);let a=typeof n.fallback=="function"?n.fallback(r,e):(i=n.fallback)!=null?i:{div:"An error occurred."};o.children.update([a])}}}import{toState as Mi}from"@domphy/core";import{themeColor as Me,themeSize as _i,themeSpacing as it}from"@domphy/theme";var Ri={small:8,medium:10,large:14};function Rc(n={}){var e,a;let o=Mi((e=n.color)!=null?e:"primary","color"),r=it(Ri[(a=n.size)!=null?a:"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=>_i(t,"inherit"),backgroundColor:t=>Me(t,"shift-9",o.get(t)),color:t=>Me(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${it(1)} ${it(4)} ${Me(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Me(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${it(2)} ${it(6)} ${Me(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${Me(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Hi}from"@domphy/core";import{themeColor as kn,themeSize as Ai,themeSpacing as Lt}from"@domphy/theme";function Bc(n={}){var r;let o=Hi((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:Lt(2),marginInline:0,marginTop:Lt(3),marginBottom:Lt(3),color:e=>kn(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Lt(2)},"& figcaption":{fontSize:e=>Ai(e,"decrease-1"),color:e=>kn(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Ni}from"@domphy/core";import{themeColor as $t,themeDensity as _e,themeSize as po,themeSpacing as oe}from"@domphy/theme";function jc(n={}){var a;let{layout:o="horizontal"}=n,r=Ni((a=n.color)!=null?a:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>oe(_e(t)*3),paddingBlock:t=>oe(_e(t)*3),border:"none",borderRadius:t=>oe(_e(t)*2),fontSize:t=>po(t,"inherit"),backgroundColor:t=>$t(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:oe(4),rowGap:oe(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>po(t,"inherit"),fontWeight:600,paddingBlock:t=>oe(_e(t)*1),borderRadius:t=>oe(_e(t)*2),color:t=>$t(t,"shift-9",r.get(t)),backgroundColor:t=>$t(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":oe(_e(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(${oe(2)} * -1)`,fontSize:t=>po(t,"decrease-1"),color:t=>$t(t,"shift-9",r.get(t))}}}}import{toState as Bi}from"@domphy/core";import{themeColor as Fi,themeSize as Wi,themeSpacing as Ki}from"@domphy/theme";var ji={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Uc(n={}){var r;let o=Bi((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=>Fi(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Ki(2),fontSize:e=>{let a=ji[e.elementNode.tagName]||"inherit";return Wi(e,a)}}}}import{toState as Yi}from"@domphy/core";import{themeColor as qi,themeSpacing as xn}from"@domphy/theme";function Qc(n={}){var r;let o=Yi((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:xn(3),marginBottom:xn(3),backgroundColor:e=>qi(e,"shift-4",o.get(e))}}}import{toState as Gi}from"@domphy/core";import{themeColor as Ui,themeSize as Xi,themeSpacing as wn}from"@domphy/theme";function nm(n={}){var r;let o=Gi((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:wn(4),height:wn(4),flexShrink:"0",fontSize:e=>Xi(e),backgroundColor:"transparent",color:e=>Ui(e,"shift-9",o.get(e))}}}import{toState as Ji}from"@domphy/core";import{themeColor as Zi,themeSpacing as Qi}from"@domphy/theme";function lm(n={}){var r;let o=Ji((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:Qi(2),backgroundColor:e=>Zi(e,"inherit",o.get(e))}}}import{toState as Tn}from"@domphy/core";import{themeColor as R,themeSize as ea,themeSpacing as ce}from"@domphy/theme";function um(n={}){var e,a;let o=Tn((e=n.color)!=null?e:"neutral","color"),r=Tn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>ea(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 ${R(t,"shift-4",o.get(t))}`,color:t=>R(t,"shift-9",o.get(t)),width:ce(4),height:ce(4)},"&:hover::before":{backgroundColor:t=>R(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>R(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 ${R(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:ce(1.5),outline:t=>`${ce(.5)} solid ${R(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>R(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as Dn,themeDensity as at,themeSize as ta,themeSpacing as lt}from"@domphy/theme";function hm(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=>ta(o,"inherit"),paddingBlock:o=>lt(at(o)*1),paddingInline:o=>lt(at(o)*1),blockSize:o=>lt(6+at(o)*2),inlineSize:o=>lt(6+at(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>lt(at(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>Dn(o,"shift-2","neutral"),outline:o=>`1px solid ${Dn(o,"shift-4","neutral")}`}}}}import{toState as Pn}from"@domphy/core";import{themeColor as me,themeDensity as ho,themeSize as oa,themeSpacing as st}from"@domphy/theme";function bm(n={}){var a,t;let{mode:o="datetime-local"}=n,r=Pn((a=n.color)!=null?a:"neutral","color"),e=Pn((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,c)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=o},style:{fontFamily:"inherit",fontSize:i=>oa(i,"inherit"),lineHeight:"inherit",color:i=>me(i,"shift-9",r.get(i)),backgroundColor:i=>me(i,"inherit",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${me(i,"shift-4",r.get(i))}`,borderRadius:i=>st(ho(i)*1),paddingInline:i=>st(ho(i)*3),height:i=>st(6+ho(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${st(.5)} solid ${me(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>me(i,"shift-8","neutral"),backgroundColor:i=>me(i,"shift-2","neutral"),outline:i=>`1px solid ${me(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${st(.5)} solid ${me(i,"shift-6","error")}`}}}}import{toState as On}from"@domphy/core";import{themeColor as B,themeDensity as It,themeSize as na,themeSpacing as ue}from"@domphy/theme";function Em(n={}){var e,a;let o=On((e=n.color)!=null?e:"neutral","color"),r=On((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>na(t,"inherit"),lineHeight:"inherit",color:t=>B(t,"shift-9",o.get(t)),backgroundColor:t=>B(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${B(t,"shift-4",o.get(t))}`,borderRadius:t=>ue(It(t)*1),height:t=>ue(6+It(t)*2),paddingInline:t=>ue(It(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>ue(It(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:ue(1),height:ue(6),paddingInline:ue(2),cursor:"pointer",color:t=>B(t,"shift-11",o.get(t)),backgroundColor:t=>B(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ue(.5)} solid ${B(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),outline:t=>`1px solid ${B(t,"shift-4","neutral")}`,backgroundColor:t=>B(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),backgroundColor:t=>B(t,"shift-3","neutral")}}}}import{toState as Ln}from"@domphy/core";import{themeColor as Ee,themeDensity as zt,themeSize as ra,themeSpacing as Re}from"@domphy/theme";function Tm(n={}){var e,a;let o=Ln((e=n.color)!=null?e:"neutral","color"),r=Ln((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Re(10),paddingInlineStart:t=>Re(zt(t)*3),paddingInlineEnd:t=>Re(zt(t)*1.5),paddingBlock:t=>Re(zt(t)*1),borderRadius:t=>Re(zt(t)*1),fontSize:t=>ra(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ee(t,"shift-4",o.get(t))}`,color:t=>Ee(t,"shift-9",o.get(t)),backgroundColor:t=>Ee(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Re(.5)} solid ${Ee(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ee(t,"shift-2","neutral"),outline:t=>`1px solid ${Ee(t,"shift-4","neutral")}`,color:t=>Ee(t,"shift-8","neutral")}}}}import{toState as fo}from"@domphy/core";import{themeColor as Vt,themeDensity as Mt,themeSize as ia,themeSpacing as ct}from"@domphy/theme";var aa='<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>',la='<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 Lm(n={}){var a,t;let o=fo((a=n.color)!=null?a:"neutral","color"),r=fo((t=n.accentColor)!=null?t:"primary","accentColor"),e=fo(!1);return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:i=>{let c={input:null,type:p=>e.get(p)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},l={button:p=>e.get(p)?la:aa,type:"button",ariaLabel:p=>e.get(p)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(c),i.children.insert(l)},style:{display:"flex",alignItems:"center",gap:i=>ct(Mt(i)*1),paddingBlock:i=>ct(Mt(i)*1),paddingInline:i=>ct(Mt(i)*3),borderRadius:i=>ct(Mt(i)*1),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Vt(i,"shift-4",o.get(i))}`,color:i=>Vt(i,"shift-9",o.get(i)),backgroundColor:i=>Vt(i,"inherit",o.get(i)),fontSize:i=>ia(i,"inherit"),"&:focus-within":{outline:i=>`${ct(.5)} solid ${Vt(i,"shift-6",r.get(i))}`}}}}import{themeSpacing as $n}from"@domphy/theme";function zm(){return{style:{display:"flex",alignItems:"center",gap:$n(2),"& > *":{minWidth:`${$n(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=i=>{let c=r(),l=i.target,p=c.indexOf(l);l.value&&p<c.length-1&&c[p+1].focus()},a=i=>{let c=r(),l=i.target,p=c.indexOf(l);i.key==="Backspace"&&!l.value&&p>0&&c[p-1].focus(),i.key==="ArrowLeft"&&p>0&&c[p-1].focus(),i.key==="ArrowRight"&&p<c.length-1&&c[p+1].focus()},t=i=>{var y,g,u;i.preventDefault();let c=(g=(y=i.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",l=r(),p=l.indexOf(i.target),s=p===-1?0:p;[...c].forEach((d,h)=>{l[s+h]&&(l[s+h].value=d)});let m=Math.min(s+c.length-1,l.length-1);(u=l[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",a),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",a),o.removeEventListener("paste",t)})}}}import{toState as In}from"@domphy/core";import{themeColor as de,themeSize as sa,themeSpacing as mt}from"@domphy/theme";function Rm(n={}){var e,a;let o=In((e=n.color)!=null?e:"neutral","color"),r=In((a=n.accentColor)!=null?a:"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=>sa(t,"inherit"),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 ${de(t,"shift-4",o.get(t))}`,color:t=>de(t,"shift-9",o.get(t)),width:mt(4),height:mt(4)},"&:hover::before":{backgroundColor:t=>de(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${de(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>de(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>de(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${mt(.5)} solid ${de(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>de(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as zn}from"@domphy/core";import{themeColor as _t,themeSpacing as F}from"@domphy/theme";function Bm(n={}){var e,a;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((a=n.accentColor)!=null?a:"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:F(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:F(1.5),borderRadius:F(999),backgroundColor:t=>_t(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:F(4),height:F(4),borderRadius:F(999),border:"none",marginTop:`calc((${F(1.5)} - ${F(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=>`${F(.5)} solid ${_t(t,"shift-6",r.get(t))}`,outlineOffset:F(1),borderRadius:F(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Vn}from"@domphy/core";import{themeColor as pe,themeDensity as go,themeSize as ca,themeSpacing as ut}from"@domphy/theme";function jm(n={}){var e,a;let o=Vn((e=n.color)!=null?e:"neutral","color"),r=Vn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ca(t,"inherit"),lineHeight:"inherit",color:t=>pe(t,"shift-9",o.get(t)),backgroundColor:t=>pe(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${pe(t,"shift-4",o.get(t))}`,borderRadius:t=>ut(go(t)*1),minWidth:ut(32),paddingInline:t=>ut(go(t)*3),paddingBlock:t=>ut(go(t)*1),"&::placeholder":{color:t=>pe(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ut(.5)} solid ${pe(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>pe(t,"shift-8","neutral"),backgroundColor:t=>pe(t,"shift-2","neutral"),outline:t=>`1px solid ${pe(t,"shift-4","neutral")}`}}}}import{toState as ma}from"@domphy/core";import{themeColor as yo,themeSize as Mn,themeSpacing as ne}from"@domphy/theme";function Um(n={}){var r;let o=ma((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:ne(9),height:ne(6),cursor:"pointer",margin:"0",paddingBlock:ne(1),"&:checked":{"&::before":{backgroundColor:e=>yo(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${ne(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:ne(3),height:ne(3),borderRadius:ne(999),left:ne(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>yo(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:ne(999),display:"inline-block",fontSize:e=>Mn(e,"inherit"),lineHeight:1,backgroundColor:e=>yo(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as _n}from"@domphy/core";import{themeColor as N,themeDensity as bo,themeSize as ua,themeSpacing as he}from"@domphy/theme";function Qm(n={}){var e,a;let o=_n((e=n.color)!=null?e:"neutral","color"),r=_n((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:he(10),paddingInline:t=>he(bo(t)*3),paddingBlock:t=>he(bo(t)*1),borderRadius:t=>he(bo(t)*1),fontSize:t=>ua(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"shift-4",o.get(t))}`,color:t=>N(t,"shift-9",o.get(t)),backgroundColor:t=>N(t,"inherit",o.get(t)),"&::placeholder":{color:t=>N(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>N(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${he(.5)} solid ${N(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>N(t,"shift-2","neutral"),outline:t=>`1px solid ${N(t,"shift-4","neutral")}`,color:t=>N(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","warning")}`}}}}import{toState as da}from"@domphy/core";import{themeColor as So,themeSize as pa,themeSpacing as Co}from"@domphy/theme";function nu(n={}){var r;let o=da((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=>pa(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),paddingBlock:Co(.5),paddingInline:Co(1.5),borderRadius:Co(1),outline:e=>`1px solid ${So(e,"shift-4",o.get(e))}`}}}import{toState as Rn}from"@domphy/core";import{themeColor as vo,themeSize as ha,themeSpacing as fa}from"@domphy/theme";function lu(n={}){var e,a;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:fa(2),fontSize:t=>ha(t,"inherit"),color:t=>vo(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>vo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>vo(t,"shift-8","neutral")}}}}import{toState as Hn}from"@domphy/core";import{themeColor as He,themeSize as ga,themeSpacing as Eo}from"@domphy/theme";function uu(n={}){var e,a;let o=Hn((e=n.color)!=null?e:"primary","color"),r=Hn((a=n.accentColor)!=null?a:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>ga(t,"inherit"),backgroundColor:t=>He(t),color:t=>He(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>He(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>He(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Eo(1),outlineOffset:Eo(1),outline:t=>`${Eo(.5)} solid ${He(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>He(t,"shift-8","neutral")}}}}import{toState as ya}from"@domphy/core";import{themeColor as re,themeDensity as Rt,themeSize as ba,themeSpacing as dt}from"@domphy/theme";function fu(n={}){var r;let o=ya((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=>ba(e,"inherit"),textDecoration:"none",paddingBlock:e=>dt(Rt(e)*1),paddingInline:e=>dt(Rt(e)*3),borderRadius:e=>dt(Rt(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>dt(Rt(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${re(e,"shift-4",o.get(e))}`,color:e=>re(e,"shift-9",o.get(e)),backgroundColor:e=>re(e,"inherit",o.get(e)),"&:hover":{color:e=>re(e,"shift-10",o.get(e)),backgroundColor:e=>re(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${dt(.5)} ${re(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>re(e,"shift-2","neutral"),outline:e=>`1px solid ${re(e,"shift-4","neutral")}`,color:e=>re(e,"shift-8","neutral")}}}}import{toState as Sa}from"@domphy/core";import{themeColor as pt,themeDensity as ke,themeSize as An,themeSpacing as xe}from"@domphy/theme";function Su(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Cu(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>xe(ke(r)*2),paddingBlock:r=>xe(o?1:ke(r)*2),paddingInline:r=>xe(ke(r)*3),fontSize:r=>An(r,"inherit")}}}function vu(n={}){var a,t;let o=Sa((a=n.color)!=null?a:"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:i=>xe(ke(i)*2),paddingBlock:i=>xe(e?1:ke(i)*2),paddingInline:i=>xe(ke(i)*3),fontSize:i=>An(i,"inherit"),color:i=>pt(i,"shift-9",o.get(i)),borderRadius:i=>xe(ke(i)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:i=>pt(i,"shift-2",o.get(i))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:i=>pt(i,"shift-3",r),color:i=>pt(i,"shift-12",r)},"&:focus-visible":{outline:i=>`2px solid ${pt(i,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ca}from"@domphy/core";import{themeColor as Nn,themeSize as va,themeSpacing as ko}from"@domphy/theme";function wu(n={}){var r;let o=Ca((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=>va(e,"inherit"),color:e=>Nn(e,"shift-9",o.get(e)),backgroundColor:e=>Nn(e,"inherit",o.get(e)),height:ko(6),borderRadius:ko(1),paddingInline:ko(1.5)}}}import{toState as Ea}from"@domphy/core";import{themeColor as we,themeDensity as Ht,themeSize as Bn,themeSpacing as Te}from"@domphy/theme";function Ou(n={items:[]}){var i;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:a="primary"}=n,t=Ea((i=n.activeKey)!=null?i:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(c,l)=>{if(o.length===0)return;let p=c.nodeId,s=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Oe(W({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,id:`menuitem${p}${g}`,role:"menuitem"},r?{ariaCurrent:d=>t.get(d)===g||void 0}:{}),{onClick:()=>{var d;r&&t.set(g),(d=m.onClick)==null||d.call(m)},onKeyDown:d=>{var C;let h=d.key;if(h==="Enter"||h===" "){d.preventDefault(),d.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;d.preventDefault();let S=o.map((x,D)=>{var P;return(P=x.key)!=null?P:D}),v=S.findIndex(x=>x===g),k=v;h==="ArrowDown"?k=(v+1)%S.length:h==="ArrowUp"?k=(v-1+S.length)%S.length:h==="Home"?k=0:h==="End"&&(k=S.length-1),(C=document.getElementById(`menuitem${p}${S[k]}`))==null||C.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Te(2),width:"100%",fontSize:d=>Bn(d,"inherit"),height:d=>Te(6+Ht(d)*2),paddingInline:d=>Te(Ht(d)*3),border:"none",outline:"none",color:d=>we(d,"shift-9",e),backgroundColor:d=>we(d,"inherit",e),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:d=>we(d,"shift-2",e)},"&[aria-current=true]":{backgroundColor:d=>we(d,"shift-3",a),color:d=>we(d,"shift-10")},"&:focus-visible":{outline:d=>`${Te(.5)} solid ${we(d,"shift-6",a)}`,outlineOffset:`-${Te(.5)}`}}})});l[c.tagName]=s},style:{display:"flex",flexDirection:"column",paddingBlock:c=>Te(Ht(c)*2),paddingInline:c=>Te(Ht(c)*2),fontSize:c=>Bn(c,"inherit"),backgroundColor:c=>we(c,"inherit",e)}}}var Fn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Ae=n=>{let o={},r=[];for(let e in n){let a=n[e];e==="x"?r.push(`translateX(${typeof a=="number"?`${a}px`:a})`):e==="y"?r.push(`translateY(${typeof a=="number"?`${a}px`:a})`):e==="scale"?r.push(`scale(${a})`):e==="rotate"?r.push(`rotate(${typeof a=="number"?`${a}deg`:a})`):o[e]=a}return r.length&&(o.transform=r.join(" ")),o};function Iu(n={}){var i,c,l,p;let{initial:o,animate:r,exit:e,transition:a={}}=n,t={duration:(i=a.duration)!=null?i:300,delay:(c=a.delay)!=null?c:0,easing:(l=a.easing)!=null?l:"ease",iterations:(p=a.iterations)!=null?p:1,fill:"both"};return{_onMount:s=>{let m=s.domElement;if(!m||typeof m.animate!="function")return;let y=Fn(r)?r.get():r;if(y?m.animate(o?[Ae(o),Ae(y)]:[Ae(y)],t):o&&Object.assign(m.style,Ae(o)),Fn(r)){let g=r.addListener(u=>{m.animate([Ae(u)],t)});s.setMetadata("motionRelease",g)}},_onBeforeRemove:(s,m)=>{let y=s.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Ae(e)],t).finished.then(m,m)},_onRemove:s=>{let m=s.getMetadata("motionRelease");m==null||m()}}}import{toState as ka}from"@domphy/core";import{themeColor as Wn,themeSize as xa,themeSpacing as wa}from"@domphy/theme";function _u(n={}){var r;let o=ka((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=>xa(e,"inherit"),backgroundColor:e=>Wn(e),color:e=>Wn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:wa(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Ta}from"@domphy/core";import{themeColor as Ne,themeDensity as ht,themeSize as Da,themeSpacing as Be}from"@domphy/theme";function Pa(n,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),a=Math.min(o-1,n+1);for(let t=e;t<=a;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Nu(n){var c;let{total:o,color:r="neutral",accentColor:e="primary"}=n,a=Ta((c=n.value)!=null?c:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>Be(6+ht(l)*2),height:l=>Be(6+ht(l)*2),paddingInline:l=>Be(ht(l)*2),borderRadius:l=>Be(ht(l)*1),border:"none",cursor:"pointer",fontSize:l=>Da(l,"inherit"),backgroundColor:"transparent",color:l=>Ne(l,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=Oe(W({},t),{backgroundColor:l=>Ne(l,"shift-6",e),color:l=>Ne(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let p={div:s=>{let m=a.get(s),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&a.set(m-1),style:t});let g=0;for(let u of Pa(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>Be(ht(d)*2),color:d=>Ne(d,"shift-7",r)}});else{let d=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>a.set(u),style:d?i:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&a.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:Be(1)}};l.children.insert(p)},style:{display:"inline-flex"}}}import{toState as Oa}from"@domphy/core";import{themeColor as La,themeSize as $a}from"@domphy/theme";function ju(n={}){var r;let o=Oa((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=>$a(e,"inherit"),color:e=>La(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Ia,toState as Kn}from"@domphy/core";import{themeColor as za}from"@domphy/theme";function Xu(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,a=null,t=Kn(o),i=Kn(r),{show:c,hide:l,anchorPartial:p}=K({open:t,placement:i,content:n.content}),s={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>za(g,"inherit")},onMouseEnter:()=>e==="hover"&&c(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:g=>{let u=g.attributes.get("id");a=u||g.nodeId,!u&&g.attributes.set("id",a)}};return(y=n.content).$||(y.$=[]),n.content.$.push(s),Ia(p,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&c(u),onMouseLeave:(g,u)=>e==="hover"&&l(u),onClick:(g,u)=>{e==="click"&&(t.get()?l(u):c(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&l(u)},onFocus:(g,u)=>e==="hover"&&c(u),onBlur:(g,u)=>{let d=g.relatedTarget,h=u.getRoot().domElement,S=a?h.querySelector(`#${CSS.escape(a)}`):null;d&&(S!=null&&S.contains(d))||l(u)},_onMount:g=>a&&g.attributes.set("ariaControls",a)}),p}import{toState as Va}from"@domphy/core";import{themeColor as At,themeSize as Ma,themeSpacing as xo}from"@domphy/theme";function jn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=xo(6),bordered:a=!0}=n,t=Va(o),i={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=s=>{var m;return(m=i[t.get(s)])!=null?m:i["bottom-end"]},l=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",p=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>Ma(s),backgroundColor:s=>At(s),color:s=>At(s,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:xo(1.5),height:xo(1.5),backgroundColor:s=>At(s,"inherit",r),borderWidth:a?"1px":"0px",borderColor:s=>At(s,"inherit",r),borderTopStyle:s=>{let m=c(s);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:s=>{let m=c(s);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:s=>{let m=c(s);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:s=>{let m=c(s);return m.includes("right")?0:m.includes("left")?"auto":p(m)},bottom:s=>{let m=c(s);return m.includes("bottom")?0:m.includes("top")?"auto":p(m)},left:s=>{let m=c(s);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:s=>{let m=c(s),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 _a}from"@domphy/core";import{themeColor as Yn,themeDensity as wo,themeSize as Ra,themeSpacing as To}from"@domphy/theme";function nd(n={}){var r;let o=_a((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=>Ra(e,"inherit"),color:e=>Yn(e,"shift-9",o.get(e)),backgroundColor:e=>Yn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>To(wo(e)*2),paddingInline:e=>To(wo(e)*3),borderRadius:e=>To(wo(e)*2)}}}import{toState as qn}from"@domphy/core";import{themeColor as Do,themeSpacing as Nt}from"@domphy/theme";function ld(n={}){var e,a;let o=qn((e=n.color)!=null?e:"neutral","color"),r=qn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Nt(2),border:0,borderRadius:Nt(999),overflow:"hidden",backgroundColor:t=>Do(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Do(t,"shift-3",o.get(t)),borderRadius:Nt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Do(t,"shift-9",r.get(t)),borderRadius:Nt(999),transition:"width 220ms ease"}}}}import{toState as Gn}from"@domphy/core";import{themeColor as Ha,themeSpacing as Aa}from"@domphy/theme";var Na='<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>',Ba='<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 ud(n={}){var l,p;let{max:o=5,readOnly:r=!1,onChange:e}=n,a=(l=n.color)!=null?l:"warning",t=Gn((p=n.value)!=null?p:0),i=Gn(0),c=s=>{let m=i.get(s);return m>0?m:t.get(s)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Aa(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:s=>Ha(s,"shift-8",a)},_onInit:s=>{for(let m=1;m<=o;m++){let y=m,g=r?{}:{onClick:()=>{let d=y===t.get()?0:y;t.set(d),e==null||e(d),i.set(0)},onMouseEnter:()=>i.set(y),onMouseLeave:()=>i.set(0),onKeyDown:d=>{var k,C;let h=t.get(),S=h;if(d.key==="ArrowRight"||d.key==="ArrowUp")S=Math.min(o,h+1),d.preventDefault();else if(d.key==="ArrowLeft"||d.key==="ArrowDown")S=Math.max(0,h-1),d.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(C=(k=s.domElement)==null?void 0:k.children[v])==null||C.focus()}},u=Oe(W({button:d=>y<=c(d)?Na:Ba,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});s.children.insert(u)}}}}import{toState as Po}from"@domphy/core";import{themeColor as Un,themeSpacing as Xn}from"@domphy/theme";function gd(n={}){var l,p,s;let{size:o=16,thickness:r=.25}=n,e=Po((l=n.value)!=null?l:0,"value"),a=Po((p=n.color)!=null?p:"primary","color"),t=Po((s=n.trackColor)!=null?s:"neutral","trackColor"),i=Math.round((1-r)*100),c=`radial-gradient(circle closest-side, transparent ${i}%, black ${i}%)`;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:Xn(o),height:Xn(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Un(m,"shift-9",a.get(m))} ${e.get(m)}%, ${Un(m,"shift-3",t.get(m))} 0%)`,WebkitMask:c,mask:c}}}import{toState as Fa}from"@domphy/core";import{themeColor as Oo,themeSpacing as Bt}from"@domphy/theme";function Cd(n={}){var r;let o=Fa((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Bt(2),height:Bt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Oo(e,"shift-5",o.get(e)),borderRadius:Bt(999),border:`${Bt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Oo(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Oo(e,"shift-5",o.get(e))} transparent`}}}import{toState as Wa}from"@domphy/core";import{themeColor as Fe,themeSize as Ka,themeSpacing as j}from"@domphy/theme";function xd(n={items:[]}){var t,i,c;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,a=Wa((c=n.value)!=null?c:(i=(t=o[0])==null?void 0:t.key)!=null?i:"");return{role:"radiogroup",_context:{segmented:{value:a}},_onSchedule:(l,p)=>{let s=o.map((m,y)=>{var d;let g=(d=m.key)!=null?d:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,role:"radio",ariaChecked:h=>a.get(h)===g,onClick:()=>a.set(g),style:{cursor:"pointer",fontSize:h=>Ka(h,"inherit"),height:j(6),paddingBlock:j(1),paddingInline:j(3),border:"none",borderRadius:j(10),color:h=>Fe(h,"shift-9",r),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>Fe(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>Fe(h,"shift-0",e),color:h=>Fe(h,"shift-10",e)},"&:focus-visible":{outline:h=>`${j(.5)} solid ${Fe(h,"shift-6",e)}`,outlineOffset:`-${j(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});p[l.tagName]=s},style:{display:"inline-flex",paddingBlock:j(1),paddingInline:j(1),gap:j(.5),borderRadius:j(10),backgroundColor:l=>Fe(l,"shift-2",r)}}}import{themeColor as Y,themeColorToken as ja,themeDensity as ft,themeSize as Ya,themeSpacing as q}from"@domphy/theme";function Dd(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=>Ya(e,"inherit"),lineHeight:"inherit",color:e=>Y(e,"shift-9",o),backgroundColor:e=>Y(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Y(e,"shift-4",o)}`,borderRadius:e=>q(ft(e)*1),paddingBlock:e=>q(ft(e)*1),paddingLeft:e=>q(ft(e)*3),paddingRight:e=>q(ft(e)*5),backgroundImage:e=>{let a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${ja(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(a)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${q(2)} center`,backgroundSize:`${q(2.5)} ${q(1.5)}`,"&:not([multiple])":{height:e=>q(6+ft(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${q(.5)} solid ${Y(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${q(.5)} solid ${Y(e,"shift-6",r)}`},"& optgroup":{color:e=>Y(e,"shift-11",o)},"& option[disabled]":{color:e=>Y(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Y(e,"shift-8","neutral"),outline:e=>`1px solid ${Y(e,"shift-4","neutral")}`,backgroundColor:e=>Y(e,"shift-2","neutral")}}}}import{merge as Jn,toState as Lo}from"@domphy/core";import{themeColor as $o,themeDensity as Io,themeSize as qa,themeSpacing as gt}from"@domphy/theme";function zd(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=Lo(n.value),c=Lo(a),{show:l,hide:p,anchorPartial:s}=K({open:c,placement:Lo(r),content:n.content}),m={onClick:(u,d)=>!t&&p(d)};Jn(n.content,m);let y={div:u=>{let d=i.get(u),h=Array.isArray(d)?d:[d];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[xt({color:e,removable:t})],_key:v.value,_onRemove:k=>{let C=i.get(),D=(Array.isArray(C)?C:[C]).filter(P=>P!==v.value);t?i.set(D):i.set(D[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:gt(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,d)=>c.get()?p(d):l(d),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>gt(6+Io(u)*2),minWidth:gt(32),outlineOffset:"-1px",outline:u=>`1px solid ${$o(u,"shift-4","neutral")}`,paddingInline:u=>gt(Io(u)*2),borderRadius:u=>gt(Io(u)*1),fontSize:u=>qa(u,"inherit"),color:u=>$o(u,"shift-9",e),backgroundColor:u=>$o(u,"inherit",e)}};return Jn(s,g),s}import{themeColor as We,themeDensity as Zn,themeSize as Ga,themeSpacing as Ft}from"@domphy/theme";function _d(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 i=t.getContext("select");if(i){let c=i.value;t.attributes.set("ariaSelected",l=>{let p=c.get(l);return i.multiple?p.includes(e):p===e}),t.addEvent("click",()=>{let l=c.get();i.multiple?l.includes(e)?c.set(l.filter(p=>p!==e)):c.set(l.concat([e])):l!==e&&c.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Ga(t,"inherit"),height:t=>Ft(6+Zn(t)*2),paddingInline:t=>Ft(Zn(t)*3),border:"none",outline:"none",color:t=>We(t,"shift-9",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"shift-2",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 Ua}from"@domphy/core";import{themeColor as Xa,themeDensity as Qn,themeSize as Ja,themeSpacing as er}from"@domphy/theme";function Nd(n={}){var i;let{color:o="neutral",multiple:r=!1}=n,e=Ua((i=n.value)!=null?i:r?[]:null),a={div:c=>{let l=e.get(c);return(Array.isArray(l)?l:[l]).map(s=>({input:null,name:n.name,value:s==null?"":String(s)}))},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(a)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>er(Qn(c)*2),paddingInline:c=>er(Qn(c)*2),fontSize:c=>Ja(c,"inherit"),backgroundColor:c=>Xa(c,"inherit",o)}}}import{hashString as Za,toState as Qa}from"@domphy/core";import{themeColor as tr,themeSize as el,themeSpacing as or}from"@domphy/theme";function Kd(n={}){var a;let o=Qa((a=n.color)!=null?a:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=Za(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>el(t),color:t=>tr(t,"shift-9",o.get(t)),height:or(6),display:"block",borderRadius:or(1),backgroundColor:t=>tr(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as tl}from"@domphy/core";import{themeColor as ol,themeSize as nl}from"@domphy/theme";function Gd(n={}){var r;let o=tl((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=>nl(e,"inherit"),color:e=>ol(e,"shift-9",o.get(e))}}}import{hashString as rl,toState as il}from"@domphy/core";import{themeColor as Wt,themeSize as al,themeSpacing as zo}from"@domphy/theme";var rr={to:{transform:"rotate(360deg)"}},nr=rl(JSON.stringify(rr));function Zd(n={}){var r;let o=il((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=>al(e),backgroundColor:e=>Wt(e),color:e=>Wt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:zo(6),height:zo(6),borderRadius:"50%",border:e=>`${zo(.5)} solid ${Wt(e,"shift-4",o.get(e))}`,borderTopColor:e=>Wt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${nr} 0.7s linear infinite`,[`@keyframes ${nr}`]:rr}}}import{merge as ll,toState as sl}from"@domphy/core";import{themeColor as Kt,themeSpacing as Vo}from"@domphy/theme";function op(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:a=90}=n;return{_onSchedule:(t,i)=>{ll(i,{_context:{splitter:{direction:o,size:sl(r),min:e,max:a,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function np(){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",a=o.panelCount++===0,t=c=>{r.style[e]=`${a?c:100-c}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let i=o.size.addListener(t);n.addHook("Remove",i)}}}function rp(){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 a=o.size.addListener(l=>{r.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let p=l.shiftKey?10:1,s=null;e?l.key==="ArrowRight"?s=Math.min(o.size.get()+p,o.max):l.key==="ArrowLeft"&&(s=Math.max(o.size.get()-p,o.min)):l.key==="ArrowDown"?s=Math.min(o.size.get()+p,o.max):l.key==="ArrowUp"&&(s=Math.max(o.size.get()-p,o.min)),l.key==="Home"?s=o.min:l.key==="End"&&(s=o.max),s!==null&&(l.preventDefault(),o.size.set(s))},i=null,c=l=>{l.preventDefault();let p=r.parentElement,s=y=>{let g=p.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",s),document.removeEventListener("mouseup",m),i=null};i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",m),i=null},document.addEventListener("mousemove",s),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",c),n.addHook("Remove",()=>{i==null||i(),a(),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:Vo(1),height:Vo(1),borderRadius:Vo(999),backgroundColor:n=>Kt(n,"shift-4")}}}}import{toState as cl}from"@domphy/core";import{themeColor as M,themeSize as ir,themeSpacing as fe}from"@domphy/theme";function sp(n={items:[]}){var i;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:a="primary"}=n,t=cl((i=n.current)!=null?i:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:a}},_onSchedule:(c,l)=>{let p=o.map((s,m)=>{var g;return{li:[typeof s.label=="string"?{span:s.label}:s.label],_key:(g=s.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let d=t.get(u);return m<d?"done":m===d?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:fe(1),flex:"1",fontSize:u=>ir(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:fe(6),height:fe(6),borderRadius:fe(999),fontSize:u=>ir(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${M(u,"shift-4",e)}`,backgroundColor:u=>M(u,"inherit"),color:u=>M(u,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:fe(3),right:`calc(50% + ${fe(3)})`,left:`calc(-50% + ${fe(3)})`,height:"2px",backgroundColor:u=>M(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>M(u,"shift-6",a),borderColor:u=>M(u,"shift-6",a),color:u=>M(u,"shift-15",a)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>M(u,"shift-3",e),borderColor:u=>M(u,"shift-3",e),color:u=>M(u,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-6",a)},"&[data-status=pending]":{color:u=>M(u,"shift-7")},"&[data-status=active]":{color:u=>M(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>M(u,"shift-8")}}}});l[c.tagName]=p},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:fe(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as ml}from"@domphy/core";import{themeColor as ar,themeSize as ul}from"@domphy/theme";function dp(n={}){var r;let o=ml((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=>ul(e,"inherit"),fontWeight:700,color:e=>ar(e,"shift-11",o.get(e)),backgroundColor:e=>ar(e)}}}import{toState as dl}from"@domphy/core";import{themeColor as pl,themeSize as hl}from"@domphy/theme";function gp(n={}){var r;let o=dl((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=>hl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>pl(e,"shift-9",o.get(e))}}}import{toState as fl}from"@domphy/core";import{themeColor as gl,themeSize as yl}from"@domphy/theme";function Cp(n={}){var r;let o=fl((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=>yl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>gl(e,"shift-9",o.get(e))}}}import{toState as bl}from"@domphy/core";import{themeColor as G,themeDensity as Ke,themeSize as lr,themeSpacing as je}from"@domphy/theme";function xp(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=>lr(e,"inherit"),color:e=>G(e,"shift-9",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=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${G(e,"shift-3",o.get(e))}`,fontSize:e=>lr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${G(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>G(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${G(e,"shift-2")}!important`}}}}import{toState as Sl}from"@domphy/core";import{themeColor as Ye,themeDensity as jt,themeSize as Cl,themeSpacing as ge}from"@domphy/theme";function Pp(n={items:[]}){var t,i,c;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,a=Sl((c=n.activeKey)!=null?c:(i=(t=o[0])==null?void 0:t.key)!=null?i:0);return{_onSchedule:(l,p)=>{let s=l.nodeId,y={div:o.map((u,d)=>{var v;let h=(v=u.key)!=null?v:d;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,role:"tab",id:`tab${s}${h}`,ariaControls:`panel${s}${h}`,ariaSelected:k=>a.get(k)===h,onClick:()=>a.set(h),onKeyDown:k=>{let C=k.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;k.preventDefault();let x=o.map((Se,De)=>{var ie;return(ie=Se.key)!=null?ie:De}),D=x.findIndex(Se=>Se===h),P=D;C==="ArrowRight"?P=(D+1)%x.length:C==="ArrowLeft"?P=(D-1+x.length)%x.length:C==="Home"?P=0:C==="End"&&(P=x.length-1),a.set(x[P])},style:{cursor:"pointer",fontSize:k=>Cl(k,"inherit"),height:k=>ge(6+jt(k)*2),paddingInline:k=>ge(jt(k)*4),border:"none",outline:"none",color:k=>Ye(k,"shift-9"),backgroundColor:k=>Ye(k,"inherit"),boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-1",e)}`,"&:hover:not([disabled])":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-6",r)}`},"&:focus-visible":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,d)=>{var S;let h=(S=u.key)!=null?S:d;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${s}${h}`,ariaLabelledby:`tab${s}${h}`,hidden:v=>a.get(v)!==h,style:{paddingBlock:v=>ge(jt(v)*2),paddingInline:v=>ge(jt(v)*2)}}});p[l.tagName]=[y,...g]}}}import{toState as sr}from"@domphy/core";import{themeColor as U,themeDensity as Mo,themeSize as vl,themeSpacing as qe}from"@domphy/theme";function Ip(n={}){var a,t;let o=sr((a=n.color)!=null?a:"neutral","color"),r=sr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let c=i.domElement;c.style.overflow="hidden";let l=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",l),l(),i.addHook("Remove",()=>c.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>qe(Mo(i)*2),paddingBlock:i=>qe(Mo(i)*1.5),border:"none",borderRadius:i=>qe(Mo(i)*1.5),fontSize:i=>vl(i,"inherit"),color:i=>U(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${U(i,"shift-4",o.get(i))}`,backgroundColor:i=>U(i,"inherit",o.get(i)),"&::placeholder":{color:i=>U(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5",r.get(i))}`},"&:focus-visible":{outline:i=>`${qe(.5)} solid ${U(i,"shift-6",r.get(i))}`},"&:invalid":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>U(i,"shift-8","neutral"),outline:i=>`1px solid ${U(i,"shift-4","neutral")}`,backgroundColor:i=>U(i,"shift-2","neutral")}}}}import{toState as El}from"@domphy/core";import{themeColor as cr,themeDensity as _o,themeSpacing as Ro}from"@domphy/theme";function _p(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Rp(n={}){var t,i,c;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(i=n.accentColor)!=null?i:"primary",a=El((c=n.active)!=null?c:!1);return{style:W({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>Ro(_o(l)*2),paddingBottom:l=>o?"0":Ro(_o(l)*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:l=>cr(l,"shift-8",a.get(l)?e:r),opacity:l=>a.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${Ro(_o(l)*4)}`,width:"2px",backgroundColor:l=>cr(l,"shift-3",r)}})}}import{toState as kl}from"@domphy/core";import{themeColor as Ho,themeDensity as Ao,themeSize as xl,themeSpacing as ye}from"@domphy/theme";function Fp(n={}){let{position:o="top-center",color:r="neutral"}=n,e=kl(!1),a=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),c={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:a?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:ye(4),zIndex:30,padding:ye(6),pointerEvents:"none"}};return{_portal:l=>{let p=l.domElement.querySelector(`#domphy-toast-${o}`);return p||(p=l.children.insert(c).domElement),p},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:ye(32),pointerEvents:"auto",paddingBlock:l=>ye(Ao(l)*2),paddingInline:l=>ye(Ao(l)*4),borderRadius:l=>ye(Ao(l)*2),fontSize:l=>xl(l,"inherit"),color:l=>Ho(l,"shift-9",r),backgroundColor:l=>Ho(l,"inherit",r),boxShadow:l=>`0 ${ye(2)} ${ye(9)} ${Ho(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":a?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,p)=>{let s=!1,m=null,y=()=>{s||(s=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",g),p())},g=u=>{u.propertyName==="transform"&&y()};l.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),l.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=l.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as wl}from"@domphy/core";import{themeColor as be,themeSize as mr,themeSpacing as X}from"@domphy/theme";function Yp(n={items:[]}){var i;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:a="primary"}=n,t=wl((i=n.value)!=null?i:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(c,l)=>{let p=o.map((s,m)=>{var u;let y=(u=s.key)!=null?u:String(m);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:y,role:"button",ariaPressed:d=>{let h=t.get(d);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let d=t.get();if(r){let h=Array.isArray(d)?[...d]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(d===y?"":y)},style:{cursor:"pointer",fontSize:d=>mr(d,"inherit"),height:X(6),paddingBlock:X(1),paddingInline:X(2),border:"none",borderRadius:X(1),color:d=>be(d,"shift-9",e),backgroundColor:d=>be(d,"inherit",e),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:d=>be(d,"shift-2",e)},"&[aria-pressed=true]":{backgroundColor:d=>be(d,"shift-3",a),color:d=>be(d,"shift-12",a)},"&:focus-visible":{outline:d=>`${X(.5)} solid ${be(d,"shift-6",a)}`,outlineOffset:`-${X(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});l[c.tagName]=p},style:{display:"flex",paddingBlock:X(1),paddingInline:X(1),gap:X(1),borderRadius:X(2),fontSize:c=>mr(c,"inherit"),backgroundColor:c=>be(c,"inherit",e),outline:c=>`1px solid ${be(c,"shift-3",e)}`,outlineOffset:"-1px"}}}import{themeDensity as Tl,themeSpacing as Dl}from"@domphy/theme";function Up(n={}){var r;let o=(r=n.gap)!=null?r:4;return{style:{display:"flex",alignItems:"center",gap:e=>Dl(Tl(e)*o)}}}function Xp(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Pl,toState as ur}from"@domphy/core";import{themeColor as dr,themeDensity as No,themeSize as Ol,themeSpacing as Bo}from"@domphy/theme";function oh(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,a=ur(r),t=ur(e),i=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:g=>t.get(g),id:i},{show:l,hide:p,anchorPartial:s}=K({open:o,placement:a,content:c}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>Bo(No(g)*1),paddingInline:g=>Bo(No(g)*3),borderRadius:g=>Bo(No(g)*1),color:g=>dr(g,"shift-9"),backgroundColor:g=>dr(g),fontSize:g=>Ol(g,"inherit")},$:[jn({placement:a,bordered:!1})]};return c.$||(c.$=[]),c.$.push(m),Pl(s,{ariaDescribedby:i,onMouseEnter:(g,u)=>l(u),onMouseLeave:(g,u)=>p(u),onFocus:(g,u)=>l(u),onBlur:(g,u)=>p(u),onKeyDown:(g,u)=>g.key==="Escape"&&p(u)}),s}import{ElementNode as pr}from"@domphy/core";function hr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function ih(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,a=new Map,t=new Set,i=new Set;return{_onMount:c=>{c.addHook("Remove",()=>{for(let l of Array.from(a.values()))l();a.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of i)cancelAnimationFrame(l);i.clear()})},_onBeforeUpdate:c=>{e=new Map,c.children.items.forEach((l,p)=>{if(!(l instanceof pr))return;let s=l.domElement;s&&e.set(hr(l,p),s.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((l,p)=>{var x;if(!(l instanceof pr))return;let s=l.domElement;if(!s)return;let m=hr(l,p),y=e.get(m);if(!y)return;let g=s.getBoundingClientRect(),u=y.left-g.left,d=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(d)<.5)return;(x=a.get(s))==null||x(),s.style.transition="none",s.style.transform=`translate(${u}px, ${d}px)`,s.getBoundingClientRect();let h=requestAnimationFrame(()=>{i.delete(h),s.style.transition=`transform ${o}ms ease ${r}ms`,s.style.transform="translate(0px, 0px)"});i.add(h);let S=!1,v=null,k=()=>{S||(S=!0,v&&(t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",C),s.style.transition="",s.style.transform="")},C=D=>{D.propertyName==="transform"&&k()};a.set(s,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",C)}),s.addEventListener("transitionend",C),v=setTimeout(k,o+r+34),t.add(v)}),e.clear()}}}import{toState as Ll}from"@domphy/core";import{themeColor as fr,themeSize as $l,themeSpacing as Il}from"@domphy/theme";function ch(n={}){var r;let o=Ll((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=>$l(e,"inherit"),backgroundColor:e=>fr(e),color:e=>fr(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Il(3),listStyleType:"disc",listStylePosition:"outside"}}}export{_l as abbreviation,Nl as accordion,Kl as alert,Gl as avatar,Zl as badge,os as blockquote,as as breadcrumb,ms as breadcrumbEllipsis,hs as button,bs as buttonGhost,Es as buttonSwitch,Ts as card,Ls as code,Fs as combobox,Ys as command,Gs as commandItem,qs as commandSearch,Qs as datePicker,rc as descriptionList,sc as details,hc as dialog,bc as divider,kc as drawer,Dc as emphasis,$c as empty,zc as errorBoundary,Rc as fab,Bc as figure,jc as formGroup,Uc as heading,Qc as horizontalRule,nm as icon,lm as image,um as inputCheckbox,hm as inputColor,bm as inputDateTime,Em as inputFile,Tm as inputNumber,zm as inputOTP,Lm as inputPassword,Rm as inputRadio,Bm as inputRange,jm as inputSearch,Um as inputSwitch,Qm as inputText,nu as keyboard,lu as label,uu as link,fu as linkButton,Su as list,Cu as listItem,vu as listItemButton,wu as mark,Ou as menu,Iu as motion,_u as orderedList,Nu as pagination,ju as paragraph,Xu as popover,jn as popoverArrow,nd as preformated,ld as progress,ud as rating,gd as ringProgress,Cd as scrollArea,xd as segmented,Dd as select,zd as selectBox,_d as selectItem,Nd as selectList,Kd as skeleton,Gd as small,Zd as spinner,op as splitter,rp as splitterHandle,np as splitterPanel,sp as steps,dp as strong,gp as subscript,Cp as superscript,xp as table,Pp as tabs,xt as tag,Ip as textarea,_p as timeline,Rp as timelineItem,Fp as toast,Yp as toggleGroup,Up as toolbar,Xp as toolbarSpacer,oh as tooltip,ih as transitionGroup,ch as unorderedList};
|
|
1
|
+
var zr=Object.defineProperty,Vr=Object.defineProperties;var Mr=Object.getOwnPropertyDescriptors;var Xo=Object.getOwnPropertySymbols;var _r=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable;var Jo=(n,o,r)=>o in n?zr(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r,W=(n,o)=>{for(var r in o||(o={}))_r.call(o,r)&&Jo(n,r,o[r]);if(Xo)for(var r of Xo(o))Rr.call(o,r)&&Jo(n,r,o[r]);return n},Oe=(n,o)=>Vr(n,Mr(o));import{toState as Zo}from"@domphy/core";import{themeColor as Ge,themeSize as Hr,themeSpacing as Ar}from"@domphy/theme";function Rl(n={}){var e,a;let o=Zo((e=n.color)!=null?e:"neutral","color"),r=Zo((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Hr(t),backgroundColor:t=>Ge(t),color:t=>Ge(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Ge(t,"shift-7",o.get(t)),textUnderlineOffset:Ar(.72),cursor:"help","&:hover":{color:t=>Ge(t,"shift-11",r.get(t)),textDecorationColor:t=>Ge(t,"shift-9",r.get(t))}}}}import{toState as Qo}from"@domphy/core";import{themeColor as Xt,themeDensity as Nr,themeSpacing as en}from"@domphy/theme";function Bl(n={}){var a,t;let{type:o="single"}=n,r=Qo((a=n.color)!=null?a:"neutral","color"),e=Qo((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:i=>{if(o!=="single")return;let c=i.domElement;if(!c)return;let l=p=>{let s=p.target.closest("summary");if(!s)return;let m=s.closest("details");!m||m.parentElement!==c||m.open||Array.from(c.querySelectorAll(":scope > details")).forEach(y=>{y!==m&&(y.open=!1)})};c.addEventListener("click",l),i.addHook("Remove",()=>c.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:i=>en(Nr(i)*1),outline:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:i=>`1px solid ${Xt(i,"shift-4",r.get(i))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:i=>`${en(.5)} solid ${Xt(i,"shift-6",e.get(i))}`}}}}import{toState as Br}from"@domphy/core";import{themeColor as Jt,themeDensity as tn,themeSize as Fr,themeSpacing as bt}from"@domphy/theme";function jl(n={}){var r;let o=Br((r=n.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:bt(3),paddingBlock:e=>bt(tn(e)*2),paddingInline:e=>bt(tn(e)*4),boxShadow:e=>`inset ${bt(1)} 0 0 0 ${Jt(e,"shift-8",o.get(e))}`,backgroundColor:e=>Jt(e,"inherit",o.get(e)),color:e=>Jt(e,"shift-10",o.get(e)),fontSize:e=>Fr(e,"inherit")}}}import{toState as Wr}from"@domphy/core";import{themeColor as on,themeSize as Kr,themeSpacing as nn}from"@domphy/theme";function Ul(n={}){var r;let o=Wr((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:nn(9),height:nn(9),fontSize:e=>Kr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>on(e,"inherit",o.get(e)),color:e=>on(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as rn}from"@domphy/core";import{themeColor as an,themeSize as jr,themeSpacing as Zt}from"@domphy/theme";function Ql(n={}){var a;let{label:o=999}=n,r=rn(o),e=rn((a=n.color)!=null?a:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Zt(1),minWidth:Zt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>jr(t,"decrease-1"),borderRadius:Zt(999),backgroundColor:t=>an(t,"shift-9",e.get(t)),color:t=>an(t,"shift-0",e.get(t))}}}}import{toState as Yr}from"@domphy/core";import{themeColor as ln,themeDensity as sn,themeSize as qr,themeSpacing as Qt}from"@domphy/theme";function ns(n={}){var r;let o=Yr((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=>qr(e,"inherit"),backgroundColor:e=>ln(e,"inherit",o.get(e)),boxShadow:e=>`inset ${Qt(1)} 0 0 0 ${ln(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>Qt(sn(e)*2),paddingInline:e=>Qt(sn(e)*4),margin:0}}}import{toState as Gr}from"@domphy/core";import{themeColor as Ue,themeSize as Ur,themeSpacing as cn}from"@domphy/theme";function ls(n={}){var e;let{separator:o="/"}=n,r=Gr((e=n.color)!=null?e:"neutral","color");return{_onInsert:a=>{a.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:a=>Ur(a,"inherit"),gap:cn(1),color:a=>Ue(a,"shift-9",r.get(a)),backgroundColor:a=>Ue(a,"inherit",r.get(a)),"& > *":{display:"inline-flex",alignItems:"center",color:a=>Ue(a,"shift-8",r.get(a))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:a=>Ue(a,"shift-4",r.get(a)),paddingInlineStart:cn(1)},"& > [aria-current=page]":{color:a=>Ue(a,"shift-10",r.get(a)),pointerEvents:"none"}}}}import{toState as Xr}from"@domphy/core";import{themeColor as St,themeSize as Jr,themeSpacing as Ct}from"@domphy/theme";function us(n={}){var r;let o=Xr((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=>Jr(e,"inherit"),paddingInline:Ct(1),border:"none",background:"none",cursor:"pointer",color:e=>St(e,"shift-8",o.get(e)),borderRadius:Ct(1),"&:hover":{color:e=>St(e,"shift-10",o.get(e)),backgroundColor:e=>St(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${Ct(.5)} solid ${St(e,"shift-6",o.get(e))}`,outlineOffset:Ct(.5)}}}}import{toState as Zr}from"@domphy/core";import{themeColor as J,themeDensity as vt,themeSize as Qr,themeSpacing as Xe}from"@domphy/theme";function fs(n={}){var r;let o=Zr((r=n.color)!=null?r:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Qr(e,"inherit"),paddingBlock:e=>Xe(vt(e)*1),paddingInline:e=>Xe(vt(e)*3),borderRadius:e=>Xe(vt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Xe(vt(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${J(e,"shift-4",o.get(e))}`,color:e=>J(e,"shift-9",o.get(e)),backgroundColor:e=>J(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>J(e,"shift-10",o.get(e)),backgroundColor:e=>J(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Xe(.5)} ${J(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>J(e,"shift-2","neutral"),outline:e=>`1px solid ${J(e,"shift-4","neutral")}`,color:e=>J(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as ei}from"@domphy/core";import{themeColor as Je,themeDensity as Et,themeSize as ti,themeSpacing as Ze}from"@domphy/theme";function Ss(n={}){var r;let o=ei((r=n.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>ti(e,"inherit"),paddingBlock:e=>Ze(Et(e)*1),paddingInline:e=>Ze(Et(e)*1),borderRadius:e=>Ze(Et(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>Ze(Et(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>Je(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>Je(e,"shift-9",o.get(e)),backgroundColor:e=>Je(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Ze(.5)} ${Je(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Je(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as eo}from"@domphy/core";import{themeColor as Le,themeSize as oi,themeSpacing as A}from"@domphy/theme";function ks(n={}){var t,i;let{checked:o=!1}=n,r=eo(o),e=eo((t=n.color)!=null?t:"neutral","color"),a=eo((i=n.accentColor)!=null?i:"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=>oi(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${Le(c,"shift-3",e.get(c))}`,minWidth:A(12),minHeight:A(6),borderRadius:A(999),paddingLeft:A(7),paddingRight:A(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>Le(c,"inherit",e.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:A(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:A(5),height:A(5),borderRadius:A(999),color:c=>Le(c,"shift-9"),backgroundColor:c=>Le(c,"decrease-2",e.get(c))},"&[aria-checked=true]":{backgroundColor:c=>Le(c,"increase-3",a.get(c)),outline:"none",color:c=>Le(c,"decrease-2"),paddingLeft:A(2),paddingRight:A(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${A(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ni}from"@domphy/core";import{themeColor as $e,themeDensity as le,themeSpacing as Z}from"@domphy/theme";function Ds(n={}){var r;let o=ni((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=>Z(le(e)*2),backgroundColor:e=>$e(e,"inherit",o.get(e)),color:e=>$e(e,"shift-10",o.get(e)),outline:e=>`1px solid ${$e(e,"shift-4",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=>Z(le(e)*2),paddingInline:e=>Z(le(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Z(le(e)*4),color:e=>$e(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Z(le(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Z(le(e)*4),color:e=>$e(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Z(2),paddingBlock:e=>Z(le(e)*2),paddingInline:e=>Z(le(e)*4),borderTop:e=>`1px solid ${$e(e,"shift-3",o.get(e))}`}}}}import{toState as ri}from"@domphy/core";import{themeColor as mn,themeSize as ii,themeSpacing as to}from"@domphy/theme";function $s(n={}){var r;let o=ri((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=>ii(e,"inherit"),color:e=>mn(e,"shift-9",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),height:to(6),paddingInline:to(1.5),borderRadius:to(1)}}}import{merge as no,toState as ro}from"@domphy/core";import{themeColor as Qe,themeDensity as io,themeSize as dn,themeSpacing as Ce}from"@domphy/theme";import{merge as ai,toState as li}from"@domphy/core";import{autoUpdate as si,computePosition as ci,flip as mi,offset as ui,shift as di}from"@domphy/floating";var oo=new WeakMap;function un(n,o){let r=oo.get(n);r&&r!==o&&r(),oo.set(n,o)}function K(n){let{open:o=!1,placement:r}=n,e=null,a=null,t=null,i=null,c=null,l=null,p=!1,s=li(o),m=()=>{e&&clearTimeout(e),a&&(a(),a=null),c&&c.remove()},y=C=>{C&&(l=C.getRoot(),t=C.domElement,t&&un(t,m))},g=()=>{p||!l||(p=!0,c=l.children.insert(n.content))},u=()=>{g(),t&&i&&(a&&a(),a=si(t,i,()=>{ci(t,i,{placement:r.get(),middleware:[ui(12),mi(),di()],strategy:"fixed"}).then(({x:C,y:x,placement:D})=>{Object.assign(i.style,{left:`${C}px`,top:`${x}px`}),r.set(D)})}),s.set(!0))},d=()=>{a&&a(),a=null,s.set(!1)},h=C=>{y(C),e&&clearTimeout(e),e=setTimeout(u,100)},S=C=>{y(C),e&&clearTimeout(e),e=setTimeout(d,100)},v={style:{position:"fixed",pointerEvents:"auto",visibility:C=>s.get(C)?"visible":"hidden"},_onMount:C=>i=C.domElement,_portal:C=>{var D;let x=C.domElement.querySelector("#domphy-floating");if(!x){let P={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};x=C.children.insert(P).domElement}if(t&&x instanceof HTMLElement&&!x.hasAttribute("data-theme")){let P=(D=t.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");P&&x.setAttribute("data-theme",P)}return x}};return ai(n.content,v),{show:h,hide:S,anchorPartial:{onKeyDown:C=>C.key==="Escape"&&S(),_onMount:C=>{l=C.getRoot(),t=C.domElement,t&&un(t,m);let x=D=>{if(!s.get()||!t||!i)return;let P=D.target;!t.contains(P)&&!i.contains(P)&&S()};C.getRoot().domElement.addEventListener("click",x),C.addHook("BeforeRemove",()=>{var D;t&&((D=oo.get(t))==null||D()),C.getRoot().domElement.removeEventListener("click",x)})}}}}import{toState as pi}from"@domphy/core";import{themeColor as kt,themeSize as hi,themeSpacing as Q}from"@domphy/theme";var fi='<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 xt(n={}){var e;let{removable:o=!1}=n,r=pi((e=n.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:a=>{let t={span:fi,onClick:i=>{i.stopPropagation(),a.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:Q(1),width:Q(4),height:Q(4),flexShrink:0,"&:hover":{backgroundColor:i=>kt(i,"shift-4",r.get(i))}}};o&&a.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:Q(6),paddingBlock:"0px",borderRadius:Q(1),paddingInlineStart:Q(2),paddingInlineEnd:o?Q(1):Q(2),gap:Q(2),fontSize:a=>hi(a,"inherit"),backgroundColor:a=>kt(a,"inherit",r.get(a)),color:a=>kt(a,"shift-9",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${kt(a,"shift-4",r.get(a))}`}}}function Ws(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=ro(n.value),c=ro(a),{show:l,hide:p,anchorPartial:s}=K({open:c,placement:ro(r),content:n.content}),m={onClick:(h,S)=>!t&&p(S)};no(n.content,m);let y={border:"none",outline:"none",padding:0,margin:0,flex:1,height:Ce(6),marginInlineStart:Ce(2),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)},g;if(n.input){let h={onFocus:(S,v)=>l(v),style:y,_key:"combobox-input"};no(n.input,h),g=n.input}else g={input:null,onFocus:(h,S)=>l(S),value:h=>(i.get(h),""),style:y,_key:"combobox-input"};let u={div:h=>{let S=i.get(h),v=Array.isArray(S)?S:[S],C=o.filter(x=>v.includes(x.value)).map(x=>({span:x.label,$:[xt({color:e,removable:!0})],_key:x.value,_onRemove:D=>{let P=i.get(),De=(Array.isArray(P)?P:[P]).filter(ie=>ie!==x.value);t?i.set(De):i.set(De[0])}}));return C.push(g),C},style:{display:"flex",flexWrap:"wrap",gap:Ce(1)}},d={_onInsert:h=>{h.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:h=>h.children.insert(u),style:{minWidth:Ce(32),outlineOffset:"-1px",outline:h=>`1px solid ${Qe(h,"shift-4","neutral")}`,paddingBlock:h=>Ce(io(h)*1),paddingInline:h=>Ce(io(h)*1),borderRadius:h=>Ce(io(h)*1),fontSize:h=>dn(h,"inherit"),color:h=>Qe(h,"shift-9",e),backgroundColor:h=>Qe(h,"inherit",e)}};return no(s,d),s}import{merge as gi,toState as yi}from"@domphy/core";import{themeColor as ee,themeDensity as wt,themeSize as pn,themeSpacing as Ie}from"@domphy/theme";function qs(){return{_onSchedule:(n,o)=>{gi(o,{_context:{command:{query:yi("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Gs(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 a=e.getContext("command");if(!a){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>a.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>pn(e,"inherit"),paddingInline:e=>Ie(wt(e)*3),paddingBlock:e=>Ie(wt(e)*2),border:"none",borderBottom:e=>`1px solid ${ee(e,"shift-3",o)}`,outline:"none",color:e=>ee(e,"shift-10",o),backgroundColor:e=>ee(e,"inherit",o),"&::placeholder":{color:e=>ee(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>ee(e,"shift-6",r)}}}}function Us(n={}){let{color:o="neutral",accentColor:r="primary"}=n;return{role:"option",_onMount:e=>{var p,s;let a=e.getContext("command");if(!a){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(s=(p=t.textContent)==null?void 0:p.toLowerCase())!=null?s:"",c=m=>{t.hidden=m.length>0&&!i.includes(m.toLowerCase())};c(a.query.get());let l=a.query.addListener(c);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>pn(e,"inherit"),height:e=>Ie(6+wt(e)*2),paddingInline:e=>Ie(wt(e)*3),border:"none",outline:"none",color:e=>ee(e,"shift-9",o),backgroundColor:e=>ee(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>ee(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${Ie(.5)} solid ${ee(e,"shift-6",r)}`,outlineOffset:`-${Ie(.5)}`}}}}import{merge as bi,toState as te}from"@domphy/core";import{themeColor as $,themeSize as ze,themeSpacing as I}from"@domphy/theme";var z=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),ve=(n,o)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+o),ao=(n,o)=>new Date(n.getFullYear(),n.getMonth()+o,n.getDate()),et=(n,o)=>!!n&&!!o&&n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate(),lo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,so=(n,o)=>ve(n,-((n.getDay()-o+7)%7));function Si(n){var o,r;try{let e=new Intl.Locale(n),a=(r=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?r:e.weekInfo;if(a!=null&&a.firstDay)return a.firstDay%7}catch(e){}return 0}function ec(n={}){var Yo,qo,Go,Uo;let{mode:o="single",time:r=!1,min:e,max:a,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:l}=n,p=(Yo=n.weekStartsOn)!=null?Yo:Si(i),s=te((qo=n.accentColor)!=null?qo:"primary","accentColor"),m=te((Go=n.placement)!=null?Go:"bottom-start"),y=te((Uo=n.value)!=null?Uo:o==="range"?[null,null]:null),g=l?y.addListener(f=>l(f)):null,u=(()=>{let f=y.get(),b=o==="range"?f==null?void 0:f[0]:f;return b instanceof Date?b:new Date})(),d=te(u.getFullYear(),"viewYear"),h=te(u.getMonth(),"viewMonth"),S=te(z(u),"focused"),v=te(null,"hovered"),k=te(u.getHours(),"hour"),C=te(u.getMinutes(),"minute"),x=null,D=new Intl.DateTimeFormat(i,W({dateStyle:"medium"},r?{timeStyle:"short"}:{})),P=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),Se=new Intl.DateTimeFormat(i,{weekday:"short"}),De=new Intl.DateTimeFormat(i,{dateStyle:"full"}),ie=f=>f?D.format(f):"",yr=f=>{if(c)return c(f);if(o==="range"){let[b,E]=f!=null?f:[null,null];return b?`${ie(b)} \u2013 ${ie(E)}`:""}return ie(f)},br=Array.from({length:7},(f,b)=>Se.format(new Date(2023,0,1+(b+p)%7))),Fo=f=>!!e&&z(f)<z(e)||!!a&&z(f)>z(a)||!!t&&t(f),ae=f=>{if(!r)return z(f);let b=z(f);return b.setHours(k.get(),C.get(),0,0),b},Wo=f=>{var w;if(Fo(f))return;if(o==="single"){y.set(ae(f)),r||Gt();return}let[b,E]=(w=y.get())!=null?w:[null,null];!b||b&&E?y.set([ae(f),null]):z(f)<z(b)?(y.set([ae(f),ae(b)]),r||Gt()):(y.set([b,ae(f)]),r||Gt())},Sr=()=>{var f;if(r)if(o==="single"){let b=y.get();b&&y.set(ae(b))}else{let[b,E]=(f=y.get())!=null?f:[null,null];y.set([b&&ae(b),E&&ae(E)])}},Cr=(f,b)=>{var Pe;if(o!=="range")return!1;let[E,w]=(Pe=y.get(b))!=null?Pe:[null,null],O=w!=null?w:v.get(b);if(!E||!O)return!1;let T=z(E)<=z(O)?E:O,H=z(E)<=z(O)?O:E,_=z(f);return _>=z(T)&&_<=z(H)},vr=(f,b)=>{let E=y.get(b);if(o==="range"){let[w,O]=E!=null?E:[null,null];return et(f,w)||et(f,O)}return et(f,E)},yt=f=>{d.set(f.getFullYear()),h.set(f.getMonth())},Ko=f=>{let b=ao(new Date(d.get(),h.get(),1),f);yt(b)},jo=f=>d.set(d.get()+f),Yt=()=>{setTimeout(()=>{var f;(f=x==null?void 0:x.querySelector(`[data-date="${lo(S.get())}"]`))==null||f.focus()},0)},Er=Dr(),{show:kr,hide:xr,anchorPartial:qt}=K({open:!1,placement:m,content:Er});function Gt(){xr()}qt.onClick=()=>{};let wr={type:"text",readonly:!0,value:f=>yr(y.get(f)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(f,b)=>{Ut(b)},onFocus:(f,b)=>{Ut(b)},onKeyDown:(f,b)=>{let E=f.key;(E==="ArrowDown"||E==="Enter")&&(f.preventDefault(),Ut(b))},_onMount:f=>g&&f.addHook("Remove",()=>{g()})};function Ut(f){var E;let b=(E=Tr())!=null?E:new Date;S.set(z(b)),yt(b),kr(f),Yt()}function Tr(){var b;let f=y.get();return o==="range"?(b=f==null?void 0:f[0])!=null?b:null:f!=null?f:null}return bi(qt,wr),qt;function Dr(){let f=(T,H,_)=>({button:T,type:"button",ariaLabel:H,onClick:_,style:Ci()}),b={div:[f("\xAB","Previous year",()=>jo(-1)),f("\u2039","Previous month",()=>Ko(-1)),{div:T=>P.format(new Date(d.get(T),h.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>ze(T)}},f("\u203A","Next month",()=>Ko(1)),f("\xBB","Next year",()=>jo(1))],style:{display:"flex",alignItems:"center",gap:I(1),marginBottom:I(2)}},E={div:br.map((T,H)=>({div:T,style:{textAlign:"center",fontSize:_=>ze(_,"decrease-1"),fontWeight:"600",color:_=>$(_,"shift-7"),paddingBlock:I(1)},_key:H})),role:"row",style:hn()},w={div:T=>Pr(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Ir,onMouseLeave:()=>o==="range"&&v.set(null),style:{display:"flex",flexDirection:"column",gap:I(.5)}},O=[b,E,w];return r&&O.push(Lr()),O.push($r()),{div:O,role:"dialog",ariaModal:"false",_onMount:T=>{x=T.domElement},style:{minWidth:I(70),padding:I(3),borderRadius:I(2),backgroundColor:T=>$(T,"base"),color:T=>$(T,"shift-10"),border:T=>`1px solid ${$(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Pr(f){let b=new Date(d.get(f),h.get(f),1),E=h.get(f),w=so(b,p),O=[];for(let T=0;T<6;T++){let H=[];for(let _=0;_<7;_++){let Pe=ve(w,T*7+_);H.push(Or(Pe,E,f))}O.push({div:H,role:"row",style:hn(),_key:T})}return O}function Or(f,b,E){let w=Fo(f),O=vr(f,E),T=Cr(f,E),H=f.getMonth()!==b,_=et(f,S.get(E)),Pe=et(f,new Date);return{button:String(f.getDate()),type:"button",role:"gridcell",tabIndex:_?0:-1,ariaSelected:O,ariaDisabled:w,disabled:w,ariaLabel:De.format(f),dataDate:lo(f),onClick:()=>Wo(f),onMouseEnter:()=>o==="range"&&v.set(f),style:{appearance:"none",border:"none",cursor:w?"not-allowed":"pointer",aspectRatio:"1",borderRadius:I(1),fontSize:L=>ze(L),fontFamily:"inherit",opacity:w?.35:H?.5:1,backgroundColor:L=>O?$(L,"shift-7",s.get(L)):T?$(L,"shift-2",s.get(L)):"transparent",color:L=>O?$(L,"shift-0",s.get(L)):$(L,"shift-9"),outline:Pe?L=>`1px solid ${$(L,"shift-6",s.get(L))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:L=>O?$(L,"shift-7",s.get(L)):$(L,"shift-3",s.get(L))},"&:focus-visible":{outline:L=>`2px solid ${$(L,"shift-6",s.get(L))}`}},_key:lo(f)}}function Lr(){let f=(b,E,w)=>({select:Array.from({length:b},(O,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:H=>E.get(H)===T,_key:T})),ariaLabel:w,onChange:O=>{E.set(Number(O.target.value)),Sr()},style:vi()});return{div:[f(24,k,"Hour"),{span:":",style:{fontWeight:"600"}},f(60,C,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:I(1),marginTop:I(3)}}}function $r(){let f=(b,E)=>({button:b,type:"button",onClick:E,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:w=>ze(w,"decrease-1"),color:w=>$(w,"shift-8",s.get(w)),padding:I(1)}});return{div:[f("Today",()=>{let b=new Date;S.set(z(b)),yt(b),Yt()}),f("Clear",()=>{y.set(o==="range"?[null,null]:null),v.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:I(2),paddingTop:I(2),borderTop:b=>`1px solid ${$(b,"shift-3")}`}}}function Ir(f){let b=f,E=S.get(),w=null;switch(b.key){case"ArrowLeft":w=ve(E,-1);break;case"ArrowRight":w=ve(E,1);break;case"ArrowUp":w=ve(E,-7);break;case"ArrowDown":w=ve(E,7);break;case"Home":w=so(E,p);break;case"End":w=ve(so(E,p),6);break;case"PageUp":w=ao(E,b.shiftKey?-12:-1);break;case"PageDown":w=ao(E,b.shiftKey?12:1);break;case"Enter":case" ":b.preventDefault(),Wo(E);return;default:return}b.preventDefault(),S.set(w),yt(w),Yt()}}function hn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:I(.5)}}function Ci(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:n=>ze(n),color:n=>$(n,"shift-8"),width:I(7),height:I(7),borderRadius:I(1),"&:hover":{backgroundColor:n=>$(n,"shift-3")}}}function vi(){return{fontFamily:"inherit",fontSize:n=>ze(n),padding:I(1),borderRadius:I(1),border:n=>`1px solid ${$(n,"shift-4")}`,backgroundColor:n=>$(n,"base"),color:n=>$(n,"shift-9")}}import{toState as Ei}from"@domphy/core";import{themeColor as fn,themeSize as gn,themeSpacing as yn}from"@domphy/theme";function ic(n={}){var r;let o=Ei((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(${yn(24)}, max-content) 1fr`,columnGap:yn(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>gn(e,"inherit"),color:e=>fn(e,"shift-9",o.get(e))}}}}import{toState as bn}from"@domphy/core";import{themeColor as se,themeDensity as tt,themeSize as Sn,themeSpacing as V}from"@domphy/theme";function cc(n={}){var a,t;let{duration:o=240}=n,r=bn((a=n.color)!=null?a:"neutral","color"),e=bn((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Sn(i,"inherit"),color:i=>se(i,"shift-9",r.get(i)),backgroundColor:i=>se(i,"inherit",r.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>se(i,"shift-2",r.get(i)),color:i=>se(i,"shift-10",r.get(i)),fontSize:i=>Sn(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:V(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>V(tt(i)*4),height:V(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:V(2),height:V(2),flexShrink:0,marginTop:`-${V(.5)}`,borderInlineEnd:i=>`${V(.5)} solid ${se(i,"shift-9",r.get(i))}`,borderBottom:i=>`${V(.5)} solid ${se(i,"shift-9",r.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>se(i,"shift-3",r.get(i))},"& > summary:focus-visible":{borderRadius:i=>V(tt(i)*2),outlineOffset:`-${V(.5)}`,outline:i=>`${V(.5)} solid ${se(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>V(tt(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:V(250),opacity:1,paddingTop:i=>V(tt(i)*1),paddingBottom:i=>V(tt(i)*3)}}}}import{toState as ki}from"@domphy/core";import{themeColor as Dt,themeDensity as xi,themeSize as wi,themeSpacing as co}from"@domphy/theme";var ot=0;function Tt(){ot++,ot===1&&(document.body.style.overflow="hidden")}function Ve(){ot=Math.max(0,ot-1),ot===0&&(document.body.style.overflow="")}var Cn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function fc(n={}){let{color:o="neutral",open:r=!1}=n,e=ki(r),a=null,t=!1,i=!1,c=l=>{t=!1,l.close(),i&&(Ve(),i=!1),a==null||a.focus(),a=null};return{_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(l,p)=>{if(l.target!==p.domElement)return;let s=p.domElement.getBoundingClientRect();l.clientX>=s.left&&l.clientX<=s.right&&l.clientY>=s.top&&l.clientY<=s.bottom||e.set(!1)},onTransitionEnd:(l,p)=>{t&&l.target===p.domElement&&l.propertyName==="opacity"&&c(p.domElement)},_onMount:l=>{let p=l.domElement;p.setAttribute("aria-modal","true");let s=null,m=d=>{if(d.key!=="Tab")return;let h=Array.from(p.querySelectorAll(Cn)).filter(k=>!k.closest("[aria-hidden='true']")&&k.offsetParent!==null);if(!h.length){d.preventDefault();return}let S=h[0],v=h[h.length-1];d.shiftKey?(document.activeElement===S||document.activeElement===p)&&(d.preventDefault(),v.focus()):document.activeElement===v&&(d.preventDefault(),S.focus())},y=d=>{d.preventDefault(),e.set(!1)};p.addEventListener("cancel",y);let g=d=>{d?(a=document.activeElement,p.showModal(),i||(Tt(),i=!0),p.addEventListener("keydown",m),requestAnimationFrame(()=>{p.style.opacity="1";let h=p.querySelector(Cn);h==null||h.focus()})):(t=!0,p.style.opacity="0",p.removeEventListener("keydown",m),s=setTimeout(()=>{s=null,t&&c(p)},350))};g(e.get());let u=e.addListener(g);l.addHook("Remove",()=>{s&&(clearTimeout(s),s=null),u(),p.removeEventListener("cancel",y),i&&(Ve(),i=!1),p.removeEventListener("keydown",m),a==null||a.focus(),a=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:l=>wi(l,"inherit"),color:l=>Dt(l,"shift-10",o),backgroundColor:l=>Dt(l,"inherit",o),border:"none",padding:l=>co(xi(l)*3),boxShadow:l=>`0 ${co(9)} ${co(16)} ${Dt(l,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:l=>Dt(l,"shift-2","neutral"),opacity:.75}}}}import{toState as Ti}from"@domphy/core";import{themeColor as Pt,themeSize as Di,themeSpacing as Pi}from"@domphy/theme";function Sc(n={}){var r;let o=Ti((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:Pi(2),fontSize:e=>Di(e,"inherit"),backgroundColor:e=>Pt(e),color:e=>Pt(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Pt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Oi}from"@domphy/core";import{themeColor as Ot,themeDensity as Li,themeSize as $i,themeSpacing as nt}from"@domphy/theme";var mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},vn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},rt=n=>n==="left"||n==="right";function En(n,o){return n==="start"?o?"right":"left":n==="end"?o?"left":"right":n}function xc(n={}){let{color:o="neutral",open:r=!1,placement:e="end",size:a}=n,t=Oi(r),i=e==="start"||e==="end",c=En(e,!1),l=rt(c)?nt(80):nt(64),p=a!=null?a:l;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,m)=>{s.target===m.domElement&&t.set(!1)},_onMount:s=>{let m=s.domElement;m.setAttribute("aria-modal","true");let y=D=>{D.preventDefault(),t.set(!1)};m.addEventListener("cancel",y);let g=i&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),u=En(e,g);i&&(m.style.transform=mo[u],m.style.margin=vn[u],m.style.width=rt(u)?p:"100dvw",m.style.height=rt(u)?"100dvh":p);let d=!1,h=!1,S=null,v=()=>{S=null,d&&(d=!1,m.close(),h&&(Ve(),h=!1))},k=D=>{D.target===m&&D.propertyName==="transform"&&v()};m.addEventListener("transitionend",k);let C=D=>{D?(d=!1,m.showModal(),h||(Tt(),h=!0),requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(d=!0,m.style.transform=mo[u],S=setTimeout(v,350))};C(t.get());let x=t.addListener(C);s.addHook("Remove",()=>{S&&(clearTimeout(S),S=null),x(),m.removeEventListener("cancel",y),m.removeEventListener("transitionend",k),h&&(Ve(),h=!1)})},style:{transform:mo[c],transition:"transform 0.25s ease",fontSize:s=>$i(s,"inherit"),color:s=>Ot(s,"shift-10",o),backgroundColor:s=>Ot(s,"inherit",o),border:"none",padding:s=>nt(Li(s)*3),margin:vn[c],width:rt(c)?p:"100dvw",height:rt(c)?"100dvh":p,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${nt(4)} ${nt(12)} ${Ot(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ot(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Ii}from"@domphy/core";import{themeColor as zi,themeSize as Vi}from"@domphy/theme";function Pc(n={}){var r;let o=Ii((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=>Vi(e,"inherit"),fontStyle:"italic",color:e=>zi(e,"shift-10",o.get(e))}}}import{toState as Mi}from"@domphy/core";import{themeColor as kn,themeSpacing as uo}from"@domphy/theme";function Ic(n={}){var r;let o=Mi((r=n.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:uo(3),paddingBlock:uo(12),paddingInline:uo(6),textAlign:"center",color:e=>kn(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>kn(e,"shift-5",o.get(e))}}}}function Vc(n={}){return{_onError:(o,r,e)=>{var t,i;(t=n.onError)==null||t.call(n,r);let a=typeof n.fallback=="function"?n.fallback(r,e):(i=n.fallback)!=null?i:{div:"An error occurred."};o.children.update([a])}}}import{toState as _i}from"@domphy/core";import{themeColor as Me,themeSize as Ri,themeSpacing as it}from"@domphy/theme";var Hi={small:8,medium:10,large:14};function Hc(n={}){var e,a;let o=_i((e=n.color)!=null?e:"primary","color"),r=it(Hi[(a=n.size)!=null?a:"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=>Ri(t,"inherit"),backgroundColor:t=>Me(t,"shift-9",o.get(t)),color:t=>Me(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${it(1)} ${it(4)} ${Me(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>Me(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${it(2)} ${it(6)} ${Me(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${Me(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as Ai}from"@domphy/core";import{themeColor as xn,themeSize as Ni,themeSpacing as Lt}from"@domphy/theme";function Fc(n={}){var r;let o=Ai((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:Lt(2),marginInline:0,marginTop:Lt(3),marginBottom:Lt(3),color:e=>xn(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Lt(2)},"& figcaption":{fontSize:e=>Ni(e,"decrease-1"),color:e=>xn(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Bi}from"@domphy/core";import{themeColor as $t,themeDensity as _e,themeSize as po,themeSpacing as oe}from"@domphy/theme";function Yc(n={}){var a;let{layout:o="horizontal"}=n,r=Bi((a=n.color)!=null?a:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>oe(_e(t)*3),paddingBlock:t=>oe(_e(t)*3),border:"none",borderRadius:t=>oe(_e(t)*2),fontSize:t=>po(t,"inherit"),backgroundColor:t=>$t(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:oe(4),rowGap:oe(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>po(t,"inherit"),fontWeight:600,paddingBlock:t=>oe(_e(t)*1),borderRadius:t=>oe(_e(t)*2),color:t=>$t(t,"shift-9",r.get(t)),backgroundColor:t=>$t(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":oe(_e(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(${oe(2)} * -1)`,fontSize:t=>po(t,"decrease-1"),color:t=>$t(t,"shift-9",r.get(t))}}}}import{toState as Fi}from"@domphy/core";import{themeColor as Wi,themeSize as Ki,themeSpacing as ji}from"@domphy/theme";var Yi={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Xc(n={}){var r;let o=Fi((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=>Wi(e,"shift-11",o.get(e)),marginTop:0,marginBottom:ji(2),fontSize:e=>{let a=Yi[e.elementNode.tagName]||"inherit";return Ki(e,a)}}}}import{toState as qi}from"@domphy/core";import{themeColor as Gi,themeSpacing as wn}from"@domphy/theme";function em(n={}){var r;let o=qi((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:wn(3),marginBottom:wn(3),backgroundColor:e=>Gi(e,"shift-4",o.get(e))}}}import{toState as Ui}from"@domphy/core";import{themeColor as Xi,themeSize as Ji,themeSpacing as Tn}from"@domphy/theme";function rm(n={}){var r;let o=Ui((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:Tn(4),height:Tn(4),flexShrink:"0",fontSize:e=>Ji(e),backgroundColor:"transparent",color:e=>Xi(e,"shift-9",o.get(e))}}}import{toState as Zi}from"@domphy/core";import{themeColor as Qi,themeSpacing as ea}from"@domphy/theme";function sm(n={}){var r;let o=Zi((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:ea(2),backgroundColor:e=>Qi(e,"inherit",o.get(e))}}}import{toState as Dn}from"@domphy/core";import{themeColor as R,themeSize as ta,themeSpacing as ce}from"@domphy/theme";function dm(n={}){var e,a;let o=Dn((e=n.color)!=null?e:"neutral","color"),r=Dn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>ta(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 ${R(t,"shift-4",o.get(t))}`,color:t=>R(t,"shift-9",o.get(t)),width:ce(4),height:ce(4)},"&:hover::before":{backgroundColor:t=>R(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>R(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 ${R(t,"inherit",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${R(t,"shift-6",r.get(t))}`,backgroundColor:t=>R(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>R(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>R(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:ce(1.5),outline:t=>`${ce(.5)} solid ${R(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>R(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as Pn,themeDensity as at,themeSize as oa,themeSpacing as lt}from"@domphy/theme";function fm(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=>oa(o,"inherit"),paddingBlock:o=>lt(at(o)*1),paddingInline:o=>lt(at(o)*1),blockSize:o=>lt(6+at(o)*2),inlineSize:o=>lt(6+at(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>lt(at(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>Pn(o,"shift-2","neutral"),outline:o=>`1px solid ${Pn(o,"shift-4","neutral")}`}}}}import{toState as On}from"@domphy/core";import{themeColor as me,themeDensity as ho,themeSize as na,themeSpacing as st}from"@domphy/theme";function Sm(n={}){var a,t;let{mode:o="datetime-local"}=n,r=On((a=n.color)!=null?a:"neutral","color"),e=On((t=n.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,c)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=o},style:{fontFamily:"inherit",fontSize:i=>na(i,"inherit"),lineHeight:"inherit",color:i=>me(i,"shift-9",r.get(i)),backgroundColor:i=>me(i,"inherit",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${me(i,"shift-4",r.get(i))}`,borderRadius:i=>st(ho(i)*1),paddingInline:i=>st(ho(i)*3),height:i=>st(6+ho(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${st(.5)} solid ${me(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>me(i,"shift-8","neutral"),backgroundColor:i=>me(i,"shift-2","neutral"),outline:i=>`1px solid ${me(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${st(.5)} solid ${me(i,"shift-6","error")}`}}}}import{toState as Ln}from"@domphy/core";import{themeColor as B,themeDensity as It,themeSize as ra,themeSpacing as ue}from"@domphy/theme";function km(n={}){var e,a;let o=Ln((e=n.color)!=null?e:"neutral","color"),r=Ln((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>ra(t,"inherit"),lineHeight:"inherit",color:t=>B(t,"shift-9",o.get(t)),backgroundColor:t=>B(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${B(t,"shift-4",o.get(t))}`,borderRadius:t=>ue(It(t)*1),height:t=>ue(6+It(t)*2),paddingInline:t=>ue(It(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>ue(It(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:ue(1),height:ue(6),paddingInline:ue(2),cursor:"pointer",color:t=>B(t,"shift-11",o.get(t)),backgroundColor:t=>B(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ue(.5)} solid ${B(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),outline:t=>`1px solid ${B(t,"shift-4","neutral")}`,backgroundColor:t=>B(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>B(t,"shift-8","neutral"),backgroundColor:t=>B(t,"shift-3","neutral")}}}}import{toState as $n}from"@domphy/core";import{themeColor as Ee,themeDensity as zt,themeSize as ia,themeSpacing as Re}from"@domphy/theme";function Dm(n={}){var e,a;let o=$n((e=n.color)!=null?e:"neutral","color"),r=$n((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Re(10),paddingInlineStart:t=>Re(zt(t)*3),paddingInlineEnd:t=>Re(zt(t)*1.5),paddingBlock:t=>Re(zt(t)*1),borderRadius:t=>Re(zt(t)*1),fontSize:t=>ia(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${Ee(t,"shift-4",o.get(t))}`,color:t=>Ee(t,"shift-9",o.get(t)),backgroundColor:t=>Ee(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${Re(.5)} solid ${Ee(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Ee(t,"shift-2","neutral"),outline:t=>`1px solid ${Ee(t,"shift-4","neutral")}`,color:t=>Ee(t,"shift-8","neutral")}}}}import{toState as fo}from"@domphy/core";import{themeColor as Vt,themeDensity as Mt,themeSize as aa,themeSpacing as ct}from"@domphy/theme";var la='<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>',sa='<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 $m(n={}){var a,t;let o=fo((a=n.color)!=null?a:"neutral","color"),r=fo((t=n.accentColor)!=null?t:"primary","accentColor"),e=fo(!1);return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:i=>{let c={input:null,type:p=>e.get(p)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},l={button:p=>e.get(p)?sa:la,type:"button",ariaLabel:p=>e.get(p)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(c),i.children.insert(l)},style:{display:"flex",alignItems:"center",gap:i=>ct(Mt(i)*1),paddingBlock:i=>ct(Mt(i)*1),paddingInline:i=>ct(Mt(i)*3),borderRadius:i=>ct(Mt(i)*1),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${Vt(i,"shift-4",o.get(i))}`,color:i=>Vt(i,"shift-9",o.get(i)),backgroundColor:i=>Vt(i,"inherit",o.get(i)),fontSize:i=>aa(i,"inherit"),"&:focus-within":{outline:i=>`${ct(.5)} solid ${Vt(i,"shift-6",r.get(i))}`}}}}import{themeSpacing as In}from"@domphy/theme";function Vm(){return{style:{display:"flex",alignItems:"center",gap:In(2),"& > *":{minWidth:`${In(9)}!important`}},_onMount:n=>{let o=n.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=i=>{let c=r(),l=i.target,p=c.indexOf(l);l.value&&p<c.length-1&&c[p+1].focus()},a=i=>{let c=r(),l=i.target,p=c.indexOf(l);i.key==="Backspace"&&!l.value&&p>0&&c[p-1].focus(),i.key==="ArrowLeft"&&p>0&&c[p-1].focus(),i.key==="ArrowRight"&&p<c.length-1&&c[p+1].focus()},t=i=>{var y,g,u;i.preventDefault();let c=(g=(y=i.clipboardData)==null?void 0:y.getData("text"))!=null?g:"",l=r(),p=l.indexOf(i.target),s=p===-1?0:p;[...c].forEach((d,h)=>{l[s+h]&&(l[s+h].value=d)});let m=Math.min(s+c.length-1,l.length-1);(u=l[m])==null||u.focus()};o.addEventListener("input",e),o.addEventListener("keydown",a),o.addEventListener("paste",t),n.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",a),o.removeEventListener("paste",t)})}}}import{toState as zn}from"@domphy/core";import{themeColor as de,themeSize as ca,themeSpacing as mt}from"@domphy/theme";function Hm(n={}){var e,a;let o=zn((e=n.color)!=null?e:"neutral","color"),r=zn((a=n.accentColor)!=null?a:"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=>ca(t,"inherit"),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 ${de(t,"shift-4",o.get(t))}`,color:t=>de(t,"shift-9",o.get(t)),width:mt(4),height:mt(4)},"&:hover::before":{backgroundColor:t=>de(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${de(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>de(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>de(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${mt(.5)} solid ${de(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>de(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Vn}from"@domphy/core";import{themeColor as _t,themeSpacing as F}from"@domphy/theme";function Fm(n={}){var e,a;let o=Vn((e=n.color)!=null?e:"neutral","color"),r=Vn((a=n.accentColor)!=null?a:"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:F(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:F(1.5),borderRadius:F(999),backgroundColor:t=>_t(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:F(4),height:F(4),borderRadius:F(999),border:"none",marginTop:`calc((${F(1.5)} - ${F(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=>`${F(.5)} solid ${_t(t,"shift-6",r.get(t))}`,outlineOffset:F(1),borderRadius:F(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Mn}from"@domphy/core";import{themeColor as pe,themeDensity as go,themeSize as ma,themeSpacing as ut}from"@domphy/theme";function Ym(n={}){var e,a;let o=Mn((e=n.color)!=null?e:"neutral","color"),r=Mn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ma(t,"inherit"),lineHeight:"inherit",color:t=>pe(t,"shift-9",o.get(t)),backgroundColor:t=>pe(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${pe(t,"shift-4",o.get(t))}`,borderRadius:t=>ut(go(t)*1),minWidth:ut(32),paddingInline:t=>ut(go(t)*3),paddingBlock:t=>ut(go(t)*1),"&::placeholder":{color:t=>pe(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ut(.5)} solid ${pe(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>pe(t,"shift-8","neutral"),backgroundColor:t=>pe(t,"shift-2","neutral"),outline:t=>`1px solid ${pe(t,"shift-4","neutral")}`}}}}import{toState as ua}from"@domphy/core";import{themeColor as yo,themeSize as _n,themeSpacing as ne}from"@domphy/theme";function Xm(n={}){var r;let o=ua((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=>_n(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:ne(9),height:ne(6),cursor:"pointer",margin:"0",paddingBlock:ne(1),"&:checked":{"&::before":{backgroundColor:e=>yo(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${ne(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:ne(3),height:ne(3),borderRadius:ne(999),left:ne(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>yo(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:ne(999),display:"inline-block",fontSize:e=>_n(e,"inherit"),lineHeight:1,backgroundColor:e=>yo(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Rn}from"@domphy/core";import{themeColor as N,themeDensity as bo,themeSize as da,themeSpacing as he}from"@domphy/theme";function eu(n={}){var e,a;let o=Rn((e=n.color)!=null?e:"neutral","color"),r=Rn((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:he(10),paddingInline:t=>he(bo(t)*3),paddingBlock:t=>he(bo(t)*1),borderRadius:t=>he(bo(t)*1),fontSize:t=>da(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"shift-4",o.get(t))}`,color:t=>N(t,"shift-9",o.get(t)),backgroundColor:t=>N(t,"inherit",o.get(t)),"&::placeholder":{color:t=>N(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>N(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${he(.5)} solid ${N(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>N(t,"shift-2","neutral"),outline:t=>`1px solid ${N(t,"shift-4","neutral")}`,color:t=>N(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${he(.5)} solid ${N(t,"shift-6","warning")}`}}}}import{toState as pa}from"@domphy/core";import{themeColor as So,themeSize as ha,themeSpacing as Co}from"@domphy/theme";function ru(n={}){var r;let o=pa((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=>ha(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),paddingBlock:Co(.5),paddingInline:Co(1.5),borderRadius:Co(1),outline:e=>`1px solid ${So(e,"shift-4",o.get(e))}`}}}import{toState as Hn}from"@domphy/core";import{themeColor as vo,themeSize as fa,themeSpacing as ga}from"@domphy/theme";function su(n={}){var e,a;let o=Hn((e=n.color)!=null?e:"neutral","color"),r=Hn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:ga(2),fontSize:t=>fa(t,"inherit"),color:t=>vo(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>vo(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>vo(t,"shift-8","neutral")}}}}import{toState as An}from"@domphy/core";import{themeColor as He,themeSize as ya,themeSpacing as Eo}from"@domphy/theme";function du(n={}){var e,a;let o=An((e=n.color)!=null?e:"primary","color"),r=An((a=n.accentColor)!=null?a:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>ya(t,"inherit"),backgroundColor:t=>He(t),color:t=>He(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>He(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>He(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Eo(1),outlineOffset:Eo(1),outline:t=>`${Eo(.5)} solid ${He(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>He(t,"shift-8","neutral")}}}}import{toState as ba}from"@domphy/core";import{themeColor as re,themeDensity as Rt,themeSize as Sa,themeSpacing as dt}from"@domphy/theme";function gu(n={}){var r;let o=ba((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=>Sa(e,"inherit"),textDecoration:"none",paddingBlock:e=>dt(Rt(e)*1),paddingInline:e=>dt(Rt(e)*3),borderRadius:e=>dt(Rt(e)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>dt(Rt(e)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${re(e,"shift-4",o.get(e))}`,color:e=>re(e,"shift-9",o.get(e)),backgroundColor:e=>re(e,"inherit",o.get(e)),"&:hover":{color:e=>re(e,"shift-10",o.get(e)),backgroundColor:e=>re(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${dt(.5)} ${re(e,"shift-6",o.get(e))}`},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:e=>re(e,"shift-2","neutral"),outline:e=>`1px solid ${re(e,"shift-4","neutral")}`,color:e=>re(e,"shift-8","neutral")}}}}import{toState as Ca}from"@domphy/core";import{themeColor as pt,themeDensity as ke,themeSize as Nn,themeSpacing as xe}from"@domphy/theme";function Cu(n={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function vu(n={}){let{dense:o=!1}=n;return{style:{display:"flex",alignItems:"center",gap:r=>xe(ke(r)*2),paddingBlock:r=>xe(o?1:ke(r)*2),paddingInline:r=>xe(ke(r)*3),fontSize:r=>Nn(r,"inherit")}}}function Eu(n={}){var a,t;let o=Ca((a=n.color)!=null?a:"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:i=>xe(ke(i)*2),paddingBlock:i=>xe(e?1:ke(i)*2),paddingInline:i=>xe(ke(i)*3),fontSize:i=>Nn(i,"inherit"),color:i=>pt(i,"shift-9",o.get(i)),borderRadius:i=>xe(ke(i)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:i=>pt(i,"shift-2",o.get(i))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:i=>pt(i,"shift-3",r),color:i=>pt(i,"shift-12",r)},"&:focus-visible":{outline:i=>`2px solid ${pt(i,"shift-6",r)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}import{toState as va}from"@domphy/core";import{themeColor as Bn,themeSize as Ea,themeSpacing as ko}from"@domphy/theme";function Tu(n={}){var r;let o=va((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=>Ea(e,"inherit"),color:e=>Bn(e,"shift-9",o.get(e)),backgroundColor:e=>Bn(e,"inherit",o.get(e)),height:ko(6),borderRadius:ko(1),paddingInline:ko(1.5)}}}import{toState as ka}from"@domphy/core";import{themeColor as we,themeDensity as Ht,themeSize as Fn,themeSpacing as Te}from"@domphy/theme";function Lu(n={items:[]}){var i;let{items:o=[],selectable:r=!0,color:e="neutral",accentColor:a="primary"}=n,t=ka((i=n.activeKey)!=null?i:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(c,l)=>{if(o.length===0)return;let p=c.nodeId,s=o.map((m,y)=>{var u;let g=(u=m.key)!=null?u:y;return Oe(W({button:typeof m.label=="string"?[{span:m.label}]:[m.label],_key:g,id:`menuitem${p}${g}`,role:"menuitem"},r?{ariaCurrent:d=>t.get(d)===g||void 0}:{}),{onClick:()=>{var d;r&&t.set(g),(d=m.onClick)==null||d.call(m)},onKeyDown:d=>{var C;let h=d.key;if(h==="Enter"||h===" "){d.preventDefault(),d.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(h))return;d.preventDefault();let S=o.map((x,D)=>{var P;return(P=x.key)!=null?P:D}),v=S.findIndex(x=>x===g),k=v;h==="ArrowDown"?k=(v+1)%S.length:h==="ArrowUp"?k=(v-1+S.length)%S.length:h==="Home"?k=0:h==="End"&&(k=S.length-1),(C=document.getElementById(`menuitem${p}${S[k]}`))==null||C.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:Te(2),width:"100%",fontSize:d=>Fn(d,"inherit"),height:d=>Te(6+Ht(d)*2),paddingInline:d=>Te(Ht(d)*3),border:"none",outline:"none",color:d=>we(d,"shift-9",e),backgroundColor:d=>we(d,"inherit",e),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:d=>we(d,"shift-2",e)},"&[aria-current=true]":{backgroundColor:d=>we(d,"shift-3",a),color:d=>we(d,"shift-10")},"&:focus-visible":{outline:d=>`${Te(.5)} solid ${we(d,"shift-6",a)}`,outlineOffset:`-${Te(.5)}`}}})});l[c.tagName]=s},style:{display:"flex",flexDirection:"column",paddingBlock:c=>Te(Ht(c)*2),paddingInline:c=>Te(Ht(c)*2),fontSize:c=>Fn(c,"inherit"),backgroundColor:c=>we(c,"inherit",e)}}}var Wn=n=>!!n&&typeof n.get=="function"&&n._isState===!0,Ae=n=>{let o={},r=[];for(let e in n){let a=n[e];e==="x"?r.push(`translateX(${typeof a=="number"?`${a}px`:a})`):e==="y"?r.push(`translateY(${typeof a=="number"?`${a}px`:a})`):e==="scale"?r.push(`scale(${a})`):e==="rotate"?r.push(`rotate(${typeof a=="number"?`${a}deg`:a})`):o[e]=a}return r.length&&(o.transform=r.join(" ")),o};function zu(n={}){var i,c,l,p;let{initial:o,animate:r,exit:e,transition:a={}}=n,t={duration:(i=a.duration)!=null?i:300,delay:(c=a.delay)!=null?c:0,easing:(l=a.easing)!=null?l:"ease",iterations:(p=a.iterations)!=null?p:1,fill:"both"};return{_onMount:s=>{let m=s.domElement;if(!m||typeof m.animate!="function")return;let y=Wn(r)?r.get():r;if(y?m.animate(o?[Ae(o),Ae(y)]:[Ae(y)],t):o&&Object.assign(m.style,Ae(o)),Wn(r)){let g=r.addListener(u=>{m.animate([Ae(u)],t)});s.setMetadata("motionRelease",g)}},_onBeforeRemove:(s,m)=>{let y=s.domElement;if(!y||!e||typeof y.animate!="function")return m();y.animate([Ae(e)],t).finished.then(m,m)},_onRemove:s=>{let m=s.getMetadata("motionRelease");m==null||m()}}}import{toState as xa}from"@domphy/core";import{themeColor as Kn,themeSize as wa,themeSpacing as Ta}from"@domphy/theme";function Ru(n={}){var r;let o=xa((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=>wa(e,"inherit"),backgroundColor:e=>Kn(e),color:e=>Kn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Ta(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as Da}from"@domphy/core";import{themeColor as Ne,themeDensity as ht,themeSize as Pa,themeSpacing as Be}from"@domphy/theme";function Oa(n,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let r=[1];n>3&&r.push("...");let e=Math.max(2,n-1),a=Math.min(o-1,n+1);for(let t=e;t<=a;t++)r.push(t);return n<o-2&&r.push("..."),r.push(o),r}function Bu(n){var c;let{total:o,color:r="neutral",accentColor:e="primary"}=n,a=Da((c=n.value)!=null?c:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>Be(6+ht(l)*2),height:l=>Be(6+ht(l)*2),paddingInline:l=>Be(ht(l)*2),borderRadius:l=>Be(ht(l)*1),border:"none",cursor:"pointer",fontSize:l=>Pa(l,"inherit"),backgroundColor:"transparent",color:l=>Ne(l,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=Oe(W({},t),{backgroundColor:l=>Ne(l,"shift-6",e),color:l=>Ne(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>Ne(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let p={div:s=>{let m=a.get(s),y=[];y.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&a.set(m-1),style:t});let g=0;for(let u of Oa(m,o))if(u==="...")y.push({span:"\u2026",_key:`ellipsis-${g++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:d=>Be(ht(d)*2),color:d=>Ne(d,"shift-7",r)}});else{let d=u===m;y.push({button:String(u),_key:`page-${u}`,type:"button",ariaLabel:`Page ${u}`,ariaCurrent:d?"page":void 0,disabled:d,onClick:()=>a.set(u),style:d?i:t})}return y.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&a.set(m+1),style:t}),y},style:{display:"flex",alignItems:"center",gap:Be(1)}};l.children.insert(p)},style:{display:"inline-flex"}}}import{toState as La}from"@domphy/core";import{themeColor as $a,themeSize as Ia}from"@domphy/theme";function Yu(n={}){var r;let o=La((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=>Ia(e,"inherit"),color:e=>$a(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as za,toState as jn}from"@domphy/core";import{themeColor as Va}from"@domphy/theme";function Ju(n){var y;let{open:o=!1,placement:r="bottom",openOn:e="click"}=n,a=null,t=jn(o),i=jn(r),{show:c,hide:l,anchorPartial:p}=K({open:t,placement:i,content:n.content}),s={role:"dialog",dataTone:"shift-14",style:{backgroundColor:g=>Va(g,"inherit")},onMouseEnter:()=>e==="hover"&&c(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:g=>{let u=g.attributes.get("id");a=u||g.nodeId,!u&&g.attributes.set("id",a)}};return(y=n.content).$||(y.$=[]),n.content.$.push(s),za(p,{ariaHaspopup:"dialog",ariaExpanded:g=>t.get(g),onMouseEnter:(g,u)=>e==="hover"&&c(u),onMouseLeave:(g,u)=>e==="hover"&&l(u),onClick:(g,u)=>{e==="click"&&(t.get()?l(u):c(u))},onKeyDown:(g,u)=>{g.key==="Escape"&&t.get()&&l(u)},onFocus:(g,u)=>e==="hover"&&c(u),onBlur:(g,u)=>{let d=g.relatedTarget,h=u.getRoot().domElement,S=a?h.querySelector(`#${CSS.escape(a)}`):null;d&&(S!=null&&S.contains(d))||l(u)},_onMount:g=>a&&g.attributes.set("ariaControls",a)}),p}import{toState as Ma}from"@domphy/core";import{themeColor as At,themeSize as _a,themeSpacing as xo}from"@domphy/theme";function Yn(n={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=xo(6),bordered:a=!0}=n,t=Ma(o),i={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=s=>{var m;return(m=i[t.get(s)])!=null?m:i["bottom-end"]},l=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",p=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>_a(s),backgroundColor:s=>At(s),color:s=>At(s,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:xo(1.5),height:xo(1.5),backgroundColor:s=>At(s,"inherit",r),borderWidth:a?"1px":"0px",borderColor:s=>At(s,"inherit",r),borderTopStyle:s=>{let m=c(s);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:s=>{let m=c(s);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:s=>{let m=c(s);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:s=>{let m=c(s);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:s=>{let m=c(s);return m.includes("right")?0:m.includes("left")?"auto":p(m)},bottom:s=>{let m=c(s);return m.includes("bottom")?0:m.includes("top")?"auto":p(m)},left:s=>{let m=c(s);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:s=>{let m=c(s),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 Ra}from"@domphy/core";import{themeColor as qn,themeDensity as wo,themeSize as Ha,themeSpacing as To}from"@domphy/theme";function rd(n={}){var r;let o=Ra((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=>Ha(e,"inherit"),color:e=>qn(e,"shift-9",o.get(e)),backgroundColor:e=>qn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>To(wo(e)*2),paddingInline:e=>To(wo(e)*3),borderRadius:e=>To(wo(e)*2)}}}import{toState as Gn}from"@domphy/core";import{themeColor as Do,themeSpacing as Nt}from"@domphy/theme";function sd(n={}){var e,a;let o=Gn((e=n.color)!=null?e:"neutral","color"),r=Gn((a=n.accentColor)!=null?a:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:Nt(2),border:0,borderRadius:Nt(999),overflow:"hidden",backgroundColor:t=>Do(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Do(t,"shift-3",o.get(t)),borderRadius:Nt(999)},"&::-webkit-progress-value":{backgroundColor:t=>Do(t,"shift-9",r.get(t)),borderRadius:Nt(999),transition:"width 220ms ease"}}}}import{toState as Un}from"@domphy/core";import{themeColor as Aa,themeSpacing as Na}from"@domphy/theme";var Ba='<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>',Fa='<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 dd(n={}){var l,p;let{max:o=5,readOnly:r=!1,onChange:e}=n,a=(l=n.color)!=null?l:"warning",t=Un((p=n.value)!=null?p:0),i=Un(0),c=s=>{let m=i.get(s);return m>0?m:t.get(s)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:Na(.5),fontSize:"1.5rem",cursor:r?"default":"pointer",color:s=>Aa(s,"shift-8",a)},_onInit:s=>{for(let m=1;m<=o;m++){let y=m,g=r?{}:{onClick:()=>{let d=y===t.get()?0:y;t.set(d),e==null||e(d),i.set(0)},onMouseEnter:()=>i.set(y),onMouseLeave:()=>i.set(0),onKeyDown:d=>{var k,C;let h=t.get(),S=h;if(d.key==="ArrowRight"||d.key==="ArrowUp")S=Math.min(o,h+1),d.preventDefault();else if(d.key==="ArrowLeft"||d.key==="ArrowDown")S=Math.max(0,h-1),d.preventDefault();else return;t.set(S),e==null||e(S);let v=S>0?S-1:0;(C=(k=s.domElement)==null?void 0:k.children[v])==null||C.focus()}},u=Oe(W({button:d=>y<=c(d)?Ba:Fa,_key:y,type:"button",ariaLabel:`${y} star${y>1?"s":""}`},g),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});s.children.insert(u)}}}}import{toState as Po}from"@domphy/core";import{themeColor as Xn,themeSpacing as Jn}from"@domphy/theme";function yd(n={}){var l,p,s;let{size:o=16,thickness:r=.25}=n,e=Po((l=n.value)!=null?l:0,"value"),a=Po((p=n.color)!=null?p:"primary","color"),t=Po((s=n.trackColor)!=null?s:"neutral","trackColor"),i=Math.round((1-r)*100),c=`radial-gradient(circle closest-side, transparent ${i}%, black ${i}%)`;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:Jn(o),height:Jn(o),borderRadius:"50%",background:m=>`conic-gradient(from -90deg, ${Xn(m,"shift-9",a.get(m))} ${e.get(m)}%, ${Xn(m,"shift-3",t.get(m))} 0%)`,WebkitMask:c,mask:c}}}import{toState as Wa}from"@domphy/core";import{themeColor as Oo,themeSpacing as Bt}from"@domphy/theme";function vd(n={}){var r;let o=Wa((r=n.color)!=null?r:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:Bt(2),height:Bt(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>Oo(e,"shift-5",o.get(e)),borderRadius:Bt(999),border:`${Bt(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>Oo(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${Oo(e,"shift-5",o.get(e))} transparent`}}}import{toState as Ka}from"@domphy/core";import{themeColor as Fe,themeSize as ja,themeSpacing as j}from"@domphy/theme";function wd(n={items:[]}){var t,i,c;let{items:o=[],color:r="neutral",accentColor:e="primary"}=n,a=Ka((c=n.value)!=null?c:(i=(t=o[0])==null?void 0:t.key)!=null?i:"");return{role:"radiogroup",_context:{segmented:{value:a}},_onSchedule:(l,p)=>{let s=o.map((m,y)=>{var d;let g=(d=m.key)!=null?d:String(y);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:g,role:"radio",ariaChecked:h=>a.get(h)===g,onClick:()=>a.set(g),style:{cursor:"pointer",fontSize:h=>ja(h,"inherit"),height:j(6),paddingBlock:j(1),paddingInline:j(3),border:"none",borderRadius:j(10),color:h=>Fe(h,"shift-9",r),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:h=>Fe(h,"shift-3",r)},"&[aria-checked=true]":{backgroundColor:h=>Fe(h,"shift-0",e),color:h=>Fe(h,"shift-10",e)},"&:focus-visible":{outline:h=>`${j(.5)} solid ${Fe(h,"shift-6",e)}`,outlineOffset:`-${j(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});p[l.tagName]=s},style:{display:"inline-flex",paddingBlock:j(1),paddingInline:j(1),gap:j(.5),borderRadius:j(10),backgroundColor:l=>Fe(l,"shift-2",r)}}}import{themeColor as Y,themeColorToken as Ya,themeDensity as ft,themeSize as qa,themeSpacing as q}from"@domphy/theme";function Pd(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=>qa(e,"inherit"),lineHeight:"inherit",color:e=>Y(e,"shift-9",o),backgroundColor:e=>Y(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${Y(e,"shift-4",o)}`,borderRadius:e=>q(ft(e)*1),paddingBlock:e=>q(ft(e)*1),paddingLeft:e=>q(ft(e)*3),paddingRight:e=>q(ft(e)*5),backgroundImage:e=>{let a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Ya(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(a)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${q(2)} center`,backgroundSize:`${q(2.5)} ${q(1.5)}`,"&:not([multiple])":{height:e=>q(6+ft(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${q(.5)} solid ${Y(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${q(.5)} solid ${Y(e,"shift-6",r)}`},"& optgroup":{color:e=>Y(e,"shift-11",o)},"& option[disabled]":{color:e=>Y(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>Y(e,"shift-8","neutral"),outline:e=>`1px solid ${Y(e,"shift-4","neutral")}`,backgroundColor:e=>Y(e,"shift-2","neutral")}}}}import{merge as Zn,toState as Lo}from"@domphy/core";import{themeColor as $o,themeDensity as Io,themeSize as Ga,themeSpacing as gt}from"@domphy/theme";function Vd(n){let{options:o=[],placement:r="bottom",color:e="neutral",open:a=!1,multiple:t=!1}=n,i=Lo(n.value),c=Lo(a),{show:l,hide:p,anchorPartial:s}=K({open:c,placement:Lo(r),content:n.content}),m={onClick:(u,d)=>!t&&p(d)};Zn(n.content,m);let y={div:u=>{let d=i.get(u),h=Array.isArray(d)?d:[d];return o.filter(v=>h.includes(v.value)).map(v=>({span:v.label,$:[xt({color:e,removable:t})],_key:v.value,_onRemove:k=>{let C=i.get(),D=(Array.isArray(C)?C:[C]).filter(P=>P!==v.value);t?i.set(D):i.set(D[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:gt(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,d)=>c.get()?p(d):l(d),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:u=>gt(6+Io(u)*2),minWidth:gt(32),outlineOffset:"-1px",outline:u=>`1px solid ${$o(u,"shift-4","neutral")}`,paddingInline:u=>gt(Io(u)*2),borderRadius:u=>gt(Io(u)*1),fontSize:u=>Ga(u,"inherit"),color:u=>$o(u,"shift-9",e),backgroundColor:u=>$o(u,"inherit",e)}};return Zn(s,g),s}import{themeColor as We,themeDensity as Qn,themeSize as Ua,themeSpacing as Ft}from"@domphy/theme";function Rd(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 i=t.getContext("select");if(i){let c=i.value;t.attributes.set("ariaSelected",l=>{let p=c.get(l);return i.multiple?p.includes(e):p===e}),t.addEvent("click",()=>{let l=c.get();i.multiple?l.includes(e)?c.set(l.filter(p=>p!==e)):c.set(l.concat([e])):l!==e&&c.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Ua(t,"inherit"),height:t=>Ft(6+Qn(t)*2),paddingInline:t=>Ft(Qn(t)*3),border:"none",outline:"none",color:t=>We(t,"shift-9",r),backgroundColor:t=>We(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>We(t,"shift-2",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 Xa}from"@domphy/core";import{themeColor as Ja,themeDensity as er,themeSize as Za,themeSpacing as tr}from"@domphy/theme";function Bd(n={}){var i;let{color:o="neutral",multiple:r=!1}=n,e=Xa((i=n.value)!=null?i:r?[]:null),a={div:c=>{let l=e.get(c);return(Array.isArray(l)?l:[l]).map(s=>({input:null,name:n.name,value:s==null?"":String(s)}))},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(a)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>tr(er(c)*2),paddingInline:c=>tr(er(c)*2),fontSize:c=>Za(c,"inherit"),backgroundColor:c=>Ja(c,"inherit",o)}}}import{hashString as Qa,toState as el}from"@domphy/core";import{themeColor as or,themeSize as tl,themeSpacing as nr}from"@domphy/theme";function jd(n={}){var a;let o=el((a=n.color)!=null?a:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=Qa(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>tl(t),color:t=>or(t,"shift-9",o.get(t)),height:nr(6),display:"block",borderRadius:nr(1),backgroundColor:t=>or(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{toState as ol}from"@domphy/core";import{themeColor as nl,themeSize as rl}from"@domphy/theme";function Ud(n={}){var r;let o=ol((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=>rl(e,"inherit"),color:e=>nl(e,"shift-9",o.get(e))}}}import{hashString as il,toState as al}from"@domphy/core";import{themeColor as Wt,themeSize as ll,themeSpacing as zo}from"@domphy/theme";var ir={to:{transform:"rotate(360deg)"}},rr=il(JSON.stringify(ir));function Qd(n={}){var r;let o=al((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=>ll(e),backgroundColor:e=>Wt(e),color:e=>Wt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:zo(6),height:zo(6),borderRadius:"50%",border:e=>`${zo(.5)} solid ${Wt(e,"shift-4",o.get(e))}`,borderTopColor:e=>Wt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${rr} 0.7s linear infinite`,[`@keyframes ${rr}`]:ir}}}import{merge as sl,toState as cl}from"@domphy/core";import{themeColor as Kt,themeSpacing as Vo}from"@domphy/theme";function np(n={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:a=90}=n;return{_onSchedule:(t,i)=>{sl(i,{_context:{splitter:{direction:o,size:cl(r),min:e,max:a,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function rp(){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",a=o.panelCount++===0,t=c=>{r.style[e]=`${a?c:100-c}%`};t(o.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let i=o.size.addListener(t);n.addHook("Remove",i)}}}function ip(){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 a=o.size.addListener(l=>{r.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let p=l.shiftKey?10:1,s=null;e?l.key==="ArrowRight"?s=Math.min(o.size.get()+p,o.max):l.key==="ArrowLeft"&&(s=Math.max(o.size.get()-p,o.min)):l.key==="ArrowDown"?s=Math.min(o.size.get()+p,o.max):l.key==="ArrowUp"&&(s=Math.max(o.size.get()-p,o.min)),l.key==="Home"?s=o.min:l.key==="End"&&(s=o.max),s!==null&&(l.preventDefault(),o.size.set(s))},i=null,c=l=>{l.preventDefault();let p=r.parentElement,s=y=>{let g=p.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",s),document.removeEventListener("mouseup",m),i=null};i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",m),i=null},document.addEventListener("mousemove",s),document.addEventListener("mouseup",m)};r.addEventListener("keydown",t),r.addEventListener("mousedown",c),n.addHook("Remove",()=>{i==null||i(),a(),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:Vo(1),height:Vo(1),borderRadius:Vo(999),backgroundColor:n=>Kt(n,"shift-4")}}}}import{toState as ml}from"@domphy/core";import{themeColor as M,themeSize as ar,themeSpacing as fe}from"@domphy/theme";function cp(n={items:[]}){var i;let{items:o=[],direction:r="horizontal",color:e="neutral",accentColor:a="primary"}=n,t=ml((i=n.current)!=null?i:0);return{_context:{steps:{current:t,direction:r,color:e,accentColor:a}},_onSchedule:(c,l)=>{let p=o.map((s,m)=>{var g;return{li:[typeof s.label=="string"?{span:s.label}:s.label],_key:(g=s.key)!=null?g:m,dataStep:String(m+1),dataStatus:u=>{let d=t.get(u);return m<d?"done":m===d?"active":"pending"},ariaCurrent:u=>t.get(u)===m?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:fe(1),flex:"1",fontSize:u=>ar(u,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:fe(6),height:fe(6),borderRadius:fe(999),fontSize:u=>ar(u,"decrease-1"),fontWeight:"600",flexShrink:"0",border:u=>`2px solid ${M(u,"shift-4",e)}`,backgroundColor:u=>M(u,"inherit"),color:u=>M(u,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:fe(3),right:`calc(50% + ${fe(3)})`,left:`calc(-50% + ${fe(3)})`,height:"2px",backgroundColor:u=>M(u,"shift-3",e),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:u=>M(u,"shift-6",a),borderColor:u=>M(u,"shift-6",a),color:u=>M(u,"shift-15",a)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:u=>M(u,"shift-3",e),borderColor:u=>M(u,"shift-3",e),color:u=>M(u,"shift-9",e)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-3",e)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:u=>M(u,"shift-6",a)},"&[data-status=pending]":{color:u=>M(u,"shift-7")},"&[data-status=active]":{color:u=>M(u,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:u=>M(u,"shift-8")}}}});l[c.tagName]=p},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:fe(2),listStyle:"none",margin:"0",padding:"0"}}}import{toState as ul}from"@domphy/core";import{themeColor as lr,themeSize as dl}from"@domphy/theme";function pp(n={}){var r;let o=ul((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=>dl(e,"inherit"),fontWeight:700,color:e=>lr(e,"shift-11",o.get(e)),backgroundColor:e=>lr(e)}}}import{toState as pl}from"@domphy/core";import{themeColor as hl,themeSize as fl}from"@domphy/theme";function yp(n={}){var r;let o=pl((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=>fl(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>hl(e,"shift-9",o.get(e))}}}import{toState as gl}from"@domphy/core";import{themeColor as yl,themeSize as bl}from"@domphy/theme";function vp(n={}){var r;let o=gl((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=>bl(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>yl(e,"shift-9",o.get(e))}}}import{toState as Sl}from"@domphy/core";import{themeColor as G,themeDensity as Ke,themeSize as sr,themeSpacing as je}from"@domphy/theme";function wp(n={}){var r;let o=Sl((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=>sr(e,"inherit"),color:e=>G(e,"shift-9",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=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${G(e,"shift-3",o.get(e))}`,fontSize:e=>sr(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>je(Ke(e)*3),paddingBlock:e=>je(Ke(e)*1),color:e=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${G(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>G(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${G(e,"shift-2")}!important`}}}}import{toState as Cl}from"@domphy/core";import{themeColor as Ye,themeDensity as jt,themeSize as vl,themeSpacing as ge}from"@domphy/theme";function Op(n={items:[]}){var t,i,c;let{items:o=[],accentColor:r="primary",color:e="neutral"}=n,a=Cl((c=n.activeKey)!=null?c:(i=(t=o[0])==null?void 0:t.key)!=null?i:0);return{_onSchedule:(l,p)=>{let s=l.nodeId,y={div:o.map((u,d)=>{var v;let h=(v=u.key)!=null?v:d;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:h,role:"tab",id:`tab${s}${h}`,ariaControls:`panel${s}${h}`,ariaSelected:k=>a.get(k)===h,onClick:()=>a.set(h),onKeyDown:k=>{let C=k.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;k.preventDefault();let x=o.map((Se,De)=>{var ie;return(ie=Se.key)!=null?ie:De}),D=x.findIndex(Se=>Se===h),P=D;C==="ArrowRight"?P=(D+1)%x.length:C==="ArrowLeft"?P=(D-1+x.length)%x.length:C==="Home"?P=0:C==="End"&&(P=x.length-1),a.set(x[P])},style:{cursor:"pointer",fontSize:k=>vl(k,"inherit"),height:k=>ge(6+jt(k)*2),paddingInline:k=>ge(jt(k)*4),border:"none",outline:"none",color:k=>Ye(k,"shift-9"),backgroundColor:k=>Ye(k,"inherit"),boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-1",e)}`,"&:hover:not([disabled])":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-2",e)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-6",r)}`},"&:focus-visible":{boxShadow:k=>`inset 0 -${ge(.5)} 0 0 ${Ye(k,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},g=o.map((u,d)=>{var S;let h=(S=u.key)!=null?S:d;return{div:[u.content],_key:h,role:"tabpanel",id:`panel${s}${h}`,ariaLabelledby:`tab${s}${h}`,hidden:v=>a.get(v)!==h,style:{paddingBlock:v=>ge(jt(v)*2),paddingInline:v=>ge(jt(v)*2)}}});p[l.tagName]=[y,...g]}}}import{toState as cr}from"@domphy/core";import{themeColor as U,themeDensity as Mo,themeSize as El,themeSpacing as qe}from"@domphy/theme";function zp(n={}){var a,t;let o=cr((a=n.color)!=null?a:"neutral","color"),r=cr((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let c=i.domElement;c.style.overflow="hidden";let l=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",l),l(),i.addHook("Remove",()=>c.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>qe(Mo(i)*2),paddingBlock:i=>qe(Mo(i)*1.5),border:"none",borderRadius:i=>qe(Mo(i)*1.5),fontSize:i=>El(i,"inherit"),color:i=>U(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${U(i,"shift-4",o.get(i))}`,backgroundColor:i=>U(i,"inherit",o.get(i)),"&::placeholder":{color:i=>U(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5",r.get(i))}`},"&:focus-visible":{outline:i=>`${qe(.5)} solid ${U(i,"shift-6",r.get(i))}`},"&:invalid":{outline:i=>`${qe(.5)} solid ${U(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>U(i,"shift-8","neutral"),outline:i=>`1px solid ${U(i,"shift-4","neutral")}`,backgroundColor:i=>U(i,"shift-2","neutral")}}}}import{toState as kl}from"@domphy/core";import{themeColor as mr,themeDensity as _o,themeSpacing as Ro}from"@domphy/theme";function Rp(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Hp(n={}){var t,i,c;let{last:o=!1}=n,r=(t=n.color)!=null?t:"neutral",e=(i=n.accentColor)!=null?i:"primary",a=kl((c=n.active)!=null?c:!1);return{style:W({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>Ro(_o(l)*2),paddingBottom:l=>o?"0":Ro(_o(l)*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:l=>mr(l,"shift-8",a.get(l)?e:r),opacity:l=>a.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${Ro(_o(l)*4)}`,width:"2px",backgroundColor:l=>mr(l,"shift-3",r)}})}}import{toState as xl}from"@domphy/core";import{themeColor as Ho,themeDensity as Ao,themeSize as wl,themeSpacing as ye}from"@domphy/theme";function Wp(n={}){let{position:o="top-center",color:r="neutral"}=n,e=xl(!1),a=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),c={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:a?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:ye(4),zIndex:30,padding:ye(6),pointerEvents:"none"}};return{_portal:l=>{let p=l.domElement.querySelector(`#domphy-toast-${o}`);return p||(p=l.children.insert(c).domElement),p},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:ye(32),pointerEvents:"auto",paddingBlock:l=>ye(Ao(l)*2),paddingInline:l=>ye(Ao(l)*4),borderRadius:l=>ye(Ao(l)*2),fontSize:l=>wl(l,"inherit"),color:l=>Ho(l,"shift-9",r),backgroundColor:l=>Ho(l,"inherit",r),boxShadow:l=>`0 ${ye(2)} ${ye(9)} ${Ho(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":a?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,p)=>{let s=!1,m=null,y=()=>{s||(s=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",g),p())},g=u=>{u.propertyName==="transform"&&y()};l.domElement.addEventListener("transitionend",g),m=setTimeout(y,350),l.addHook("Remove",()=>{var u;m&&(clearTimeout(m),m=null),(u=l.domElement)==null||u.removeEventListener("transitionend",g)}),e.set(!1)}}}import{toState as Tl}from"@domphy/core";import{themeColor as be,themeSize as ur,themeSpacing as X}from"@domphy/theme";function qp(n={items:[]}){var i;let{items:o=[],multiple:r=!1,color:e="neutral",accentColor:a="primary"}=n,t=Tl((i=n.value)!=null?i:r?[]:"");return{role:"group",_context:{toggleGroup:{value:t,multiple:r}},_onSchedule:(c,l)=>{let p=o.map((s,m)=>{var u;let y=(u=s.key)!=null?u:String(m);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:y,role:"button",ariaPressed:d=>{let h=t.get(d);return Array.isArray(h)?h.includes(y):h===y},onClick:()=>{let d=t.get();if(r){let h=Array.isArray(d)?[...d]:[];t.set(h.includes(y)?h.filter(S=>S!==y):[...h,y])}else t.set(d===y?"":y)},style:{cursor:"pointer",fontSize:d=>ur(d,"inherit"),height:X(6),paddingBlock:X(1),paddingInline:X(2),border:"none",borderRadius:X(1),color:d=>be(d,"shift-9",e),backgroundColor:d=>be(d,"inherit",e),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:d=>be(d,"shift-2",e)},"&[aria-pressed=true]":{backgroundColor:d=>be(d,"shift-3",a),color:d=>be(d,"shift-12",a)},"&:focus-visible":{outline:d=>`${X(.5)} solid ${be(d,"shift-6",a)}`,outlineOffset:`-${X(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});l[c.tagName]=p},style:{display:"flex",paddingBlock:X(1),paddingInline:X(1),gap:X(1),borderRadius:X(2),fontSize:c=>ur(c,"inherit"),backgroundColor:c=>be(c,"inherit",e),outline:c=>`1px solid ${be(c,"shift-3",e)}`,outlineOffset:"-1px"}}}import{themeDensity as Dl,themeSpacing as Pl}from"@domphy/theme";function Xp(n={}){var r;let o=(r=n.gap)!=null?r:4;return{style:{display:"flex",alignItems:"center",gap:e=>Pl(Dl(e)*o)}}}function Jp(){return{div:null,style:{flex:"1 1 0"}}}import{merge as Ol,toState as dr}from"@domphy/core";import{themeColor as pr,themeDensity as No,themeSize as Ll,themeSpacing as Bo}from"@domphy/theme";function nh(n={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=n,a=dr(r),t=dr(e),i=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,c={span:g=>t.get(g),id:i},{show:l,hide:p,anchorPartial:s}=K({open:o,placement:a,content:c}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:g=>Bo(No(g)*1),paddingInline:g=>Bo(No(g)*3),borderRadius:g=>Bo(No(g)*1),color:g=>pr(g,"shift-9"),backgroundColor:g=>pr(g),fontSize:g=>Ll(g,"inherit")},$:[Yn({placement:a,bordered:!1})]};return c.$||(c.$=[]),c.$.push(m),Ol(s,{ariaDescribedby:i,onMouseEnter:(g,u)=>l(u),onMouseLeave:(g,u)=>p(u),onFocus:(g,u)=>l(u),onBlur:(g,u)=>p(u),onKeyDown:(g,u)=>g.key==="Escape"&&p(u)}),s}import{ElementNode as hr}from"@domphy/core";function fr(n,o){return n.key!==void 0&&n.key!==null?String(n.key):`index-${o}`}function ah(n={}){let{duration:o=300,delay:r=0}=n,e=new Map,a=new Map,t=new Set,i=new Set;return{_onMount:c=>{c.addHook("Remove",()=>{for(let l of Array.from(a.values()))l();a.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of i)cancelAnimationFrame(l);i.clear()})},_onBeforeUpdate:c=>{e=new Map,c.children.items.forEach((l,p)=>{if(!(l instanceof hr))return;let s=l.domElement;s&&e.set(fr(l,p),s.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((l,p)=>{var x;if(!(l instanceof hr))return;let s=l.domElement;if(!s)return;let m=fr(l,p),y=e.get(m);if(!y)return;let g=s.getBoundingClientRect(),u=y.left-g.left,d=y.top-g.top;if(Math.abs(u)<.5&&Math.abs(d)<.5)return;(x=a.get(s))==null||x(),s.style.transition="none",s.style.transform=`translate(${u}px, ${d}px)`,s.getBoundingClientRect();let h=requestAnimationFrame(()=>{i.delete(h),s.style.transition=`transform ${o}ms ease ${r}ms`,s.style.transform="translate(0px, 0px)"});i.add(h);let S=!1,v=null,k=()=>{S||(S=!0,v&&(t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",C),s.style.transition="",s.style.transform="")},C=D=>{D.propertyName==="transform"&&k()};a.set(s,()=>{S=!0,v&&(clearTimeout(v),t.delete(v),v=null),a.delete(s),s.removeEventListener("transitionend",C)}),s.addEventListener("transitionend",C),v=setTimeout(k,o+r+34),t.add(v)}),e.clear()}}}import{toState as $l}from"@domphy/core";import{themeColor as gr,themeSize as Il,themeSpacing as zl}from"@domphy/theme";function mh(n={}){var r;let o=$l((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=>Il(e,"inherit"),backgroundColor:e=>gr(e),color:e=>gr(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:zl(3),listStyleType:"disc",listStylePosition:"outside"}}}export{Rl as abbreviation,Bl as accordion,jl as alert,Ul as avatar,Ql as badge,ns as blockquote,ls as breadcrumb,us as breadcrumbEllipsis,fs as button,Ss as buttonGhost,ks as buttonSwitch,Ds as card,$s as code,Ws as combobox,qs as command,Us as commandItem,Gs as commandSearch,ec as datePicker,ic as descriptionList,cc as details,fc as dialog,Sc as divider,xc as drawer,Pc as emphasis,Ic as empty,Vc as errorBoundary,Hc as fab,Fc as figure,Yc as formGroup,Xc as heading,em as horizontalRule,rm as icon,sm as image,dm as inputCheckbox,fm as inputColor,Sm as inputDateTime,km as inputFile,Dm as inputNumber,Vm as inputOTP,$m as inputPassword,Hm as inputRadio,Fm as inputRange,Ym as inputSearch,Xm as inputSwitch,eu as inputText,ru as keyboard,su as label,du as link,gu as linkButton,Cu as list,vu as listItem,Eu as listItemButton,Tu as mark,Lu as menu,zu as motion,Ru as orderedList,Bu as pagination,Yu as paragraph,Ju as popover,Yn as popoverArrow,rd as preformated,sd as progress,dd as rating,yd as ringProgress,vd as scrollArea,wd as segmented,Pd as select,Vd as selectBox,Rd as selectItem,Bd as selectList,jd as skeleton,Ud as small,Qd as spinner,np as splitter,ip as splitterHandle,rp as splitterPanel,cp as steps,pp as strong,yp as subscript,vp as superscript,wp as table,Op as tabs,xt as tag,zp as textarea,Rp as timeline,Hp as timelineItem,Wp as toast,qp as toggleGroup,Xp as toolbar,Jp as toolbarSpacer,nh as tooltip,ah as transitionGroup,mh as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|