@domphy/ui 0.14.0 → 0.16.0
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/LICENSE +21 -21
- 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.d.cts +973 -196
- package/dist/index.d.ts +973 -196
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Gn=Object.defineProperty,Un=Object.defineProperties;var Xn=Object.getOwnPropertyDescriptors;var go=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable;var yo=(r,o,a)=>o in r?Gn(r,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[o]=a,Je=(r,o)=>{for(var a in o||(o={}))Jn.call(o,a)&&yo(r,a,o[a]);if(go)for(var a of go(o))Qn.call(o,a)&&yo(r,a,o[a]);return r},bo=(r,o)=>Un(r,Xn(o));import{toState as So}from"@domphy/core";import{themeColor as Me,themeSize as Zn,themeSpacing as er}from"@domphy/theme";function Hi(r={}){var e,n;let o=So((e=r.color)!=null?e:"neutral","color"),a=So((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Zn(t),backgroundColor:t=>Me(t),color:t=>Me(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Me(t,"shift-7",o.get(t)),textUnderlineOffset:er(.72),cursor:"help","&:hover":{color:t=>Me(t,"shift-11",a.get(t)),textDecorationColor:t=>Me(t,"shift-9",a.get(t))}}}}import{toState as tr}from"@domphy/core";import{themeColor as pe,themeDensity as Z,themeSpacing as j}from"@domphy/theme";function Ki(r={}){var a;let o=tr((a=r.color)!=null?a:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>j(Z(e)*2),backgroundColor:e=>pe(e,"inherit",o.get(e)),color:e=>pe(e,"shift-10",o.get(e)),outline:e=>`1px solid ${pe(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=>j(Z(e)*2),paddingInline:e=>j(Z(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>j(Z(e)*4),color:e=>pe(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>j(Z(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>j(Z(e)*4),color:e=>pe(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:j(2),paddingBlock:e=>j(Z(e)*2),paddingInline:e=>j(Z(e)*4),borderTop:e=>`1px solid ${pe(e,"shift-3",o.get(e))}`}}}}import{merge as or,toState as nr}from"@domphy/core";import{themeColor as xt,themeSpacing as rr}from"@domphy/theme";function Gi(r={}){let{direction:o="horizontal",defaultSize:a=50,min:e=10,max:n=90}=r;return{_onSchedule:(t,i)=>{or(i,{_context:{splitter:{direction:o,size:nr(a),min:e,max:n}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Ui(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let a=r.domElement,e=o.direction==="horizontal"?"width":"height";a.style[e]=`${o.size.get()}%`,a.style.flexShrink="0",a.style.overflow="auto";let n=o.size.addListener(t=>{a.style[e]=`${t}%`});r.addHook("Remove",n)}}}function Xi(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let a=r.domElement,e=o.direction==="horizontal";a.style.cursor=e?"col-resize":"row-resize";let n=t=>{t.preventDefault();let i=a.parentElement,l=u=>{let c=i.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};a.addEventListener("mousedown",n),r.addHook("Remove",()=>a.removeEventListener("mousedown",n))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>xt(r,"shift-2"),"&:hover":{backgroundColor:r=>xt(r,"shift-3")},"&::after":{content:'""',borderRadius:rr(999),backgroundColor:r=>xt(r,"shift-4")}}}}import{merge as ar,toState as ir}from"@domphy/core";import{themeColor as Y,themeDensity as Qe,themeSize as Co,themeSpacing as fe}from"@domphy/theme";function el(){return{_onSchedule:(r,o)=>{ar(o,{_context:{command:{query:ir("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function tl(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let n=e.getContext("command");if(!n){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>n.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>Co(e,"inherit"),paddingInline:e=>fe(Qe(e)*3),paddingBlock:e=>fe(Qe(e)*2),border:"none",borderBottom:e=>`1px solid ${Y(e,"shift-3",o)}`,outline:"none",color:e=>Y(e,"shift-10",o),backgroundColor:e=>Y(e,"inherit",o),"&::placeholder":{color:e=>Y(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>Y(e,"shift-6",a)}}}}function ol(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{role:"option",_onMount:e=>{var s,u;let n=e.getContext("command");if(!n){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=n.query.addListener(c=>{t.hidden=c.length>0&&!i.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Co(e,"inherit"),height:e=>fe(6+Qe(e)*2),paddingInline:e=>fe(Qe(e)*3),border:"none",outline:"none",color:e=>Y(e,"shift-9",o),backgroundColor:e=>Y(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>Y(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${fe(.5)} solid ${Y(e,"shift-6",a)}`,outlineOffset:`-${fe(.5)}`}}}}import{toState as vo}from"@domphy/core";import{themeColor as ge,themeSize as lr,themeSpacing as ye}from"@domphy/theme";function il(r={}){var e,n;let o=vo((e=r.color)!=null?e:"neutral","color"),a=vo((n=r.accentColor)!=null?n:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let i=t.getContext("toggleGroup");if(!i){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let s=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(s.findIndex(p=>p===t));t.attributes.set("ariaPressed",p=>{let h=i.value.get(p);return Array.isArray(h)?h.includes(u):h===u}),t.addEvent("click",()=>{let p=i.value.get();if(i.multiple){let h=Array.isArray(p)?[...p]:[];i.value.set(h.includes(u)?h.filter(f=>f!==u):[...h,u])}else i.value.set(p===u?"":u)})},style:{cursor:"pointer",fontSize:t=>lr(t,"inherit"),height:ye(6),paddingBlock:ye(1),paddingInline:ye(2),border:"none",borderRadius:ye(1),color:t=>ge(t,"shift-9",o.get(t)),backgroundColor:t=>ge(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>ge(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>ge(t,"shift-3",a.get(t)),color:t=>ge(t,"shift-12",a.get(t))},"&:focus-visible":{outline:t=>`${ye(.5)} solid ${ge(t,"shift-6",a.get(t))}`,outlineOffset:`-${ye(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as sr}from"@domphy/core";import{themeSpacing as Ze,themeColor as Eo,themeSize as cr}from"@domphy/theme";function ul(r={}){var e;let{multiple:o=!1,color:a="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:sr((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:Ze(1),paddingInline:Ze(1),gap:Ze(1),borderRadius:Ze(2),fontSize:n=>cr(n,"inherit"),backgroundColor:n=>Eo(n,"inherit",a),outline:n=>`1px solid ${Eo(n,"shift-3",a)}`,outlineOffset:"-1px"}}}import{themeSpacing as xo}from"@domphy/theme";function pl(){return{style:{display:"flex",alignItems:"center",gap:xo(2),"& > *":{minWidth:xo(9)+"!important"}},_onMount:r=>{let o=r.domElement,a=()=>Array.from(o.querySelectorAll("input")),e=i=>{let l=a(),s=i.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},n=i=>{let l=a(),s=i.target,u=l.indexOf(s);i.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),i.key==="ArrowLeft"&&u>0&&l[u-1].focus(),i.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=i=>{var m,p,h;i.preventDefault();let l=(p=(m=i.clipboardData)==null?void 0:m.getData("text"))!=null?p:"",s=a(),u=s.indexOf(i.target);[...l].forEach((f,v)=>{s[u+v]&&(s[u+v].value=f)});let c=Math.min(u+l.length-1,s.length-1);(h=s[c])==null||h.focus()};o.addEventListener("input",e),o.addEventListener("keydown",n),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",n),o.removeEventListener("paste",t)})}}}import{toState as mr}from"@domphy/core";import{themeColor as kt,themeDensity as ko,themeSize as ur,themeSpacing as et}from"@domphy/theme";function Sl(r={}){var a;let o=mr((a=r.color)!=null?a:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:et(3),paddingBlock:e=>et(ko(e)*2),paddingInline:e=>et(ko(e)*4),boxShadow:e=>`inset ${et(1)} 0 0 0 ${kt(e,"shift-8",o.get(e))}`,backgroundColor:e=>kt(e,"inherit",o.get(e)),color:e=>kt(e,"shift-10",o.get(e)),fontSize:e=>ur(e,"inherit")}}}import{toState as dr}from"@domphy/core";import{themeColor as wo,themeSize as hr,themeSpacing as To}from"@domphy/theme";function kl(r={}){var a;let o=dr((a=r.color)!=null?a:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:To(9),height:To(9),fontSize:e=>hr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>wo(e,"inherit",o.get(e)),color:e=>wo(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Po}from"@domphy/core";import{themeSpacing as wt,themeColor as Do,themeSize as pr}from"@domphy/theme";function Ol(r={}){var n;let{label:o=999}=r,a=Po(o),e=Po((n=r.color)!=null?n:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${a.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:wt(1),minWidth:wt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>pr(t,"decrease-1"),borderRadius:wt(999),backgroundColor:t=>Do(t,"shift-9",e.get(t)),color:t=>Do(t,"shift-0",e.get(t))}}}}import{toState as fr}from"@domphy/core";import{themeColor as Re,themeSize as gr,themeSpacing as Oo}from"@domphy/theme";function Ml(r={}){var e;let{separator:o="/"}=r,a=fr((e=r.color)!=null?e:"neutral","color");return{_onInsert:n=>{n.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:n=>gr(n,"inherit"),gap:Oo(1),color:n=>Re(n,"shift-9",a.get(n)),backgroundColor:n=>Re(n,"inherit",a.get(n)),"& > *":{display:"inline-flex",alignItems:"center",color:n=>Re(n,"shift-8",a.get(n))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:n=>Re(n,"shift-4",a.get(n)),paddingInlineStart:Oo(1)},"& > [aria-current=page]":{color:n=>Re(n,"shift-10",a.get(n)),pointerEvents:"none"}}}}import{toState as yr}from"@domphy/core";import{themeColor as tt,themeSize as br,themeSpacing as ot}from"@domphy/theme";function Hl(r={}){var a;let o=yr((a=r.color)!=null?a:"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=>br(e,"inherit"),paddingInline:ot(1),border:"none",background:"none",cursor:"pointer",color:e=>tt(e,"shift-8",o.get(e)),borderRadius:ot(1),"&:hover":{color:e=>tt(e,"shift-10",o.get(e)),backgroundColor:e=>tt(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${ot(.5)} solid ${tt(e,"shift-6",o.get(e))}`,outlineOffset:ot(.5)}}}}import{toState as Tt,merge as Pt}from"@domphy/core";import{themeSpacing as ce,themeColor as _e,themeDensity as Dt,themeSize as Io}from"@domphy/theme";import{toState as Sr}from"@domphy/core";import{themeColor as nt,themeSize as Cr,themeSpacing as q}from"@domphy/theme";var vr='<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 rt(r={}){var e;let{removable:o=!1}=r,a=Sr((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:n=>{let t={span:vr,onClick:i=>{i.stopPropagation(),n.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:q(1),width:q(4),height:q(4),flexShrink:0,"&:hover":{backgroundColor:i=>nt(i,"shift-4",a.get(i))}}};o&&n.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:q(6),paddingBlock:"0px",borderRadius:q(1),paddingInlineStart:q(2),paddingInlineEnd:o?q(1):q(2),gap:q(2),fontSize:n=>Cr(n,"inherit"),backgroundColor:n=>nt(n,"inherit",a.get(n)),color:n=>nt(n,"shift-9",a.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${nt(n,"shift-4",a.get(n))}`}}}import{toState as Er,merge as xr}from"@domphy/core";import{computePosition as kr,autoUpdate as wr,offset as Tr,flip as Pr,shift as Dr}from"@domphy/floating";function B(r){let{open:o=!1,placement:a}=r,e=null,n=null,t=null,i=null,l=null,s=null,u=!1,c=Er(o),m=()=>{u||!s||(u=!0,l=s.children.insert(r.content))},p=()=>{m(),t&&i&&(n&&n(),n=wr(t,i,()=>{kr(t,i,{placement:a.get(),middleware:[Tr(12),Pr(),Dr()],strategy:"fixed"}).then(({x:E,y:$,placement:w})=>{Object.assign(i.style,{left:`${E}px`,top:`${$}px`}),a.set(w)})}),c.set(!0))},h=()=>{n&&n(),n=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},v=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},y={style:{position:"fixed",pointerEvents:"auto",visibility:E=>c.get(E)?"visible":"hidden"},_onMount:E=>i=E.domElement,_portal:E=>{let $=E.domElement.querySelector("#domphy-floating");if(!$){let w={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};$=E.children.insert(w).domElement}return $}};return xr(r.content,y),{show:f,hide:v,anchorPartial:{onKeyDown:E=>E.key==="Escape"&&v(),_onMount:E=>{s=E.getRoot(),t=E.domElement;let $=w=>{if(!c.get()||!t||!i)return;let I=w.target;!t.contains(I)&&!i.contains(I)&&v()};E.getRoot().domElement.addEventListener("click",$),E.addHook("BeforeRemove",()=>{e&&clearTimeout(e),n&&(n(),n=null),l&&l.remove(),E.getRoot().domElement.removeEventListener("click",$)})}}}}function os(r){let{options:o=[],placement:a="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=r,i=Tt(r.value),l=Tt(n),{show:s,hide:u,anchorPartial:c}=B({open:l,placement:Tt(a),content:r.content}),m={onClick:()=>!t&&u()};Pt(r.content,m);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:ce(6),marginInlineStart:ce(2),fontSize:y=>Io(y,"inherit"),color:y=>_e(y,"shift-9",e),backgroundColor:y=>_e(y,"inherit",e)},h;r.input?(Pt(r.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),h=r.input):h={input:null,onFocus:()=>s(),value:y=>(i.get(y),""),style:p,_key:"combobox-input"};let f={div:y=>{let T=i.get(y),E=Array.isArray(T)?T:[T],w=o.filter(I=>E.includes(I.value)).map(I=>({span:I.label,$:[rt({color:e,removable:!0})],_key:I.value,_onRemove:Ve=>{let se=i.get(),de=(Array.isArray(se)?se:[se]).filter(bt=>bt!==I.value);t?i.set(de):i.set(de[0])}}));return w.push(h),w},style:{display:"flex",flexWrap:"wrap",gap:ce(1)}},v={_onInsert:y=>{y.tagName!="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:y=>y.children.insert(f),style:{minWidth:ce(32),outlineOffset:"-1px",outline:y=>`1px solid ${_e(y,"shift-4","neutral")}`,paddingBlock:y=>ce(Dt(y)*1),paddingInline:y=>ce(Dt(y)*1),borderRadius:y=>ce(Dt(y)*1),fontSize:y=>Io(y,"inherit"),color:y=>_e(y,"shift-9",e),backgroundColor:y=>_e(y,"inherit",e)}};return Pt(c,v),c}import{toState as Or}from"@domphy/core";import{themeSpacing as Ot,themeColor as at,themeSize as Ir}from"@domphy/theme";function $o(r={}){let{placement:o="bottom-end",color:a="neutral",sideOffset:e=Ot(6),bordered:n=!0}=r,t=Or(o),i={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=c=>{var m;return(m=i[t.get(c)])!=null?m:i["bottom-end"]},s=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=>Ir(c),backgroundColor:c=>at(c),color:c=>at(c,"shift-9",a),position:"relative","&::after":{content:'""',position:"absolute",width:Ot(1.5),height:Ot(1.5),backgroundColor:c=>at(c,"inherit",a),borderWidth:n?"1px":"0px",borderColor:c=>at(c,"inherit",a),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),p=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",h=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${p},${h}) rotate(45deg)`}}}}}import{toState as $r}from"@domphy/core";import{themeSpacing as It,themeColor as zo,themeDensity as Vo,themeSize as zr}from"@domphy/theme";function ps(r={}){var a;let o=$r((a=r.color)!=null?a:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>zr(e,"inherit"),backgroundColor:e=>zo(e,"inherit",o.get(e)),boxShadow:e=>`inset ${It(1)} 0 0 0 ${zo(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>It(Vo(e)*2),paddingInline:e=>It(Vo(e)*4),margin:0}}}import{toState as Vr}from"@domphy/core";import{themeColor as G,themeDensity as it,themeSize as Mr,themeSpacing as Le}from"@domphy/theme";function bs(r={}){var a;let o=Vr((a=r.color)!=null?a:"primary","color");return{_onInsert:e=>{e.tagName!="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Mr(e,"inherit"),paddingBlock:e=>Le(it(e)*1),paddingInline:e=>Le(it(e)*3),borderRadius:e=>Le(it(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Le(it(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${G(e,"shift-4",o.get(e))}`,color:e=>G(e,"shift-9",o.get(e)),backgroundColor:e=>G(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>G(e,"shift-10",o.get(e)),backgroundColor:e=>G(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Le(.5)} ${G(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>G(e,"shift-2","neutral"),outline:e=>`1px solid ${G(e,"shift-4","neutral")}`,color:e=>G(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Mo}from"@domphy/core";import{themeColor as M,themeSpacing as ee,themeSize as Rr}from"@domphy/theme";function ws(r={}){var e,n;let o=Mo((e=r.color)!=null?e:"neutral","color"),a=Mo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Rr(t,"inherit"),display:"inline-flex",position:"relative",width:ee(6),height:ee(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:ee(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${M(t,"shift-4",o.get(t))}`,color:t=>M(t,"shift-9",o.get(t)),width:ee(4),height:ee(4)},"&:hover::before":{backgroundColor:t=>M(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${M(t,"shift-6",a.get(t))}`,backgroundColor:t=>M(t,"shift-8",a.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>M(t,"shift-7",a.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${ee(.5)} solid ${M(t,"inherit",a.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${M(t,"shift-6",a.get(t))}`,backgroundColor:t=>M(t,"shift-3",a.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>M(t,"shift-8",a.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>M(t,"shift-7",a.get(t))},"&:focus-visible":{borderRadius:ee(1.5),outline:t=>`${ee(.5)} solid ${M(t,"shift-6",a.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>M(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as _r}from"@domphy/core";import{themeSpacing as $t,themeColor as Ro,themeSize as Lr}from"@domphy/theme";function zs(r={}){var a;let o=_r((a=r.color)!=null?a:"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=>Lr(e,"inherit"),color:e=>Ro(e,"shift-9",o.get(e)),backgroundColor:e=>Ro(e,"inherit",o.get(e)),height:$t(6),paddingInline:$t(1.5),borderRadius:$t(1)}}}import{toState as _o}from"@domphy/core";import{themeColor as te,themeDensity as Ne,themeSize as Lo,themeSpacing as z}from"@domphy/theme";function Hs(r={}){var n,t;let{duration:o=240}=r,a=_o((n=r.color)!=null?n:"neutral","color"),e=_o((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Lo(i,"inherit"),color:i=>te(i,"shift-9",a.get(i)),backgroundColor:i=>te(i,"inherit",a.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>te(i,"shift-2",a.get(i)),color:i=>te(i,"shift-10",a.get(i)),fontSize:i=>Lo(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:z(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>z(Ne(i)*4),height:z(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:z(2),height:z(2),flexShrink:0,marginTop:`-${z(.5)}`,borderInlineEnd:i=>`${z(.5)} solid ${te(i,"shift-9",a.get(i))}`,borderBottom:i=>`${z(.5)} solid ${te(i,"shift-9",a.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>te(i,"shift-3",a.get(i))},"& > summary:focus-visible":{borderRadius:i=>z(Ne(i)*2),outlineOffset:`-${z(.5)}`,outline:i=>`${z(.5)} solid ${te(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>z(Ne(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:z(250),opacity:1,paddingTop:i=>z(Ne(i)*1),paddingBottom:i=>z(Ne(i)*3)}}}}import{toState as Nr}from"@domphy/core";import{themeColor as No,themeSpacing as Ho,themeSize as Bo}from"@domphy/theme";function Ys(r={}){var a;let o=Nr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${Ho(24)}, max-content) 1fr`,columnGap:Ho(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Bo(e,"inherit"),color:e=>No(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>Bo(e,"inherit"),color:e=>No(e,"shift-9",o.get(e))}}}}import{toState as Hr}from"@domphy/core";import{themeColor as lt,themeDensity as Br,themeSize as Ar,themeSpacing as zt}from"@domphy/theme";function Js(r={}){let{color:o="neutral",open:a=!1}=r,e=Hr(a);return{_onInsert:n=>{n.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(n,t)=>{if(n.target!==t.domElement)return;let i=t.domElement.getBoundingClientRect();n.clientX>=i.left&&n.clientX<=i.right&&n.clientY>=i.top&&n.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(n,t)=>{let i=t.domElement;i.style.opacity==="0"&&(i.close(),document.body.style.overflow="")},_onMount:n=>{let t=n.domElement,i=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let u=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');u==null||u.focus()})):t.style.opacity="0"};i(e.get());let l=e.addListener(i);n.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:n=>Ar(n,"inherit"),color:n=>lt(n,"shift-10",o),backgroundColor:n=>lt(n,"inherit",o),border:"none",padding:n=>zt(Br(n)*3),boxShadow:n=>`0 ${zt(9)} ${zt(16)} ${lt(n,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:n=>lt(n,"shift-2","neutral"),opacity:.75}}}}import{toState as Fr}from"@domphy/core";import{themeColor as Wr,themeSize as Kr}from"@domphy/theme";function rc(r={}){var a;let o=Fr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Kr(e,"inherit"),fontStyle:"italic",color:e=>Wr(e,"shift-10",o.get(e))}}}import{toState as jr}from"@domphy/core";import{themeColor as Ao,themeSize as Yr,themeSpacing as st}from"@domphy/theme";function uc(r={}){var a;let o=jr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:st(2),marginInline:0,marginTop:st(3),marginBottom:st(3),color:e=>Ao(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:st(2)},"& figcaption":{fontSize:e=>Yr(e,"decrease-1"),color:e=>Ao(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as qr}from"@domphy/core";import{themeColor as ct,themeDensity as be,themeSpacing as U,themeSize as Vt}from"@domphy/theme";function gc(r={}){var n;let{layout:o="horizontal"}=r,a=qr((n=r.color)!=null?n:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>U(be(t)*3),paddingBlock:t=>U(be(t)*3),border:"none",borderRadius:t=>U(be(t)*2),fontSize:t=>Vt(t,"inherit"),backgroundColor:t=>ct(t,"inherit",a.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:U(4),rowGap:U(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>Vt(t,"inherit"),fontWeight:600,paddingBlock:t=>U(be(t)*1),borderRadius:t=>U(be(t)*2),color:t=>ct(t,"shift-9",a.get(t)),backgroundColor:t=>ct(t,"inherit",a.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":U(be(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(${U(2)} * -1)`,fontSize:t=>Vt(t,"decrease-1"),color:t=>ct(t,"shift-9",a.get(t))}}}}import{toState as Gr}from"@domphy/core";import{themeColor as Ur,themeSize as Xr,themeSpacing as Jr}from"@domphy/theme";var Qr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function xc(r={}){var a;let o=Gr((a=r.color)!=null?a:"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=>Ur(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Jr(2),fontSize:e=>{let n=Qr[e.elementNode.tagName]||"inherit";return Xr(e,n)}}}}import{toState as Zr}from"@domphy/core";import{themeColor as ea,themeSpacing as Fo}from"@domphy/theme";function Ic(r={}){var a;let o=Zr((a=r.color)!=null?a:"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:Fo(3),marginBottom:Fo(3),backgroundColor:e=>ea(e,"shift-4",o.get(e))}}}import{toState as ta}from"@domphy/core";import{themeColor as oa,themeSpacing as na}from"@domphy/theme";function Lc(r={}){var a;let o=ta((a=r.color)!=null?a:"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:na(2),backgroundColor:e=>oa(e,"inherit",o.get(e))}}}import{toState as ra}from"@domphy/core";import{themeSpacing as Wo,themeColor as aa,themeSize as ia}from"@domphy/theme";function Fc(r={}){var a;let o=ra((a=r.color)!=null?a:"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:Wo(4),height:Wo(4),flexShrink:"0",fontSize:e=>ia(e),backgroundColor:"transparent",color:e=>aa(e,"shift-9",o.get(e))}}}import{toState as Ko}from"@domphy/core";import{themeColor as jo,themeDensity as He,themeSpacing as Be,themeSize as la}from"@domphy/theme";function Gc(r={}){var e,n;let o=Ko((e=r.color)!=null?e:"neutral","color"),a=Ko((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"color",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>la(t,"inherit"),paddingBlock:t=>Be(He(t)*1),paddingInline:t=>Be(He(t)*1),blockSize:t=>Be(6+He(t)*2),inlineSize:t=>Be(6+He(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Be(He(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>jo(t,"shift-2","neutral"),outline:t=>`1px solid ${jo(t,"shift-4","neutral")}`}}}}import{toState as Yo}from"@domphy/core";import{themeColor as oe,themeDensity as Mt,themeSpacing as Ae,themeSize as sa}from"@domphy/theme";function tm(r={}){var n,t;let{mode:o="datetime-local"}=r,a=Yo((n=r.color)!=null?n:"neutral","color"),e=Yo((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,l)=>{i.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:i=>sa(i,"inherit"),lineHeight:"inherit",color:i=>oe(i,"shift-9",a.get(i)),backgroundColor:i=>oe(i,"inherit",a.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${oe(i,"shift-4",a.get(i))}`,borderRadius:i=>Ae(Mt(i)*1),paddingInline:i=>Ae(Mt(i)*3),height:i=>Ae(6+Mt(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${Ae(.5)} solid ${oe(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>oe(i,"shift-8","neutral"),backgroundColor:i=>oe(i,"shift-2","neutral"),outline:i=>`1px solid ${oe(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${Ae(.5)} solid ${oe(i,"shift-6","error")}`}}}}import{merge as ca,toState as X}from"@domphy/core";import{themeColor as P,themeSize as Se,themeSpacing as D}from"@domphy/theme";var O=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),me=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),Rt=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Fe=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),_t=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Lt=(r,o)=>me(r,-((r.getDay()-o+7)%7));function ma(r){var o,a;try{let e=new Intl.Locale(r),n=(a=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?a:e.weekInfo;if(n!=null&&n.firstDay)return n.firstDay%7}catch(e){}return 0}function im(r={}){var uo,ho,po,fo;let{mode:o="single",time:a=!1,min:e,max:n,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:s}=r,u=(uo=r.weekStartsOn)!=null?uo:ma(i),c=X((ho=r.accentColor)!=null?ho:"primary","accentColor"),m=X((po=r.placement)!=null?po:"bottom-start"),p=X((fo=r.value)!=null?fo:o==="range"?[null,null]:null);s&&p.addListener(d=>s(d));let h=(()=>{let d=p.get(),g=o==="range"?d==null?void 0:d[0]:d;return g instanceof Date?g:new Date})(),f=X(h.getFullYear(),"viewYear"),v=X(h.getMonth(),"viewMonth"),y=X(O(h),"focused"),T=X(null,"hovered"),E=X(h.getHours(),"hour"),$=X(h.getMinutes(),"minute"),w=null,I=new Intl.DateTimeFormat(i,Je({dateStyle:"medium"},a?{timeStyle:"short"}:{})),Ve=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),se=new Intl.DateTimeFormat(i,{weekday:"short"}),io=new Intl.DateTimeFormat(i,{dateStyle:"full"}),de=d=>d?I.format(d):"",bt=d=>{if(l)return l(d);if(o==="range"){let[g,b]=d!=null?d:[null,null];return g?`${de(g)} \u2013 ${de(b)}`:""}return de(d)},Vn=Array.from({length:7},(d,g)=>se.format(new Date(2023,0,1+(g+u)%7))),lo=d=>!!e&&O(d)<O(e)||!!n&&O(d)>O(n)||!!t&&t(d),Q=d=>{if(!a)return O(d);let g=O(d);return g.setHours(E.get(),$.get(),0,0),g},so=d=>{var S;if(lo(d))return;if(o==="single"){p.set(Q(d)),a||vt();return}let[g,b]=(S=p.get())!=null?S:[null,null];!g||g&&b?p.set([Q(d),null]):O(d)<O(g)?(p.set([Q(d),Q(g)]),a||vt()):(p.set([g,Q(d)]),a||vt())},Mn=()=>{var d;if(a)if(o==="single"){let g=p.get();g&&p.set(Q(g))}else{let[g,b]=(d=p.get())!=null?d:[null,null];p.set([g&&Q(g),b&&Q(b)])}},Rn=(d,g)=>{var he;if(o!=="range")return!1;let[b,S]=(he=p.get(g))!=null?he:[null,null],x=S!=null?S:T.get(g);if(!b||!x)return!1;let C=O(b)<=O(x)?b:x,R=O(b)<=O(x)?x:b,V=O(d);return V>=O(C)&&V<=O(R)},_n=(d,g)=>{let b=p.get(g);if(o==="range"){let[S,x]=b!=null?b:[null,null];return Fe(d,S)||Fe(d,x)}return Fe(d,b)},Xe=d=>{f.set(d.getFullYear()),v.set(d.getMonth())},co=d=>{let g=Rt(new Date(f.get(),v.get(),1),d);Xe(g)},mo=d=>f.set(f.get()+d),St=()=>{setTimeout(()=>{var d;(d=w==null?void 0:w.querySelector(`[data-date="${_t(y.get())}"]`))==null||d.focus()},0)},Ln=Fn(),{show:Nn,hide:Hn,anchorPartial:Ct}=B({open:!1,placement:m,content:Ln});function vt(){Hn()}Ct.onClick=()=>{};let Bn={type:"text",readonly:!0,value:d=>bt(p.get(d)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{Et()},onFocus:()=>{Et()},onKeyDown:d=>{let g=d.key;(g==="ArrowDown"||g==="Enter")&&(d.preventDefault(),Et())}};function Et(){var g;let d=(g=An())!=null?g:new Date;y.set(O(d)),Xe(d),Nn(),St()}function An(){var g;let d=p.get();return o==="range"?(g=d==null?void 0:d[0])!=null?g:null:d!=null?d:null}return ca(Ct,Bn),Ct;function Fn(){let d=(C,R,V)=>({button:C,type:"button",ariaLabel:R,onClick:V,style:ua()}),g={div:[d("\xAB","Previous year",()=>mo(-1)),d("\u2039","Previous month",()=>co(-1)),{div:C=>Ve.format(new Date(f.get(C),v.get(C),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:C=>Se(C)}},d("\u203A","Next month",()=>co(1)),d("\xBB","Next year",()=>mo(1))],style:{display:"flex",alignItems:"center",gap:D(1),marginBottom:D(2)}},b={div:Vn.map((C,R)=>({div:C,style:{textAlign:"center",fontSize:V=>Se(V,"decrease-1"),fontWeight:"600",color:V=>P(V,"shift-7"),paddingBlock:D(1)},_key:R})),role:"row",style:qo()},S={div:C=>Wn(C),role:"grid",ariaLabel:"Calendar",onKeyDown:qn,onMouseLeave:()=>o==="range"&&T.set(null),style:{display:"flex",flexDirection:"column",gap:D(.5)}},x=[g,b,S];return a&&x.push(jn()),x.push(Yn()),{div:x,role:"dialog",ariaModal:"false",_onMount:C=>{w=C.domElement},style:{minWidth:D(70),padding:D(3),borderRadius:D(2),backgroundColor:C=>P(C,"base"),color:C=>P(C,"shift-10"),border:C=>`1px solid ${P(C,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Wn(d){let g=new Date(f.get(d),v.get(d),1),b=v.get(d),S=Lt(g,u),x=[];for(let C=0;C<6;C++){let R=[];for(let V=0;V<7;V++){let he=me(S,C*7+V);R.push(Kn(he,b,d))}x.push({div:R,role:"row",style:qo(),_key:C})}return x}function Kn(d,g,b){let S=lo(d),x=_n(d,b),C=Rn(d,b),R=d.getMonth()!==g,V=Fe(d,y.get(b)),he=Fe(d,new Date);return{button:String(d.getDate()),type:"button",role:"gridcell",tabIndex:V?0:-1,ariaSelected:x,ariaDisabled:S,disabled:S,ariaLabel:io.format(d),dataDate:_t(d),onClick:()=>so(d),onMouseEnter:()=>o==="range"&&T.set(d),style:{appearance:"none",border:"none",cursor:S?"not-allowed":"pointer",aspectRatio:"1",borderRadius:D(1),fontSize:k=>Se(k),fontFamily:"inherit",opacity:S?.35:R?.5:1,backgroundColor:k=>x?P(k,"shift-7",c.get(k)):C?P(k,"shift-2",c.get(k)):"transparent",color:k=>x?P(k,"shift-0",c.get(k)):P(k,"shift-9"),outline:he?k=>`1px solid ${P(k,"shift-6",c.get(k))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:k=>x?P(k,"shift-7",c.get(k)):P(k,"shift-3",c.get(k))},"&:focus-visible":{outline:k=>`2px solid ${P(k,"shift-6",c.get(k))}`}},_key:_t(d)}}function jn(){let d=(g,b,S)=>({select:Array.from({length:g},(x,C)=>({option:String(C).padStart(2,"0"),value:String(C),selected:R=>b.get(R)===C,_key:C})),ariaLabel:S,onChange:x=>{b.set(Number(x.target.value)),Mn()},style:da()});return{div:[d(24,E,"Hour"),{span:":",style:{fontWeight:"600"}},d(60,$,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:D(1),marginTop:D(3)}}}function Yn(){let d=(g,b)=>({button:g,type:"button",onClick:b,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:S=>Se(S,"decrease-1"),color:S=>P(S,"shift-8",c.get(S)),padding:D(1)}});return{div:[d("Today",()=>{let g=new Date;y.set(O(g)),Xe(g),St()}),d("Clear",()=>{p.set(o==="range"?[null,null]:null),T.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:D(2),paddingTop:D(2),borderTop:g=>`1px solid ${P(g,"shift-3")}`}}}function qn(d){let g=d,b=y.get(),S=null;switch(g.key){case"ArrowLeft":S=me(b,-1);break;case"ArrowRight":S=me(b,1);break;case"ArrowUp":S=me(b,-7);break;case"ArrowDown":S=me(b,7);break;case"Home":S=Lt(b,u);break;case"End":S=me(Lt(b,u),6);break;case"PageUp":S=Rt(b,g.shiftKey?-12:-1);break;case"PageDown":S=Rt(b,g.shiftKey?12:1);break;case"Enter":case" ":g.preventDefault(),so(b);return;default:return}g.preventDefault(),y.set(S),Xe(S),St()}}function qo(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:D(.5)}}function ua(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>Se(r),color:r=>P(r,"shift-8"),width:D(7),height:D(7),borderRadius:D(1),"&:hover":{backgroundColor:r=>P(r,"shift-3")}}}function da(){return{fontFamily:"inherit",fontSize:r=>Se(r),padding:D(1),borderRadius:D(1),border:r=>`1px solid ${P(r,"shift-4")}`,backgroundColor:r=>P(r,"base"),color:r=>P(r,"shift-9")}}import{toState as Go}from"@domphy/core";import{themeColor as N,themeDensity as mt,themeSpacing as ne,themeSize as ha}from"@domphy/theme";function pm(r={}){var e,n;let o=Go((e=r.color)!=null?e:"neutral","color"),a=Go((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>ha(t,"inherit"),lineHeight:"inherit",color:t=>N(t,"shift-9",o.get(t)),backgroundColor:t=>N(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"shift-4",o.get(t))}`,borderRadius:t=>ne(mt(t)*1),height:t=>ne(6+mt(t)*2),paddingInline:t=>ne(mt(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>ne(mt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:ne(1),height:ne(6),paddingInline:ne(2),cursor:"pointer",color:t=>N(t,"shift-11",o.get(t)),backgroundColor:t=>N(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ne(.5)} solid ${N(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>N(t,"shift-8","neutral"),outline:t=>`1px solid ${N(t,"shift-4","neutral")}`,backgroundColor:t=>N(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>N(t,"shift-8","neutral"),backgroundColor:t=>N(t,"shift-3","neutral")}}}}import{toState as Uo}from"@domphy/core";import{themeColor as re,themeDensity as Nt,themeSpacing as We,themeSize as pa}from"@domphy/theme";function vm(r={}){var e,n;let o=Uo((e=r.color)!=null?e:"neutral","color"),a=Uo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>pa(t,"inherit"),lineHeight:"inherit",color:t=>re(t,"shift-9",o.get(t)),backgroundColor:t=>re(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${re(t,"shift-4",o.get(t))}`,borderRadius:t=>We(Nt(t)*1),minWidth:We(32),paddingInline:t=>We(Nt(t)*3),paddingBlock:t=>We(Nt(t)*1),"&::placeholder":{color:t=>re(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=>`${We(.5)} solid ${re(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>re(t,"shift-8","neutral"),backgroundColor:t=>re(t,"shift-2","neutral"),outline:t=>`1px solid ${re(t,"shift-4","neutral")}`}}}}import{toState as Xo}from"@domphy/core";import{themeColor as _,themeDensity as Ht,themeSpacing as ae,themeSize as fa}from"@domphy/theme";function Dm(r={}){var e,n;let o=Xo((e=r.color)!=null?e:"neutral","color"),a=Xo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:ae(10),paddingInline:t=>ae(Ht(t)*3),paddingBlock:t=>ae(Ht(t)*1),borderRadius:t=>ae(Ht(t)*1),fontSize:t=>fa(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${_(t,"shift-4",o.get(t))}`,color:t=>_(t,"shift-9",o.get(t)),backgroundColor:t=>_(t,"inherit",o.get(t)),"&::placeholder":{color:t=>_(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>_(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ae(.5)} solid ${_(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>_(t,"shift-2","neutral"),outline:t=>`1px solid ${_(t,"shift-4","neutral")}`,color:t=>_(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${ae(.5)} solid ${_(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${ae(.5)} solid ${_(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${ae(.5)} solid ${_(t,"shift-6","warning")}`}}}}import{toState as Jo}from"@domphy/core";import{themeColor as ut,themeSpacing as H}from"@domphy/theme";function Rm(r={}){var e,n;let o=Jo((e=r.color)!=null?e:"neutral","color"),a=Jo((n=r.accentColor)!=null?n:"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:H(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:H(1.5),borderRadius:H(999),backgroundColor:t=>ut(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:H(4),height:H(4),borderRadius:H(999),border:"none",marginTop:`calc((${H(1.5)} - ${H(4)}) / 2)`,backgroundColor:t=>ut(t,"shift-9",a.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>ut(t,"shift-10",a.get(t))},"&:focus-visible":{outline:t=>`${H(.5)} solid ${ut(t,"shift-6",a.get(t))}`,outlineOffset:H(1),borderRadius:H(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Qo}from"@domphy/core";import{themeColor as ue,themeDensity as dt,themeSpacing as Ce,themeSize as ga}from"@domphy/theme";function Fm(r={}){var e,n;let o=Qo((e=r.color)!=null?e:"neutral","color"),a=Qo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Ce(10),paddingInlineStart:t=>Ce(dt(t)*3),paddingInlineEnd:t=>Ce(dt(t)*1.5),paddingBlock:t=>Ce(dt(t)*1),borderRadius:t=>Ce(dt(t)*1),fontSize:t=>ga(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ue(t,"shift-4",o.get(t))}`,color:t=>ue(t,"shift-9",o.get(t)),backgroundColor:t=>ue(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=>`${Ce(.5)} solid ${ue(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>ue(t,"shift-2","neutral"),outline:t=>`1px solid ${ue(t,"shift-4","neutral")}`,color:t=>ue(t,"shift-8","neutral")}}}}import{toState as ya}from"@domphy/core";import{themeColor as Bt,themeSize as ba,themeSpacing as At}from"@domphy/theme";function Um(r={}){var a;let o=ya((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>ba(e,"inherit"),color:e=>Bt(e,"shift-9",o.get(e)),backgroundColor:e=>Bt(e,"inherit",o.get(e)),paddingBlock:At(.5),paddingInline:At(1.5),borderRadius:At(1),outline:e=>`1px solid ${Bt(e,"shift-4",o.get(e))}`}}}import{toState as Zo}from"@domphy/core";import{themeColor as Ft,themeSize as Sa,themeSpacing as Ca}from"@domphy/theme";function ou(r={}){var e,n;let o=Zo((e=r.color)!=null?e:"neutral","color"),a=Zo((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Ca(2),fontSize:t=>Sa(t,"inherit"),color:t=>Ft(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Ft(t,"shift-10",a.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Ft(t,"shift-8","neutral")}}}}import{toState as en}from"@domphy/core";import{themeColor as ve,themeSize as va,themeSpacing as Wt}from"@domphy/theme";function su(r={}){var e,n;let o=en((e=r.color)!=null?e:"primary","color"),a=en((n=r.accentColor)!=null?n:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>va(t,"inherit"),backgroundColor:t=>ve(t),color:t=>ve(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>ve(t,"shift-9",a.get(t))},"&:hover:not([disabled])":{color:t=>ve(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Wt(1),outlineOffset:Wt(1),outline:t=>`${Wt(.5)} solid ${ve(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>ve(t,"shift-8","neutral")}}}}import{toState as Ea}from"@domphy/core";import{themeSpacing as Kt,themeSize as xa,themeColor as tn}from"@domphy/theme";function fu(r={}){var a;let o=Ea((a=r.accentColor)!=null?a:"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=>xa(e,"inherit"),color:e=>tn(e,"shift-9",o.get(e)),backgroundColor:e=>tn(e,"inherit",o.get(e)),height:Kt(6),borderRadius:Kt(1),paddingInline:Kt(1.5)}}}import{toState as ka}from"@domphy/core";import{themeColor as wa,themeSize as Ta}from"@domphy/theme";function xu(r={}){var a;let o=ka((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Ta(e,"inherit"),color:e=>wa(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as Pa}from"@domphy/core";import{themeColor as on,themeDensity as jt,themeSpacing as Yt,themeSize as Da}from"@domphy/theme";function Iu(r={}){var a;let o=Pa((a=r.color)!=null?a:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Da(e,"inherit"),color:e=>on(e,"shift-9",o.get(e)),backgroundColor:e=>on(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>Yt(jt(e)*2),paddingInline:e=>Yt(jt(e)*3),borderRadius:e=>Yt(jt(e)*2)}}}import{toState as nn}from"@domphy/core";import{themeColor as qt,themeSpacing as ht}from"@domphy/theme";function Lu(r={}){var e,n;let o=nn((e=r.color)!=null?e:"neutral","color"),a=nn((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:ht(2),border:0,borderRadius:ht(999),overflow:"hidden",backgroundColor:t=>qt(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>qt(t,"shift-3",o.get(t)),borderRadius:ht(999)},"&::-webkit-progress-value":{backgroundColor:t=>qt(t,"shift-9",a.get(t)),borderRadius:ht(999),transition:"width 220ms ease"}}}}import{toState as rn}from"@domphy/core";import{themeColor as ie,themeSize as Oa,themeSpacing as Ke}from"@domphy/theme";function Ku(r={}){var e,n;let o=rn((e=r.color)!=null?e:"neutral","color"),a=rn((n=r.accentColor)!=null?n:"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=>Oa(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:Ke(6),height:Ke(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 ${ie(t,"shift-4",o.get(t))}`,color:t=>ie(t,"shift-9",o.get(t)),width:Ke(4),height:Ke(4)},"&:hover::before":{backgroundColor:t=>ie(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${ie(t,"shift-6",a.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>ie(t,"shift-8",a.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>ie(t,"shift-7",a.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${Ke(.5)} solid ${ie(t,"shift-6",a.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>ie(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as A,themeDensity as je,themeSize as Ia,themeSpacing as F,themeColorToken as $a}from"@domphy/theme";function qu(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ia(e,"inherit"),lineHeight:"inherit",color:e=>A(e,"shift-9",o),backgroundColor:e=>A(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${A(e,"shift-4",o)}`,borderRadius:e=>F(je(e)*1),paddingBlock:e=>F(je(e)*1),paddingLeft:e=>F(je(e)*3),paddingRight:e=>F(je(e)*5),backgroundImage:e=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${$a(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(n)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${F(2)} center`,backgroundSize:`${F(2.5)} ${F(1.5)}`,"&:not([multiple])":{height:e=>F(6+je(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${F(.5)} solid ${A(e,"shift-5",a)}`},"&:focus-visible":{outline:e=>`${F(.5)} solid ${A(e,"shift-6",a)}`},"& optgroup":{color:e=>A(e,"shift-11",o)},"& option[disabled]":{color:e=>A(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>A(e,"shift-8","neutral"),outline:e=>`1px solid ${A(e,"shift-4","neutral")}`,backgroundColor:e=>A(e,"shift-2","neutral")}}}}import{hashString as za,toState as Va}from"@domphy/core";import{themeColor as an,themeSize as Ma,themeSpacing as ln}from"@domphy/theme";function Ju(r={}){var n;let o=Va((n=r.color)!=null?n:"neutral","color"),a={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=za(JSON.stringify(a));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Ma(t),color:t=>an(t,"shift-9",o.get(t)),height:ln(6),display:"block",borderRadius:ln(1),backgroundColor:t=>an(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:a}}}import{hashString as Ra,toState as _a}from"@domphy/core";import{themeColor as pt,themeSize as La,themeSpacing as Gt}from"@domphy/theme";var cn={to:{transform:"rotate(360deg)"}},sn=Ra(JSON.stringify(cn));function td(r={}){var a;let o=_a((a=r.color)!=null?a:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>La(e),backgroundColor:e=>pt(e),color:e=>pt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Gt(6),height:Gt(6),borderRadius:"50%",border:e=>`${Gt(.5)} solid ${pt(e,"shift-4",o.get(e))}`,borderTopColor:e=>pt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${sn} 0.7s linear infinite`,[`@keyframes ${sn}`]:cn}}}import{toState as Na}from"@domphy/core";import{themeColor as Ha,themeDensity as mn,themeSize as Ba,themeSpacing as un}from"@domphy/theme";function id(r={}){var i;let{color:o="neutral",multiple:a=!1}=r,e=Na((i=r.value)!=null?i:a?[]:null),n={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:r.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:a}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(n)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>un(mn(l)*2),paddingInline:l=>un(mn(l)*2),fontSize:l=>Ba(l,"inherit"),backgroundColor:l=>Ha(l,"inherit",o)}}}import{themeSpacing as ft,themeColor as Ee,themeDensity as dn,themeSize as Aa}from"@domphy/theme";function md(r={}){let{accentColor:o="primary",color:a="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let l=i.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return i.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();i.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Aa(t,"inherit"),height:t=>ft(6+dn(t)*2),paddingInline:t=>ft(dn(t)*3),border:"none",outline:"none",color:t=>Ee(t,"shift-9",a),backgroundColor:t=>Ee(t,"inherit",a),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>Ee(t,"shift-2",a)},"&[aria-selected=true]":{backgroundColor:t=>Ee(t,"shift-6",o),color:t=>Ee(t,"shift-11")},"&:focus-visible":{outline:t=>`${ft(.5)} solid ${Ee(t,"shift-6",o)}`,outlineOffset:`-${ft(.5)}`}}}}import{toState as Ut,merge as hn}from"@domphy/core";import{themeSpacing as Ye,themeColor as Xt,themeDensity as Jt,themeSize as Fa}from"@domphy/theme";function gd(r){let{options:o=[],placement:a="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=r,i=Ut(r.value),l=Ut(n),{show:s,hide:u,anchorPartial:c}=B({open:l,placement:Ut(a),content:r.content}),m={onClick:()=>!t&&u()};hn(r.content,m);let p={div:f=>{let v=i.get(f),y=Array.isArray(v)?v:[v];return o.filter(E=>y.includes(E.value)).map(E=>({span:E.label,$:[rt({color:e,removable:t})],_key:E.value,_onRemove:$=>{let w=i.get(),Ve=(Array.isArray(w)?w:[w]).filter(se=>se!==E.value);t?i.set(Ve):i.set(Ve[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Ye(1),flex:1}},h={_onInsert:f=>{f.tagName!="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>Ye(6+Jt(f)*2),minWidth:Ye(32),outlineOffset:"-1px",outline:f=>`1px solid ${Xt(f,"shift-4","neutral")}`,paddingInline:f=>Ye(Jt(f)*2),borderRadius:f=>Ye(Jt(f)*1),fontSize:f=>Fa(f,"inherit"),color:f=>Xt(f,"shift-9",e),backgroundColor:f=>Xt(f,"inherit",e)}};return hn(c,h),c}import{toState as Wa}from"@domphy/core";import{themeColor as Qt,themeSize as pn,themeSpacing as J}from"@domphy/theme";function xd(r={}){var a;let o=Wa((a=r.accentColor)!=null?a:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>pn(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:J(9),height:J(6),cursor:"pointer",margin:"0",paddingBlock:J(1),"&:checked":{"&::before":{backgroundColor:e=>Qt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${J(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:J(3),height:J(3),borderRadius:J(999),left:J(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>Qt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:J(999),display:"inline-block",fontSize:e=>pn(e,"inherit"),lineHeight:1,backgroundColor:e=>Qt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Zt}from"@domphy/core";import{themeColor as xe,themeSize as Ka,themeSpacing as L}from"@domphy/theme";function Pd(r={}){var t,i;let{checked:o=!1}=r,a=Zt(o),e=Zt((t=r.color)!=null?t:"neutral","color"),n=Zt((i=r.accentColor)!=null?i:"primary","accentColor");return{_onSchedule:l=>{l.tagName!="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>a.get(l),dataTone:"shift-2",onClick:()=>a.set(!a.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Ka(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${xe(l,"shift-3",e.get(l))}`,minWidth:L(12),minHeight:L(6),borderRadius:L(999),paddingLeft:L(7),paddingRight:L(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>xe(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:L(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:L(5),height:L(5),borderRadius:L(999),color:l=>xe(l,"shift-9"),backgroundColor:l=>xe(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>xe(l,"increase-3",n.get(l)),outline:"none",color:l=>xe(l,"decrease-2"),paddingLeft:L(2),paddingRight:L(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${L(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ja}from"@domphy/core";import{themeColor as Ya,themeSize as qa}from"@domphy/theme";function Md(r={}){var a;let o=ja((a=r.color)!=null?a:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>qa(e,"inherit"),color:e=>Ya(e,"shift-9",o.get(e))}}}import{toState as Ga}from"@domphy/core";import{themeColor as fn,themeSize as Ua}from"@domphy/theme";function Ad(r={}){var a;let o=Ga((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Ua(e,"inherit"),fontWeight:700,color:e=>fn(e,"shift-11",o.get(e)),backgroundColor:e=>fn(e)}}}import{toState as Xa}from"@domphy/core";import{themeColor as Ja,themeSize as Qa}from"@domphy/theme";function Gd(r={}){var a;let o=Xa((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Qa(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Ja(e,"shift-9",o.get(e))}}}import{toState as Za}from"@domphy/core";import{themeColor as ei,themeSize as ti}from"@domphy/theme";function th(r={}){var a;let o=Za((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>ti(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ei(e,"shift-9",o.get(e))}}}import{toState as oi}from"@domphy/core";import{themeColor as W,themeDensity as ke,themeSpacing as we,themeSize as gn}from"@domphy/theme";function ah(r={}){var a;let o=oi((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>gn(e,"inherit"),color:e=>W(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>we(ke(e)*3),paddingBlock:e=>we(ke(e)*1),color:e=>W(e,"shift-10",o.get(e)),backgroundColor:e=>W(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>we(ke(e)*3),paddingBlock:e=>we(ke(e)*1),color:e=>W(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${W(e,"shift-3",o.get(e))}`,fontSize:e=>gn(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>we(ke(e)*3),paddingBlock:e=>we(ke(e)*1),color:e=>W(e,"shift-10",o.get(e)),backgroundColor:e=>W(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${W(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>W(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>W(e,"shift-2")+"!important"}}}}import{toState as yn}from"@domphy/core";import{themeColor as K,themeDensity as eo,themeSpacing as Te,themeSize as ni}from"@domphy/theme";function dh(r={}){var n,t;let o=yn((n=r.color)!=null?n:"neutral","color"),a=yn((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:i=>{i.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let l=i.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>Te(eo(i)*2),paddingBlock:i=>Te(eo(i)*1.5),border:"none",borderRadius:i=>Te(eo(i)*1.5),fontSize:i=>ni(i,"inherit"),color:i=>K(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${K(i,"shift-4",o.get(i))}`,backgroundColor:i=>K(i,"inherit",o.get(i)),"&::placeholder":{color:i=>K(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${Te(.5)} solid ${K(i,"shift-5",a.get(i))}`},"&:focus-visible":{outline:i=>`${Te(.5)} solid ${K(i,"shift-6",a.get(i))}`},"&:invalid":{outline:i=>`${Te(.5)} solid ${K(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>K(i,"shift-8","neutral"),outline:i=>`1px solid ${K(i,"shift-4","neutral")}`,backgroundColor:i=>K(i,"shift-2","neutral")}}}}import{toState as ri}from"@domphy/core";import{themeColor as bn,themeSize as ai,themeSpacing as ii}from"@domphy/theme";function Sh(r={}){var a;let o=ri((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ai(e,"inherit"),backgroundColor:e=>bn(e),color:e=>bn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ii(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as li}from"@domphy/core";import{themeColor as Sn,themeSize as si,themeSpacing as ci}from"@domphy/theme";function Th(r={}){var a;let o=li((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>si(e,"inherit"),backgroundColor:e=>Sn(e),color:e=>Sn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ci(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as mi}from"@domphy/core";import{themeColor as Pe,themeDensity as qe,themeSize as ui,themeSpacing as De}from"@domphy/theme";function di(r,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let a=[1];r>3&&a.push("...");let e=Math.max(2,r-1),n=Math.min(o-1,r+1);for(let t=e;t<=n;t++)a.push(t);return r<o-2&&a.push("..."),a.push(o),a}function Ih(r){var l;let{total:o,color:a="neutral",accentColor:e="primary"}=r,n=mi((l=r.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>De(6+qe(s)*2),height:s=>De(6+qe(s)*2),paddingInline:s=>De(qe(s)*2),borderRadius:s=>De(qe(s)*1),border:"none",cursor:"pointer",fontSize:s=>ui(s,"inherit"),backgroundColor:"transparent",color:s=>Pe(s,"shift-9",a),"&:hover:not([disabled])":{backgroundColor:s=>Pe(s,"shift-2",a)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=bo(Je({},t),{backgroundColor:s=>Pe(s,"shift-6",e),color:s=>Pe(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>Pe(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=n.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&n.set(m-1),style:t});for(let h of di(m,o))if(h==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>De(qe(f)*2),color:f=>Pe(f,"shift-7",a)}});else{let f=h===m;p.push({button:String(h),type:"button",ariaLabel:`Page ${h}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>n.set(h),style:f?i:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&n.set(m+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:De(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as hi}from"@domphy/core";import{themeColor as gt,themeSize as pi,themeSpacing as fi}from"@domphy/theme";function _h(r={}){var a;let o=hi((a=r.color)!=null?a:"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:fi(2),fontSize:e=>pi(e,"inherit"),backgroundColor:e=>gt(e),color:e=>gt(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>gt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>gt(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as gi}from"@domphy/core";import{themeColor as yt,themeDensity as yi,themeSize as bi,themeSpacing as Ge}from"@domphy/theme";var Cn={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Si={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},to=r=>r==="left"||r==="right";function Bh(r={}){let{color:o="neutral",open:a=!1,placement:e="right",size:n}=r,t=gi(a),i=to(e)?Ge(80):Ge(64),l=n!=null?n:i;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=p=>{p?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=Cn[e]};c(t.get());let m=t.addListener(c);s.addHook("Remove",()=>{m(),document.body.style.overflow=""})},style:{transform:Cn[e],transition:"transform 0.25s ease",fontSize:s=>bi(s,"inherit"),color:s=>yt(s,"shift-10",o),backgroundColor:s=>yt(s,"inherit",o),border:"none",padding:s=>Ge(yi(s)*3),margin:Si[e],width:to(e)?l:"100dvw",height:to(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Ge(4)} ${Ge(12)} ${yt(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>yt(s,"shift-2","neutral"),opacity:.75}}}}import{toState as vn,merge as Ci}from"@domphy/core";function Gh(r){var p;let{open:o=!1,placement:a="bottom",openOn:e="click"}=r,n=null,t=vn(o),i=vn(a),{show:l,hide:s,anchorPartial:u}=B({open:t,placement:i,content:r.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:h=>{let f=h.attributes.get("id");n=f||h.nodeId,!f&&h.attributes.set("id",n)}};return(p=r.content).$||(p.$=[]),r.content.$.push(c),Ci(u,{ariaHaspopup:"dialog",ariaExpanded:h=>t.get(h),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(h,f)=>{let v=h.relatedTarget,y=f.getRoot().domElement,T=n?y.querySelector(`#${CSS.escape(n)}`):null;v&&(T!=null&&T.contains(v))||s()},_onMount:h=>n&&h.attributes.set("ariaControls",n)}),u}import{toState as vi}from"@domphy/core";import{themeColor as oo,themeDensity as no,themeSize as Ei,themeSpacing as le}from"@domphy/theme";function Qh(r={}){let{position:o="top-center",color:a="neutral"}=r,e=vi(!1),n=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:n?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:le(4),zIndex:30,padding:le(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:le(32),pointerEvents:"auto",paddingBlock:s=>le(no(s)*2),paddingInline:s=>le(no(s)*4),borderRadius:s=>le(no(s)*2),fontSize:s=>Ei(s,"inherit"),color:s=>oo(s,"shift-9",a),backgroundColor:s=>oo(s,"inherit",a),boxShadow:s=>`0 ${le(2)} ${le(9)} ${oo(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":n?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as xi,toState as En}from"@domphy/core";import{themeSpacing as ro,themeColor as xn,themeDensity as ao,themeSize as ki}from"@domphy/theme";function ip(r={}){let{open:o=!1,placement:a="top",content:e="Tooltip Content"}=r,n=En(a),t=En(e),i=null,l={span:h=>t.get(h)},{show:s,hide:u,anchorPartial:c}=B({open:o,placement:n,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:h=>{let f=h.attributes.get("id");i=f||h.nodeId,!f&&h.attributes.set("id",i)},style:{paddingBlock:h=>ro(ao(h)*1),paddingInline:h=>ro(ao(h)*3),borderRadius:h=>ro(ao(h)*1),color:h=>xn(h,"shift-9"),backgroundColor:h=>xn(h),fontSize:h=>ki(h,"inherit")},$:[$o({placement:n,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),xi(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:h=>h.key==="Escape"&&u(),_onMount:h=>i&&h.attributes.set("ariaDescribedby",i)}),c}import{ElementNode as kn}from"@domphy/core";function wn(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function mp(r={}){let{duration:o=300,delay:a=0}=r,e=new Map;return{_onBeforeUpdate:n=>{e=new Map,n.children.items.forEach((t,i)=>{if(!(t instanceof kn))return;let l=t.domElement;l&&e.set(wn(t,i),l.getBoundingClientRect())})},_onUpdate:n=>{n.children.items.forEach((t,i)=>{if(!(t instanceof kn))return;let l=t.domElement;if(!l)return;let s=wn(t,i),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,p=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(p)<.5)return;let h=l.style.transition,f=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${a}ms`,l.style.transform="translate(0px, 0px)"});let v=()=>{l.style.transition=h,l.style.transform=f,l.removeEventListener("transitionend",y)},y=T=>{T.propertyName==="transform"&&v()};l.addEventListener("transitionend",y),setTimeout(v,o+a+34)}),e.clear()}}}import{merge as wi}from"@domphy/core";import{toState as Ti}from"@domphy/core";function gp(r={}){return{role:"tablist",_onSchedule:(a,e)=>{let n={_context:{tabs:{activeKey:Ti(r.activeKey||0)}}};wi(e,n)}}}import{themeSpacing as Oe,themeColor as Ie,themeDensity as Tn,themeSize as Pi}from"@domphy/theme";function Cp(r={}){let{accentColor:o="primary",color:a="neutral"}=r;return{role:"tab",_onInsert:n=>{var u,c;n.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=n.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let i=(c=(u=n.parent)==null?void 0:u.children.items)!=null?c:[];i=i.filter(m=>m.type=="ElementNode"&&m.attributes.get("role")=="tab");let l=n.key!==null&&n.key!==void 0?n.key:i.findIndex(m=>m==n),s={id:"tab"+n.parent.nodeId+l,ariaControls:"tabpanel"+n.parent.nodeId+l,ariaSelected:m=>t.activeKey.get(m)==l,onClick:()=>t.activeKey.set(l),onKeyDown:m=>{var T,E,$,w;let p=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;m.preventDefault();let h=((E=(T=n.parent)==null?void 0:T.children.items)!=null?E:[]).filter(I=>I.type==="ElementNode"&&I.attributes.get("role")==="tab"),f=h.findIndex(I=>I===n),v=f;p==="ArrowRight"?v=(f+1)%h.length:p==="ArrowLeft"?v=(f-1+h.length)%h.length:p==="Home"?v=0:p==="End"&&(v=h.length-1);let y=h[v];t.activeKey.set(($=y.key)!=null?$:v),(w=y.domElement)==null||w.focus()}};n.merge(s)},style:{cursor:"pointer",fontSize:n=>Pi(n,"inherit"),height:n=>Oe(6+Tn(n)*2),paddingInline:n=>Oe(Tn(n)*4),border:"none",outline:"none",color:n=>Ie(n,"shift-9"),backgroundColor:n=>Ie(n,"inherit"),boxShadow:n=>`inset 0 -${Oe(.5)} 0 0 ${Ie(n,"shift-1",a)}`,"&:hover:not([disabled])":{boxShadow:n=>`inset 0 -${Oe(.5)} 0 0 ${Ie(n,"shift-2",a)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:n=>`inset 0 -${Oe(.5)} 0 0 ${Ie(n,"shift-6",o)}`},"&:focus-visible":{boxShadow:n=>`inset 0 -${Oe(.5)} 0 0 ${Ie(n,"shift-6",o)}`}}}}import{themeSpacing as Pn,themeDensity as Dn}from"@domphy/theme";function kp(){return{role:"tabpanel",style:{paddingBlock:o=>Pn(Dn(o)*2),paddingInline:o=>Pn(Dn(o)*2)},_onInsert:o=>{var i,l;let a=o.getContext("tabs");if(!a){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(l=(i=o.parent)==null?void 0:i.children.items)!=null?l:[];e=e.filter(s=>s.type=="ElementNode"&&s.attributes.get("role")=="tabpanel");let n=o.key!==null&&o.key!==void 0?o.key:e.findIndex(s=>s==o),t={id:"tabpanel"+o.parent.nodeId+n,ariaLabelledby:"tab"+o.parent.nodeId+n,hidden:s=>a.activeKey.get(s)!=n};o.merge(t)}}}import{merge as Di}from"@domphy/core";import{toState as Oi}from"@domphy/core";import{themeColor as Ii,themeDensity as On,themeSize as $i,themeSpacing as In}from"@domphy/theme";function $p(r={}){let{color:o="neutral",selectable:a=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(n,t)=>{var l;let i={_context:{menu:{activeKey:Oi((l=r.activeKey)!=null?l:null),selectable:a}}};Di(t,i)},style:{display:"flex",flexDirection:"column",paddingBlock:n=>In(On(n)*2),paddingInline:n=>In(On(n)*2),fontSize:n=>$i(n,"inherit"),backgroundColor:n=>Ii(n,"inherit",o)}}}import{themeSpacing as Ue,themeColor as $e,themeDensity as $n,themeSize as zi}from"@domphy/theme";function Rp(r={}){let{accentColor:o="primary",color:a="neutral"}=r;return{role:"menuitem",_onInsert:n=>{var s,u;n.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=n.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let i=(u=(s=n.parent)==null?void 0:s.children.items)!=null?u:[];i=i.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=n.key!==null&&n.key!==void 0?n.key:i.findIndex(c=>c==n);t.selectable&&(n.attributes.set("ariaCurrent",c=>t.activeKey.get(c)==l||void 0),n.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(n,t)=>{var c,m,p,h;let i=n.key;if(i==="Enter"||i===" "){n.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(i))return;n.preventDefault();let l=((p=(m=t.parent)==null?void 0:m.children.items)!=null?p:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem"),s=l.findIndex(f=>f===t),u=s;i==="ArrowDown"?u=(s+1)%l.length:i==="ArrowUp"?u=(s-1+l.length)%l.length:i==="Home"?u=0:i==="End"&&(u=l.length-1),(h=l[u].domElement)==null||h.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:n=>Ue(2),width:"100%",fontSize:n=>zi(n,"inherit"),height:n=>Ue(6+$n(n)*2),paddingInline:n=>Ue($n(n)*3),border:"none",outline:"none",color:n=>$e(n,"shift-9"),backgroundColor:n=>$e(n,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:n=>$e(n,"shift-2")},"&[aria-current=true]":{backgroundColor:n=>$e(n,"shift-3",o),color:n=>$e(n,"shift-10")},"&:focus-visible":{outline:n=>`${Ue(.5)} solid ${$e(n,"shift-6",o)}`,outlineOffset:`-${Ue(.5)}`}}}}var zn=r=>!!r&&typeof r.get=="function"&&r._isState===!0,ze=r=>{let o={},a=[];for(let e in r){let n=r[e];e==="x"?a.push(`translateX(${typeof n=="number"?`${n}px`:n})`):e==="y"?a.push(`translateY(${typeof n=="number"?`${n}px`:n})`):e==="scale"?a.push(`scale(${n})`):e==="rotate"?a.push(`rotate(${typeof n=="number"?`${n}deg`:n})`):o[e]=n}return a.length&&(o.transform=a.join(" ")),o};function Lp(r={}){var i,l,s,u;let{initial:o,animate:a,exit:e,transition:n={}}=r,t={duration:(i=n.duration)!=null?i:300,delay:(l=n.delay)!=null?l:0,easing:(s=n.easing)!=null?s:"ease",iterations:(u=n.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let p=zn(a)?a.get():a;if(p?m.animate(o?[ze(o),ze(p)]:[ze(p)],t):o&&Object.assign(m.style,ze(o)),zn(a)){let h=a.addListener(f=>{m.animate([ze(f)],t)});c.setMetadata("motionRelease",h)}},_onBeforeRemove:(c,m)=>{let p=c.domElement;if(!p||!e||typeof p.animate!="function")return m();p.animate([ze(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}export{Hi as abbreviation,Sl as alert,kl as avatar,Ol as badge,ps as blockquote,Ml as breadcrumb,Hl as breadcrumbEllipsis,bs as button,Pd as buttonSwitch,Ki as card,zs as code,os as combobox,el as command,ol as commandItem,tl as commandSearch,im as datePicker,Ys as descriptionList,Hs as details,Js as dialog,_h as divider,Bh as drawer,rc as emphasis,uc as figure,gc as formGroup,xc as heading,Ic as horizontalRule,Fc as icon,Lc as image,ws as inputCheckbox,Gc as inputColor,tm as inputDateTime,pm as inputFile,Fm as inputNumber,pl as inputOTP,Ku as inputRadio,Rm as inputRange,vm as inputSearch,xd as inputSwitch,Dm as inputText,Um as keyboard,ou as label,su as link,fu as mark,$p as menu,Rp as menuItem,Lp as motion,Th as orderedList,Ih as pagination,xu as paragraph,Gh as popover,$o as popoverArrow,Iu as preformated,Lu as progress,qu as select,gd as selectBox,md as selectItem,id as selectList,Ju as skeleton,Md as small,td as spinner,Gi as splitter,Xi as splitterHandle,Ui as splitterPanel,Ad as strong,Gd as subscript,th as superscript,Cp as tab,kp as tabPanel,ah as table,gp as tabs,rt as tag,dh as textarea,Qh as toast,il as toggle,ul as toggleGroup,ip as tooltip,mp as transitionGroup,Sh as unorderedList};
|
|
1
|
+
var Gn=Object.defineProperty,Un=Object.defineProperties;var Xn=Object.getOwnPropertyDescriptors;var go=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable;var yo=(r,o,a)=>o in r?Gn(r,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[o]=a,Je=(r,o)=>{for(var a in o||(o={}))Jn.call(o,a)&&yo(r,a,o[a]);if(go)for(var a of go(o))Qn.call(o,a)&&yo(r,a,o[a]);return r},bo=(r,o)=>Un(r,Xn(o));import{toState as So}from"@domphy/core";import{themeColor as Le,themeSize as Zn,themeSpacing as er}from"@domphy/theme";function Ri(r={}){var e,n;let o=So((e=r.color)!=null?e:"neutral","color"),a=So((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Zn(t),backgroundColor:t=>Le(t),color:t=>Le(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>Le(t,"shift-7",o.get(t)),textUnderlineOffset:er(.72),cursor:"help","&:hover":{color:t=>Le(t,"shift-11",a.get(t)),textDecorationColor:t=>Le(t,"shift-9",a.get(t))}}}}import{toState as tr}from"@domphy/core";import{themeColor as xt,themeDensity as Co,themeSize as or,themeSpacing as Qe}from"@domphy/theme";function Bi(r={}){var a;let o=tr((a=r.color)!=null?a:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:Qe(3),paddingBlock:e=>Qe(Co(e)*2),paddingInline:e=>Qe(Co(e)*4),boxShadow:e=>`inset ${Qe(1)} 0 0 0 ${xt(e,"shift-8",o.get(e))}`,backgroundColor:e=>xt(e,"inherit",o.get(e)),color:e=>xt(e,"shift-10",o.get(e)),fontSize:e=>or(e,"inherit")}}}import{toState as nr}from"@domphy/core";import{themeColor as vo,themeSize as rr,themeSpacing as Eo}from"@domphy/theme";function Ki(r={}){var a;let o=nr((a=r.color)!=null?a:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:Eo(9),height:Eo(9),fontSize:e=>rr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>vo(e,"inherit",o.get(e)),color:e=>vo(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as xo}from"@domphy/core";import{themeColor as ko,themeSize as ar,themeSpacing as kt}from"@domphy/theme";function Gi(r={}){var n;let{label:o=999}=r,a=xo(o),e=xo((n=r.color)!=null?n:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${a.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:kt(1),minWidth:kt(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>ar(t,"decrease-1"),borderRadius:kt(999),backgroundColor:t=>ko(t,"shift-9",e.get(t)),color:t=>ko(t,"shift-0",e.get(t))}}}}import{toState as ir}from"@domphy/core";import{themeColor as wo,themeDensity as To,themeSize as lr,themeSpacing as wt}from"@domphy/theme";function Qi(r={}){var a;let o=ir((a=r.color)!=null?a:"inherit","color");return{_onInsert:e=>{e.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>lr(e,"inherit"),backgroundColor:e=>wo(e,"inherit",o.get(e)),boxShadow:e=>`inset ${wt(1)} 0 0 0 ${wo(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>wt(To(e)*2),paddingInline:e=>wt(To(e)*4),margin:0}}}import{toState as sr}from"@domphy/core";import{themeColor as Me,themeSize as cr,themeSpacing as Po}from"@domphy/theme";function ol(r={}){var e;let{separator:o="/"}=r,a=sr((e=r.color)!=null?e:"neutral","color");return{_onInsert:n=>{n.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:n=>cr(n,"inherit"),gap:Po(1),color:n=>Me(n,"shift-9",a.get(n)),backgroundColor:n=>Me(n,"inherit",a.get(n)),"& > *":{display:"inline-flex",alignItems:"center",color:n=>Me(n,"shift-8",a.get(n))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:n=>Me(n,"shift-4",a.get(n)),paddingInlineStart:Po(1)},"& > [aria-current=page]":{color:n=>Me(n,"shift-10",a.get(n)),pointerEvents:"none"}}}}import{toState as mr}from"@domphy/core";import{themeColor as Ze,themeSize as ur,themeSpacing as et}from"@domphy/theme";function il(r={}){var a;let o=mr((a=r.color)!=null?a:"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=>ur(e,"inherit"),paddingInline:et(1),border:"none",background:"none",cursor:"pointer",color:e=>Ze(e,"shift-8",o.get(e)),borderRadius:et(1),"&:hover":{color:e=>Ze(e,"shift-10",o.get(e)),backgroundColor:e=>Ze(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${et(.5)} solid ${Ze(e,"shift-6",o.get(e))}`,outlineOffset:et(.5)}}}}import{toState as dr}from"@domphy/core";import{themeColor as j,themeDensity as tt,themeSize as pr,themeSpacing as Re}from"@domphy/theme";function ml(r={}){var a;let o=dr((a=r.color)!=null?a:"primary","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>pr(e,"inherit"),paddingBlock:e=>Re(tt(e)*1),paddingInline:e=>Re(tt(e)*3),borderRadius:e=>Re(tt(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>Re(tt(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${j(e,"shift-4",o.get(e))}`,color:e=>j(e,"shift-9",o.get(e)),backgroundColor:e=>j(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>j(e,"shift-10",o.get(e)),backgroundColor:e=>j(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${Re(.5)} ${j(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>j(e,"shift-2","neutral"),outline:e=>`1px solid ${j(e,"shift-4","neutral")}`,color:e=>j(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Tt}from"@domphy/core";import{themeColor as he,themeSize as hr,themeSpacing as R}from"@domphy/theme";function hl(r={}){var t,i;let{checked:o=!1}=r,a=Tt(o),e=Tt((t=r.color)!=null?t:"neutral","color"),n=Tt((i=r.accentColor)!=null?i:"primary","accentColor");return{_onSchedule:l=>{l.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>a.get(l),dataTone:"shift-2",onClick:()=>a.set(!a.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>hr(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${he(l,"shift-3",e.get(l))}`,minWidth:R(12),minHeight:R(6),borderRadius:R(999),paddingLeft:R(7),paddingRight:R(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>he(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:R(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:R(5),height:R(5),borderRadius:R(999),color:l=>he(l,"shift-9"),backgroundColor:l=>he(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>he(l,"increase-3",n.get(l)),outline:"none",color:l=>he(l,"decrease-2"),paddingLeft:R(2),paddingRight:R(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${R(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as fr}from"@domphy/core";import{themeColor as fe,themeDensity as Z,themeSpacing as Y}from"@domphy/theme";function bl(r={}){var a;let o=fr((a=r.color)!=null?a:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>Y(Z(e)*2),backgroundColor:e=>fe(e,"inherit",o.get(e)),color:e=>fe(e,"shift-10",o.get(e)),outline:e=>`1px solid ${fe(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=>Y(Z(e)*2),paddingInline:e=>Y(Z(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>Y(Z(e)*4),color:e=>fe(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>Y(Z(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>Y(Z(e)*4),color:e=>fe(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:Y(2),paddingBlock:e=>Y(Z(e)*2),paddingInline:e=>Y(Z(e)*4),borderTop:e=>`1px solid ${fe(e,"shift-3",o.get(e))}`}}}}import{toState as gr}from"@domphy/core";import{themeColor as Do,themeSize as yr,themeSpacing as Pt}from"@domphy/theme";function El(r={}){var a;let o=gr((a=r.color)!=null?a:"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=>yr(e,"inherit"),color:e=>Do(e,"shift-9",o.get(e)),backgroundColor:e=>Do(e,"inherit",o.get(e)),height:Pt(6),paddingInline:Pt(1.5),borderRadius:Pt(1)}}}import{merge as Dt,toState as Ot}from"@domphy/core";import{themeColor as _e,themeDensity as It,themeSize as Oo,themeSpacing as ce}from"@domphy/theme";import{merge as br,toState as Sr}from"@domphy/core";import{autoUpdate as Cr,computePosition as vr,flip as Er,offset as xr,shift as kr}from"@domphy/floating";function B(r){let{open:o=!1,placement:a}=r,e=null,n=null,t=null,i=null,l=null,s=null,u=!1,c=Sr(o),m=()=>{u||!s||(u=!0,l=s.children.insert(r.content))},h=()=>{m(),t&&i&&(n&&n(),n=Cr(t,i,()=>{vr(t,i,{placement:a.get(),middleware:[xr(12),Er(),kr()],strategy:"fixed"}).then(({x:E,y:$,placement:w})=>{Object.assign(i.style,{left:`${E}px`,top:`${$}px`}),a.set(w)})}),c.set(!0))},p=()=>{n&&n(),n=null,c.set(!1)},f=()=>{e&&clearTimeout(e),e=setTimeout(h,100)},v=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},y={style:{position:"fixed",pointerEvents:"auto",visibility:E=>c.get(E)?"visible":"hidden"},_onMount:E=>i=E.domElement,_portal:E=>{let $=E.domElement.querySelector("#domphy-floating");if(!$){let w={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};$=E.children.insert(w).domElement}return $}};return br(r.content,y),{show:f,hide:v,anchorPartial:{onKeyDown:E=>E.key==="Escape"&&v(),_onMount:E=>{s=E.getRoot(),t=E.domElement;let $=w=>{if(!c.get()||!t||!i)return;let I=w.target;!t.contains(I)&&!i.contains(I)&&v()};E.getRoot().domElement.addEventListener("click",$),E.addHook("BeforeRemove",()=>{e&&clearTimeout(e),n&&(n(),n=null),l&&l.remove(),E.getRoot().domElement.removeEventListener("click",$)})}}}}import{toState as wr}from"@domphy/core";import{themeColor as ot,themeSize as Tr,themeSpacing as q}from"@domphy/theme";var Pr='<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 nt(r={}){var e;let{removable:o=!1}=r,a=wr((e=r.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:n=>{let t={span:Pr,onClick:i=>{i.stopPropagation(),n.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:q(1),width:q(4),height:q(4),flexShrink:0,"&:hover":{backgroundColor:i=>ot(i,"shift-4",a.get(i))}}};o&&n.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:q(6),paddingBlock:"0px",borderRadius:q(1),paddingInlineStart:q(2),paddingInlineEnd:o?q(1):q(2),gap:q(2),fontSize:n=>Tr(n,"inherit"),backgroundColor:n=>ot(n,"inherit",a.get(n)),color:n=>ot(n,"shift-9",a.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${ot(n,"shift-4",a.get(n))}`}}}function Ll(r){let{options:o=[],placement:a="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=r,i=Ot(r.value),l=Ot(n),{show:s,hide:u,anchorPartial:c}=B({open:l,placement:Ot(a),content:r.content}),m={onClick:()=>!t&&u()};Dt(r.content,m);let h={border:"none",outline:"none",padding:0,margin:0,flex:1,height:ce(6),marginInlineStart:ce(2),fontSize:y=>Oo(y,"inherit"),color:y=>_e(y,"shift-9",e),backgroundColor:y=>_e(y,"inherit",e)},p;r.input?(Dt(r.input,{onFocus:()=>s(),style:h,_key:"combobox-input"}),p=r.input):p={input:null,onFocus:()=>s(),value:y=>(i.get(y),""),style:h,_key:"combobox-input"};let f={div:y=>{let T=i.get(y),E=Array.isArray(T)?T:[T],w=o.filter(I=>E.includes(I.value)).map(I=>({span:I.label,$:[nt({color:e,removable:!0})],_key:I.value,_onRemove:Ve=>{let se=i.get(),de=(Array.isArray(se)?se:[se]).filter(bt=>bt!==I.value);t?i.set(de):i.set(de[0])}}));return w.push(p),w},style:{display:"flex",flexWrap:"wrap",gap:ce(1)}},v={_onInsert:y=>{y.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:y=>y.children.insert(f),style:{minWidth:ce(32),outlineOffset:"-1px",outline:y=>`1px solid ${_e(y,"shift-4","neutral")}`,paddingBlock:y=>ce(It(y)*1),paddingInline:y=>ce(It(y)*1),borderRadius:y=>ce(It(y)*1),fontSize:y=>Oo(y,"inherit"),color:y=>_e(y,"shift-9",e),backgroundColor:y=>_e(y,"inherit",e)}};return Dt(c,v),c}import{merge as Dr,toState as Or}from"@domphy/core";import{themeColor as G,themeDensity as rt,themeSize as Io,themeSpacing as ge}from"@domphy/theme";function Nl(){return{_onSchedule:(r,o)=>{Dr(o,{_context:{command:{query:Or("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Hl(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let n=e.getContext("command");if(!n){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,i=()=>n.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>Io(e,"inherit"),paddingInline:e=>ge(rt(e)*3),paddingBlock:e=>ge(rt(e)*2),border:"none",borderBottom:e=>`1px solid ${G(e,"shift-3",o)}`,outline:"none",color:e=>G(e,"shift-10",o),backgroundColor:e=>G(e,"inherit",o),"&::placeholder":{color:e=>G(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>G(e,"shift-6",a)}}}}function Bl(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{role:"option",_onMount:e=>{var s,u;let n=e.getContext("command");if(!n){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=n.query.addListener(c=>{t.hidden=c.length>0&&!i.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Io(e,"inherit"),height:e=>ge(6+rt(e)*2),paddingInline:e=>ge(rt(e)*3),border:"none",outline:"none",color:e=>G(e,"shift-9",o),backgroundColor:e=>G(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>G(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${ge(.5)} solid ${G(e,"shift-6",a)}`,outlineOffset:`-${ge(.5)}`}}}}import{merge as Ir,toState as U}from"@domphy/core";import{themeColor as P,themeSize as ye,themeSpacing as D}from"@domphy/theme";var O=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()),me=(r,o)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+o),$t=(r,o)=>new Date(r.getFullYear(),r.getMonth()+o,r.getDate()),Ne=(r,o)=>!!r&&!!o&&r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate(),zt=r=>`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,Vt=(r,o)=>me(r,-((r.getDay()-o+7)%7));function $r(r){var o,a;try{let e=new Intl.Locale(r),n=(a=(o=e.getWeekInfo)==null?void 0:o.call(e))!=null?a:e.weekInfo;if(n!=null&&n.firstDay)return n.firstDay%7}catch(e){}return 0}function jl(r={}){var uo,po,ho,fo;let{mode:o="single",time:a=!1,min:e,max:n,disabledDate:t,locale:i=typeof navigator!="undefined"?navigator.language:"en-US",format:l,onChange:s}=r,u=(uo=r.weekStartsOn)!=null?uo:$r(i),c=U((po=r.accentColor)!=null?po:"primary","accentColor"),m=U((ho=r.placement)!=null?ho:"bottom-start"),h=U((fo=r.value)!=null?fo:o==="range"?[null,null]:null);s&&h.addListener(d=>s(d));let p=(()=>{let d=h.get(),g=o==="range"?d==null?void 0:d[0]:d;return g instanceof Date?g:new Date})(),f=U(p.getFullYear(),"viewYear"),v=U(p.getMonth(),"viewMonth"),y=U(O(p),"focused"),T=U(null,"hovered"),E=U(p.getHours(),"hour"),$=U(p.getMinutes(),"minute"),w=null,I=new Intl.DateTimeFormat(i,Je({dateStyle:"medium"},a?{timeStyle:"short"}:{})),Ve=new Intl.DateTimeFormat(i,{month:"long",year:"numeric"}),se=new Intl.DateTimeFormat(i,{weekday:"short"}),io=new Intl.DateTimeFormat(i,{dateStyle:"full"}),de=d=>d?I.format(d):"",bt=d=>{if(l)return l(d);if(o==="range"){let[g,b]=d!=null?d:[null,null];return g?`${de(g)} \u2013 ${de(b)}`:""}return de(d)},Vn=Array.from({length:7},(d,g)=>se.format(new Date(2023,0,1+(g+u)%7))),lo=d=>!!e&&O(d)<O(e)||!!n&&O(d)>O(n)||!!t&&t(d),Q=d=>{if(!a)return O(d);let g=O(d);return g.setHours(E.get(),$.get(),0,0),g},so=d=>{var S;if(lo(d))return;if(o==="single"){h.set(Q(d)),a||vt();return}let[g,b]=(S=h.get())!=null?S:[null,null];!g||g&&b?h.set([Q(d),null]):O(d)<O(g)?(h.set([Q(d),Q(g)]),a||vt()):(h.set([g,Q(d)]),a||vt())},Ln=()=>{var d;if(a)if(o==="single"){let g=h.get();g&&h.set(Q(g))}else{let[g,b]=(d=h.get())!=null?d:[null,null];h.set([g&&Q(g),b&&Q(b)])}},Mn=(d,g)=>{var pe;if(o!=="range")return!1;let[b,S]=(pe=h.get(g))!=null?pe:[null,null],x=S!=null?S:T.get(g);if(!b||!x)return!1;let C=O(b)<=O(x)?b:x,M=O(b)<=O(x)?x:b,V=O(d);return V>=O(C)&&V<=O(M)},Rn=(d,g)=>{let b=h.get(g);if(o==="range"){let[S,x]=b!=null?b:[null,null];return Ne(d,S)||Ne(d,x)}return Ne(d,b)},Xe=d=>{f.set(d.getFullYear()),v.set(d.getMonth())},co=d=>{let g=$t(new Date(f.get(),v.get(),1),d);Xe(g)},mo=d=>f.set(f.get()+d),St=()=>{setTimeout(()=>{var d;(d=w==null?void 0:w.querySelector(`[data-date="${zt(y.get())}"]`))==null||d.focus()},0)},_n=Fn(),{show:Nn,hide:Hn,anchorPartial:Ct}=B({open:!1,placement:m,content:_n});function vt(){Hn()}Ct.onClick=()=>{};let Bn={type:"text",readonly:!0,value:d=>bt(h.get(d)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:()=>{Et()},onFocus:()=>{Et()},onKeyDown:d=>{let g=d.key;(g==="ArrowDown"||g==="Enter")&&(d.preventDefault(),Et())}};function Et(){var g;let d=(g=An())!=null?g:new Date;y.set(O(d)),Xe(d),Nn(),St()}function An(){var g;let d=h.get();return o==="range"?(g=d==null?void 0:d[0])!=null?g:null:d!=null?d:null}return Ir(Ct,Bn),Ct;function Fn(){let d=(C,M,V)=>({button:C,type:"button",ariaLabel:M,onClick:V,style:zr()}),g={div:[d("\xAB","Previous year",()=>mo(-1)),d("\u2039","Previous month",()=>co(-1)),{div:C=>Ve.format(new Date(f.get(C),v.get(C),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:C=>ye(C)}},d("\u203A","Next month",()=>co(1)),d("\xBB","Next year",()=>mo(1))],style:{display:"flex",alignItems:"center",gap:D(1),marginBottom:D(2)}},b={div:Vn.map((C,M)=>({div:C,style:{textAlign:"center",fontSize:V=>ye(V,"decrease-1"),fontWeight:"600",color:V=>P(V,"shift-7"),paddingBlock:D(1)},_key:M})),role:"row",style:$o()},S={div:C=>Wn(C),role:"grid",ariaLabel:"Calendar",onKeyDown:qn,onMouseLeave:()=>o==="range"&&T.set(null),style:{display:"flex",flexDirection:"column",gap:D(.5)}},x=[g,b,S];return a&&x.push(jn()),x.push(Yn()),{div:x,role:"dialog",ariaModal:"false",_onMount:C=>{w=C.domElement},style:{minWidth:D(70),padding:D(3),borderRadius:D(2),backgroundColor:C=>P(C,"base"),color:C=>P(C,"shift-10"),border:C=>`1px solid ${P(C,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Wn(d){let g=new Date(f.get(d),v.get(d),1),b=v.get(d),S=Vt(g,u),x=[];for(let C=0;C<6;C++){let M=[];for(let V=0;V<7;V++){let pe=me(S,C*7+V);M.push(Kn(pe,b,d))}x.push({div:M,role:"row",style:$o(),_key:C})}return x}function Kn(d,g,b){let S=lo(d),x=Rn(d,b),C=Mn(d,b),M=d.getMonth()!==g,V=Ne(d,y.get(b)),pe=Ne(d,new Date);return{button:String(d.getDate()),type:"button",role:"gridcell",tabIndex:V?0:-1,ariaSelected:x,ariaDisabled:S,disabled:S,ariaLabel:io.format(d),dataDate:zt(d),onClick:()=>so(d),onMouseEnter:()=>o==="range"&&T.set(d),style:{appearance:"none",border:"none",cursor:S?"not-allowed":"pointer",aspectRatio:"1",borderRadius:D(1),fontSize:k=>ye(k),fontFamily:"inherit",opacity:S?.35:M?.5:1,backgroundColor:k=>x?P(k,"shift-7",c.get(k)):C?P(k,"shift-2",c.get(k)):"transparent",color:k=>x?P(k,"shift-0",c.get(k)):P(k,"shift-9"),outline:pe?k=>`1px solid ${P(k,"shift-6",c.get(k))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:k=>x?P(k,"shift-7",c.get(k)):P(k,"shift-3",c.get(k))},"&:focus-visible":{outline:k=>`2px solid ${P(k,"shift-6",c.get(k))}`}},_key:zt(d)}}function jn(){let d=(g,b,S)=>({select:Array.from({length:g},(x,C)=>({option:String(C).padStart(2,"0"),value:String(C),selected:M=>b.get(M)===C,_key:C})),ariaLabel:S,onChange:x=>{b.set(Number(x.target.value)),Ln()},style:Vr()});return{div:[d(24,E,"Hour"),{span:":",style:{fontWeight:"600"}},d(60,$,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:D(1),marginTop:D(3)}}}function Yn(){let d=(g,b)=>({button:g,type:"button",onClick:b,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:S=>ye(S,"decrease-1"),color:S=>P(S,"shift-8",c.get(S)),padding:D(1)}});return{div:[d("Today",()=>{let g=new Date;y.set(O(g)),Xe(g),St()}),d("Clear",()=>{h.set(o==="range"?[null,null]:null),T.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:D(2),paddingTop:D(2),borderTop:g=>`1px solid ${P(g,"shift-3")}`}}}function qn(d){let g=d,b=y.get(),S=null;switch(g.key){case"ArrowLeft":S=me(b,-1);break;case"ArrowRight":S=me(b,1);break;case"ArrowUp":S=me(b,-7);break;case"ArrowDown":S=me(b,7);break;case"Home":S=Vt(b,u);break;case"End":S=me(Vt(b,u),6);break;case"PageUp":S=$t(b,g.shiftKey?-12:-1);break;case"PageDown":S=$t(b,g.shiftKey?12:1);break;case"Enter":case" ":g.preventDefault(),so(b);return;default:return}g.preventDefault(),y.set(S),Xe(S),St()}}function $o(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:D(.5)}}function zr(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:r=>ye(r),color:r=>P(r,"shift-8"),width:D(7),height:D(7),borderRadius:D(1),"&:hover":{backgroundColor:r=>P(r,"shift-3")}}}function Vr(){return{fontFamily:"inherit",fontSize:r=>ye(r),padding:D(1),borderRadius:D(1),border:r=>`1px solid ${P(r,"shift-4")}`,backgroundColor:r=>P(r,"base"),color:r=>P(r,"shift-9")}}import{toState as Lr}from"@domphy/core";import{themeColor as zo,themeSize as Vo,themeSpacing as Lo}from"@domphy/theme";function Xl(r={}){var a;let o=Lr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${Lo(24)}, max-content) 1fr`,columnGap:Lo(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>Vo(e,"inherit"),color:e=>zo(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>Vo(e,"inherit"),color:e=>zo(e,"shift-9",o.get(e))}}}}import{toState as Mo}from"@domphy/core";import{themeColor as ee,themeDensity as He,themeSize as Ro,themeSpacing as z}from"@domphy/theme";function es(r={}){var n,t;let{duration:o=240}=r,a=Mo((n=r.color)!=null?n:"neutral","color"),e=Mo((t=r.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Ro(i,"inherit"),color:i=>ee(i,"shift-9",a.get(i)),backgroundColor:i=>ee(i,"inherit",a.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>ee(i,"shift-2",a.get(i)),color:i=>ee(i,"shift-10",a.get(i)),fontSize:i=>Ro(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:z(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>z(He(i)*4),height:z(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:z(2),height:z(2),flexShrink:0,marginTop:`-${z(.5)}`,borderInlineEnd:i=>`${z(.5)} solid ${ee(i,"shift-9",a.get(i))}`,borderBottom:i=>`${z(.5)} solid ${ee(i,"shift-9",a.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>ee(i,"shift-3",a.get(i))},"& > summary:focus-visible":{borderRadius:i=>z(He(i)*2),outlineOffset:`-${z(.5)}`,outline:i=>`${z(.5)} solid ${ee(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>z(He(i)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:z(250),opacity:1,paddingTop:i=>z(He(i)*1),paddingBottom:i=>z(He(i)*3)}}}}import{toState as Mr}from"@domphy/core";import{themeColor as at,themeDensity as Rr,themeSize as _r,themeSpacing as Lt}from"@domphy/theme";function rs(r={}){let{color:o="neutral",open:a=!1}=r,e=Mr(a);return{_onInsert:n=>{n.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(n,t)=>{if(n.target!==t.domElement)return;let i=t.domElement.getBoundingClientRect();n.clientX>=i.left&&n.clientX<=i.right&&n.clientY>=i.top&&n.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(n,t)=>{let i=t.domElement;i.style.opacity==="0"&&(i.close(),document.body.style.overflow="")},_onMount:n=>{let t=n.domElement,i=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let u=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');u==null||u.focus()})):t.style.opacity="0"};i(e.get());let l=e.addListener(i);n.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:n=>_r(n,"inherit"),color:n=>at(n,"shift-10",o),backgroundColor:n=>at(n,"inherit",o),border:"none",padding:n=>Lt(Rr(n)*3),boxShadow:n=>`0 ${Lt(9)} ${Lt(16)} ${at(n,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:n=>at(n,"shift-2","neutral"),opacity:.75}}}}import{toState as Nr}from"@domphy/core";import{themeColor as it,themeSize as Hr,themeSpacing as Br}from"@domphy/theme";function ss(r={}){var a;let o=Nr((a=r.color)!=null?a:"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:Br(2),fontSize:e=>Hr(e,"inherit"),backgroundColor:e=>it(e),color:e=>it(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>it(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>it(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as Ar}from"@domphy/core";import{themeColor as lt,themeDensity as Fr,themeSize as Wr,themeSpacing as Be}from"@domphy/theme";var _o={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Kr={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Mt=r=>r==="left"||r==="right";function ds(r={}){let{color:o="neutral",open:a=!1,placement:e="right",size:n}=r,t=Ar(a),i=Mt(e)?Be(80):Be(64),l=n!=null?n:i;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=h=>{h?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=_o[e]};c(t.get());let m=t.addListener(c);s.addHook("Remove",()=>{m(),document.body.style.overflow=""})},style:{transform:_o[e],transition:"transform 0.25s ease",fontSize:s=>Wr(s,"inherit"),color:s=>lt(s,"shift-10",o),backgroundColor:s=>lt(s,"inherit",o),border:"none",padding:s=>Be(Fr(s)*3),margin:Kr[e],width:Mt(e)?l:"100dvw",height:Mt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Be(4)} ${Be(12)} ${lt(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>lt(s,"shift-2","neutral"),opacity:.75}}}}import{toState as jr}from"@domphy/core";import{themeColor as Yr,themeSize as qr}from"@domphy/theme";function gs(r={}){var a;let o=jr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>qr(e,"inherit"),fontStyle:"italic",color:e=>Yr(e,"shift-10",o.get(e))}}}import{toState as Gr}from"@domphy/core";import{themeColor as No,themeSize as Ur,themeSpacing as st}from"@domphy/theme";function Cs(r={}){var a;let o=Gr((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:st(2),marginInline:0,marginTop:st(3),marginBottom:st(3),color:e=>No(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:st(2)},"& figcaption":{fontSize:e=>Ur(e,"decrease-1"),color:e=>No(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Xr}from"@domphy/core";import{themeColor as ct,themeDensity as be,themeSize as Rt,themeSpacing as X}from"@domphy/theme";function ks(r={}){var n;let{layout:o="horizontal"}=r,a=Xr((n=r.color)!=null?n:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>X(be(t)*3),paddingBlock:t=>X(be(t)*3),border:"none",borderRadius:t=>X(be(t)*2),fontSize:t=>Rt(t,"inherit"),backgroundColor:t=>ct(t,"inherit",a.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:X(4),rowGap:X(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>Rt(t,"inherit"),fontWeight:600,paddingBlock:t=>X(be(t)*1),borderRadius:t=>X(be(t)*2),color:t=>ct(t,"shift-9",a.get(t)),backgroundColor:t=>ct(t,"inherit",a.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":X(be(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(${X(2)} * -1)`,fontSize:t=>Rt(t,"decrease-1"),color:t=>ct(t,"shift-9",a.get(t))}}}}import{toState as Jr}from"@domphy/core";import{themeColor as Qr,themeSize as Zr,themeSpacing as ea}from"@domphy/theme";var ta={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ds(r={}){var a;let o=Jr((a=r.color)!=null?a:"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=>Qr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:ea(2),fontSize:e=>{let n=ta[e.elementNode.tagName]||"inherit";return Zr(e,n)}}}}import{toState as oa}from"@domphy/core";import{themeColor as na,themeSpacing as Ho}from"@domphy/theme";function zs(r={}){var a;let o=oa((a=r.color)!=null?a:"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:Ho(3),marginBottom:Ho(3),backgroundColor:e=>na(e,"shift-4",o.get(e))}}}import{toState as ra}from"@domphy/core";import{themeColor as aa,themeSize as ia,themeSpacing as Bo}from"@domphy/theme";function Rs(r={}){var a;let o=ra((a=r.color)!=null?a:"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:Bo(4),height:Bo(4),flexShrink:"0",fontSize:e=>ia(e),backgroundColor:"transparent",color:e=>aa(e,"shift-9",o.get(e))}}}import{toState as la}from"@domphy/core";import{themeColor as sa,themeSpacing as ca}from"@domphy/theme";function Bs(r={}){var a;let o=la((a=r.color)!=null?a:"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:ca(2),backgroundColor:e=>sa(e,"inherit",o.get(e))}}}import{toState as Ao}from"@domphy/core";import{themeColor as L,themeSize as ma,themeSpacing as te}from"@domphy/theme";function Ks(r={}){var e,n;let o=Ao((e=r.color)!=null?e:"neutral","color"),a=Ao((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>ma(t,"inherit"),display:"inline-flex",position:"relative",width:te(6),height:te(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:te(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${L(t,"shift-4",o.get(t))}`,color:t=>L(t,"shift-9",o.get(t)),width:te(4),height:te(4)},"&:hover::before":{backgroundColor:t=>L(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${L(t,"shift-6",a.get(t))}`,backgroundColor:t=>L(t,"shift-8",a.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>L(t,"shift-7",a.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${te(.5)} solid ${L(t,"inherit",a.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${L(t,"shift-6",a.get(t))}`,backgroundColor:t=>L(t,"shift-3",a.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>L(t,"shift-8",a.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>L(t,"shift-7",a.get(t))},"&:focus-visible":{borderRadius:te(1.5),outline:t=>`${te(.5)} solid ${L(t,"shift-6",a.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>L(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Fo}from"@domphy/core";import{themeColor as Wo,themeDensity as Ae,themeSize as ua,themeSpacing as Fe}from"@domphy/theme";function Gs(r={}){var e,n;let o=Fo((e=r.color)!=null?e:"neutral","color"),a=Fo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"color",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>ua(t,"inherit"),paddingBlock:t=>Fe(Ae(t)*1),paddingInline:t=>Fe(Ae(t)*1),blockSize:t=>Fe(6+Ae(t)*2),inlineSize:t=>Fe(6+Ae(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Fe(Ae(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>Wo(t,"shift-2","neutral"),outline:t=>`1px solid ${Wo(t,"shift-4","neutral")}`}}}}import{toState as Ko}from"@domphy/core";import{themeColor as oe,themeDensity as _t,themeSize as da,themeSpacing as We}from"@domphy/theme";function Qs(r={}){var n,t;let{mode:o="datetime-local"}=r,a=Ko((n=r.color)!=null?n:"neutral","color"),e=Ko((t=r.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,l)=>{i.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:i=>da(i,"inherit"),lineHeight:"inherit",color:i=>oe(i,"shift-9",a.get(i)),backgroundColor:i=>oe(i,"inherit",a.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${oe(i,"shift-4",a.get(i))}`,borderRadius:i=>We(_t(i)*1),paddingInline:i=>We(_t(i)*3),height:i=>We(6+_t(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${We(.5)} solid ${oe(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>oe(i,"shift-8","neutral"),backgroundColor:i=>oe(i,"shift-2","neutral"),outline:i=>`1px solid ${oe(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${We(.5)} solid ${oe(i,"shift-6","error")}`}}}}import{toState as jo}from"@domphy/core";import{themeColor as N,themeDensity as mt,themeSize as pa,themeSpacing as ne}from"@domphy/theme";function oc(r={}){var e,n;let o=jo((e=r.color)!=null?e:"neutral","color"),a=jo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>pa(t,"inherit"),lineHeight:"inherit",color:t=>N(t,"shift-9",o.get(t)),backgroundColor:t=>N(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${N(t,"shift-4",o.get(t))}`,borderRadius:t=>ne(mt(t)*1),height:t=>ne(6+mt(t)*2),paddingInline:t=>ne(mt(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>ne(mt(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:ne(1),height:ne(6),paddingInline:ne(2),cursor:"pointer",color:t=>N(t,"shift-11",o.get(t)),backgroundColor:t=>N(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ne(.5)} solid ${N(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>N(t,"shift-8","neutral"),outline:t=>`1px solid ${N(t,"shift-4","neutral")}`,backgroundColor:t=>N(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>N(t,"shift-8","neutral"),backgroundColor:t=>N(t,"shift-3","neutral")}}}}import{toState as Yo}from"@domphy/core";import{themeColor as ue,themeDensity as ut,themeSize as ha,themeSpacing as Se}from"@domphy/theme";function ic(r={}){var e,n;let o=Yo((e=r.color)!=null?e:"neutral","color"),a=Yo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:Se(10),paddingInlineStart:t=>Se(ut(t)*3),paddingInlineEnd:t=>Se(ut(t)*1.5),paddingBlock:t=>Se(ut(t)*1),borderRadius:t=>Se(ut(t)*1),fontSize:t=>ha(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ue(t,"shift-4",o.get(t))}`,color:t=>ue(t,"shift-9",o.get(t)),backgroundColor:t=>ue(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=>`${Se(.5)} solid ${ue(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>ue(t,"shift-2","neutral"),outline:t=>`1px solid ${ue(t,"shift-4","neutral")}`,color:t=>ue(t,"shift-8","neutral")}}}}import{themeSpacing as qo}from"@domphy/theme";function cc(){return{style:{display:"flex",alignItems:"center",gap:qo(2),"& > *":{minWidth:qo(9)+"!important"}},_onMount:r=>{let o=r.domElement,a=()=>Array.from(o.querySelectorAll("input")),e=i=>{let l=a(),s=i.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},n=i=>{let l=a(),s=i.target,u=l.indexOf(s);i.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),i.key==="ArrowLeft"&&u>0&&l[u-1].focus(),i.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=i=>{var m,h,p;i.preventDefault();let l=(h=(m=i.clipboardData)==null?void 0:m.getData("text"))!=null?h:"",s=a(),u=s.indexOf(i.target);[...l].forEach((f,v)=>{s[u+v]&&(s[u+v].value=f)});let c=Math.min(u+l.length-1,s.length-1);(p=s[c])==null||p.focus()};o.addEventListener("input",e),o.addEventListener("keydown",n),o.addEventListener("paste",t),r.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",n),o.removeEventListener("paste",t)})}}}import{toState as Go}from"@domphy/core";import{themeColor as re,themeSize as fa,themeSpacing as Ke}from"@domphy/theme";function pc(r={}){var e,n;let o=Go((e=r.color)!=null?e:"neutral","color"),a=Go((n=r.accentColor)!=null?n:"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=>fa(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:Ke(6),height:Ke(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 ${re(t,"shift-4",o.get(t))}`,color:t=>re(t,"shift-9",o.get(t)),width:Ke(4),height:Ke(4)},"&:hover::before":{backgroundColor:t=>re(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${re(t,"shift-6",a.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>re(t,"shift-8",a.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>re(t,"shift-7",a.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${Ke(.5)} solid ${re(t,"shift-6",a.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>re(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Uo}from"@domphy/core";import{themeColor as dt,themeSpacing as H}from"@domphy/theme";function yc(r={}){var e,n;let o=Uo((e=r.color)!=null?e:"neutral","color"),a=Uo((n=r.accentColor)!=null?n:"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:H(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:H(1.5),borderRadius:H(999),backgroundColor:t=>dt(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:H(4),height:H(4),borderRadius:H(999),border:"none",marginTop:`calc((${H(1.5)} - ${H(4)}) / 2)`,backgroundColor:t=>dt(t,"shift-9",a.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>dt(t,"shift-10",a.get(t))},"&:focus-visible":{outline:t=>`${H(.5)} solid ${dt(t,"shift-6",a.get(t))}`,outlineOffset:H(1),borderRadius:H(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Xo}from"@domphy/core";import{themeColor as ae,themeDensity as Nt,themeSize as ga,themeSpacing as je}from"@domphy/theme";function vc(r={}){var e,n;let o=Xo((e=r.color)!=null?e:"neutral","color"),a=Xo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>ga(t,"inherit"),lineHeight:"inherit",color:t=>ae(t,"shift-9",o.get(t)),backgroundColor:t=>ae(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${ae(t,"shift-4",o.get(t))}`,borderRadius:t=>je(Nt(t)*1),minWidth:je(32),paddingInline:t=>je(Nt(t)*3),paddingBlock:t=>je(Nt(t)*1),"&::placeholder":{color:t=>ae(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=>`${je(.5)} solid ${ae(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>ae(t,"shift-8","neutral"),backgroundColor:t=>ae(t,"shift-2","neutral"),outline:t=>`1px solid ${ae(t,"shift-4","neutral")}`}}}}import{toState as ya}from"@domphy/core";import{themeColor as Ht,themeSize as Jo,themeSpacing as J}from"@domphy/theme";function wc(r={}){var a;let o=ya((a=r.accentColor)!=null?a:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>Jo(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:J(9),height:J(6),cursor:"pointer",margin:"0",paddingBlock:J(1),"&:checked":{"&::before":{backgroundColor:e=>Ht(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${J(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:J(3),height:J(3),borderRadius:J(999),left:J(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>Ht(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:J(999),display:"inline-block",fontSize:e=>Jo(e,"inherit"),lineHeight:1,backgroundColor:e=>Ht(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Qo}from"@domphy/core";import{themeColor as _,themeDensity as Bt,themeSize as ba,themeSpacing as ie}from"@domphy/theme";function Oc(r={}){var e,n;let o=Qo((e=r.color)!=null?e:"neutral","color"),a=Qo((n=r.accentColor)!=null?n:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:ie(10),paddingInline:t=>ie(Bt(t)*3),paddingBlock:t=>ie(Bt(t)*1),borderRadius:t=>ie(Bt(t)*1),fontSize:t=>ba(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${_(t,"shift-4",o.get(t))}`,color:t=>_(t,"shift-9",o.get(t)),backgroundColor:t=>_(t,"inherit",o.get(t)),"&::placeholder":{color:t=>_(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>_(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${ie(.5)} solid ${_(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>_(t,"shift-2","neutral"),outline:t=>`1px solid ${_(t,"shift-4","neutral")}`,color:t=>_(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${ie(.5)} solid ${_(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${ie(.5)} solid ${_(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${ie(.5)} solid ${_(t,"shift-6","warning")}`}}}}import{toState as Sa}from"@domphy/core";import{themeColor as At,themeSize as Ca,themeSpacing as Ft}from"@domphy/theme";function Vc(r={}){var a;let o=Sa((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>Ca(e,"inherit"),color:e=>At(e,"shift-9",o.get(e)),backgroundColor:e=>At(e,"inherit",o.get(e)),paddingBlock:Ft(.5),paddingInline:Ft(1.5),borderRadius:Ft(1),outline:e=>`1px solid ${At(e,"shift-4",o.get(e))}`}}}import{toState as Zo}from"@domphy/core";import{themeColor as Wt,themeSize as va,themeSpacing as Ea}from"@domphy/theme";function _c(r={}){var e,n;let o=Zo((e=r.color)!=null?e:"neutral","color"),a=Zo((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Ea(2),fontSize:t=>va(t,"inherit"),color:t=>Wt(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>Wt(t,"shift-10",a.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>Wt(t,"shift-8","neutral")}}}}import{toState as en}from"@domphy/core";import{themeColor as Ce,themeSize as xa,themeSpacing as Kt}from"@domphy/theme";function Ac(r={}){var e,n;let o=en((e=r.color)!=null?e:"primary","color"),a=en((n=r.accentColor)!=null?n:"secondary","accentColor");return{_onInsert:t=>{t.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>xa(t,"inherit"),backgroundColor:t=>Ce(t),color:t=>Ce(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>Ce(t,"shift-9",a.get(t))},"&:hover:not([disabled])":{color:t=>Ce(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:Kt(1),outlineOffset:Kt(1),outline:t=>`${Kt(.5)} solid ${Ce(t,"shift-6",a.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>Ce(t,"shift-8","neutral")}}}}import{toState as ka}from"@domphy/core";import{themeColor as tn,themeSize as wa,themeSpacing as jt}from"@domphy/theme";function jc(r={}){var a;let o=ka((a=r.accentColor)!=null?a:"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=>wa(e,"inherit"),color:e=>tn(e,"shift-9",o.get(e)),backgroundColor:e=>tn(e,"inherit",o.get(e)),height:jt(6),borderRadius:jt(1),paddingInline:jt(1.5)}}}import{merge as Ta,toState as Pa}from"@domphy/core";import{themeColor as Da,themeDensity as on,themeSize as Oa,themeSpacing as nn}from"@domphy/theme";function Uc(r={}){let{color:o="neutral",selectable:a=!0}=r;return{role:"menu",dataTone:"shift-17",_onSchedule:(n,t)=>{var l;let i={_context:{menu:{activeKey:Pa((l=r.activeKey)!=null?l:null),selectable:a}}};Ta(t,i)},style:{display:"flex",flexDirection:"column",paddingBlock:n=>nn(on(n)*2),paddingInline:n=>nn(on(n)*2),fontSize:n=>Oa(n,"inherit"),backgroundColor:n=>Da(n,"inherit",o)}}}import{themeColor as ve,themeDensity as rn,themeSize as Ia,themeSpacing as Ye}from"@domphy/theme";function Qc(r={}){let{accentColor:o="primary",color:a="neutral"}=r;return{role:"menuitem",_onInsert:n=>{var s,u;n.tagName!=="button"&&console.warn('"menuItem" patch must use button tag');let t=n.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let i=(u=(s=n.parent)==null?void 0:s.children.items)!=null?u:[];i=i.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=n.key!==null&&n.key!==void 0?n.key:i.findIndex(c=>c==n);t.selectable&&(n.attributes.set("ariaCurrent",c=>t.activeKey.get(c)==l||void 0),n.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(n,t)=>{var c,m,h,p;let i=n.key;if(i==="Enter"||i===" "){n.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(i))return;n.preventDefault();let l=((h=(m=t.parent)==null?void 0:m.children.items)!=null?h:[]).filter(f=>f.type==="ElementNode"&&f.attributes.get("role")==="menuitem"),s=l.findIndex(f=>f===t),u=s;i==="ArrowDown"?u=(s+1)%l.length:i==="ArrowUp"?u=(s-1+l.length)%l.length:i==="Home"?u=0:i==="End"&&(u=l.length-1),(p=l[u].domElement)==null||p.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:n=>Ye(2),width:"100%",fontSize:n=>Ia(n,"inherit"),height:n=>Ye(6+rn(n)*2),paddingInline:n=>Ye(rn(n)*3),border:"none",outline:"none",color:n=>ve(n,"shift-9"),backgroundColor:n=>ve(n,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:n=>ve(n,"shift-2")},"&[aria-current=true]":{backgroundColor:n=>ve(n,"shift-3",o),color:n=>ve(n,"shift-10")},"&:focus-visible":{outline:n=>`${Ye(.5)} solid ${ve(n,"shift-6",o)}`,outlineOffset:`-${Ye(.5)}`}}}}var an=r=>!!r&&typeof r.get=="function"&&r._isState===!0,Ee=r=>{let o={},a=[];for(let e in r){let n=r[e];e==="x"?a.push(`translateX(${typeof n=="number"?`${n}px`:n})`):e==="y"?a.push(`translateY(${typeof n=="number"?`${n}px`:n})`):e==="scale"?a.push(`scale(${n})`):e==="rotate"?a.push(`rotate(${typeof n=="number"?`${n}deg`:n})`):o[e]=n}return a.length&&(o.transform=a.join(" ")),o};function em(r={}){var i,l,s,u;let{initial:o,animate:a,exit:e,transition:n={}}=r,t={duration:(i=n.duration)!=null?i:300,delay:(l=n.delay)!=null?l:0,easing:(s=n.easing)!=null?s:"ease",iterations:(u=n.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let h=an(a)?a.get():a;if(h?m.animate(o?[Ee(o),Ee(h)]:[Ee(h)],t):o&&Object.assign(m.style,Ee(o)),an(a)){let p=a.addListener(f=>{m.animate([Ee(f)],t)});c.setMetadata("motionRelease",p)}},_onBeforeRemove:(c,m)=>{let h=c.domElement;if(!h||!e||typeof h.animate!="function")return m();h.animate([Ee(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}import{toState as $a}from"@domphy/core";import{themeColor as ln,themeSize as za,themeSpacing as Va}from"@domphy/theme";function rm(r={}){var a;let o=$a((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>za(e,"inherit"),backgroundColor:e=>ln(e),color:e=>ln(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:Va(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as La}from"@domphy/core";import{themeColor as xe,themeDensity as qe,themeSize as Ma,themeSpacing as ke}from"@domphy/theme";function Ra(r,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let a=[1];r>3&&a.push("...");let e=Math.max(2,r-1),n=Math.min(o-1,r+1);for(let t=e;t<=n;t++)a.push(t);return r<o-2&&a.push("..."),a.push(o),a}function sm(r){var l;let{total:o,color:a="neutral",accentColor:e="primary"}=r,n=La((l=r.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ke(6+qe(s)*2),height:s=>ke(6+qe(s)*2),paddingInline:s=>ke(qe(s)*2),borderRadius:s=>ke(qe(s)*1),border:"none",cursor:"pointer",fontSize:s=>Ma(s,"inherit"),backgroundColor:"transparent",color:s=>xe(s,"shift-9",a),"&:hover:not([disabled])":{backgroundColor:s=>xe(s,"shift-2",a)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},i=bo(Je({},t),{backgroundColor:s=>xe(s,"shift-6",e),color:s=>xe(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>xe(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=n.get(c),h=[];h.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&n.set(m-1),style:t});for(let p of Ra(m,o))if(p==="...")h.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:f=>ke(qe(f)*2),color:f=>xe(f,"shift-7",a)}});else{let f=p===m;h.push({button:String(p),type:"button",ariaLabel:`Page ${p}`,ariaCurrent:f?"page":void 0,disabled:f,onClick:()=>n.set(p),style:f?i:t})}return h.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&n.set(m+1),style:t}),h},style:{display:"flex",alignItems:"center",gap:ke(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as _a}from"@domphy/core";import{themeColor as Na,themeSize as Ha}from"@domphy/theme";function hm(r={}){var a;let o=_a((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Ha(e,"inherit"),color:e=>Na(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{merge as Ba,toState as sn}from"@domphy/core";function Sm(r){var h;let{open:o=!1,placement:a="bottom",openOn:e="click"}=r,n=null,t=sn(o),i=sn(a),{show:l,hide:s,anchorPartial:u}=B({open:t,placement:i,content:r.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:p=>{let f=p.attributes.get("id");n=f||p.nodeId,!f&&p.attributes.set("id",n)}};return(h=r.content).$||(h.$=[]),r.content.$.push(c),Ba(u,{ariaHaspopup:"dialog",ariaExpanded:p=>t.get(p),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(p,f)=>{let v=p.relatedTarget,y=f.getRoot().domElement,T=n?y.querySelector(`#${CSS.escape(n)}`):null;v&&(T!=null&&T.contains(v))||s()},_onMount:p=>n&&p.attributes.set("ariaControls",n)}),u}import{toState as Aa}from"@domphy/core";import{themeColor as pt,themeSize as Fa,themeSpacing as Yt}from"@domphy/theme";function cn(r={}){let{placement:o="bottom-end",color:a="neutral",sideOffset:e=Yt(6),bordered:n=!0}=r,t=Aa(o),i={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=c=>{var m;return(m=i[t.get(c)])!=null?m:i["bottom-end"]},s=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=>Fa(c),backgroundColor:c=>pt(c),color:c=>pt(c,"shift-9",a),position:"relative","&::after":{content:'""',position:"absolute",width:Yt(1.5),height:Yt(1.5),backgroundColor:c=>pt(c,"inherit",a),borderWidth:n?"1px":"0px",borderColor:c=>pt(c,"inherit",a),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),h=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",p=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${h},${p}) rotate(45deg)`}}}}}import{toState as Wa}from"@domphy/core";import{themeColor as mn,themeDensity as qt,themeSize as Ka,themeSpacing as Gt}from"@domphy/theme";function Tm(r={}){var a;let o=Wa((a=r.color)!=null?a:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Ka(e,"inherit"),color:e=>mn(e,"shift-9",o.get(e)),backgroundColor:e=>mn(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>Gt(qt(e)*2),paddingInline:e=>Gt(qt(e)*3),borderRadius:e=>Gt(qt(e)*2)}}}import{toState as un}from"@domphy/core";import{themeColor as Ut,themeSpacing as ht}from"@domphy/theme";function Im(r={}){var e,n;let o=un((e=r.color)!=null?e:"neutral","color"),a=un((n=r.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:ht(2),border:0,borderRadius:ht(999),overflow:"hidden",backgroundColor:t=>Ut(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>Ut(t,"shift-3",o.get(t)),borderRadius:ht(999)},"&::-webkit-progress-value":{backgroundColor:t=>Ut(t,"shift-9",a.get(t)),borderRadius:ht(999),transition:"width 220ms ease"}}}}import{themeColor as A,themeColorToken as ja,themeDensity as Ge,themeSize as Ya,themeSpacing as F}from"@domphy/theme";function Vm(r={}){let{color:o="neutral",accentColor:a="primary"}=r;return{_onInsert:e=>{e.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Ya(e,"inherit"),lineHeight:"inherit",color:e=>A(e,"shift-9",o),backgroundColor:e=>A(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${A(e,"shift-4",o)}`,borderRadius:e=>F(Ge(e)*1),paddingBlock:e=>F(Ge(e)*1),paddingLeft:e=>F(Ge(e)*3),paddingRight:e=>F(Ge(e)*5),backgroundImage:e=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${ja(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(n)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${F(2)} center`,backgroundSize:`${F(2.5)} ${F(1.5)}`,"&:not([multiple])":{height:e=>F(6+Ge(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${F(.5)} solid ${A(e,"shift-5",a)}`},"&:focus-visible":{outline:e=>`${F(.5)} solid ${A(e,"shift-6",a)}`},"& optgroup":{color:e=>A(e,"shift-11",o)},"& option[disabled]":{color:e=>A(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>A(e,"shift-8","neutral"),outline:e=>`1px solid ${A(e,"shift-4","neutral")}`,backgroundColor:e=>A(e,"shift-2","neutral")}}}}import{merge as dn,toState as Xt}from"@domphy/core";import{themeColor as Jt,themeDensity as Qt,themeSize as qa,themeSpacing as Ue}from"@domphy/theme";function Hm(r){let{options:o=[],placement:a="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=r,i=Xt(r.value),l=Xt(n),{show:s,hide:u,anchorPartial:c}=B({open:l,placement:Xt(a),content:r.content}),m={onClick:()=>!t&&u()};dn(r.content,m);let h={div:f=>{let v=i.get(f),y=Array.isArray(v)?v:[v];return o.filter(E=>y.includes(E.value)).map(E=>({span:E.label,$:[nt({color:e,removable:t})],_key:E.value,_onRemove:$=>{let w=i.get(),Ve=(Array.isArray(w)?w:[w]).filter(se=>se!==E.value);t?i.set(Ve):i.set(Ve[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Ue(1),flex:1}},p={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(h),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>Ue(6+Qt(f)*2),minWidth:Ue(32),outlineOffset:"-1px",outline:f=>`1px solid ${Jt(f,"shift-4","neutral")}`,paddingInline:f=>Ue(Qt(f)*2),borderRadius:f=>Ue(Qt(f)*1),fontSize:f=>qa(f,"inherit"),color:f=>Jt(f,"shift-9",e),backgroundColor:f=>Jt(f,"inherit",e)}};return dn(c,p),c}import{themeColor as we,themeDensity as pn,themeSize as Ga,themeSpacing as ft}from"@domphy/theme";function Fm(r={}){let{accentColor:o="primary",color:a="neutral",value:e=null}=r;return{role:"option",_onInit:t=>{t.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let l=i.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return i.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();i.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Ga(t,"inherit"),height:t=>ft(6+pn(t)*2),paddingInline:t=>ft(pn(t)*3),border:"none",outline:"none",color:t=>we(t,"shift-9",a),backgroundColor:t=>we(t,"inherit",a),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>we(t,"shift-2",a)},"&[aria-selected=true]":{backgroundColor:t=>we(t,"shift-6",o),color:t=>we(t,"shift-11")},"&:focus-visible":{outline:t=>`${ft(.5)} solid ${we(t,"shift-6",o)}`,outlineOffset:`-${ft(.5)}`}}}}import{toState as Ua}from"@domphy/core";import{themeColor as Xa,themeDensity as hn,themeSize as Ja,themeSpacing as fn}from"@domphy/theme";function qm(r={}){var i;let{color:o="neutral",multiple:a=!1}=r,e=Ua((i=r.value)!=null?i:a?[]:null),n={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:r.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:a}},_onInit:l=>{l.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(n)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>fn(hn(l)*2),paddingInline:l=>fn(hn(l)*2),fontSize:l=>Ja(l,"inherit"),backgroundColor:l=>Xa(l,"inherit",o)}}}import{hashString as Qa,toState as Za}from"@domphy/core";import{themeColor as gn,themeSize as ei,themeSpacing as yn}from"@domphy/theme";function Jm(r={}){var n;let o=Za((n=r.color)!=null?n:"neutral","color"),a={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=Qa(JSON.stringify(a));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>ei(t),color:t=>gn(t,"shift-9",o.get(t)),height:yn(6),display:"block",borderRadius:yn(1),backgroundColor:t=>gn(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:a}}}import{toState as ti}from"@domphy/core";import{themeColor as oi,themeSize as ni}from"@domphy/theme";function tu(r={}){var a;let o=ti((a=r.color)!=null?a:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!=="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>ni(e,"inherit"),color:e=>oi(e,"shift-9",o.get(e))}}}import{hashString as ri,toState as ai}from"@domphy/core";import{themeColor as gt,themeSize as ii,themeSpacing as Zt}from"@domphy/theme";var Sn={to:{transform:"rotate(360deg)"}},bn=ri(JSON.stringify(Sn));function au(r={}){var a;let o=ai((a=r.color)!=null?a:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>ii(e),backgroundColor:e=>gt(e),color:e=>gt(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Zt(6),height:Zt(6),borderRadius:"50%",border:e=>`${Zt(.5)} solid ${gt(e,"shift-4",o.get(e))}`,borderTopColor:e=>gt(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${bn} 0.7s linear infinite`,[`@keyframes ${bn}`]:Sn}}}import{merge as li,toState as si}from"@domphy/core";import{themeColor as eo,themeSpacing as ci}from"@domphy/theme";function cu(r={}){let{direction:o="horizontal",defaultSize:a=50,min:e=10,max:n=90}=r;return{_onSchedule:(t,i)=>{li(i,{_context:{splitter:{direction:o,size:si(a),min:e,max:n}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function mu(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let a=r.domElement,e=o.direction==="horizontal"?"width":"height";a.style[e]=`${o.size.get()}%`,a.style.flexShrink="0",a.style.overflow="auto";let n=o.size.addListener(t=>{a.style[e]=`${t}%`});r.addHook("Remove",n)}}}function uu(){return{_onMount:r=>{let o=r.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let a=r.domElement,e=o.direction==="horizontal";a.style.cursor=e?"col-resize":"row-resize";let n=t=>{t.preventDefault();let i=a.parentElement,l=u=>{let c=i.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};a.addEventListener("mousedown",n),r.addHook("Remove",()=>a.removeEventListener("mousedown",n))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:r=>eo(r,"shift-2"),"&:hover":{backgroundColor:r=>eo(r,"shift-3")},"&::after":{content:'""',borderRadius:ci(999),backgroundColor:r=>eo(r,"shift-4")}}}}import{toState as mi}from"@domphy/core";import{themeColor as Cn,themeSize as ui}from"@domphy/theme";function fu(r={}){var a;let o=mi((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>ui(e,"inherit"),fontWeight:700,color:e=>Cn(e,"shift-11",o.get(e)),backgroundColor:e=>Cn(e)}}}import{toState as di}from"@domphy/core";import{themeColor as pi,themeSize as hi}from"@domphy/theme";function Su(r={}){var a;let o=di((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>hi(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>pi(e,"shift-9",o.get(e))}}}import{toState as fi}from"@domphy/core";import{themeColor as gi,themeSize as yi}from"@domphy/theme";function xu(r={}){var a;let o=fi((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>yi(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>gi(e,"shift-9",o.get(e))}}}import{themeColor as Te,themeDensity as vn,themeSize as bi,themeSpacing as Pe}from"@domphy/theme";function Tu(r={}){let{accentColor:o="primary",color:a="neutral"}=r;return{role:"tab",_onInsert:n=>{var u,c;n.tagName!=="button"&&console.warn('"tab" patch must use button tag');let t=n.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let i=(c=(u=n.parent)==null?void 0:u.children.items)!=null?c:[];i=i.filter(m=>m.type=="ElementNode"&&m.attributes.get("role")=="tab");let l=n.key!==null&&n.key!==void 0?n.key:i.findIndex(m=>m==n),s={id:"tab"+n.parent.nodeId+l,ariaControls:"tabpanel"+n.parent.nodeId+l,ariaSelected:m=>t.activeKey.get(m)==l,onClick:()=>t.activeKey.set(l),onKeyDown:m=>{var T,E,$,w;let h=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(h))return;m.preventDefault();let p=((E=(T=n.parent)==null?void 0:T.children.items)!=null?E:[]).filter(I=>I.type==="ElementNode"&&I.attributes.get("role")==="tab"),f=p.findIndex(I=>I===n),v=f;h==="ArrowRight"?v=(f+1)%p.length:h==="ArrowLeft"?v=(f-1+p.length)%p.length:h==="Home"?v=0:h==="End"&&(v=p.length-1);let y=p[v];t.activeKey.set(($=y.key)!=null?$:v),(w=y.domElement)==null||w.focus()}};n.merge(s)},style:{cursor:"pointer",fontSize:n=>bi(n,"inherit"),height:n=>Pe(6+vn(n)*2),paddingInline:n=>Pe(vn(n)*4),border:"none",outline:"none",color:n=>Te(n,"shift-9"),backgroundColor:n=>Te(n,"inherit"),boxShadow:n=>`inset 0 -${Pe(.5)} 0 0 ${Te(n,"shift-1",a)}`,"&:hover:not([disabled])":{boxShadow:n=>`inset 0 -${Pe(.5)} 0 0 ${Te(n,"shift-2",a)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:n=>`inset 0 -${Pe(.5)} 0 0 ${Te(n,"shift-6",o)}`},"&:focus-visible":{boxShadow:n=>`inset 0 -${Pe(.5)} 0 0 ${Te(n,"shift-6",o)}`}}}}import{toState as Si}from"@domphy/core";import{themeColor as W,themeDensity as De,themeSize as En,themeSpacing as Oe}from"@domphy/theme";function Iu(r={}){var a;let o=Si((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>En(e,"inherit"),color:e=>W(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>Oe(De(e)*3),paddingBlock:e=>Oe(De(e)*1),color:e=>W(e,"shift-10",o.get(e)),backgroundColor:e=>W(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>Oe(De(e)*3),paddingBlock:e=>Oe(De(e)*1),color:e=>W(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${W(e,"shift-3",o.get(e))}`,fontSize:e=>En(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>Oe(De(e)*3),paddingBlock:e=>Oe(De(e)*1),color:e=>W(e,"shift-10",o.get(e)),backgroundColor:e=>W(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${W(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>W(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>W(e,"shift-2")+"!important"}}}}import{themeDensity as xn,themeSpacing as kn}from"@domphy/theme";function Lu(){return{role:"tabpanel",style:{paddingBlock:o=>kn(xn(o)*2),paddingInline:o=>kn(xn(o)*2)},_onInsert:o=>{var i,l;let a=o.getContext("tabs");if(!a){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(l=(i=o.parent)==null?void 0:i.children.items)!=null?l:[];e=e.filter(s=>s.type=="ElementNode"&&s.attributes.get("role")=="tabpanel");let n=o.key!==null&&o.key!==void 0?o.key:e.findIndex(s=>s==o),t={id:"tabpanel"+o.parent.nodeId+n,ariaLabelledby:"tab"+o.parent.nodeId+n,hidden:s=>a.activeKey.get(s)!=n};o.merge(t)}}}import{merge as Ci,toState as vi}from"@domphy/core";function _u(r={}){return{role:"tablist",_onSchedule:(a,e)=>{let n={_context:{tabs:{activeKey:vi(r.activeKey||0)}}};Ci(e,n)}}}import{toState as wn}from"@domphy/core";import{themeColor as K,themeDensity as to,themeSize as Ei,themeSpacing as Ie}from"@domphy/theme";function Au(r={}){var n,t;let o=wn((n=r.color)!=null?n:"neutral","color"),a=wn((t=r.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=r;return{_onInsert:i=>{i.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let l=i.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:i=>Ie(to(i)*2),paddingBlock:i=>Ie(to(i)*1.5),border:"none",borderRadius:i=>Ie(to(i)*1.5),fontSize:i=>Ei(i,"inherit"),color:i=>K(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${K(i,"shift-4",o.get(i))}`,backgroundColor:i=>K(i,"inherit",o.get(i)),"&::placeholder":{color:i=>K(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${Ie(.5)} solid ${K(i,"shift-5",a.get(i))}`},"&:focus-visible":{outline:i=>`${Ie(.5)} solid ${K(i,"shift-6",a.get(i))}`},"&:invalid":{outline:i=>`${Ie(.5)} solid ${K(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>K(i,"shift-8","neutral"),outline:i=>`1px solid ${K(i,"shift-4","neutral")}`,backgroundColor:i=>K(i,"shift-2","neutral")}}}}import{toState as xi}from"@domphy/core";import{themeColor as oo,themeDensity as no,themeSize as ki,themeSpacing as le}from"@domphy/theme";function ju(r={}){let{position:o="top-center",color:a="neutral"}=r,e=xi(!1),n=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:n?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:le(4),zIndex:30,padding:le(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:le(32),pointerEvents:"auto",paddingBlock:s=>le(no(s)*2),paddingInline:s=>le(no(s)*4),borderRadius:s=>le(no(s)*2),fontSize:s=>ki(s,"inherit"),color:s=>oo(s,"shift-9",a),backgroundColor:s=>oo(s,"inherit",a),boxShadow:s=>`0 ${le(2)} ${le(9)} ${oo(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":n?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{toState as Tn}from"@domphy/core";import{themeColor as $e,themeSize as wi,themeSpacing as ze}from"@domphy/theme";function Uu(r={}){var e,n;let o=Tn((e=r.color)!=null?e:"neutral","color"),a=Tn((n=r.accentColor)!=null?n:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let i=t.getContext("toggleGroup");if(!i){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let s=((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(s.indexOf(t));t.attributes.set("ariaPressed",h=>{let p=i.value.get(h);return Array.isArray(p)?p.includes(u):p===u}),t.addEvent("click",()=>{let h=i.value.get();if(i.multiple){let p=Array.isArray(h)?[...h]:[];i.value.set(p.includes(u)?p.filter(f=>f!==u):[...p,u])}else i.value.set(h===u?"":u)})},style:{cursor:"pointer",fontSize:t=>wi(t,"inherit"),height:ze(6),paddingBlock:ze(1),paddingInline:ze(2),border:"none",borderRadius:ze(1),color:t=>$e(t,"shift-9",o.get(t)),backgroundColor:t=>$e(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>$e(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>$e(t,"shift-3",a.get(t)),color:t=>$e(t,"shift-12",a.get(t))},"&:focus-visible":{outline:t=>`${ze(.5)} solid ${$e(t,"shift-6",a.get(t))}`,outlineOffset:`-${ze(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Ti}from"@domphy/core";import{themeColor as Pn,themeSize as Pi,themeSpacing as yt}from"@domphy/theme";function Zu(r={}){var e;let{multiple:o=!1,color:a="neutral"}=r;return{role:"group",_context:{toggleGroup:{value:Ti((e=r.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:yt(1),paddingInline:yt(1),gap:yt(1),borderRadius:yt(2),fontSize:n=>Pi(n,"inherit"),backgroundColor:n=>Pn(n,"inherit",a),outline:n=>`1px solid ${Pn(n,"shift-3",a)}`,outlineOffset:"-1px"}}}import{merge as Di,toState as Dn}from"@domphy/core";import{themeColor as On,themeDensity as ro,themeSize as Oi,themeSpacing as ao}from"@domphy/theme";function ad(r={}){let{open:o=!1,placement:a="top",content:e="Tooltip Content"}=r,n=Dn(a),t=Dn(e),i=null,l={span:p=>t.get(p)},{show:s,hide:u,anchorPartial:c}=B({open:o,placement:n,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:p=>{let f=p.attributes.get("id");i=f||p.nodeId,!f&&p.attributes.set("id",i)},style:{paddingBlock:p=>ao(ro(p)*1),paddingInline:p=>ao(ro(p)*3),borderRadius:p=>ao(ro(p)*1),color:p=>On(p,"shift-9"),backgroundColor:p=>On(p),fontSize:p=>Oi(p,"inherit")},$:[cn({placement:n,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),Di(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:p=>p.key==="Escape"&&u(),_onMount:p=>i&&p.attributes.set("ariaDescribedby",i)}),c}import{ElementNode as In}from"@domphy/core";function $n(r,o){return r.key!==void 0&&r.key!==null?String(r.key):`index-${o}`}function sd(r={}){let{duration:o=300,delay:a=0}=r,e=new Map;return{_onBeforeUpdate:n=>{e=new Map,n.children.items.forEach((t,i)=>{if(!(t instanceof In))return;let l=t.domElement;l&&e.set($n(t,i),l.getBoundingClientRect())})},_onUpdate:n=>{n.children.items.forEach((t,i)=>{if(!(t instanceof In))return;let l=t.domElement;if(!l)return;let s=$n(t,i),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,h=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(h)<.5)return;let p=l.style.transition,f=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${h}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${a}ms`,l.style.transform="translate(0px, 0px)"});let v=()=>{l.style.transition=p,l.style.transform=f,l.removeEventListener("transitionend",y)},y=T=>{T.propertyName==="transform"&&v()};l.addEventListener("transitionend",y),setTimeout(v,o+a+34)}),e.clear()}}}import{toState as Ii}from"@domphy/core";import{themeColor as zn,themeSize as $i,themeSpacing as zi}from"@domphy/theme";function dd(r={}){var a;let o=Ii((a=r.color)!=null?a:"neutral","color");return{_onInsert:e=>{e.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>$i(e,"inherit"),backgroundColor:e=>zn(e),color:e=>zn(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:zi(3),listStyleType:"disc",listStylePosition:"outside"}}}export{Ri as abbreviation,Bi as alert,Ki as avatar,Gi as badge,Qi as blockquote,ol as breadcrumb,il as breadcrumbEllipsis,ml as button,hl as buttonSwitch,bl as card,El as code,Ll as combobox,Nl as command,Bl as commandItem,Hl as commandSearch,jl as datePicker,Xl as descriptionList,es as details,rs as dialog,ss as divider,ds as drawer,gs as emphasis,Cs as figure,ks as formGroup,Ds as heading,zs as horizontalRule,Rs as icon,Bs as image,Ks as inputCheckbox,Gs as inputColor,Qs as inputDateTime,oc as inputFile,ic as inputNumber,cc as inputOTP,pc as inputRadio,yc as inputRange,vc as inputSearch,wc as inputSwitch,Oc as inputText,Vc as keyboard,_c as label,Ac as link,jc as mark,Uc as menu,Qc as menuItem,em as motion,rm as orderedList,sm as pagination,hm as paragraph,Sm as popover,cn as popoverArrow,Tm as preformated,Im as progress,Vm as select,Hm as selectBox,Fm as selectItem,qm as selectList,Jm as skeleton,tu as small,au as spinner,cu as splitter,uu as splitterHandle,mu as splitterPanel,fu as strong,Su as subscript,xu as superscript,Tu as tab,Lu as tabPanel,Iu as table,_u as tabs,nt as tag,Au as textarea,ju as toast,Uu as toggle,Zu as toggleGroup,ad as tooltip,sd as transitionGroup,dd as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|