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