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