@domphy/ui 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-theme-ui.global.js +4 -4
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var gt=Object.defineProperty,Hn=Object.defineProperties,An=Object.getOwnPropertyDescriptor,Bn=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertyNames,So=Object.getOwnPropertySymbols;var vo=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable;var Co=(r,o,n)=>o in r?gt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,ot=(r,o)=>{for(var n in o||(o={}))vo.call(o,n)&&Co(r,n,o[n]);if(So)for(var n of So(o))Kn.call(o,n)&&Co(r,n,o[n]);return r},Eo=(r,o)=>Hn(r,Bn(o));var Wn=(r,o)=>{for(var n in o)gt(r,n,{get:o[n],enumerable:!0})},jn=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Fn(o))!vo.call(r,i)&&i!==n&>(r,i,{get:()=>o[i],enumerable:!(e=An(o,i))||e.enumerable});return r};var Yn=r=>jn(gt({},"__esModule",{value:!0}),r);var Ba={};Wn(Ba,{abbreviation:()=>qn,accordion:()=>Gn,alert:()=>Un,avatar:()=>Xn,badge:()=>Jn,blockquote:()=>Zn,breadcrumb:()=>Qn,breadcrumbEllipsis:()=>er,button:()=>tr,buttonGhost:()=>or,buttonSwitch:()=>nr,card:()=>rr,code:()=>ar,combobox:()=>lr,command:()=>sr,commandItem:()=>mr,commandSearch:()=>cr,datePicker:()=>dr,descriptionList:()=>fr,details:()=>gr,dialog:()=>yr,divider:()=>br,drawer:()=>Sr,emphasis:()=>Cr,empty:()=>vr,errorBoundary:()=>Er,fab:()=>kr,figure:()=>wr,formGroup:()=>Tr,heading:()=>Or,horizontalRule:()=>Dr,icon:()=>$r,image:()=>Ir,inputCheckbox:()=>zr,inputColor:()=>Vr,inputDateTime:()=>Lr,inputFile:()=>Mr,inputNumber:()=>Rr,inputOTP:()=>_r,inputRadio:()=>Nr,inputRange:()=>Hr,inputSearch:()=>Ar,inputSwitch:()=>Br,inputText:()=>Fr,keyboard:()=>Kr,label:()=>Wr,link:()=>jr,list:()=>Yr,listItem:()=>qr,listItemButton:()=>Gr,mark:()=>Ur,menu:()=>Xr,menuItem:()=>Jr,motion:()=>Zr,orderedList:()=>Qr,pagination:()=>ta,paragraph:()=>oa,popover:()=>na,popoverArrow:()=>no,preformated:()=>ra,progress:()=>aa,rating:()=>sa,segmented:()=>ca,segmentedItem:()=>ma,select:()=>ua,selectBox:()=>da,selectItem:()=>pa,selectList:()=>ha,skeleton:()=>fa,small:()=>ga,spinner:()=>ya,splitter:()=>ba,splitterHandle:()=>Ca,splitterPanel:()=>Sa,stepItem:()=>va,steps:()=>Ea,strong:()=>xa,subscript:()=>ka,superscript:()=>wa,tab:()=>Ta,tabPanel:()=>Oa,table:()=>Pa,tabs:()=>Da,tag:()=>lt,textarea:()=>$a,timeline:()=>Ia,timelineItem:()=>za,toast:()=>Va,toggle:()=>La,toggleGroup:()=>Ma,toolbar:()=>Ra,toolbarSpacer:()=>_a,tooltip:()=>Na,transitionGroup:()=>Ha,unorderedList:()=>Aa});module.exports=Yn(Ba);var Nt=require("@domphy/core"),we=require("@domphy/theme");function qn(r={}){var e,i;let o=(0,Nt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Nt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,we.themeSize)(t),backgroundColor:t=>(0,we.themeColor)(t),color:t=>(0,we.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,we.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,we.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,we.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,we.themeColor)(t,"shift-9",n.get(t))}}}}var Ht=require("@domphy/core"),Ve=require("@domphy/theme");function Gn(r={}){var i,t;let{type:o="single"}=r,n=(0,Ht.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Ht.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let l=u=>{let c=u.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(h=>{h!==m&&(h.open=!1)})};s.addEventListener("click",l),a.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(a)*1),outline:a=>`1px solid ${(0,Ve.themeColor)(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Ve.themeColor)(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${(0,Ve.themeSpacing)(.5)} solid ${(0,Ve.themeColor)(a,"shift-6",e.get(a))}`}}}}var xo=require("@domphy/core"),de=require("@domphy/theme");function Un(r={}){var n;let o=(0,xo.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,de.themeSpacing)(3),paddingBlock:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*2),paddingInline:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*4),boxShadow:e=>`inset ${(0,de.themeSpacing)(1)} 0 0 0 ${(0,de.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,de.themeColor)(e,"inherit",o.get(e)),color:e=>(0,de.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,de.themeSize)(e,"inherit")}}}var ko=require("@domphy/core"),Fe=require("@domphy/theme");function Xn(r={}){var n;let o=(0,ko.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,Fe.themeSpacing)(9),height:(0,Fe.themeSpacing)(9),fontSize:e=>(0,Fe.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,Fe.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Fe.themeColor)(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var At=require("@domphy/core"),Le=require("@domphy/theme");function Jn(r={}){var i;let{label:o=999}=r,n=(0,At.toState)(o),e=(0,At.toState)((i=r.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:(0,Le.themeSpacing)(1),minWidth:(0,Le.themeSpacing)(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Le.themeSize)(t,"decrease-1"),borderRadius:(0,Le.themeSpacing)(999),backgroundColor:t=>(0,Le.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Le.themeColor)(t,"shift-0",e.get(t))}}}}var wo=require("@domphy/core"),be=require("@domphy/theme");function Zn(r={}){var n;let o=(0,wo.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,be.themeSize)(e,"inherit"),backgroundColor:e=>(0,be.themeColor)(e,"inherit",o.get(e)),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),margin:0}}}var To=require("@domphy/core"),ve=require("@domphy/theme");function Qn(r={}){var e;let{separator:o="/"}=r,n=(0,To.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>(0,ve.themeSize)(i,"inherit"),gap:(0,ve.themeSpacing)(1),color:i=>(0,ve.themeColor)(i,"shift-9",n.get(i)),backgroundColor:i=>(0,ve.themeColor)(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>(0,ve.themeColor)(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>(0,ve.themeColor)(i,"shift-4",n.get(i)),paddingInlineStart:(0,ve.themeSpacing)(1)},"& > [aria-current=page]":{color:i=>(0,ve.themeColor)(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}var Po=require("@domphy/core"),Se=require("@domphy/theme");function er(r={}){var n;let o=(0,Po.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,Se.themeSize)(e,"inherit"),paddingInline:(0,Se.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,Se.themeColor)(e,"shift-8",o.get(e)),borderRadius:(0,Se.themeSpacing)(1),"&:hover":{color:e=>(0,Se.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,Se.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${(0,Se.themeSpacing)(.5)} solid ${(0,Se.themeColor)(e,"shift-6",o.get(e))}`,outlineOffset:(0,Se.themeSpacing)(.5)}}}}var Oo=require("@domphy/core"),A=require("@domphy/theme");function tr(r={}){var n;let o=(0,Oo.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,A.themeSize)(e,"inherit"),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingInline:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,A.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,A.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,A.themeSpacing)(.5)} ${(0,A.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,A.themeColor)(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Do=require("@domphy/core"),U=require("@domphy/theme");function or(r={}){var n;let o=(0,Do.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,U.themeSize)(e,"inherit"),paddingBlock:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),paddingInline:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),borderRadius:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>(0,U.themeColor)(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,U.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,U.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,U.themeSpacing)(.5)} ${(0,U.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,U.themeColor)(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var yt=require("@domphy/core"),F=require("@domphy/theme");function nr(r={}){var t,a;let{checked:o=!1}=r,n=(0,yt.toState)(o),e=(0,yt.toState)((t=r.color)!=null?t:"neutral","color"),i=(0,yt.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>(0,F.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,F.themeColor)(s,"shift-3",e.get(s))}`,minWidth:(0,F.themeSpacing)(12),minHeight:(0,F.themeSpacing)(6),borderRadius:(0,F.themeSpacing)(999),paddingLeft:(0,F.themeSpacing)(7),paddingRight:(0,F.themeSpacing)(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>(0,F.themeColor)(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,F.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,F.themeSpacing)(5),height:(0,F.themeSpacing)(5),borderRadius:(0,F.themeSpacing)(999),color:s=>(0,F.themeColor)(s,"shift-9"),backgroundColor:s=>(0,F.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,F.themeColor)(s,"increase-3",i.get(s)),outline:"none",color:s=>(0,F.themeColor)(s,"decrease-2"),paddingLeft:(0,F.themeSpacing)(2),paddingRight:(0,F.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,F.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var $o=require("@domphy/core"),V=require("@domphy/theme");function rr(r={}){var n;let o=(0,$o.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*2),backgroundColor:e=>(0,V.themeColor)(e,"inherit",o.get(e)),color:e=>(0,V.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,V.themeColor)(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*2),paddingInline:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*4),color:e=>(0,V.themeColor)(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*4),color:e=>(0,V.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,V.themeSpacing)(2),paddingBlock:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*2),paddingInline:e=>(0,V.themeSpacing)((0,V.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,V.themeColor)(e,"shift-3",o.get(e))}`}}}}var Io=require("@domphy/core"),Me=require("@domphy/theme");function ar(r={}){var n;let o=(0,Io.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",fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.get(e)),height:(0,Me.themeSpacing)(6),paddingInline:(0,Me.themeSpacing)(1.5),borderRadius:(0,Me.themeSpacing)(1)}}}var Ke=require("@domphy/core"),Y=require("@domphy/theme");var bt=require("@domphy/core"),Te=require("@domphy/floating");function Pe(r){let{open:o=!1,placement:n}=r,e=null,i=null,t=null,a=null,s=null,l=null,u=!1,c=(0,bt.toState)(o),m=()=>{u||!l||(u=!0,s=l.children.insert(r.content))},h=()=>{m(),t&&a&&(i&&i(),i=(0,Te.autoUpdate)(t,a,()=>{(0,Te.computePosition)(t,a,{placement:n.get(),middleware:[(0,Te.offset)(12),(0,Te.flip)(),(0,Te.shift)()],strategy:"fixed"}).then(({x:b,y:N,placement:I})=>{Object.assign(a.style,{left:`${b}px`,top:`${N}px`}),n.set(I)})}),c.set(!0))},p=()=>{i&&i(),i=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},S=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},g={style:{position:"fixed",pointerEvents:"auto",visibility:b=>c.get(b)?"visible":"hidden"},_onMount:b=>a=b.domElement,_portal:b=>{let N=b.domElement.querySelector("#domphy-floating");if(!N){let I={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};N=b.children.insert(I).domElement}return N}};return(0,bt.merge)(r.content,g),{show:f,hide:S,anchorPartial:{onKeyDown:b=>b.key==="Escape"&&S(),_onMount:b=>{l=b.getRoot(),t=b.domElement;let N=I=>{if(!c.get()||!t||!a)return;let P=I.target;!t.contains(P)&&!a.contains(P)&&S()};b.getRoot().domElement.addEventListener("click",N),b.addHook("BeforeRemove",()=>{e&&clearTimeout(e),i&&(i(),i=null),s&&s.remove(),b.getRoot().domElement.removeEventListener("click",N)})}}}}var zo=require("@domphy/core"),ee=require("@domphy/theme"),ir='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function lt(r={}){var e;let{removable:o=!1}=r,n=(0,zo.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:ir,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,ee.themeSpacing)(1),width:(0,ee.themeSpacing)(4),height:(0,ee.themeSpacing)(4),flexShrink:0,"&:hover":{backgroundColor:a=>(0,ee.themeColor)(a,"shift-4",n.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,ee.themeSpacing)(6),paddingBlock:"0px",borderRadius:(0,ee.themeSpacing)(1),paddingInlineStart:(0,ee.themeSpacing)(2),paddingInlineEnd:o?(0,ee.themeSpacing)(1):(0,ee.themeSpacing)(2),gap:(0,ee.themeSpacing)(2),fontSize:i=>(0,ee.themeSize)(i,"inherit"),backgroundColor:i=>(0,ee.themeColor)(i,"inherit",n.get(i)),color:i=>(0,ee.themeColor)(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ee.themeColor)(i,"shift-4",n.get(i))}`}}}function lr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,Ke.toState)(r.value),s=(0,Ke.toState)(i),{show:l,hide:u,anchorPartial:c}=Pe({open:s,placement:(0,Ke.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,Ke.merge)(r.content,m);let h={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,"shift-9",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},p;r.input?((0,Ke.merge)(r.input,{onFocus:()=>l(),style:h,_key:"combobox-input"}),p=r.input):p={input:null,onFocus:()=>l(),value:g=>(a.get(g),""),style:h,_key:"combobox-input"};let f={div:g=>{let E=a.get(g),b=Array.isArray(E)?E:[E],I=o.filter(P=>b.includes(P.value)).map(P=>({span:P.label,$:[lt({color:e,removable:!0})],_key:P.value,_onRemove:Ye=>{let qe=a.get(),ht=(Array.isArray(qe)?qe:[qe]).filter(it=>it!==P.value);t?a.set(ht):a.set(ht[0])}}));return I.push(p),I},style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}},S={_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:g=>g.children.insert(f),style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"shift-4","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),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)}};return(0,Ke.merge)(c,S),c}var St=require("@domphy/core"),M=require("@domphy/theme");function sr(){return{_onSchedule:(r,o)=>{(0,St.merge)(o,{_context:{command:{query:(0,St.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function cr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,M.themeSize)(e,"inherit"),paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),paddingBlock:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,M.themeColor)(e,"shift-3",o)}`,outline:"none",color:e=>(0,M.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,M.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,M.themeColor)(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>(0,M.themeColor)(e,"shift-6",n)}}}}function mr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var u,c;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(c=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(i.query.get());let l=i.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,M.themeSize)(e,"inherit"),height:e=>(0,M.themeSpacing)(6+(0,M.themeDensity)(e)*2),paddingInline:e=>(0,M.themeSpacing)((0,M.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,M.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,M.themeColor)(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>(0,M.themeColor)(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${(0,M.themeSpacing)(.5)} solid ${(0,M.themeColor)(e,"shift-6",n)}`,outlineOffset:`-${(0,M.themeSpacing)(.5)}`}}}}var Ce=require("@domphy/core"),C=require("@domphy/theme");var Z=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Ge=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Bt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),st=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Ft=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Kt=(r,o)=>Ge(r,-((r.getDay()-o+7)%7));function ur(r){var o,n;try{let e=new Intl.Locale(r),i=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function dr(r={}){var fo,go,yo,bo;let{mode:o="single",time:n=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=r,u=(fo=r.weekStartsOn)!=null?fo:ur(a),c=(0,Ce.toState)((go=r.accentColor)!=null?go:"primary","accentColor"),m=(0,Ce.toState)((yo=r.placement)!=null?yo:"bottom-start"),h=(0,Ce.toState)((bo=r.value)!=null?bo:o==="range"?[null,null]:null),p=l?h.addListener(d=>l(d)):null,f=(()=>{let d=h.get(),y=o==="range"?d==null?void 0:d[0]:d;return y instanceof Date?y:new Date})(),S=(0,Ce.toState)(f.getFullYear(),"viewYear"),g=(0,Ce.toState)(f.getMonth(),"viewMonth"),E=(0,Ce.toState)(Z(f),"focused"),b=(0,Ce.toState)(null,"hovered"),N=(0,Ce.toState)(f.getHours(),"hour"),I=(0,Ce.toState)(f.getMinutes(),"minute"),P=null,Ye=new Intl.DateTimeFormat(a,ot({dateStyle:"medium"},n?{timeStyle:"short"}:{})),qe=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),co=new Intl.DateTimeFormat(a,{weekday:"short"}),ht=new Intl.DateTimeFormat(a,{dateStyle:"full"}),it=d=>d?Ye.format(d):"",xn=d=>{if(s)return s(d);if(o==="range"){let[y,v]=d!=null?d:[null,null];return y?`${it(y)} \u2013 ${it(v)}`:""}return it(d)},kn=Array.from({length:7},(d,y)=>co.format(new Date(2023,0,1+(y+u)%7))),mo=d=>!!e&&Z(d)<Z(e)||!!i&&Z(d)>Z(i)||!!t&&t(d),Be=d=>{if(!n)return Z(d);let y=Z(d);return y.setHours(N.get(),I.get(),0,0),y},uo=d=>{var x;if(mo(d))return;if(o==="single"){h.set(Be(d)),n||Rt();return}let[y,v]=(x=h.get())!=null?x:[null,null];!y||y&&v?h.set([Be(d),null]):Z(d)<Z(y)?(h.set([Be(d),Be(y)]),n||Rt()):(h.set([y,Be(d)]),n||Rt())},wn=()=>{var d;if(n)if(o==="single"){let y=h.get();y&&h.set(Be(y))}else{let[y,v]=(d=h.get())!=null?d:[null,null];h.set([y&&Be(y),v&&Be(v)])}},Tn=(d,y)=>{var tt;if(o!=="range")return!1;let[v,x]=(tt=h.get(y))!=null?tt:[null,null],B=x!=null?x:b.get(y);if(!v||!B)return!1;let w=Z(v)<=Z(B)?v:B,ye=Z(v)<=Z(B)?B:v,ue=Z(d);return ue>=Z(w)&&ue<=Z(ye)},Pn=(d,y)=>{let v=h.get(y);if(o==="range"){let[x,B]=v!=null?v:[null,null];return st(d,x)||st(d,B)}return st(d,v)},ft=d=>{S.set(d.getFullYear()),g.set(d.getMonth())},po=d=>{let y=Bt(new Date(S.get(),g.get(),1),d);ft(y)},ho=d=>S.set(S.get()+d),Lt=()=>{setTimeout(()=>{var d;(d=P==null?void 0:P.querySelector(`[data-date="${Ft(E.get())}"]`))==null||d.focus()},0)},On=Vn(),{show:Dn,hide:$n,anchorPartial:Mt}=Pe({open:!1,placement:m,content:On});function Rt(){$n()}Mt.onClick=()=>{};let In={type:"text",readonly:!0,value:d=>xn(h.get(d)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{_t()},onFocus:()=>{_t()},onKeyDown:d=>{let y=d.key;(y==="ArrowDown"||y==="Enter")&&(d.preventDefault(),_t())},_onMount:d=>p&&d.addHook("Remove",()=>{p()})};function _t(){var y;let d=(y=zn())!=null?y:new Date;E.set(Z(d)),ft(d),Dn(),Lt()}function zn(){var y;let d=h.get();return o==="range"?(y=d==null?void 0:d[0])!=null?y:null:d!=null?d:null}return(0,Ce.merge)(Mt,In),Mt;function Vn(){let d=(w,ye,ue)=>({button:w,type:"button",ariaLabel:ye,onClick:ue,style:pr()}),y={div:[d("\xAB","Previous year",()=>ho(-1)),d("\u2039","Previous month",()=>po(-1)),{div:w=>qe.format(new Date(S.get(w),g.get(w),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:w=>(0,C.themeSize)(w)}},d("\u203A","Next month",()=>po(1)),d("\xBB","Next year",()=>ho(1))],style:{display:"flex",alignItems:"center",gap:(0,C.themeSpacing)(1),marginBottom:(0,C.themeSpacing)(2)}},v={div:kn.map((w,ye)=>({div:w,style:{textAlign:"center",fontSize:ue=>(0,C.themeSize)(ue,"decrease-1"),fontWeight:"600",color:ue=>(0,C.themeColor)(ue,"shift-7"),paddingBlock:(0,C.themeSpacing)(1)},_key:ye})),role:"row",style:Vo()},x={div:w=>Ln(w),role:"grid",ariaLabel:"Calendar",onKeyDown:Nn,onMouseLeave:()=>o==="range"&&b.set(null),style:{display:"flex",flexDirection:"column",gap:(0,C.themeSpacing)(.5)}},B=[y,v,x];return n&&B.push(Rn()),B.push(_n()),{div:B,role:"dialog",ariaModal:"false",_onMount:w=>{P=w.domElement},style:{minWidth:(0,C.themeSpacing)(70),padding:(0,C.themeSpacing)(3),borderRadius:(0,C.themeSpacing)(2),backgroundColor:w=>(0,C.themeColor)(w,"base"),color:w=>(0,C.themeColor)(w,"shift-10"),border:w=>`1px solid ${(0,C.themeColor)(w,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Ln(d){let y=new Date(S.get(d),g.get(d),1),v=g.get(d),x=Kt(y,u),B=[];for(let w=0;w<6;w++){let ye=[];for(let ue=0;ue<7;ue++){let tt=Ge(x,w*7+ue);ye.push(Mn(tt,v,d))}B.push({div:ye,role:"row",style:Vo(),_key:w})}return B}function Mn(d,y,v){let x=mo(d),B=Pn(d,v),w=Tn(d,v),ye=d.getMonth()!==y,ue=st(d,E.get(v)),tt=st(d,new Date);return{button:String(d.getDate()),type:"button",role:"gridcell",tabIndex:ue?0:-1,ariaSelected:B,ariaDisabled:x,disabled:x,ariaLabel:ht.format(d),dataDate:Ft(d),onClick:()=>uo(d),onMouseEnter:()=>o==="range"&&b.set(d),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,C.themeSpacing)(1),fontSize:j=>(0,C.themeSize)(j),fontFamily:"inherit",opacity:x?.35:ye?.5:1,backgroundColor:j=>B?(0,C.themeColor)(j,"shift-7",c.get(j)):w?(0,C.themeColor)(j,"shift-2",c.get(j)):"transparent",color:j=>B?(0,C.themeColor)(j,"shift-0",c.get(j)):(0,C.themeColor)(j,"shift-9"),outline:tt?j=>`1px solid ${(0,C.themeColor)(j,"shift-6",c.get(j))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:j=>B?(0,C.themeColor)(j,"shift-7",c.get(j)):(0,C.themeColor)(j,"shift-3",c.get(j))},"&:focus-visible":{outline:j=>`2px solid ${(0,C.themeColor)(j,"shift-6",c.get(j))}`}},_key:Ft(d)}}function Rn(){let d=(y,v,x)=>({select:Array.from({length:y},(B,w)=>({option:String(w).padStart(2,"0"),value:String(w),selected:ye=>v.get(ye)===w,_key:w})),ariaLabel:x,onChange:B=>{v.set(Number(B.target.value)),wn()},style:hr()});return{div:[d(24,N,"Hour"),{span:":",style:{fontWeight:"600"}},d(60,I,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,C.themeSpacing)(1),marginTop:(0,C.themeSpacing)(3)}}}function _n(){let d=(y,v)=>({button:y,type:"button",onClick:v,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>(0,C.themeSize)(x,"decrease-1"),color:x=>(0,C.themeColor)(x,"shift-8",c.get(x)),padding:(0,C.themeSpacing)(1)}});return{div:[d("Today",()=>{let y=new Date;E.set(Z(y)),ft(y),Lt()}),d("Clear",()=>{h.set(o==="range"?[null,null]:null),b.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,C.themeSpacing)(2),paddingTop:(0,C.themeSpacing)(2),borderTop:y=>`1px solid ${(0,C.themeColor)(y,"shift-3")}`}}}function Nn(d){let y=d,v=E.get(),x=null;switch(y.key){case"ArrowLeft":x=Ge(v,-1);break;case"ArrowRight":x=Ge(v,1);break;case"ArrowUp":x=Ge(v,-7);break;case"ArrowDown":x=Ge(v,7);break;case"Home":x=Kt(v,u);break;case"End":x=Ge(Kt(v,u),6);break;case"PageUp":x=Bt(v,y.shiftKey?-12:-1);break;case"PageDown":x=Bt(v,y.shiftKey?12:1);break;case"Enter":case" ":y.preventDefault(),uo(v);return;default:return}y.preventDefault(),E.set(x),ft(x),Lt()}}function Vo(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,C.themeSpacing)(.5)}}function pr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),color:r=>(0,C.themeColor)(r,"shift-8"),width:(0,C.themeSpacing)(7),height:(0,C.themeSpacing)(7),borderRadius:(0,C.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,C.themeColor)(r,"shift-3")}}}function hr(){return{fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),padding:(0,C.themeSpacing)(1),borderRadius:(0,C.themeSpacing)(1),border:r=>`1px solid ${(0,C.themeColor)(r,"shift-4")}`,backgroundColor:r=>(0,C.themeColor)(r,"base"),color:r=>(0,C.themeColor)(r,"shift-9")}}var Lo=require("@domphy/core"),Re=require("@domphy/theme");function fr(r={}){var n;let o=(0,Lo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${(0,Re.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Re.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"shift-9",o.get(e))}}}}var Wt=require("@domphy/core"),k=require("@domphy/theme");function gr(r={}){var i,t;let{duration:o=240}=r,n=(0,Wt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Wt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>(0,k.themeSize)(a,"inherit"),color:a=>(0,k.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,k.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,k.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,k.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,k.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,k.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*4),height:(0,k.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,k.themeSpacing)(2),height:(0,k.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,k.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.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,k.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*2),outlineOffset:`-${(0,k.themeSpacing)(.5)}`,outline:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>(0,k.themeSpacing)((0,k.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:(0,k.themeSpacing)(250),opacity:1,paddingTop:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*1),paddingBottom:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*3)}}}}var Ro=require("@domphy/core"),pe=require("@domphy/theme"),Mo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function yr(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Ro.toState)(n),i=null,t=!1;return{_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(a,s)=>{if(a.target!==s.domElement)return;let l=s.domElement.getBoundingClientRect();a.clientX>=l.left&&a.clientX<=l.right&&a.clientY>=l.top&&a.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(a,s)=>{if(!t)return;t=!1,s.domElement.close(),document.body.style.overflow="",i==null||i.focus(),i=null},_onMount:a=>{let s=a.domElement;s.setAttribute("aria-modal","true");let l=null,u=p=>{if(p.key!=="Tab")return;let f=Array.from(s.querySelectorAll(Mo)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!f.length){p.preventDefault();return}let S=f[0],g=f[f.length-1];p.shiftKey?(document.activeElement===S||document.activeElement===s)&&(p.preventDefault(),g.focus()):document.activeElement===g&&(p.preventDefault(),S.focus())},c=p=>{p.preventDefault(),e.set(!1)};s.addEventListener("cancel",c);let m=p=>{p?(i=document.activeElement,s.showModal(),document.body.style.overflow="hidden",s.addEventListener("keydown",u),requestAnimationFrame(()=>{s.style.opacity="1";let f=s.querySelector(Mo);f==null||f.focus()})):(t=!0,s.style.opacity="0",s.removeEventListener("keydown",u),l=setTimeout(()=>{l=null,t&&(t=!1,s.close(),document.body.style.overflow="",i==null||i.focus(),i=null)},350))};m(e.get());let h=e.addListener(m);a.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),h(),s.removeEventListener("cancel",c),document.body.style.overflow="",s.removeEventListener("keydown",u),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:a=>(0,pe.themeSize)(a,"inherit"),color:a=>(0,pe.themeColor)(a,"shift-10",o),backgroundColor:a=>(0,pe.themeColor)(a,"inherit",o),border:"none",padding:a=>(0,pe.themeSpacing)((0,pe.themeDensity)(a)*3),boxShadow:a=>`0 ${(0,pe.themeSpacing)(9)} ${(0,pe.themeSpacing)(16)} ${(0,pe.themeColor)(a,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:a=>(0,pe.themeColor)(a,"shift-2","neutral"),opacity:.75}}}}var _o=require("@domphy/core"),_e=require("@domphy/theme");function br(r={}){var n;let o=(0,_o.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,_e.themeSpacing)(2),fontSize:e=>(0,_e.themeSize)(e,"inherit"),backgroundColor:e=>(0,_e.themeColor)(e),color:e=>(0,_e.themeColor)(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,_e.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,_e.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var Ao=require("@domphy/core"),se=require("@domphy/theme"),jt={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},No={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},ct=r=>r==="left"||r==="right";function Ho(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Sr(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:i}=r,t=(0,Ao.toState)(n),a=e==="start"||e==="end",s=Ho(e,!1),l=ct(s)?(0,se.themeSpacing)(80):(0,se.themeSpacing)(64),u=i!=null?i:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let h=P=>{P.preventDefault(),t.set(!1)};m.addEventListener("cancel",h);let p=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),f=Ho(e,p);a&&(m.style.transform=jt[f],m.style.margin=No[f],m.style.width=ct(f)?u:"100dvw",m.style.height=ct(f)?"100dvh":u);let S=!1,g=null,E=()=>{g=null,S&&(S=!1,m.close(),document.body.style.overflow="")},b=P=>{P.target===m&&P.propertyName==="transform"&&E()};m.addEventListener("transitionend",b);let N=P=>{P?(S=!1,m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(S=!0,m.style.transform=jt[f],g=setTimeout(E,350))};N(t.get());let I=t.addListener(N);c.addHook("Remove",()=>{g&&(clearTimeout(g),g=null),I(),m.removeEventListener("cancel",h),m.removeEventListener("transitionend",b),document.body.style.overflow=""})},style:{transform:jt[s],transition:"transform 0.25s ease",fontSize:c=>(0,se.themeSize)(c,"inherit"),color:c=>(0,se.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,se.themeColor)(c,"inherit",o),border:"none",padding:c=>(0,se.themeSpacing)((0,se.themeDensity)(c)*3),margin:No[s],width:ct(s)?u:"100dvw",height:ct(s)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${(0,se.themeSpacing)(4)} ${(0,se.themeSpacing)(12)} ${(0,se.themeColor)(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>(0,se.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var Bo=require("@domphy/core"),Ct=require("@domphy/theme");function Cr(r={}){var n;let o=(0,Bo.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,Ct.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,Ct.themeColor)(e,"shift-10",o.get(e))}}}var Fo=require("@domphy/core"),Ue=require("@domphy/theme");function vr(r={}){var n;let o=(0,Fo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,Ue.themeSpacing)(3),paddingBlock:(0,Ue.themeSpacing)(12),paddingInline:(0,Ue.themeSpacing)(6),textAlign:"center",color:e=>(0,Ue.themeColor)(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>(0,Ue.themeColor)(e,"shift-5",o.get(e))}}}}function Er(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let i=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}var Ko=require("@domphy/core"),ce=require("@domphy/theme"),xr={small:8,medium:10,large:14};function kr(r={}){var e,i;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,ce.themeSpacing)(xr[(i=r.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,ce.themeSize)(t,"inherit"),backgroundColor:t=>(0,ce.themeColor)(t,"shift-9",o.get(t)),color:t=>(0,ce.themeColor)(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${(0,ce.themeSpacing)(1)} ${(0,ce.themeSpacing)(4)} ${(0,ce.themeColor)(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${(0,ce.themeSpacing)(2)} ${(0,ce.themeSpacing)(6)} ${(0,ce.themeColor)(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${(0,ce.themeColor)(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Wo=require("@domphy/core"),Oe=require("@domphy/theme");function wr(r={}){var n;let o=(0,Wo.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,Oe.themeSpacing)(2),marginInline:0,marginTop:(0,Oe.themeSpacing)(3),marginBottom:(0,Oe.themeSpacing)(3),color:e=>(0,Oe.themeColor)(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,Oe.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,Oe.themeSize)(e,"decrease-1"),color:e=>(0,Oe.themeColor)(e,"shift-8",o.get(e)),lineHeight:1.45}}}}var jo=require("@domphy/core"),L=require("@domphy/theme");function Tr(r={}){var i;let{layout:o="horizontal"}=r,n=(0,jo.toState)((i=r.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>(0,L.themeSpacing)((0,L.themeDensity)(t)*3),paddingBlock:t=>(0,L.themeSpacing)((0,L.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,L.themeSpacing)((0,L.themeDensity)(t)*2),fontSize:t=>(0,L.themeSize)(t,"inherit"),backgroundColor:t=>(0,L.themeColor)(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,L.themeSpacing)(4),rowGap:(0,L.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,L.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,L.themeSpacing)((0,L.themeDensity)(t)*1),borderRadius:t=>(0,L.themeSpacing)((0,L.themeDensity)(t)*2),color:t=>(0,L.themeColor)(t,"shift-9",n.get(t)),backgroundColor:t=>(0,L.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":(0,L.themeSpacing)((0,L.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,L.themeSpacing)(2)} * -1)`,fontSize:t=>(0,L.themeSize)(t,"decrease-1"),color:t=>(0,L.themeColor)(t,"shift-9",n.get(t))}}}}var Yo=require("@domphy/core"),nt=require("@domphy/theme"),Pr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Or(r={}){var n;let o=(0,Yo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>(0,nt.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,nt.themeSpacing)(2),fontSize:e=>{let i=Pr[e.elementNode.tagName]||"inherit";return(0,nt.themeSize)(e,i)}}}}var qo=require("@domphy/core"),mt=require("@domphy/theme");function Dr(r={}){var n;let o=(0,qo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:(0,mt.themeSpacing)(3),marginBottom:(0,mt.themeSpacing)(3),backgroundColor:e=>(0,mt.themeColor)(e,"shift-4",o.get(e))}}}var Go=require("@domphy/core"),Xe=require("@domphy/theme");function $r(r={}){var n;let o=(0,Go.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,Xe.themeSpacing)(4),height:(0,Xe.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Xe.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Xe.themeColor)(e,"shift-9",o.get(e))}}}var Uo=require("@domphy/core"),vt=require("@domphy/theme");function Ir(r={}){var n;let o=(0,Uo.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,vt.themeSpacing)(2),backgroundColor:e=>(0,vt.themeColor)(e,"inherit",o.get(e))}}}var Yt=require("@domphy/core"),R=require("@domphy/theme");function zr(r={}){var e,i;let o=(0,Yt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,R.themeSize)(t,"inherit"),display:"inline-flex",position:"relative",width:(0,R.themeSpacing)(6),height:(0,R.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,R.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,R.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,R.themeColor)(t,"shift-9",o.get(t)),width:(0,R.themeSpacing)(4),height:(0,R.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,R.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,R.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,R.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,R.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,R.themeSpacing)(.5)} solid ${(0,R.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,R.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,R.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,R.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,R.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,R.themeSpacing)(1.5),outline:t=>`${(0,R.themeSpacing)(.5)} solid ${(0,R.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,R.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var te=require("@domphy/theme");function Vr(r={}){return{type:"color",_onSchedule:(o,n)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>(0,te.themeSize)(o,"inherit"),paddingBlock:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1),paddingInline:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1),blockSize:o=>(0,te.themeSpacing)(6+(0,te.themeDensity)(o)*2),inlineSize:o=>(0,te.themeSpacing)(6+(0,te.themeDensity)(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>(0,te.themeColor)(o,"shift-2","neutral"),outline:o=>`1px solid ${(0,te.themeColor)(o,"shift-4","neutral")}`}}}}var qt=require("@domphy/core"),q=require("@domphy/theme");function Lr(r={}){var i,t;let{mode:o="datetime-local"}=r,n=(0,qt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,qt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:a=>(0,q.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,q.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,q.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,q.themeColor)(a,"shift-4",n.get(a))}`,borderRadius:a=>(0,q.themeSpacing)((0,q.themeDensity)(a)*1),paddingInline:a=>(0,q.themeSpacing)((0,q.themeDensity)(a)*3),height:a=>(0,q.themeSpacing)(6+(0,q.themeDensity)(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${(0,q.themeSpacing)(.5)} solid ${(0,q.themeColor)(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,q.themeColor)(a,"shift-8","neutral"),backgroundColor:a=>(0,q.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,q.themeColor)(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${(0,q.themeSpacing)(.5)} solid ${(0,q.themeColor)(a,"shift-6","error")}`}}}}var Gt=require("@domphy/core"),O=require("@domphy/theme");function Mr(r={}){var e,i;let o=(0,Gt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Gt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,O.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,O.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,O.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,O.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,O.themeSpacing)((0,O.themeDensity)(t)*1),height:t=>(0,O.themeSpacing)(6+(0,O.themeDensity)(t)*2),paddingInline:t=>(0,O.themeSpacing)((0,O.themeDensity)(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>(0,O.themeSpacing)((0,O.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,O.themeSpacing)(1),height:(0,O.themeSpacing)(6),paddingInline:(0,O.themeSpacing)(2),cursor:"pointer",color:t=>(0,O.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,O.themeColor)(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,O.themeSpacing)(.5)} solid ${(0,O.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,O.themeColor)(t,"shift-8","neutral"),outline:t=>`1px solid ${(0,O.themeColor)(t,"shift-4","neutral")}`,backgroundColor:t=>(0,O.themeColor)(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,O.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,O.themeColor)(t,"shift-3","neutral")}}}}var Ut=require("@domphy/core"),K=require("@domphy/theme");function Rr(r={}){var e,i;let o=(0,Ut.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ut.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,K.themeSpacing)(10),paddingInlineStart:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingInlineEnd:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1.5),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),fontSize:t=>(0,K.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,K.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,K.themeSpacing)(.5)} solid ${(0,K.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,K.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,K.themeColor)(t,"shift-8","neutral")}}}}var Xt=require("@domphy/theme");function _r(){return{style:{display:"flex",alignItems:"center",gap:(0,Xt.themeSpacing)(2),"& > *":{minWidth:`${(0,Xt.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),l=a.target,u=s.indexOf(l);l.value&&u<s.length-1&&s[u+1].focus()},i=a=>{let s=n(),l=a.target,u=s.indexOf(l);a.key==="Backspace"&&!l.value&&u>0&&s[u-1].focus(),a.key==="ArrowLeft"&&u>0&&s[u-1].focus(),a.key==="ArrowRight"&&u<s.length-1&&s[u+1].focus()},t=a=>{var h,p,f;a.preventDefault();let s=(p=(h=a.clipboardData)==null?void 0:h.getData("text"))!=null?p:"",l=n(),u=l.indexOf(a.target),c=u===-1?0:u;[...s].forEach((S,g)=>{l[c+g]&&(l[c+g].value=S)});let m=Math.min(c+s.length-1,l.length-1);(f=l[m])==null||f.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}var Jt=require("@domphy/core"),oe=require("@domphy/theme");function Nr(r={}){var e,i;let o=(0,Jt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Jt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,oe.themeSize)(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:(0,oe.themeSpacing)(6),height:(0,oe.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,oe.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,oe.themeColor)(t,"shift-9",o.get(t)),width:(0,oe.themeSpacing)(4),height:(0,oe.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,oe.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,oe.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,oe.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,oe.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${(0,oe.themeSpacing)(.5)} solid ${(0,oe.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,oe.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Zt=require("@domphy/core"),ne=require("@domphy/theme");function Hr(r={}){var e,i;let o=(0,Zt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Zt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,ne.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,ne.themeSpacing)(1.5),borderRadius:(0,ne.themeSpacing)(999),backgroundColor:t=>(0,ne.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,ne.themeSpacing)(4),height:(0,ne.themeSpacing)(4),borderRadius:(0,ne.themeSpacing)(999),border:"none",marginTop:`calc((${(0,ne.themeSpacing)(1.5)} - ${(0,ne.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,ne.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,ne.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ne.themeSpacing)(.5)} solid ${(0,ne.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:(0,ne.themeSpacing)(1),borderRadius:(0,ne.themeSpacing)(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Qt=require("@domphy/core"),G=require("@domphy/theme");function Ar(r={}){var e,i;let o=(0,Qt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Qt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,G.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,G.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,G.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,G.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*1),minWidth:(0,G.themeSpacing)(32),paddingInline:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*3),paddingBlock:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*1),"&::placeholder":{color:t=>(0,G.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]), &:focus-visible":{outline:t=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,G.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,G.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,G.themeColor)(t,"shift-4","neutral")}`}}}}var Xo=require("@domphy/core"),re=require("@domphy/theme");function Br(r={}){var n;let o=(0,Xo.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,re.themeSize)(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:(0,re.themeSpacing)(9),height:(0,re.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,re.themeSpacing)(1),"&:checked":{"&::before":{backgroundColor:e=>(0,re.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,re.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,re.themeSpacing)(3),height:(0,re.themeSpacing)(3),borderRadius:(0,re.themeSpacing)(999),left:(0,re.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,re.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,re.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,re.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,re.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var eo=require("@domphy/core"),D=require("@domphy/theme");function Fr(r={}){var e,i;let o=(0,eo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,eo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,D.themeSpacing)(10),paddingInline:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*3),paddingBlock:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),borderRadius:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),fontSize:t=>(0,D.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,D.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"inherit",o.get(t)),"&::placeholder":{color:t=>(0,D.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,D.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,D.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,D.themeColor)(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6","warning")}`}}}}var Jo=require("@domphy/core"),De=require("@domphy/theme");function Kr(r={}){var n;let o=(0,Jo.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,"shift-9",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,De.themeSpacing)(.5),paddingInline:(0,De.themeSpacing)(1.5),borderRadius:(0,De.themeSpacing)(1),outline:e=>`1px solid ${(0,De.themeColor)(e,"shift-4",o.get(e))}`}}}var to=require("@domphy/core"),We=require("@domphy/theme");function Wr(r={}){var e,i;let o=(0,to.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,to.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,We.themeSpacing)(2),fontSize:t=>(0,We.themeSize)(t,"inherit"),color:t=>(0,We.themeColor)(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,We.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,We.themeColor)(t,"shift-8","neutral")}}}}var oo=require("@domphy/core"),he=require("@domphy/theme");function jr(r={}){var e,i;let o=(0,oo.toState)((e=r.color)!=null?e:"primary","color"),n=(0,oo.toState)((i=r.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,he.themeSize)(t,"inherit"),backgroundColor:t=>(0,he.themeColor)(t),color:t=>(0,he.themeColor)(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,he.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,he.themeColor)(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:(0,he.themeSpacing)(1),outlineOffset:(0,he.themeSpacing)(1),outline:t=>`${(0,he.themeSpacing)(.5)} solid ${(0,he.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,he.themeColor)(t,"shift-8","neutral")}}}}var Zo=require("@domphy/core"),_=require("@domphy/theme");function Yr(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function qr(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,_.themeSpacing)((0,_.themeDensity)(n)*2),paddingBlock:n=>(0,_.themeSpacing)(o?1:(0,_.themeDensity)(n)*2),paddingInline:n=>(0,_.themeSpacing)((0,_.themeDensity)(n)*3),fontSize:n=>(0,_.themeSize)(n,"inherit")}}}function Gr(r={}){var i,t;let o=(0,Zo.toState)((i=r.color)!=null?i:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{cursor:"pointer",style:{appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,_.themeSpacing)((0,_.themeDensity)(a)*2),paddingBlock:a=>(0,_.themeSpacing)(e?1:(0,_.themeDensity)(a)*2),paddingInline:a=>(0,_.themeSpacing)((0,_.themeDensity)(a)*3),fontSize:a=>(0,_.themeSize)(a,"inherit"),color:a=>(0,_.themeColor)(a,"shift-9",o.get(a)),borderRadius:a=>(0,_.themeSpacing)((0,_.themeDensity)(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,_.themeColor)(a,"shift-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,_.themeColor)(a,"shift-3",n),color:a=>(0,_.themeColor)(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${(0,_.themeColor)(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Qo=require("@domphy/core"),Ne=require("@domphy/theme");function Ur(r={}){var n;let o=(0,Qo.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,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ne.themeColor)(e,"inherit",o.get(e)),height:(0,Ne.themeSpacing)(6),borderRadius:(0,Ne.themeSpacing)(1),paddingInline:(0,Ne.themeSpacing)(1.5)}}}var Et=require("@domphy/core"),$e=require("@domphy/theme");function Xr(r={}){let{color:o="neutral",selectable:n=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,t)=>{var s;let a={_context:{menu:{activeKey:(0,Et.toState)((s=r.activeKey)!=null?s:null),selectable:n}}};(0,Et.merge)(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,$e.themeSpacing)((0,$e.themeDensity)(i)*2),paddingInline:i=>(0,$e.themeSpacing)((0,$e.themeDensity)(i)*2),fontSize:i=>(0,$e.themeSize)(i,"inherit"),backgroundColor:i=>(0,$e.themeColor)(i,"inherit",o)}}}var Q=require("@domphy/theme");function Jr(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"menuitem",_onInsert:i=>{var l,u;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let t=i.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(l=i.parent)==null?void 0:l.children.items)!=null?u:[];a=a.filter(c=>c.type==="ElementNode"&&c.attributes.get("role")==="menuitem");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i);t.selectable&&(i.attributes.set("ariaCurrent",c=>t.activeKey.get(c)===s||void 0),i.addEvent("click",()=>t.activeKey.set(s)))},onKeyDown:(i,t)=>{var c,m,h,p;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let s=((h=(m=t.parent)==null?void 0:m.children.items)!=null?h:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem");if(!s.length)return;let l=s.indexOf(t),u=l;a==="ArrowDown"?u=(l+1)%s.length:a==="ArrowUp"?u=(l-1+s.length)%s.length:a==="Home"?u=0:a==="End"&&(u=s.length-1),(p=s[u].domElement)==null||p.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>(0,Q.themeSpacing)(2),width:"100%",fontSize:i=>(0,Q.themeSize)(i,"inherit"),height:i=>(0,Q.themeSpacing)(6+(0,Q.themeDensity)(i)*2),paddingInline:i=>(0,Q.themeSpacing)((0,Q.themeDensity)(i)*3),border:"none",outline:"none",color:i=>(0,Q.themeColor)(i,"shift-9",n),backgroundColor:i=>(0,Q.themeColor)(i,"inherit",n),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>(0,Q.themeColor)(i,"shift-2",n)},"&[aria-current=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"shift-3",o),color:i=>(0,Q.themeColor)(i,"shift-10")},"&:focus-visible":{outline:i=>`${(0,Q.themeSpacing)(.5)} solid ${(0,Q.themeColor)(i,"shift-6",o)}`,outlineOffset:`-${(0,Q.themeSpacing)(.5)}`}}}}var en=r=>!!r&&typeof r.get=="function"&&r._isState===!0,rt=r=>{let o={},n=[];for(let e in r){let i=r[e];e==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?n.push(`scale(${i})`):e==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return n.length&&(o.transform=n.join(" ")),o};function Zr(r={}){var a,s,l,u;let{initial:o,animate:n,exit:e,transition:i={}}=r,t={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(l=i.easing)!=null?l:"ease",iterations:(u=i.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let h=en(n)?n.get():n;if(h?m.animate(o?[rt(o),rt(h)]:[rt(h)],t):o&&Object.assign(m.style,rt(o)),en(n)){let p=n.addListener(f=>{m.animate([rt(f)],t)});c.setMetadata("motionRelease",p)}},_onBeforeRemove:(c,m)=>{let h=c.domElement;if(!h||!e||typeof h.animate!="function")return m();h.animate([rt(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}var tn=require("@domphy/core"),Je=require("@domphy/theme");function Qr(r={}){var n;let o=(0,tn.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,Je.themeSize)(e,"inherit"),backgroundColor:e=>(0,Je.themeColor)(e),color:e=>(0,Je.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Je.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var on=require("@domphy/core"),W=require("@domphy/theme");function ea(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),i=Math.min(o-1,r+1);for(let t=e;t<=i;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ta(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,i=(0,on.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>(0,W.themeSpacing)(6+(0,W.themeDensity)(l)*2),height:l=>(0,W.themeSpacing)(6+(0,W.themeDensity)(l)*2),paddingInline:l=>(0,W.themeSpacing)((0,W.themeDensity)(l)*2),borderRadius:l=>(0,W.themeSpacing)((0,W.themeDensity)(l)*1),border:"none",cursor:"pointer",fontSize:l=>(0,W.themeSize)(l,"inherit"),backgroundColor:"transparent",color:l=>(0,W.themeColor)(l,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:l=>(0,W.themeColor)(l,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Eo(ot({},t),{backgroundColor:l=>(0,W.themeColor)(l,"shift-6",e),color:l=>(0,W.themeColor)(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>(0,W.themeColor)(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let u={div:c=>{let m=i.get(c),h=[];h.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});for(let p of ea(m,o))if(p==="...")h.push({span:"\u2026",ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>(0,W.themeSpacing)((0,W.themeDensity)(f)*2),color:f=>(0,W.themeColor)(f,"shift-7",n)}});else{let f=p===m;h.push({button:String(p),type:"button",ariaLabel:`Page ${p}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>i.set(p),style:f?a:t})}return h.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),h},style:{display:"flex",alignItems:"center",gap:(0,W.themeSpacing)(1)}};l.children.insert(u)},style:{display:"inline-flex"}}}var nn=require("@domphy/core"),xt=require("@domphy/theme");function oa(r={}){var n;let o=(0,nn.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,xt.themeSize)(e,"inherit"),color:e=>(0,xt.themeColor)(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var ut=require("@domphy/core");function na(r){var h;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,i=null,t=(0,ut.toState)(o),a=(0,ut.toState)(n),{show:s,hide:l,anchorPartial:u}=Pe({open:t,placement:a,content:r.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:p=>{let f=p.attributes.get("id");i=f||p.nodeId,!f&&p.attributes.set("id",i)}};return(h=r.content).$||(h.$=[]),r.content.$.push(c),(0,ut.merge)(u,{ariaHaspopup:"dialog",ariaExpanded:p=>t.get(p),onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),onClick:()=>{e==="click"&&(t.get()?l():s())},onKeyDown:p=>{p.key==="Escape"&&t.get()&&l()},onFocus:()=>e==="hover"&&s(),onBlur:(p,f)=>{let S=p.relatedTarget,g=f.getRoot().domElement,E=i?g.querySelector(`#${CSS.escape(i)}`):null;S&&(E!=null&&E.contains(S))||l()},_onMount:p=>i&&p.attributes.set("ariaControls",i)}),u}var rn=require("@domphy/core"),Ee=require("@domphy/theme");function no(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,Ee.themeSpacing)(6),bordered:i=!0}=r,t=(0,rn.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"},s=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>(0,Ee.themeSize)(c),backgroundColor:c=>(0,Ee.themeColor)(c),color:c=>(0,Ee.themeColor)(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,Ee.themeSpacing)(1.5),height:(0,Ee.themeSpacing)(1.5),backgroundColor:c=>(0,Ee.themeColor)(c,"inherit",n),borderWidth:i?"1px":"0px",borderColor:c=>(0,Ee.themeColor)(c,"inherit",n),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),h=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",p=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${h},${p}) rotate(45deg)`}}}}}var an=require("@domphy/core"),fe=require("@domphy/theme");function ra(r={}){var n;let o=(0,an.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,fe.themeSize)(e,"inherit"),color:e=>(0,fe.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,fe.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*2),paddingInline:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*3),borderRadius:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*2)}}}var ro=require("@domphy/core"),He=require("@domphy/theme");function aa(r={}){var e,i;let o=(0,ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ro.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:(0,He.themeSpacing)(2),border:0,borderRadius:(0,He.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,He.themeColor)(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,He.themeColor)(t,"shift-3",o.get(t)),borderRadius:(0,He.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,He.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,He.themeSpacing)(999),transition:"width 220ms ease"}}}}var ln=require("@domphy/core"),kt=require("@domphy/theme"),ia='<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>',la='<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 sa(r={}){var a,s;let{max:o=5,readOnly:n=!1,onChange:e}=r,i=(a=r.color)!=null?a:"warning",t=(0,ln.toState)((s=r.value)!=null?s:0);return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,kt.themeSpacing)(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:l=>(0,kt.themeColor)(l,"shift-8",i)},_onMount:l=>{let u=l.domElement,c=t.get(),m=0,h=()=>{let f=m>0?m:c;Array.from(u.children).forEach((S,g)=>{S.innerHTML=g<f?ia:la})};u.innerHTML="";for(let f=1;f<=o;f++){let S=document.createElement("button");if(S.type="button",S.setAttribute("aria-label",`${f} star${f>1?"s":""}`),S.style.cssText="background:none;border:none;padding:0;cursor:inherit;color:inherit;font-size:inherit;display:flex;align-items:center;",!n){let g=f;S.addEventListener("click",()=>{let E=g===c?0:g;c=E,t.set(E),e==null||e(E),m=0,h()}),S.addEventListener("mouseenter",()=>{m=g,h()}),S.addEventListener("mouseleave",()=>{m=0,h()}),S.addEventListener("keydown",E=>{var I;let b=c;if(E.key==="ArrowRight"||E.key==="ArrowUp")b=Math.min(o,c+1),E.preventDefault();else if(E.key==="ArrowLeft"||E.key==="ArrowDown")b=Math.max(0,c-1),E.preventDefault();else return;c=b,t.set(b),e==null||e(b),h();let N=b>0?b-1:0;(I=u.children[N])==null||I.focus()})}u.appendChild(S)}h();let p=t.addListener(f=>{c=f,m===0&&h()});l.addHook("Remove",p)}}}var sn=require("@domphy/core"),Ze=require("@domphy/theme");function ca(r={}){var n;let{color:o="neutral"}=r;return{role:"radiogroup",_context:{segmented:{value:(0,sn.toState)((n=r.value)!=null?n:"")}},style:{display:"inline-flex",paddingBlock:(0,Ze.themeSpacing)(1),paddingInline:(0,Ze.themeSpacing)(1),gap:(0,Ze.themeSpacing)(.5),borderRadius:(0,Ze.themeSpacing)(10),backgroundColor:e=>(0,Ze.themeColor)(e,"shift-2",o)}}}var ao=require("@domphy/core"),me=require("@domphy/theme");function ma(r={}){var e,i;let o=(0,ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ao.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"radio",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"segmentedItem" patch must use button tag');let a=t.getContext("segmented");if(!a){console.warn('"segmentedItem" patch must be used inside a "segmented"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="radio"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaChecked",h=>a.value.get(h)===u),t.addEvent("click",()=>a.value.set(u))},style:{cursor:"pointer",fontSize:t=>(0,me.themeSize)(t,"inherit"),height:(0,me.themeSpacing)(6),paddingBlock:(0,me.themeSpacing)(1),paddingInline:(0,me.themeSpacing)(3),border:"none",borderRadius:(0,me.themeSpacing)(10),color:t=>(0,me.themeColor)(t,"shift-9",o.get(t)),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:t=>(0,me.themeColor)(t,"shift-3",o.get(t))},"&[aria-checked=true]":{backgroundColor:t=>(0,me.themeColor)(t,"shift-0",n.get(t)),color:t=>(0,me.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,me.themeSpacing)(.5)} solid ${(0,me.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,me.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var T=require("@domphy/theme");function ua(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,T.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,T.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,T.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,T.themeColor)(e,"shift-4",o)}`,borderRadius:e=>(0,T.themeSpacing)((0,T.themeDensity)(e)*1),paddingBlock:e=>(0,T.themeSpacing)((0,T.themeDensity)(e)*1),paddingLeft:e=>(0,T.themeSpacing)((0,T.themeDensity)(e)*3),paddingRight:e=>(0,T.themeSpacing)((0,T.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,T.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:`right ${(0,T.themeSpacing)(2)} center`,backgroundSize:`${(0,T.themeSpacing)(2.5)} ${(0,T.themeSpacing)(1.5)}`,"&:not([multiple])":{height:e=>(0,T.themeSpacing)(6+(0,T.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${(0,T.themeSpacing)(.5)} solid ${(0,T.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${(0,T.themeSpacing)(.5)} solid ${(0,T.themeColor)(e,"shift-6",n)}`},"& optgroup":{color:e=>(0,T.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,T.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,T.themeColor)(e,"shift-8","neutral"),outline:e=>`1px solid ${(0,T.themeColor)(e,"shift-4","neutral")}`,backgroundColor:e=>(0,T.themeColor)(e,"shift-2","neutral")}}}}var Qe=require("@domphy/core"),ie=require("@domphy/theme");function da(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,Qe.toState)(r.value),s=(0,Qe.toState)(i),{show:l,hide:u,anchorPartial:c}=Pe({open:s,placement:(0,Qe.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,Qe.merge)(r.content,m);let h={div:f=>{let S=a.get(f),g=Array.isArray(S)?S:[S];return o.filter(b=>g.includes(b.value)).map(b=>({span:b.label,$:[lt({color:e,removable:t})],_key:b.value,_onRemove:N=>{let I=a.get(),Ye=(Array.isArray(I)?I:[I]).filter(qe=>qe!==b.value);t?a.set(Ye):a.set(Ye[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}},p={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(h),onClick:()=>s.get()?u():l(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(f)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,ie.themeColor)(f,"shift-4","neutral")}`,paddingInline:f=>(0,ie.themeSpacing)((0,ie.themeDensity)(f)*2),borderRadius:f=>(0,ie.themeSpacing)((0,ie.themeDensity)(f)*1),fontSize:f=>(0,ie.themeSize)(f,"inherit"),color:f=>(0,ie.themeColor)(f,"shift-9",e),backgroundColor:f=>(0,ie.themeColor)(f,"inherit",e)}};return(0,Qe.merge)(c,p),c}var ae=require("@domphy/theme");function pa(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let s=a.value;t.attributes.set("ariaSelected",l=>{let u=s.get(l);return a.multiple?u.includes(e):u===e}),t.addEvent("click",()=>{let l=s.get();a.multiple?l.includes(e)?s.set(l.filter(u=>u!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,ae.themeSize)(t,"inherit"),height:t=>(0,ae.themeSpacing)(6+(0,ae.themeDensity)(t)*2),paddingInline:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,ae.themeColor)(t,"shift-9",n),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-6",o),color:t=>(0,ae.themeColor)(t,"shift-11")},"&:focus-visible":{outline:t=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(t,"shift-6",o)}`,outlineOffset:`-${(0,ae.themeSpacing)(.5)}`}}}}var cn=require("@domphy/core"),Ie=require("@domphy/theme");function ha(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,cn.toState)((a=r.value)!=null?a:n?[]:null),i={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:r.name,value:c==null?"":String(c)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(s)*2),paddingInline:s=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(s)*2),fontSize:s=>(0,Ie.themeSize)(s,"inherit"),backgroundColor:s=>(0,Ie.themeColor)(s,"inherit",o)}}}var wt=require("@domphy/core"),je=require("@domphy/theme");function fa(r={}){var i;let o=(0,wt.toState)((i=r.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=(0,wt.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,je.themeSize)(t),color:t=>(0,je.themeColor)(t,"shift-9",o.get(t)),height:(0,je.themeSpacing)(6),display:"block",borderRadius:(0,je.themeSpacing)(1),backgroundColor:t=>(0,je.themeColor)(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var mn=require("@domphy/core"),Tt=require("@domphy/theme");function ga(r={}){var n;let o=(0,mn.toState)((n=r.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>(0,Tt.themeSize)(e,"inherit"),color:e=>(0,Tt.themeColor)(e,"shift-9",o.get(e))}}}var Pt=require("@domphy/core"),xe=require("@domphy/theme"),dn={to:{transform:"rotate(360deg)"}},un=(0,Pt.hashString)(JSON.stringify(dn));function ya(r={}){var n;let o=(0,Pt.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,xe.themeSize)(e),backgroundColor:e=>(0,xe.themeColor)(e),color:e=>(0,xe.themeColor)(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,xe.themeSpacing)(6),height:(0,xe.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,xe.themeSpacing)(.5)} solid ${(0,xe.themeColor)(e,"shift-4",o.get(e))}`,borderTopColor:e=>(0,xe.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${un} 0.7s linear infinite`,[`@keyframes ${un}`]:dn}}}var Ot=require("@domphy/core"),Ae=require("@domphy/theme");function ba(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:i=90}=r;return{_onSchedule:(t,a)=>{(0,Ot.merge)(a,{_context:{splitter:{direction:o,size:(0,Ot.toState)(n),min:e,max:i}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Sa(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let i=o.size.addListener(t=>{n.style[e]=`${t}%`});r.addHook("Remove",i)}}}function Ca(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let i=o.size.addListener(l=>{n.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let u=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-u,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-u,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},a=null,s=l=>{l.preventDefault();let u=n.parentElement,c=h=>{let p=u.getBoundingClientRect(),f=e?(h.clientX-p.left)/p.width*100:(h.clientY-p.top)/p.height*100;o.size.set(Math.min(Math.max(f,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Ae.themeColor)(r,"shift-2"),"&:hover":{backgroundColor:r=>(0,Ae.themeColor)(r,"shift-3")},"&:focus-visible":{outline:r=>`2px solid ${(0,Ae.themeColor)(r,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:(0,Ae.themeSpacing)(1),height:(0,Ae.themeSpacing)(1),borderRadius:(0,Ae.themeSpacing)(999),backgroundColor:r=>(0,Ae.themeColor)(r,"shift-4")}}}}var z=require("@domphy/theme");function va(){let r="neutral",o="primary";return{_onInsert:n=>{var s,l;let e=n.getContext("steps");if(!e){console.warn('"stepItem" patch must be used inside a "steps"');return}r=e.color,o=e.accentColor;let a=((l=(s=n.parent)==null?void 0:s.children.items)!=null?l:[]).filter(u=>u.type==="ElementNode").indexOf(n);n.domElement&&(n.domElement.dataset.step=String(a+1)),n.attributes.set("dataStatus",u=>{let c=e.current.get(u);return a<c?"done":a===c?"active":"pending"}),n.attributes.set("ariaCurrent",u=>e.current.get(u)===a?"step":void 0)},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,z.themeSpacing)(1),flex:"1",fontSize:n=>(0,z.themeSize)(n,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,z.themeSpacing)(6),height:(0,z.themeSpacing)(6),borderRadius:(0,z.themeSpacing)(999),fontSize:n=>(0,z.themeSize)(n,"decrease-1"),fontWeight:"600",flexShrink:"0",border:n=>`2px solid ${(0,z.themeColor)(n,"shift-4",r)}`,backgroundColor:n=>(0,z.themeColor)(n,"inherit"),color:n=>(0,z.themeColor)(n,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,z.themeSpacing)(3),right:`calc(50% + ${(0,z.themeSpacing)(3)})`,left:`calc(-50% + ${(0,z.themeSpacing)(3)})`,height:"2px",backgroundColor:n=>(0,z.themeColor)(n,"shift-3",r),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:n=>(0,z.themeColor)(n,"shift-6",o),borderColor:n=>(0,z.themeColor)(n,"shift-6",o),color:n=>(0,z.themeColor)(n,"shift-15",o)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:n=>(0,z.themeColor)(n,"shift-3",r),borderColor:n=>(0,z.themeColor)(n,"shift-3",r),color:n=>(0,z.themeColor)(n,"shift-9",r)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:n=>(0,z.themeColor)(n,"shift-3",r)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:n=>(0,z.themeColor)(n,"shift-6",o)},"&[data-status=pending]":{color:n=>(0,z.themeColor)(n,"shift-7")},"&[data-status=active]":{color:n=>(0,z.themeColor)(n,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:n=>(0,z.themeColor)(n,"shift-8")}}}}var Dt=require("@domphy/core"),pn=require("@domphy/theme");function Ea(r={}){var t,a,s;let o=(t=r.direction)!=null?t:"horizontal",n=(a=r.color)!=null?a:"neutral",e=(s=r.accentColor)!=null?s:"primary";return{_onSchedule:(l,u)=>{var m;let c={_context:{steps:{current:(0,Dt.toState)((m=r.current)!=null?m:0),direction:o,color:n,accentColor:e}}};(0,Dt.merge)(u,c)},style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,pn.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var hn=require("@domphy/core"),dt=require("@domphy/theme");function xa(r={}){var n;let o=(0,hn.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,dt.themeSize)(e,"inherit"),fontWeight:700,color:e=>(0,dt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,dt.themeColor)(e)}}}var fn=require("@domphy/core"),$t=require("@domphy/theme");function ka(r={}){var n;let o=(0,fn.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,$t.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,$t.themeColor)(e,"shift-9",o.get(e))}}}var gn=require("@domphy/core"),It=require("@domphy/theme");function wa(r={}){var n;let o=(0,gn.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,It.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,It.themeColor)(e,"shift-9",o.get(e))}}}var X=require("@domphy/theme");function Ta(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"tab",_onInsert:i=>{var u,c;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let t=i.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=i.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="tab");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i),l={id:`tab${i.parent.nodeId}${s}`,ariaControls:`tabpanel${i.parent.nodeId}${s}`,ariaSelected:m=>t.activeKey.get(m)===s,onClick:()=>t.activeKey.set(s),onKeyDown:m=>{var E,b,N,I;let h=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;m.preventDefault();let p=((b=(E=i.parent)==null?void 0:E.children.items)!=null?b:[]).filter(P=>P.type==="ElementNode"&&P.attributes.get("role")==="tab");if(!p.length)return;let f=p.indexOf(i),S=f;h==="ArrowRight"?S=(f+1)%p.length:h==="ArrowLeft"?S=(f-1+p.length)%p.length:h==="Home"?S=0:h==="End"&&(S=p.length-1);let g=p[S];t.activeKey.set((N=g.key)!=null?N:S),(I=g.domElement)==null||I.focus()}};i.merge(l)},style:{cursor:"pointer",fontSize:i=>(0,X.themeSize)(i,"inherit"),height:i=>(0,X.themeSpacing)(6+(0,X.themeDensity)(i)*2),paddingInline:i=>(0,X.themeSpacing)((0,X.themeDensity)(i)*4),border:"none",outline:"none",color:i=>(0,X.themeColor)(i,"shift-9"),backgroundColor:i=>(0,X.themeColor)(i,"inherit"),boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-6",o)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-6",o)}`}}}}var yn=require("@domphy/core"),$=require("@domphy/theme");function Pa(r={}){var n;let o=(0,yn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>(0,$.themeSize)(e,"inherit"),color:e=>(0,$.themeColor)(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*3),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*1),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,$.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*3),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*1),color:e=>(0,$.themeColor)(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,$.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,$.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*3),paddingBlock:e=>(0,$.themeSpacing)((0,$.themeDensity)(e)*1),color:e=>(0,$.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,$.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,$.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,$.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${(0,$.themeColor)(e,"shift-2")}!important`}}}}var at=require("@domphy/theme");function Oa(){return{role:"tabpanel",style:{paddingBlock:o=>(0,at.themeSpacing)((0,at.themeDensity)(o)*2),paddingInline:o=>(0,at.themeSpacing)((0,at.themeDensity)(o)*2)},_onInsert:o=>{var a,s;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(s=(a=o.parent)==null?void 0:a.children.items)!=null?s:[];e=e.filter(l=>l.type==="ElementNode"&&l.attributes.get("role")==="tabpanel");let i=o.key!==null&&o.key!==void 0?o.key:e.indexOf(o),t={id:`tabpanel${o.parent.nodeId}${i}`,ariaLabelledby:`tab${o.parent.nodeId}${i}`,hidden:l=>n.activeKey.get(l)!==i};o.merge(t)}}}var zt=require("@domphy/core");function Da(r={}){return{role:"tablist",ariaOrientation:"horizontal",_onSchedule:(n,e)=>{var t;let i={_context:{tabs:{activeKey:(0,zt.toState)((t=r.activeKey)!=null?t:0)}}};(0,zt.merge)(e,i)}}}var io=require("@domphy/core"),H=require("@domphy/theme");function $a(r={}){var i,t;let o=(0,io.toState)((i=r.color)!=null?i:"neutral","color"),n=(0,io.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let s=a.domElement;s.style.overflow="hidden";let l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),a.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*2),paddingBlock:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),fontSize:a=>(0,H.themeSize)(a,"inherit"),color:a=>(0,H.themeColor)(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4",o.get(a))}`,backgroundColor:a=>(0,H.themeColor)(a,"inherit",o.get(a)),"&::placeholder":{color:a=>(0,H.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,H.themeColor)(a,"shift-8","neutral"),outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4","neutral")}`,backgroundColor:a=>(0,H.themeColor)(a,"shift-2","neutral")}}}}var bn=require("@domphy/core"),ke=require("@domphy/theme");function Ia(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function za(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",i=(0,bn.toState)((s=r.active)!=null?s:!1);return{style:ot({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>(0,ke.themeSpacing)((0,ke.themeDensity)(l)*2),paddingBottom:l=>o?"0":(0,ke.themeSpacing)((0,ke.themeDensity)(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>(0,ke.themeColor)(l,"shift-8",i.get(l)?e:n),opacity:l=>i.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${(0,ke.themeSpacing)((0,ke.themeDensity)(l)*4)}`,width:"2px",backgroundColor:l=>(0,ke.themeColor)(l,"shift-3",n)}})}}var Sn=require("@domphy/core"),J=require("@domphy/theme");function Va(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,Sn.toState)(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,J.themeSpacing)(4),zIndex:30,padding:(0,J.themeSpacing)(6),pointerEvents:"none"}};return{_portal:l=>{let u=l.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=l.children.insert(s).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,J.themeSpacing)(32),pointerEvents:"auto",paddingBlock:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*2),paddingInline:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*4),borderRadius:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*2),fontSize:l=>(0,J.themeSize)(l,"inherit"),color:l=>(0,J.themeColor)(l,"shift-9",n),backgroundColor:l=>(0,J.themeColor)(l,"inherit",n),boxShadow:l=>`0 ${(0,J.themeSpacing)(2)} ${(0,J.themeSpacing)(9)} ${(0,J.themeColor)(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,u)=>{let c=!1,m=null,h=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",p),u())},p=f=>{f.propertyName==="transform"&&h()};l.domElement.addEventListener("transitionend",p),m=setTimeout(h,350),l.addHook("Remove",()=>{var f;m&&(clearTimeout(m),m=null),(f=l.domElement)==null||f.removeEventListener("transitionend",p)}),e.set(!1)}}}var lo=require("@domphy/core"),le=require("@domphy/theme");function La(r={}){var e,i;let o=(0,lo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,lo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaPressed",h=>{let p=a.value.get(h);return Array.isArray(p)?p.includes(u):p===u}),t.addEvent("click",()=>{let h=a.value.get();if(a.multiple){let p=Array.isArray(h)?[...h]:[];a.value.set(p.includes(u)?p.filter(f=>f!==u):[...p,u])}else a.value.set(h===u?"":u)})},style:{cursor:"pointer",fontSize:t=>(0,le.themeSize)(t,"inherit"),height:(0,le.themeSpacing)(6),paddingBlock:(0,le.themeSpacing)(1),paddingInline:(0,le.themeSpacing)(2),border:"none",borderRadius:(0,le.themeSpacing)(1),color:t=>(0,le.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,le.themeColor)(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,le.themeColor)(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>(0,le.themeColor)(t,"shift-3",n.get(t)),color:t=>(0,le.themeColor)(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,le.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Cn=require("@domphy/core"),ze=require("@domphy/theme");function Ma(r={}){var e;let{multiple:o=!1,color:n="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:(0,Cn.toState)((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:(0,ze.themeSpacing)(1),paddingInline:(0,ze.themeSpacing)(1),gap:(0,ze.themeSpacing)(1),borderRadius:(0,ze.themeSpacing)(2),fontSize:i=>(0,ze.themeSize)(i,"inherit"),backgroundColor:i=>(0,ze.themeColor)(i,"inherit",n),outline:i=>`1px solid ${(0,ze.themeColor)(i,"shift-3",n)}`,outlineOffset:"-1px"}}}var Vt=require("@domphy/theme");function Ra(r={}){var n;let o=(n=r.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:e=>(0,Vt.themeSpacing)((0,Vt.themeDensity)(e)*o)}}}function _a(){return{div:null,style:{flex:"1 1 0"}}}var pt=require("@domphy/core"),ge=require("@domphy/theme");function Na(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,i=(0,pt.toState)(n),t=(0,pt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:p=>t.get(p),id:a},{show:l,hide:u,anchorPartial:c}=Pe({open:o,placement:i,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*1),paddingInline:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*3),borderRadius:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*1),color:p=>(0,ge.themeColor)(p,"shift-9"),backgroundColor:p=>(0,ge.themeColor)(p),fontSize:p=>(0,ge.themeSize)(p,"inherit")},$:[no({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,pt.merge)(c,{ariaDescribedby:a,onMouseEnter:()=>l(),onMouseLeave:()=>u(),onFocus:()=>l(),onBlur:()=>u(),onKeyDown:p=>p.key==="Escape"&&u()}),c}var so=require("@domphy/core");function vn(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function Ha(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(i.values()))l();i.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of a)cancelAnimationFrame(l);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,u)=>{if(!(l instanceof so.ElementNode))return;let c=l.domElement;c&&e.set(vn(l,u),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,u)=>{var P;if(!(l instanceof so.ElementNode))return;let c=l.domElement;if(!c)return;let m=vn(l,u),h=e.get(m);if(!h)return;let p=c.getBoundingClientRect(),f=h.left-p.left,S=h.top-p.top;if(Math.abs(f)<.5&&Math.abs(S)<.5)return;(P=i.get(c))==null||P(),c.style.transition="none",c.style.transform=`translate(${f}px, ${S}px)`,c.getBoundingClientRect();let g=requestAnimationFrame(()=>{a.delete(g),c.style.transition=`transform ${o}ms ease ${n}ms`,c.style.transform="translate(0px, 0px)"});a.add(g);let E=!1,b=null,N=()=>{E||(E=!0,b&&(t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",I),c.style.transition="",c.style.transform="")},I=Ye=>{Ye.propertyName==="transform"&&N()};i.set(c,()=>{E=!0,b&&(clearTimeout(b),t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",I)}),c.addEventListener("transitionend",I),b=setTimeout(N,o+n+34),t.add(b)}),e.clear()}}}var En=require("@domphy/core"),et=require("@domphy/theme");function Aa(r={}){var n;let o=(0,En.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,et.themeSize)(e,"inherit"),backgroundColor:e=>(0,et.themeColor)(e),color:e=>(0,et.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,et.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}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,emphasis,empty,errorBoundary,fab,figure,formGroup,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,list,listItem,listItemButton,mark,menu,menuItem,motion,orderedList,pagination,paragraph,popover,popoverArrow,preformated,progress,rating,segmented,segmentedItem,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stepItem,steps,strong,subscript,superscript,tab,tabPanel,table,tabs,tag,textarea,timeline,timelineItem,toast,toggle,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
1
|
+
"use strict";var gt=Object.defineProperty,Hn=Object.defineProperties,An=Object.getOwnPropertyDescriptor,Bn=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertyNames,So=Object.getOwnPropertySymbols;var vo=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable;var Co=(r,o,n)=>o in r?gt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,ot=(r,o)=>{for(var n in o||(o={}))vo.call(o,n)&&Co(r,n,o[n]);if(So)for(var n of So(o))Kn.call(o,n)&&Co(r,n,o[n]);return r},Eo=(r,o)=>Hn(r,Bn(o));var Wn=(r,o)=>{for(var n in o)gt(r,n,{get:o[n],enumerable:!0})},jn=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Fn(o))!vo.call(r,i)&&i!==n&>(r,i,{get:()=>o[i],enumerable:!(e=An(o,i))||e.enumerable});return r};var Yn=r=>jn(gt({},"__esModule",{value:!0}),r);var Ba={};Wn(Ba,{abbreviation:()=>qn,accordion:()=>Gn,alert:()=>Un,avatar:()=>Xn,badge:()=>Jn,blockquote:()=>Zn,breadcrumb:()=>Qn,breadcrumbEllipsis:()=>er,button:()=>tr,buttonGhost:()=>or,buttonSwitch:()=>nr,card:()=>rr,code:()=>ar,combobox:()=>lr,command:()=>sr,commandItem:()=>mr,commandSearch:()=>cr,datePicker:()=>dr,descriptionList:()=>fr,details:()=>gr,dialog:()=>yr,divider:()=>br,drawer:()=>Sr,emphasis:()=>Cr,empty:()=>vr,errorBoundary:()=>Er,fab:()=>kr,figure:()=>wr,formGroup:()=>Tr,heading:()=>Or,horizontalRule:()=>Dr,icon:()=>$r,image:()=>Ir,inputCheckbox:()=>zr,inputColor:()=>Vr,inputDateTime:()=>Lr,inputFile:()=>Mr,inputNumber:()=>Rr,inputOTP:()=>_r,inputRadio:()=>Nr,inputRange:()=>Hr,inputSearch:()=>Ar,inputSwitch:()=>Br,inputText:()=>Fr,keyboard:()=>Kr,label:()=>Wr,link:()=>jr,list:()=>Yr,listItem:()=>qr,listItemButton:()=>Gr,mark:()=>Ur,menu:()=>Xr,menuItem:()=>Jr,motion:()=>Zr,orderedList:()=>Qr,pagination:()=>ta,paragraph:()=>oa,popover:()=>na,popoverArrow:()=>no,preformated:()=>ra,progress:()=>aa,rating:()=>sa,segmented:()=>ca,segmentedItem:()=>ma,select:()=>ua,selectBox:()=>da,selectItem:()=>pa,selectList:()=>ha,skeleton:()=>fa,small:()=>ga,spinner:()=>ya,splitter:()=>ba,splitterHandle:()=>Ca,splitterPanel:()=>Sa,stepItem:()=>va,steps:()=>Ea,strong:()=>xa,subscript:()=>ka,superscript:()=>wa,tab:()=>Ta,tabPanel:()=>Oa,table:()=>Pa,tabs:()=>Da,tag:()=>lt,textarea:()=>$a,timeline:()=>Ia,timelineItem:()=>za,toast:()=>Va,toggle:()=>La,toggleGroup:()=>Ma,toolbar:()=>Ra,toolbarSpacer:()=>_a,tooltip:()=>Na,transitionGroup:()=>Ha,unorderedList:()=>Aa});module.exports=Yn(Ba);var Nt=require("@domphy/core"),we=require("@domphy/theme");function qn(r={}){var e,i;let o=(0,Nt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Nt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>(0,we.themeSize)(t),backgroundColor:t=>(0,we.themeColor)(t),color:t=>(0,we.themeColor)(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>(0,we.themeColor)(t,"shift-7",o.get(t)),textUnderlineOffset:(0,we.themeSpacing)(.72),cursor:"help","&:hover":{color:t=>(0,we.themeColor)(t,"shift-11",n.get(t)),textDecorationColor:t=>(0,we.themeColor)(t,"shift-9",n.get(t))}}}}var Ht=require("@domphy/core"),Ve=require("@domphy/theme");function Gn(r={}){var i,t;let{type:o="single"}=r,n=(0,Ht.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Ht.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onMount:a=>{if(o!=="single")return;let s=a.domElement;if(!s)return;let l=u=>{let c=u.target.closest("summary");if(!c)return;let m=c.closest("details");!m||m.parentElement!==s||m.open||Array.from(s.querySelectorAll(":scope > details")).forEach(h=>{h!==m&&(h.open=!1)})};s.addEventListener("click",l),a.addHook("Remove",()=>s.removeEventListener("click",l))},style:{display:"flex",flexDirection:"column",borderRadius:a=>(0,Ve.themeSpacing)((0,Ve.themeDensity)(a)*1),outline:a=>`1px solid ${(0,Ve.themeColor)(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${(0,Ve.themeColor)(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${(0,Ve.themeSpacing)(.5)} solid ${(0,Ve.themeColor)(a,"shift-6",e.get(a))}`}}}}var xo=require("@domphy/core"),de=require("@domphy/theme");function Un(r={}){var n;let o=(0,xo.toState)((n=r.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:(0,de.themeSpacing)(3),paddingBlock:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*2),paddingInline:e=>(0,de.themeSpacing)((0,de.themeDensity)(e)*4),boxShadow:e=>`inset ${(0,de.themeSpacing)(1)} 0 0 0 ${(0,de.themeColor)(e,"shift-8",o.get(e))}`,backgroundColor:e=>(0,de.themeColor)(e,"inherit",o.get(e)),color:e=>(0,de.themeColor)(e,"shift-10",o.get(e)),fontSize:e=>(0,de.themeSize)(e,"inherit")}}}var ko=require("@domphy/core"),Ke=require("@domphy/theme");function Xn(r={}){var n;let o=(0,ko.toState)((n=r.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:(0,Ke.themeSpacing)(9),height:(0,Ke.themeSpacing)(9),fontSize:e=>(0,Ke.themeSize)(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>(0,Ke.themeColor)(e,"inherit",o.get(e)),color:e=>(0,Ke.themeColor)(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}var At=require("@domphy/core"),Le=require("@domphy/theme");function Jn(r={}){var i;let{label:o=999}=r,n=(0,At.toState)(o),e=(0,At.toState)((i=r.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:(0,Le.themeSpacing)(1),minWidth:(0,Le.themeSpacing)(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>(0,Le.themeSize)(t,"decrease-1"),borderRadius:(0,Le.themeSpacing)(999),backgroundColor:t=>(0,Le.themeColor)(t,"shift-9",e.get(t)),color:t=>(0,Le.themeColor)(t,"shift-0",e.get(t))}}}}var wo=require("@domphy/core"),be=require("@domphy/theme");function Zn(r={}){var n;let o=(0,wo.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,be.themeSize)(e,"inherit"),backgroundColor:e=>(0,be.themeColor)(e,"inherit",o.get(e)),boxShadow:e=>`inset ${(0,be.themeSpacing)(1)} 0 0 0 ${(0,be.themeColor)(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*2),paddingInline:e=>(0,be.themeSpacing)((0,be.themeDensity)(e)*4),margin:0}}}var To=require("@domphy/core"),ve=require("@domphy/theme");function Qn(r={}){var e;let{separator:o="/"}=r,n=(0,To.toState)((e=r.color)!=null?e:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>(0,ve.themeSize)(i,"inherit"),gap:(0,ve.themeSpacing)(1),color:i=>(0,ve.themeColor)(i,"shift-9",n.get(i)),backgroundColor:i=>(0,ve.themeColor)(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>(0,ve.themeColor)(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:i=>(0,ve.themeColor)(i,"shift-4",n.get(i)),paddingInlineStart:(0,ve.themeSpacing)(1)},"& > [aria-current=page]":{color:i=>(0,ve.themeColor)(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}var Po=require("@domphy/core"),Se=require("@domphy/theme");function er(r={}){var n;let o=(0,Po.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,Se.themeSize)(e,"inherit"),paddingInline:(0,Se.themeSpacing)(1),border:"none",background:"none",cursor:"pointer",color:e=>(0,Se.themeColor)(e,"shift-8",o.get(e)),borderRadius:(0,Se.themeSpacing)(1),"&:hover":{color:e=>(0,Se.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,Se.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${(0,Se.themeSpacing)(.5)} solid ${(0,Se.themeColor)(e,"shift-6",o.get(e))}`,outlineOffset:(0,Se.themeSpacing)(.5)}}}}var Oo=require("@domphy/core"),A=require("@domphy/theme");function tr(r={}){var n;let o=(0,Oo.toState)((n=r.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,A.themeSize)(e,"inherit"),paddingBlock:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),paddingInline:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*3),borderRadius:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>(0,A.themeSpacing)((0,A.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4",o.get(e))}`,color:e=>(0,A.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,A.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,A.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,A.themeSpacing)(.5)} ${(0,A.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>(0,A.themeColor)(e,"shift-2","neutral"),outline:e=>`1px solid ${(0,A.themeColor)(e,"shift-4","neutral")}`,color:e=>(0,A.themeColor)(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var Do=require("@domphy/core"),U=require("@domphy/theme");function or(r={}){var n;let o=(0,Do.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>(0,U.themeSize)(e,"inherit"),paddingBlock:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),paddingInline:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),borderRadius:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:e=>(0,U.themeSpacing)((0,U.themeDensity)(e)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:e=>(0,U.themeColor)(e,"shift-6",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>(0,U.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,U.themeColor)(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${(0,U.themeSpacing)(.5)} ${(0,U.themeColor)(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,U.themeColor)(e,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var yt=require("@domphy/core"),F=require("@domphy/theme");function nr(r={}){var t,a;let{checked:o=!1}=r,n=(0,yt.toState)(o),e=(0,yt.toState)((t=r.color)!=null?t:"neutral","color"),i=(0,yt.toState)((a=r.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>(0,F.themeSize)(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${(0,F.themeColor)(s,"shift-3",e.get(s))}`,minWidth:(0,F.themeSpacing)(12),minHeight:(0,F.themeSpacing)(6),borderRadius:(0,F.themeSpacing)(999),paddingLeft:(0,F.themeSpacing)(7),paddingRight:(0,F.themeSpacing)(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>(0,F.themeColor)(s,"inherit",e.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:(0,F.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:(0,F.themeSpacing)(5),height:(0,F.themeSpacing)(5),borderRadius:(0,F.themeSpacing)(999),color:s=>(0,F.themeColor)(s,"shift-9"),backgroundColor:s=>(0,F.themeColor)(s,"decrease-2",e.get(s))},"&[aria-checked=true]":{backgroundColor:s=>(0,F.themeColor)(s,"increase-3",i.get(s)),outline:"none",color:s=>(0,F.themeColor)(s,"decrease-2"),paddingLeft:(0,F.themeSpacing)(2),paddingRight:(0,F.themeSpacing)(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${(0,F.themeSpacing)(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var $o=require("@domphy/core"),L=require("@domphy/theme");function rr(r={}){var n;let o=(0,$o.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),backgroundColor:e=>(0,L.themeColor)(e,"inherit",o.get(e)),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e)),outline:e=>`1px solid ${(0,L.themeColor)(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),color:e=>(0,L.themeColor)(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:(0,L.themeSpacing)(2),paddingBlock:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*2),paddingInline:e=>(0,L.themeSpacing)((0,L.themeDensity)(e)*4),borderTop:e=>`1px solid ${(0,L.themeColor)(e,"shift-3",o.get(e))}`}}}}var Io=require("@domphy/core"),Me=require("@domphy/theme");function ar(r={}){var n;let o=(0,Io.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",fontSize:e=>(0,Me.themeSize)(e,"inherit"),color:e=>(0,Me.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Me.themeColor)(e,"inherit",o.get(e)),height:(0,Me.themeSpacing)(6),paddingInline:(0,Me.themeSpacing)(1.5),borderRadius:(0,Me.themeSpacing)(1)}}}var We=require("@domphy/core"),Y=require("@domphy/theme");var bt=require("@domphy/core"),Te=require("@domphy/floating");function Pe(r){let{open:o=!1,placement:n}=r,e=null,i=null,t=null,a=null,s=null,l=null,u=!1,c=(0,bt.toState)(o),m=()=>{u||!l||(u=!0,s=l.children.insert(r.content))},h=()=>{m(),t&&a&&(i&&i(),i=(0,Te.autoUpdate)(t,a,()=>{(0,Te.computePosition)(t,a,{placement:n.get(),middleware:[(0,Te.offset)(12),(0,Te.flip)(),(0,Te.shift)()],strategy:"fixed"}).then(({x:b,y:z,placement:O})=>{Object.assign(a.style,{left:`${b}px`,top:`${z}px`}),n.set(O)})}),c.set(!0))},p=()=>{i&&i(),i=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},S=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},g={style:{position:"fixed",pointerEvents:"auto",visibility:b=>c.get(b)?"visible":"hidden"},_onMount:b=>a=b.domElement,_portal:b=>{var O;let z=b.domElement.querySelector("#domphy-floating");if(!z){let w={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};z=b.children.insert(w).domElement}if(t&&z instanceof HTMLElement&&!z.hasAttribute("data-theme")){let w=(O=t.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");w&&z.setAttribute("data-theme",w)}return z}};return(0,bt.merge)(r.content,g),{show:f,hide:S,anchorPartial:{onKeyDown:b=>b.key==="Escape"&&S(),_onMount:b=>{l=b.getRoot(),t=b.domElement;let z=O=>{if(!c.get()||!t||!a)return;let w=O.target;!t.contains(w)&&!a.contains(w)&&S()};b.getRoot().domElement.addEventListener("click",z),b.addHook("BeforeRemove",()=>{e&&clearTimeout(e),i&&(i(),i=null),s&&s.remove(),b.getRoot().domElement.removeEventListener("click",z)})}}}}var zo=require("@domphy/core"),ee=require("@domphy/theme"),ir='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function lt(r={}){var e;let{removable:o=!1}=r,n=(0,zo.toState)((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let t={span:ir,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:(0,ee.themeSpacing)(1),width:(0,ee.themeSpacing)(4),height:(0,ee.themeSpacing)(4),flexShrink:0,"&:hover":{backgroundColor:a=>(0,ee.themeColor)(a,"shift-4",n.get(a))}}};o&&i.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:(0,ee.themeSpacing)(6),paddingBlock:"0px",borderRadius:(0,ee.themeSpacing)(1),paddingInlineStart:(0,ee.themeSpacing)(2),paddingInlineEnd:o?(0,ee.themeSpacing)(1):(0,ee.themeSpacing)(2),gap:(0,ee.themeSpacing)(2),fontSize:i=>(0,ee.themeSize)(i,"inherit"),backgroundColor:i=>(0,ee.themeColor)(i,"inherit",n.get(i)),color:i=>(0,ee.themeColor)(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${(0,ee.themeColor)(i,"shift-4",n.get(i))}`}}}function lr(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,We.toState)(r.value),s=(0,We.toState)(i),{show:l,hide:u,anchorPartial:c}=Pe({open:s,placement:(0,We.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,We.merge)(r.content,m);let h={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,"shift-9",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)},p;r.input?((0,We.merge)(r.input,{onFocus:()=>l(),style:h,_key:"combobox-input"}),p=r.input):p={input:null,onFocus:()=>l(),value:g=>(a.get(g),""),style:h,_key:"combobox-input"};let f={div:g=>{let E=a.get(g),b=Array.isArray(E)?E:[E],O=o.filter(w=>b.includes(w.value)).map(w=>({span:w.label,$:[lt({color:e,removable:!0})],_key:w.value,_onRemove:Be=>{let qe=a.get(),ht=(Array.isArray(qe)?qe:[qe]).filter(it=>it!==w.value);t?a.set(ht):a.set(ht[0])}}));return O.push(p),O},style:{display:"flex",flexWrap:"wrap",gap:(0,Y.themeSpacing)(1)}},S={_onInsert:g=>{g.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:g=>g.children.insert(f),style:{minWidth:(0,Y.themeSpacing)(32),outlineOffset:"-1px",outline:g=>`1px solid ${(0,Y.themeColor)(g,"shift-4","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),fontSize:g=>(0,Y.themeSize)(g,"inherit"),color:g=>(0,Y.themeColor)(g,"shift-9",e),backgroundColor:g=>(0,Y.themeColor)(g,"inherit",e)}};return(0,We.merge)(c,S),c}var St=require("@domphy/core"),R=require("@domphy/theme");function sr(){return{_onSchedule:(r,o)=>{(0,St.merge)(o,{_context:{command:{query:(0,St.toState)("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function cr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let i=e.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>i.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>(0,R.themeSize)(e,"inherit"),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),paddingBlock:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*2),border:"none",borderBottom:e=>`1px solid ${(0,R.themeColor)(e,"shift-3",o)}`,outline:"none",color:e=>(0,R.themeColor)(e,"shift-10",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&::placeholder":{color:e=>(0,R.themeColor)(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>(0,R.themeColor)(e,"shift-6",n)}}}}function mr(r={}){let{color:o="neutral",accentColor:n="primary"}=r;return{role:"option",_onMount:e=>{var u,c;let i=e.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(c=(u=t.textContent)==null?void 0:u.toLowerCase())!=null?c:"",s=m=>{t.hidden=m.length>0&&!a.includes(m.toLowerCase())};s(i.query.get());let l=i.query.addListener(s);e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>(0,R.themeSize)(e,"inherit"),height:e=>(0,R.themeSpacing)(6+(0,R.themeDensity)(e)*2),paddingInline:e=>(0,R.themeSpacing)((0,R.themeDensity)(e)*3),border:"none",outline:"none",color:e=>(0,R.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,R.themeColor)(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>(0,R.themeColor)(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${(0,R.themeSpacing)(.5)} solid ${(0,R.themeColor)(e,"shift-6",n)}`,outlineOffset:`-${(0,R.themeSpacing)(.5)}`}}}}var Ce=require("@domphy/core"),C=require("@domphy/theme");var Z=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),Ge=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Bt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),st=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),Ft=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Kt=(r,o)=>Ge(r,-((r.getDay()-o+7)%7));function ur(r){var o,n;try{let e=new Intl.Locale(r),i=(n=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?n:e.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(e){}return 0}function dr(r={}){var fo,go,yo,bo;let{mode:o="single",time:n=!1,min:e,max:i,disabledDate:t,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:l}=r,u=(fo=r.weekStartsOn)!=null?fo:ur(a),c=(0,Ce.toState)((go=r.accentColor)!=null?go:"primary","accentColor"),m=(0,Ce.toState)((yo=r.placement)!=null?yo:"bottom-start"),h=(0,Ce.toState)((bo=r.value)!=null?bo:o==="range"?[null,null]:null),p=l?h.addListener(d=>l(d)):null,f=(()=>{let d=h.get(),y=o==="range"?d==null?void 0:d[0]:d;return y instanceof Date?y:new Date})(),S=(0,Ce.toState)(f.getFullYear(),"viewYear"),g=(0,Ce.toState)(f.getMonth(),"viewMonth"),E=(0,Ce.toState)(Z(f),"focused"),b=(0,Ce.toState)(null,"hovered"),z=(0,Ce.toState)(f.getHours(),"hour"),O=(0,Ce.toState)(f.getMinutes(),"minute"),w=null,Be=new Intl.DateTimeFormat(a,ot({dateStyle:"medium"},n?{timeStyle:"short"}:{})),qe=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),co=new Intl.DateTimeFormat(a,{weekday:"short"}),ht=new Intl.DateTimeFormat(a,{dateStyle:"full"}),it=d=>d?Be.format(d):"",xn=d=>{if(s)return s(d);if(o==="range"){let[y,v]=d!=null?d:[null,null];return y?`${it(y)} \u2013 ${it(v)}`:""}return it(d)},kn=Array.from({length:7},(d,y)=>co.format(new Date(2023,0,1+(y+u)%7))),mo=d=>!!e&&Z(d)<Z(e)||!!i&&Z(d)>Z(i)||!!t&&t(d),Fe=d=>{if(!n)return Z(d);let y=Z(d);return y.setHours(z.get(),O.get(),0,0),y},uo=d=>{var x;if(mo(d))return;if(o==="single"){h.set(Fe(d)),n||Rt();return}let[y,v]=(x=h.get())!=null?x:[null,null];!y||y&&v?h.set([Fe(d),null]):Z(d)<Z(y)?(h.set([Fe(d),Fe(y)]),n||Rt()):(h.set([y,Fe(d)]),n||Rt())},wn=()=>{var d;if(n)if(o==="single"){let y=h.get();y&&h.set(Fe(y))}else{let[y,v]=(d=h.get())!=null?d:[null,null];h.set([y&&Fe(y),v&&Fe(v)])}},Tn=(d,y)=>{var tt;if(o!=="range")return!1;let[v,x]=(tt=h.get(y))!=null?tt:[null,null],B=x!=null?x:b.get(y);if(!v||!B)return!1;let T=Z(v)<=Z(B)?v:B,ye=Z(v)<=Z(B)?B:v,ue=Z(d);return ue>=Z(T)&&ue<=Z(ye)},Pn=(d,y)=>{let v=h.get(y);if(o==="range"){let[x,B]=v!=null?v:[null,null];return st(d,x)||st(d,B)}return st(d,v)},ft=d=>{S.set(d.getFullYear()),g.set(d.getMonth())},po=d=>{let y=Bt(new Date(S.get(),g.get(),1),d);ft(y)},ho=d=>S.set(S.get()+d),Lt=()=>{setTimeout(()=>{var d;(d=w==null?void 0:w.querySelector(`[data-date="${Ft(E.get())}"]`))==null||d.focus()},0)},On=Vn(),{show:Dn,hide:$n,anchorPartial:Mt}=Pe({open:!1,placement:m,content:On});function Rt(){$n()}Mt.onClick=()=>{};let In={type:"text",readonly:!0,value:d=>xn(h.get(d)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{_t()},onFocus:()=>{_t()},onKeyDown:d=>{let y=d.key;(y==="ArrowDown"||y==="Enter")&&(d.preventDefault(),_t())},_onMount:d=>p&&d.addHook("Remove",()=>{p()})};function _t(){var y;let d=(y=zn())!=null?y:new Date;E.set(Z(d)),ft(d),Dn(),Lt()}function zn(){var y;let d=h.get();return o==="range"?(y=d==null?void 0:d[0])!=null?y:null:d!=null?d:null}return(0,Ce.merge)(Mt,In),Mt;function Vn(){let d=(T,ye,ue)=>({button:T,type:"button",ariaLabel:ye,onClick:ue,style:pr()}),y={div:[d("\xAB","Previous year",()=>ho(-1)),d("\u2039","Previous month",()=>po(-1)),{div:T=>qe.format(new Date(S.get(T),g.get(T),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:T=>(0,C.themeSize)(T)}},d("\u203A","Next month",()=>po(1)),d("\xBB","Next year",()=>ho(1))],style:{display:"flex",alignItems:"center",gap:(0,C.themeSpacing)(1),marginBottom:(0,C.themeSpacing)(2)}},v={div:kn.map((T,ye)=>({div:T,style:{textAlign:"center",fontSize:ue=>(0,C.themeSize)(ue,"decrease-1"),fontWeight:"600",color:ue=>(0,C.themeColor)(ue,"shift-7"),paddingBlock:(0,C.themeSpacing)(1)},_key:ye})),role:"row",style:Vo()},x={div:T=>Ln(T),role:"grid",ariaLabel:"Calendar",onKeyDown:Nn,onMouseLeave:()=>o==="range"&&b.set(null),style:{display:"flex",flexDirection:"column",gap:(0,C.themeSpacing)(.5)}},B=[y,v,x];return n&&B.push(Rn()),B.push(_n()),{div:B,role:"dialog",ariaModal:"false",_onMount:T=>{w=T.domElement},style:{minWidth:(0,C.themeSpacing)(70),padding:(0,C.themeSpacing)(3),borderRadius:(0,C.themeSpacing)(2),backgroundColor:T=>(0,C.themeColor)(T,"base"),color:T=>(0,C.themeColor)(T,"shift-10"),border:T=>`1px solid ${(0,C.themeColor)(T,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Ln(d){let y=new Date(S.get(d),g.get(d),1),v=g.get(d),x=Kt(y,u),B=[];for(let T=0;T<6;T++){let ye=[];for(let ue=0;ue<7;ue++){let tt=Ge(x,T*7+ue);ye.push(Mn(tt,v,d))}B.push({div:ye,role:"row",style:Vo(),_key:T})}return B}function Mn(d,y,v){let x=mo(d),B=Pn(d,v),T=Tn(d,v),ye=d.getMonth()!==y,ue=st(d,E.get(v)),tt=st(d,new Date);return{button:String(d.getDate()),type:"button",role:"gridcell",tabIndex:ue?0:-1,ariaSelected:B,ariaDisabled:x,disabled:x,ariaLabel:ht.format(d),dataDate:Ft(d),onClick:()=>uo(d),onMouseEnter:()=>o==="range"&&b.set(d),style:{appearance:"none",border:"none",cursor:x?"not-allowed":"pointer",aspectRatio:"1",borderRadius:(0,C.themeSpacing)(1),fontSize:j=>(0,C.themeSize)(j),fontFamily:"inherit",opacity:x?.35:ye?.5:1,backgroundColor:j=>B?(0,C.themeColor)(j,"shift-7",c.get(j)):T?(0,C.themeColor)(j,"shift-2",c.get(j)):"transparent",color:j=>B?(0,C.themeColor)(j,"shift-0",c.get(j)):(0,C.themeColor)(j,"shift-9"),outline:tt?j=>`1px solid ${(0,C.themeColor)(j,"shift-6",c.get(j))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:j=>B?(0,C.themeColor)(j,"shift-7",c.get(j)):(0,C.themeColor)(j,"shift-3",c.get(j))},"&:focus-visible":{outline:j=>`2px solid ${(0,C.themeColor)(j,"shift-6",c.get(j))}`}},_key:Ft(d)}}function Rn(){let d=(y,v,x)=>({select:Array.from({length:y},(B,T)=>({option:String(T).padStart(2,"0"),value:String(T),selected:ye=>v.get(ye)===T,_key:T})),ariaLabel:x,onChange:B=>{v.set(Number(B.target.value)),wn()},style:hr()});return{div:[d(24,z,"Hour"),{span:":",style:{fontWeight:"600"}},d(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:(0,C.themeSpacing)(1),marginTop:(0,C.themeSpacing)(3)}}}function _n(){let d=(y,v)=>({button:y,type:"button",onClick:v,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:x=>(0,C.themeSize)(x,"decrease-1"),color:x=>(0,C.themeColor)(x,"shift-8",c.get(x)),padding:(0,C.themeSpacing)(1)}});return{div:[d("Today",()=>{let y=new Date;E.set(Z(y)),ft(y),Lt()}),d("Clear",()=>{h.set(o==="range"?[null,null]:null),b.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:(0,C.themeSpacing)(2),paddingTop:(0,C.themeSpacing)(2),borderTop:y=>`1px solid ${(0,C.themeColor)(y,"shift-3")}`}}}function Nn(d){let y=d,v=E.get(),x=null;switch(y.key){case"ArrowLeft":x=Ge(v,-1);break;case"ArrowRight":x=Ge(v,1);break;case"ArrowUp":x=Ge(v,-7);break;case"ArrowDown":x=Ge(v,7);break;case"Home":x=Kt(v,u);break;case"End":x=Ge(Kt(v,u),6);break;case"PageUp":x=Bt(v,y.shiftKey?-12:-1);break;case"PageDown":x=Bt(v,y.shiftKey?12:1);break;case"Enter":case" ":y.preventDefault(),uo(v);return;default:return}y.preventDefault(),E.set(x),ft(x),Lt()}}function Vo(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:(0,C.themeSpacing)(.5)}}function pr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),color:r=>(0,C.themeColor)(r,"shift-8"),width:(0,C.themeSpacing)(7),height:(0,C.themeSpacing)(7),borderRadius:(0,C.themeSpacing)(1),"&:hover":{backgroundColor:r=>(0,C.themeColor)(r,"shift-3")}}}function hr(){return{fontFamily:"inherit",fontSize:r=>(0,C.themeSize)(r),padding:(0,C.themeSpacing)(1),borderRadius:(0,C.themeSpacing)(1),border:r=>`1px solid ${(0,C.themeColor)(r,"shift-4")}`,backgroundColor:r=>(0,C.themeColor)(r,"base"),color:r=>(0,C.themeColor)(r,"shift-9")}}var Lo=require("@domphy/core"),Re=require("@domphy/theme");function fr(r={}){var n;let o=(0,Lo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${(0,Re.themeSpacing)(24)}, max-content) 1fr`,columnGap:(0,Re.themeSpacing)(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>(0,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>(0,Re.themeSize)(e,"inherit"),color:e=>(0,Re.themeColor)(e,"shift-9",o.get(e))}}}}var Wt=require("@domphy/core"),k=require("@domphy/theme");function gr(r={}){var i,t;let{duration:o=240}=r,n=(0,Wt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,Wt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>(0,k.themeSize)(a,"inherit"),color:a=>(0,k.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,k.themeColor)(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>(0,k.themeColor)(a,"shift-2",n.get(a)),color:a=>(0,k.themeColor)(a,"shift-10",n.get(a)),fontSize:a=>(0,k.themeSize)(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:(0,k.themeSpacing)(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*4),height:(0,k.themeSpacing)(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:(0,k.themeSpacing)(2),height:(0,k.themeSpacing)(2),flexShrink:0,marginTop:`-${(0,k.themeSpacing)(.5)}`,borderInlineEnd:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-9",n.get(a))}`,borderBottom:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.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,k.themeColor)(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*2),outlineOffset:`-${(0,k.themeSpacing)(.5)}`,outline:a=>`${(0,k.themeSpacing)(.5)} solid ${(0,k.themeColor)(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>(0,k.themeSpacing)((0,k.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:(0,k.themeSpacing)(250),opacity:1,paddingTop:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*1),paddingBottom:a=>(0,k.themeSpacing)((0,k.themeDensity)(a)*3)}}}}var Ro=require("@domphy/core"),pe=require("@domphy/theme"),Mo='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function yr(r={}){let{color:o="neutral",open:n=!1}=r,e=(0,Ro.toState)(n),i=null,t=!1;return{_onInsert:a=>{a.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(a,s)=>{if(a.target!==s.domElement)return;let l=s.domElement.getBoundingClientRect();a.clientX>=l.left&&a.clientX<=l.right&&a.clientY>=l.top&&a.clientY<=l.bottom||e.set(!1)},onTransitionEnd:(a,s)=>{if(!t)return;t=!1,s.domElement.close(),document.body.style.overflow="",i==null||i.focus(),i=null},_onMount:a=>{let s=a.domElement;s.setAttribute("aria-modal","true");let l=null,u=p=>{if(p.key!=="Tab")return;let f=Array.from(s.querySelectorAll(Mo)).filter(E=>!E.closest("[aria-hidden='true']")&&E.offsetParent!==null);if(!f.length){p.preventDefault();return}let S=f[0],g=f[f.length-1];p.shiftKey?(document.activeElement===S||document.activeElement===s)&&(p.preventDefault(),g.focus()):document.activeElement===g&&(p.preventDefault(),S.focus())},c=p=>{p.preventDefault(),e.set(!1)};s.addEventListener("cancel",c);let m=p=>{p?(i=document.activeElement,s.showModal(),document.body.style.overflow="hidden",s.addEventListener("keydown",u),requestAnimationFrame(()=>{s.style.opacity="1";let f=s.querySelector(Mo);f==null||f.focus()})):(t=!0,s.style.opacity="0",s.removeEventListener("keydown",u),l=setTimeout(()=>{l=null,t&&(t=!1,s.close(),document.body.style.overflow="",i==null||i.focus(),i=null)},350))};m(e.get());let h=e.addListener(m);a.addHook("Remove",()=>{l&&(clearTimeout(l),l=null),h(),s.removeEventListener("cancel",c),document.body.style.overflow="",s.removeEventListener("keydown",u),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:a=>(0,pe.themeSize)(a,"inherit"),color:a=>(0,pe.themeColor)(a,"shift-10",o),backgroundColor:a=>(0,pe.themeColor)(a,"inherit",o),border:"none",padding:a=>(0,pe.themeSpacing)((0,pe.themeDensity)(a)*3),boxShadow:a=>`0 ${(0,pe.themeSpacing)(9)} ${(0,pe.themeSpacing)(16)} ${(0,pe.themeColor)(a,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:a=>(0,pe.themeColor)(a,"shift-2","neutral"),opacity:.75}}}}var _o=require("@domphy/core"),_e=require("@domphy/theme");function br(r={}){var n;let o=(0,_o.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,_e.themeSpacing)(2),fontSize:e=>(0,_e.themeSize)(e,"inherit"),backgroundColor:e=>(0,_e.themeColor)(e),color:e=>(0,_e.themeColor)(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>(0,_e.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>(0,_e.themeColor)(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var Ao=require("@domphy/core"),se=require("@domphy/theme"),jt={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},No={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},ct=r=>r==="left"||r==="right";function Ho(r,o){return r==="start"?o?"right":"left":r==="end"?o?"left":"right":r}function Sr(r={}){let{color:o="neutral",open:n=!1,placement:e="end",size:i}=r,t=(0,Ao.toState)(n),a=e==="start"||e==="end",s=Ho(e,!1),l=ct(s)?(0,se.themeSpacing)(80):(0,se.themeSpacing)(64),u=i!=null?i:l;return{_onInsert:c=>{c.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(c,m)=>{c.target===m.domElement&&t.set(!1)},_onMount:c=>{let m=c.domElement;m.setAttribute("aria-modal","true");let h=w=>{w.preventDefault(),t.set(!1)};m.addEventListener("cancel",h);let p=a&&(m.ownerDocument.documentElement.dir==="rtl"||m.ownerDocument.dir==="rtl"),f=Ho(e,p);a&&(m.style.transform=jt[f],m.style.margin=No[f],m.style.width=ct(f)?u:"100dvw",m.style.height=ct(f)?"100dvh":u);let S=!1,g=null,E=()=>{g=null,S&&(S=!1,m.close(),document.body.style.overflow="")},b=w=>{w.target===m&&w.propertyName==="transform"&&E()};m.addEventListener("transitionend",b);let z=w=>{w?(S=!1,m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):(S=!0,m.style.transform=jt[f],g=setTimeout(E,350))};z(t.get());let O=t.addListener(z);c.addHook("Remove",()=>{g&&(clearTimeout(g),g=null),O(),m.removeEventListener("cancel",h),m.removeEventListener("transitionend",b),document.body.style.overflow=""})},style:{transform:jt[s],transition:"transform 0.25s ease",fontSize:c=>(0,se.themeSize)(c,"inherit"),color:c=>(0,se.themeColor)(c,"shift-10",o),backgroundColor:c=>(0,se.themeColor)(c,"inherit",o),border:"none",padding:c=>(0,se.themeSpacing)((0,se.themeDensity)(c)*3),margin:No[s],width:ct(s)?u:"100dvw",height:ct(s)?"100dvh":u,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:c=>`0 ${(0,se.themeSpacing)(4)} ${(0,se.themeSpacing)(12)} ${(0,se.themeColor)(c,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:c=>(0,se.themeColor)(c,"shift-2","neutral"),opacity:.75}}}}var Bo=require("@domphy/core"),Ct=require("@domphy/theme");function Cr(r={}){var n;let o=(0,Bo.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,Ct.themeSize)(e,"inherit"),fontStyle:"italic",color:e=>(0,Ct.themeColor)(e,"shift-10",o.get(e))}}}var Fo=require("@domphy/core"),Ue=require("@domphy/theme");function vr(r={}){var n;let o=(0,Fo.toState)((n=r.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:(0,Ue.themeSpacing)(3),paddingBlock:(0,Ue.themeSpacing)(12),paddingInline:(0,Ue.themeSpacing)(6),textAlign:"center",color:e=>(0,Ue.themeColor)(e,"shift-6",o.get(e)),"& > :first-child":{color:e=>(0,Ue.themeColor)(e,"shift-5",o.get(e))}}}}function Er(r={}){return{_onError:(o,n,e)=>{var t,a;(t=r.onError)==null||t.call(r,n);let i=typeof r.fallback=="function"?r.fallback(n,e):(a=r.fallback)!=null?a:{div:"An error occurred."};o.children.update([i])}}}var Ko=require("@domphy/core"),ce=require("@domphy/theme"),xr={small:8,medium:10,large:14};function kr(r={}){var e,i;let o=(0,Ko.toState)((e=r.color)!=null?e:"primary","color"),n=(0,ce.themeSpacing)(xr[(i=r.size)!=null?i:"medium"]);return{_onInsert:t=>{t.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:t=>(0,ce.themeSize)(t,"inherit"),backgroundColor:t=>(0,ce.themeColor)(t,"shift-9",o.get(t)),color:t=>(0,ce.themeColor)(t,"shift-0",o.get(t)),boxShadow:t=>`0 ${(0,ce.themeSpacing)(1)} ${(0,ce.themeSpacing)(4)} ${(0,ce.themeColor)(t,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,ce.themeColor)(t,"shift-10",o.get(t)),boxShadow:t=>`0 ${(0,ce.themeSpacing)(2)} ${(0,ce.themeSpacing)(6)} ${(0,ce.themeColor)(t,"shift-5","neutral")}`},"&:focus-visible":{outline:t=>`2px solid ${(0,ce.themeColor)(t,"shift-6",o.get(t))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Wo=require("@domphy/core"),Oe=require("@domphy/theme");function wr(r={}){var n;let o=(0,Wo.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,Oe.themeSpacing)(2),marginInline:0,marginTop:(0,Oe.themeSpacing)(3),marginBottom:(0,Oe.themeSpacing)(3),color:e=>(0,Oe.themeColor)(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:(0,Oe.themeSpacing)(2)},"& figcaption":{fontSize:e=>(0,Oe.themeSize)(e,"decrease-1"),color:e=>(0,Oe.themeColor)(e,"shift-8",o.get(e)),lineHeight:1.45}}}}var jo=require("@domphy/core"),M=require("@domphy/theme");function Tr(r={}){var i;let{layout:o="horizontal"}=r,n=(0,jo.toState)((i=r.color)!=null?i:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*3),border:"none",borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),fontSize:t=>(0,M.themeSize)(t,"inherit"),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:(0,M.themeSpacing)(4),rowGap:(0,M.themeSpacing)(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>(0,M.themeSize)(t,"inherit"),fontWeight:600,paddingBlock:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*1),borderRadius:t=>(0,M.themeSpacing)((0,M.themeDensity)(t)*2),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t)),backgroundColor:t=>(0,M.themeColor)(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":(0,M.themeSpacing)((0,M.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,M.themeSpacing)(2)} * -1)`,fontSize:t=>(0,M.themeSize)(t,"decrease-1"),color:t=>(0,M.themeColor)(t,"shift-9",n.get(t))}}}}var Yo=require("@domphy/core"),nt=require("@domphy/theme"),Pr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Or(r={}){var n;let o=(0,Yo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>(0,nt.themeColor)(e,"shift-11",o.get(e)),marginTop:0,marginBottom:(0,nt.themeSpacing)(2),fontSize:e=>{let i=Pr[e.elementNode.tagName]||"inherit";return(0,nt.themeSize)(e,i)}}}}var qo=require("@domphy/core"),mt=require("@domphy/theme");function Dr(r={}){var n;let o=(0,qo.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:(0,mt.themeSpacing)(3),marginBottom:(0,mt.themeSpacing)(3),backgroundColor:e=>(0,mt.themeColor)(e,"shift-4",o.get(e))}}}var Go=require("@domphy/core"),Xe=require("@domphy/theme");function $r(r={}){var n;let o=(0,Go.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,Xe.themeSpacing)(4),height:(0,Xe.themeSpacing)(4),flexShrink:"0",fontSize:e=>(0,Xe.themeSize)(e),backgroundColor:"transparent",color:e=>(0,Xe.themeColor)(e,"shift-9",o.get(e))}}}var Uo=require("@domphy/core"),vt=require("@domphy/theme");function Ir(r={}){var n;let o=(0,Uo.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,vt.themeSpacing)(2),backgroundColor:e=>(0,vt.themeColor)(e,"inherit",o.get(e))}}}var Yt=require("@domphy/core"),_=require("@domphy/theme");function zr(r={}){var e,i;let o=(0,Yt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Yt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>(0,_.themeSize)(t,"inherit"),display:"inline-flex",position:"relative",width:(0,_.themeSpacing)(6),height:(0,_.themeSpacing)(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:(0,_.themeSpacing)(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,_.themeColor)(t,"shift-9",o.get(t)),width:(0,_.themeSpacing)(4),height:(0,_.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,_.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,_.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,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`,backgroundColor:t=>(0,_.themeColor)(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>(0,_.themeColor)(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>(0,_.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:(0,_.themeSpacing)(1.5),outline:t=>`${(0,_.themeSpacing)(.5)} solid ${(0,_.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,_.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var te=require("@domphy/theme");function Vr(r={}){return{type:"color",_onSchedule:(o,n)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>(0,te.themeSize)(o,"inherit"),paddingBlock:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1),paddingInline:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1),blockSize:o=>(0,te.themeSpacing)(6+(0,te.themeDensity)(o)*2),inlineSize:o=>(0,te.themeSpacing)(6+(0,te.themeDensity)(o)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>(0,te.themeSpacing)((0,te.themeDensity)(o)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>(0,te.themeColor)(o,"shift-2","neutral"),outline:o=>`1px solid ${(0,te.themeColor)(o,"shift-4","neutral")}`}}}}var qt=require("@domphy/core"),q=require("@domphy/theme");function Lr(r={}){var i,t;let{mode:o="datetime-local"}=r,n=(0,qt.toState)((i=r.color)!=null?i:"neutral","color"),e=(0,qt.toState)((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=o},style:{fontFamily:"inherit",fontSize:a=>(0,q.themeSize)(a,"inherit"),lineHeight:"inherit",color:a=>(0,q.themeColor)(a,"shift-9",n.get(a)),backgroundColor:a=>(0,q.themeColor)(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${(0,q.themeColor)(a,"shift-4",n.get(a))}`,borderRadius:a=>(0,q.themeSpacing)((0,q.themeDensity)(a)*1),paddingInline:a=>(0,q.themeSpacing)((0,q.themeDensity)(a)*3),height:a=>(0,q.themeSpacing)(6+(0,q.themeDensity)(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${(0,q.themeSpacing)(.5)} solid ${(0,q.themeColor)(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,q.themeColor)(a,"shift-8","neutral"),backgroundColor:a=>(0,q.themeColor)(a,"shift-2","neutral"),outline:a=>`1px solid ${(0,q.themeColor)(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${(0,q.themeSpacing)(.5)} solid ${(0,q.themeColor)(a,"shift-6","error")}`}}}}var Gt=require("@domphy/core"),D=require("@domphy/theme");function Mr(r={}){var e,i;let o=(0,Gt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Gt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>(0,D.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,D.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),height:t=>(0,D.themeSpacing)(6+(0,D.themeDensity)(t)*2),paddingInline:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>(0,D.themeSpacing)((0,D.themeDensity)(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:(0,D.themeSpacing)(1),height:(0,D.themeSpacing)(6),paddingInline:(0,D.themeSpacing)(2),cursor:"pointer",color:t=>(0,D.themeColor)(t,"shift-11",o.get(t)),backgroundColor:t=>(0,D.themeColor)(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,D.themeSpacing)(.5)} solid ${(0,D.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),outline:t=>`1px solid ${(0,D.themeColor)(t,"shift-4","neutral")}`,backgroundColor:t=>(0,D.themeColor)(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>(0,D.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,D.themeColor)(t,"shift-3","neutral")}}}}var Ut=require("@domphy/core"),K=require("@domphy/theme");function Rr(r={}){var e,i;let o=(0,Ut.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Ut.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,K.themeSpacing)(10),paddingInlineStart:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*3),paddingInlineEnd:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1.5),paddingBlock:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),borderRadius:t=>(0,K.themeSpacing)((0,K.themeDensity)(t)*1),fontSize:t=>(0,K.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,K.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,K.themeColor)(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,K.themeSpacing)(.5)} solid ${(0,K.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,K.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,K.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,K.themeColor)(t,"shift-8","neutral")}}}}var Xt=require("@domphy/theme");function _r(){return{style:{display:"flex",alignItems:"center",gap:(0,Xt.themeSpacing)(2),"& > *":{minWidth:`${(0,Xt.themeSpacing)(9)}!important`}},_onMount:r=>{let o=r.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let s=n(),l=a.target,u=s.indexOf(l);l.value&&u<s.length-1&&s[u+1].focus()},i=a=>{let s=n(),l=a.target,u=s.indexOf(l);a.key==="Backspace"&&!l.value&&u>0&&s[u-1].focus(),a.key==="ArrowLeft"&&u>0&&s[u-1].focus(),a.key==="ArrowRight"&&u<s.length-1&&s[u+1].focus()},t=a=>{var h,p,f;a.preventDefault();let s=(p=(h=a.clipboardData)==null?void 0:h.getData("text"))!=null?p:"",l=n(),u=l.indexOf(a.target),c=u===-1?0:u;[...s].forEach((S,g)=>{l[c+g]&&(l[c+g].value=S)});let m=Math.min(c+s.length-1,l.length-1);(f=l[m])==null||f.focus()};o.addEventListener("input",e),o.addEventListener("keydown",i),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",i),o.removeEventListener("paste",t)})}}}var Jt=require("@domphy/core"),oe=require("@domphy/theme");function Nr(r={}){var e,i;let o=(0,Jt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Jt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>(0,oe.themeSize)(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:(0,oe.themeSpacing)(6),height:(0,oe.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,oe.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,oe.themeColor)(t,"shift-9",o.get(t)),width:(0,oe.themeSpacing)(4),height:(0,oe.themeSpacing)(4)},"&:hover::before":{backgroundColor:t=>(0,oe.themeColor)(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${(0,oe.themeColor)(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>(0,oe.themeColor)(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>(0,oe.themeColor)(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${(0,oe.themeSpacing)(.5)} solid ${(0,oe.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>(0,oe.themeColor)(t,"shift-4","neutral"),pointerEvents:"none"}}}}var Zt=require("@domphy/core"),ne=require("@domphy/theme");function Hr(r={}){var e,i;let o=(0,Zt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Zt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:(0,ne.themeSpacing)(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:(0,ne.themeSpacing)(1.5),borderRadius:(0,ne.themeSpacing)(999),backgroundColor:t=>(0,ne.themeColor)(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:(0,ne.themeSpacing)(4),height:(0,ne.themeSpacing)(4),borderRadius:(0,ne.themeSpacing)(999),border:"none",marginTop:`calc((${(0,ne.themeSpacing)(1.5)} - ${(0,ne.themeSpacing)(4)}) / 2)`,backgroundColor:t=>(0,ne.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>(0,ne.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,ne.themeSpacing)(.5)} solid ${(0,ne.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:(0,ne.themeSpacing)(1),borderRadius:(0,ne.themeSpacing)(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Qt=require("@domphy/core"),G=require("@domphy/theme");function Ar(r={}){var e,i;let o=(0,Qt.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,Qt.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>(0,G.themeSize)(t,"inherit"),lineHeight:"inherit",color:t=>(0,G.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,G.themeColor)(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,G.themeColor)(t,"shift-4",o.get(t))}`,borderRadius:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*1),minWidth:(0,G.themeSpacing)(32),paddingInline:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*3),paddingBlock:t=>(0,G.themeSpacing)((0,G.themeDensity)(t)*1),"&::placeholder":{color:t=>(0,G.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]), &:focus-visible":{outline:t=>`${(0,G.themeSpacing)(.5)} solid ${(0,G.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,G.themeColor)(t,"shift-8","neutral"),backgroundColor:t=>(0,G.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,G.themeColor)(t,"shift-4","neutral")}`}}}}var Xo=require("@domphy/core"),re=require("@domphy/theme");function Br(r={}){var n;let o=(0,Xo.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,re.themeSize)(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:(0,re.themeSpacing)(9),height:(0,re.themeSpacing)(6),cursor:"pointer",margin:"0",paddingBlock:(0,re.themeSpacing)(1),"&:checked":{"&::before":{backgroundColor:e=>(0,re.themeColor)(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${(0,re.themeSpacing)(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:(0,re.themeSpacing)(3),height:(0,re.themeSpacing)(3),borderRadius:(0,re.themeSpacing)(999),left:(0,re.themeSpacing)(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>(0,re.themeColor)(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:(0,re.themeSpacing)(999),display:"inline-block",fontSize:e=>(0,re.themeSize)(e,"inherit"),lineHeight:1,backgroundColor:e=>(0,re.themeColor)(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var eo=require("@domphy/core"),$=require("@domphy/theme");function Fr(r={}){var e,i;let o=(0,eo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,eo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:(0,$.themeSpacing)(10),paddingInline:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*3),paddingBlock:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),borderRadius:t=>(0,$.themeSpacing)((0,$.themeDensity)(t)*1),fontSize:t=>(0,$.themeSize)(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4",o.get(t))}`,color:t=>(0,$.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,$.themeColor)(t,"inherit",o.get(t)),"&::placeholder":{color:t=>(0,$.themeColor)(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>(0,$.themeColor)(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>(0,$.themeColor)(t,"shift-2","neutral"),outline:t=>`1px solid ${(0,$.themeColor)(t,"shift-4","neutral")}`,color:t=>(0,$.themeColor)(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${(0,$.themeSpacing)(.5)} solid ${(0,$.themeColor)(t,"shift-6","warning")}`}}}}var Jo=require("@domphy/core"),De=require("@domphy/theme");function Kr(r={}){var n;let o=(0,Jo.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,"shift-9",o.get(e)),backgroundColor:e=>(0,De.themeColor)(e,"inherit",o.get(e)),paddingBlock:(0,De.themeSpacing)(.5),paddingInline:(0,De.themeSpacing)(1.5),borderRadius:(0,De.themeSpacing)(1),outline:e=>`1px solid ${(0,De.themeColor)(e,"shift-4",o.get(e))}`}}}var to=require("@domphy/core"),je=require("@domphy/theme");function Wr(r={}){var e,i;let o=(0,to.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,to.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:(0,je.themeSpacing)(2),fontSize:t=>(0,je.themeSize)(t,"inherit"),color:t=>(0,je.themeColor)(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>(0,je.themeColor)(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>(0,je.themeColor)(t,"shift-8","neutral")}}}}var oo=require("@domphy/core"),he=require("@domphy/theme");function jr(r={}){var e,i;let o=(0,oo.toState)((e=r.color)!=null?e:"primary","color"),n=(0,oo.toState)((i=r.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>(0,he.themeSize)(t,"inherit"),backgroundColor:t=>(0,he.themeColor)(t),color:t=>(0,he.themeColor)(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>(0,he.themeColor)(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>(0,he.themeColor)(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:(0,he.themeSpacing)(1),outlineOffset:(0,he.themeSpacing)(1),outline:t=>`${(0,he.themeSpacing)(.5)} solid ${(0,he.themeColor)(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>(0,he.themeColor)(t,"shift-8","neutral")}}}}var Zo=require("@domphy/core"),N=require("@domphy/theme");function Yr(r={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function qr(r={}){let{dense:o=!1}=r;return{style:{display:"flex",alignItems:"center",gap:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*2),paddingBlock:n=>(0,N.themeSpacing)(o?1:(0,N.themeDensity)(n)*2),paddingInline:n=>(0,N.themeSpacing)((0,N.themeDensity)(n)*3),fontSize:n=>(0,N.themeSize)(n,"inherit")}}}function Gr(r={}){var i,t;let o=(0,Zo.toState)((i=r.color)!=null?i:"neutral","color"),n=(t=r.accentColor)!=null?t:"primary",{dense:e=!1}=r;return{cursor:"pointer",style:{appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*2),paddingBlock:a=>(0,N.themeSpacing)(e?1:(0,N.themeDensity)(a)*2),paddingInline:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*3),fontSize:a=>(0,N.themeSize)(a,"inherit"),color:a=>(0,N.themeColor)(a,"shift-9",o.get(a)),borderRadius:a=>(0,N.themeSpacing)((0,N.themeDensity)(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>(0,N.themeColor)(a,"shift-2",o.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>(0,N.themeColor)(a,"shift-3",n),color:a=>(0,N.themeColor)(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${(0,N.themeColor)(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}var Qo=require("@domphy/core"),Ne=require("@domphy/theme");function Ur(r={}){var n;let o=(0,Qo.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,Ne.themeSize)(e,"inherit"),color:e=>(0,Ne.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,Ne.themeColor)(e,"inherit",o.get(e)),height:(0,Ne.themeSpacing)(6),borderRadius:(0,Ne.themeSpacing)(1),paddingInline:(0,Ne.themeSpacing)(1.5)}}}var Et=require("@domphy/core"),$e=require("@domphy/theme");function Xr(r={}){let{color:o="neutral",selectable:n=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(i,t)=>{var s;let a={_context:{menu:{activeKey:(0,Et.toState)((s=r.activeKey)!=null?s:null),selectable:n}}};(0,Et.merge)(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:i=>(0,$e.themeSpacing)((0,$e.themeDensity)(i)*2),paddingInline:i=>(0,$e.themeSpacing)((0,$e.themeDensity)(i)*2),fontSize:i=>(0,$e.themeSize)(i,"inherit"),backgroundColor:i=>(0,$e.themeColor)(i,"inherit",o)}}}var Q=require("@domphy/theme");function Jr(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"menuitem",_onInsert:i=>{var l,u;i.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let t=i.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(l=i.parent)==null?void 0:l.children.items)!=null?u:[];a=a.filter(c=>c.type==="ElementNode"&&c.attributes.get("role")==="menuitem");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i);t.selectable&&(i.attributes.set("ariaCurrent",c=>t.activeKey.get(c)===s||void 0),i.addEvent("click",()=>t.activeKey.set(s)))},onKeyDown:(i,t)=>{var c,m,h,p;let a=i.key;if(a==="Enter"||a===" "){i.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;i.preventDefault();let s=((h=(m=t.parent)==null?void 0:m.children.items)!=null?h:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem");if(!s.length)return;let l=s.indexOf(t),u=l;a==="ArrowDown"?u=(l+1)%s.length:a==="ArrowUp"?u=(l-1+s.length)%s.length:a==="Home"?u=0:a==="End"&&(u=s.length-1),(p=s[u].domElement)==null||p.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:i=>(0,Q.themeSpacing)(2),width:"100%",fontSize:i=>(0,Q.themeSize)(i,"inherit"),height:i=>(0,Q.themeSpacing)(6+(0,Q.themeDensity)(i)*2),paddingInline:i=>(0,Q.themeSpacing)((0,Q.themeDensity)(i)*3),border:"none",outline:"none",color:i=>(0,Q.themeColor)(i,"shift-9",n),backgroundColor:i=>(0,Q.themeColor)(i,"inherit",n),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:i=>(0,Q.themeColor)(i,"shift-2",n)},"&[aria-current=true]":{backgroundColor:i=>(0,Q.themeColor)(i,"shift-3",o),color:i=>(0,Q.themeColor)(i,"shift-10")},"&:focus-visible":{outline:i=>`${(0,Q.themeSpacing)(.5)} solid ${(0,Q.themeColor)(i,"shift-6",o)}`,outlineOffset:`-${(0,Q.themeSpacing)(.5)}`}}}}var en=r=>!!r&&typeof r.get=="function"&&r._isState===!0,rt=r=>{let o={},n=[];for(let e in r){let i=r[e];e==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):e==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):e==="scale"?n.push(`scale(${i})`):e==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):o[e]=i}return n.length&&(o.transform=n.join(" ")),o};function Zr(r={}){var a,s,l,u;let{initial:o,animate:n,exit:e,transition:i={}}=r,t={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(l=i.easing)!=null?l:"ease",iterations:(u=i.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let h=en(n)?n.get():n;if(h?m.animate(o?[rt(o),rt(h)]:[rt(h)],t):o&&Object.assign(m.style,rt(o)),en(n)){let p=n.addListener(f=>{m.animate([rt(f)],t)});c.setMetadata("motionRelease",p)}},_onBeforeRemove:(c,m)=>{let h=c.domElement;if(!h||!e||typeof h.animate!="function")return m();h.animate([rt(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}var tn=require("@domphy/core"),Je=require("@domphy/theme");function Qr(r={}){var n;let o=(0,tn.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,Je.themeSize)(e,"inherit"),backgroundColor:e=>(0,Je.themeColor)(e),color:e=>(0,Je.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,Je.themeSpacing)(3),listStyleType:"decimal",listStylePosition:"outside"}}}var on=require("@domphy/core"),W=require("@domphy/theme");function ea(r,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];r>3&&n.push("...");let e=Math.max(2,r-1),i=Math.min(o-1,r+1);for(let t=e;t<=i;t++)n.push(t);return r<o-2&&n.push("..."),n.push(o),n}function ta(r){var s;let{total:o,color:n="neutral",accentColor:e="primary"}=r,i=(0,on.toState)((s=r.value)!=null?s:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:l=>(0,W.themeSpacing)(6+(0,W.themeDensity)(l)*2),height:l=>(0,W.themeSpacing)(6+(0,W.themeDensity)(l)*2),paddingInline:l=>(0,W.themeSpacing)((0,W.themeDensity)(l)*2),borderRadius:l=>(0,W.themeSpacing)((0,W.themeDensity)(l)*1),border:"none",cursor:"pointer",fontSize:l=>(0,W.themeSize)(l,"inherit"),backgroundColor:"transparent",color:l=>(0,W.themeColor)(l,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:l=>(0,W.themeColor)(l,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Eo(ot({},t),{backgroundColor:l=>(0,W.themeColor)(l,"shift-6",e),color:l=>(0,W.themeColor)(l,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:l=>(0,W.themeColor)(l,"shift-6",e)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:l=>{l.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:l=>{let u={div:c=>{let m=i.get(c),h=[];h.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&i.set(m-1),style:t});for(let p of ea(m,o))if(p==="...")h.push({span:"\u2026",ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>(0,W.themeSpacing)((0,W.themeDensity)(f)*2),color:f=>(0,W.themeColor)(f,"shift-7",n)}});else{let f=p===m;h.push({button:String(p),type:"button",ariaLabel:`Page ${p}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>i.set(p),style:f?a:t})}return h.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&i.set(m+1),style:t}),h},style:{display:"flex",alignItems:"center",gap:(0,W.themeSpacing)(1)}};l.children.insert(u)},style:{display:"inline-flex"}}}var nn=require("@domphy/core"),xt=require("@domphy/theme");function oa(r={}){var n;let o=(0,nn.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,xt.themeSize)(e,"inherit"),color:e=>(0,xt.themeColor)(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}var ut=require("@domphy/core");function na(r){var h;let{open:o=!1,placement:n="bottom",openOn:e="click"}=r,i=null,t=(0,ut.toState)(o),a=(0,ut.toState)(n),{show:s,hide:l,anchorPartial:u}=Pe({open:t,placement:a,content:r.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),_onInsert:p=>{let f=p.attributes.get("id");i=f||p.nodeId,!f&&p.attributes.set("id",i)}};return(h=r.content).$||(h.$=[]),r.content.$.push(c),(0,ut.merge)(u,{ariaHaspopup:"dialog",ariaExpanded:p=>t.get(p),onMouseEnter:()=>e==="hover"&&s(),onMouseLeave:()=>e==="hover"&&l(),onClick:()=>{e==="click"&&(t.get()?l():s())},onKeyDown:p=>{p.key==="Escape"&&t.get()&&l()},onFocus:()=>e==="hover"&&s(),onBlur:(p,f)=>{let S=p.relatedTarget,g=f.getRoot().domElement,E=i?g.querySelector(`#${CSS.escape(i)}`):null;S&&(E!=null&&E.contains(S))||l()},_onMount:p=>i&&p.attributes.set("ariaControls",i)}),u}var rn=require("@domphy/core"),Ee=require("@domphy/theme");function no(r={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=(0,Ee.themeSpacing)(6),bordered:i=!0}=r,t=(0,rn.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"},s=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},l=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>(0,Ee.themeSize)(c),backgroundColor:c=>(0,Ee.themeColor)(c),color:c=>(0,Ee.themeColor)(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:(0,Ee.themeSpacing)(1.5),height:(0,Ee.themeSpacing)(1.5),backgroundColor:c=>(0,Ee.themeColor)(c,"inherit",n),borderWidth:i?"1px":"0px",borderColor:c=>(0,Ee.themeColor)(c,"inherit",n),borderTopStyle:c=>{let m=s(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=s(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=s(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=s(c);return m.includes("top")?0:m.includes("bottom")?"auto":l(m)},right:c=>{let m=s(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=s(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=s(c);return m.includes("left")?0:m.includes("right")?"auto":l(m)},transform:c=>{let m=s(c),h=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",p=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${h},${p}) rotate(45deg)`}}}}}var an=require("@domphy/core"),fe=require("@domphy/theme");function ra(r={}){var n;let o=(0,an.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,fe.themeSize)(e,"inherit"),color:e=>(0,fe.themeColor)(e,"shift-9",o.get(e)),backgroundColor:e=>(0,fe.themeColor)(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*2),paddingInline:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*3),borderRadius:e=>(0,fe.themeSpacing)((0,fe.themeDensity)(e)*2)}}}var ro=require("@domphy/core"),He=require("@domphy/theme");function aa(r={}){var e,i;let o=(0,ro.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ro.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:(0,He.themeSpacing)(2),border:0,borderRadius:(0,He.themeSpacing)(999),overflow:"hidden",backgroundColor:t=>(0,He.themeColor)(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>(0,He.themeColor)(t,"shift-3",o.get(t)),borderRadius:(0,He.themeSpacing)(999)},"&::-webkit-progress-value":{backgroundColor:t=>(0,He.themeColor)(t,"shift-9",n.get(t)),borderRadius:(0,He.themeSpacing)(999),transition:"width 220ms ease"}}}}var ln=require("@domphy/core"),kt=require("@domphy/theme"),ia='<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>',la='<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 sa(r={}){var a,s;let{max:o=5,readOnly:n=!1,onChange:e}=r,i=(a=r.color)!=null?a:"warning",t=(0,ln.toState)((s=r.value)!=null?s:0);return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:(0,kt.themeSpacing)(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:l=>(0,kt.themeColor)(l,"shift-8",i)},_onMount:l=>{let u=l.domElement,c=t.get(),m=0,h=()=>{let f=m>0?m:c;Array.from(u.children).forEach((S,g)=>{S.innerHTML=g<f?ia:la})};u.innerHTML="";for(let f=1;f<=o;f++){let S=document.createElement("button");if(S.type="button",S.setAttribute("aria-label",`${f} star${f>1?"s":""}`),S.style.cssText="background:none;border:none;padding:0;cursor:inherit;color:inherit;font-size:inherit;display:flex;align-items:center;",!n){let g=f;S.addEventListener("click",()=>{let E=g===c?0:g;c=E,t.set(E),e==null||e(E),m=0,h()}),S.addEventListener("mouseenter",()=>{m=g,h()}),S.addEventListener("mouseleave",()=>{m=0,h()}),S.addEventListener("keydown",E=>{var O;let b=c;if(E.key==="ArrowRight"||E.key==="ArrowUp")b=Math.min(o,c+1),E.preventDefault();else if(E.key==="ArrowLeft"||E.key==="ArrowDown")b=Math.max(0,c-1),E.preventDefault();else return;c=b,t.set(b),e==null||e(b),h();let z=b>0?b-1:0;(O=u.children[z])==null||O.focus()})}u.appendChild(S)}h();let p=t.addListener(f=>{c=f,m===0&&h()});l.addHook("Remove",p)}}}var sn=require("@domphy/core"),Ze=require("@domphy/theme");function ca(r={}){var n;let{color:o="neutral"}=r;return{role:"radiogroup",_context:{segmented:{value:(0,sn.toState)((n=r.value)!=null?n:"")}},style:{display:"inline-flex",paddingBlock:(0,Ze.themeSpacing)(1),paddingInline:(0,Ze.themeSpacing)(1),gap:(0,Ze.themeSpacing)(.5),borderRadius:(0,Ze.themeSpacing)(10),backgroundColor:e=>(0,Ze.themeColor)(e,"shift-2",o)}}}var ao=require("@domphy/core"),me=require("@domphy/theme");function ma(r={}){var e,i;let o=(0,ao.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,ao.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"radio",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"segmentedItem" patch must use button tag');let a=t.getContext("segmented");if(!a){console.warn('"segmentedItem" patch must be used inside a "segmented"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="radio"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaChecked",h=>a.value.get(h)===u),t.addEvent("click",()=>a.value.set(u))},style:{cursor:"pointer",fontSize:t=>(0,me.themeSize)(t,"inherit"),height:(0,me.themeSpacing)(6),paddingBlock:(0,me.themeSpacing)(1),paddingInline:(0,me.themeSpacing)(3),border:"none",borderRadius:(0,me.themeSpacing)(10),color:t=>(0,me.themeColor)(t,"shift-9",o.get(t)),backgroundColor:"transparent",transition:"background-color 300ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:t=>(0,me.themeColor)(t,"shift-3",o.get(t))},"&[aria-checked=true]":{backgroundColor:t=>(0,me.themeColor)(t,"shift-0",n.get(t)),color:t=>(0,me.themeColor)(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${(0,me.themeSpacing)(.5)} solid ${(0,me.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,me.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var P=require("@domphy/theme");function ua(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,P.themeSize)(e,"inherit"),lineHeight:"inherit",color:e=>(0,P.themeColor)(e,"shift-9",o),backgroundColor:e=>(0,P.themeColor)(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4",o)}`,borderRadius:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingBlock:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*1),paddingLeft:e=>(0,P.themeSpacing)((0,P.themeDensity)(e)*3),paddingRight:e=>(0,P.themeSpacing)((0,P.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,P.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:`right ${(0,P.themeSpacing)(2)} center`,backgroundSize:`${(0,P.themeSpacing)(2.5)} ${(0,P.themeSpacing)(1.5)}`,"&:not([multiple])":{height:e=>(0,P.themeSpacing)(6+(0,P.themeDensity)(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${(0,P.themeSpacing)(.5)} solid ${(0,P.themeColor)(e,"shift-6",n)}`},"& optgroup":{color:e=>(0,P.themeColor)(e,"shift-11",o)},"& option[disabled]":{color:e=>(0,P.themeColor)(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>(0,P.themeColor)(e,"shift-8","neutral"),outline:e=>`1px solid ${(0,P.themeColor)(e,"shift-4","neutral")}`,backgroundColor:e=>(0,P.themeColor)(e,"shift-2","neutral")}}}}var Qe=require("@domphy/core"),ie=require("@domphy/theme");function da(r){let{options:o=[],placement:n="bottom",color:e="neutral",open:i=!1,multiple:t=!1}=r,a=(0,Qe.toState)(r.value),s=(0,Qe.toState)(i),{show:l,hide:u,anchorPartial:c}=Pe({open:s,placement:(0,Qe.toState)(n),content:r.content}),m={onClick:()=>!t&&u()};(0,Qe.merge)(r.content,m);let h={div:f=>{let S=a.get(f),g=Array.isArray(S)?S:[S];return o.filter(b=>g.includes(b.value)).map(b=>({span:b.label,$:[lt({color:e,removable:t})],_key:b.value,_onRemove:z=>{let O=a.get(),Be=(Array.isArray(O)?O:[O]).filter(qe=>qe!==b.value);t?a.set(Be):a.set(Be[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:(0,ie.themeSpacing)(1),flex:1}},p={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(h),onClick:()=>s.get()?u():l(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>(0,ie.themeSpacing)(6+(0,ie.themeDensity)(f)*2),minWidth:(0,ie.themeSpacing)(32),outlineOffset:"-1px",outline:f=>`1px solid ${(0,ie.themeColor)(f,"shift-4","neutral")}`,paddingInline:f=>(0,ie.themeSpacing)((0,ie.themeDensity)(f)*2),borderRadius:f=>(0,ie.themeSpacing)((0,ie.themeDensity)(f)*1),fontSize:f=>(0,ie.themeSize)(f,"inherit"),color:f=>(0,ie.themeColor)(f,"shift-9",e),backgroundColor:f=>(0,ie.themeColor)(f,"inherit",e)}};return(0,Qe.merge)(c,p),c}var ae=require("@domphy/theme");function pa(r={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let s=a.value;t.attributes.set("ariaSelected",l=>{let u=s.get(l);return a.multiple?u.includes(e):u===e}),t.addEvent("click",()=>{let l=s.get();a.multiple?l.includes(e)?s.set(l.filter(u=>u!==e)):s.set(l.concat([e])):l!==e&&s.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>(0,ae.themeSize)(t,"inherit"),height:t=>(0,ae.themeSpacing)(6+(0,ae.themeDensity)(t)*2),paddingInline:t=>(0,ae.themeSpacing)((0,ae.themeDensity)(t)*3),border:"none",outline:"none",color:t=>(0,ae.themeColor)(t,"shift-9",n),backgroundColor:t=>(0,ae.themeColor)(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>(0,ae.themeColor)(t,"shift-6",o),color:t=>(0,ae.themeColor)(t,"shift-11")},"&:focus-visible":{outline:t=>`${(0,ae.themeSpacing)(.5)} solid ${(0,ae.themeColor)(t,"shift-6",o)}`,outlineOffset:`-${(0,ae.themeSpacing)(.5)}`}}}}var cn=require("@domphy/core"),Ie=require("@domphy/theme");function ha(r={}){var a;let{color:o="neutral",multiple:n=!1}=r,e=(0,cn.toState)((a=r.value)!=null?a:n?[]:null),i={div:s=>{let l=e.get(s);return(Array.isArray(l)?l:[l]).map(c=>({input:null,name:r.name,value:c==null?"":String(c)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(s)*2),paddingInline:s=>(0,Ie.themeSpacing)((0,Ie.themeDensity)(s)*2),fontSize:s=>(0,Ie.themeSize)(s,"inherit"),backgroundColor:s=>(0,Ie.themeColor)(s,"inherit",o)}}}var wt=require("@domphy/core"),Ye=require("@domphy/theme");function fa(r={}){var i;let o=(0,wt.toState)((i=r.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=(0,wt.hashString)(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>(0,Ye.themeSize)(t),color:t=>(0,Ye.themeColor)(t,"shift-9",o.get(t)),height:(0,Ye.themeSpacing)(6),display:"block",borderRadius:(0,Ye.themeSpacing)(1),backgroundColor:t=>(0,Ye.themeColor)(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}var mn=require("@domphy/core"),Tt=require("@domphy/theme");function ga(r={}){var n;let o=(0,mn.toState)((n=r.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>(0,Tt.themeSize)(e,"inherit"),color:e=>(0,Tt.themeColor)(e,"shift-9",o.get(e))}}}var Pt=require("@domphy/core"),xe=require("@domphy/theme"),dn={to:{transform:"rotate(360deg)"}},un=(0,Pt.hashString)(JSON.stringify(dn));function ya(r={}){var n;let o=(0,Pt.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,xe.themeSize)(e),backgroundColor:e=>(0,xe.themeColor)(e),color:e=>(0,xe.themeColor)(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:(0,xe.themeSpacing)(6),height:(0,xe.themeSpacing)(6),borderRadius:"50%",border:e=>`${(0,xe.themeSpacing)(.5)} solid ${(0,xe.themeColor)(e,"shift-4",o.get(e))}`,borderTopColor:e=>(0,xe.themeColor)(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${un} 0.7s linear infinite`,[`@keyframes ${un}`]:dn}}}var Ot=require("@domphy/core"),Ae=require("@domphy/theme");function ba(r={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:i=90}=r;return{_onSchedule:(t,a)=>{(0,Ot.merge)(a,{_context:{splitter:{direction:o,size:(0,Ot.toState)(n),min:e,max:i}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Sa(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal"?"width":"height";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let i=o.size.addListener(t=>{n.style[e]=`${t}%`});r.addHook("Remove",i)}}}function Ca(){return{role:"separator",tabindex:0,_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=r.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize",n.setAttribute("aria-orientation",e?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(o.min)),n.setAttribute("aria-valuemax",String(o.max)),n.setAttribute("aria-valuenow",String(Math.round(o.size.get())));let i=o.size.addListener(l=>{n.setAttribute("aria-valuenow",String(Math.round(l)))}),t=l=>{let u=l.shiftKey?10:1,c=null;e?l.key==="ArrowRight"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowLeft"&&(c=Math.max(o.size.get()-u,o.min)):l.key==="ArrowDown"?c=Math.min(o.size.get()+u,o.max):l.key==="ArrowUp"&&(c=Math.max(o.size.get()-u,o.min)),l.key==="Home"?c=o.min:l.key==="End"&&(c=o.max),c!==null&&(l.preventDefault(),o.size.set(c))},a=null,s=l=>{l.preventDefault();let u=n.parentElement,c=h=>{let p=u.getBoundingClientRect(),f=e?(h.clientX-p.left)/p.width*100:(h.clientY-p.top)/p.height*100;o.size.set(Math.min(Math.max(f,o.min),o.max))},m=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null};a=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",m),a=null},document.addEventListener("mousemove",c),document.addEventListener("mouseup",m)};n.addEventListener("keydown",t),n.addEventListener("mousedown",s),r.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",t),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>(0,Ae.themeColor)(r,"shift-2"),"&:hover":{backgroundColor:r=>(0,Ae.themeColor)(r,"shift-3")},"&:focus-visible":{outline:r=>`2px solid ${(0,Ae.themeColor)(r,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:(0,Ae.themeSpacing)(1),height:(0,Ae.themeSpacing)(1),borderRadius:(0,Ae.themeSpacing)(999),backgroundColor:r=>(0,Ae.themeColor)(r,"shift-4")}}}}var V=require("@domphy/theme");function va(){let r="neutral",o="primary";return{_onInsert:n=>{var s,l;let e=n.getContext("steps");if(!e){console.warn('"stepItem" patch must be used inside a "steps"');return}r=e.color,o=e.accentColor;let a=((l=(s=n.parent)==null?void 0:s.children.items)!=null?l:[]).filter(u=>u.type==="ElementNode").indexOf(n);n.domElement&&(n.domElement.dataset.step=String(a+1)),n.attributes.set("dataStatus",u=>{let c=e.current.get(u);return a<c?"done":a===c?"active":"pending"}),n.attributes.set("ariaCurrent",u=>e.current.get(u)===a?"step":void 0)},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:(0,V.themeSpacing)(1),flex:"1",fontSize:n=>(0,V.themeSize)(n,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:(0,V.themeSpacing)(6),height:(0,V.themeSpacing)(6),borderRadius:(0,V.themeSpacing)(999),fontSize:n=>(0,V.themeSize)(n,"decrease-1"),fontWeight:"600",flexShrink:"0",border:n=>`2px solid ${(0,V.themeColor)(n,"shift-4",r)}`,backgroundColor:n=>(0,V.themeColor)(n,"inherit"),color:n=>(0,V.themeColor)(n,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:(0,V.themeSpacing)(3),right:`calc(50% + ${(0,V.themeSpacing)(3)})`,left:`calc(-50% + ${(0,V.themeSpacing)(3)})`,height:"2px",backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o),borderColor:n=>(0,V.themeColor)(n,"shift-6",o),color:n=>(0,V.themeColor)(n,"shift-15",o)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r),borderColor:n=>(0,V.themeColor)(n,"shift-3",r),color:n=>(0,V.themeColor)(n,"shift-9",r)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-3",r)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:n=>(0,V.themeColor)(n,"shift-6",o)},"&[data-status=pending]":{color:n=>(0,V.themeColor)(n,"shift-7")},"&[data-status=active]":{color:n=>(0,V.themeColor)(n,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:n=>(0,V.themeColor)(n,"shift-8")}}}}var Dt=require("@domphy/core"),pn=require("@domphy/theme");function Ea(r={}){var t,a,s;let o=(t=r.direction)!=null?t:"horizontal",n=(a=r.color)!=null?a:"neutral",e=(s=r.accentColor)!=null?s:"primary";return{_onSchedule:(l,u)=>{var m;let c={_context:{steps:{current:(0,Dt.toState)((m=r.current)!=null?m:0),direction:o,color:n,accentColor:e}}};(0,Dt.merge)(u,c)},style:{display:"flex",flexDirection:o==="vertical"?"column":"row",alignItems:o==="vertical"?"flex-start":"center",gap:(0,pn.themeSpacing)(2),listStyle:"none",margin:"0",padding:"0"}}}var hn=require("@domphy/core"),dt=require("@domphy/theme");function xa(r={}){var n;let o=(0,hn.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,dt.themeSize)(e,"inherit"),fontWeight:700,color:e=>(0,dt.themeColor)(e,"shift-11",o.get(e)),backgroundColor:e=>(0,dt.themeColor)(e)}}}var fn=require("@domphy/core"),$t=require("@domphy/theme");function ka(r={}){var n;let o=(0,fn.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,$t.themeSize)(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>(0,$t.themeColor)(e,"shift-9",o.get(e))}}}var gn=require("@domphy/core"),It=require("@domphy/theme");function wa(r={}){var n;let o=(0,gn.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,It.themeSize)(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>(0,It.themeColor)(e,"shift-9",o.get(e))}}}var X=require("@domphy/theme");function Ta(r={}){let{accentColor:o="primary",color:n="neutral"}=r;return{role:"tab",_onInsert:i=>{var u,c;i.tagName!=="button"&&console.warn('"tab" patch must use button tag');let t=i.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=i.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type==="ElementNode"&&m.attributes.get("role")==="tab");let s=i.key!==null&&i.key!==void 0?i.key:a.indexOf(i),l={id:`tab${i.parent.nodeId}${s}`,ariaControls:`tabpanel${i.parent.nodeId}${s}`,ariaSelected:m=>t.activeKey.get(m)===s,onClick:()=>t.activeKey.set(s),onKeyDown:m=>{var E,b,z,O;let h=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;m.preventDefault();let p=((b=(E=i.parent)==null?void 0:E.children.items)!=null?b:[]).filter(w=>w.type==="ElementNode"&&w.attributes.get("role")==="tab");if(!p.length)return;let f=p.indexOf(i),S=f;h==="ArrowRight"?S=(f+1)%p.length:h==="ArrowLeft"?S=(f-1+p.length)%p.length:h==="Home"?S=0:h==="End"&&(S=p.length-1);let g=p[S];t.activeKey.set((z=g.key)!=null?z:S),(O=g.domElement)==null||O.focus()}};i.merge(l)},style:{cursor:"pointer",fontSize:i=>(0,X.themeSize)(i,"inherit"),height:i=>(0,X.themeSpacing)(6+(0,X.themeDensity)(i)*2),paddingInline:i=>(0,X.themeSpacing)((0,X.themeDensity)(i)*4),border:"none",outline:"none",color:i=>(0,X.themeColor)(i,"shift-9"),backgroundColor:i=>(0,X.themeColor)(i,"inherit"),boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-6",o)}`},"&:focus-visible":{boxShadow:i=>`inset 0 -${(0,X.themeSpacing)(.5)} 0 0 ${(0,X.themeColor)(i,"shift-6",o)}`}}}}var yn=require("@domphy/core"),I=require("@domphy/theme");function Pa(r={}){var n;let o=(0,yn.toState)((n=r.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>(0,I.themeSize)(e,"inherit"),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${(0,I.themeColor)(e,"shift-3",o.get(e))}`,fontSize:e=>(0,I.themeSize)(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*3),paddingBlock:e=>(0,I.themeSpacing)((0,I.themeDensity)(e)*1),color:e=>(0,I.themeColor)(e,"shift-10",o.get(e)),backgroundColor:e=>(0,I.themeColor)(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${(0,I.themeColor)(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>(0,I.themeColor)(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>`${(0,I.themeColor)(e,"shift-2")}!important`}}}}var at=require("@domphy/theme");function Oa(){return{role:"tabpanel",style:{paddingBlock:o=>(0,at.themeSpacing)((0,at.themeDensity)(o)*2),paddingInline:o=>(0,at.themeSpacing)((0,at.themeDensity)(o)*2)},_onInsert:o=>{var a,s;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(s=(a=o.parent)==null?void 0:a.children.items)!=null?s:[];e=e.filter(l=>l.type==="ElementNode"&&l.attributes.get("role")==="tabpanel");let i=o.key!==null&&o.key!==void 0?o.key:e.indexOf(o),t={id:`tabpanel${o.parent.nodeId}${i}`,ariaLabelledby:`tab${o.parent.nodeId}${i}`,hidden:l=>n.activeKey.get(l)!==i};o.merge(t)}}}var zt=require("@domphy/core");function Da(r={}){return{role:"tablist",ariaOrientation:"horizontal",_onSchedule:(n,e)=>{var t;let i={_context:{tabs:{activeKey:(0,zt.toState)((t=r.activeKey)!=null?t:0)}}};(0,zt.merge)(e,i)}}}var io=require("@domphy/core"),H=require("@domphy/theme");function $a(r={}){var i,t;let o=(0,io.toState)((i=r.color)!=null?i:"neutral","color"),n=(0,io.toState)((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let s=a.domElement;s.style.overflow="hidden";let l=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",l),l(),a.addHook("Remove",()=>s.removeEventListener("input",l))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*2),paddingBlock:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),border:"none",borderRadius:a=>(0,H.themeSpacing)((0,H.themeDensity)(a)*1.5),fontSize:a=>(0,H.themeSize)(a,"inherit"),color:a=>(0,H.themeColor)(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4",o.get(a))}`,backgroundColor:a=>(0,H.themeColor)(a,"inherit",o.get(a)),"&::placeholder":{color:a=>(0,H.themeColor)(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${(0,H.themeSpacing)(.5)} solid ${(0,H.themeColor)(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>(0,H.themeColor)(a,"shift-8","neutral"),outline:a=>`1px solid ${(0,H.themeColor)(a,"shift-4","neutral")}`,backgroundColor:a=>(0,H.themeColor)(a,"shift-2","neutral")}}}}var bn=require("@domphy/core"),ke=require("@domphy/theme");function Ia(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function za(r={}){var t,a,s;let{last:o=!1}=r,n=(t=r.color)!=null?t:"neutral",e=(a=r.accentColor)!=null?a:"primary",i=(0,bn.toState)((s=r.active)!=null?s:!1);return{style:ot({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:l=>(0,ke.themeSpacing)((0,ke.themeDensity)(l)*2),paddingBottom:l=>o?"0":(0,ke.themeSpacing)((0,ke.themeDensity)(l)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:l=>(0,ke.themeColor)(l,"shift-8",i.get(l)?e:n),opacity:l=>i.get(l)?"1":"0.4"}},o?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:l=>`-${(0,ke.themeSpacing)((0,ke.themeDensity)(l)*4)}`,width:"2px",backgroundColor:l=>(0,ke.themeColor)(l,"shift-3",n)}})}}var Sn=require("@domphy/core"),J=require("@domphy/theme");function Va(r={}){let{position:o="top-center",color:n="neutral"}=r,e=(0,Sn.toState)(!1),i=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),s={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:(0,J.themeSpacing)(4),zIndex:30,padding:(0,J.themeSpacing)(6),pointerEvents:"none"}};return{_portal:l=>{let u=l.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=l.children.insert(s).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:(0,J.themeSpacing)(32),pointerEvents:"auto",paddingBlock:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*2),paddingInline:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*4),borderRadius:l=>(0,J.themeSpacing)((0,J.themeDensity)(l)*2),fontSize:l=>(0,J.themeSize)(l,"inherit"),color:l=>(0,J.themeColor)(l,"shift-9",n),backgroundColor:l=>(0,J.themeColor)(l,"inherit",n),boxShadow:l=>`0 ${(0,J.themeSpacing)(2)} ${(0,J.themeSpacing)(9)} ${(0,J.themeColor)(l,"shift-4","neutral")}`,opacity:l=>Number(e.get(l)),transform:l=>e.get(l)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(l,u)=>{let c=!1,m=null,h=()=>{c||(c=!0,m&&(clearTimeout(m),m=null),l.domElement.removeEventListener("transitionend",p),u())},p=f=>{f.propertyName==="transform"&&h()};l.domElement.addEventListener("transitionend",p),m=setTimeout(h,350),l.addHook("Remove",()=>{var f;m&&(clearTimeout(m),m=null),(f=l.domElement)==null||f.removeEventListener("transitionend",p)}),e.set(!1)}}}var lo=require("@domphy/core"),le=require("@domphy/theme");function La(r={}){var e,i;let o=(0,lo.toState)((e=r.color)!=null?e:"neutral","color"),n=(0,lo.toState)((i=r.accentColor)!=null?i:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let l=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(l.indexOf(t));t.attributes.set("ariaPressed",h=>{let p=a.value.get(h);return Array.isArray(p)?p.includes(u):p===u}),t.addEvent("click",()=>{let h=a.value.get();if(a.multiple){let p=Array.isArray(h)?[...h]:[];a.value.set(p.includes(u)?p.filter(f=>f!==u):[...p,u])}else a.value.set(h===u?"":u)})},style:{cursor:"pointer",fontSize:t=>(0,le.themeSize)(t,"inherit"),height:(0,le.themeSpacing)(6),paddingBlock:(0,le.themeSpacing)(1),paddingInline:(0,le.themeSpacing)(2),border:"none",borderRadius:(0,le.themeSpacing)(1),color:t=>(0,le.themeColor)(t,"shift-9",o.get(t)),backgroundColor:t=>(0,le.themeColor)(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>(0,le.themeColor)(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>(0,le.themeColor)(t,"shift-3",n.get(t)),color:t=>(0,le.themeColor)(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${(0,le.themeSpacing)(.5)} solid ${(0,le.themeColor)(t,"shift-6",n.get(t))}`,outlineOffset:`-${(0,le.themeSpacing)(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var Cn=require("@domphy/core"),ze=require("@domphy/theme");function Ma(r={}){var e;let{multiple:o=!1,color:n="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:(0,Cn.toState)((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:(0,ze.themeSpacing)(1),paddingInline:(0,ze.themeSpacing)(1),gap:(0,ze.themeSpacing)(1),borderRadius:(0,ze.themeSpacing)(2),fontSize:i=>(0,ze.themeSize)(i,"inherit"),backgroundColor:i=>(0,ze.themeColor)(i,"inherit",n),outline:i=>`1px solid ${(0,ze.themeColor)(i,"shift-3",n)}`,outlineOffset:"-1px"}}}var Vt=require("@domphy/theme");function Ra(r={}){var n;let o=(n=r.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:e=>(0,Vt.themeSpacing)((0,Vt.themeDensity)(e)*o)}}}function _a(){return{div:null,style:{flex:"1 1 0"}}}var pt=require("@domphy/core"),ge=require("@domphy/theme");function Na(r={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=r,i=(0,pt.toState)(n),t=(0,pt.toState)(e),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:p=>t.get(p),id:a},{show:l,hide:u,anchorPartial:c}=Pe({open:o,placement:i,content:s}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*1),paddingInline:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*3),borderRadius:p=>(0,ge.themeSpacing)((0,ge.themeDensity)(p)*1),color:p=>(0,ge.themeColor)(p,"shift-9"),backgroundColor:p=>(0,ge.themeColor)(p),fontSize:p=>(0,ge.themeSize)(p,"inherit")},$:[no({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(m),(0,pt.merge)(c,{ariaDescribedby:a,onMouseEnter:()=>l(),onMouseLeave:()=>u(),onFocus:()=>l(),onBlur:()=>u(),onKeyDown:p=>p.key==="Escape"&&u()}),c}var so=require("@domphy/core");function vn(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function Ha(r={}){let{duration:o=300,delay:n=0}=r,e=new Map,i=new Map,t=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let l of Array.from(i.values()))l();i.clear();for(let l of t)clearTimeout(l);t.clear();for(let l of a)cancelAnimationFrame(l);a.clear()})},_onBeforeUpdate:s=>{e=new Map,s.children.items.forEach((l,u)=>{if(!(l instanceof so.ElementNode))return;let c=l.domElement;c&&e.set(vn(l,u),c.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((l,u)=>{var w;if(!(l instanceof so.ElementNode))return;let c=l.domElement;if(!c)return;let m=vn(l,u),h=e.get(m);if(!h)return;let p=c.getBoundingClientRect(),f=h.left-p.left,S=h.top-p.top;if(Math.abs(f)<.5&&Math.abs(S)<.5)return;(w=i.get(c))==null||w(),c.style.transition="none",c.style.transform=`translate(${f}px, ${S}px)`,c.getBoundingClientRect();let g=requestAnimationFrame(()=>{a.delete(g),c.style.transition=`transform ${o}ms ease ${n}ms`,c.style.transform="translate(0px, 0px)"});a.add(g);let E=!1,b=null,z=()=>{E||(E=!0,b&&(t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O),c.style.transition="",c.style.transform="")},O=Be=>{Be.propertyName==="transform"&&z()};i.set(c,()=>{E=!0,b&&(clearTimeout(b),t.delete(b),b=null),i.delete(c),c.removeEventListener("transitionend",O)}),c.addEventListener("transitionend",O),b=setTimeout(z,o+n+34),t.add(b)}),e.clear()}}}var En=require("@domphy/core"),et=require("@domphy/theme");function Aa(r={}){var n;let o=(0,En.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,et.themeSize)(e,"inherit"),backgroundColor:e=>(0,et.themeColor)(e),color:e=>(0,et.themeColor)(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:(0,et.themeSpacing)(3),listStyleType:"disc",listStylePosition:"outside"}}}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,emphasis,empty,errorBoundary,fab,figure,formGroup,heading,horizontalRule,icon,image,inputCheckbox,inputColor,inputDateTime,inputFile,inputNumber,inputOTP,inputRadio,inputRange,inputSearch,inputSwitch,inputText,keyboard,label,link,list,listItem,listItemButton,mark,menu,menuItem,motion,orderedList,pagination,paragraph,popover,popoverArrow,preformated,progress,rating,segmented,segmentedItem,select,selectBox,selectItem,selectList,skeleton,small,spinner,splitter,splitterHandle,splitterPanel,stepItem,steps,strong,subscript,superscript,tab,tabPanel,table,tabs,tag,textarea,timeline,timelineItem,toast,toggle,toggleGroup,toolbar,toolbarSpacer,tooltip,transitionGroup,unorderedList});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|