@domphy/ui 0.21.6 → 0.22.1

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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var no=Object.defineProperty,Pr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptor,Or=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertyNames,on=Object.getOwnPropertySymbols;var rn=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable;var nn=(r,o,n)=>o in r?no(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,E=(r,o)=>{for(var n in o||(o={}))rn.call(o,n)&&nn(r,n,o[n]);if(on)for(var n of on(o))zr.call(o,n)&&nn(r,n,o[n]);return r},z=(r,o)=>Pr(r,Or(o));var Rr=(r,o)=>{for(var n in o)no(r,n,{get:o[n],enumerable:!0})},Vr=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Lr(o))!rn.call(r,s)&&s!==n&&no(r,s,{get:()=>o[s],enumerable:!(e=Ir(o,s))||e.enumerable});return r};var Mr=r=>Vr(no({},"__esModule",{value:!0}),r);var il={};Rr(il,{abbreviation:()=>_r,accordion:()=>Nr,alert:()=>$r,avatar:()=>Ar,badge:()=>Br,blockquote:()=>Hr,breadcrumb:()=>Fr,breadcrumbEllipsis:()=>Kr,button:()=>qr,buttonGhost:()=>wo,buttonSwitch:()=>Yr,card:()=>Ur,code:()=>Jr,combobox:()=>na,command:()=>ra,commandItem:()=>ia,commandSearch:()=>aa,datePicker:()=>ca,descriptionList:()=>da,details:()=>pa,dialog:()=>fa,divider:()=>ga,drawer:()=>ba,elevation:()=>_,emphasis:()=>Sa,empty:()=>va,errorBoundary:()=>xa,fab:()=>ka,figure:()=>wa,focusRing:()=>S,formGroup:()=>Ta,grid:()=>Da,heading:()=>Ia,horizontalRule:()=>Oa,icon:()=>La,image:()=>za,inputCheckbox:()=>Ra,inputColor:()=>Va,inputDateTime:()=>Ma,inputFile:()=>_a,inputNumber:()=>Na,inputOTP:()=>$a,inputPassword:()=>Fa,inputRadio:()=>Ka,inputRange:()=>ja,inputSearch:()=>Wa,inputSwitch:()=>qa,inputText:()=>Ya,keyboard:()=>Ga,label:()=>Ua,link:()=>Ja,linkButton:()=>Qa,list:()=>ei,listItem:()=>ti,listItemButton:()=>oi,mark:()=>ni,menu:()=>ri,motion:()=>ii,orderedList:()=>li,pagination:()=>mi,panelSection:()=>ui,paragraph:()=>di,popover:()=>hi,popoverArrow:()=>qo,preformated:()=>fi,progress:()=>gi,rating:()=>vi,ringProgress:()=>Ci,row:()=>Uo,scrollArea:()=>xi,segmented:()=>ki,select:()=>wi,selectBox:()=>Ii,selectItem:()=>Oi,selectList:()=>Li,skeleton:()=>zi,small:()=>Ri,spinner:()=>Vi,splitter:()=>Mi,splitterHandle:()=>$i,splitterPanel:()=>Ni,stack:()=>Ai,steps:()=>Hi,strong:()=>Fi,subscript:()=>Ki,superscript:()=>ji,table:()=>Wi,tabs:()=>qi,tag:()=>Yt,textarea:()=>Yi,timeline:()=>Gi,timelineItem:()=>Ui,toast:()=>Ji,toggleGroup:()=>Qi,toolbar:()=>el,toolbarSpacer:()=>tl,tooltip:()=>ol,transitionGroup:()=>nl,unorderedList:()=>rl,visuallyHidden:()=>al});module.exports=Mr(il);var Co=require("@domphy/core"),Xe=require("@domphy/theme");function _r(r={}){var e,s;let o=(0,Co.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Co.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,Xe.themeSize)(t),backgroundColor:t=>(0,Xe.themeColor)(t),color:t=>(0,Xe.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,Xe.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,Xe.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,Xe.themeColor)(t,"shift-9",n.get(t))}}}}var Eo=require("@domphy/core"),gt=require("@domphy/theme");var xo=require("@domphy/theme");function S(r,o="primary"){let n=(0,xo.themeColor)(r,"surface"),e=(0,xo.themeColor)(r,"shift-9",o);return`0 0 0 2px ${n}, 0 0 0 4px ${e}`}function Nr(r={}){var s,t;let{type:o="single"}=r,n=(0,Eo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Eo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let i=a.domElement;if(!i)return;let m=u=>{let l=u.target.closest("summary");if(!l)return;let c=l.closest("details");!c||c.parentElement!==i||c.open||Array.from(i.querySelectorAll(":scope > details")).forEach(d=>{d!==c&&(d.open=!1)})};i.addEventListener("click",m),a.addHook("Remove",()=>i.removeEventListener("click",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,gt.themeSpacing)((0,gt.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",color:a=>(0,gt.themeColor)(a,"text",n.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,gt.themeColor)(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>S(a,e.get(a))}}}}var an=require("@domphy/core"),ye=require("@domphy/theme");function $r(r={}){var n;let o=(0,an.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,ye.themeSpacing)(3),paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*2),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*4),borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,ye.themeSpacing)(1)} 0 0 0 ${(0,ye.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,ye.themeColor)(e,"inherit",o.get(e)),color:e=>(0,ye.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,ye.themeSize)(e,"inherit")}}}var ln=require("@domphy/core"),lt=require("@domphy/theme");function Ar(r={}){var n;let o=(0,ln.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,lt.themeSpacing)(9),height:(0,lt.themeSpacing)(9),fontSize:e=>(0,lt.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,lt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,lt.themeColor)(e,"shift-11",o.get(e)),boxShadow:e=>`0 0 0 1px ${(0,lt.themeColor)(e,"border",o.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var ko=require("@domphy/core"),Ce=require("@domphy/theme");function Br(r={}){var s;let{label:o=999}=r,n=(0,ko.toState)(o),e=(0,ko.toState)((s=r.color)!=null?s:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ce.themeSpacing)(5),height:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ce.themeSize)(t,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*999),backgroundColor:t=>(0,Ce.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ce.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ce.themeColor)(t,"shift-0",e.get(t))}`}}}}var sn=require("@domphy/core"),Le=require("@domphy/theme");function Hr(r={}){var n;let o=(0,sn.toState)((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=>(0,Le.themeSize)(e,"inherit"),backgroundColor:e=>(0,Le.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Le.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset ${(0,Le.themeSpacing)(1)} 0 0 0 ${(0,Le.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*2),paddingInline:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*4),margin:0}}}var cn=require("@domphy/core"),Fe=require("@domphy/theme");function Fr(r={}){var e;let{separator:o="/"}=r,n=(0,cn.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:s=>{s.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:s=>(0,Fe.themeSize)(s,"inherit"),gap:(0,Fe.themeSpacing)(1),color:s=>(0,Fe.themeColor)(s,"text",n.get(s)),backgroundColor:s=>(0,Fe.themeColor)(s,"inherit",n.get(s)),"& > *":{display:"inline-flex",alignItems:"center",color:s=>(0,Fe.themeColor)(s,"text",n.get(s))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:s=>(0,Fe.themeColor)(s,"shift-4",n.get(s)),paddingInlineStart:(0,Fe.themeSpacing)(1)},"& > [aria-current=page]":{color:s=>(0,Fe.themeColor)(s,"shift-10",n.get(s)),pointerEvents:"none"}}}}var mn=require("@domphy/core"),st=require("@domphy/theme");function Kr(r={}){var n;let o=(0,mn.toState)((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=>(0,st.themeSize)(e,"inherit"),paddingInline:(0,st.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,st.themeColor)(e,"text",o.get(e)),borderRadius:(0,st.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,st.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,st.themeColor)(e,"hover",o.get(e))},"&:focus-visible":{boxShadow:e=>S(e,o.get(e))}}}}var dn=require("@domphy/core"),F=require("@domphy/theme");var Nt={small:"decrease-1",medium:"inherit",large:"increase-1"};var un=require("@domphy/core"),pe=require("@domphy/theme");var jr={small:.5,medium:1,large:1.5};function wo(r={}){var s,t,a;let o=(0,un.toState)((s=r.color)!=null?s:"neutral","color"),n=jr[(t=r.size)!=null?t:"medium"],e=Nt[(a=r.size)!=null?a:"medium"];return{type:"button",_onInsert:i=>{i.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:i=>(0,pe.themeSize)(i,e),paddingBlock:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),paddingInline:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*n),borderRadius:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:i=>(0,pe.themeSpacing)((0,pe.themeDensity)(i)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:i=>(0,pe.themeColor)(i,"text",o.get(i)),"&:hover:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"hover",o.get(i))},"&:active:not([disabled]):not([aria-busy=true])":{color:i=>(0,pe.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pe.themeColor)(i,"increase-2",o.get(i))},"&:focus-visible":{boxShadow:i=>S(i,o.get(i))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>(0,pe.themeColor)(i,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Wr={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function qr(r={}){var a,i,m,u;let o=(a=r.variant)!=null?a:"outline";if(o==="ghost")return wo({color:r.color,size:r.size});let n=(0,dn.toState)((i=r.color)!=null?i:"primary","color"),e=o==="solid",s=Wr[(m=r.size)!=null?m:"medium"],t=Nt[(u=r.size)!=null?u:"medium"];return z(E({type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:l=>(0,F.themeSize)(l,t),paddingBlock:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.block),paddingInline:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*s.inline),borderRadius:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:l=>(0,F.themeSpacing)((0,F.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":l=>`1px solid ${(0,F.themeColor)(l,"border-strong",n.get(l))}`,color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-13",n.get(l)):(0,F.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:l=>e?(0,F.themeColor)(l,"shift-0","neutral"):(0,F.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>e?(0,F.themeColor)(l,"shift-14",n.get(l)):(0,F.themeColor)(l,"hover",n.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:l=>e?(0,F.themeColor)(l,"shift-15",n.get(l)):(0,F.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:l=>(0,F.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,F.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,F.themeColor)(l,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var ro=require("@domphy/core"),Q=require("@domphy/theme");function Yr(r={}){var t,a;let{checked:o=!1}=r,n=(0,ro.toState)(o),e=(0,ro.toState)((t=r.color)!=null?t:"neutral","color"),s=(0,ro.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:i=>{i.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:i=>n.get(i),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:i=>(0,Q.themeSize)(i),border:"none",outlineWidth:"1px",outline:i=>`1px solid ${(0,Q.themeColor)(i,"border",e.get(i))}`,minWidth:(0,Q.themeSpacing)(12),minHeight:(0,Q.themeSpacing)(6),borderRadius:(0,Q.themeSpacing)(999),paddingLeft:(0,Q.themeSpacing)(7),paddingRight:(0,Q.themeSpacing)(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:i=>(0,Q.themeColor)(i,"inherit",e.get(i)),color:i=>(0,Q.themeColor)(i,"text",e.get(i)),"&:focus-visible":{boxShadow:i=>S(i,s.get(i))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,Q.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,Q.themeSpacing)(5),height:(0,Q.themeSpacing)(5),borderRadius:(0,Q.themeSpacing)(999),color:i=>(0,Q.themeColor)(i,"text"),backgroundColor:i=>(0,Q.themeColor)(i,"decrease-2",e.get(i))},"&[aria-checked=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"increase-3",s.get(i)),outline:"none",color:i=>(0,Q.themeColor)(i,"decrease-2"),paddingLeft:(0,Q.themeSpacing)(2),paddingRight:(0,Q.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,Q.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var pn=require("@domphy/core"),$=require("@domphy/theme");var Gr={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function _(r){return Gr[r]}function Ur(r={}){var n;let o=(0,pn.toState)((n=r.color)!=null?n:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),backgroundColor:e=>(0,$.themeColor)(e,"inherit",o.get(e)),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,$.themeColor)(e,"border-strong",o.get(e))}`,outlineOffset:"-1px",boxShadow:_("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),fontWeight:"600",color:e=>(0,$.themeColor)(e,"shift-11",o.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),paddingBottom:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),color:e=>(0,$.themeColor)(e,"text",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,$.themeSpacing)(2),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*2),paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,$.themeColor)(e,"border",o.get(e))}`}}}}var hn=require("@domphy/core"),ze=require("@domphy/theme");function Jr(r={}){var n;let o=(0,hn.toState)((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=>(0,ze.themeSize)(e,"inherit"),color:e=>(0,ze.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",o.get(e)),height:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(6/1.5)),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*(1/1.5))}}}var Ke=require("@domphy/core"),Y=require("@domphy/theme");var ao=require("@domphy/core"),Ze=require("@domphy/floating");var Wt=require("@domphy/core");function Xr(r){return typeof r.set=="function"}function ct(r,o,n=!0){if(typeof r.addListener=="function")return n&&o(r.get()),r.addListener(o);if(n)return(0,Wt.effect)(()=>{o(r.get())});let e=!0,s=(0,Wt.effect)(()=>{let t=r.get();e||o(t)});return e=!1,s}function To(r,o){Xr(r)&&r.set(o)}function yt(r,o){o==null||o(),To(r,!1)}function $t(r){return(0,Wt.toState)(r!=null?r:!1)}function Re(r,o){return`domphy-${r}-${o.nodeId}`}function Zr(r,o){var at,Ue,kt,it;let{openState:n,onDismiss:e,placement:s,content:t,keepOpenOnContentHover:a}=o,{kind:i}=o,m=`floating:${i}`,u=null,l=null,c=null,d=null,f=!1,h=r.domElement,C=r.getRoot(),v=Re(i,r),p={style:{position:"fixed",pointerEvents:"auto",visibility:V=>n.get(V)?"visible":"hidden"},onKeyDown:V=>{V.key==="Escape"&&q()},onMouseEnter:()=>a&&w(),onMouseLeave:()=>a&&q(),_onMount:V=>{var de;if(c=V.domElement,c.id||(c.id=v),h&&c&&!c.hasAttribute("data-theme")){let Je=(de=h.closest("[data-theme]"))==null?void 0:de.getAttribute("data-theme");Je&&c.setAttribute("data-theme",Je)}},_portal:V=>{let de=h.closest("dialog");if(de){let Ne=de.querySelector(":scope > #domphy-floating");return Ne||(Ne=de.ownerDocument.createElement("div"),Ne.id="domphy-floating",Object.assign(Ne.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),de.appendChild(Ne)),Ne}let Je=V.domElement.querySelector("#domphy-floating");if(!Je){let Ne={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};Je=V.children.insert(Ne).domElement}return Je}},b=V=>(0,ao.merge)(V,p);b(t);let k=()=>{f||(f=!0,d=C.children.insert(t),d._behaviorInstances.set(m,Oe))},g=()=>{f&&(!c||!c.isConnected)&&(l==null||l(),l=null,d=null,c=null,f=!1),k(),h&&c&&(l==null||l(),l=(0,Ze.autoUpdate)(h,c,()=>{(0,Ze.computePosition)(h,c,{placement:s.get(),middleware:[(0,Ze.offset)(12),(0,Ze.flip)(),(0,Ze.shift)()],strategy:"fixed"}).then(({x:V,y:de,placement:Je})=>{c&&(Object.assign(c.style,{left:`${V}px`,top:`${de}px`}),s.set(Je))})}),To(n,!0))},D=()=>{l==null||l(),l=null,d&&(d.remove(),d=null),c=null,f=!1,yt(n,e)},w=()=>{u&&clearTimeout(u),u=setTimeout(g,100)},q=()=>{u&&clearTimeout(u),u=setTimeout(D,100)},ve=V=>{if(!n.get()||!h||!c)return;let de=V.target;!h.contains(de)&&!c.contains(de)&&q()};(at=C.domElement)==null||at.addEventListener("click",ve);let Ie=V=>{V.key==="Escape"&&n.get()&&q()},Z=(it=(kt=(Ue=C.domElement)==null?void 0:Ue.ownerDocument)!=null?kt:C.domElement)!=null?it:null;Z==null||Z.addEventListener("keydown",Ie);let He=V=>{V?f||g():f&&D()},re=()=>{},Ee=!1,Ge=!1,Oe,Et=V=>{var de;V._behaviors=z(E({},(de=V._behaviors)!=null?de:{}),{[m]:{attach:()=>Oe,props:{}}})};return Oe={show:w,hide:q,panelId:v,update(V){if(!Ge&&(e=V.onDismiss,V.openState!==n&&(re(),n=V.openState,re=ct(n,He,!1),n.get()&&g()),s=V.placement,t=V.content,a=V.keepOpenOnContentHover,b(t),Et(t),d)){Ge=!0;try{d.patch(t)}finally{Ge=!1}}},destroy(){var V;Ee||(Ee=!0,u&&clearTimeout(u),u=null,l==null||l(),l=null,d==null||d.remove(),d=null,c=null,f=!1,re(),re=()=>{},(V=C.domElement)==null||V.removeEventListener("click",ve),Z==null||Z.removeEventListener("keydown",Ie))}},Et(t),re=ct(n,He),Oe}function Qe(r){let{kind:o,placement:n,onDismiss:e}=r,s=$t(r.open),t=`floating:${o}`,a=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.show()},i=u=>{var l;return(l=u==null?void 0:u.getBehavior(t))==null?void 0:l.hide()},m=E({onKeyDown:(u,l)=>u.key==="Escape"&&i(l)},(0,ao.behavior)(t,Zr,{kind:o,openState:s,onDismiss:e,placement:n,content:r.content,keepOpenOnContentHover:!!r.keepOpenOnContentHover}));return{show:a,hide:i,anchorPartial:m}}var bt=require("@domphy/core"),J=require("@domphy/theme");var Qr='<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>',qt=1.5,ea=6/qt,fn=2.5/qt,ta=1/qt,gn=4/qt,oa=1/qt;function Yt(r={}){var e;let{removable:o=!1}=r,n=(0,bt.toState)((e=r.color)!=null?e:"neutral","color");return z(E({dataTone:"shift-2"},(0,bt.behavior)("tag-remove",(s,t)=>{let a=()=>s.remove(),i=()=>({span:(0,bt.rawHtml)(Qr),_key:"tag-remove",onClick:l=>{l.stopPropagation(),a()},onKeyDown:l=>{let c=l;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*oa),width:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),height:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*gn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:l=>(0,J.themeColor)(l,"shift-4",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))}}}),m=()=>{var l;return(l=s.children.items.find(c=>c instanceof bt.ElementNode&&c.key==="tag-remove"))!=null?l:null},u=(l,c)=>{let d=m();l.removable&&!d?s.children.insert(i(),void 0,c):!l.removable&&d&&s.children.remove(d)};return u(t,!1),{update:l=>u(l,!0)}},{removable:o})),{style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*ea),paddingBlock:0,borderRadius:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*999),paddingInlineStart:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*fn),paddingInlineEnd:s=>(0,J.themeSpacing)((0,J.themeDensity)(s)*(o?ta:fn)),gap:(0,J.themeSpacing)(1.5),fontSize:s=>(0,J.themeSize)(s,"decrease-1"),backgroundColor:s=>(0,J.themeColor)(s,"inherit",n.get(s)),color:s=>(0,J.themeColor)(s,"text",n.get(s)),border:"none",outlineOffset:"-1px",outline:s=>`1px solid ${(0,J.themeColor)(s,"border-strong",n.get(s))}`}})}function na(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,Ke.toState)(r.value),i=(0,Ke.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"combobox",open:i,onDismiss:r.onDismiss,placement:(0,Ke.toState)(n),content:r.content}),c={onClick:(g,D)=>!t&&u(D),dataTone:"shift-0",style:{backgroundColor:g=>(0,Y.themeColor)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text"),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*2),outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,Ke.merge)(r.content,c);let d={border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,Y.themeSpacing)(6),marginInlineStart:(0,Y.themeSpacing)(2),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},f=g=>{var D,w;return(w=(D=g==null?void 0:g.elementNode)==null?void 0:D.getBehavior("comboboxInner"))==null?void 0:w.query},h=g=>{let D=g;for(;D;){if(D._behaviorInstances.has("floating:combobox"))return D;D=D.parent}return g},C={role:"combobox",ariaHaspopup:"listbox",ariaExpanded:g=>i.get(g),ariaControls:g=>g!=null&&g.elementNode?Re("combobox",h(g.elementNode)):void 0},v=g=>g?((0,Ke.merge)(g,E({onFocus:(D,w)=>m(w),style:d,_key:"combobox-input"},C)),g):E({input:null,ariaLabel:"Filter options",onFocus:(D,w)=>m(w),value:D=>{var w,q;return(q=(w=f(D))==null?void 0:w.get(D))!=null?q:""},onInput:(D,w)=>{var q;(q=w.getBehavior("comboboxInner"))==null||q.query.set(D.target.value)},style:d,_key:"combobox-input"},C),p=g=>({div:D=>{i.get(D);let w=g.state.get(D),q=Array.isArray(w)?w:[w],Ie=g.options.filter(Z=>q.includes(Z.value)).map(Z=>({span:Z.label,$:[Yt({color:g.color,removable:!0})],_key:Z.value,_onRemove:He=>{let re=g.state.get(),Ge=(Array.isArray(re)?re:[re]).filter(Oe=>Oe!==Z.value);g.multiple?g.state.set(Ge):g.state.set(Ge[0])}}));return Ie.push(v(g.input)),Ie},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}}),k=z(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,D)=>{D[g.tagName]=[p({options:o,multiple:t,color:e,state:a,input:r.input})]}},(0,Ke.behavior)("comboboxInner",(g,D)=>{let w=g.getMetadata("comboboxQuery");return w||(w=(0,Ke.toState)(""),g.setMetadata("comboboxQuery",w)),{query:w,update(q){g.children.update([p(q)])}}},{options:o,multiple:t,color:e,state:a,input:r.input})),{style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"border-strong","neutral")}`,paddingBlock:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),paddingInline:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1),borderRadius:g=>(0,Y.themeSpacing)((0,Y.themeDensity)(g)*1.5),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"text",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>S(g,e)}}});return(0,Ke.merge)(l,k),l}var io=require("@domphy/core"),ee=require("@domphy/theme");function ra(){return{role:"group",ariaLabel:"Commands",_onSchedule:(r,o)=>{(0,io.merge)(o,{_context:{command:{query:(0,io.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(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 s=e.getContext("command");if(!s){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>s.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,ee.themeSize)(e,"inherit"),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),paddingBlock:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,ee.themeColor)(e,"border",o)}`,outline:"none",color:e=>(0,ee.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,ee.themeColor)(e,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,ee.themeColor)(e,"shift-6",n),boxShadow:e=>S(e,n)}}}}function ia(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onMount:e=>{var u,l;let s=e.getContext("command");if(!s){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(l=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?l:"",i=c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())};i(s.query.get());let m=s.query.addListener(i);e.addHook("Remove",m)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,ee.themeSize)(e,"inherit"),height:e=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(e)*2),paddingInline:e=>(0,ee.themeSpacing)((0,ee.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,ee.themeColor)(e,"shift-13",o),backgroundColor:e=>(0,ee.themeColor)(e,"hover",o)},"&:focus-visible":{boxShadow:e=>S(e,n)}}}}var xe=require("@domphy/core"),P=require("@domphy/theme");var fe=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),wt=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Do=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Gt=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Po=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Io=(r,o)=>wt(r,-((r.getDay()-o+7)%7));function la(r){var o,n;try{let e=new Intl.Locale(r),s=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(s!=null&&s.firstDay)return s.firstDay%7}catch(e){}return 0}function sa(r,o){let n=o,e=null,s=a=>{e==null||e(),e=a.onChange?a.selection.addListener(i=>a.onChange(i)):null},t=(a,i)=>{a!==i&&a.set(i.get())};return s(n),{update(a){a.selectionIsCallerOwned||t(a.selection,n.selection),t(a.viewYear,n.viewYear),t(a.viewMonth,n.viewMonth),t(a.focused,n.focused),t(a.hovered,n.hovered),t(a.hour,n.hour),t(a.minute,n.minute),t(a.open,n.open),(a.selection!==n.selection||a.onChange!==n.onChange)&&s(a),n=a},destroy(){e==null||e(),e=null}}}function ca(r={}){var Zo,Qo,en,tn;let{mode:o="single",time:n=!1,min:e,max:s,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:i,onChange:m}=r,u=(Zo=r.weekStartsOn)!=null?Zo:la(a),l=(0,xe.toState)((Qo=r.accentColor)!=null?Qo:"primary","accentColor"),c=(0,xe.toState)((en=r.placement)!=null?en:"bottom-start"),d=(0,xe.toState)((tn=r.value)!=null?tn:o==="range"?[null,null]:null),f=(()=>{let y=d.get(),x=o==="range"?y==null?void 0:y[0]:y;return x instanceof Date?x:new Date})(),h=(0,xe.toState)(f.getFullYear(),"viewYear"),C=(0,xe.toState)(f.getMonth(),"viewMonth"),v=(0,xe.toState)(fe(f),"focused"),p=(0,xe.toState)(null,"hovered"),b=(0,xe.toState)(f.getHours(),"hour"),k=(0,xe.toState)(f.getMinutes(),"minute"),g=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),w=new Intl.DateTimeFormat(a,{weekday:"short"}),q=new Intl.DateTimeFormat(a,{dateStyle:"full"}),ve=y=>y?g.format(y):"",Ie=y=>{if(i)return i(y);if(o==="range"){let[x,T]=y!=null?y:[null,null];return x?`${ve(x)} \u2013 ${ve(T)}`:""}return ve(y)},Z=Array.from({length:7},(y,x)=>w.format(new Date(2023,0,1+(x+u)%7))),He=y=>!!e&&fe(y)<fe(e)||!!s&&fe(y)>fe(s)||!!t&&t(y),re=y=>{if(!n)return fe(y);let x=fe(y);return x.setHours(b.get(),k.get(),0,0),x},Ee=(y,x)=>{var O;if(He(y))return;if(o==="single"){d.set(re(y)),n||Ne(x);return}let[T,L]=(O=d.get())!=null?O:[null,null];!T||T&&L?d.set([re(y),null]):fe(y)<fe(T)?(d.set([re(y),re(T)]),n||Ne(x)):(d.set([T,re(y)]),n||Ne(x))},Ge=()=>{var y;if(n)if(o==="single"){let x=d.get();x&&d.set(re(x))}else{let[x,T]=(y=d.get())!=null?y:[null,null];d.set([x&&re(x),T&&re(T)])}},Oe=(y,x)=>{var _t;if(o!=="range")return!1;let[T,L]=(_t=d.get(x))!=null?_t:[null,null],O=L!=null?L:p.get(x);if(!T||!O)return!1;let M=fe(T)<=fe(O)?T:O,$e=fe(T)<=fe(O)?O:T,ke=fe(y);return ke>=fe(M)&&ke<=fe($e)},Et=(y,x)=>{let T=d.get(x);if(o==="range"){let[L,O]=T!=null?T:[null,null];return Gt(y,L)||Gt(y,O)}return Gt(y,T)},at=y=>{h.set(y.getFullYear()),C.set(y.getMonth())},Ue=y=>{let x=Do(new Date(h.get(),C.get(),1),y);at(x)},kt=y=>h.set(h.get()+y),it=y=>{var T;let x=(T=y==null?void 0:y.getRoot())==null?void 0:T.domElement;setTimeout(()=>{var L;(L=x==null?void 0:x.querySelector(`[data-date="${Po(v.get())}"]`))==null||L.focus()},0)},V=Cr(),de=(0,xe.toState)(!1),{show:Je,hide:Ne,anchorPartial:So}=Qe({kind:"datePicker",open:de,placement:c,content:V}),Sr=E({type:"text",readonly:!0,value:y=>Ie(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>de.get(y),ariaControls:y=>y!=null&&y.elementNode?Re("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,x)=>{vo(x)},onFocus:(y,x)=>{vo(x)},onKeyDown:(y,x)=>{let T=y.key;(T==="ArrowDown"||T==="Enter")&&(y.preventDefault(),vo(x))}},(0,xe.behavior)("datePicker",sa,{selection:d,selectionIsCallerOwned:r.value!==void 0,viewYear:h,viewMonth:C,focused:v,hovered:p,hour:b,minute:k,open:de,onChange:m}));function vo(y){var T;let x=(T=vr())!=null?T:new Date;v.set(fe(x)),at(x),Je(y),it(y)}function vr(){var x;let y=d.get();return o==="range"?(x=y==null?void 0:y[0])!=null?x:null:y!=null?y:null}return(0,xe.merge)(So,Sr),So;function Cr(){let y=(M,$e,ke)=>({button:M,type:"button",ariaLabel:$e,onClick:ke,style:ma()}),x={div:[y("\xAB","Previous year",()=>kt(-1)),y("\u2039","Previous month",()=>Ue(-1)),{div:M=>D.format(new Date(h.get(M),C.get(M),1)),ariaLive:"polite",_doctorDisable:"inline-typography",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:M=>(0,P.themeSize)(M)}},y("\u203A","Next month",()=>Ue(1)),y("\xBB","Next year",()=>kt(1))],style:{display:"flex",alignItems:"center",gap:(0,P.themeSpacing)(1),marginBottom:(0,P.themeSpacing)(2)}},T={div:Z.map((M,$e)=>({div:M,_doctorDisable:"inline-typography",style:{textAlign:"center",fontSize:ke=>(0,P.themeSize)(ke,"decrease-1"),fontWeight:"bold",color:ke=>(0,P.themeColor)(ke,"shift-7"),paddingBlock:(0,P.themeSpacing)(1)},_key:$e})),role:"row",style:yn()},L={div:M=>xr(M),role:"grid",ariaLabel:"Calendar",onKeyDown:Tr,onMouseLeave:()=>o==="range"&&p.set(null),style:{display:"flex",flexDirection:"column",gap:(0,P.themeSpacing)(.5)}},O=[x,T,L];return n&&O.push(kr()),O.push(wr()),{div:O,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:(0,P.themeSpacing)(70),padding:(0,P.themeSpacing)(3),borderRadius:M=>(0,P.themeSpacing)((0,P.themeDensity)(M)*2),backgroundColor:M=>(0,P.themeColor)(M,"inherit"),color:M=>(0,P.themeColor)(M,"text"),outline:M=>`1px solid ${(0,P.themeColor)(M,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}}}function xr(y){let x=new Date(h.get(y),C.get(y),1),T=C.get(y),L=Io(x,u),O=[];for(let M=0;M<6;M++){let $e=[];for(let ke=0;ke<7;ke++){let _t=wt(L,M*7+ke);$e.push(Er(_t,T,y))}O.push({div:$e,role:"row",style:yn(),_key:M})}return O}function Er(y,x,T){let L=He(y),O=Et(y,T),M=Oe(y,T),$e=y.getMonth()!==x,ke=Gt(y,v.get(T)),_t=Gt(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:ke?0:-1,ariaSelected:O,ariaDisabled:L,disabled:L,ariaLabel:q.format(y),dataDate:Po(y),onClick:(ne,Dr)=>Ee(y,Dr),onMouseEnter:()=>o==="range"&&p.set(y),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,P.themeSpacing)(1),fontSize:ne=>(0,P.themeSize)(ne),fontFamily:"inherit",opacity:L?.35:$e?.5:1,backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):M?(0,P.themeColor)(ne,"hover",l.get(ne)):"transparent",color:ne=>O?(0,P.themeColor)(ne,"shift-0",l.get(ne)):(0,P.themeColor)(ne,"text"),outline:_t?ne=>`1px solid ${(0,P.themeColor)(ne,"shift-6",l.get(ne))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:ne=>O?(0,P.themeColor)(ne,"shift-7",l.get(ne)):(0,P.themeColor)(ne,"shift-3",l.get(ne))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:ne=>S(ne,l.get(ne))}},_key:Po(y)}}function kr(){let y=(x,T,L)=>({select:Array.from({length:x},(O,M)=>({option:String(M).padStart(2,"0"),value:String(M),selected:$e=>T.get($e)===M,_key:M})),ariaLabel:L,onChange:O=>{T.set(Number(O.target.value)),Ge()},style:ua()});return{div:[y(24,b,"Hour"),{span:":",_doctorDisable:"inline-typography",style:{fontWeight:"bold"}},y(60,k,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,P.themeSpacing)(1),marginTop:(0,P.themeSpacing)(3)}}}function wr(){let y=(x,T)=>({button:x,type:"button",onClick:(L,O)=>T(O),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>(0,P.themeSize)(L,"decrease-1"),color:L=>(0,P.themeColor)(L,"muted",l.get(L)),padding:(0,P.themeSpacing)(1)}});return{div:[y("Today",x=>{let T=new Date;v.set(fe(T)),at(T),it(x)}),y("Clear",()=>{d.set(o==="range"?[null,null]:null),p.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,P.themeSpacing)(2),paddingTop:(0,P.themeSpacing)(2),borderTop:x=>`1px solid ${(0,P.themeColor)(x,"border")}`}}}function Tr(y,x){let T=y,L=v.get(),O=null;switch(T.key){case"ArrowLeft":O=wt(L,-1);break;case"ArrowRight":O=wt(L,1);break;case"ArrowUp":O=wt(L,-7);break;case"ArrowDown":O=wt(L,7);break;case"Home":O=Io(L,u);break;case"End":O=wt(Io(L,u),6);break;case"PageUp":O=Do(L,T.shiftKey?-12:-1);break;case"PageDown":O=Do(L,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),Ee(L,x);return;default:return}T.preventDefault(),v.set(O),at(O),it(x)}}function yn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,P.themeSpacing)(.5)}}function ma(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),color:r=>(0,P.themeColor)(r,"muted"),width:(0,P.themeSpacing)(7),height:(0,P.themeSpacing)(7),borderRadius:(0,P.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,P.themeColor)(r,"shift-3")}}}function ua(){return{fontFamily:"inherit",fontSize:r=>(0,P.themeSize)(r),padding:(0,P.themeSpacing)(1),borderRadius:(0,P.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${(0,P.themeColor)(r,"border-strong")}`,backgroundColor:r=>(0,P.themeColor)(r,"inherit"),color:r=>(0,P.themeColor)(r,"text")}}var bn=require("@domphy/core"),mt=require("@domphy/theme");function da(r={}){var n;let o=(0,bn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${(0,mt.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,mt.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,mt.themeSize)(e,"inherit"),color:e=>(0,mt.themeColor)(e,"text",o.get(e))}}}}var Oo=require("@domphy/core"),N=require("@domphy/theme");function pa(r={}){var s,t;let{duration:o=240}=r,n=(0,Oo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Oo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,N.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,N.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,N.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,N.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*4),height:(0,N.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,N.themeSpacing)(2),height:(0,N.themeSpacing)(2),flexShrink:0,marginTop:(0,N.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,N.themeSpacing)(.5)} solid ${(0,N.themeColor)(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),boxShadow:a=>S(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),paddingBottom:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3)}}}}var vn=require("@domphy/core"),Ae=require("@domphy/theme");var Ut=0;function lo(){Ut++,Ut===1&&(document.body.style.overflow="hidden")}function At(){Ut=Math.max(0,Ut-1),Ut===0&&(document.body.style.overflow="")}var Sn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ha(r,o){let{state:n,onDismiss:e}=o,s=null,t=!1,a=!1,i=null,m=r.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(At(),a=!1),s==null||s.focus(),s=null},l=h=>{if(h.key!=="Tab")return;let C=Array.from(m.querySelectorAll(Sn)).filter(b=>!b.closest("[aria-hidden='true']")&&b.offsetParent!==null);if(!C.length){h.preventDefault();return}let v=C[0],p=C[C.length-1];h.shiftKey?(document.activeElement===v||document.activeElement===m)&&(h.preventDefault(),p.focus()):document.activeElement===p&&(h.preventDefault(),v.focus())},c=h=>{h.preventDefault(),yt(n,e)};m.addEventListener("cancel",c);let d=h=>{if(h)t=!1,i&&(clearTimeout(i),i=null),s=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(lo(),a=!0),m.addEventListener("keydown",l),requestAnimationFrame(()=>{m.style.opacity="1";let C=m.querySelector(Sn);C==null||C.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",l),!m.open){u();return}i=setTimeout(()=>{i=null,t&&u()},350)}},f=ct(n,d);return{requestClose:()=>yt(n,e),onTransitionEnd:h=>{t&&h.target===m&&h.propertyName==="opacity"&&u()},update(h){e=h.onDismiss,h.state!==n&&(f(),n=h.state,f=ct(n,d,!1))},destroy(){i&&(clearTimeout(i),i=null),f(),m.removeEventListener("cancel",c),a&&(At(),a=!1),m.removeEventListener("keydown",l),s==null||s.focus(),s=null}}}function fa(r={}){let{color:o="neutral",open:n=!1,labelledBy:e,describedBy:s,onDismiss:t}=r,a=$t(n);return z(E({_onInsert:i=>{i.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,vn.behavior)("dialog",ha,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:s,onClick:(i,m)=>{var c;if(i.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();i.clientX>=u.left&&i.clientX<=u.right&&i.clientY>=u.top&&i.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(i,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(i)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:i=>(0,Ae.themeSize)(i,"inherit"),color:i=>(0,Ae.themeColor)(i,"shift-10",o),backgroundColor:i=>(0,Ae.themeColor)(i,"inherit",o),border:"none",borderRadius:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*2),padding:i=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(i)*3),boxShadow:_("high"),"&::backdrop":{backgroundColor:i=>(0,Ae.themeColor)(i,"shift-2","neutral"),opacity:.75}}})}var Cn=require("@domphy/core"),ut=require("@domphy/theme");function ga(r={}){var n;let o=(0,Cn.toState)((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:(0,ut.themeSpacing)(2),fontSize:e=>(0,ut.themeSize)(e,"inherit"),backgroundColor:e=>(0,ut.themeColor)(e),color:e=>(0,ut.themeColor)(e,"text",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ut.themeColor)(e,"border-strong",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var xn=require("@domphy/core"),we=require("@domphy/theme");var Lo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},En={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Bt=r=>r==="left"||r==="right";function kn(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function ya(r,o){let{state:n,onDismiss:e,placement:s,size:t}=o,a=r.domElement;a.setAttribute("aria-modal","true");let i=p=>{p.preventDefault(),yt(n,e)};a.addEventListener("cancel",i);let m=(p,b)=>{let g=(p==="start"||p==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),D=kn(p,g),w=b!=null?b:Bt(D)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64);return a.style.margin=En[D],a.style.width=Bt(D)?w:"100dvw",a.style.height=Bt(D)?"100dvh":w,D},u=m(s,t),l=!1,c=!1,d=null,f=()=>{d=null,l&&(l=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(At(),c=!1))},h=p=>{p.target===a&&p.propertyName==="transform"&&f()};a.addEventListener("transitionend",h);let C=p=>{if(p)l=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(lo(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(l=!0,a.style.transform=Lo[u],!a.open){f();return}d=setTimeout(f,350)}},v=ct(n,C);return{requestClose:()=>yt(n,e),update(p){e=p.onDismiss,p.state!==n&&(v(),n=p.state,v=ct(n,C,!1)),(p.placement!==s||p.size!==t)&&(s=p.placement,t=p.size,u=m(s,t),n.get()||(a.style.transform=Lo[u]))},destroy(){d&&(clearTimeout(d),d=null),v(),a.removeEventListener("cancel",i),a.removeEventListener("transitionend",h),c&&(At(),c=!1)}}}function ba(r={}){let{color:o="neutral",open:n=!1,onDismiss:e,placement:s="end",size:t}=r,a=$t(n),i=kn(s,!1),m=Bt(i)?(0,we.themeSpacing)(80):(0,we.themeSpacing)(64),u=t!=null?t:m;return z(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,xn.behavior)("drawer",ya,{state:a,onDismiss:e,placement:s,size:t})),{onClick:(l,c)=>{var h;if(l.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();l.clientX>=d.left&&l.clientX<=d.right&&l.clientY>=d.top&&l.clientY<=d.bottom||(h=c.getBehavior("drawer"))==null||h.requestClose()},style:{transform:Lo[i],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:l=>(0,we.themeSize)(l,"inherit"),color:l=>(0,we.themeColor)(l,"shift-10",o),backgroundColor:l=>(0,we.themeColor)(l,"inherit",o),border:"none",padding:l=>(0,we.themeSpacing)((0,we.themeDensity)(l)*3),margin:En[i],width:Bt(i)?u:"100dvw",height:Bt(i)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:_("high"),"&::backdrop":{backgroundColor:l=>(0,we.themeColor)(l,"shift-2","neutral"),opacity:.75}}})}var wn=require("@domphy/core"),so=require("@domphy/theme");function Sa(r={}){var n;let o=(0,wn.toState)((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=>(0,so.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,so.themeColor)(e,"shift-10",o.get(e))}}}var Tn=require("@domphy/core"),St=require("@domphy/theme");function va(r={}){var n;let o=(0,Tn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,St.themeSpacing)(3),paddingBlock:(0,St.themeSpacing)(12),paddingInline:(0,St.themeSpacing)(6),textAlign:"center",color:e=>(0,St.themeColor)(e,"muted",o.get(e)),"& > :first-child":{color:e=>(0,St.themeColor)(e,"shift-5",o.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,St.themeColor)(e,"text",o.get(e))}}}}var zo="errorBoundaryOriginal";function Ca(r){var n;let o=r.getMetadata(zo);if(typeof o=="function"){(n=r._childrenRelease)==null||n.call(r),r._setupFunctionChildren(o);return}if(o!=null){r.children.update(Array.isArray(o)?o:[o]);return}r.children.update([])}function xa(r={}){return{_onSchedule:(o,n)=>{o.getMetadata(zo)===void 0&&o.setMetadata(zo,n[o.tagName])},_onError:(o,n)=>{var t,a;(t=r.onError)==null||t.call(r,n);let e=()=>Ca(o),s=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([s])}}}var Dn=require("@domphy/core"),dt=require("@domphy/theme");var Ea={small:8,medium:10,large:14};function ka(r={}){var e,s;let o=(0,Dn.toState)((e=r.color)!=null?e:"primary","color"),n=(0,dt.themeSpacing)(Ea[(s=r.size)!=null?s:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,dt.themeSize)(t,"inherit"),backgroundColor:t=>(0,dt.themeColor)(t,"shift-13",o.get(t)),color:t=>(0,dt.themeColor)(t,"shift-0","neutral"),boxShadow:_("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-14",o.get(t)),boxShadow:_("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,dt.themeColor)(t,"shift-15",o.get(t)),boxShadow:_("low")},"&:focus-visible":{boxShadow:t=>`${_("medium")}, ${S(t,o.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Pn=require("@domphy/core"),et=require("@domphy/theme");function wa(r={}){var n;let o=(0,Pn.toState)((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:(0,et.themeSpacing)(2),marginInline:0,marginTop:(0,et.themeSpacing)(3),marginBottom:(0,et.themeSpacing)(3),color:e=>(0,et.themeColor)(e,"text",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,et.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,et.themeSize)(e,"decrease-1"),color:e=>(0,et.themeColor)(e,"muted",o.get(e)),lineHeight:1.45}}}}var In=require("@domphy/core"),K=require("@domphy/theme");function Ta(r={}){var s;let{layout:o="horizontal"}=r,n=(0,In.toState)((s=r.color)!=null?s:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),fontSize:t=>(0,K.themeSize)(t,"inherit"),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t)),color:t=>(0,K.themeColor)(t,"text",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,K.themeSpacing)(4),rowGap:(0,K.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,K.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*2),color:t=>(0,K.themeColor)(t,"text",n.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,K.themeSpacing)((0,K.themeDensity)(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(${(0,K.themeSpacing)(2)} * -1)`,fontSize:t=>(0,K.themeSize)(t,"decrease-1"),color:t=>(0,K.themeColor)(t,"text",n.get(t))}}}}var co=require("@domphy/theme");function Da(r={}){let{columns:o=1,gap:n=4,align:e}=r;return{style:E({display:"grid",gridTemplateColumns:typeof o=="number"?`repeat(${o}, minmax(0, 1fr))`:o,gap:s=>(0,co.themeSpacing)((0,co.themeDensity)(s)*n)},e?{alignItems:e}:{})}}var On=require("@domphy/core"),Tt=require("@domphy/theme"),Pa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ia(r={}){var e;let o=(0,On.toState)((e=r.color)!=null?e:"neutral","color"),n=r.size;return{_onInsert:s=>{["h1","h2","h3","h4","h5","h6"].includes(s.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:s=>(0,Tt.themeColor)(s,"shift-11",o.get(s)),marginTop:0,marginBottom:(0,Tt.themeSpacing)(2),fontSize:s=>{if(n!==void 0)return(0,Tt.themeSize)(s,n);let t=Pa[s.elementNode.tagName]||"inherit";return(0,Tt.themeSize)(s,t)}}}}var Ln=require("@domphy/core"),Ht=require("@domphy/theme");function Oa(r={}){var n;let o=(0,Ln.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,Ht.themeSpacing)(3),marginBottom:(0,Ht.themeSpacing)(3),backgroundColor:e=>(0,Ht.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ht.themeColor)(e,"text",o.get(e))}}}var zn=require("@domphy/core"),Dt=require("@domphy/theme");function La(r={}){var n;let o=(0,zn.toState)((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:(0,Dt.themeSpacing)(4),height:(0,Dt.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Dt.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Dt.themeColor)(e,"text",o.get(e))}}}var Rn=require("@domphy/core"),Jt=require("@domphy/theme");function za(r={}){var n;let o=(0,Rn.toState)((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:(0,Jt.themeSpacing)(2),backgroundColor:e=>(0,Jt.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Jt.themeColor)(e,"text",o.get(e))}}}var Ro=require("@domphy/core"),X=require("@domphy/theme");function Ra(r={}){var e,s;let o=(0,Ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ro.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,X.themeSize)(t,"inherit"),color:t=>(0,X.themeColor)(t,"text",o.get(t)),display:"inline-flex",position:"relative",width:(0,X.themeSpacing)(6),height:(0,X.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,X.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,X.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,X.themeColor)(t,"text",o.get(t)),width:(0,X.themeSpacing)(4),height:(0,X.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,X.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,X.themeSpacing)(.5)} solid ${(0,X.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,X.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,X.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,X.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,X.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,X.themeSpacing)(1.5),boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,X.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Vn=require("@domphy/core"),se=require("@domphy/theme");function Va(r={}){var n;let o=(0,Vn.toState)((n=r.color)!=null?n:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,se.themeSize)(e,"inherit"),color:e=>(0,se.themeColor)(e,"text",o.get(e)),paddingBlock:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),paddingInline:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1),blockSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),inlineSize:e=>(0,se.themeSpacing)(6+(0,se.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,se.themeSpacing)((0,se.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,se.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,se.themeColor)(e,"border-strong","neutral")}`}}}}var Vo=require("@domphy/core"),ce=require("@domphy/theme");function Ma(r={}){var s,t;let{mode:o="datetime-local"}=r,n=(0,Vo.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Vo.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:a=>(0,ce.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,ce.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,ce.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong",n.get(a))}`,borderRadius:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*1.5),paddingInline:a=>(0,ce.themeSpacing)((0,ce.themeDensity)(a)*3),height:a=>(0,ce.themeSpacing)(6+(0,ce.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ce.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,ce.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,ce.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ce.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,ce.themeSpacing)(.5)} solid ${(0,ce.themeColor)(a,"shift-6","error")}`}}}}var Mo=require("@domphy/core"),j=require("@domphy/theme");function _a(r={}){var e,s;let o=(0,Mo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Mo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,j.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,j.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1.5),height:t=>(0,j.themeSpacing)(6+(0,j.themeDensity)(t)*2),paddingInline:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,j.themeSpacing)((0,j.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,j.themeSpacing)(1),height:(0,j.themeSpacing)(6),paddingInline:(0,j.themeSpacing)(2),cursor:"pointer",color:t=>(0,j.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,j.themeColor)(t,"surface",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,j.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,j.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,j.themeColor)(t,"shift-3","neutral")}}}}var _o=require("@domphy/core"),ae=require("@domphy/theme");function Na(r={}){var e,s;let o=(0,_o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,_o.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,ae.themeSpacing)(10),paddingInlineStart:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),paddingInlineEnd:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),paddingBlock:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1),borderRadius:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*1.5),fontSize:t=>(0,ae.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,ae.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",o.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,ae.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,ae.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,ae.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,ae.themeColor)(t,"muted","neutral")}}}}var No=require("@domphy/theme");function $a(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,No.themeSpacing)(2),"& > *":{minWidth:`${(0,No.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let i=n(),m=a.target,u=i.indexOf(m);m.value&&u<i.length-1&&i[u+1].focus()},s=a=>{let i=n(),m=a.target,u=i.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&i[u-1].focus(),a.key==="ArrowLeft"&&u>0&&i[u-1].focus(),a.key==="ArrowRight"&&u<i.length-1&&i[u+1].focus()},t=a=>{var d,f,h;a.preventDefault();let i=(f=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?f:"",m=n(),u=m.indexOf(a.target),l=u===-1?0:u;[...i].forEach((C,v)=>{let p=m[l+v];p&&(p.value=C,p.dispatchEvent(new Event("input",{bubbles:!0})),p.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(l+i.length-1,m.length-1);(h=m[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",s),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",s),o.removeEventListener("paste",t)})}}}var vt=require("@domphy/core"),ge=require("@domphy/theme");var Aa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ba='<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>',Ha=["name","value","onInput","disabled","required"];function Mn(r){if(r!=null)return typeof r=="function"?r:(0,vt.isState)(r)?o=>r.get(o):r}function Fa(r={}){var t,a;let o=(0,vt.toState)((t=r.color)!=null?t:"neutral","color"),n=(0,vt.toState)((a=r.accentColor)!=null?a:"primary","accentColor"),e=(0,vt.toState)(!1),s={};return{_onInsert:i=>{i.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(i,m)=>{let u=m;for(let l of Ha)u[l]!==void 0&&(s[l]=u[l],delete u[l])},_onInit:i=>{var C,v,p,b,k,g,D;let m=(C=r.name)!=null?C:s.name,u=Mn((v=r.value)!=null?v:s.value),l=(p=r.onInput)!=null?p:s.onInput,c=Mn((b=r.disabled)!=null?b:s.disabled),d=(k=r.required)!=null?k:s.required,f=z(E(E(E(E(E({input:null,type:w=>e.get(w)?"text":"password",ariaLabel:(g=r.ariaLabel)!=null?g:"Password",autocomplete:(D=r.autocomplete)!=null?D:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),l!=null?{onInput:l}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),h={button:w=>(0,vt.rawHtml)(e.get(w)?Ba:Aa),type:"button",ariaLabel:w=>e.get(w)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};i.children.insert(f),i.children.insert(h)},style:{display:"flex",alignItems:"center",gap:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingBlock:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1),paddingInline:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*3),borderRadius:i=>(0,ge.themeSpacing)((0,ge.themeDensity)(i)*1.5),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ge.themeColor)(i,"border-strong",o.get(i))}`,color:i=>(0,ge.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,ge.themeColor)(i,"inherit",o.get(i)),fontSize:i=>(0,ge.themeSize)(i,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:i=>`1px solid ${(0,ge.themeColor)(i,"shift-5",n.get(i))}`},"&:focus-within":{boxShadow:i=>S(i,n.get(i))}}}}var $o=require("@domphy/core"),be=require("@domphy/theme");function Ka(r={}){var e,s;let o=(0,$o.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,$o.toState)((s=r.accentColor)!=null?s:"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=>(0,be.themeSize)(t,"inherit"),color:t=>(0,be.themeColor)(t,"text",o.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,be.themeSpacing)(6),height:(0,be.themeSpacing)(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 ${(0,be.themeColor)(t,"border-strong",o.get(t))}`,color:t=>(0,be.themeColor)(t,"text",o.get(t)),width:(0,be.themeSpacing)(4),height:(0,be.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,be.themeColor)(t,"hover",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,be.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,be.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,be.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>S(t,n.get(t))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,be.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Ao=require("@domphy/core"),Te=require("@domphy/theme");function ja(r={}){var e,s;let o=(0,Ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ao.toState)((s=r.accentColor)!=null?s:"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:(0,Te.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,Te.themeSpacing)(1.5),borderRadius:(0,Te.themeSpacing)(999),backgroundColor:t=>(0,Te.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,Te.themeSpacing)(4),height:(0,Te.themeSpacing)(4),borderRadius:(0,Te.themeSpacing)(999),border:"none",marginTop:`calc((${(0,Te.themeSpacing)(1.5)} - ${(0,Te.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,Te.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,Te.themeColor)(t,"shift-10",n.get(t))},borderRadius:(0,Te.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Bo=require("@domphy/core"),me=require("@domphy/theme");function Wa(r={}){var e,s;let o=(0,Bo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Bo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:{fontFamily:"inherit",fontSize:t=>(0,me.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,me.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,me.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong",o.get(t))}`,borderRadius:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1.5),minWidth:(0,me.themeSpacing)(32),paddingInline:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*3),paddingBlock:t=>(0,me.themeSpacing)((0,me.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:t=>(0,me.themeColor)(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,me.themeColor)(t,"shift-5",n.get(t))}`},"&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,me.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,me.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,me.themeColor)(t,"border-strong","neutral")}`}}}}var _n=require("@domphy/core"),ue=require("@domphy/theme");function qa(r={}){var n;let o=(0,_n.toState)((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=>(0,ue.themeSize)(e,"inherit"),backgroundColor:e=>(0,ue.themeColor)(e,"inherit"),color:e=>(0,ue.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,ue.themeSpacing)(9),height:(0,ue.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,ue.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,ue.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>S(e,o.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,ue.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,ue.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,ue.themeSpacing)(3),height:(0,ue.themeSpacing)(3),borderRadius:(0,ue.themeSpacing)(999),left:(0,ue.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,ue.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,ue.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,ue.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,ue.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Ho=require("@domphy/core"),W=require("@domphy/theme");function Ya(r={}){var s,t;let{type:o="text"}=r,n=(0,Ho.toState)((s=r.color)!=null?s:"neutral","color"),e=(0,Ho.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,W.themeSpacing)(10),paddingInline:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*3),paddingBlock:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1),borderRadius:a=>(0,W.themeSpacing)((0,W.themeDensity)(a)*1.5),fontSize:a=>(0,W.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong",n.get(a))}`,color:a=>(0,W.themeColor)(a,"text",n.get(a)),backgroundColor:a=>(0,W.themeColor)(a,"inherit",n.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,W.themeColor)(a,"shift-7")},"&:not(:placeholder-shown)":{color:a=>(0,W.themeColor)(a,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,W.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,W.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,W.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,W.themeColor)(a,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,W.themeSpacing)(.5)} solid ${(0,W.themeColor)(a,"shift-6","warning")}`}}}}var Nn=require("@domphy/core"),De=require("@domphy/theme");function Ga(r={}){var n;let o=(0,Nn.toState)((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=>(0,De.themeSize)(e,"inherit"),color:e=>(0,De.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,De.themeColor)(e,"border-strong",o.get(e))}`}}}var Fo=require("@domphy/core"),Ct=require("@domphy/theme");function Ua(r={}){var e,s;let o=(0,Fo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Fo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,Ct.themeSpacing)(2),fontSize:t=>(0,Ct.themeSize)(t,"inherit"),color:t=>(0,Ct.themeColor)(t,"text",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,Ct.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,Ct.themeColor)(t,"muted","neutral")}}}}var Ko=require("@domphy/core"),tt=require("@domphy/theme");function Ja(r={}){var e,s;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,Ko.toState)((s=r.accentColor)!=null?s:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},onClick:(t,a)=>{let i=a.domElement;(i!=null&&i.hasAttribute("disabled")||(i==null?void 0:i.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},style:{fontSize:t=>(0,tt.themeSize)(t,"inherit"),backgroundColor:t=>(0,tt.themeColor)(t),color:t=>(0,tt.themeColor)(t,"shift-13",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,tt.themeColor)(t,"shift-13",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,tt.themeColor)(t,"shift-14",o.get(t)),textDecoration:"underline"},borderRadius:(0,tt.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,n.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,tt.themeColor)(t,"muted","neutral")}}}}var $n=require("@domphy/core"),I=require("@domphy/theme");var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Za={small:.5,medium:1,large:1.5};function Qa(r={}){var i,m,u;let o=(i=r.variant)!=null?i:"outline",n=(0,$n.toState)((m=r.color)!=null?m:o==="ghost"?"neutral":"primary","color"),e=(u=r.size)!=null?u:"medium",s=Nt[e];if(o==="ghost"){let l=Za[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,I.themeSize)(c,s),textDecoration:"none",paddingBlock:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),paddingInline:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*l),borderRadius:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,I.themeSpacing)((0,I.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,I.themeColor)(c,"text",n.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"hover",n.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,I.themeColor)(c,"text",n.get(c)),backgroundColor:c=>(0,I.themeColor)(c,"increase-2",n.get(c))},"&:focus-visible":{boxShadow:c=>S(c,n.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,I.themeColor)(c,"border-strong","neutral")}}}}let t=o==="solid",a=Xa[e];return z(E({_onInsert:l=>{l.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:l=>(0,I.themeSize)(l,s),textDecoration:"none",paddingBlock:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.block),paddingInline:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*a.inline),borderRadius:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:l=>(0,I.themeSpacing)((0,I.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":l=>`1px solid ${(0,I.themeColor)(l,"border-strong",n.get(l))}`,color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-13",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-13",n.get(l)):(0,I.themeColor)(l,"inherit",n.get(l)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:l=>t?(0,I.themeColor)(l,"shift-0","neutral"):(0,I.themeColor)(l,"shift-14",n.get(l)),backgroundColor:l=>t?(0,I.themeColor)(l,"shift-14",n.get(l)):(0,I.themeColor)(l,"hover",n.get(l))},"&:active:not([aria-disabled=true])":{backgroundColor:l=>t?(0,I.themeColor)(l,"shift-15",n.get(l)):(0,I.themeColor)(l,"increase-2",n.get(l))},"&:focus-visible":{boxShadow:l=>S(l,n.get(l))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:l=>(0,I.themeColor)(l,"shift-2","neutral"),outline:l=>`1px solid ${(0,I.themeColor)(l,"border-strong","neutral")}`,color:l=>(0,I.themeColor)(l,"muted","neutral")}}})}var An=require("@domphy/core"),B=require("@domphy/theme");function ei(r={}){var n;let o=(n=r.color)!=null?n:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,B.themeColor)(e,"inherit",o),color:e=>(0,B.themeColor)(e,"text",o)}}}function ti(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*2),paddingBlock:n=>(0,B.themeSpacing)(o?1:(0,B.themeDensity)(n)*2),paddingInline:n=>(0,B.themeSpacing)((0,B.themeDensity)(n)*3),fontSize:n=>(0,B.themeSize)(n,"inherit"),color:n=>(0,B.themeColor)(n,"text")}}}function oi(r={}){var s,t;let o=(0,An.toState)((s=r.color)!=null?s:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*2),paddingBlock:a=>(0,B.themeSpacing)(e?1:(0,B.themeDensity)(a)*2),paddingInline:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*3),fontSize:a=>(0,B.themeSize)(a,"inherit"),color:a=>(0,B.themeColor)(a,"text",o.get(a)),borderRadius:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"hover",o.get(a))},"&:active:not([disabled])":{backgroundColor:a=>(0,B.themeColor)(a,"increase-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,B.themeColor)(a,"shift-3",n),color:a=>(0,B.themeColor)(a,"shift-12",n)},"&:focus-visible":{boxShadow:a=>S(a,n)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Bn=require("@domphy/core"),Ve=require("@domphy/theme");function ni(r={}){var n;let o=(0,Bn.toState)((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=>(0,Ve.themeSize)(e,"inherit"),color:e=>(0,Ve.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Ve.themeColor)(e,"inherit",o.get(e)),height:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(e)*(1.5/1.5))}}}var mo=require("@domphy/core"),G=require("@domphy/theme");function ri(r={items:[]}){var l;let{items:o=[],selectable:n=!0,color:e="neutral",accentColor:s="primary"}=r,t=(0,mo.toState)((l=r.activeKey)!=null?l:null),a=r.activeKey!==void 0,i=(c,d)=>{let f=c.nodeId;return d.items.map((h,C)=>{var p;let v=(p=h.key)!=null?p:C;return z(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:v,type:"button",id:`menuitem${f}${v}`,role:"menuitem"},d.selectable?{ariaCurrent:b=>d.activeKey.get(b)===v||void 0}:{}),{onClick:()=>{var b;d.selectable&&d.activeKey.set(v),(b=h.onClick)==null||b.call(h)},onKeyDown:b=>{var q;let k=b.key;if(k==="Enter"||k===" "){b.preventDefault(),b.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(k))return;b.preventDefault();let g=d.items.map((ve,Ie)=>{var Z;return(Z=ve.key)!=null?Z:Ie}),D=g.indexOf(v),w=D;k==="ArrowDown"?w=(D+1)%g.length:k==="ArrowUp"?w=(D-1+g.length)%g.length:k==="Home"?w=0:k==="End"&&(w=g.length-1),(q=document.getElementById(`menuitem${f}${g[w]}`))==null||q.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,G.themeSpacing)(2),width:"100%",fontSize:b=>(0,G.themeSize)(b,"inherit"),height:b=>(0,G.themeSpacing)(6+(0,G.themeDensity)(b)*2),paddingInline:b=>(0,G.themeSpacing)((0,G.themeDensity)(b)*3),border:"none",outline:"none",color:b=>(0,G.themeColor)(b,"text",d.color),backgroundColor:b=>(0,G.themeColor)(b,"inherit",d.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:b=>(0,G.themeColor)(b,"hover",d.color)},"&[aria-current=true]":{backgroundColor:b=>(0,G.themeColor)(b,"shift-3",d.accentColor),color:b=>(0,G.themeColor)(b,"shift-13",d.accentColor)},"&:focus-visible":{boxShadow:b=>S(b,d.accentColor)}}})})},m=(c,d)=>{let f=d;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),f=h,f.items.length!==0&&c.children.update(i(c,f))}}},u={items:o,activeKey:t,activeKeyIsCallerOwned:a,selectable:n,color:e,accentColor:s};return z(E({role:"menu",dataTone:"shift-0",_onSchedule:(c,d)=>{o.length!==0&&(d[c.tagName]=i(c,u))}},(0,mo.behavior)("menu",m,u)),{style:{display:"flex",flexDirection:"column",paddingBlock:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),paddingInline:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),fontSize:c=>(0,G.themeSize)(c,"inherit"),backgroundColor:c=>(0,G.themeColor)(c,"inherit",e),color:c=>(0,G.themeColor)(c,"text",e),borderRadius:c=>(0,G.themeSpacing)((0,G.themeDensity)(c)*2),outline:c=>`1px solid ${(0,G.themeColor)(c,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:_("medium")}})}var Fn=require("@domphy/core");var Hn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ot=r=>{let o={},n=[];for(let e in r){let s=r[e];e==="x"?n.push(`translateX(${typeof s=="number"?`${s}px`:s})`):e==="y"?n.push(`translateY(${typeof s=="number"?`${s}px`:s})`):e==="scale"?n.push(`scale(${s})`):e==="rotate"?n.push(`rotate(${typeof s=="number"?`${s}deg`:s})`):o[e]=s}return n.length&&(o.transform=n.join(" ")),o};function jo(r={}){var o,n,e,s;return{duration:(o=r.duration)!=null?o:300,delay:(n=r.delay)!=null?n:0,easing:(e=r.easing)!=null?e:"ease",iterations:(s=r.iterations)!=null?s:1,fill:"both"}}function Wo(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(r){return!1}}function ai(r,o){let n=r.domElement,e=o,s,t=i=>{s==null||s(),s=void 0,!(!n||!Hn(i))&&(s=i.addListener(m=>{Wo()?Object.assign(n.style,ot(m)):typeof n.animate=="function"&&n.animate([ot(m)],jo(e.transition))}))},a=(i,m)=>{if(!n)return;let u=Hn(i.animate)?i.animate.get():i.animate;if(Wo()){u?Object.assign(n.style,ot(u)):m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial));return}if(typeof n.animate=="function")if(u){let l=m==="enter"&&i.initial?[ot(i.initial),ot(u)]:[ot(u)];n.animate(l,jo(i.transition))}else m==="enter"&&i.initial&&Object.assign(n.style,ot(i.initial))};return a(o,"enter"),t(o.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(i){e=i,a(i,"update"),t(i.animate)},destroy(){s==null||s()}}}function ii(r={}){return z(E({},(0,Fn.behavior)("motion",(o,n)=>ai(o,n),r)),{_onBeforeRemove:(o,n)=>{var a,i;let e=o.domElement,s=o.getBehavior("motion"),t=(a=s==null?void 0:s.getExit())!=null?a:r.exit;if(!e||!t||typeof e.animate!="function")return n();if(Wo())return Object.assign(e.style,ot(t)),n();e.animate([ot(t)],jo((i=s==null?void 0:s.getTransition())!=null?i:r.transition)).finished.then(n,n)}})}var Kn=require("@domphy/core"),Pt=require("@domphy/theme");function li(r={}){var n;let o=(0,Kn.toState)((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=>(0,Pt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Pt.themeColor)(e),color:e=>(0,Pt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Pt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var It=require("@domphy/core"),te=require("@domphy/theme");function si(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),s=Math.min(o-1,r+1);for(let t=e;t<=s;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ci(r,o,n,e){if((0,It.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,It.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function jn(r,o){let n=r.getMetadata("paginationTotal");return n||(n=(0,It.toState)(o),r.setMetadata("paginationTotal",n)),n}function mi(r){let{total:o,color:n="neutral",accentColor:e="primary"}=r,s={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),height:a=>(0,te.themeSpacing)(6+(0,te.themeDensity)(a)*2),paddingInline:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*2),borderRadius:a=>(0,te.themeSpacing)((0,te.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,te.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,te.themeColor)(a,"shift-13",n),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,te.themeColor)(a,"shift-13",n),backgroundColor:a=>(0,te.themeColor)(a,"hover",n)},"&:focus-visible":{boxShadow:a=>S(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=z(E({},s),{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e),color:a=>(0,te.themeColor)(a,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,te.themeColor)(a,"shift-13",e)}});return z(E({role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let i=ci(a,"paginationPage",r.value,1),m=jn(a,o),u={div:l=>{let c=i.get(l),d=m.get(l),f=[];f.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&i.set(c-1),style:s});let h=0;for(let C of si(c,d))if(C==="...")f.push({span:"\u2026",_key:`ellipsis-${h++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:v=>(0,te.themeSpacing)((0,te.themeDensity)(v)*2),color:v=>(0,te.themeColor)(v,"shift-7",n)}});else{let v=C===c;f.push({button:String(C),_key:`page-${C}`,type:"button",ariaLabel:`Page ${C}`,ariaCurrent:v?"page":void 0,disabled:v,onClick:()=>i.set(C),style:v?t:s})}return f.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&i.set(c+1),style:s}),f},style:{display:"flex",alignItems:"center",gap:(0,te.themeSpacing)(1)}};a.children.insert(u)}},(0,It.behavior)("pagination-total",a=>({update(i){jn(a,i.total).set(i.total)}}),{total:o})),{style:{display:"inline-flex"}})}var Wn=require("@domphy/core"),Ft=require("@domphy/theme");function ui(r={}){var s;let{padding:o=4,divider:n=!1}=r,e=(0,Wn.toState)((s=r.color)!=null?s:"neutral","color");return{style:E({padding:t=>(0,Ft.themeSpacing)((0,Ft.themeDensity)(t)*o)},n?{borderBottom:t=>`1px solid ${(0,Ft.themeColor)(t,"border",e.get(t))}`}:{})}}var qn=require("@domphy/core"),uo=require("@domphy/theme");function di(r={}){var n;let o=(0,qn.toState)((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=>(0,uo.themeSize)(e,"inherit"),color:e=>(0,uo.themeColor)(e,"text",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var Xt=require("@domphy/core"),xt=require("@domphy/theme");function pi(r){if(typeof r.dataTone=="string")return!0;let n=r.$;return n?n.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function hi(r){var c;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,s=(0,Xt.toState)(o),t=(0,Xt.toState)(n),{show:a,hide:i,anchorPartial:m}=Qe({kind:"popover",open:s,onDismiss:r.onDismiss,placement:t,content:r.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>(0,xt.themeColor)(d,"inherit"),color:d=>(0,xt.themeColor)(d,"text"),borderRadius:d=>(0,xt.themeSpacing)((0,xt.themeDensity)(d)*2),outline:d=>`1px solid ${(0,xt.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};return pi(r.content)||((c=r.content).$||(c.$=[]),r.content.$.push(u)),(0,Xt.merge)(m,{ariaHaspopup:"dialog",ariaExpanded:d=>s.get(d),ariaControls:d=>d!=null&&d.elementNode?Re("popover",d.elementNode):void 0,onMouseEnter:(d,f)=>e==="hover"&&a(f),onMouseLeave:(d,f)=>e==="hover"&&i(f),onClick:(d,f)=>{e==="click"&&(s.get()?i(f):a(f))},onKeyDown:(d,f)=>{d.key==="Escape"&&s.get()&&i(f)},onFocus:(d,f)=>e==="hover"&&a(f),onBlur:(d,f)=>{if(e!=="hover")return;let h=d.relatedTarget,v=f.getRoot().domElement.querySelector(`#${Re("popover",f)}`);h&&(v!=null&&v.contains(h))||i(f)}}),m}var Yn=require("@domphy/core"),je=require("@domphy/theme");function qo(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,je.themeSpacing)(6),bordered:s=!0}=r,t=(0,Yn.toState)(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"},i=l=>{var c;return(c=a[t.get(l)])!=null?c:a["bottom-end"]},m=l=>l.includes("start")?e:l.includes("end")?"auto":"50%",u=l=>l.includes("end")?e:l.includes("start")?"auto":"50%";return{style:{fontSize:l=>(0,je.themeSize)(l),backgroundColor:l=>(0,je.themeColor)(l),color:l=>(0,je.themeColor)(l,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,je.themeSpacing)(1.5),height:(0,je.themeSpacing)(1.5),backgroundColor:l=>(0,je.themeColor)(l,"inherit",n),borderWidth:s?"1px":0,borderColor:l=>(0,je.themeColor)(l,"border-strong",n),borderTopStyle:l=>{let c=i(l);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:l=>{let c=i(l);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:l=>{let c=i(l);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:l=>{let c=i(l);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:l=>{let c=i(l);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:l=>{let c=i(l);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:l=>{let c=i(l);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:l=>{let c=i(l),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",f=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${f}) rotate(45deg)`}}}}}var Gn=require("@domphy/core"),Me=require("@domphy/theme");function fi(r={}){var n;let o=(0,Gn.toState)((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=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"text",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2),paddingInline:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*3),borderRadius:e=>(0,Me.themeSpacing)((0,Me.themeDensity)(e)*2)}}}var Yo=require("@domphy/core"),nt=require("@domphy/theme");function gi(r={}){var e,s;let o=(0,Yo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yo.toState)((s=r.accentColor)!=null?s:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,nt.themeSpacing)(2),border:0,borderRadius:(0,nt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),color:t=>(0,nt.themeColor)(t,"text",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,nt.themeColor)(t,"inherit",o.get(t)),borderRadius:(0,nt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,nt.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,nt.themeSpacing)(999),transition:"width 220ms ease"}}}}var pt=require("@domphy/core"),Ot=require("@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>',bi='<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 Un(r,o){var n,e,s;r.onChange=o.onChange,r.readOnly=(n=o.readOnly)!=null?n:!1,r.max=(e=o.max)!=null?e:5,r.color=(s=o.color)!=null?s:"warning",(0,pt.isState)(o.value)?o.value!==r.valueState&&r.valueState.set(o.value.get()):o.value!==void 0&&r.valueState.set(o.value)}function Si(r,o,n,e){let s=a=>{let i=e.get(a);return i>0?i:n.valueState.get(a)},t={button:a=>(0,pt.rawHtml)(o<=s(a)?yi:bi),_key:o,type:"button",ariaLabel:`${o} star${o>1?"s":""}`,onClick:()=>{var i;if(n.readOnly)return;let a=o===n.valueState.get()?0:o;n.valueState.set(a),(i=n.onChange)==null||i.call(n,a),e.set(0)},onMouseEnter:()=>{n.readOnly||e.set(o)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var l,c,d;if(n.readOnly)return;let i=n.valueState.get(),m=i;if(a.key==="ArrowRight"||a.key==="ArrowUp")m=Math.min(n.max,i+1),a.preventDefault();else if(a.key==="ArrowLeft"||a.key==="ArrowDown")m=Math.max(0,i-1),a.preventDefault();else return;n.valueState.set(m),(l=n.onChange)==null||l.call(n,m);let u=m>0?m-1:0;(d=(c=r.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,Ot.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>S(a,n.color)}}};r.children.insert(t)}function Go(r,o,n){let e=r.children.items;for(;e.length>o.max;)r.children.remove(e[e.length-1]);for(let s=e.length+1;s<=o.max;s++)Si(r,s,o,n)}function vi(r={}){var e,s,t,a,i,m,u;let o={valueState:(0,pt.toState)((e=r.value)!=null?e:0),onChange:r.onChange,readOnly:(s=r.readOnly)!=null?s:!1,max:(t=r.max)!=null?t:5,color:(a=r.color)!=null?a:"warning"},n=(0,pt.toState)(0);return z(E({role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,Ot.themeSpacing)(.5),fontSize:l=>(0,Ot.themeSize)(l,"increase-1"),cursor:o.readOnly?"default":"pointer",color:l=>(0,Ot.themeColor)(l,"muted",o.color)}},(0,pt.behavior)("rating",(l,c)=>(Un(o,c),Go(l,o,n),{update(d){Un(o,d),Go(l,o,n)}}),{value:r.value,max:(i=r.max)!=null?i:5,onChange:r.onChange,readOnly:(m=r.readOnly)!=null?m:!1,color:(u=r.color)!=null?u:"warning"})),{_onInit:l=>{Go(l,o,n)}})}var po=require("@domphy/core"),Lt=require("@domphy/theme");function Ci(r={}){var m,u,l;let{size:o=16,thickness:n=.25}=r,e=(0,po.toState)((m=r.value)!=null?m:0,"value"),s=(0,po.toState)((u=r.color)!=null?u:"primary","color"),t=(0,po.toState)((l=r.trackColor)!=null?l:"neutral","trackColor"),a=Math.round((1-n)*100),i=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Lt.themeSpacing)(o),height:(0,Lt.themeSpacing)(o),borderRadius:"50%",color:c=>(0,Lt.themeColor)(c,"shift-9",s.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Lt.themeColor)(c,"shift-9",s.get(c))} ${e.get(c)}%, ${(0,Lt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:i,mask:i}}}var Zt=require("@domphy/theme");function Uo(r={}){let{gap:o=4,align:n="center",justify:e,wrap:s=!1,density:t=!0}=r;return{style:E(E({display:"flex",alignItems:n,gap:t?a=>(0,Zt.themeSpacing)((0,Zt.themeDensity)(a)*o):()=>(0,Zt.themeSpacing)(o)},e?{justifyContent:e}:{}),s?{flexWrap:"wrap"}:{})}}var Jn=require("@domphy/core"),rt=require("@domphy/theme");function xi(r={}){var n;let o=(0,Jn.toState)((n=r.color)!=null?n:"neutral","color");return{style:{overflow:"auto",color:e=>(0,rt.themeColor)(e,"text",o.get(e)),"&::-webkit-scrollbar":{width:(0,rt.themeSpacing)(2),height:(0,rt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-5",o.get(e)),borderRadius:(0,rt.themeSpacing)(999),border:`${(0,rt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,rt.themeColor)(e,"shift-7",o.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,rt.themeColor)(e,"shift-5",o.get(e))} transparent`}}}var zt=require("@domphy/core"),he=require("@domphy/theme");function Xn(r,o,n,e){if((0,zt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,zt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Ei(r,o,n,e){var u;let s=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(s))return;r.preventDefault();let t=o.map((l,c)=>{var d;return(d=l.key)!=null?d:String(c)}),a=t.indexOf(n),i=a;s==="ArrowRight"?i=(a+1)%t.length:s==="ArrowLeft"?i=(a-1+t.length)%t.length:s==="Home"?i=0:s==="End"&&(i=t.length-1),e.set(t[i]);let m=r.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[i])==null||u.focus()}function Zn(r,o,n,e){return r.map((s,t)=>{var m;let a=(m=s.key)!=null?m:String(t);return{button:[typeof s.label=="string"?{span:s.label}:s.label],_key:a,type:"button",role:"radio",ariaChecked:u=>o.get(u)===a,tabIndex:u=>{var c,d;let l=o.get(u);return l===a||l===""&&a===((d=(c=r[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>o.set(a),onKeyDown:u=>Ei(u,r,a,o),style:{cursor:"pointer",fontSize:u=>(0,he.themeSize)(u,"inherit"),height:(0,he.themeSpacing)(6),paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(3),border:"none",borderRadius:(0,he.themeSpacing)(10),color:u=>(0,he.themeColor)(u,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"shift-3",n)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,he.themeColor)(u,"increase-2",n)},"&[aria-checked=true]":{backgroundColor:u=>(0,he.themeColor)(u,"shift-0",e),color:u=>(0,he.themeColor)(u,"shift-10",e),boxShadow:_("low")},"&:focus-visible":{boxShadow:u=>S(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${_("low")}, ${S(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function ki(r={items:[]}){var t,a,i;let{items:o=[],color:n="neutral",accentColor:e="primary"}=r,s={items:o,color:n,accentColor:e};return z(E({role:"radiogroup",_context:{segmented:{value:(0,zt.toState)((i=(a=r.value)!=null?a:(t=o[0])==null?void 0:t.key)!=null?i:"")}},_onSchedule:(m,u)=>{var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=o[0])==null?void 0:c.key)!=null?d:"");u[m.tagName]=Zn(o,l,n,e)}},(0,zt.behavior)("segmented-items",m=>({update(u){var c,d;let l=Xn(m,"segmentedValue",r.value,(d=(c=u.items[0])==null?void 0:c.key)!=null?d:"");m.children.update(Zn(u.items,l,u.color,u.accentColor),!!m.domElement,!0)}}),s)),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,he.themeSpacing)(1),paddingInline:(0,he.themeSpacing)(1),gap:(0,he.themeSpacing)(.5),borderRadius:(0,he.themeSpacing)(10),backgroundColor:m=>(0,he.themeColor)(m,"inherit",n),color:m=>(0,he.themeColor)(m,"text",n)}})}var A=require("@domphy/theme");function wi(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=>(0,A.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,A.themeColor)(e,"text",o),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong",o)}`,borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1.5),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingLeft:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),paddingRight:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*5),backgroundImage:e=>{let s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${(0,A.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(s)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${(0,A.themeSpacing)(2)} center`,backgroundSize:`${(0,A.themeSpacing)(2.5)} ${(0,A.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,A.themeSpacing)(6+(0,A.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{boxShadow:e=>S(e,n)},"& optgroup":{color:e=>(0,A.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,A.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,A.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral")}}}}var ht=require("@domphy/core"),ie=require("@domphy/theme");var Ti=1e3;function Di(r){let o=r.getMetadata("selectBoxTypeahead");return o||(o={buffer:"",timer:null},r.setMetadata("selectBoxTypeahead",o)),o}var Qn=(r,o)=>r.trim().toLowerCase().startsWith(o);function Pi(r){return r?Array.from(r.querySelectorAll("[role=option]")).filter(o=>o.getAttribute("aria-disabled")!=="true"&&!o.hasAttribute("disabled")):[]}function Ii(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:s=!1,multiple:t=!1}=r,a=(0,ht.toState)(r.value),i=(0,ht.toState)(s),{show:m,hide:u,anchorPartial:l}=Qe({kind:"selectBox",open:i,onDismiss:r.onDismiss,placement:(0,ht.toState)(n),content:r.content}),c={onClick:(p,b)=>!t&&u(b),dataTone:"shift-0",style:{backgroundColor:p=>(0,ie.themeColor)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text"),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong")}`,outlineOffset:"-1px",boxShadow:_("medium")}};(0,ht.merge)(r.content,c);let d=p=>({div:b=>{let k=p.state.get(b),g=Array.isArray(k)?k:[k];return p.options.filter(w=>g.includes(w.value)).map(w=>({span:w.label,$:[Yt({color:p.color,removable:p.multiple})],_key:w.value,_onRemove:q=>{let ve=p.state.get(),Z=(Array.isArray(ve)?ve:[ve]).filter(He=>He!==w.value);p.multiple?p.state.set(Z):p.state.set(Z[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}}),f=(p,b)=>({update(k){p.children.update([d(k)])}}),h=p=>i.get()?u(p):m(p),C=(p,b)=>{var Ie,Z,He,re;let k=Di(b);k.timer&&clearTimeout(k.timer),k.buffer+=p.toLowerCase(),k.timer=setTimeout(()=>{k.buffer=""},Ti);let g=k.buffer.length>1&&new Set(k.buffer).size===1,D=g?k.buffer[0]:k.buffer;if(i.get()){let Ee=b.getRoot().domElement,Ge=(Ie=Ee==null?void 0:Ee.querySelector(`#${Re("selectBox",b)}`))!=null?Ie:null,Oe=Pi(Ge).filter(kt=>{var it;return Qn((it=kt.textContent)!=null?it:"",D)});if(!Oe.length)return;let Et=(He=(Z=b.domElement)==null?void 0:Z.ownerDocument)==null?void 0:He.activeElement,at=g&&Et?Oe.indexOf(Et):-1,Ue=Oe[(at+1)%Oe.length];Ue.focus(),(re=Ue.scrollIntoView)==null||re.call(Ue,{block:"nearest"});return}if(t)return;let w=o.filter(Ee=>Qn(Ee.label,D));if(!w.length)return;let q=g?w.findIndex(Ee=>Ee.value===a.get()):-1,ve=w[(q+1)%w.length];a.set(ve.value)},v=z(E({_onInsert:p=>{p.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(p,b)=>{b[p.tagName]=[d({options:o,multiple:t,color:e,state:a})]}},(0,ht.behavior)("selectBoxInner",f,{options:o,multiple:t,color:e,state:a})),{onClick:(p,b)=>h(b),tabindex:0,role:"button",ariaExpanded:p=>i.get(p),ariaHaspopup:"listbox",ariaControls:p=>p!=null&&p.elementNode?Re("selectBox",p.elementNode):void 0,onKeyDown:(p,b)=>{let k=p.key;if(k==="Escape"){u(b);return}if(k==="Enter"||k===" "){p.preventDefault(),h(b);return}if(k==="ArrowDown"&&!i.get()){p.preventDefault(),m(b);return}let g=p;k.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&C(k,b)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:p=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(p)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:p=>`1px solid ${(0,ie.themeColor)(p,"border-strong","neutral")}`,paddingInline:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*2),borderRadius:p=>(0,ie.themeSpacing)((0,ie.themeDensity)(p)*1.5),fontSize:p=>(0,ie.themeSize)(p,"inherit"),color:p=>(0,ie.themeColor)(p,"text",e),backgroundColor:p=>(0,ie.themeColor)(p,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:p=>S(p,e)}}});return(0,ht.merge)(l,v),l}var Pe=require("@domphy/theme");function Oi(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let i=a.value.get(t);return a.multiple?i.includes(e):i===e},onClick:(t,a)=>{let i=a.getContext("select");if(!i)return;let m=i.value,u=m.get();i.multiple?u.includes(e)?m.set(u.filter(l=>l!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,Pe.themeSize)(t,"inherit"),height:t=>(0,Pe.themeSpacing)(6+(0,Pe.themeDensity)(t)*2),paddingInline:t=>(0,Pe.themeSpacing)((0,Pe.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,Pe.themeColor)(t,"text",n),backgroundColor:t=>(0,Pe.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,Pe.themeColor)(t,"hover",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,Pe.themeColor)(t,"shift-6",o),color:t=>(0,Pe.themeColor)(t,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>S(t,o)}}}}var er=require("@domphy/core"),We=require("@domphy/theme");function Li(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,er.toState)((a=r.value)!=null?a:n?[]:null),s={div:i=>{let m=e.get(i);return(Array.isArray(m)?m:[m]).map(l=>({input:null,type:"hidden",name:r.name,value:l==null?"":String(l)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:n?"true":void 0,_context:{select:{value:e,multiple:n}},_onInit:i=>{i.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),i.children.insert(s)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),paddingInline:i=>(0,We.themeSpacing)((0,We.themeDensity)(i)*2),fontSize:i=>(0,We.themeSize)(i,"inherit"),backgroundColor:i=>(0,We.themeColor)(i,"inherit",o),color:i=>(0,We.themeColor)(i,"text",o)}}}var ho=require("@domphy/core"),qe=require("@domphy/theme");function zi(r={}){var s;let o=(0,ho.toState)((s=r.color)!=null?s:"neutral","color"),n={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,ho.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,qe.themeSize)(t),color:t=>(0,qe.themeColor)(t,"text",o.get(t)),height:(0,qe.themeSpacing)(6),display:"block",borderRadius:(0,qe.themeSpacing)(1),backgroundColor:t=>(0,qe.themeColor)(t,"inherit",o.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 0%, ${(0,qe.themeColor)(t,"shift-2",o.get(t))} 50%, ${(0,qe.themeColor)(t,"inherit",o.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var tr=require("@domphy/core"),fo=require("@domphy/theme");function Ri(r={}){var n;let o=(0,tr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,fo.themeSize)(e,"inherit"),color:e=>(0,fo.themeColor)(e,"shift-10",o.get(e))}}}var go=require("@domphy/core"),Ye=require("@domphy/theme"),nr={to:{transform:"rotate(360deg)"}},or=(0,go.hashString)(JSON.stringify(nr));function Vi(r={}){var n;let o=(0,go.toState)((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=>(0,Ye.themeSize)(e),backgroundColor:e=>(0,Ye.themeColor)(e),color:e=>(0,Ye.themeColor)(e,"text",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,Ye.themeSpacing)(6),height:(0,Ye.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,Ye.themeSpacing)(.5)} solid ${(0,Ye.themeColor)(e,"border-strong",o.get(e))}`,borderTopColor:e=>(0,Ye.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${or} 0.7s linear infinite`,[`@keyframes ${or}`]:nr}}}var Kt=require("@domphy/core"),ft=require("@domphy/theme");function Mi(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:s=90}=r;return{_onSchedule:(t,a)=>{(0,Kt.merge)(a,{_context:{splitter:{direction:o,size:(0,Kt.toState)(n),min:e,max:s,panelCount:0}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function _i(r){let o=r.parent;if(!o)return!0;for(let n of o.children.items)if(n instanceof Kt.ElementNode&&n.getMetadata("splitterPanel"))return n===r;return!0}function Ni(){return{_metadata:{splitterPanel:!0},_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",s=a=>{n.style[e]=`${_i(r)?a:100-a}%`};s(o.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let t=o.size.addListener(s);r.addHook("Remove",()=>{var a;o.panelCount=Math.max(0,((a=o.panelCount)!=null?a:1)-1),t()})}}}function $i(){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 s=o.size.addListener(m=>{n.setAttribute("aria-valuenow",String(Math.round(m)))}),t=m=>{let u=m.shiftKey?10:1,l=null;e?m.key==="ArrowRight"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowLeft"&&(l=Math.max(o.size.get()-u,o.min)):m.key==="ArrowDown"?l=Math.min(o.size.get()+u,o.max):m.key==="ArrowUp"&&(l=Math.max(o.size.get()-u,o.min)),m.key==="Home"?l=o.min:m.key==="End"&&(l=o.max),l!==null&&(m.preventDefault(),o.size.set(l))},a=null,i=m=>{m.preventDefault();let u=n.parentElement,l=d=>{let f=u.getBoundingClientRect(),h=e?(d.clientX-f.left)/f.width*100:(d.clientY-f.top)/f.height*100;o.size.set(Math.min(Math.max(h,o.min),o.max))},c=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null};a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c),a=null},document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)};n.addEventListener("keydown",t),n.addEventListener("mousedown",i),r.addHook("Remove",()=>{a==null||a(),s(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",i)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,ft.themeColor)(r,"inherit"),color:r=>(0,ft.themeColor)(r,"text"),"&:hover":{backgroundColor:r=>(0,ft.themeColor)(r,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:r=>S(r,"primary")},"&::after":{content:'""',width:(0,ft.themeSpacing)(1),height:(0,ft.themeSpacing)(1),borderRadius:(0,ft.themeSpacing)(999),backgroundColor:r=>(0,ft.themeColor)(r,"shift-4")}}}}var Qt=require("@domphy/theme");function Ai(r={}){let{gap:o=3,align:n,justify:e,density:s=!0}=r;return{style:E(E({display:"flex",flexDirection:"column",gap:s?t=>(0,Qt.themeSpacing)((0,Qt.themeDensity)(t)*o):()=>(0,Qt.themeSpacing)(o)},n?{alignItems:n}:{}),e?{justifyContent:e}:{})}}var Rt=require("@domphy/core"),R=require("@domphy/theme");function rr(r,o,n,e){if((0,Rt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Rt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Bi(r,o,n){return r==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",left:(0,R.themeSpacing)(3),top:(0,R.themeSpacing)(6),bottom:`-${(0,R.themeSpacing)(2)}`,width:"2px",height:"auto",right:"auto",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,R.themeSpacing)(3),right:`calc(50% + ${(0,R.themeSpacing)(3)})`,left:`calc(-50% + ${(0,R.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,R.themeColor)(e,"shift-3",o),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,R.themeColor)(e,"shift-9",n)}}}function ar(r,o,n,e,s){let t=n==="vertical",a=Bi(n,e,s);return r.map((i,m)=>{var l;return{li:[typeof i.label=="string"?{span:i.label}:i.label],_key:(l=i.key)!=null?l:m,dataStep:String(m+1),dataStatus:c=>{let d=o.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>o.get(c)===m?"step":void 0,style:z(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,R.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,R.themeSize)(c,"decrease-1"),textAlign:t?"left":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),borderRadius:(0,R.themeSpacing)(999),fontSize:c=>(0,R.themeSize)(c,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:c=>`2px solid ${(0,R.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,R.themeColor)(c,"inherit"),color:c=>(0,R.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s),boxShadow:c=>`0 0 0 3px ${(0,R.themeColor)(c,"shift-3",s)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,R.themeColor)(c,"shift-9",s),borderColor:c=>(0,R.themeColor)(c,"shift-9",s),color:c=>(0,R.themeColor)(c,"shift-0",s)},"&[data-status=pending]":{color:c=>(0,R.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,R.themeColor)(c,"shift-11",s),fontWeight:"bold"},"&[data-status=done]":{color:c=>(0,R.themeColor)(c,"text",e)}})}})}function Hi(r={items:[]}){var a;let{items:o=[],direction:n="horizontal",color:e="neutral",accentColor:s="primary"}=r,t={items:o,direction:n,color:e,accentColor:s};return z(E({_doctorDisable:"inline-typography",_context:{steps:{current:(0,Rt.toState)((a=r.current)!=null?a:0),direction:n,color:e,accentColor:s}},_onSchedule:(i,m)=>{let u=rr(i,"stepsCurrent",r.current,0);m[i.tagName]=ar(o,u,n,e,s)}},(0,Rt.behavior)("steps-items",i=>({update(m){let u=rr(i,"stepsCurrent",r.current,0);i.children.update(ar(m.items,u,m.direction,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:(0,R.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var ir=require("@domphy/core"),eo=require("@domphy/theme");function Fi(r={}){var n;let o=(0,ir.toState)((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=>(0,eo.themeSize)(e,"inherit"),fontWeight:"bold",color:e=>(0,eo.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,eo.themeColor)(e)}}}var lr=require("@domphy/core"),yo=require("@domphy/theme");function Ki(r={}){var n;let o=(0,lr.toState)((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=>(0,yo.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,yo.themeColor)(e,"text",o.get(e))}}}var sr=require("@domphy/core"),bo=require("@domphy/theme");function ji(r={}){var n;let o=(0,sr.toState)((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=>(0,bo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,bo.themeColor)(e,"text",o.get(e))}}}var cr=require("@domphy/core"),H=require("@domphy/theme");function Wi(r={}){var n;let o=(0,cr.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:e=>(0,H.themeSize)(e,"inherit"),color:e=>(0,H.themeColor)(e,"text",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"text",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,H.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,H.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*3),paddingBlock:e=>(0,H.themeSpacing)((0,H.themeDensity)(e)*1),color:e=>(0,H.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,H.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,H.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,H.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,H.themeColor)(e,"hover")}}}}var jt=require("@domphy/core"),U=require("@domphy/theme");function mr(r,o,n,e){if((0,jt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,jt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function ur(r,o,n,e,s){let t=r.nodeId,i={div:o.map((u,l)=>{var f;let c=(f=u.key)!=null?f:l;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:h=>n.get(h)===c,tabIndex:h=>n.get(h)===c?0:-1,onClick:()=>n.set(c),onKeyDown:h=>{var g;let C=h.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(C))return;h.preventDefault();let v=o.map((D,w)=>{var q;return(q=D.key)!=null?q:w}),p=v.indexOf(c),b=p;C==="ArrowRight"?b=(p+1)%v.length:C==="ArrowLeft"?b=(p-1+v.length)%v.length:C==="Home"?b=0:C==="End"&&(b=v.length-1),n.set(v[b]);let k=h.target.closest("[role=tablist]");(g=k==null?void 0:k.querySelectorAll("[role=tab]")[b])==null||g.focus()},style:{cursor:"pointer",fontSize:h=>(0,U.themeSize)(h,"inherit"),height:h=>(0,U.themeSpacing)(6+(0,U.themeDensity)(h)*2),paddingInline:h=>(0,U.themeSpacing)((0,U.themeDensity)(h)*4),border:"none",outline:"none",color:h=>(0,U.themeColor)(h,"shift-13"),backgroundColor:h=>(0,U.themeColor)(h,"inherit"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-1",s)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:h=>(0,U.themeColor)(h,"shift-13"),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-2",s)}`},"&[aria-selected=true]:not([disabled])":{color:h=>(0,U.themeColor)(h,"shift-13",e),boxShadow:h=>`inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-8",e)}`},"&:focus-visible":{boxShadow:h=>S(h,e)},"&[aria-selected=true]:focus-visible":{boxShadow:h=>`${S(h,e)}, inset 0 ${(0,U.themeSpacing)(-.5)} 0 0 ${(0,U.themeColor)(h,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=o.map((u,l)=>{var d;let c=(d=u.key)!=null?d:l;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,hidden:f=>n.get(f)!==c,style:{paddingBlock:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2),paddingInline:f=>(0,U.themeSpacing)((0,U.themeDensity)(f)*2)}}});return[i,...m]}function qi(r={items:[]}){let{items:o=[],accentColor:n="primary",color:e="neutral"}=r;return E({_onSchedule:(t,a)=>{var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=o[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=ur(t,o,i,n,e)}},(0,jt.behavior)("tabs-items",t=>({update(a){var m,u;let i=mr(t,"tabsActiveKey",r.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(ur(t,a.items,i,a.accentColor,a.color),!!t.domElement,!0)}}),{items:o,accentColor:n,color:e}))}var to=require("@domphy/core"),le=require("@domphy/theme");function Yi(r={}){var s,t;let o=(0,to.toState)((s=r.color)!=null?s:"neutral","color"),n=(0,to.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return z(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,to.behavior)("textarea-auto-resize",(a,i)=>{let m=a.domElement,u=i.autoResize,l=!1,c,d,f=()=>{!u||l||(l=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,l=!1,u&&(d==null||d.observe(m)))},h=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(v=>{v.some(p=>p.isIntersecting)&&f()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{l||f()})),d.observe(m))},C=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",f),a.attributes.addListener("value",f),u&&(h(),f()),{resize:f,update(v){u=v.autoResize,a.attributes.addListener("value",f),u?(h(),f()):C()},destroy(){m.removeEventListener("input",f),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var i;(i=a.getBehavior("textarea-auto-resize"))==null||i.resize()},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*2),paddingBlock:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,le.themeSpacing)((0,le.themeDensity)(a)*1.5),fontSize:a=>(0,le.themeSize)(a,"inherit"),color:a=>(0,le.themeColor)(a,"text",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong",o.get(a))}`,backgroundColor:a=>(0,le.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>(0,le.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,le.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>S(a,n.get(a))},"&:invalid":{outline:a=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,le.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,le.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,le.themeColor)(a,"shift-2","neutral")}}})}var dr=require("@domphy/core"),Be=require("@domphy/theme");function Gi(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ui(r={}){var t,a,i;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",s=(0,dr.toState)((i=r.active)!=null?i:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*2),paddingBottom:m=>o?"0":(0,Be.themeSpacing)((0,Be.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Be.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Be.themeColor)(m,"shift-8",s.get(m)?e:n),opacity:m=>s.get(m)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Be.themeSpacing)((0,Be.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Be.themeColor)(m,"shift-3",n)}})}}var hr=require("@domphy/core"),Se=require("@domphy/theme");function Jo(r){let o=r.getMetadata("toastOpen");return o||(o=(0,hr.toState)(!1),r.setMetadata("toastOpen",o)),o}var pr=r=>{let o=r==null?void 0:r.elementNode;return o?Jo(o).get(r):!1};function Ji(r={}){let{position:o="top-center",color:n="neutral"}=r,e=o.startsWith("top"),s=o.endsWith("center"),t=o.endsWith("right"),a={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:e?"column":"column-reverse",alignItems:s?"center":t?"end":"start",inset:0,gap:(0,Se.themeSpacing)(4),zIndex:30,padding:(0,Se.themeSpacing)(6),pointerEvents:"none"}};return{_portal:i=>{let m=i.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=i.children.insert(a).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Se.themeSpacing)(32),pointerEvents:"auto",paddingBlock:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),paddingInline:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*4),borderRadius:i=>(0,Se.themeSpacing)((0,Se.themeDensity)(i)*2),fontSize:i=>(0,Se.themeSize)(i,"inherit"),color:i=>(0,Se.themeColor)(i,"text",n),backgroundColor:i=>(0,Se.themeColor)(i,"inherit",n),boxShadow:_("medium"),opacity:i=>Number(pr(i)),transform:i=>pr(i)?"translateY(0)":e?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:i=>requestAnimationFrame(()=>Jo(i).set(!0)),_onBeforeRemove:(i,m)=>{var p,b;let u=!1,l=null,c=!1,d=i.getRoot(),f=(b=(p=i.domElement)==null?void 0:p.parentElement)!=null?b:null,h=()=>{var g;if(c||!f||f.id!==`domphy-toast-${o}`||f.childElementCount>0)return;c=!0;let k=(g=d.children)==null?void 0:g.items.find(D=>D.domElement===f);k?d.children.remove(k):f.remove()},C=()=>{u||(u=!0,l&&(clearTimeout(l),l=null),i.domElement.removeEventListener("transitionend",v),m(),h())},v=k=>{k.propertyName==="transform"&&C()};i.domElement.addEventListener("transitionend",v),l=setTimeout(C,350),i.addHook("Remove",()=>{var k;l&&(clearTimeout(l),l=null),(k=i.domElement)==null||k.removeEventListener("transitionend",v),h()}),Jo(i).set(!1)}}}var Vt=require("@domphy/core"),oe=require("@domphy/theme");function fr(r,o,n,e){if((0,Vt.isState)(n))return r.setMetadata(o,n),n;let s=r.getMetadata(o);return s||(s=(0,Vt.toState)(n!=null?n:e),r.setMetadata(o,s)),s}function Xi(r,o){return Array.isArray(r)?r.includes(o):r===o}function Zi(r,o,n,e,s){var l;let t=r.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(t))return;r.preventDefault();let a=o.map((c,d)=>{var f;return(f=c.key)!=null?f:String(d)}),i=a.indexOf(n),m=i;t==="ArrowRight"?m=(i+1)%a.length:t==="ArrowLeft"?m=(i-1+a.length)%a.length:t==="Home"?m=0:t==="End"&&(m=a.length-1),s||e.set(a[m]);let u=r.target.closest("[role=group]");(l=u==null?void 0:u.querySelectorAll("button")[m])==null||l.focus()}function gr(r,o,n,e,s){return r.map((t,a)=>{var u;let i=(u=t.key)!=null?u:String(a);return{button:[typeof t.label=="string"?{span:t.label}:t.label],_key:i,type:"button",role:"button",ariaPressed:l=>Xi(o.get(l),i),tabIndex:l=>{var d,f,h,C,v;let c=o.get(l);if(n){let b=(h=(f=(Array.isArray(c)?c:[])[0])!=null?f:(d=r[0])==null?void 0:d.key)!=null?h:"0";return i===b?0:-1}return c===i||c===""&&i===((v=(C=r[0])==null?void 0:C.key)!=null?v:"0")?0:-1},onClick:()=>{let l=o.get();if(n){let c=Array.isArray(l)?[...l]:[];o.set(c.includes(i)?c.filter(d=>d!==i):[...c,i])}else o.set(l===i?"":i)},onKeyDown:l=>Zi(l,r,i,o,n),style:{cursor:"pointer",fontSize:l=>(0,oe.themeSize)(l,"inherit"),height:(0,oe.themeSpacing)(6),paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(2),border:"none",borderRadius:(0,oe.themeSpacing)(1.5),color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"inherit",e),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:l=>(0,oe.themeColor)(l,"shift-13",e),backgroundColor:l=>(0,oe.themeColor)(l,"hover",e)},"&:active:not([disabled])":{backgroundColor:l=>(0,oe.themeColor)(l,"increase-2",e)},"&[aria-pressed=true]":{backgroundColor:l=>(0,oe.themeColor)(l,"shift-3",s),color:l=>(0,oe.themeColor)(l,"shift-13",s)},"&:focus-visible":{boxShadow:l=>S(l,s)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Qi(r={items:[]}){var a;let{items:o=[],multiple:n=!1,color:e="neutral",accentColor:s="primary"}=r,t={items:o,multiple:n,color:e,accentColor:s};return z(E({role:"group",_context:{toggleGroup:{value:(0,Vt.toState)((a=r.value)!=null?a:n?[]:""),multiple:n}},_onSchedule:(i,m)=>{let u=fr(i,"toggleGroupValue",r.value,n?[]:"");m[i.tagName]=gr(o,u,n,e,s)}},(0,Vt.behavior)("toggle-items",i=>({update(m){let u=fr(i,"toggleGroupValue",r.value,m.multiple?[]:"");i.children.update(gr(m.items,u,m.multiple,m.color,m.accentColor),!!i.domElement,!0)}}),t)),{style:{display:"flex",paddingBlock:(0,oe.themeSpacing)(1),paddingInline:(0,oe.themeSpacing)(1),gap:(0,oe.themeSpacing)(1),borderRadius:(0,oe.themeSpacing)(2),fontSize:i=>(0,oe.themeSize)(i,"inherit"),backgroundColor:i=>(0,oe.themeColor)(i,"inherit",e),color:i=>(0,oe.themeColor)(i,"text",e),outline:i=>`1px solid ${(0,oe.themeColor)(i,"border",e)}`,outlineOffset:"-1px"}})}function el(r={}){return Uo(r)}function tl(){return{div:null,style:{flex:"1 1 0"}}}var oo=require("@domphy/core"),_e=require("@domphy/theme");function ol(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,s=(0,oo.toState)(n),t=(0,oo.toState)(e),a={span:d=>t.get(d)},{show:i,hide:m,anchorPartial:u}=Qe({kind:"tooltip",open:o,onDismiss:r.onDismiss,placement:s,content:a}),l={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1),paddingInline:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*3),borderRadius:d=>(0,_e.themeSpacing)((0,_e.themeDensity)(d)*1.5),color:d=>(0,_e.themeColor)(d,"text"),backgroundColor:d=>(0,_e.themeColor)(d),fontSize:d=>(0,_e.themeSize)(d,"inherit"),boxShadow:_("low")},$:[qo({placement:s,bordered:!1})]};return a.$||(a.$=[]),a.$.push(l),(0,oo.merge)(u,{ariaDescribedby:d=>d!=null&&d.elementNode?Re("tooltip",d.elementNode):void 0,onMouseEnter:(d,f)=>i(f),onMouseLeave:(d,f)=>m(f),onFocus:(d,f)=>i(f),onBlur:(d,f)=>m(f),onKeyDown:(d,f)=>d.key==="Escape"&&m(f)}),u}var Xo=require("@domphy/core");function yr(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function nl(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,s=new Map,t=new Set,a=new Set;return{_onMount:i=>{i.addHook("Remove",()=>{for(let m of Array.from(s.values()))m();s.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:i=>{e=new Map,i.children.items.forEach((m,u)=>{if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;l&&e.set(yr(m,u),l.getBoundingClientRect())})},_onUpdate:i=>{i.children.items.forEach((m,u)=>{var D;if(!(m instanceof Xo.ElementNode))return;let l=m.domElement;if(!l)return;let c=yr(m,u),d=e.get(c);if(!d)return;let f=l.getBoundingClientRect(),h=d.left-f.left,C=d.top-f.top;if(Math.abs(h)<.5&&Math.abs(C)<.5)return;(D=s.get(l))==null||D(),l.style.transition="none",l.style.transform=`translate(${h}px, ${C}px)`,l.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});a.add(v);let p=!1,b=null,k=()=>{p||(p=!0,b&&(t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g),l.style.transition="",l.style.transform="")},g=w=>{w.propertyName==="transform"&&k()};s.set(l,()=>{p=!0,b&&(clearTimeout(b),t.delete(b),b=null),s.delete(l),l.removeEventListener("transitionend",g)}),l.addEventListener("transitionend",g),b=setTimeout(k,o+n+34),t.add(b)}),e.clear()}}}var br=require("@domphy/core"),Mt=require("@domphy/theme");function rl(r={}){var n;let o=(0,br.toState)((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=>(0,Mt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Mt.themeColor)(e),color:e=>(0,Mt.themeColor)(e,"text",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Mt.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function al(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
1
+ "use strict";var go=Object.defineProperty,Hr=Object.defineProperties,Br=Object.getOwnPropertyDescriptor,Fr=Object.getOwnPropertyDescriptors,Kr=Object.getOwnPropertyNames,Sn=Object.getOwnPropertySymbols;var En=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable;var vn=(n,r,o)=>r in n?go(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o,E=(n,r)=>{for(var o in r||(r={}))En.call(r,o)&&vn(n,o,r[o]);if(Sn)for(var o of Sn(r))Wr.call(r,o)&&vn(n,o,r[o]);return n},O=(n,r)=>Hr(n,Fr(r));var jr=(n,r)=>{for(var o in r)go(n,o,{get:r[o],enumerable:!0})},qr=(n,r,o,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Kr(r))!En.call(n,i)&&i!==o&&go(n,i,{get:()=>r[i],enumerable:!(e=Br(r,i))||e.enumerable});return n};var Ur=n=>qr(go({},"__esModule",{value:!0}),n);var wl={};jr(wl,{abbreviation:()=>Yr,accordion:()=>Gr,alert:()=>Jr,avatar:()=>Xr,badge:()=>Zr,blockquote:()=>Qr,breadcrumb:()=>ea,breadcrumbEllipsis:()=>ta,button:()=>ra,buttonGhost:()=>No,buttonSwitch:()=>aa,card:()=>la,code:()=>sa,combobox:()=>ga,command:()=>Sa,commandItem:()=>Ea,commandSearch:()=>va,datePicker:()=>ka,descriptionList:()=>Da,details:()=>Ia,dialog:()=>Oa,divider:()=>La,drawer:()=>za,elevation:()=>F,emphasis:()=>Va,empty:()=>Ma,errorBoundary:()=>Na,fab:()=>$a,figure:()=>Ha,focusRing:()=>v,formGroup:()=>Ba,grid:()=>Fa,heading:()=>Wa,horizontalRule:()=>ja,icon:()=>qa,image:()=>Ua,inputCheckbox:()=>Ya,inputColor:()=>Ga,inputDateTime:()=>Ja,inputFile:()=>Xa,inputNumber:()=>Za,inputOTP:()=>Qa,inputPassword:()=>ni,inputRadio:()=>ri,inputRange:()=>ai,inputSearch:()=>ii,inputSwitch:()=>li,inputText:()=>si,keyboard:()=>ci,label:()=>mi,link:()=>ui,linkButton:()=>fi,list:()=>hi,listItem:()=>gi,listItemButton:()=>yi,mark:()=>bi,menu:()=>Si,motion:()=>Ei,orderedList:()=>xi,pagination:()=>wi,panelSection:()=>Ti,paragraph:()=>Di,popover:()=>Li,popoverArrow:()=>sn,preformated:()=>Ri,progress:()=>zi,rating:()=>Ni,ringProgress:()=>_i,row:()=>dn,scrollArea:()=>$i,segmented:()=>Bi,select:()=>Fi,selectBox:()=>ji,selectItem:()=>qi,selectList:()=>Yi,skeleton:()=>Gi,small:()=>Ji,spinner:()=>Xi,splitter:()=>Zi,splitterHandle:()=>tl,splitterPanel:()=>el,stack:()=>ol,steps:()=>rl,strong:()=>al,subscript:()=>il,superscript:()=>ll,table:()=>sl,tabs:()=>cl,tag:()=>no,textarea:()=>ml,timeline:()=>ul,timelineItem:()=>dl,toast:()=>hl,toggleGroup:()=>bl,toolbar:()=>Sl,toolbarSpacer:()=>vl,tooltip:()=>El,transitionGroup:()=>xl,unorderedList:()=>Cl,visuallyHidden:()=>kl});module.exports=Ur(wl);var zo=require("@domphy/core"),rt=require("@domphy/theme");function Yr(n={}){var e,i;let r=(0,zo.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,zo.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,rt.themeSize)(t),backgroundColor:t=>(0,rt.themeColor)(t),color:t=>(0,rt.themeColor)(t,"shift-10",r.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,rt.themeColor)(t,"shift-7",r.get(t)),textUnderlineOffset:(0,rt.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,rt.themeColor)(t,"shift-11",o.get(t)),textDecorationColor:t=>(0,rt.themeColor)(t,"shift-9",o.get(t))}}}}var Mo=require("@domphy/core"),vt=require("@domphy/theme");var Vo=require("@domphy/theme");function v(n,r="primary"){let o=(0,Vo.themeColor)(n,"surface"),e=(0,Vo.themeColor)(n,"shift-9",r);return`0 0 0 2px ${o}, 0 0 0 4px ${e}`}function Gr(n={}){var i,t;let{type:r="single"}=n,o=(0,Mo.toState)((i=n.color)!=null?i:"neutral","color"),e=(0,Mo.toState)((t=n.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{let l=a.domElement;if(!l)return;if(r==="single"){let u=s=>{let c=s.target.closest("summary");if(!c)return;let d=c.closest("details");!d||d.parentElement!==l||d.open||Array.from(l.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};l.addEventListener("click",u),a.addHook("Remove",()=>l.removeEventListener("click",u))}let m=u=>{var S;let s=u.key;if(!["ArrowUp","ArrowDown","Home","End"].includes(s))return;let c=u.target.closest("summary");if(!c)return;let d=c.closest("details");if(!d||d.parentElement!==l)return;let p=Array.from(l.querySelectorAll(":scope > details > summary")),f=p.indexOf(c);if(f===-1)return;let h=f;s==="ArrowDown"?h=(f+1)%p.length:s==="ArrowUp"?h=(f-1+p.length)%p.length:s==="Home"?h=0:s==="End"&&(h=p.length-1),u.preventDefault(),(S=p[h])==null||S.focus()};l.addEventListener("keydown",m),a.addHook("Remove",()=>l.removeEventListener("keydown",m))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,vt.themeSpacing)((0,vt.themeDensity)(a)*1.5),outline:a=>`1px solid ${(0,vt.themeColor)(a,"border-strong",o.get(a))}`,outlineOffset:"-1px",color:a=>(0,vt.themeColor)(a,"text",o.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,vt.themeColor)(a,"border-strong",o.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>v(a,e.get(a))}}}}var xn=require("@domphy/core"),Te=require("@domphy/theme");function Jr(n={}){var o;let r=(0,xn.toState)((o=n.color)!=null?o:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,Te.themeSpacing)(3),paddingBlock:e=>(0,Te.themeSpacing)((0,Te.themeDensity)(e)*2),paddingInline:e=>(0,Te.themeSpacing)((0,Te.themeDensity)(e)*4),borderRadius:e=>(0,Te.themeSpacing)((0,Te.themeDensity)(e)*1.5),boxShadow:e=>`inset ${(0,Te.themeSpacing)(1)} 0 0 0 ${(0,Te.themeColor)(e,"shift-8",r.get(e))}`,backgroundColor:e=>(0,Te.themeColor)(e,"inherit",r.get(e)),color:e=>(0,Te.themeColor)(e,"shift-10",r.get(e)),fontSize:e=>(0,Te.themeSize)(e,"inherit")}}}var Cn=require("@domphy/core"),Ge=require("@domphy/theme");function Xr(n={}){var o;let r=(0,Cn.toState)((o=n.color)!=null?o:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,Ge.themeSpacing)(9),height:(0,Ge.themeSpacing)(9),fontSize:e=>(0,Ge.themeSize)(e,"inherit"),fontWeight:(0,Ge.themeWeight)("semibold"),userSelect:"none",backgroundColor:e=>(0,Ge.themeColor)(e,"inherit",r.get(e)),color:e=>(0,Ge.themeColor)(e,"shift-11",r.get(e)),boxShadow:e=>`0 0 0 1px ${(0,Ge.themeColor)(e,"border",r.get(e))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var Ao=require("@domphy/core"),Ce=require("@domphy/theme");function Zr(n={}){var i;let{label:r=999}=n,o=(0,Ao.toState)(r),e=(0,Ao.toState)((i=n.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${o.get(t)}"`,position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%,-50%)",paddingInline:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(1.5/1.5)),minWidth:(0,Ce.themeSpacing)(5),height:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*(5/1.5)),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Ce.themeSize)(t,"decrease-2"),fontWeight:(0,Ce.themeWeight)("semibold"),lineHeight:1,borderRadius:t=>(0,Ce.themeSpacing)((0,Ce.themeDensity)(t)*999),backgroundColor:t=>(0,Ce.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Ce.themeColor)(t,"shift-0",e.get(t)),boxShadow:t=>`0 0 0 1px ${(0,Ce.themeColor)(t,"shift-0",e.get(t))}`}}}}var kn=require("@domphy/core"),$e=require("@domphy/theme");function Qr(n={}){var o;let r=(0,kn.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>(0,$e.themeSize)(e,"inherit"),backgroundColor:e=>(0,$e.themeColor)(e,"inherit",r.get(e)),color:e=>(0,$e.themeColor)(e,"text",r.get(e)),boxShadow:e=>`inset ${(0,$e.themeSpacing)(1)} 0 0 0 ${(0,$e.themeColor)(e,"shift-4",r.get(e))}`,border:"none",paddingBlock:e=>(0,$e.themeSpacing)((0,$e.themeDensity)(e)*2),paddingInline:e=>(0,$e.themeSpacing)((0,$e.themeDensity)(e)*4),margin:0}}}var wn=require("@domphy/core"),pt=require("@domphy/theme");function ea(n={}){var e;let{separator:r="/"}=n,o=(0,wn.toState)((e=n.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},_doctorDisable:"low-contrast",ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>(0,pt.themeSize)(i,"inherit"),gap:(0,pt.themeSpacing)(1),color:i=>(0,pt.themeColor)(i,"text",o.get(i)),backgroundColor:i=>(0,pt.themeColor)(i,"inherit",o.get(i)),"& > *":{display:"inline-flex",alignItems:"center"},"& > *:not(:last-child)::after":{content:`"${r}"`,color:i=>(0,pt.themeColor)(i,"muted",o.get(i)),paddingInlineStart:(0,pt.themeSpacing)(1)},"& > [aria-current=page]":{pointerEvents:"none"}}}}var Tn=require("@domphy/core"),Je=require("@domphy/theme");function ta(n={}){var o;let r=(0,Tn.toState)((o=n.color)!=null?o:"neutral","color");return{type:"button",_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>(0,Je.themeSize)(e,"inherit"),paddingInline:(0,Je.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,Je.themeColor)(e,"text",r.get(e)),borderRadius:(0,Je.themeSpacing)(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:e=>(0,Je.themeColor)(e,(0,Je.textToneOn)(2),r.get(e)),backgroundColor:e=>(0,Je.themeColor)(e,"hover",r.get(e))},"&:focus-visible":{boxShadow:e=>v(e,r.get(e))}}}}var In=require("@domphy/core"),G=require("@domphy/theme");var Kt={small:"decrease-1",medium:"inherit",large:"increase-1"};var Dn=require("@domphy/core"),ue=require("@domphy/theme");var oa={small:.5,medium:1,large:1.5};function No(n={}){var i,t,a;let r=(0,Dn.toState)((i=n.color)!=null?i:"neutral","color"),o=oa[(t=n.size)!=null?t:"medium"],e=Kt[(a=n.size)!=null?a:"medium"];return{type:"button",_onInsert:l=>{l.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:l=>(0,ue.themeSize)(l,e),paddingBlock:l=>(0,ue.themeSpacing)((0,ue.themeDensity)(l)*o),paddingInline:l=>(0,ue.themeSpacing)((0,ue.themeDensity)(l)*o),borderRadius:l=>(0,ue.themeSpacing)((0,ue.themeDensity)(l)*1.5),display:"inline-flex",width:"fit-content",justifyContent:"center",alignItems:"center",gap:l=>(0,ue.themeSpacing)((0,ue.themeDensity)(l)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:l=>(0,ue.themeColor)(l,"text",r.get(l)),"&:hover:not([disabled]):not([aria-busy=true])":{color:l=>(0,ue.themeColor)(l,(0,ue.textToneOn)(2),r.get(l)),backgroundColor:l=>(0,ue.themeColor)(l,"hover",r.get(l))},"&:active:not([disabled]):not([aria-busy=true])":{color:l=>(0,ue.themeColor)(l,(0,ue.textToneOn)(2),r.get(l)),backgroundColor:l=>(0,ue.themeColor)(l,"increase-2",r.get(l))},"&:focus-visible":{boxShadow:l=>v(l,r.get(l))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:l=>(0,ue.themeColor)(l,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var na={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function ra(n={}){var a,l,m,u;let r=(a=n.variant)!=null?a:"outline";if(r==="ghost")return No({color:n.color,size:n.size});let o=(0,In.toState)((l=n.color)!=null?l:"primary","color"),e=r==="solid",i=na[(m=n.size)!=null?m:"medium"],t=Kt[(u=n.size)!=null?u:"medium"];return O(E({type:"button",_onInsert:s=>{s.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},e?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:s=>(0,G.themeSize)(s,t),paddingBlock:s=>(0,G.themeSpacing)((0,G.themeDensity)(s)*i.block),paddingInline:s=>(0,G.themeSpacing)((0,G.themeDensity)(s)*i.inline),borderRadius:s=>(0,G.themeSpacing)((0,G.themeDensity)(s)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:s=>(0,G.themeSpacing)((0,G.themeDensity)(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e?"none":s=>`1px solid ${(0,G.themeColor)(s,"border-strong",o.get(s))}`,color:s=>e?(0,G.themeColor)(s,"shift-0","neutral"):(0,G.themeColor)(s,"shift-13",o.get(s)),backgroundColor:s=>e?(0,G.themeColor)(s,"shift-13",o.get(s)):(0,G.themeColor)(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:s=>e?(0,G.themeColor)(s,"shift-0","neutral"):(0,G.themeColor)(s,"shift-14",o.get(s)),backgroundColor:s=>e?(0,G.themeColor)(s,"shift-14",o.get(s)):(0,G.themeColor)(s,"hover",o.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:s=>e?(0,G.themeColor)(s,"shift-15",o.get(s)):(0,G.themeColor)(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:s=>(0,G.themeColor)(s,"shift-2","neutral"),outline:s=>`1px solid ${(0,G.themeColor)(s,"border-strong","neutral")}`,color:s=>(0,G.themeColor)(s,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}var yo=require("@domphy/core"),X=require("@domphy/theme");function aa(n={}){var t,a;let{checked:r=!1}=n,o=(0,yo.toState)(r),e=(0,yo.toState)((t=n.color)!=null?t:"neutral","color"),i=(0,yo.toState)((a=n.accentColor)!=null?a:"primary","accentColor");return{type:"button",_onSchedule:l=>{l.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaLabel:"Toggle",ariaChecked:l=>o.get(l),dataTone:"shift-2",onClick:()=>o.set(!o.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>(0,X.themeSize)(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${(0,X.themeColor)(l,"shift-7",e.get(l))}`,minWidth:(0,X.themeSpacing)(12),minHeight:(0,X.themeSpacing)(6),width:"fit-content",flexShrink:0,borderRadius:(0,X.themeSpacing)(999),paddingInlineStart:(0,X.themeSpacing)(7),paddingInlineEnd:(0,X.themeSpacing)(2),cursor:"pointer",transition:"padding-inline-start 0.3s, padding-inline-end 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:l=>(0,X.themeColor)(l,"inherit",e.get(l)),color:l=>(0,X.themeColor)(l,"text",e.get(l)),"&:focus-visible":{boxShadow:l=>v(l,i.get(l))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",insetInlineStart:(0,X.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"inset-inline-start 0.3s",width:(0,X.themeSpacing)(5),height:(0,X.themeSpacing)(5),borderRadius:(0,X.themeSpacing)(999),color:l=>(0,X.themeColor)(l,"text"),backgroundColor:l=>(0,X.themeColor)(l,"decrease-2",e.get(l)),outline:l=>`1px solid ${(0,X.themeColor)(l,"shift-7",e.get(l))}`,outlineOffset:"-1px"},"&[aria-checked=true]":{backgroundColor:l=>(0,X.themeColor)(l,"increase-3",i.get(l)),outline:"none",color:l=>(0,X.themeColor)(l,(0,X.textToneOn)(3),i.get(l)),paddingInlineStart:(0,X.themeSpacing)(2),paddingInlineEnd:(0,X.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{insetInlineStart:`calc(100% - ${(0,X.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Pn=require("@domphy/core"),K=require("@domphy/theme");var ia={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function F(n){return ia[n]}function la(n={}){var o;let r=(0,Pn.toState)((o=n.color)!=null?o:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*2),backgroundColor:e=>(0,K.themeColor)(e,"inherit",r.get(e)),color:e=>(0,K.themeColor)(e,"shift-10",r.get(e)),outline:e=>`1px solid ${(0,K.themeColor)(e,"border-strong",r.get(e))}`,outlineOffset:"-1px",boxShadow:F("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*2),paddingInline:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*4),fontWeight:(0,K.themeWeight)("semibold"),color:e=>(0,K.themeColor)(e,"shift-11",r.get(e)),margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*4),paddingBottom:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*2),color:e=>(0,K.themeColor)(e,"text",r.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*4)},"& > footer":{gridArea:"footer",display:"flex",gap:(0,K.themeSpacing)(2),paddingBlock:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*2),paddingInline:e=>(0,K.themeSpacing)((0,K.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,K.themeColor)(e,"border",r.get(e))}`}}}}var On=require("@domphy/core"),Le=require("@domphy/theme");function sa(n={}){var o;let r=(0,On.toState)((o=n.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:e=>(0,Le.themeSize)(e,"inherit"),fontFamily:(0,Le.themeFont)("monospace"),color:e=>(0,Le.themeColor)(e,"text",r.get(e)),backgroundColor:e=>(0,Le.themeColor)(e,"inherit",r.get(e)),height:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*(6/1.5)),paddingInline:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,Le.themeSpacing)((0,Le.themeDensity)(e)*(1/1.5))}}}var Xe=require("@domphy/core"),Q=require("@domphy/theme");var Ln=require("@domphy/core"),_o=require("@domphy/theme"),ca="text",$o="shift-11";function qe(n="neutral"){let r=(0,Ln.toState)(n,"color");return{color:o=>(0,_o.themeColor)(o,$o,r.get(o)),"&::placeholder":{color:o=>(0,_o.themeColor)(o,ca,r.get(o))}}}var bo=require("@domphy/core"),at=require("@domphy/floating");var to=require("@domphy/core");function ma(n){return typeof n.set=="function"}function He(n,r,o=!0){if(typeof n.addListener=="function")return o&&r(n.get()),n.addListener(r);if(o)return(0,to.effect)(()=>{r(n.get())});let e=!0,i=(0,to.effect)(()=>{let t=n.get();e||r(t)});return e=!1,i}function Ho(n,r){ma(n)&&n.set(r)}function Et(n,r){r==null||r(),Ho(n,!1)}function Wt(n){return(0,to.toState)(n!=null?n:!1)}var Rn=100;function Me(n,r){return`domphy-${n}-${r.nodeId}`}var Bo="data-domphy-floating",Fo=`:scope > [${Bo}]`,zn="data-domphy-floating-kind";function So(n){let r=n.querySelector(Fo);return r?Array.from(r.children).some(o=>o.getAttribute(zn)!=="tooltip"):!1}function ua(n,r){var fo,Bt,Qt,ho;let{openState:o,onDismiss:e,placement:i,content:t,keepOpenOnContentHover:a,openDelay:l,closeDelay:m}=r,{kind:u}=r,s=`floating:${u}`,c=null,d=null,p=null,f=null,h=!1,S=n.domElement,x=n.getRoot(),R=Me(u,n),D={style:{position:"fixed",pointerEvents:"auto",visibility:V=>o.get(V)?"visible":"hidden"},onKeyDown:V=>{V.key==="Escape"&&Ne()&&(V.stopPropagation(),U())},onMouseEnter:()=>a&&we(),onMouseLeave:()=>a&&U(),_onMount:V=>{var le;if(p=V.domElement,p.id||(p.id=R),p.setAttribute(zn,u),S&&p&&!p.hasAttribute("data-theme")){let _e=(le=S.closest("[data-theme]"))==null?void 0:le.getAttribute("data-theme");_e&&p.setAttribute("data-theme",_e)}},_portal:V=>{let le=S.closest("dialog");if(le){let Oe=le.querySelector(Fo);return Oe||(Oe=le.ownerDocument.createElement("div"),Oe.setAttribute(Bo,""),Object.assign(Oe.style,{position:"fixed",inset:"0",zIndex:"20",pointerEvents:"none"}),le.appendChild(Oe)),Oe}let _e=V.domElement.querySelector(Fo);if(!_e){let Oe={div:[],[Bo]:"",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};_e=V.children.insert(Oe).domElement}return _e}},b=V=>(0,bo.merge)(V,D);b(t);let k=()=>{h||(h=!0,f=x.children.insert(t),f._behaviorInstances.set(s,$t))},C=()=>{f&&(f._behaviorInstances.delete(s),f.remove(),f=null)},g=()=>{h&&(!p||!p.isConnected)&&(d==null||d(),d=null,f=null,p=null,h=!1),k(),S&&p&&(d==null||d(),d=(0,at.autoUpdate)(S,p,()=>{(0,at.computePosition)(S,p,{placement:i.get(),middleware:[(0,at.offset)(12),(0,at.flip)(),(0,at.shift)()],strategy:"fixed"}).then(({x:V,y:le,placement:_e})=>{p&&(Object.assign(p.style,{left:`${V}px`,top:`${le}px`}),i.set(_e))})}),Ho(o,!0))},L=()=>{if(!p)return!1;let le=p.getRootNode().activeElement;return!!le&&p.contains(le)},P=()=>{var _e,Oe,eo;if(!S)return;(_e=S.focus)==null||_e.call(S);let le=S.getRootNode().activeElement;le&&S.contains(le)||(eo=(Oe=S.querySelector('input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'))==null?void 0:Oe.focus)==null||eo.call(Oe)},Z=()=>{d==null||d(),d=null;let V=L();C(),p=null,h=!1,V&&P(),Et(o,e)},we=()=>{c&&clearTimeout(c),c=setTimeout(g,l)},U=()=>{c&&clearTimeout(c),c=setTimeout(Z,m)},me=V=>{if(!o.get()||!S||!p)return;let le=V.target;!S.contains(le)&&!p.contains(le)&&U()};(fo=x.domElement)==null||fo.addEventListener("click",me);let Ne=()=>{var V;return!!p&&((V=p.parentElement)==null?void 0:V.lastElementChild)===p},ge=V=>{V.key==="Escape"&&o.get()&&Ne()&&U()},Ke=(ho=(Qt=(Bt=x.domElement)==null?void 0:Bt.ownerDocument)!=null?Qt:x.domElement)!=null?ho:null;Ke==null||Ke.addEventListener("keydown",ge);let We=V=>{V?h||g():h&&Z()},Pe=()=>{},Dt=!1,nt=!1,$t,Ht=V=>{var le;V._behaviors=O(E({},(le=V._behaviors)!=null?le:{}),{[s]:{attach:()=>$t,props:{}}})};return $t={show:we,hide:U,panelId:R,update(V){if(!nt&&(e=V.onDismiss,V.openState!==o&&(Pe(),o=V.openState,Pe=He(o,We,!1),o.get()&&g()),i=V.placement,t=V.content,a=V.keepOpenOnContentHover,l=V.openDelay,m=V.closeDelay,b(t),Ht(t),f)){nt=!0;try{f.patch(t)}finally{nt=!1}}},destroy(){var V;Dt||(Dt=!0,c&&clearTimeout(c),c=null,d==null||d(),d=null,C(),p=null,h=!1,Pe(),Pe=()=>{},(V=x.domElement)==null||V.removeEventListener("click",me),Ke==null||Ke.removeEventListener("keydown",ge))}},Ht(t),Pe=He(o,We),$t}function it(n){var u,s;let{kind:r,placement:o,onDismiss:e}=n,i=Wt(n.open),t=`floating:${r}`,a=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.show()},l=c=>{var d;return(d=c==null?void 0:c.getBehavior(t))==null?void 0:d.hide()},m=E({onKeyDown:(c,d)=>c.key==="Escape"&&l(d)},(0,bo.behavior)(t,ua,{kind:r,openState:i,onDismiss:e,placement:o,content:n.content,keepOpenOnContentHover:!!n.keepOpenOnContentHover,openDelay:(u=n.openDelay)!=null?u:Rn,closeDelay:(s=n.closeDelay)!=null?s:Rn}));return{show:a,hide:l,anchorPartial:m,openState:i}}function It(n){return n?Array.from(n.querySelectorAll("[role=option]")).filter(r=>r.getAttribute("aria-disabled")!=="true"&&!r.hasAttribute("disabled")):[]}var xt=require("@domphy/core"),ne=require("@domphy/theme");var da='<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>',oo=1.5,pa=6/oo,Vn=2.5/oo,fa=1/oo,Mn=4/oo,ha=1/oo;function no(n={}){var e;let{removable:r=!1}=n,o=(0,xt.toState)((e=n.color)!=null?e:"neutral","color");return O(E({dataTone:"shift-2"},(0,xt.behavior)("tag-remove",(i,t)=>{let a=()=>i.remove(),l=()=>({span:(0,xt.rawHtml)(da),_key:"tag-remove",onClick:s=>{s.stopPropagation(),a()},onKeyDown:s=>{let c=s;c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),c.stopPropagation(),a())},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:s=>(0,ne.themeSpacing)((0,ne.themeDensity)(s)*ha),width:s=>(0,ne.themeSpacing)((0,ne.themeDensity)(s)*Mn),height:s=>(0,ne.themeSpacing)((0,ne.themeDensity)(s)*Mn),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:s=>(0,ne.themeColor)(s,"shift-4",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))}}}),m=()=>{var s;return(s=i.children.items.find(c=>c instanceof xt.ElementNode&&c.key==="tag-remove"))!=null?s:null},u=s=>{let c=m();s.removable&&!c?i.children.insert(l()):!s.removable&&c&&i.children.remove(c)};return u(t),{update:u}},{removable:r})),{style:{display:"inline-flex",width:"fit-content",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:i=>(0,ne.themeSpacing)((0,ne.themeDensity)(i)*pa),paddingBlock:0,borderRadius:i=>(0,ne.themeSpacing)((0,ne.themeDensity)(i)*999),paddingInlineStart:i=>(0,ne.themeSpacing)((0,ne.themeDensity)(i)*Vn),paddingInlineEnd:i=>(0,ne.themeSpacing)((0,ne.themeDensity)(i)*(r?fa:Vn)),gap:(0,ne.themeSpacing)(1.5),fontSize:i=>(0,ne.themeSize)(i,"decrease-1"),backgroundColor:i=>(0,ne.themeColor)(i,"inherit",o.get(i)),color:i=>(0,ne.themeColor)(i,"text",o.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ne.themeColor)(i,"border-strong",o.get(i))}`}})}function ga(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=(0,Xe.toState)(n.value),l=(0,Xe.toState)(i),{show:m,hide:u,anchorPartial:s}=it({kind:"combobox",open:l,onDismiss:n.onDismiss,placement:(0,Xe.toState)(o),content:n.content}),c={onClick:(g,L)=>!t&&u(L),dataTone:"shift-0",style:{backgroundColor:g=>(0,Q.themeColor)(g,"inherit"),color:g=>(0,Q.themeColor)(g,"text"),borderRadius:g=>(0,Q.themeSpacing)((0,Q.themeDensity)(g)*2),outline:g=>`1px solid ${(0,Q.themeColor)(g,"border-strong")}`,outlineOffset:"-1px",boxShadow:F("medium")}};(0,Xe.merge)(n.content,c);let d=O(E({border:"none",outline:"none",padding:0,margin:0,flex:1,height:(0,Q.themeSpacing)(6),marginInlineStart:(0,Q.themeSpacing)(2),fontSize:g=>(0,Q.themeSize)(g,"inherit")},qe(e)),{backgroundColor:g=>(0,Q.themeColor)(g,"inherit",e)}),p=g=>{var L,P;return(P=(L=g==null?void 0:g.elementNode)==null?void 0:L.getBehavior("comboboxInner"))==null?void 0:P.query},f=g=>{let L=g;for(;L;){if(L._behaviorInstances.has("floating:combobox"))return L;L=L.parent}return g},h=(g,L)=>{var Ne,ge;let P=f(g),Z=P.getRoot().domElement,we=(Ne=Z==null?void 0:Z.querySelector(`#${Me("combobox",P)}`))!=null?Ne:null,U=It(we);if(!U.length)return;let me=U[L?U.length-1:0];me.focus(),(ge=me.scrollIntoView)==null||ge.call(me,{block:"nearest"})},S=(g,L)=>{let P;P=He(l,Z=>{Z&&(P==null||P(),requestAnimationFrame(()=>h(g,L)))},!1),m(g)},R={role:"combobox",ariaHaspopup:"listbox",ariaAutocomplete:"list",ariaExpanded:g=>l.get(g),ariaControls:g=>g!=null&&g.elementNode?Me("combobox",f(g.elementNode)):void 0,onKeyDown:(g,L)=>{let P=g.key;if(!(P!=="ArrowDown"&&P!=="ArrowUp")){if(g.preventDefault(),l.get()){h(L,P==="ArrowUp");return}S(L,P==="ArrowUp")}}},D=g=>g?((0,Xe.merge)(g,E({onClick:(L,P)=>m(P),style:d,_key:"combobox-input"},R)),g):E({input:null,ariaLabel:"Filter options",onClick:(L,P)=>m(P),value:L=>{var P,Z;return(Z=(P=p(L))==null?void 0:P.get(L))!=null?Z:""},onInput:(L,P)=>{var Z;(Z=P.getBehavior("comboboxInner"))==null||Z.query.set(L.target.value),m(P)},style:d,_key:"combobox-input"},R),b=g=>({div:L=>{l.get(L);let P=g.state.get(L),Z=Array.isArray(P)?P:[P],U=g.options.filter(me=>Z.includes(me.value)).map(me=>({span:me.label,$:[no({color:g.color,removable:!0})],_key:me.value,_onRemove:Ne=>{let ge=g.state.get(),We=(Array.isArray(ge)?ge:[ge]).filter(Pe=>Pe!==me.value);g.multiple?g.state.set(We):g.state.set(We[0])}}));return U.push(D(g.input)),U},_key:"comboboxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,Q.themeSpacing)(1)}}),C=O(E({_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onSchedule:(g,L)=>{L[g.tagName]=[b({options:r,multiple:t,color:e,state:a,input:n.input})]}},(0,Xe.behavior)("comboboxInner",(g,L)=>{let P=g.getMetadata("comboboxQuery");return P||(P=(0,Xe.toState)(""),g.setMetadata("comboboxQuery",P)),{query:P,update(Z){g.children.update([b(Z)])}}},{options:r,multiple:t,color:e,state:a,input:n.input})),{style:{minWidth:(0,Q.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Q.themeColor)(g,"border-strong","neutral")}`,paddingBlock:g=>(0,Q.themeSpacing)((0,Q.themeDensity)(g)*1),paddingInline:g=>(0,Q.themeSpacing)((0,Q.themeDensity)(g)*1),borderRadius:g=>(0,Q.themeSpacing)((0,Q.themeDensity)(g)*1.5),fontSize:g=>(0,Q.themeSize)(g,"inherit"),color:g=>(0,Q.themeColor)(g,"text",e),backgroundColor:g=>(0,Q.themeColor)(g,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:g=>v(g,e)}}});return(0,Xe.merge)(s,C),s}var vo=require("@domphy/core"),fe=require("@domphy/theme");function ya(n){return Array.from(n.querySelectorAll("[data-command-item]")).filter(r=>!r.hidden&&!r.hasAttribute("disabled"))}function ba(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=ya(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=(a+1)%i.length;else if(o==="ArrowUp")l=a<=0?i.length-1:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function Sa(){return{role:"group",ariaLabel:"Commands",onKeyDown:ba,_onSchedule:(n,r)=>{(0,vo.merge)(r,{_context:{command:{query:(0,vo.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function va(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:O(E({fontSize:e=>(0,fe.themeSize)(e,"inherit"),paddingInline:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*3),paddingBlock:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,fe.themeColor)(e,"border",r)}`,outline:"none"},qe(r)),{backgroundColor:e=>(0,fe.themeColor)(e,"inherit",r),transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:e=>(0,fe.themeColor)(e,"shift-6",o),boxShadow:e=>v(e,o)}})}}function Ea(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{type:"button",dataCommandItem:"",_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=m=>{var s,c;if(m.length===0){t.hidden=!1;return}let u=(c=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?c:"";t.hidden=!u.includes(m.toLowerCase())};a(i.query.get());let l=i.query.addListener(a);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,fe.themeSize)(e,"inherit"),height:e=>(0,fe.themeSpacing)(6+(0,fe.themeDensity)(e)*2),paddingInline:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,fe.themeColor)(e,"shift-13",r),backgroundColor:e=>(0,fe.themeColor)(e,"inherit",r),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:e=>(0,fe.themeColor)(e,"shift-13",r),backgroundColor:e=>(0,fe.themeColor)(e,"hover",r)},"&:focus-visible":{boxShadow:e=>v(e,o)}}}}var Re=require("@domphy/core"),T=require("@domphy/theme");var ve=n=>new Date(n.getFullYear(),n.getMonth(),n.getDate()),Pt=(n,r)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+r),Ko=(n,r)=>new Date(n.getFullYear(),n.getMonth()+r,n.getDate()),ro=(n,r)=>!!n&&!!r&&n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate(),Wo=n=>`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}-${String(n.getDate()).padStart(2,"0")}`,jo=(n,r)=>Pt(n,-((n.getDay()-r+7)%7));function xa(n){var r,o;try{let e=new Intl.Locale(n),i=(o=(r=e.getWeekInfo)==null?void 0:r.call(e))!=null?o:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function Ca(n,r){let o=r,e=null,i=a=>{e==null||e(),e=a.onChange?a.selection.addListener(l=>a.onChange(l)):null},t=(a,l)=>{a!==l&&a.set(l.get())};return i(o),{update(a){a.selectionIsCallerOwned||t(a.selection,o.selection),t(a.viewYear,o.viewYear),t(a.viewMonth,o.viewMonth),t(a.focused,o.focused),t(a.hovered,o.hovered),t(a.hour,o.hour),t(a.minute,o.minute),t(a.open,o.open),(a.selection!==o.selection||a.onChange!==o.onChange)&&i(a),o=a},destroy(){e==null||e(),e=null}}}function ka(n={}){var hn,gn,yn,bn;let{mode:r="single",time:o=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:m}=n,u=(hn=n.weekStartsOn)!=null?hn:xa(a),s=(0,Re.toState)((gn=n.accentColor)!=null?gn:"primary","accentColor"),c=(0,Re.toState)((yn=n.placement)!=null?yn:"bottom-start"),d=(0,Re.toState)((bn=n.value)!=null?bn:r==="range"?[null,null]:null),p=(()=>{let y=d.get(),w=r==="range"?y==null?void 0:y[0]:y;return w instanceof Date?w:new Date})(),f=(0,Re.toState)(p.getFullYear(),"viewYear"),h=(0,Re.toState)(p.getMonth(),"viewMonth"),S=(0,Re.toState)(ve(p),"focused"),x=(0,Re.toState)(null,"hovered"),R=(0,Re.toState)(p.getHours(),"hour"),D=(0,Re.toState)(p.getMinutes(),"minute"),b=new Intl.DateTimeFormat(a,E({dateStyle:"medium"},o?{timeStyle:"short"}:{})),k=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),C=new Intl.DateTimeFormat(a,{weekday:"short"}),g=new Intl.DateTimeFormat(a,{dateStyle:"full"}),L=y=>y?b.format(y):"",P=y=>{if(l)return l(y);if(r==="range"){let[w,I]=y!=null?y:[null,null];return w?`${L(w)} \u2013 ${L(I)}`:""}return L(y)},Z=Array.from({length:7},(y,w)=>C.format(new Date(2023,0,1+(w+u)%7))),we=y=>!!e&&ve(y)<ve(e)||!!i&&ve(y)>ve(i)||!!t&&t(y),U=y=>{if(!o)return ve(y);let w=ve(y);return w.setHours(R.get(),D.get(),0,0),w},me=(y,w)=>{var M;if(we(y))return;if(r==="single"){d.set(U(y)),o||Bt(w);return}let[I,A]=(M=d.get())!=null?M:[null,null];!I||I&&A?d.set([U(y),null]):ve(y)<ve(I)?(d.set([U(y),U(I)]),o||Bt(w)):(d.set([I,U(y)]),o||Bt(w))},Ne=()=>{var y;if(o)if(r==="single"){let w=d.get();w&&d.set(U(w))}else{let[w,I]=(y=d.get())!=null?y:[null,null];d.set([w&&U(w),I&&U(I)])}},ge=(y,w)=>{var Ft;if(r!=="range")return!1;let[I,A]=(Ft=d.get(w))!=null?Ft:[null,null],M=A!=null?A:x.get(w);if(!I||!M)return!1;let H=ve(I)<=ve(M)?I:M,je=ve(I)<=ve(M)?M:I,Ve=ve(y);return Ve>=ve(H)&&Ve<=ve(je)},Ke=(y,w)=>{let I=d.get(w);if(r==="range"){let[A,M]=I!=null?I:[null,null];return ro(y,A)||ro(y,M)}return ro(y,I)},We=y=>{f.set(y.getFullYear()),h.set(y.getMonth())},Pe=y=>{let w=Ko(new Date(f.get(),h.get(),1),y);We(w)},Dt=y=>f.set(f.get()+y),nt=y=>{var I;let w=(I=y==null?void 0:y.getRoot())==null?void 0:I.domElement;setTimeout(()=>{var A;(A=w==null?void 0:w.querySelector(`[data-date="${Wo(S.get())}"]`))==null||A.focus()},0)},$t=_e(),Ht=(0,Re.toState)(!1),{show:fo,hide:Bt,anchorPartial:Qt}=it({kind:"datePicker",open:Ht,placement:c,content:$t}),ho=E({type:"text",readonly:!0,value:y=>P(d.get(y)),role:"combobox",ariaHaspopup:"dialog",ariaExpanded:y=>Ht.get(y),ariaControls:y=>y!=null&&y.elementNode?Me("datePicker",y.elementNode):void 0,ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(y,w)=>{V(w)},onKeyDown:(y,w)=>{let I=y.key;(I==="ArrowDown"||I==="Enter")&&(y.preventDefault(),V(w))}},(0,Re.behavior)("datePicker",Ca,{selection:d,selectionIsCallerOwned:n.value!==void 0,viewYear:f,viewMonth:h,focused:S,hovered:x,hour:R,minute:D,open:Ht,onChange:m}));function V(y){var I;let w=(I=le())!=null?I:new Date;S.set(ve(w)),We(w),fo(y),nt(y)}function le(){var w;let y=d.get();return r==="range"?(w=y==null?void 0:y[0])!=null?w:null:y!=null?y:null}return(0,Re.merge)(Qt,ho),Qt;function _e(){let y=(H,je,Ve)=>({button:H,type:"button",ariaLabel:je,onClick:Ve,style:wa()}),w={div:[y("\xAB","Previous year",()=>Dt(-1)),y("\u2039","Previous month",()=>Pe(-1)),{div:H=>k.format(new Date(f.get(H),h.get(H),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:(0,T.themeWeight)("bold"),fontSize:H=>(0,T.themeSize)(H)}},y("\u203A","Next month",()=>Pe(1)),y("\xBB","Next year",()=>Dt(1))],style:{display:"flex",alignItems:"center",gap:(0,T.themeSpacing)(1),marginBottom:(0,T.themeSpacing)(2)}},I={div:Z.map((H,je)=>({div:H,style:{textAlign:"center",fontSize:Ve=>(0,T.themeSize)(Ve,"decrease-1"),fontWeight:(0,T.themeWeight)("bold"),color:Ve=>(0,T.themeColor)(Ve,"shift-7"),paddingBlock:(0,T.themeSpacing)(1)},_key:je})),role:"row",style:An()},A={div:H=>Oe(H),role:"grid",ariaLabel:"Calendar",onKeyDown:_r,onMouseLeave:()=>r==="range"&&x.set(null),style:{display:"flex",flexDirection:"column",gap:(0,T.themeSpacing)(.5)}},M=[w,I,A];return o&&M.push(Ar()),M.push(Nr()),{div:M,role:"dialog",ariaModal:"false",dataTone:"shift-0",style:{minWidth:(0,T.themeSpacing)(70),padding:(0,T.themeSpacing)(3),borderRadius:H=>(0,T.themeSpacing)((0,T.themeDensity)(H)*2),backgroundColor:H=>(0,T.themeColor)(H,"inherit"),color:H=>(0,T.themeColor)(H,"text"),outline:H=>`1px solid ${(0,T.themeColor)(H,"border-strong")}`,outlineOffset:"-1px",boxShadow:F("medium")}}}function Oe(y){let w=new Date(f.get(y),h.get(y),1),I=h.get(y),A=jo(w,u),M=[];for(let H=0;H<6;H++){let je=[];for(let Ve=0;Ve<7;Ve++){let Ft=Pt(A,H*7+Ve);je.push(eo(Ft,I,y))}M.push({div:je,role:"row",style:An(),_key:H})}return M}function eo(y,w,I){let A=we(y),M=Ke(y,I),H=ge(y,I),je=y.getMonth()!==w,Ve=ro(y,S.get(I)),Ft=ro(y,new Date);return{button:String(y.getDate()),type:"button",role:"gridcell",tabIndex:Ve?0:-1,ariaSelected:M,ariaDisabled:A,disabled:A,ariaLabel:g.format(y),dataDate:Wo(y),onClick:(oe,$r)=>me(y,$r),onMouseEnter:()=>r==="range"&&x.set(y),style:{appearance:"none",border:"none",cursor:A?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,T.themeSpacing)(1),fontSize:oe=>(0,T.themeSize)(oe),opacity:A?.35:je?.5:1,backgroundColor:oe=>M?(0,T.themeColor)(oe,"shift-13",s.get(oe)):H?(0,T.themeColor)(oe,"hover",s.get(oe)):"transparent",color:oe=>M?(0,T.themeColor)(oe,"shift-0","neutral"):H?(0,T.themeColor)(oe,(0,T.textToneOn)(2)):(0,T.themeColor)(oe,"text"),outline:Ft?oe=>`1px solid ${(0,T.themeColor)(oe,"shift-6",s.get(oe))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":E({backgroundColor:oe=>M?(0,T.themeColor)(oe,"shift-13",s.get(oe)):(0,T.themeColor)(oe,"shift-3",s.get(oe))},M?{}:{color:oe=>(0,T.themeColor)(oe,(0,T.textToneOn)(3))}),transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:oe=>v(oe,s.get(oe))}},_key:Wo(y)}}function Ar(){let y=(w,I,A)=>({select:Array.from({length:w},(M,H)=>({option:String(H).padStart(2,"0"),value:String(H),selected:je=>I.get(je)===H,_key:H})),ariaLabel:A,onChange:M=>{I.set(Number(M.target.value)),Ne()},style:Ta()});return{div:[y(24,R,"Hour"),{span:":",style:{fontWeight:(0,T.themeWeight)("bold")}},y(60,D,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,T.themeSpacing)(1),marginTop:(0,T.themeSpacing)(3)}}}function Nr(){let y=(w,I)=>({button:w,type:"button",onClick:(A,M)=>I(M),style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:A=>(0,T.themeSize)(A,"decrease-1"),color:A=>(0,T.themeColor)(A,"muted",s.get(A)),padding:(0,T.themeSpacing)(1)}});return{div:[y("Today",w=>{let I=new Date;S.set(ve(I)),We(I),nt(w)}),y("Clear",()=>{d.set(r==="range"?[null,null]:null),x.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,T.themeSpacing)(2),paddingTop:(0,T.themeSpacing)(2),borderTop:w=>`1px solid ${(0,T.themeColor)(w,"border")}`}}}function _r(y,w){let I=y,A=S.get(),M=null;switch(I.key){case"ArrowLeft":M=Pt(A,-1);break;case"ArrowRight":M=Pt(A,1);break;case"ArrowUp":M=Pt(A,-7);break;case"ArrowDown":M=Pt(A,7);break;case"Home":M=jo(A,u);break;case"End":M=Pt(jo(A,u),6);break;case"PageUp":M=Ko(A,I.shiftKey?-12:-1);break;case"PageDown":M=Ko(A,I.shiftKey?12:1);break;case"Enter":case" ":I.preventDefault(),me(A,w);return;default:return}I.preventDefault(),S.set(M),We(M),nt(w)}}function An(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,T.themeSpacing)(.5)}}function wa(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontSize:n=>(0,T.themeSize)(n),color:n=>(0,T.themeColor)(n,"muted"),width:(0,T.themeSpacing)(7),height:(0,T.themeSpacing)(7),borderRadius:(0,T.themeSpacing)(1),"&:hover":{backgroundColor:n=>(0,T.themeColor)(n,"shift-3"),color:n=>(0,T.themeColor)(n,(0,T.textToneOn)(3))}}}function Ta(){return{fontSize:n=>(0,T.themeSize)(n),padding:(0,T.themeSpacing)(1),borderRadius:(0,T.themeSpacing)(1),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${(0,T.themeColor)(n,"border-strong")}`,backgroundColor:n=>(0,T.themeColor)(n,"inherit"),color:n=>(0,T.themeColor)(n,"text")}}var Nn=require("@domphy/core"),Ze=require("@domphy/theme");function Da(n={}){var o;let r=(0,Nn.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${(0,Ze.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Ze.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:(0,Ze.themeWeight)("semibold"),fontSize:e=>(0,Ze.themeSize)(e,"inherit"),color:e=>(0,Ze.themeColor)(e,"shift-10",r.get(e))},"& dd":{margin:0,fontSize:e=>(0,Ze.themeSize)(e,"inherit"),color:e=>(0,Ze.themeColor)(e,"text",r.get(e))}}}}var qo=require("@domphy/core"),$=require("@domphy/theme");function Ia(n={}){var i,t;let{duration:r=240}=n,o=(0,qo.toState)((i=n.color)!=null?i:"neutral","color"),e=(0,qo.toState)((t=n.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>(0,$.themeSize)(a,"inherit"),color:a=>(0,$.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,$.themeColor)(a,"inherit",o.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,$.themeColor)(a,"shift-2",o.get(a)),color:a=>(0,$.themeColor)(a,"shift-11",o.get(a)),fontSize:a=>(0,$.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,$.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:(0,$.themeWeight)("medium"),paddingInline:a=>(0,$.themeSpacing)((0,$.themeDensity)(a)*4),height:(0,$.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,$.themeSpacing)(2),height:(0,$.themeSpacing)(2),flexShrink:0,marginTop:(0,$.themeSpacing)(-.5),borderInlineEnd:a=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(a,"shift-9",o.get(a))}`,borderBottom:a=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(a,"shift-9",o.get(a))}`,transform:"rotate(45deg)",transition:`transform ${r}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>(0,$.themeColor)(a,"shift-3",o.get(a)),color:a=>(0,$.themeColor)(a,(0,$.textToneOn)(3),o.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,$.themeSpacing)((0,$.themeDensity)(a)*2),boxShadow:a=>v(a,e.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>(0,$.themeSpacing)((0,$.themeDensity)(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${r}ms ease, opacity ${r}ms ease, padding ${r}ms ease`},"&[open] > :not(summary)":{maxHeight:"none",opacity:1,paddingTop:a=>(0,$.themeSpacing)((0,$.themeDensity)(a)*1),paddingBottom:a=>(0,$.themeSpacing)((0,$.themeDensity)(a)*3)}}}}var $n=require("@domphy/core"),Ue=require("@domphy/theme");var ao=0;function Eo(){ao++,ao===1&&(document.body.style.overflow="hidden")}function jt(){ao=Math.max(0,ao-1),ao===0&&(document.body.style.overflow="")}var _n='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function Pa(n,r){let{state:o,onDismiss:e}=r,i=null,t=!1,a=!1,l=null,m=n.domElement;m.setAttribute("aria-modal","true");let u=()=>{t=!1,typeof m.close=="function"&&m.close(),m.style.visibility="hidden",m.style.pointerEvents="none",m.style.display="none",a&&(jt(),a=!1),i==null||i.focus(),i=null},s=f=>{if(f.key!=="Tab")return;let h=Array.from(m.querySelectorAll(_n)).filter(R=>!R.closest("[aria-hidden='true']")&&R.getClientRects().length>0);if(!h.length){f.preventDefault();return}let S=h[0],x=h[h.length-1];f.shiftKey?(document.activeElement===S||document.activeElement===m)&&(f.preventDefault(),x.focus()):document.activeElement===x&&(f.preventDefault(),S.focus())},c=f=>{f.preventDefault(),!So(m)&&Et(o,e)};m.addEventListener("cancel",c);let d=f=>{if(f)t=!1,l&&(clearTimeout(l),l=null),i=document.activeElement,m.style.visibility="visible",m.style.pointerEvents="auto",m.style.display="",typeof m.showModal=="function"&&!m.open&&m.showModal(),a||(Eo(),a=!0),m.addEventListener("keydown",s),requestAnimationFrame(()=>{var S;m.style.opacity="1";let h=(S=m.querySelector("[autofocus]:not([disabled])"))!=null?S:m.querySelector(_n);h==null||h.focus()});else{if(t=!0,m.style.opacity="0",m.removeEventListener("keydown",s),!m.open){u();return}l=setTimeout(()=>{l=null,t&&u()},350)}},p=He(o,d);return{requestClose:()=>Et(o,e),onTransitionEnd:f=>{t&&f.target===m&&f.propertyName==="opacity"&&u()},update(f){e=f.onDismiss,f.state!==o&&(p(),o=f.state,p=He(o,d,!1))},destroy(){l&&(clearTimeout(l),l=null),p(),m.removeEventListener("cancel",c),a&&(jt(),a=!1),m.removeEventListener("keydown",s),i==null||i.focus(),i=null}}}function Oa(n={}){let{color:r="neutral",open:o=!1,labelledBy:e,describedBy:i,onDismiss:t}=n,a=Wt(o);return O(E({_onInsert:l=>{l.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')}},(0,$n.behavior)("dialog",Pa,{state:a,onDismiss:t})),{ariaLabelledby:e,ariaDescribedby:i,onClick:(l,m)=>{var c;if(l.target!==m.domElement)return;let u=m.domElement.getBoundingClientRect();l.clientX>=u.left&&l.clientX<=u.right&&l.clientY>=u.top&&l.clientY<=u.bottom||(c=m.getBehavior("dialog"))==null||c.requestClose()},onTransitionEnd:(l,m)=>{var u;return(u=m.getBehavior("dialog"))==null?void 0:u.onTransitionEnd(l)},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:l=>(0,Ue.themeSize)(l,"inherit"),color:l=>(0,Ue.themeColor)(l,"shift-10",r),backgroundColor:l=>(0,Ue.themeColor)(l,"inherit",r),border:"none",borderRadius:l=>(0,Ue.themeSpacing)((0,Ue.themeDensity)(l)*2),padding:l=>(0,Ue.themeSpacing)((0,Ue.themeDensity)(l)*3),boxShadow:F("high"),"&::backdrop":{backgroundColor:l=>(0,Ue.themeColor)(l,"shift-2","neutral"),opacity:.75}}})}var Hn=require("@domphy/core"),ft=require("@domphy/theme");function La(n={}){var o;let r=(0,Hn.toState)((o=n.color)!=null?o:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:(0,ft.themeSpacing)(2),fontSize:e=>(0,ft.themeSize)(e,"inherit"),backgroundColor:e=>(0,ft.themeColor)(e),color:e=>(0,ft.themeColor)(e,"text",r.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,ft.themeColor)(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,ft.themeColor)(e,"border-strong",r.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var Bn=require("@domphy/core"),Ae=require("@domphy/theme");var Uo={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"},qt=n=>n==="left"||n==="right";function Kn(n,r){return n==="start"?r?"right":"left":n==="end"?r?"left":"right":n}function Ra(n,r){let{state:o,onDismiss:e,placement:i,size:t}=r,a=n.domElement;a.setAttribute("aria-modal","true");let l=x=>{x.preventDefault(),!So(a)&&Et(o,e)};a.addEventListener("cancel",l);let m=(x,R)=>{let b=(x==="start"||x==="end")&&(a.ownerDocument.documentElement.dir==="rtl"||a.ownerDocument.dir==="rtl"),k=Kn(x,b),C=R!=null?R:qt(k)?(0,Ae.themeSpacing)(80):(0,Ae.themeSpacing)(64);return a.style.margin=Fn[k],a.style.width=qt(k)?C:"100dvw",a.style.height=qt(k)?"100dvh":C,k},u=m(i,t),s=!1,c=!1,d=null,p=()=>{d=null,s&&(s=!1,typeof a.close=="function"&&a.close(),a.style.visibility="hidden",a.style.pointerEvents="none",a.style.display="none",c&&(jt(),c=!1))},f=x=>{x.target===a&&x.propertyName==="transform"&&p()};a.addEventListener("transitionend",f);let h=x=>{if(x)s=!1,d&&(clearTimeout(d),d=null),a.style.visibility="visible",a.style.pointerEvents="auto",a.style.display="",typeof a.showModal=="function"&&!a.open&&a.showModal(),c||(Eo(),c=!0),requestAnimationFrame(()=>{a.style.transform="translate(0, 0)"});else{if(s=!0,a.style.transform=Uo[u],!a.open){p();return}d=setTimeout(p,350)}},S=He(o,h);return{requestClose:()=>Et(o,e),update(x){e=x.onDismiss,x.state!==o&&(S(),o=x.state,S=He(o,h,!1)),(x.placement!==i||x.size!==t)&&(i=x.placement,t=x.size,u=m(i,t),o.get()||(a.style.transform=Uo[u]))},destroy(){d&&(clearTimeout(d),d=null),S(),a.removeEventListener("cancel",l),a.removeEventListener("transitionend",f),c&&(jt(),c=!1)}}}function za(n={}){let{color:r="neutral",open:o=!1,onDismiss:e,placement:i="end",size:t}=n,a=Wt(o),l=Kn(i,!1),m=qt(l)?(0,Ae.themeSpacing)(80):(0,Ae.themeSpacing)(64),u=t!=null?t:m;return O(E({_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')}},(0,Bn.behavior)("drawer",Ra,{state:a,onDismiss:e,placement:i,size:t})),{onClick:(s,c)=>{var f;if(s.target!==c.domElement)return;let d=c.domElement.getBoundingClientRect();s.clientX>=d.left&&s.clientX<=d.right&&s.clientY>=d.top&&s.clientY<=d.bottom||(f=c.getBehavior("drawer"))==null||f.requestClose()},style:{transform:Uo[l],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:s=>(0,Ae.themeSize)(s,"inherit"),color:s=>(0,Ae.themeColor)(s,"shift-10",r),backgroundColor:s=>(0,Ae.themeColor)(s,"inherit",r),border:"none",padding:s=>(0,Ae.themeSpacing)((0,Ae.themeDensity)(s)*3),margin:Fn[l],width:qt(l)?u:"100dvw",height:qt(l)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:F("high"),"&::backdrop":{backgroundColor:s=>(0,Ae.themeColor)(s,"shift-2","neutral"),opacity:.75}}})}var Wn=require("@domphy/core"),xo=require("@domphy/theme");function Va(n={}){var o;let r=(0,Wn.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>(0,xo.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,xo.themeColor)(e,"shift-10",r.get(e))}}}var jn=require("@domphy/core"),Ct=require("@domphy/theme");function Ma(n={}){var o;let r=(0,jn.toState)((o=n.color)!=null?o:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,Ct.themeSpacing)(3),paddingBlock:(0,Ct.themeSpacing)(12),paddingInline:(0,Ct.themeSpacing)(6),textAlign:"center",color:e=>(0,Ct.themeColor)(e,"muted",r.get(e)),"& > :first-child":{color:e=>(0,Ct.themeColor)(e,"shift-5",r.get(e)),opacity:.9},"& > :nth-child(2)":{color:e=>(0,Ct.themeColor)(e,"text",r.get(e))}}}}var Yo="errorBoundaryOriginal";function Aa(n){var o;let r=n.getMetadata(Yo);if(typeof r=="function"){(o=n._childrenRelease)==null||o.call(n),n._setupFunctionChildren(r);return}if(r!=null){n.children.update(Array.isArray(r)?r:[r]);return}n.children.update([])}function Na(n={}){return{_onSchedule:(r,o)=>{r.getMetadata(Yo)===void 0&&r.setMetadata(Yo,o[r.tagName])},_onError:(r,o)=>{var t,a;(t=n.onError)==null||t.call(n,o);let e=()=>Aa(r),i=typeof n.fallback=="function"?n.fallback(o,e):(a=n.fallback)!=null?a:{div:"An error occurred."};r.children.update([i])}}}var qn=require("@domphy/core"),ht=require("@domphy/theme");var _a={small:8,medium:10,large:14};function $a(n={}){var e,i;let r=(0,qn.toState)((e=n.color)!=null?e:"primary","color"),o=(0,ht.themeSpacing)(_a[(i=n.size)!=null?i:"medium"]);return{type:"button",_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:o,height:o,borderRadius:"50%",fontSize:t=>(0,ht.themeSize)(t,"inherit"),backgroundColor:t=>(0,ht.themeColor)(t,"shift-13",r.get(t)),color:t=>(0,ht.themeColor)(t,"shift-0","neutral"),boxShadow:F("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ht.themeColor)(t,"shift-14",r.get(t)),boxShadow:F("medium")},"&:active:not([disabled])":{backgroundColor:t=>(0,ht.themeColor)(t,"shift-15",r.get(t)),boxShadow:F("low")},"&:focus-visible":{boxShadow:t=>`${F("medium")}, ${v(t,r.get(t))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Un=require("@domphy/core"),lt=require("@domphy/theme");function Ha(n={}){var o;let r=(0,Un.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:(0,lt.themeSpacing)(2),marginInline:0,marginTop:(0,lt.themeSpacing)(3),marginBottom:(0,lt.themeSpacing)(3),color:e=>(0,lt.themeColor)(e,"text",r.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,lt.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,lt.themeSize)(e,"decrease-1"),color:e=>(0,lt.themeColor)(e,"muted",r.get(e)),lineHeight:1.45}}}}var Yn=require("@domphy/core"),W=require("@domphy/theme");function Ba(n={}){var i;let{layout:r="horizontal"}=n,o=(0,Yn.toState)((i=n.color)!=null?i:"neutral","color"),e=r==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*3),paddingBlock:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*2),fontSize:t=>(0,W.themeSize)(t,"inherit"),backgroundColor:t=>(0,W.themeColor)(t,"inherit",o.get(t)),color:t=>(0,W.themeColor)(t,"text",o.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,W.themeSpacing)(4),rowGap:(0,W.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,W.themeSize)(t,"inherit"),fontWeight:(0,W.themeWeight)("semibold"),paddingBlock:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*1),borderRadius:t=>(0,W.themeSpacing)((0,W.themeDensity)(t)*2),color:t=>(0,W.themeColor)(t,"text",o.get(t)),backgroundColor:t=>(0,W.themeColor)(t,"inherit",o.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?0:(0,W.themeSpacing)((0,W.themeDensity)(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p, input[type=checkbox], input[type=radio], input[type=color])":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > input[type=checkbox], & > input[type=radio], & > input[type=color]":{gridColumn:e?"1":"2",justifySelf:"start"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${(0,W.themeSpacing)(2)} * -1)`,fontSize:t=>(0,W.themeSize)(t,"decrease-1"),color:t=>(0,W.themeColor)(t,"text",o.get(t))}}}}var Co=require("@domphy/theme");function Fa(n={}){let{columns:r=1,gap:o=4,align:e}=n;return{style:E({display:"grid",gridTemplateColumns:typeof r=="number"?`repeat(${r}, minmax(0, 1fr))`:r,gap:i=>(0,Co.themeSpacing)((0,Co.themeDensity)(i)*o)},e?{alignItems:e}:{})}}var Gn=require("@domphy/core"),Ot=require("@domphy/theme"),Ka={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Wa(n={}){var e;let r=(0,Gn.toState)((e=n.color)!=null?e:"neutral","color"),o=n.size;return{_onInsert:i=>{["h1","h2","h3","h4","h5","h6"].includes(i.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:i=>(0,Ot.themeColor)(i,"shift-11",r.get(i)),marginTop:0,marginBottom:(0,Ot.themeSpacing)(2),fontSize:i=>{if(o!==void 0)return(0,Ot.themeSize)(i,o);let t=Ka[i.elementNode.tagName]||"inherit";return(0,Ot.themeSize)(i,t)}}}}var Jn=require("@domphy/core"),Ut=require("@domphy/theme");function ja(n={}){var o;let r=(0,Jn.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:(0,Ut.themeSpacing)(3),marginBottom:(0,Ut.themeSpacing)(3),backgroundColor:e=>(0,Ut.themeColor)(e,"inherit",r.get(e)),color:e=>(0,Ut.themeColor)(e,"text",r.get(e))}}}var Xn=require("@domphy/core"),Lt=require("@domphy/theme");function qa(n={}){var o;let r=(0,Xn.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:(0,Lt.themeSpacing)(4),height:(0,Lt.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Lt.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Lt.themeColor)(e,"text",r.get(e))}}}var Zn=require("@domphy/core"),io=require("@domphy/theme");function Ua(n){var o;let r=(0,Zn.toState)((o=n.color)!=null?o:"neutral","color");return{alt:n.decorative?"":n.alt,dataTone:"shift-2",_onInsert:e=>{e.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:(0,io.themeSpacing)(2),backgroundColor:e=>(0,io.themeColor)(e,"inherit",r.get(e)),color:e=>(0,io.themeColor)(e,"text",r.get(e))}}}var Go=require("@domphy/core"),j=require("@domphy/theme");function Ya(n={}){var e,i;let r=(0,Go.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,Go.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,j.themeSize)(t,"inherit"),color:t=>(0,j.themeColor)(t,"text",r.get(t)),display:"inline-flex",position:"relative",width:(0,j.themeSpacing)(6),height:(0,j.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,j.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong",r.get(t))}`,color:t=>(0,j.themeColor)(t,"text",r.get(t)),width:(0,j.themeSpacing)(4),height:(0,j.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,j.themeColor)(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,j.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,j.themeColor)(t,"shift-7",o.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${(0,j.themeSpacing)(.5)} solid ${(0,j.themeColor)(t,"inherit",o.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,j.themeColor)(t,"shift-6",o.get(t))}`,backgroundColor:t=>(0,j.themeColor)(t,"shift-3",o.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,j.themeColor)(t,"shift-8",o.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,j.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:(0,j.themeSpacing)(1.5),boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${(0,j.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,j.themeColor)(t,"inherit","neutral")},"&[disabled]:checked::before":{backgroundColor:t=>(0,j.themeColor)(t,"shift-8","neutral")},"&[disabled]:indeterminate::before":{backgroundColor:t=>(0,j.themeColor)(t,"shift-3","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",borderColor:t=>(0,j.themeColor)(t,"shift-0","neutral")},"&[disabled]:indeterminate::after":{pointerEvents:"none",backgroundColor:t=>(0,j.themeColor)(t,"shift-8","neutral")}}}}var Qn=require("@domphy/core"),ye=require("@domphy/theme");function Ga(n={}){var o;let r=(0,Qn.toState)((o=n.color)!=null?o:"neutral","color");return{type:"color",_onInsert:e=>{e.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag')},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:e=>(0,ye.themeSize)(e,"inherit"),color:e=>(0,ye.themeColor)(e,"text",r.get(e)),paddingBlock:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1),paddingInline:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1),blockSize:e=>(0,ye.themeSpacing)(6+(0,ye.themeDensity)(e)*2),inlineSize:e=>(0,ye.themeSpacing)(6+(0,ye.themeDensity)(e)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:e=>(0,ye.themeSpacing)((0,ye.themeDensity)(e)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,ye.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,ye.themeColor)(e,"border-strong","neutral")}`}}}}var Jo=require("@domphy/core"),be=require("@domphy/theme");function Ja(n={}){var i,t;let{mode:r="datetime-local"}=n,o=(0,Jo.toState)((i=n.color)!=null?i:"neutral","color"),e=(0,Jo.toState)((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag')},style:{fontSize:a=>(0,be.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,be.themeColor)(a,"text",o.get(a)),backgroundColor:a=>(0,be.themeColor)(a,"inherit",o.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,be.themeColor)(a,"border-strong",o.get(a))}`,borderRadius:a=>(0,be.themeSpacing)((0,be.themeDensity)(a)*1.5),paddingInline:a=>(0,be.themeSpacing)((0,be.themeDensity)(a)*3),height:a=>(0,be.themeSpacing)(6+(0,be.themeDensity)(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,be.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,be.themeColor)(a,"muted","neutral"),backgroundColor:a=>(0,be.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,be.themeColor)(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${(0,be.themeSpacing)(.5)} solid ${(0,be.themeColor)(a,"shift-6","error")}`}}}}var Xo=require("@domphy/core"),J=require("@domphy/theme");function Xa(n={}){var e,i;let r=(0,Xo.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,Xo.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag')},style:{display:"inline-flex",alignItems:"center",fontSize:t=>(0,J.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,J.themeColor)(t,"text",r.get(t)),backgroundColor:t=>(0,J.themeColor)(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,J.themeColor)(t,"border-strong",r.get(t))}`,borderRadius:t=>(0,J.themeSpacing)((0,J.themeDensity)(t)*1.5),height:t=>(0,J.themeSpacing)(6+(0,J.themeDensity)(t)*2),paddingInline:t=>(0,J.themeSpacing)((0,J.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:t=>(0,J.themeSpacing)((0,J.themeDensity)(t)),fontSize:"inherit",border:"none",borderRadius:(0,J.themeSpacing)(1),height:(0,J.themeSpacing)(6),paddingInline:(0,J.themeSpacing)(2),cursor:"pointer",color:t=>(0,J.themeColor)(t,"shift-11",r.get(t)),backgroundColor:t=>(0,J.themeColor)(t,"surface",r.get(t))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,J.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,J.themeColor)(t,"muted","neutral"),outline:t=>`1px solid ${(0,J.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,J.themeColor)(t,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,J.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,J.themeColor)(t,"shift-3","neutral")}}}}var Zo=require("@domphy/core"),Se=require("@domphy/theme");function Za(n={}){var e,i;let r=(0,Zo.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,Zo.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag')},style:O(E({lineHeight:"inherit",minWidth:(0,Se.themeSpacing)(10),paddingInlineStart:t=>(0,Se.themeSpacing)((0,Se.themeDensity)(t)*3),paddingInlineEnd:t=>(0,Se.themeSpacing)((0,Se.themeDensity)(t)*1.5),paddingBlock:t=>(0,Se.themeSpacing)((0,Se.themeDensity)(t)*1),borderRadius:t=>(0,Se.themeSpacing)((0,Se.themeDensity)(t)*1.5),fontSize:t=>(0,Se.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,Se.themeColor)(t,"border-strong",r.get(t))}`},qe(r)),{backgroundColor:t=>(0,Se.themeColor)(t,"inherit",r.get(t)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,Se.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,Se.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,Se.themeColor)(t,"border-strong","neutral")}`,color:t=>(0,Se.themeColor)(t,"muted","neutral")}})}}var Qo=require("@domphy/theme");function Qa(){return{role:"group",ariaLabel:"One-time password",style:{display:"flex",alignItems:"center",gap:(0,Qo.themeSpacing)(2),"& > input":{minWidth:(0,Qo.themeSpacing)(9)}},_onMount:n=>{let r=n.domElement,o=()=>Array.from(r.querySelectorAll("input")),e=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);m.value&&u<l.length-1&&l[u+1].focus()},i=a=>{if(a.isComposing)return;let l=o(),m=a.target,u=l.indexOf(m);a.key==="Backspace"&&!m.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&(a.preventDefault(),l[u-1].focus()),a.key==="ArrowRight"&&u<l.length-1&&(a.preventDefault(),l[u+1].focus())},t=a=>{var d,p,f;a.preventDefault();let l=(p=(d=a.clipboardData)==null?void 0:d.getData("text"))!=null?p:"",m=o(),u=m.indexOf(a.target),s=u===-1?0:u;[...l].forEach((h,S)=>{let x=m[s+S];x&&(x.value=h,x.dispatchEvent(new Event("input",{bubbles:!0})),x.dispatchEvent(new Event("change",{bubbles:!0})))});let c=Math.min(s+l.length-1,m.length-1);(f=m[c])==null||f.focus()};r.addEventListener("input",e),r.addEventListener("keydown",i),r.addEventListener("paste",t),n.addHook("Remove",()=>{r.removeEventListener("input",e),r.removeEventListener("keydown",i),r.removeEventListener("paste",t)})}}}var kt=require("@domphy/core"),de=require("@domphy/theme");var ei='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',ti='<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>',oi=["name","value","onInput","disabled","required"];function er(n){if(n!=null)return typeof n=="function"?n:(0,kt.isState)(n)?r=>n.get(r):n}function ni(n={}){var t,a;let r=(0,kt.toState)((t=n.color)!=null?t:"neutral","color"),o=(0,kt.toState)((a=n.accentColor)!=null?a:"primary","accentColor"),e=(0,kt.toState)(!1),i={};return{_onInsert:l=>{l.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onSchedule:(l,m)=>{let u=m;for(let s of oi)u[s]!==void 0&&(i[s]=u[s],delete u[s])},_onInit:l=>{var h,S,x,R,D,b,k;let m=(h=n.name)!=null?h:i.name,u=er((S=n.value)!=null?S:i.value),s=(x=n.onInput)!=null?x:i.onInput,c=er((R=n.disabled)!=null?R:i.disabled),d=(D=n.required)!=null?D:i.required,p=O(E(E(E(E(E({input:null,type:C=>e.get(C)?"text":"password",ariaLabel:(b=n.ariaLabel)!=null?b:"Password",autocomplete:(k=n.autocomplete)!=null?k:"current-password"},m!=null?{name:m}:{}),u!=null?{value:u}:{}),s!=null?{onInput:s}:{}),c!=null?{disabled:c}:{}),d!=null?{required:d}:{}),{style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}}),f={button:C=>(0,kt.rawHtml)(e.get(C)?ti:ei),type:"button",ariaLabel:C=>e.get(C)?"Hide password":"Show password",onClick:()=>e.set(!e.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",fontSize:C=>(0,de.themeSize)(C,"inherit"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,minWidth:(0,de.themeSpacing)(6),minHeight:(0,de.themeSpacing)(6),marginInlineEnd:C=>`calc(${(0,de.themeSpacing)((0,de.themeDensity)(C)*1)} * -1)`,opacity:.6}};l.children.insert(p),l.children.insert(f)},style:{display:"flex",alignItems:"center",gap:l=>(0,de.themeSpacing)((0,de.themeDensity)(l)*1),paddingBlock:l=>(0,de.themeSpacing)((0,de.themeDensity)(l)*1),paddingInline:l=>(0,de.themeSpacing)((0,de.themeDensity)(l)*3),borderRadius:l=>(0,de.themeSpacing)((0,de.themeDensity)(l)*1.5),border:"none",outlineOffset:"-1px",outline:l=>`1px solid ${(0,de.themeColor)(l,"border-strong",r.get(l))}`,color:l=>(0,de.themeColor)(l,$o,r.get(l)),backgroundColor:l=>(0,de.themeColor)(l,"inherit",r.get(l)),fontSize:l=>(0,de.themeSize)(l,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:l=>`1px solid ${(0,de.themeColor)(l,"shift-5",o.get(l))}`},"&:focus-within":{boxShadow:l=>v(l,o.get(l))}}}}var en=require("@domphy/core"),Ee=require("@domphy/theme");function ri(n={}){var e,i;let r=(0,en.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,en.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,Ee.themeSize)(t,"inherit"),color:t=>(0,Ee.themeColor)(t,"text",r.get(t)),appearance:"none",display:"inline-flex",position:"relative",width:(0,Ee.themeSpacing)(6),height:(0,Ee.themeSpacing)(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 ${(0,Ee.themeColor)(t,"border-strong",r.get(t))}`,color:t=>(0,Ee.themeColor)(t,"text",r.get(t)),width:(0,Ee.themeSpacing)(4),height:(0,Ee.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,Ee.themeColor)(t,"hover",r.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,Ee.themeColor)(t,"shift-6",o.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,Ee.themeColor)(t,"shift-8",o.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,Ee.themeColor)(t,"shift-7",o.get(t))},"&:focus-visible":{borderRadius:"50%",boxShadow:t=>v(t,o.get(t))},"&[disabled]":{cursor:"not-allowed",opacity:.7},"&[disabled]::before":{pointerEvents:"none",outline:t=>`1px solid ${(0,Ee.themeColor)(t,"border-strong","neutral")}`,backgroundColor:t=>(0,Ee.themeColor)(t,"inherit","neutral")},"&[disabled]:checked::after":{pointerEvents:"none",backgroundColor:t=>(0,Ee.themeColor)(t,"shift-8","neutral")}}}}var tn=require("@domphy/core"),re=require("@domphy/theme");function ai(n={}){var e,i;let r=(0,tn.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,tn.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,re.themeSize)(t,"inherit"),width:"100%",margin:0,padding:0,height:(0,re.themeSpacing)(6),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,re.themeSpacing)(1.5),borderRadius:(0,re.themeSpacing)(999),backgroundColor:t=>(0,re.themeColor)(t,"shift-3",r.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,re.themeSpacing)(4),height:(0,re.themeSpacing)(4),borderRadius:(0,re.themeSpacing)(999),border:"none",marginTop:`calc((${(0,re.themeSpacing)(1.5)} - ${(0,re.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,re.themeColor)(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,re.themeColor)(t,"shift-10",o.get(t))},"&::-moz-range-track":{height:(0,re.themeSpacing)(1.5),borderRadius:(0,re.themeSpacing)(999),backgroundColor:t=>(0,re.themeColor)(t,"shift-3",r.get(t))},"&::-moz-range-thumb":{width:(0,re.themeSpacing)(4),height:(0,re.themeSpacing)(4),borderRadius:(0,re.themeSpacing)(999),border:"none",backgroundColor:t=>(0,re.themeColor)(t,"shift-9",o.get(t))},"&:hover:not([disabled])::-moz-range-thumb":{backgroundColor:t=>(0,re.themeColor)(t,"shift-10",o.get(t))},borderRadius:(0,re.themeSpacing)(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var on=require("@domphy/core"),xe=require("@domphy/theme");function ii(n={}){var e,i;let r=(0,on.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,on.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag')},style:O(E({fontSize:t=>(0,xe.themeSize)(t,"inherit"),lineHeight:"inherit"},qe(r)),{backgroundColor:t=>(0,xe.themeColor)(t,"inherit",r.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,xe.themeColor)(t,"border-strong",r.get(t))}`,borderRadius:t=>(0,xe.themeSpacing)((0,xe.themeDensity)(t)*1.5),minWidth:(0,xe.themeSpacing)(32),paddingInline:t=>(0,xe.themeSpacing)((0,xe.themeDensity)(t)*3),paddingBlock:t=>(0,xe.themeSpacing)((0,xe.themeDensity)(t)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:t=>`1px solid ${(0,xe.themeColor)(t,"shift-5",o.get(t))}`},"&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,xe.themeColor)(t,"muted","neutral"),backgroundColor:t=>(0,xe.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,xe.themeColor)(t,"border-strong","neutral")}`}})}}var tr=require("@domphy/core"),pe=require("@domphy/theme");function li(n={}){var o;let r=(0,tr.toState)((o=n.accentColor)!=null?o:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>(0,pe.themeSize)(e,"inherit"),backgroundColor:e=>(0,pe.themeColor)(e,"inherit"),color:e=>(0,pe.themeColor)(e,"text"),appearance:"none",position:"relative",display:"inline-flex",width:(0,pe.themeSpacing)(9),height:(0,pe.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,pe.themeSpacing)(1),transition:"box-shadow 140ms ease",borderRadius:(0,pe.themeSpacing)(999),"&:focus-visible":{boxShadow:e=>v(e,r.get(e))},"&:checked":{"&::before":{backgroundColor:e=>(0,pe.themeColor)(e,"increase-3",r.get(e))},"&::after":{insetInlineStart:`calc(100% - ${(0,pe.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,pe.themeSpacing)(3),height:(0,pe.themeSpacing)(3),borderRadius:(0,pe.themeSpacing)(999),insetInlineStart:(0,pe.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"inset-inline-start 0.3s",backgroundColor:e=>(0,pe.themeColor)(e,"decrease-3"),outline:e=>`1px solid ${(0,pe.themeColor)(e,"shift-7")}`,outlineOffset:"-1px"},"&::before":{content:'""',width:"100%",borderRadius:(0,pe.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,pe.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,pe.themeColor)(e,"inherit"),outline:e=>`1px solid ${(0,pe.themeColor)(e,"shift-7")}`,outlineOffset:"-1px"},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var nn=require("@domphy/core"),ae=require("@domphy/theme");function si(n={}){var i,t;let{type:r="text"}=n,o=(0,nn.toState)((i=n.color)!=null?i:"neutral","color"),e=(0,nn.toState)((t=n.accentColor)!=null?t:"primary","accentColor");return{type:r,_onInsert:a=>{a.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type')},style:O(E({lineHeight:"inherit",minWidth:(0,ae.themeSpacing)(10),paddingInline:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*3),paddingBlock:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1),borderRadius:a=>(0,ae.themeSpacing)((0,ae.themeDensity)(a)*1.5),fontSize:a=>(0,ae.themeSize)(a,"inherit"),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong",o.get(a))}`},qe(o)),{backgroundColor:a=>(0,ae.themeColor)(a,"inherit",o.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,ae.themeColor)(a,"shift-5",e.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,e.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:a=>(0,ae.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,ae.themeColor)(a,"border-strong","neutral")}`,color:a=>(0,ae.themeColor)(a,"muted","neutral")},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(a,"shift-6","error")}`},"&[data-status=error]":{outline:a=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(a,"shift-6","warning")}`}})}}var or=require("@domphy/core"),De=require("@domphy/theme");function ci(n={}){var o;let r=(0,or.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>(0,De.themeSize)(e,"inherit"),fontFamily:(0,De.themeFont)("monospace"),color:e=>(0,De.themeColor)(e,"text",r.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",r.get(e)),paddingBlock:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(.5/1.5)),paddingInline:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1.5/1.5)),borderRadius:e=>(0,De.themeSpacing)((0,De.themeDensity)(e)*(1/1.5)),outline:e=>`1px solid ${(0,De.themeColor)(e,"border-strong",r.get(e))}`}}}var rn=require("@domphy/core"),wt=require("@domphy/theme");function mi(n={}){var e,i;let r=(0,rn.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,rn.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,wt.themeSpacing)(2),fontSize:t=>(0,wt.themeSize)(t,"inherit"),color:t=>(0,wt.themeColor)(t,"text",r.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,wt.themeColor)(t,"shift-10",o.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,wt.themeColor)(t,"muted","neutral")}}}}var an=require("@domphy/core"),st=require("@domphy/theme");function ui(n={}){var e,i;let r=(0,an.toState)((e=n.color)!=null?e:"primary","color"),o=(0,an.toState)((i=n.accentColor)!=null?i:"secondary","accentColor");return{role:"link",tabIndex:0,_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag'),t.attributes.has("href")&&(t.attributes.get("role")==="link"&&t.attributes.remove("role"),t.attributes.get("tabIndex")===0&&t.attributes.remove("tabIndex"))},onClick:(t,a)=>{let l=a.domElement;(l!=null&&l.hasAttribute("disabled")||(l==null?void 0:l.getAttribute("aria-disabled"))==="true")&&t.preventDefault()},onKeyDown:(t,a)=>{var m;if(a.attributes.has("href"))return;let l=t.key;l!=="Enter"&&l!==" "||(t.preventDefault(),(m=a.domElement)==null||m.click())},style:{fontSize:t=>(0,st.themeSize)(t,"inherit"),backgroundColor:t=>(0,st.themeColor)(t),color:t=>(0,st.themeColor)(t,"shift-13",r.get(t)),textDecoration:"none","&:visited":{color:t=>(0,st.themeColor)(t,"shift-13",o.get(t))},"&:hover:not([disabled])":{color:t=>(0,st.themeColor)(t,"shift-14",r.get(t)),textDecoration:"underline"},borderRadius:(0,st.themeSpacing)(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,o.get(t))},"&[disabled], &[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:t=>(0,st.themeColor)(t,"muted","neutral")}}}}var nr=require("@domphy/core"),z=require("@domphy/theme");var di={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},pi={small:.5,medium:1,large:1.5};function fi(n={}){var l,m,u;let r=(l=n.variant)!=null?l:"outline",o=(0,nr.toState)((m=n.color)!=null?m:r==="ghost"?"neutral":"primary","color"),e=(u=n.size)!=null?u:"medium",i=Kt[e];if(r==="ghost"){let s=pi[e];return{_onInsert:c=>{c.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:c=>(0,z.themeSize)(c,i),textDecoration:"none",paddingBlock:c=>(0,z.themeSpacing)((0,z.themeDensity)(c)*s),paddingInline:c=>(0,z.themeSpacing)((0,z.themeDensity)(c)*s),borderRadius:c=>(0,z.themeSpacing)((0,z.themeDensity)(c)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:c=>(0,z.themeSpacing)((0,z.themeDensity)(c)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:c=>(0,z.themeColor)(c,"text",o.get(c)),"&:hover:not([aria-disabled=true])":{color:c=>(0,z.themeColor)(c,(0,z.textToneOn)(2),o.get(c)),backgroundColor:c=>(0,z.themeColor)(c,"hover",o.get(c)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:c=>(0,z.themeColor)(c,(0,z.textToneOn)(2),o.get(c)),backgroundColor:c=>(0,z.themeColor)(c,"increase-2",o.get(c))},"&:focus-visible":{boxShadow:c=>v(c,o.get(c))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:c=>(0,z.themeColor)(c,"border-strong","neutral")}}}}let t=r==="solid",a=di[e];return O(E({_onInsert:s=>{s.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},t?{_doctorDisable:["tone-background-inherit"]}:{}),{style:{fontSize:s=>(0,z.themeSize)(s,i),textDecoration:"none",paddingBlock:s=>(0,z.themeSpacing)((0,z.themeDensity)(s)*a.block),paddingInline:s=>(0,z.themeSpacing)((0,z.themeDensity)(s)*a.inline),borderRadius:s=>(0,z.themeSpacing)((0,z.themeDensity)(s)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>(0,z.themeSpacing)((0,z.themeDensity)(s)*1),userSelect:"none",cursor:"pointer",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:t?"none":s=>`1px solid ${(0,z.themeColor)(s,"border-strong",o.get(s))}`,color:s=>t?(0,z.themeColor)(s,"shift-0","neutral"):(0,z.themeColor)(s,"shift-13",o.get(s)),backgroundColor:s=>t?(0,z.themeColor)(s,"shift-13",o.get(s)):(0,z.themeColor)(s,"inherit",o.get(s)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:s=>t?(0,z.themeColor)(s,"shift-0","neutral"):(0,z.themeColor)(s,"shift-14",o.get(s)),backgroundColor:s=>t?(0,z.themeColor)(s,"shift-14",o.get(s)):(0,z.themeColor)(s,"hover",o.get(s))},"&:active:not([aria-disabled=true])":{backgroundColor:s=>t?(0,z.themeColor)(s,"shift-15",o.get(s)):(0,z.themeColor)(s,"increase-2",o.get(s))},"&:focus-visible":{boxShadow:s=>v(s,o.get(s))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:s=>(0,z.themeColor)(s,"shift-2","neutral"),outline:s=>`1px solid ${(0,z.themeColor)(s,"border-strong","neutral")}`,color:s=>(0,z.themeColor)(s,"muted","neutral")}}})}var rr=require("@domphy/core"),B=require("@domphy/theme");function hi(n={}){var o;let r=(o=n.color)!=null?o:"neutral";return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",backgroundColor:e=>(0,B.themeColor)(e,"inherit",r),color:e=>(0,B.themeColor)(e,"text",r)}}}function gi(n={}){let{dense:r=!1}=n;return{style:{display:"flex",alignItems:"center",gap:o=>(0,B.themeSpacing)((0,B.themeDensity)(o)*2),paddingBlock:o=>(0,B.themeSpacing)(r?1:(0,B.themeDensity)(o)*2),paddingInline:o=>(0,B.themeSpacing)((0,B.themeDensity)(o)*3),fontSize:o=>(0,B.themeSize)(o,"inherit"),color:o=>(0,B.themeColor)(o,"text")}}}function yi(n={}){var i,t;let r=(0,rr.toState)((i=n.color)!=null?i:"neutral","color"),o=(t=n.accentColor)!=null?t:"primary",{dense:e=!1}=n;return{type:"button",style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"start",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*2),paddingBlock:a=>(0,B.themeSpacing)(e?1:(0,B.themeDensity)(a)*2),paddingInline:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*3),fontSize:a=>(0,B.themeSize)(a,"inherit"),color:a=>(0,B.themeColor)(a,"text",r.get(a)),borderRadius:a=>(0,B.themeSpacing)((0,B.themeDensity)(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:a=>(0,B.themeColor)(a,(0,B.textToneOn)(2),r.get(a)),backgroundColor:a=>(0,B.themeColor)(a,"hover",r.get(a))},"&:active:not([disabled])":{color:a=>(0,B.themeColor)(a,(0,B.textToneOn)(2),r.get(a)),backgroundColor:a=>(0,B.themeColor)(a,"increase-2",r.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,B.themeColor)(a,"shift-3",o),color:a=>(0,B.themeColor)(a,"shift-12",o)},"&:focus-visible":{boxShadow:a=>v(a,o)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var ar=require("@domphy/core"),Be=require("@domphy/theme");function bi(n={}){var o;let r=(0,ar.toState)((o=n.accentColor)!=null?o:"highlight","accentColor");return{_onInsert:e=>{e.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>(0,Be.themeSize)(e,"inherit"),color:e=>(0,Be.themeColor)(e,"text",r.get(e)),backgroundColor:e=>(0,Be.themeColor)(e,"inherit",r.get(e)),height:e=>(0,Be.themeSpacing)((0,Be.themeDensity)(e)*(6/1.5)),borderRadius:e=>(0,Be.themeSpacing)((0,Be.themeDensity)(e)*(1/1.5)),paddingInline:e=>(0,Be.themeSpacing)((0,Be.themeDensity)(e)*(1.5/1.5))}}}var lo=require("@domphy/core"),Y=require("@domphy/theme");function Si(n={items:[]}){var c;let{items:r=[],selectable:o=!0,color:e="neutral",accentColor:i="primary"}=n,t=(0,lo.toState)((c=n.activeKey)!=null?c:null),a=n.activeKey!==void 0,l=(d,p)=>{var x;let f=d.focusedKey.get(p);if(f!==null)return f;let h=d.selectable?d.activeKey.get(p):null;if(h!==null)return h;let S=d.items[0];return S?(x=S.key)!=null?x:0:null},m=(d,p)=>{let f=d.nodeId;return p.items.map((h,S)=>{var R;let x=(R=h.key)!=null?R:S;return O(E({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:x,type:"button",id:`menuitem${f}${x}`,role:"menuitem",tabIndex:D=>l(p,D)===x?0:-1,onFocus:()=>p.focusedKey.set(x)},p.selectable?{ariaCurrent:D=>p.activeKey.get(D)===x||void 0}:{}),{onClick:()=>{var D;p.selectable&&p.activeKey.set(x),(D=h.onClick)==null||D.call(h)},onKeyDown:D=>{var P;let b=D.key;if(b==="Enter"||b===" "){D.preventDefault(),D.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(b))return;D.preventDefault();let k=p.items.map((Z,we)=>{var U;return(U=Z.key)!=null?U:we}),C=k.indexOf(x),g=C;b==="ArrowDown"?g=(C+1)%k.length:b==="ArrowUp"?g=(C-1+k.length)%k.length:b==="Home"?g=0:b==="End"&&(g=k.length-1);let L=D.target.closest("[role=menu]");(P=L==null?void 0:L.querySelectorAll("[role=menuitem]")[g])==null||P.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:(0,Y.themeSpacing)(2),width:"100%",fontSize:D=>(0,Y.themeSize)(D,"inherit"),height:D=>(0,Y.themeSpacing)(6+(0,Y.themeDensity)(D)*2),paddingInline:D=>(0,Y.themeSpacing)((0,Y.themeDensity)(D)*3),border:"none",outline:"none",color:D=>(0,Y.themeColor)(D,"text",p.color),backgroundColor:D=>(0,Y.themeColor)(D,"inherit",p.color),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:D=>(0,Y.themeColor)(D,"hover",p.color),color:D=>(0,Y.themeColor)(D,(0,Y.textToneOn)(2),p.color)},"&[aria-current=true]":{backgroundColor:D=>(0,Y.themeColor)(D,"shift-3",p.accentColor),color:D=>(0,Y.themeColor)(D,"shift-13",p.accentColor)},"&:focus-visible":{boxShadow:D=>v(D,p.accentColor)}}})})},u=(d,p)=>{p.focusedKey.set(null);let f=p;return{update(h){h.activeKey!==f.activeKey&&!h.activeKeyIsCallerOwned&&h.activeKey.set(f.activeKey.get()),h.focusedKey!==f.focusedKey&&h.focusedKey.set(f.focusedKey.get()),f=h,f.items.length!==0&&d.children.update(m(d,f))}}},s={items:r,activeKey:t,activeKeyIsCallerOwned:a,selectable:o,color:e,accentColor:i,focusedKey:(0,lo.toState)(null)};return O(E({role:"menu",dataTone:"shift-0",_onSchedule:(d,p)=>{r.length!==0&&(p[d.tagName]=m(d,s))}},(0,lo.behavior)("menu",u,s)),{style:{display:"flex",flexDirection:"column",paddingBlock:d=>(0,Y.themeSpacing)((0,Y.themeDensity)(d)*2),paddingInline:d=>(0,Y.themeSpacing)((0,Y.themeDensity)(d)*2),fontSize:d=>(0,Y.themeSize)(d,"inherit"),backgroundColor:d=>(0,Y.themeColor)(d,"inherit",e),color:d=>(0,Y.themeColor)(d,"text",e),borderRadius:d=>(0,Y.themeSpacing)((0,Y.themeDensity)(d)*2),outline:d=>`1px solid ${(0,Y.themeColor)(d,"border-strong",e)}`,outlineOffset:"-1px",boxShadow:F("medium")}})}var lr=require("@domphy/core");function Yt(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(n){return!1}}var ir=n=>!!n&&typeof n.get=="function"&&n._isState===!0,ct=n=>{let r={},o=[];for(let e in n){let i=n[e];e==="x"?o.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?o.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?o.push(`scale(${i})`):e==="rotate"?o.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):r[e]=i}return o.length&&(r.transform=o.join(" ")),r};function ln(n={}){var r,o,e,i;return{duration:(r=n.duration)!=null?r:300,delay:(o=n.delay)!=null?o:0,easing:(e=n.easing)!=null?e:"ease",iterations:(i=n.iterations)!=null?i:1,fill:"both"}}function vi(n,r){let o=n.domElement,e=r,i,t=l=>{i==null||i(),i=void 0,!(!o||!ir(l))&&(i=l.addListener(m=>{Yt()?Object.assign(o.style,ct(m)):typeof o.animate=="function"&&o.animate([ct(m)],ln(e.transition))}))},a=(l,m)=>{if(!o)return;let u=ir(l.animate)?l.animate.get():l.animate;if(Yt()){u?Object.assign(o.style,ct(u)):m==="enter"&&l.initial&&Object.assign(o.style,ct(l.initial));return}if(typeof o.animate=="function")if(u){let s=m==="enter"&&l.initial?[ct(l.initial),ct(u)]:[ct(u)];o.animate(s,ln(l.transition))}else m==="enter"&&l.initial&&Object.assign(o.style,ct(l.initial))};return a(r,"enter"),t(r.animate),{play:a,getExit:()=>e.exit,getTransition:()=>e.transition,update(l){e=l,a(l,"update"),t(l.animate)},destroy(){i==null||i()}}}function Ei(n={}){return O(E({},(0,lr.behavior)("motion",(r,o)=>vi(r,o),n)),{_onBeforeRemove:(r,o)=>{var a,l;let e=r.domElement,i=r.getBehavior("motion"),t=(a=i==null?void 0:i.getExit())!=null?a:n.exit;if(!e||!t||typeof e.animate!="function")return o();if(Yt())return Object.assign(e.style,ct(t)),o();e.animate([ct(t)],ln((l=i==null?void 0:i.getTransition())!=null?l:n.transition)).finished.then(o,o)}})}var sr=require("@domphy/core"),Rt=require("@domphy/theme");function xi(n={}){var o;let r=(0,sr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>(0,Rt.themeSize)(e,"inherit"),backgroundColor:e=>(0,Rt.themeColor)(e),color:e=>(0,Rt.themeColor)(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:(0,Rt.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var zt=require("@domphy/core"),ee=require("@domphy/theme");function Ci(n,r){if(r<=7)return Array.from({length:r},(t,a)=>a+1);let o=[1];n>3&&o.push("...");let e=Math.max(2,n-1),i=Math.min(r-1,n+1);for(let t=e;t<=i;t++)o.push(t);return n<r-2&&o.push("..."),o.push(r),o}function ki(n,r,o,e){if((0,zt.isState)(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=(0,zt.toState)(o!=null?o:e),n.setMetadata(r,i)),i}function cr(n,r){let o=n.getMetadata("paginationTotal");return o||(o=(0,zt.toState)(r),n.setMetadata("paginationTotal",o)),o}function wi(n){let{total:r,color:o="neutral",accentColor:e="primary"}=n,i={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),height:a=>(0,ee.themeSpacing)(6+(0,ee.themeDensity)(a)*2),paddingInline:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*2),borderRadius:a=>(0,ee.themeSpacing)((0,ee.themeDensity)(a)*1.5),border:"none",cursor:"pointer",fontSize:a=>(0,ee.themeSize)(a,"inherit"),backgroundColor:"transparent",color:a=>(0,ee.themeColor)(a,"shift-13",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:a=>(0,ee.themeColor)(a,"shift-13",o),backgroundColor:a=>(0,ee.themeColor)(a,"hover",o)},"&:focus-visible":{boxShadow:a=>v(a,e)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},t=O(E({},i),{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e),color:a=>(0,ee.themeColor)(a,"shift-0","neutral"),fontWeight:(0,ee.themeWeight)("bold"),cursor:"default","&:hover:not([disabled])":{backgroundColor:a=>(0,ee.themeColor)(a,"shift-13",e)}});return O(E({role:"navigation",ariaLabel:"Pagination",_onInsert:a=>{a.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:a=>{let l=ki(a,"paginationPage",n.value,1),m=cr(a,r),u={div:s=>{let c=l.get(s),d=m.get(s),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:c<=1,onClick:()=>c>1&&l.set(c-1),style:i});let f=0;for(let h of Ci(c,d))if(h==="...")p.push({span:"\u2026",_key:`ellipsis-${f++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:S=>(0,ee.themeSpacing)((0,ee.themeDensity)(S)*2),color:S=>(0,ee.themeColor)(S,"shift-7",o)}});else{let S=h===c;p.push({button:String(h),_key:`page-${h}`,type:"button",ariaLabel:`Page ${h}`,ariaCurrent:S?"page":void 0,onClick:()=>l.set(h),style:S?t:i})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:c>=d,onClick:()=>c<d&&l.set(c+1),style:i}),p},style:{display:"flex",alignItems:"center",gap:(0,ee.themeSpacing)(1)}};a.children.insert(u)}},(0,zt.behavior)("pagination-total",a=>({update(l){cr(a,l.total).set(l.total)}}),{total:r})),{style:{display:"inline-flex"}})}var mr=require("@domphy/core"),Vt=require("@domphy/theme");function Ti(n={}){var i;let{padding:r=4,divider:o=!1}=n,e=(0,mr.toState)((i=n.color)!=null?i:"neutral","color");return{style:E({padding:t=>(0,Vt.themeSpacing)((0,Vt.themeDensity)(t)*r)},o?{borderBottom:t=>`1px solid ${(0,Vt.themeColor)(t,"border",e.get(t))}`,color:t=>(0,Vt.themeColor)(t,"text")}:{})}}var ur=require("@domphy/core"),ko=require("@domphy/theme");function Di(n={}){var o;let r=(0,ur.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>(0,ko.themeSize)(e,"inherit"),color:e=>(0,ko.themeColor)(e,"text",r.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var so=require("@domphy/core"),Tt=require("@domphy/theme");var Ii=new Set(["dialog","grid","listbox","menu","tree"]);function Pi(n){var e;let r;for(let i of(e=n.$)!=null?e:[]){let t=i==null?void 0:i.role;typeof t=="string"&&(r=t)}let o=n.role;return typeof o=="string"&&(r=o),typeof r!="string"?"dialog":r==="alertdialog"||r==="menubar"?r==="menubar"?"menu":"dialog":r==="treegrid"?"grid":Ii.has(r)?r:"dialog"}function Oi(n){if(typeof n.dataTone=="string")return!0;let o=n.$;return o?o.some(e=>e!=null&&typeof e.dataTone=="string"):!1}function Li(n){var c;let{open:r=!1,placement:o="bottom",openOn:e="click"}=n,i=(0,so.toState)(r),t=(0,so.toState)(o),{show:a,hide:l,anchorPartial:m}=it({kind:"popover",open:i,onDismiss:n.onDismiss,placement:t,content:n.content,keepOpenOnContentHover:e==="hover"}),u={role:"dialog",dataTone:"shift-0",style:{backgroundColor:d=>(0,Tt.themeColor)(d,"inherit"),color:d=>(0,Tt.themeColor)(d,"text"),borderRadius:d=>(0,Tt.themeSpacing)((0,Tt.themeDensity)(d)*2),outline:d=>`1px solid ${(0,Tt.themeColor)(d,"border-strong")}`,outlineOffset:"-1px",boxShadow:F("medium")}};Oi(n.content)||((c=n.content).$||(c.$=[]),n.content.$.push(u));let s={ariaHaspopup:Pi(n.content),ariaExpanded:d=>i.get(d),ariaControls:d=>d!=null&&d.elementNode?Me("popover",d.elementNode):void 0,onMouseEnter:(d,p)=>e==="hover"&&a(p),onMouseLeave:(d,p)=>e==="hover"&&l(p),onClick:(d,p)=>{e==="click"&&(i.get()?l(p):a(p))},onKeyDown:(d,p)=>{d.key==="Escape"&&i.get()&&l(p)},onFocus:(d,p)=>e==="hover"&&a(p),onBlur:(d,p)=>{if(e!=="hover")return;let f=d.relatedTarget,S=p.getRoot().domElement.querySelector(`#${Me("popover",p)}`);f&&(S!=null&&S.contains(f))||l(p)}};return(0,so.merge)(m,s),m}var dr=require("@domphy/core"),Qe=require("@domphy/theme");function sn(n={}){let{placement:r="bottom-end",color:o="neutral",sideOffset:e=(0,Qe.themeSpacing)(6),bordered:i=!0}=n,t=(0,dr.toState)(r),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=s=>{var c;return(c=a[t.get(s)])!=null?c:a["bottom-end"]},m=s=>s.includes("start")?e:s.includes("end")?"auto":"50%",u=s=>s.includes("end")?e:s.includes("start")?"auto":"50%";return{style:{fontSize:s=>(0,Qe.themeSize)(s),backgroundColor:s=>(0,Qe.themeColor)(s),color:s=>(0,Qe.themeColor)(s,"text",o),position:"relative","&::after":{content:'""',position:"absolute",width:(0,Qe.themeSpacing)(1.5),height:(0,Qe.themeSpacing)(1.5),backgroundColor:s=>(0,Qe.themeColor)(s,"inherit",o),borderWidth:i?"1px":0,borderColor:s=>(0,Qe.themeColor)(s,"border-strong",o),borderTopStyle:s=>{let c=l(s);return c.includes("top")||c.includes("right")?"solid":"none"},borderBottomStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("left")?"solid":"none"},borderLeftStyle:s=>{let c=l(s);return c.includes("top")||c.includes("left")?"solid":"none"},borderRightStyle:s=>{let c=l(s);return c.includes("bottom")||c.includes("right")?"solid":"none"},top:s=>{let c=l(s);return c.includes("top")?0:c.includes("bottom")?"auto":m(c)},right:s=>{let c=l(s);return c.includes("right")?0:c.includes("left")?"auto":u(c)},bottom:s=>{let c=l(s);return c.includes("bottom")?0:c.includes("top")?"auto":u(c)},left:s=>{let c=l(s);return c.includes("left")?0:c.includes("right")?"auto":m(c)},transform:s=>{let c=l(s),d=c.includes("right")||c.includes("end")&&!c.includes("left")?"50%":"-50%",p=c.includes("bottom")||c.includes("end")&&!c.includes("top")?"50%":"-50%";return`translate(${d},${p}) rotate(45deg)`}}}}}var pr=require("@domphy/core"),ze=require("@domphy/theme");function Ri(n={}){var o;let r=(0,pr.toState)((o=n.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>(0,ze.themeSize)(e,"inherit"),fontFamily:(0,ze.themeFont)("monospace"),color:e=>(0,ze.themeColor)(e,"text",r.get(e)),backgroundColor:e=>(0,ze.themeColor)(e,"inherit",r.get(e)),border:"none",paddingBlock:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*2),paddingInline:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*3),borderRadius:e=>(0,ze.themeSpacing)((0,ze.themeDensity)(e)*2)}}}var cn=require("@domphy/core"),mt=require("@domphy/theme");function zi(n={}){var e,i;let r=(0,cn.toState)((e=n.color)!=null?e:"neutral","color"),o=(0,cn.toState)((i=n.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:(0,mt.themeSpacing)(2),border:0,borderRadius:(0,mt.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,mt.themeColor)(t,"inherit",r.get(t)),color:t=>(0,mt.themeColor)(t,"text",r.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,mt.themeColor)(t,"inherit",r.get(t)),borderRadius:(0,mt.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,mt.themeColor)(t,"shift-9",o.get(t)),borderRadius:(0,mt.themeSpacing)(999),transition:"width 220ms ease"}}}}var yt=require("@domphy/core"),gt=require("@domphy/theme");function mn(n){return!n||typeof getComputedStyle!="function"?!1:getComputedStyle(n).direction==="rtl"}function ut(n,r){return n!=="ArrowRight"&&n!=="ArrowLeft"?0:n==="ArrowRight"!==mn(r)?1:-1}var Vi='<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>',Mi='<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 fr(n,r){var o,e,i;n.onChange=r.onChange,n.readOnly=(o=r.readOnly)!=null?o:!1,n.max=(e=r.max)!=null?e:5,n.color=(i=r.color)!=null?i:"warning",(0,yt.isState)(r.value)?r.value!==n.valueState&&n.valueState.set(r.value.get()):r.value!==void 0&&n.valueState.set(r.value)}function Ai(n,r,o,e){let i=a=>{let l=e.get(a);return l>0?l:o.valueState.get(a)},t={button:a=>(0,yt.rawHtml)(r<=i(a)?Vi:Mi),_key:r,type:"button",ariaLabel:`${r} star${r>1?"s":""}`,role:"radio",ariaChecked:a=>o.valueState.get(a)===r,tabindex:a=>{let l=o.valueState.get(a);return(l===0?1:l)===r?0:-1},onClick:()=>{var l;if(o.readOnly)return;let a=r===o.valueState.get()?0:r;o.valueState.set(a),(l=o.onChange)==null||l.call(o,a),e.set(0)},onMouseEnter:()=>{o.readOnly||e.set(r)},onMouseLeave:()=>e.set(0),onKeyDown:a=>{var s,c,d;if(o.readOnly)return;let l=o.valueState.get(),m=l;if(a.key==="ArrowUp")m=Math.min(o.max,l+1),a.preventDefault();else if(a.key==="ArrowDown")m=Math.max(0,l-1),a.preventDefault();else if(a.key==="ArrowRight"||a.key==="ArrowLeft")m=ut(a.key,a.target)>0?Math.min(o.max,l+1):Math.max(0,l-1),a.preventDefault();else if(a.key==="Home")m=1,a.preventDefault();else if(a.key==="End")m=o.max,a.preventDefault();else return;o.valueState.set(m),(s=o.onChange)==null||s.call(o,m);let u=m>0?m-1:0;(d=(c=n.domElement)==null?void 0:c.children[u])==null||d.focus()},style:{background:"none",border:"none",outline:"none",borderRadius:(0,gt.themeSpacing)(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",justifyContent:"center",minWidth:(0,gt.themeSpacing)(6),minHeight:(0,gt.themeSpacing)(6),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:a=>v(a,o.color)}}};n.children.insert(t)}function un(n,r,o){let e=n.children.items;for(;e.length>r.max;)n.children.remove(e[e.length-1]);for(let i=e.length+1;i<=r.max;i++)Ai(n,i,r,o)}function Ni(n={}){var e,i,t,a,l,m,u;let r={valueState:(0,yt.toState)((e=n.value)!=null?e:0),onChange:n.onChange,readOnly:(i=n.readOnly)!=null?i:!1,max:(t=n.max)!=null?t:5,color:(a=n.color)!=null?a:"warning"},o=(0,yt.toState)(0);return O(E({role:"radiogroup",ariaLabel:"Rating",ariaReadonly:r.readOnly?"true":void 0,style:{display:"inline-flex",gap:(0,gt.themeSpacing)(.5),fontSize:s=>(0,gt.themeSize)(s,"increase-1"),cursor:r.readOnly?"default":"pointer",color:s=>(0,gt.themeColor)(s,"muted",r.color)}},(0,yt.behavior)("rating",(s,c)=>(fr(r,c),un(s,r,o),{update(d){fr(r,d),un(s,r,o)}}),{value:n.value,max:(l=n.max)!=null?l:5,onChange:n.onChange,readOnly:(m=n.readOnly)!=null?m:!1,color:(u=n.color)!=null?u:"warning"})),{_onInit:s=>{un(s,r,o)}})}var wo=require("@domphy/core"),Mt=require("@domphy/theme");function _i(n={}){var m,u,s;let{size:r=16,thickness:o=.25}=n,e=(0,wo.toState)((m=n.value)!=null?m:0,"value"),i=(0,wo.toState)((u=n.color)!=null?u:"primary","color"),t=(0,wo.toState)((s=n.trackColor)!=null?s:"neutral","trackColor"),a=Math.round((1-o)*100),l=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:c=>String(Math.round(e.get(c))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:c=>{c.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:(0,Mt.themeSpacing)(r),height:(0,Mt.themeSpacing)(r),borderRadius:"50%",color:c=>(0,Mt.themeColor)(c,"shift-9",i.get(c)),background:c=>`conic-gradient(from -90deg, ${(0,Mt.themeColor)(c,"shift-9",i.get(c))} ${e.get(c)}%, ${(0,Mt.themeColor)(c,"shift-3",t.get(c))} 0%)`,WebkitMask:l,mask:l}}}var co=require("@domphy/theme");function dn(n={}){let{gap:r=4,align:o="center",justify:e,wrap:i=!1,density:t=!0}=n;return{style:E(E({display:"flex",alignItems:o,gap:t?a=>(0,co.themeSpacing)((0,co.themeDensity)(a)*r):()=>(0,co.themeSpacing)(r)},e?{justifyContent:e}:{}),i?{flexWrap:"wrap"}:{})}}var hr=require("@domphy/core"),dt=require("@domphy/theme");function $i(n={}){var o;let r=(0,hr.toState)((o=n.color)!=null?o:"neutral","color");return O(E({},n.label?{role:"region",ariaLabel:n.label,tabIndex:0}:{}),{style:{overflow:"auto",color:e=>(0,dt.themeColor)(e,"text",r.get(e)),"&::-webkit-scrollbar":{width:(0,dt.themeSpacing)(2),height:(0,dt.themeSpacing)(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>(0,dt.themeColor)(e,"shift-5",r.get(e)),borderRadius:(0,dt.themeSpacing)(999),border:`${(0,dt.themeSpacing)(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:e=>(0,dt.themeColor)(e,"shift-7",r.get(e))},scrollbarWidth:"thin",scrollbarColor:e=>`${(0,dt.themeColor)(e,"shift-5",r.get(e))} transparent`}})}var Gt=require("@domphy/core"),ie=require("@domphy/theme");function gr(n,r,o,e){if((0,Gt.isState)(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=(0,Gt.toState)(o!=null?o:e),n.setMetadata(r,i)),i}function Hi(n,r,o,e){var u;let i=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(i))return;n.preventDefault();let t=r.map((s,c)=>{var d;return(d=s.key)!=null?d:String(c)}),a=t.indexOf(o),l=a;if(i==="ArrowDown")l=(a+1)%t.length;else if(i==="ArrowUp")l=(a-1+t.length)%t.length;else if(i==="ArrowRight"||i==="ArrowLeft"){let s=ut(i,n.target);l=(a+s+t.length)%t.length}else i==="Home"?l=0:i==="End"&&(l=t.length-1);e.set(t[l]);let m=n.target.closest("[role=radiogroup]");(u=m==null?void 0:m.querySelectorAll("[role=radio]")[l])==null||u.focus()}function yr(n,r,o,e){return n.map((i,t)=>{var m;let a=(m=i.key)!=null?m:String(t);return{button:[typeof i.label=="string"?{span:i.label}:i.label],_key:a,type:"button",role:"radio",ariaChecked:u=>r.get(u)===a,tabIndex:u=>{var c,d;let s=r.get(u);return s===a||s===""&&a===((d=(c=n[0])==null?void 0:c.key)!=null?d:"")?0:-1},onClick:()=>r.set(a),onKeyDown:u=>Hi(u,n,a,r),style:{cursor:"pointer",fontSize:u=>(0,ie.themeSize)(u,"inherit"),height:(0,ie.themeSpacing)(6),paddingBlock:(0,ie.themeSpacing)(1),paddingInline:(0,ie.themeSpacing)(3),border:"none",borderRadius:(0,ie.themeSpacing)(10),color:u=>(0,ie.themeColor)(u,"text",o),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,ie.themeColor)(u,"shift-3",o),color:u=>(0,ie.themeColor)(u,(0,ie.textToneOn)(3),o)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:u=>(0,ie.themeColor)(u,"increase-2",o),color:u=>(0,ie.themeColor)(u,(0,ie.textToneOn)(3),o)},"&[aria-checked=true]":{backgroundColor:u=>(0,ie.themeColor)(u,"shift-0",e),color:u=>(0,ie.themeColor)(u,"shift-10",e),boxShadow:F("low")},"&:focus-visible":{boxShadow:u=>v(u,e)},"&[aria-checked=true]:focus-visible":{boxShadow:u=>`${F("low")}, ${v(u,e)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function Bi(n={items:[]}){let{items:r=[],color:o="neutral",accentColor:e="primary"}=n;return O(E({role:"radiogroup",_onSchedule:(t,a)=>{var m,u;let l=gr(t,"segmentedValue",n.value,(u=(m=r[0])==null?void 0:m.key)!=null?u:"");t.setContext("segmented",{value:l}),a[t.tagName]=yr(r,l,o,e)}},(0,Gt.behavior)("segmented-items",t=>({update(a){var m,u;let l=gr(t,"segmentedValue",n.value,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:"");t.children.update(yr(a.items,l,a.color,a.accentColor),!!t.domElement,!0)}}),{items:r,color:o,accentColor:e})),{dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:(0,ie.themeSpacing)(1),paddingInline:(0,ie.themeSpacing)(1),gap:(0,ie.themeSpacing)(.5),borderRadius:(0,ie.themeSpacing)(10),backgroundColor:t=>(0,ie.themeColor)(t,"inherit",o),color:t=>(0,ie.themeColor)(t,"text",o)}})}var q=require("@domphy/theme");function Fi(n={}){let{color:r="neutral",accentColor:o="primary"}=n;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontSize:e=>(0,q.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,q.themeColor)(e,"text",r),backgroundColor:e=>(0,q.themeColor)(e,"inherit",r),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,q.themeColor)(e,"border-strong",r)}`,borderRadius:e=>(0,q.themeSpacing)((0,q.themeDensity)(e)*1.5),paddingBlock:e=>(0,q.themeSpacing)((0,q.themeDensity)(e)*1),paddingInlineStart:e=>(0,q.themeSpacing)((0,q.themeDensity)(e)*3),paddingInlineEnd:e=>(0,q.themeSpacing)((0,q.themeDensity)(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="${(0,q.themeColorToken)(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:e=>{var i;return`${mn((i=e.elementNode)==null?void 0:i.domElement)?"left":"right"} ${(0,q.themeSpacing)(2)} center`},backgroundSize:`${(0,q.themeSpacing)(2.5)} ${(0,q.themeSpacing)(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:e=>(0,q.themeSpacing)(6+(0,q.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`1px solid ${(0,q.themeColor)(e,"shift-5",o)}`},"&:focus-visible":{boxShadow:e=>v(e,o)},"& optgroup":{color:e=>(0,q.themeColor)(e,"shift-11",r)},"& option[disabled]":{color:e=>(0,q.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,q.themeColor)(e,"muted","neutral"),outline:e=>`1px solid ${(0,q.themeColor)(e,"border-strong","neutral")}`,backgroundColor:e=>(0,q.themeColor)(e,"shift-2","neutral")}}}}var bt=require("@domphy/core"),he=require("@domphy/theme");var Ki=1e3;function Wi(n){let r=n.getMetadata("selectBoxTypeahead");return r||(r={buffer:"",timer:null},n.setMetadata("selectBoxTypeahead",r)),r}var br=(n,r)=>n.trim().toLowerCase().startsWith(r);function ji(n){let{options:r=[],placement:o="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=n,a=(0,bt.toState)(n.value),l=(0,bt.toState)(i),{show:m,hide:u,anchorPartial:s}=it({kind:"selectBox",open:l,onDismiss:n.onDismiss,placement:(0,bt.toState)(o),content:n.content}),c={onClick:(b,k)=>!t&&u(k),dataTone:"shift-0",style:{backgroundColor:b=>(0,he.themeColor)(b,"inherit"),color:b=>(0,he.themeColor)(b,"text"),borderRadius:b=>(0,he.themeSpacing)((0,he.themeDensity)(b)*2),outline:b=>`1px solid ${(0,he.themeColor)(b,"border-strong")}`,outlineOffset:"-1px",boxShadow:F("medium")}};(0,bt.merge)(n.content,c);let d=b=>({div:k=>{let C=b.state.get(k),g=Array.isArray(C)?C:[C];return b.options.filter(P=>g.includes(P.value)).map(P=>({span:P.label,$:[no({color:b.color,removable:b.multiple})],_key:P.value,_onRemove:Z=>{let we=b.state.get(),me=(Array.isArray(we)?we:[we]).filter(Ne=>Ne!==P.value);b.multiple?b.state.set(me):b.state.set(me[0])}}))},_key:"selectBoxWrap",style:{display:"flex",flexWrap:"wrap",gap:(0,he.themeSpacing)(1),flex:1}}),p=(b,k)=>({update(C){b.children.update([d(C)])}}),f=b=>l.get()?u(b):m(b),h=b=>{var C;let k=b.getRoot().domElement;return(C=k==null?void 0:k.querySelector(`#${Me("selectBox",b)}`))!=null?C:null},S=(b,k)=>{var L;let C=It(h(b));if(!C.length)return;let g=C[k?C.length-1:0];g.focus(),(L=g.scrollIntoView)==null||L.call(g,{block:"nearest"})},x=(b,k)=>{let C;C=He(l,g=>{g&&(C==null||C(),requestAnimationFrame(()=>S(b,k)))},!1),m(b)},R=(b,k)=>{var U,me,Ne;let C=Wi(k);C.timer&&clearTimeout(C.timer),C.buffer+=b.toLowerCase(),C.timer=setTimeout(()=>{C.buffer=""},Ki);let g=C.buffer.length>1&&new Set(C.buffer).size===1,L=g?C.buffer[0]:C.buffer;if(l.get()){let ge=It(h(k)).filter(Dt=>{var nt;return br((nt=Dt.textContent)!=null?nt:"",L)});if(!ge.length)return;let Ke=(me=(U=k.domElement)==null?void 0:U.ownerDocument)==null?void 0:me.activeElement,We=g&&Ke?ge.indexOf(Ke):-1,Pe=ge[(We+1)%ge.length];Pe.focus(),(Ne=Pe.scrollIntoView)==null||Ne.call(Pe,{block:"nearest"});return}if(t)return;let P=r.filter(ge=>br(ge.label,L));if(!P.length)return;let Z=g?P.findIndex(ge=>ge.value===a.get()):-1,we=P[(Z+1)%P.length];a.set(we.value)},D=O(E({_onInsert:b=>{b.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onSchedule:(b,k)=>{k[b.tagName]=[d({options:r,multiple:t,color:e,state:a})]}},(0,bt.behavior)("selectBoxInner",p,{options:r,multiple:t,color:e,state:a})),{onClick:(b,k)=>f(k),tabindex:0,role:"combobox",ariaLabel:"Select",ariaExpanded:b=>l.get(b),ariaHaspopup:"listbox",ariaControls:b=>b!=null&&b.elementNode?Me("selectBox",b.elementNode):void 0,onKeyDown:(b,k)=>{let C=b.key;if(C==="Escape"){u(k);return}if(C==="Enter"||C===" "){b.preventDefault(),f(k);return}if(C==="ArrowDown"||C==="ArrowUp"||C==="Home"||C==="End"){b.preventDefault();let L=C==="ArrowUp"||C==="End";l.get()?S(k,L):x(k,L);return}let g=b;C.length===1&&!g.ctrlKey&&!g.metaKey&&!g.altKey&&R(C,k)},style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:b=>(0,he.themeSpacing)(6+(0,he.themeDensity)(b)*2),minWidth:(0,he.themeSpacing)(32),outlineOffset:"-1px",outline:b=>`1px solid ${(0,he.themeColor)(b,"border-strong","neutral")}`,paddingInline:b=>(0,he.themeSpacing)((0,he.themeDensity)(b)*2),borderRadius:b=>(0,he.themeSpacing)((0,he.themeDensity)(b)*1.5),fontSize:b=>(0,he.themeSize)(b,"inherit"),color:b=>(0,he.themeColor)(b,"text",e),backgroundColor:b=>(0,he.themeColor)(b,"inherit",e),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:b=>v(b,e)}}});return(0,bt.merge)(s,D),s}var ke=require("@domphy/theme");function qi(n={}){let{accentColor:r="primary",color:o="neutral",value:e=null}=n;return{role:"option",tabindex:-1,ariaSelected:t=>{var m;let a=(m=t==null?void 0:t.elementNode)==null?void 0:m.getContext("select");if(!a)return;let l=a.value.get(t);return a.multiple?l.includes(e):l===e},onClick:(t,a)=>{let l=a.getContext("select");if(!l)return;let m=l.value,u=m.get();l.multiple?u.includes(e)?m.set(u.filter(s=>s!==e)):m.set(u.concat([e])):u!==e&&m.set(e)},_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag')},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,ke.themeSize)(t,"inherit"),height:t=>(0,ke.themeSpacing)(6+(0,ke.themeDensity)(t)*2),paddingInline:t=>(0,ke.themeSpacing)((0,ke.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,ke.themeColor)(t,"text",o),backgroundColor:t=>(0,ke.themeColor)(t,"inherit",o),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,ke.themeColor)(t,"hover",o),color:t=>(0,ke.themeColor)(t,(0,ke.textToneOn)(2),o)},"&[aria-selected=true]":{backgroundColor:t=>(0,ke.themeColor)(t,"shift-13",r),color:t=>(0,ke.themeColor)(t,"shift-0","neutral")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:t=>v(t,r)}}}}var Sr=require("@domphy/core"),et=require("@domphy/theme");function Ui(n,r){var u;let o=n.key,e=r.domElement;if(!e)return;let i=It(e);if(!i.length)return;let t=e.ownerDocument.activeElement,a=t?i.indexOf(t):-1;if(o==="Enter"||o===" "){if(a===-1)return;n.preventDefault(),i[a].click();return}let l;if(o==="ArrowDown")l=Math.min(i.length-1,a+1);else if(o==="ArrowUp")l=a<=0?0:a-1;else if(o==="Home")l=0;else if(o==="End")l=i.length-1;else return;n.preventDefault();let m=i[l];m.focus(),(u=m.scrollIntoView)==null||u.call(m,{block:"nearest"})}function Yi(n={}){var a;let{color:r="neutral",multiple:o=!1}=n,e=(0,Sr.toState)((a=n.value)!=null?a:o?[]:null),i={div:l=>{let m=e.get(l);return(Array.isArray(m)?m:[m]).map(s=>({input:null,type:"hidden",name:n.name,value:s==null?"":String(s)}))},ariaHidden:"true",hidden:!0};return{dataTone:"shift-0",role:"listbox",ariaLabel:"Options",ariaMultiselectable:o?"true":void 0,tabindex:0,onKeyDown:Ui,_onSchedule:l=>{l.setContext("select",{value:e,multiple:o})},_onInit:l=>{l.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>(0,et.themeSpacing)((0,et.themeDensity)(l)*2),paddingInline:l=>(0,et.themeSpacing)((0,et.themeDensity)(l)*2),fontSize:l=>(0,et.themeSize)(l,"inherit"),backgroundColor:l=>(0,et.themeColor)(l,"inherit",r),color:l=>(0,et.themeColor)(l,"text",r)}}}var To=require("@domphy/core"),tt=require("@domphy/theme");function Gi(n={}){var i;let r=(0,To.toState)((i=n.color)!=null?i:"neutral","color"),o={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},e=(0,To.hashString)(JSON.stringify(o));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:t=>(0,tt.themeSize)(t),color:t=>(0,tt.themeColor)(t,"text",r.get(t)),height:(0,tt.themeSpacing)(6),display:"block",borderRadius:(0,tt.themeSpacing)(1),backgroundColor:t=>(0,tt.themeColor)(t,"inherit",r.get(t)),backgroundImage:t=>`linear-gradient(90deg, ${(0,tt.themeColor)(t,"inherit",r.get(t))} 0%, ${(0,tt.themeColor)(t,"shift-2",r.get(t))} 50%, ${(0,tt.themeColor)(t,"inherit",r.get(t))} 100%)`,backgroundSize:"200% 100%",animation:`${e} 1.6s ease-in-out infinite`,[`@keyframes ${e}`]:o}}}var vr=require("@domphy/core"),Do=require("@domphy/theme");function Ji(n={}){var o;let r=(0,vr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:e=>(0,Do.themeSize)(e,"inherit"),color:e=>(0,Do.themeColor)(e,"shift-10",r.get(e))}}}var Io=require("@domphy/core"),ot=require("@domphy/theme"),xr={to:{transform:"rotate(360deg)"}},Er=(0,Io.hashString)(JSON.stringify(xr));function Xi(n={}){var o;let r=(0,Io.toState)((o=n.color)!=null?o:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>(0,ot.themeSize)(e),backgroundColor:e=>(0,ot.themeColor)(e),color:e=>(0,ot.themeColor)(e,"text",r.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,ot.themeSpacing)(6),height:(0,ot.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,ot.themeSpacing)(.5)} solid ${(0,ot.themeColor)(e,"border-strong",r.get(e))}`,borderTopColor:e=>(0,ot.themeColor)(e,"shift-9",r.get(e)),boxSizing:"border-box",padding:0,animation:`${Er} 0.7s linear infinite`,[`@keyframes ${Er}`]:xr}}}var Jt=require("@domphy/core"),St=require("@domphy/theme");function Zi(n={}){let{direction:r="horizontal",defaultSize:o=50,min:e=10,max:i=90}=n;return{_onSchedule:(t,a)=>{(0,Jt.merge)(a,{_context:{splitter:{direction:r,size:(0,Jt.toState)(o),min:e,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:r==="horizontal"?"row":"column",overflow:"hidden"}}}function Qi(n){let r=n.parent;if(!r)return!0;for(let o of r.children.items)if(o instanceof Jt.ElementNode&&o.getMetadata("splitterPanel"))return o===n;return!0}function el(){return{_metadata:{splitterPanel:!0},_onMount:n=>{let r=n.getContext("splitter");if(!r){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let o=n.domElement,e=r.direction==="horizontal"?"width":"height",i=a=>{o.style[e]=`${Qi(n)?a:100-a}%`};i(r.size.get()),o.style.flexShrink="0",o.style.overflow="auto";let t=r.size.addListener(i);n.addHook("Remove",()=>{var a;r.panelCount=Math.max(0,((a=r.panelCount)!=null?a:1)-1),t()})}}}function tl(n={}){let{label:r="Resize"}=n;return{role:"separator",tabindex:0,ariaLabel:r,_onMount:o=>{let e=o.getContext("splitter");if(!e){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let i=o.domElement,t=e.direction==="horizontal";i.style.cursor=t?"col-resize":"row-resize",i.setAttribute("aria-orientation",t?"vertical":"horizontal"),i.setAttribute("aria-valuemin",String(e.min)),i.setAttribute("aria-valuemax",String(e.max)),i.setAttribute("aria-valuenow",String(Math.round(e.size.get())));let a=e.size.addListener(s=>{i.setAttribute("aria-valuenow",String(Math.round(s)))}),l=s=>{let c=s.shiftKey?10:1,d=null;if(t){let p=ut(s.key,i);p!==0&&(d=Math.min(Math.max(e.size.get()+p*c,e.min),e.max))}else s.key==="ArrowDown"?d=Math.min(e.size.get()+c,e.max):s.key==="ArrowUp"&&(d=Math.max(e.size.get()-c,e.min));s.key==="Home"?d=e.min:s.key==="End"&&(d=e.max),d!==null&&(s.preventDefault(),e.size.set(d))},m=null,u=s=>{var f;s.preventDefault();let c=i.parentElement;(f=i.setPointerCapture)==null||f.call(i,s.pointerId);let d=h=>{if(h.pointerId!==s.pointerId)return;let S=c.getBoundingClientRect(),x=t?(h.clientX-S.left)/S.width*100:(h.clientY-S.top)/S.height*100;e.size.set(Math.min(Math.max(x,e.min),e.max))};m=()=>{var h;document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",p),document.removeEventListener("pointercancel",p),m=null,(h=i.hasPointerCapture)!=null&&h.call(i,s.pointerId)&&i.releasePointerCapture(s.pointerId)};function p(h){h.pointerId===s.pointerId&&(m==null||m())}document.addEventListener("pointermove",d),document.addEventListener("pointerup",p),document.addEventListener("pointercancel",p)};i.addEventListener("keydown",l),i.addEventListener("pointerdown",u),o.addHook("Remove",()=>{m==null||m(),a(),i.removeEventListener("keydown",l),i.removeEventListener("pointerdown",u)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"none",backgroundColor:o=>(0,St.themeColor)(o,"inherit"),color:o=>(0,St.themeColor)(o,"text"),"&:hover":{backgroundColor:o=>(0,St.themeColor)(o,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:o=>v(o,"primary")},"&::after":{content:'""',width:(0,St.themeSpacing)(1),height:(0,St.themeSpacing)(1),borderRadius:(0,St.themeSpacing)(999),backgroundColor:o=>(0,St.themeColor)(o,"shift-4")}}}}var mo=require("@domphy/theme");function ol(n={}){let{gap:r=3,align:o,justify:e,density:i=!0}=n;return{style:E(E({display:"flex",flexDirection:"column",gap:i?t=>(0,mo.themeSpacing)((0,mo.themeDensity)(t)*r):()=>(0,mo.themeSpacing)(r)},o?{alignItems:o}:{}),e?{justifyContent:e}:{})}}var At=require("@domphy/core"),N=require("@domphy/theme");function Cr(n,r,o,e){if((0,At.isState)(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=(0,At.toState)(o!=null?o:e),n.setMetadata(r,i)),i}function nl(n,r,o){return n==="vertical"?{"&:not(:last-child)::after":{content:'""',position:"absolute",insetInlineStart:(0,N.themeSpacing)(3),top:(0,N.themeSpacing)(6),bottom:`-${(0,N.themeSpacing)(2)}`,width:"2px",height:"auto",insetInlineEnd:"auto",backgroundColor:e=>(0,N.themeColor)(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:last-child)::after":{backgroundColor:e=>(0,N.themeColor)(e,"shift-9",o)}}:{"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,N.themeSpacing)(3),insetInlineEnd:`calc(50% + ${(0,N.themeSpacing)(3)})`,insetInlineStart:`calc(-50% + ${(0,N.themeSpacing)(3)})`,height:"2px",backgroundColor:e=>(0,N.themeColor)(e,"shift-3",r),zIndex:"0"},"&[data-status=done]:not(:first-child)::after":{backgroundColor:e=>(0,N.themeColor)(e,"shift-9",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:e=>(0,N.themeColor)(e,"shift-9",o)}}}function kr(n,r,o,e,i){let t=o==="vertical",a=nl(o,e,i);return n.map((l,m)=>{var s;return{li:[typeof l.label=="string"?{span:l.label}:l.label],_key:(s=l.key)!=null?s:m,dataStep:String(m+1),dataStatus:c=>{let d=r.get(c);return m<d?"done":m===d?"active":"pending"},ariaCurrent:c=>r.get(c)===m?"step":void 0,style:O(E({position:"relative",display:"flex",flexDirection:t?"row":"column",alignItems:t?"flex-start":"center",gap:(0,N.themeSpacing)(1),flex:t?"none":"1",fontSize:c=>(0,N.themeSize)(c,"decrease-1"),textAlign:t?"start":"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,N.themeSpacing)(6),height:(0,N.themeSpacing)(6),borderRadius:(0,N.themeSpacing)(999),fontSize:c=>(0,N.themeSize)(c,"decrease-1"),fontWeight:(0,N.themeWeight)("bold"),flexShrink:"0",border:c=>`2px solid ${(0,N.themeColor)(c,"border-strong",e)}`,backgroundColor:c=>(0,N.themeColor)(c,"inherit"),color:c=>(0,N.themeColor)(c,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"}},a),{"&[data-status=active]::before":{backgroundColor:c=>(0,N.themeColor)(c,"shift-9",i),borderColor:c=>(0,N.themeColor)(c,"shift-9",i),color:c=>(0,N.themeColor)(c,"shift-0",i),boxShadow:c=>`0 0 0 3px ${(0,N.themeColor)(c,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:c=>(0,N.themeColor)(c,"shift-9",i),borderColor:c=>(0,N.themeColor)(c,"shift-9",i),color:c=>(0,N.themeColor)(c,"shift-0",i)},"&[data-status=pending]":{color:c=>(0,N.themeColor)(c,"muted")},"&[data-status=active]":{color:c=>(0,N.themeColor)(c,"shift-11",i),fontWeight:(0,N.themeWeight)("bold")},"&[data-status=done]":{color:c=>(0,N.themeColor)(c,"text",e)}})}})}function rl(n={items:[]}){var a;let{items:r=[],direction:o="horizontal",color:e="neutral",accentColor:i="primary"}=n,t={items:r,direction:o,color:e,accentColor:i};return O(E({_context:{steps:{current:(0,At.toState)((a=n.current)!=null?a:0),direction:o,color:e,accentColor:i}},_onSchedule:(l,m)=>{let u=Cr(l,"stepsCurrent",n.current,0);m[l.tagName]=kr(r,u,o,e,i)}},(0,At.behavior)("steps-items",l=>({update(m){let u=Cr(l,"stepsCurrent",n.current,0);l.children.update(kr(m.items,u,m.direction,m.color,m.accentColor),!!l.domElement,!0)}}),t)),{style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,N.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}})}var wr=require("@domphy/core"),Nt=require("@domphy/theme");function al(n={}){var o;let r=(0,wr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>(0,Nt.themeSize)(e,"inherit"),fontWeight:(0,Nt.themeWeight)("bold"),color:e=>(0,Nt.themeColor)(e,"shift-11",r.get(e)),backgroundColor:e=>(0,Nt.themeColor)(e)}}}var Tr=require("@domphy/core"),Po=require("@domphy/theme");function il(n={}){var o;let r=(0,Tr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>(0,Po.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,Po.themeColor)(e,"text",r.get(e))}}}var Dr=require("@domphy/core"),Oo=require("@domphy/theme");function ll(n={}){var o;let r=(0,Dr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>(0,Oo.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,Oo.themeColor)(e,"text",r.get(e))}}}var Ir=require("@domphy/core"),_=require("@domphy/theme");function sl(n={}){var o;let r=(0,Ir.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>(0,_.themeSize)(e,"inherit"),color:e=>(0,_.themeColor)(e,"text",r.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"start",fontWeight:(0,_.themeWeight)("medium"),paddingInline:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*3),paddingBlock:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*1),color:e=>(0,_.themeColor)(e,"shift-10",r.get(e)),backgroundColor:e=>(0,_.themeColor)(e,"inherit")},"& td":{textAlign:"start",paddingInline:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*3),paddingBlock:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*1),color:e=>(0,_.themeColor)(e,"text",r.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,_.themeColor)(e,"shift-3",r.get(e))}`,fontSize:e=>(0,_.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"start",fontWeight:(0,_.themeWeight)("medium"),paddingInline:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*3),paddingBlock:e=>(0,_.themeSpacing)((0,_.themeDensity)(e)*1),color:e=>(0,_.themeColor)(e,"shift-10",r.get(e)),backgroundColor:e=>(0,_.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,_.themeColor)(e,"shift-4",r.get(e))}`},"& tr":{backgroundColor:e=>(0,_.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>(0,_.themeColor)(e,"hover"),color:e=>(0,_.themeColor)(e,(0,_.textToneOn)(2))},"& tbody tr:hover td, & tbody tr:hover th":{color:e=>(0,_.themeColor)(e,(0,_.textToneOn)(2))}}}}var Xt=require("@domphy/core"),te=require("@domphy/theme");function Pr(n,r,o,e){if((0,Xt.isState)(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=(0,Xt.toState)(o!=null?o:e),n.setMetadata(r,i)),i}function Or(n,r,o,e,i){let t=n.nodeId,l={div:r.map((u,s)=>{var p;let c=(p=u.key)!=null?p:s;return{button:[typeof u.label=="string"?{span:u.label}:u.label],_key:c,type:"button",role:"tab",id:`tab${t}${c}`,ariaControls:`panel${t}${c}`,ariaSelected:f=>o.get(f)===c,tabIndex:f=>o.get(f)===c?0:-1,onClick:()=>o.set(c),onKeyDown:f=>{var b;let h=f.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;f.preventDefault();let S=r.map((k,C)=>{var g;return(g=k.key)!=null?g:C}),x=S.indexOf(c),R=x;if(h==="ArrowRight"||h==="ArrowLeft"){let k=ut(h,f.target);R=(x+k+S.length)%S.length}else h==="Home"?R=0:h==="End"&&(R=S.length-1);o.set(S[R]);let D=f.target.closest("[role=tablist]");(b=D==null?void 0:D.querySelectorAll("[role=tab]")[R])==null||b.focus()},style:{cursor:"pointer",fontSize:f=>(0,te.themeSize)(f,"inherit"),height:f=>(0,te.themeSpacing)(6+(0,te.themeDensity)(f)*2),paddingInline:f=>(0,te.themeSpacing)((0,te.themeDensity)(f)*4),border:"none",outline:"none",color:f=>(0,te.themeColor)(f,"shift-13"),backgroundColor:f=>(0,te.themeColor)(f,"inherit"),boxShadow:f=>`inset 0 ${(0,te.themeSpacing)(-.5)} 0 0 ${(0,te.themeColor)(f,"shift-1",i)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:f=>(0,te.themeColor)(f,"shift-13"),boxShadow:f=>`inset 0 ${(0,te.themeSpacing)(-.5)} 0 0 ${(0,te.themeColor)(f,"shift-2",i)}`},"&[aria-selected=true]:not([disabled])":{color:f=>(0,te.themeColor)(f,"shift-13",e),boxShadow:f=>`inset 0 ${(0,te.themeSpacing)(-.5)} 0 0 ${(0,te.themeColor)(f,"shift-8",e)}`},"&:focus-visible":{boxShadow:f=>v(f,e)},"&[aria-selected=true]:focus-visible":{boxShadow:f=>`${v(f,e)}, inset 0 ${(0,te.themeSpacing)(-.5)} 0 0 ${(0,te.themeColor)(f,"shift-6",e)}`}}}}),_key:"tablist",role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},m=r.map((u,s)=>{var d;let c=(d=u.key)!=null?d:s;return{div:[u.content],_key:c,role:"tabpanel",id:`panel${t}${c}`,ariaLabelledby:`tab${t}${c}`,tabIndex:0,hidden:p=>o.get(p)!==c,style:{paddingBlock:p=>(0,te.themeSpacing)((0,te.themeDensity)(p)*2),paddingInline:p=>(0,te.themeSpacing)((0,te.themeDensity)(p)*2)}}});return[l,...m]}function cl(n={items:[]}){let{items:r=[],accentColor:o="primary",color:e="neutral"}=n;return E({_onSchedule:(t,a)=>{var m,u;let l=Pr(t,"tabsActiveKey",n.activeKey,(u=(m=r[0])==null?void 0:m.key)!=null?u:0);a[t.tagName]=Or(t,r,l,o,e)}},(0,Xt.behavior)("tabs-items",t=>({update(a){var m,u;let l=Pr(t,"tabsActiveKey",n.activeKey,(u=(m=a.items[0])==null?void 0:m.key)!=null?u:0);t.children.update(Or(t,a.items,l,a.accentColor,a.color),!!t.domElement,!0)}}),{items:r,accentColor:o,color:e}))}var uo=require("@domphy/core"),se=require("@domphy/theme");function ml(n={}){var i,t;let r=(0,uo.toState)((i=n.color)!=null?i:"neutral","color"),o=(0,uo.toState)((t=n.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=n;return O(E({_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')}},(0,uo.behavior)("textarea-auto-resize",(a,l)=>{let m=a.domElement,u=l.autoResize,s=!1,c,d,p=()=>{!u||s||(s=!0,d==null||d.unobserve(m),m.style.overflow="hidden",m.style.height="auto",m.style.height=`${m.scrollHeight}px`,s=!1,u&&(d==null||d.observe(m)))},f=()=>{typeof IntersectionObserver!="undefined"&&(c||(c=new IntersectionObserver(S=>{S.some(x=>x.isIntersecting)&&p()})),c.observe(m)),typeof ResizeObserver!="undefined"&&(d||(d=new ResizeObserver(()=>{s||p()})),d.observe(m))},h=()=>{c==null||c.unobserve(m),d==null||d.unobserve(m)};return m.addEventListener("input",p),a.attributes.addListener("value",p),u&&(f(),p()),{resize:p,update(S){u=S.autoResize,a.attributes.addListener("value",p),u?(f(),p()):h()},destroy(){m.removeEventListener("input",p),c==null||c.disconnect(),d==null||d.disconnect()}}},{autoResize:e})),{_onUpdate:a=>{var l;(l=a.getBehavior("textarea-auto-resize"))==null||l.resize()},style:O(E({lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*2),paddingBlock:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,se.themeSpacing)((0,se.themeDensity)(a)*1.5),fontSize:a=>(0,se.themeSize)(a,"inherit")},qe(r)),{outlineOffset:"-1px",outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong",r.get(a))}`,backgroundColor:a=>(0,se.themeColor)(a,"inherit",r.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${(0,se.themeColor)(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>v(a,o.get(a))},"&[placeholder]:invalid:not(:placeholder-shown)":{outline:a=>`${(0,se.themeSpacing)(.5)} solid ${(0,se.themeColor)(a,"shift-5","error")}`},"&[data-status=error]":{outline:a=>`${(0,se.themeSpacing)(.5)} solid ${(0,se.themeColor)(a,"shift-6","error")}`},"&[data-status=warning]":{outline:a=>`${(0,se.themeSpacing)(.5)} solid ${(0,se.themeColor)(a,"shift-6","warning")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,se.themeColor)(a,"muted","neutral"),outline:a=>`1px solid ${(0,se.themeColor)(a,"border-strong","neutral")}`,backgroundColor:a=>(0,se.themeColor)(a,"shift-2","neutral")}})})}var Lr=require("@domphy/core"),Ye=require("@domphy/theme");function ul(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function dl(n={}){var t,a,l;let{last:r=!1}=n,o=(t=n.color)!=null?t:"neutral",e=(a=n.accentColor)!=null?a:"primary",i=(0,Lr.toState)((l=n.active)!=null?l:!1);return{style:E({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:m=>(0,Ye.themeSpacing)((0,Ye.themeDensity)(m)*2),paddingBottom:m=>r?"0":(0,Ye.themeSpacing)((0,Ye.themeDensity)(m)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:(0,Ye.themeSpacing)(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:m=>(0,Ye.themeColor)(m,"shift-8",i.get(m)?e:o),opacity:m=>i.get(m)?"1":"0.4"}},r?{}:{"&::after":{content:'""',position:"absolute",insetInlineStart:"calc(1rem - 1px)",top:"1.25rem",bottom:m=>(0,Ye.themeSpacing)((0,Ye.themeDensity)(m)*-4),width:"2px",backgroundColor:m=>(0,Ye.themeColor)(m,"shift-3",o)}})}}var Lo=require("@domphy/core"),Ie=require("@domphy/theme");function pn(n){let r=n.getMetadata("toastOpen");return r||(r=(0,Lo.toState)(!1),n.setMetadata("toastOpen",r)),r}var Rr=n=>{let r=n==null?void 0:n.elementNode;return r?pn(r).get(n):!1},pl=5e3;function fl(n,r){let{duration:o,onDismiss:e}=r,i=null,t=o,a=0,l=!1,m=()=>{i&&(clearTimeout(i),i=null)},u=()=>{l||(l=!0,m(),e==null||e(),n.remove())},s=f=>{m(),!(l||!Number.isFinite(f)||f<=0)&&(a=Date.now(),i=setTimeout(u,f))};s(o);let c=()=>{i&&(t-=Date.now()-a,m())},d=()=>{l||i||s(t)},p=n.domElement;return p==null||p.addEventListener("pointerenter",c),p==null||p.addEventListener("pointerleave",d),p==null||p.addEventListener("focusin",c),p==null||p.addEventListener("focusout",d),{pause:c,resume:d,update(f){o=f.duration,e=f.onDismiss,!i&&!l&&(t=o)},destroy(){m(),p==null||p.removeEventListener("pointerenter",c),p==null||p.removeEventListener("pointerleave",d),p==null||p.removeEventListener("focusin",c),p==null||p.removeEventListener("focusout",d)}}}function hl(n={}){let{position:r="top-center",color:o="neutral",duration:e=pl,onDismiss:i}=n,t=r.startsWith("top"),a=r.endsWith("center"),l=r.endsWith("right"),m={div:[],id:`domphy-toast-${r}`,style:{position:"fixed",display:"flex",flexDirection:t?"column":"column-reverse",alignItems:a?"center":l?"end":"start",inset:0,gap:(0,Ie.themeSpacing)(4),zIndex:30,padding:(0,Ie.themeSpacing)(6),pointerEvents:"none"}};return O(E({},(0,Lo.behavior)("toastAutoDismiss",fl,{duration:e,onDismiss:i})),{_portal:u=>{let s=u.domElement.querySelector(`#domphy-toast-${r}`);return s||(s=u.children.insert(m).domElement),s},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,Ie.themeSpacing)(32),pointerEvents:"auto",paddingBlock:u=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(u)*2),paddingInline:u=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(u)*4),borderRadius:u=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(u)*2),fontSize:u=>(0,Ie.themeSize)(u,"inherit"),color:u=>(0,Ie.themeColor)(u,"text",o),backgroundColor:u=>(0,Ie.themeColor)(u,"inherit",o),boxShadow:F("medium"),opacity:u=>Number(Rr(u)),transform:u=>Rr(u)?"translateY(0)":t?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:u=>requestAnimationFrame(()=>pn(u).set(!0)),_onBeforeRemove:(u,s)=>{var D,b;let c=!1,d=null,p=!1,f=u.getRoot(),h=(b=(D=u.domElement)==null?void 0:D.parentElement)!=null?b:null,S=()=>{var C;if(p||!h||h.id!==`domphy-toast-${r}`||h.childElementCount>0)return;p=!0;let k=(C=f.children)==null?void 0:C.items.find(g=>g.domElement===h);k?f.children.remove(k):h.remove()},x=()=>{c||(c=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",R),s(),S())},R=k=>{k.propertyName==="transform"&&x()};u.domElement.addEventListener("transitionend",R),d=setTimeout(x,350),u.addHook("Remove",()=>{var k;d&&(clearTimeout(d),d=null),(k=u.domElement)==null||k.removeEventListener("transitionend",R),S()}),pn(u).set(!1)}})}var Zt=require("@domphy/core"),ce=require("@domphy/theme");function Ro(n,r,o,e){if((0,Zt.isState)(o))return n.setMetadata(r,o),o;let i=n.getMetadata(r);return i||(i=(0,Zt.toState)(o!=null?o:e),n.setMetadata(r,i)),i}function gl(n,r){return Array.isArray(n)?n.includes(r):n===r}function yl(n,r,o,e,i){var s;let t=n.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t))return;n.preventDefault();let a=r.map((c,d)=>{var p;return(p=c.key)!=null?p:String(d)}),l=a.indexOf(o),m=l;if(t==="ArrowDown")m=(l+1)%a.length;else if(t==="ArrowUp")m=(l-1+a.length)%a.length;else if(t==="ArrowRight"||t==="ArrowLeft"){let c=ut(t,n.target);m=(l+c+a.length)%a.length}else t==="Home"?m=0:t==="End"&&(m=a.length-1);i||e.set(a[m]);let u=n.target.closest("[role=group]");(s=u==null?void 0:u.querySelectorAll("button")[m])==null||s.focus()}function zr(n,r,o,e,i,t){return n.map((a,l)=>{var s;let m=(s=a.key)!=null?s:String(l);return{button:[typeof a.label=="string"?{span:a.label}:a.label],_key:m,type:"button",role:"button",ariaPressed:c=>gl(r.get(c),m),tabIndex:c=>{var p,f,h,S,x;let d=r.get(c);if(e){let R=o.get(c);if(R!==null)return m===R?0:-1;let b=(h=(f=(Array.isArray(d)?d:[])[0])!=null?f:(p=n[0])==null?void 0:p.key)!=null?h:"0";return m===b?0:-1}return d===m||d===""&&m===((x=(S=n[0])==null?void 0:S.key)!=null?x:"0")?0:-1},onFocus:()=>o.set(m),onClick:()=>{let c=r.get();if(e){let d=Array.isArray(c)?[...c]:[];r.set(d.includes(m)?d.filter(p=>p!==m):[...d,m])}else r.set(c===m?"":m)},onKeyDown:c=>yl(c,n,m,r,e),style:{cursor:"pointer",fontSize:c=>(0,ce.themeSize)(c,"inherit"),height:(0,ce.themeSpacing)(6),paddingBlock:(0,ce.themeSpacing)(1),paddingInline:(0,ce.themeSpacing)(2),border:"none",borderRadius:(0,ce.themeSpacing)(1.5),color:c=>(0,ce.themeColor)(c,"shift-13",i),backgroundColor:c=>(0,ce.themeColor)(c,"inherit",i),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:c=>(0,ce.themeColor)(c,"shift-13",i),backgroundColor:c=>(0,ce.themeColor)(c,"hover",i)},"&:active:not([disabled])":{backgroundColor:c=>(0,ce.themeColor)(c,"increase-2",i)},"&[aria-pressed=true]":{backgroundColor:c=>(0,ce.themeColor)(c,"shift-3",t),color:c=>(0,ce.themeColor)(c,"shift-13",t)},"&:focus-visible":{boxShadow:c=>v(c,t)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}})}function bl(n={items:[]}){let{items:r=[],multiple:o=!1,color:e="neutral",accentColor:i="primary"}=n;return O(E({role:"group",_onSchedule:(a,l)=>{let m=Ro(a,"toggleGroupValue",n.value,o?[]:"");a.setContext("toggleGroup",{value:m,multiple:o});let u=Ro(a,"toggleGroupFocusedKey",void 0,null);l[a.tagName]=zr(r,m,u,o,e,i)}},(0,Zt.behavior)("toggle-items",a=>({update(l){let m=Ro(a,"toggleGroupValue",n.value,l.multiple?[]:""),u=Ro(a,"toggleGroupFocusedKey",void 0,null);a.children.update(zr(l.items,m,u,l.multiple,l.color,l.accentColor),!!a.domElement,!0)}}),{items:r,multiple:o,color:e,accentColor:i})),{style:{display:"flex",paddingBlock:(0,ce.themeSpacing)(1),paddingInline:(0,ce.themeSpacing)(1),gap:(0,ce.themeSpacing)(1),borderRadius:(0,ce.themeSpacing)(2),fontSize:a=>(0,ce.themeSize)(a,"inherit"),backgroundColor:a=>(0,ce.themeColor)(a,"inherit",e),color:a=>(0,ce.themeColor)(a,"text",e),outline:a=>`1px solid ${(0,ce.themeColor)(a,"border",e)}`,outlineOffset:"-1px"}})}function Sl(n={}){return dn(n)}function vl(){return{div:null,style:{flex:"1 1 0"}}}var po=require("@domphy/core"),Fe=require("@domphy/theme");function El(n={}){let{open:r=!1,placement:o="top",content:e="Tooltip Content",openDelay:i,closeDelay:t}=n,a=(0,po.toState)(o),l=(0,po.toState)(e),m={span:h=>l.get(h)},{show:u,hide:s,anchorPartial:c,openState:d}=it({kind:"tooltip",open:r,onDismiss:n.onDismiss,placement:a,content:m,openDelay:i,closeDelay:t}),p={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:h=>(0,Fe.themeSpacing)((0,Fe.themeDensity)(h)*1),paddingInline:h=>(0,Fe.themeSpacing)((0,Fe.themeDensity)(h)*3),borderRadius:h=>(0,Fe.themeSpacing)((0,Fe.themeDensity)(h)*1.5),color:h=>(0,Fe.themeColor)(h,"text"),backgroundColor:h=>(0,Fe.themeColor)(h),fontSize:h=>(0,Fe.themeSize)(h,"inherit"),boxShadow:F("low")},$:[sn({placement:a,bordered:!1})]};return m.$||(m.$=[]),m.$.push(p),(0,po.merge)(c,{ariaDescribedby:h=>h!=null&&h.elementNode&&d.get(h)?Me("tooltip",h.elementNode):void 0,onMouseEnter:(h,S)=>u(S),onMouseLeave:(h,S)=>s(S),onFocus:(h,S)=>u(S),onBlur:(h,S)=>s(S),onKeyDown:(h,S)=>h.key==="Escape"&&s(S)}),c}var fn=require("@domphy/core");function Vr(n,r){return n.key!==void 0&&n.key!==null?String(n.key):`index-${r}`}function xl(n={}){let{duration:r=300,delay:o=0}=n,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:l=>{l.addHook("Remove",()=>{for(let m of Array.from(i.values()))m();i.clear();for(let m of t)clearTimeout(m);t.clear();for(let m of a)cancelAnimationFrame(m);a.clear()})},_onBeforeUpdate:l=>{e=new Map,!Yt()&&l.children.items.forEach((m,u)=>{if(!(m instanceof fn.ElementNode))return;let s=m.domElement;s&&e.set(Vr(m,u),s.getBoundingClientRect())})},_onUpdate:l=>{l.children.items.forEach((m,u)=>{var k;if(!(m instanceof fn.ElementNode))return;let s=m.domElement;if(!s)return;let c=Vr(m,u),d=e.get(c);if(!d)return;let p=s.getBoundingClientRect(),f=d.left-p.left,h=d.top-p.top;if(Math.abs(f)<.5&&Math.abs(h)<.5)return;(k=i.get(s))==null||k(),s.style.transition="none",s.style.transform=`translate(${f}px, ${h}px)`,s.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),s.style.transition=`transform ${r}ms ease ${o}ms`,s.style.transform="translate(0px, 0px)"});a.add(S);let x=!1,R=null,D=()=>{x||(x=!0,R&&(t.delete(R),R=null),i.delete(s),s.removeEventListener("transitionend",b),s.style.transition="",s.style.transform="")},b=C=>{C.propertyName==="transform"&&D()};i.set(s,()=>{x=!0,R&&(clearTimeout(R),t.delete(R),R=null),i.delete(s),s.removeEventListener("transitionend",b)}),s.addEventListener("transitionend",b),R=setTimeout(D,r+o+34),t.add(R)}),e.clear()}}}var Mr=require("@domphy/core"),_t=require("@domphy/theme");function Cl(n={}){var o;let r=(0,Mr.toState)((o=n.color)!=null?o:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>(0,_t.themeSize)(e,"inherit"),backgroundColor:e=>(0,_t.themeColor)(e),color:e=>(0,_t.themeColor)(e,"text",r.get(e)),marginTop:0,marginBottom:0,paddingInlineStart:(0,_t.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}function kl(){return{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"}}}0&&(module.exports={abbreviation,accordion,alert,avatar,badge,blockquote,breadcrumb,breadcrumbEllipsis,button,buttonGhost,buttonSwitch,card,code,combobox,command,commandItem,commandSearch,datePicker,descriptionList,details,dialog,divider,drawer,elevation,emphasis,empty,errorBoundary,fab,figure,focusRing,formGroup,grid,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputPassword,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,linkButton,list,listItem,listItemButton,mark,menu,motion,orderedList,pagination,panelSection,paragraph,popover,popoverArrow,preformated,progress,rating,ringProgress,row,scrollArea,segmented,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stack,steps,strong,subscript,superscript,table,tabs,tag,textarea,timeline,timelineItem,toast,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList,visuallyHidden});
2
2
  //# sourceMappingURL=index.cjs.map