@domphy/ui 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-theme-ui.global.js +1 -1
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +15 -9
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,De.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)te=o,this._flush(t,n);te=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){te.push([this,e]),this._flushing.set(e,t);for(let o of[...n])if(n.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),te.pop()}}};function Lo(){return De.size>0}function Ro(){let e=0;for(;De.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...De];De.clear();for(let n of t)n._flushAll()}}var Pt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new Fe,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Vt();t&&this.addListener(t.handler)}return this._value}set(e){this._notifier&&(this._value=e,this._notifier.notify(this.name,e))}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function I(e={},t={}){let n=["animation","transition","boxShadow","textShadow","background","fontFamily"],o=["class","rel","transform","acceptCharset","sandbox"],i=["content"];Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t)===Object.prototype&&(t=me(t));for(let r in t){let a=t[r];if(!(a==null||a===""))if(typeof a=="object"&&!Array.isArray(a))typeof e[r]=="object"?e[r]=I(e[r],a):e[r]=a;else if(n.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(", ")}}else e[r]=[e[r],a].filter(s=>s).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join("")}}else e[r]=[e[r],a].filter(s=>s).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let s=e[r];e[r]=u=>{let h=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[h,m].filter(d=>d).join(" ")}}else e[r]=[e[r],a].filter(s=>s).join(" ");else if(r.startsWith("on")){let s=r.replace("on","").toLowerCase();pr(e,s,a)}else if(r.startsWith("_on")){let s=r.replace("_on","");fr(e,s,a)}else e[r]=a}return e}function Le(e=""){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function g(e,t){return e instanceof Pt||e!=null&&e._isState?e:new Pt(e,t)}function hr(e){return typeof e=="object"&&e!==null&&e._isState===!0}function dr(e){return{_isState:!0,get(t){return e.get(t)}}}function Nt(e,t,n){return{_behaviors:{[e]:{attach:t,props:n}}}}function fr(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function pr(e,t,n){let o=ur[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(r,a)=>{i(r,a),n(r,a)}:e[o]=n}function me(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let n;if(Array.isArray(e)){n=[],t.set(e,n);for(let i of e)n.push(me(i,t));return n}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){n=new Map,t.set(e,n);for(let[i,r]of e)n.set(me(i,t),me(r,t));return n}if(e instanceof Set){n=new Set,t.set(e,n);for(let i of e)n.add(me(i,t));return n}if(ArrayBuffer.isView(e))return new e.constructor(e);if(e instanceof ArrayBuffer)return e.slice(0);let o=Object.getPrototypeOf(e);if(o!==Object.prototype)return e;n=Object.create(o),t.set(e,n);for(let i of Reflect.ownKeys(e))n[i]=me(e[i],t);return n}function $o(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let n=Object.keys(e);if(n.length===0&&!t)throw Error("element object has no tag key");for(let o=0;o<n.length;o++){let i=n[o],r=e[i];if(o===0&&!At.includes(i)&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&r&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"style" must be a object');if(i==="$")e.$.forEach(a=>$o(a,!0));else{if(i.startsWith("_on")&&typeof r!="function")throw Error(`hook ${i} value "${r}" must be a function `);if(i.startsWith("on")&&typeof r!="function")throw Error(`event ${i} value "${r}" must be a function `);if(i==="_portal"&&typeof r!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(r)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof r!="string"&&typeof r!="number")throw Error('"_key" must be a string or number')}}return!0}function tt(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function gr(e){let t=e.replace(/<script\b[^>]*>[\s\S]*?<\/script\s*>/gi,"");return t=t.replace(/<script\b[^>]*\/>/gi,""),t=t.replace(/<script\b[^>]*>[\s\S]*$/gi,""),t=t.replace(/\s+on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,""),t=t.replace(/\/on[a-zA-Z][\w-]*\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi,"/"),t=t.replace(/((?:href|src|action|formaction)\s*=\s*)(["']?)[\s]*javascript:[^"'\s>]*/gi,"$1$2#"),t}function Io(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function zo(e){return Object.keys(e).find(t=>At.includes(t))}function Ao(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function yr(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var s=e[r];if(s==="(")n+=1;else if(s===")")n-=1;else if(s==="[")o+=1;else if(s==="]")o-=1;else if(s===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=s}return t.push(i.trim()),t}function Dt(e){let t=e.trim();return t.startsWith("@")?t.replace(/\s+/g,""):t.replace(/\s*([>+~,])\s*/g,"$1").replace(/\s+/g," ").replace(/\(\s*odd\s*\)/g,"(2n+1)").replace(/\(\s*even\s*\)/g,"(2n)").trim()}function br(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=Dt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Dt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Vo(e,t){var n;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:sr().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((n=o.sheet)==null||n.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var Lt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>I(t,Lt(n))),delete e.$,I(t,e),t}else return e},vr={translate:["yes","no"],autoCapitalize:["on","off"]},Sr=class{constructor(e,t,n){this.declaredValue=void 0,this._notifier=new Fe,this._releases=[],this._removeHooked=!1,this.parent=n,this.isBoolean=zt.includes(e),this.enumeratedBoolean=vr[e],Eo.includes(e)?this.name=e:Object.hasOwn(Tt,e)?this.name=Tt[e]:this.name=Ao(e),this.value=void 0,this.set(t)}normalize(e){return this.enumeratedBoolean&&typeof e=="boolean"?e?this.enumeratedBoolean[0]:this.enumeratedBoolean[1]:e}render(){if(!this.parent||!this.parent.domElement)return;let e=this.parent.domElement,t=["value"];this.isBoolean?this.value===!1||this.value==null?e.removeAttribute(this.name):e.setAttribute(this.name,this.value===!0?"":this.value):this.value==null?e.removeAttribute(this.name):t.includes(this.name)?e[this.name]=this.value:e.setAttribute(this.name,this.value)}set(e){var t,n;let o=this.value;if(this.declaredValue=e,this._releases.length){for(let i of this._releases)i();this._releases=[]}if(e==null)this.value=null;else if(typeof e=="function"){let i=()=>{if(!this.parent||this.parent._disposed)return;let r=this.value;this.value=this.isBoolean?!!e(i):this.normalize(e(i)),this.render(),r!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(n=this.parent)==null?void 0:n.nodeId} attribute:${this.name}`,i.onSubscribe=r=>{this._releases.push(r),this.parent&&!this._removeHooked&&(this._removeHooked=!0,this.parent.addHook("BeforeRemove",()=>{for(let a of this._releases)a();this._releases=[],i=null}))},this.value=this.isBoolean?!!e(i):this.normalize(e(i))}else this.value=this.isBoolean?!!e:this.normalize(e);this.render(),o!==this.value&&this._notifier.notify(this.name,this.value)}addListener(e){let t=e;t.onSubscribe=n=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",n)},this._notifier.addListener(this.name,t)}remove(){this.parent&&this.parent.attributes&&this.parent.attributes.remove(this.name),this._dispose()}_dispose(){for(let e of this._releases)e();this._releases=[],this._notifier._dispose(),this.value=null,this.parent=null}generateHTML(){let{name:e,value:t}=this;if(this.isBoolean)return t?`${e}`:"";if(t==null)return"";let n=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${Io(String(n))}"`}},Bo=class{constructor(e){this.items={},this.parent=e}generateHTML(){if(!this.items)return"";let e=Object.values(this.items).map(t=>t.generateHTML()).filter(Boolean).join(" ");return e?` ${e}`:""}get(e){var t;if(this.items)return(t=this.items[e])==null?void 0:t.value}set(e,t){!this.items||!this.parent||(this.items[e]?this.items[e].set(t):this.items[e]=new Sr(e,t,this.parent))}addListener(e,t){this.has(e)&&this.items[e].addListener(t)}has(e){return this.items?Object.hasOwn(this.items,e):!1}remove(e){var t,n;if(!this.items)return;let o=(n=(t=this.items[e])==null?void 0:t.name)!=null?n:e;this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(o)}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!zt.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){var t,n;if(!e||typeof e!="string"&&typeof e!="function")return;let o=(u,h)=>{let m=(u||"").split(" ").filter(d=>d);return!m.includes(h)&&m.push(h),m.join(" ")},i=(n=(t=this.items)==null?void 0:t.class)==null?void 0:n.declaredValue,r=typeof i=="function",a=r?i:this.get("class"),s=typeof e=="function";if(!r&&!s){this.set("class",o(a,e));return}this.set("class",u=>o(r?a(u):a,s?e(u):e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(n=>n).filter(n=>n!==e);t.length>0?this.set("class",t.join(" ")):this.remove("class")}replaceClass(e,t){!e||!t||typeof e!="string"||typeof t!="string"||this.hasClass(e)&&(this.removeClass(e),this.addClass(t))}},be=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",xr=class{constructor(e,t,n){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Ao(e),this.parentRule=n,this.set(t)}_domUpdate(){if(!this.parentRule)return;let e=this.parentRule.domRule;if(e&&e.style){let t=e.style;t.setProperty(this.cssName,String(this.value)),ye[this.name]&&ye[this.name].forEach(n=>{t.setProperty(`-${n}-${this.cssName}`,String(this.value))})}}_dispose(){if(this._releases.length){for(let e of this._releases)e();this._releases=[]}this.value="",this.parentRule=null}set(e){var t,n,o,i;if(this._releases.length){for(let r of this._releases)r();this._releases=[]}if(typeof e=="function"){let r=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(r),this._domUpdate())});r.onSubscribe=a=>{this._releases.push(a)},r.elementNode=this.parentRule.root,r.debug=`class:${(n=(t=this.parentRule)==null?void 0:t.root)==null?void 0:n.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(r)}else this.value=e;this._domUpdate()}remove(){if(this.parentRule){if(this.parentRule.domRule instanceof CSSStyleRule){let e=this.parentRule.domRule.style;e.removeProperty(this.cssName),ye[this.name]&&ye[this.name].forEach(t=>{e.removeProperty(`-${t}-${this.cssName}`)})}delete this.parentRule.styleBlock[this.name],this._dispose()}}cssText(){let e=`${this.cssName}: ${this.value}`;return ye[this.name]&&ye[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},ue=class Rt{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new No(this),this.parent=n}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof Rt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Rt;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new xr(t,n,this))}removeStyle(t){this.styleBlock&&this.styleBlock[t]&&this.styleBlock[t].remove()}cssText(){if(!this.styleBlock||!this.styleList)return"";let t=Object.values(this.styleBlock).map(o=>o.cssText()).join(";"),n=this.styleList.cssText();return`${this.selectorText} { ${t} ${n} } `}mount(t){!t||!this.styleList||(this.domRule=t,"cssRules"in t&&this.styleList.mount(t.cssRules))}remove(){if(this.domRule&&this.domRule.parentStyleSheet){let t=this.domRule.parentStyleSheet,n=t.cssRules;for(let o=0;o<n.length;o++)if(n[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let n=Object.values(this.styleBlock).map(o=>o.cssText()).join(";");try{if(this.selectorText.startsWith("@")){if(/^@(media|supports|container|layer)\b/.test(this.selectorText)){let o=t.insertRule(`${this.selectorText} {}`,t.cssRules.length),i=t.cssRules[o];"cssRules"in i&&(this.mount(i),this.styleList.render(i))}else if(this.selectorText.startsWith("@keyframes")||this.selectorText.startsWith("@font-face")){let o=this.cssText(),i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];this.mount(r)}}else{let o=`${this.selectorText} { ${n} }`,i=t.insertRule(o,t.cssRules.length),r=t.cssRules[i];r&&"selectorText"in r&&this.mount(r)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},No=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof ue;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let n={},o=[];function i(r,a){return r.startsWith("&")?`${a}${r.slice(1)}`:`${a} ${r}`}for(let r in e){let a=e[r],s=yr(r);for(let u of s){let h=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new ue(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new ue(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new ue(u,this.parent);for(let d in a)m.insertStyle(d,a[d]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new ue(h,this.parent);this.items.push(m);for(let[d,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let v=i(d,h);this.addCSS(p,v)}else m.insertStyle(d,p)}else n[u]=a}}if(Object.keys(n).length){let r=new ue(t,this.parent);for(let a in n)r.insertStyle(a,n[a]);this.items.push(r)}for(let r of o)this.items.push(r)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}patchCSS(e,t=""){var n;if(!this.items||!this.parent)return;let o={};for(let s in e){let u=e[s];typeof u=="object"&&u!=null||(o[s]=u)}let i=this.items.find(s=>s.selectorText===t);i||(i=new ue(t,this.parent),this.items.push(i));let r=new Set(Object.keys(o));for(let s in o)i.insertStyle(s,o[s]);if(i.styleBlock)for(let s of Object.keys(i.styleBlock))r.has(s)||i.removeStyle(s);let a=(n=this.domStyle)==null?void 0:n.sheet;!i.domRule&&a&&i.render(a)}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(n=>n.selectorText===e);return t||(t=new ue(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(Dt(t.selectorText));n&&t.mount(n)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,n=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let r=i-t,a=e[r];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==n(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},U=class Pe{constructor(t,n=null,o=0){this._disposed=!1,this._beforeRemoveFired=!1,this._imperative=!1,this.type="ElementNode",this.parent=null,this._childrenReleaseHooked=!1,this._behaviorInstances=new Map,this._pendingBehaviors=new Map,this._behaviorMountHooked=!1,this._behaviorTeardownHooked=!1,this.children=new Ho(this),this.styles=new No(this),this.attributes=new Bo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=me(t),$o(t),t.style=t.style||{},this.parent=n,this.tagName=zo(t),t=Lt(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(r=this.parent)==null?void 0:r.nodeId}.${o}`,s=JSON.stringify(t.style||{},(h,m)=>typeof m=="function"?a:m);this.nodeId=Le(a+s),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];u!=null&&(typeof u=="function"?this._setupFunctionChildren(u):this.children.update(Array.isArray(u)?u:[u])),this._hooks.Init&&this._hooks.Init(this)}_setupFunctionChildren(t){let n=()=>{if(!this._disposed)try{let i=t(n);this.children.update(Array.isArray(i)?i:[i])}catch(i){this._handleError(i)}};n.elementNode=this,n.debug=`class:${this.tagName}_${this.nodeId} children`;let o=[];n.onSubscribe=i=>{o.push(i),this._childrenRelease=()=>{for(let r of o)r();o.length=0,n=null},this._childrenReleaseHooked||(this._childrenReleaseHooked=!0,this.addHook("BeforeRemove",()=>{var r;(r=this._childrenRelease)==null||r.call(this),this._childrenRelease=void 0}))},n()}_createDOMNode(){let t=_o.includes(this.tagName)?document.createElementNS("http://www.w3.org/2000/svg",this.tagName):document.createElement(this.tagName);if(this.domElement=t,this._events)for(let n in this._events)this._bindEvent(n);return this.attributes&&Object.values(this.attributes.items).forEach(n=>n.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let n=o=>{var i,r;return(r=(i=this._events)==null?void 0:i[t])==null?void 0:r.call(i,o,this)};this.domElement.addEventListener(t,n),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,n),n=null})}_dispose(){var t,n,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(n=(t=this._hooks).BeforeRemove)==null||n.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(r=>r.remove()),this.styles._dispose()),this.attributes&&this.attributes._dispose(),(i=(o=this._hooks).Remove)==null||i.call(o,this),this.domElement=null,this._hooks={},this._events=null,this._context={},this._metadata={},this.parent=null)}merge(t){I(this._context,t._context),I(this._metadata,t._metadata),this._processBehaviors(t._behaviors);let n=Object.keys(t);for(let o=0;o<n.length;o++){let i=n[o],r=t[i];["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName].includes(i)||(["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"].includes(i)?this.addHook(i.substring(3),r):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),r):i==="_portal"?this._portal=r:i==="class"?(typeof r=="string"||typeof r=="function")&&this.attributes.addClass(r):this.attributes.set(i,r))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){var n;let o=me(t);o.style=o.style||{},o=Lt(o);let i=o[this.tagName];if(typeof i=="function")(n=this._childrenRelease)==null||n.call(this),this._childrenRelease=void 0,this._setupFunctionChildren(i);else if(i!=null){let m=Array.isArray(i)?i:[i];this.children.update(m,!!this.domElement,!0)}o._context&&I(this._context,o._context),o._metadata&&I(this._metadata,o._metadata),this._processBehaviors(o._behaviors),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let r=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName],s=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),h=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||s.includes(m)||m==="_portal")continue;let d=o[m];m.startsWith("on")&&typeof d=="function"?this.addEvent(m.substring(2).toLowerCase(),d):m==="class"&&(typeof d=="string"||typeof d=="function")?h=d:(this.attributes.set(m,d),u.add(m))}if(typeof h=="function"){let m=h;this.attributes.set("class",d=>`${r} ${m(d)}`)}else this.attributes.set("class",h?`${r} ${h}`:r);if(this.attributes.items)for(let m of Object.keys(this.attributes.items))u.has(m)||this.attributes.remove(m);if(this._events)for(let m in this._events)this._bindEvent(m)}_handleError(t){let n=this;for(;n;){if(n._hooks.Error){let o=n;n._hooks.Error(o,t,()=>{o.children.update([])});return}n=n.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,n){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,r)=>{o(i,r),n(i,r)}:this._events[t]=n}addHook(t,n){let o=this._hooks[t];if(typeof o=="function"){let i=((...r)=>{o(...r),n(...r)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,n.length),configurable:!0})}catch(r){}this._hooks[t]=i}else this._hooks[t]=n}getRoot(){let t=this;for(;t&&t instanceof Pe&&t.parent;)t=t.parent;return t}_processBehaviors(t){var n;if(t)for(let o of Object.keys(t)){let i=t[o],r=this._behaviorInstances.get(o);r?(n=r.update)==null||n.call(r,i.props):this.domElement?this._attachBehaviorNow(o,i):(this._pendingBehaviors.set(o,i),this._ensureBehaviorMountHook())}}_attachBehaviorNow(t,n){let o=n.attach(this,n.props)||{};this._behaviorInstances.set(t,o),this._ensureBehaviorTeardownHook()}_ensureBehaviorMountHook(){this._behaviorMountHooked||(this._behaviorMountHooked=!0,this.addHook("Mount",()=>{if(this._pendingBehaviors.size===0)return;let t=this._pendingBehaviors;this._pendingBehaviors=new Map,t.forEach((n,o)=>this._attachBehaviorNow(o,n))}))}_ensureBehaviorTeardownHook(){this._behaviorTeardownHooked||(this._behaviorTeardownHooked=!0,this.addHook("BeforeRemove",()=>{this._behaviorInstances.forEach(t=>{var n;return(n=t.destroy)==null?void 0:n.call(t)}),this._behaviorInstances.clear()}))}getBehavior(t){let n=this;for(;n;){let o=n._behaviorInstances.get(t);if(o)return o;n=n.parent}}getContext(t){let n=this;for(;n&&(!n._context||!Object.hasOwn(n._context,t));)n=n.parent;return n&&n._context?n._context[t]:void 0}setContext(t,n){this._context=this._context||{},this._context[t]=n}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,n){this._metadata=this._metadata||{},this._metadata[t]=n}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(n=>n instanceof Pe?n.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(To.includes(this.tagName))return`<${this.tagName}${t}>`;let n=this.children.generateHTML();return`<${this.tagName}${t}>${n}</${this.tagName}>`}mount(t,n){if(!t)throw new Error("Missing dom node on bind");if(be&&!n&&this.parent===null&&t.childNodes.length>0&&console.warn("[Domphy] mount() was called without a style element on already-rendered DOM. Reactive style updates after hydration will be dropped \u2014 pass the server-rendered <style> element as the second argument to mount()."),this.domElement=t,this._events)for(let o in this._events)this._bindEvent(o);if(this.children&&this.children.items.forEach((o,i)=>{let r=t.childNodes[i];r&&(o instanceof Pe?o.mount(r):o.domText=r)}),n){let o=n.sheet;o&&this._hydrateStyles(br(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var n;if((n=this.styles)==null||n.hydrate(t),this.children)for(let o of this.children.items)o instanceof Pe&&o._hydrateStyles(t)}render(t){let n=this._createDOMNode();t.appendChild(n),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),r=i instanceof ShadowRoot?i:document.head;return o||(o=Vo(r)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Pe&&a._portal){let s=a._portal(this.getRoot());s&&a.render(s)}else a.render(n)}),n}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var n;(n=this.domElement)==null||n.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let n=!1,o=()=>{n||(n=!0,t())},i=this._hooks.BeforeRemove;this._beforeRemoveFired=!0,i(this,o),i.length<2&&!n?o():be&&!n&&setTimeout(()=>{n||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else t()}}},ko=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(tt(this.text)){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(n=>{for(let o of Array.from(n.attributes))/^on/i.test(o.name)?n.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&n.setAttribute(o.name,"#")}),e=t.content.firstChild||document.createTextNode("")}else e=document.createTextNode(this.text);return this.domText=e,e}setText(e){var t;let n=e===""?"\u200B":String(e);if(n===this.text&&this.domText)return;let o=tt(this.text);if(this.text=n,!this.domText)return;if(!o&&!tt(n)&&this.domText.nodeType===3){this.domText.nodeValue=n;return}let i=this.domText,r=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(r,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"​":tt(this.text)?gr(this.text):Io(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},$t=new Set;function wr(){$t.clear()}var Ho=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new ko(e==null?"":String(e),this.owner)}_domReferenceAfter(e){let t=this.owner.domElement;if(!t)return null;for(let n=e;n<this.items.length;n++){let o=this.items[n],i=o instanceof U?o.domElement:o.domText;if(i&&i.parentNode===t)return i}return null}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof U?e.domElement:e.domText;if(!o)return;let i=this._domReferenceAfter(t+1);o!==i&&n.insertBefore(o,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let n=this.owner.domElement,o=e instanceof U?e.domElement:e.domText,i=t instanceof U?t.domElement:t.domText;if(!o||!i)return;let r=o.nextSibling,a=i.nextSibling;n.insertBefore(o,a),n.insertBefore(i,r)}update(e,t=!0,n=!1){var o,i,r,a;if(this.items.some(f=>f._imperative)){let f=this.items.filter(S=>!S._imperative),y=this.items.filter(S=>S._imperative);this.items=f.concat(y)}let s=this.items.slice(),u=new Map;for(let f of s)f instanceof U&&f.key!==null&&f.key!==void 0&&!f._imperative&&!f._beforeRemoveFired&&u.set(f.key,f);!n&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let h=new Set(s),m=new Set,d=0,p=be&&s.length>0?e.length!==s.length:!1;for(let f=0;f<e.length;f++){let y=e[f],S=typeof y=="object"&&y!==null,C=S?y._key:void 0,E=S?zo(y):void 0;if(be&&S&&C===void 0&&d++,C!==void 0){let w=u.get(C);if(w instanceof U&&w.tagName===E){u.delete(C);let O=this.items.indexOf(w);if(O!==f&&O>=0){let M=!!w._portal;this.move(O,f,M?!1:t,!0)}w.parent=this.owner,w.patch(y),m.add(w);continue}}else if(S){let w=this.items[f];if(w instanceof U&&w.key==null&&w.tagName===E&&h.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(y),m.add(w);continue}}else{let w=this.items[f];if(w instanceof ko&&h.has(w)&&!m.has(w)&&!w._imperative){w.setText(y==null?"":y),m.add(w);continue}}m.add(this.insert(y,f,t,!0,!0))}let v=this.items.slice(e.length);for(let f of v)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),be&&s.length>0&&d>0&&p){let f=this.owner.nodeId;if(!$t.has(f)){$t.add(f);let y=`[domphy] unkeyed list length changed \u2014 DOM nodes reused by position may not match their data slot (focus/scroll/input-value drift). Add _key to each item. (parent <${this.owner.tagName}>, ${d} unkeyed item${d===1?"":"s"})`;console.warn(y)}}n||(a=(r=this.owner._hooks)==null?void 0:r.Update)==null||a.call(r,this.owner)}insert(e,t,n=!0,o=!1,i=!1){let r=this.items.length,a=typeof t!="number"||Number.isNaN(t)||t<0||t>r?r:t,s=this._createNode(e);if(s._imperative=!i,this.items.splice(a,0,s),s instanceof U){s._hooks.Insert&&s._hooks.Insert(s);let u=this.owner.domElement;if(n&&u)if(s._portal){let h=s._portal(this.owner.getRoot());h&&s.render(h)}else{let h=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(h,m);let d=u.getRootNode(),p=d instanceof ShadowRoot?d:document.head,v=Vo(p);s.styles.render(v),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(f=>{if(f instanceof U&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(h)})}}else{let u=this.owner.domElement;if(n&&u){let h=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(h,m)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),s}remove(e,t=!0,n=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof U){if(e._beforeRemoveFired)return;let i=()=>{let r=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&r&&r.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let r=!1,a=()=>{r||(r=!0,i())},s=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,s(e,a),s.length<2&&!r?a():be&&!r&&setTimeout(()=>{r||console.warn("[Domphy] _onBeforeRemove declared a `done` parameter (e.g. an exit animation) but did not call it within 5s \u2014 the element will stay in the DOM. Call done() when cleanup finishes.")},5e3)}else i()}else{let i=e.domText;this.items.splice(o,1),t&&i&&i.remove(),e._dispose()}!n&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}}clear(e=!0,t=!1){if(this.items.length===0)return;let n=this.items.slice();for(let o of n)this.remove(o,e,!0);!t&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}_dispose(){this.items.forEach(e=>e._dispose()),this.items=[]}swap(e,t,n=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],r=this.items[t];this.items[e]=r,this.items[t]=i,n&&this._swapDomElement(i,r),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,n=!0,o=!1){if(e<0||e>=this.items.length||t<0||t>=this.items.length||e===t)return;let i=this.items[e];this.items.splice(e,1),this.items.splice(t,0,i),n&&this._moveDomElement(i,t),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}generateHTML(){let e="";for(let t of this.items)e+=t.generateHTML();return e}},ve=new Set,It=!1;function jo(e){ve.add(e),!It&&(It=!0,Bt(Fo))}function Fo(){for(It=!1;ve.size>0;){let e=[...ve];ve.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function Cr(){let e=0;for(;Lo()||ve.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Ro(),Fo()}}var je=[];function kr(){return je.length?je[je.length-1]:null}function Ht(e){let t=kr();t&&t._add(e)}var Er=class{constructor(){this._disposers=new Set,this._stopped=!1}_add(e){if(this._stopped){e();return}this._disposers.add(e)}run(e){if(this._stopped)return be&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();je.push(this);try{return e()}finally{je.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function _r(){let e=new Er;return Ht(()=>e.stop()),e}function Wo(e){let t=!1,n=!1,o=()=>{t||r()},i=new Mo(()=>{t||jo(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{Po(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),ve.delete(o))};return Ht(a),r(),a}function Tr(e){let t="computed",n=new Fe,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&h()},s=new Mo(()=>{i||(i=!0,jo(a))}),u=()=>{s.reset(),o=Po(s,e),i=!1,r=!0},h=()=>{let d=o,p=r;u(),!(p&&o===d)&&n.notify(t,o)},m=d=>{if(d)n.addListener(t,d);else{let p=Vt();p&&n.addListener(t,p.handler)}return i&&(r&&n.listenerCount(t)>0?h():u()),o};return Ht(()=>{s.reset(),ve.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:m}}function Or(e){return Do(e)}function Mr(e){return mr(e)}function Pr(e,t,n){let o,i=!0;return Wo(()=>{let r=typeof e=="function"?e():e.get();(!i||n!=null&&n.immediate)&&t(r,o),o=r,i=!1})}function Dr(e){return e?Promise.resolve().then(e):Promise.resolve()}var Lr=class{constructor(e){this._notifier=new Fe,this.initialRecord=wo({},e),this._record=wo({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=Vt();n&&this._notifier.addListener(e,n.handler)}return this._record[e]}set(e,t){this._record[e]=t,this._notifier.notify(e,t)}addListener(e,t){return this._notifier.addListener(e,t)}removeListener(e,t){this._notifier.removeListener(e,t)}reset(e){this.set(e,this.initialRecord[e])}_dispose(){this._notifier._dispose()}};var st={};et(st,{COLOR_ROLES:()=>Xr,ElementTones:()=>We,applySystemTheme:()=>Gr,generateTheme:()=>oi,getTheme:()=>oe,setTheme:()=>Ur,themeApply:()=>Kr,themeCSS:()=>Ut,themeColor:()=>l,themeColorToken:()=>Zt,themeDensity:()=>b,themeFluidSpacing:()=>Yr,themeName:()=>lt,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>Jo,themeVars:()=>at});var Rr=e=>{let t=n=>{let o=Math.max(0,Math.min(1,n)),i=o<=.0031308?12.92*o:1.055*Math.pow(o,1/2.4)-.055;return Math.max(0,Math.min(255,Math.round(i*255)))};return e.map(t)},$r=e=>{let t=n=>n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;return e.map(t)},Ir=e=>{let[t,n,o]=Rr(e);return t=t.toString(16).padStart(2,"0"),n=n.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),`#${t}${n}${o}`},rt=e=>{let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return $r([t,n,o])},zr=e=>{let t=.4122214708*e[0]+.5363325363*e[1]+.0514459929*e[2],n=.2119034982*e[0]+.6806995451*e[1]+.1073969566*e[2],o=.0883024619*e[0]+.2817188376*e[1]+.6299787005*e[2],i=Math.cbrt(t),r=Math.cbrt(n),a=Math.cbrt(o);return[.2104542553*i+.793617785*r-.0040720468*a,1.9779984951*i-2.428592205*r+.4505937099*a,.0259040371*i+.7827717662*r-.808675766*a]},Ar=e=>{let[t,n,o]=e,i=t+.3963377774*n+.2158037573*o,r=t-.1055613458*n-.0638541728*o,a=t-.0894841775*n-1.291485548*o,s=i*i*i,u=r*r*r,h=a*a*a;return[4.0767416621*s-3.3077115913*u+.2309699292*h,-1.2684380046*s+2.6097574011*u-.3413193965*h,-.0041960863*s-.7034186147*u+1.707614701*h]};var Ft=e=>{let[t,n,o]=e,i=.4124564*t+.3575761*n+.1804375*o,r=.2126729*t+.7151522*n+.072175*o,a=.0193339*t+.119192*n+.9503041*o,s=.95047,u=1,h=1.08883,m=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,d=m(i/s),p=m(r/u),v=m(a/h);return[116*p-16,500*(d-p),200*(p-v)]};var qo=(e,t)=>{let[n,o,i]=e,[r,a,s]=t,u=(n+r)/2,h=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+s*s),d=(h+m)/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),v=o*(1+p),f=a*(1+p),y=Math.sqrt(v*v+i*i),S=Math.sqrt(f*f+s*s),C=(y+S)/2,E=Math.atan2(i,v)*180/Math.PI+(Math.atan2(i,v)<0?360:0),w=Math.atan2(s,f)*180/Math.PI+(Math.atan2(s,f)<0?360:0),O=w-E;Math.abs(O)>180&&(O+=w<=E?360:-360);let M=Math.abs(E-w)>180?(E+w+360)/2:(E+w)/2,_=1-.17*Math.cos((M-30)*Math.PI/180)+.24*Math.cos(2*M*Math.PI/180)+.32*Math.cos((3*M+6)*Math.PI/180)-.2*Math.cos((4*M-63)*Math.PI/180),D=r-n,B=S-y,H=2*Math.sqrt(y*S)*Math.sin(O/2*Math.PI/180),j=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),pe=1+.045*C,Te=1+.015*C*_,ce=30*Math.exp(-Math.pow((M-275)/25,2)),W=-(2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7))))*Math.sin(2*ce*Math.PI/180);return Math.sqrt(Math.pow(D/j,2)+Math.pow(B/pe,2)+Math.pow(H/Te,2)+W*(B/pe)*(H/Te))};var Uo=e=>{if(e.length<1)return h=>0;let t=[...e].sort((h,m)=>h[0]-m[0]),n=[];for(let h=0;h<t.length;h++)(h===0||t[h][0]!==t[h-1][0])&&n.push(t[h]);let o=n.length;if(o===1)return h=>n[0][1];let i=n.map(h=>h[0]),r=n.map(h=>h[1]),a=[],s=[];for(let h=0;h<o-1;h++)a[h]=i[h+1]-i[h],s[h]=(r[h+1]-r[h])/a[h];let u=new Array(o);u[0]=s[0],u[o-1]=s[o-2];for(let h=1;h<o-1;h++){let m=s[h-1],d=s[h];if(m*d<=0)u[h]=0;else{let p=(1+a[h]/(a[h-1]+a[h]))/3;u[h]=m*d/((1-p)*m+p*d)}}return h=>{if(h<=i[0])return r[0];if(h>=i[o-1])return r[o-1];let m=0,d=o-2,p=0;for(;m<=d;){let w=Math.floor((m+d)/2);if(h>=i[w]&&h<=i[w+1]){p=w;break}h<i[w]?d=w-1:m=w+1}let v=a[p],f=(h-i[p])/v,y=f*f,S=y*f,C=u[p]*v,E=u[p+1]*v;return(2*S-3*y+1)*r[p]+(S-2*y+f)*C+(-2*S+3*y)*r[p+1]+(S-y)*E}};var Ko=.605,jt=.685;function Vr(e){let t=Math.pow(e,Ko);return t/(1+jt*(1-t))}function Br(e){let t=e*(1+jt)/(1+e*jt);return Math.pow(t,1/Ko)}function Nr(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function Hr(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>zr(p)).sort((p,v)=>p[0]-v[0]),n=t.map(p=>p[0]),o=t.map(p=>p[1]),i=t.map(p=>p[2]),r=[0],a=0;for(let p=1;p<t.length;p++)a+=Nr(t[p],t[p-1]),r.push(a);let s=r.map(p=>Br(a>0?p/a:0)),u=e.length===1?0:s[1],h=e.length===1?1:s[s.length-2],m=Uo(s.map((p,v)=>[p,o[v]])),d=Uo(s.map((p,v)=>[p,i[v]]));return{colorAtParam:p=>{let v=Vr(p),f=u+v*(h-u),y=0;for(let _=0;_<s.length-1;_++)if(f<=s[_+1]){y=_;break}let S=s[y],C=s[y+1],E=(f-S)/(C-S||1),w=n[y]+E*(n[y+1]-n[y]),O=m(f),M=d(f);return Ar([w,O,M])},parameters:s.slice(1,-1).map(p=>(p-u)/(h-u))}}function Yo(e,t){let n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("generateRamp requires at least one anchor color");if(t<=0)return[];if(t===1)return[n[0]];let{colorAtParam:o,parameters:i}=Hr(n.map(rt)),r=[],a=[0,...i,1],s=a.map(h=>Math.round(h*(t-1))),u=0;for(let h=0;h<t;h++){for(;u<s.length-2&&h>s[u+1];)u++;let m=s[u],d=s[u+1],p=a[u],v=a[u+1],f;if(d<=m)f=p;else{let y=(h-m)/(d-m);f=p+y*(v-p)}r.push(Ir(o(f)))}return r.reverse()}var jr={direction:"darken",colors:{primary:["#ffffff","#e3ecff","#c6daff","#aac8ff","#8fb6ff","#76a3ff","#5f91fc","#4a7ff4","#386ee7","#2a5ed7","#1e4ec2","#1440aa","#0c3290","#072674","#041a57","#020f38","#010419","#000000"],secondary:["#ffffff","#fce6ea","#faced6","#f7b5c2","#f29db0","#ec859e","#e36e8d","#d8597d","#ca456e","#b93460","#a42351","#8e1643","#770b36","#5f0529","#46031d","#2d0210","#130104","#000000"],info:["#ffffff","#dcf0f9","#b7e1f6","#90d2f1","#6ac3eb","#42b4e2","#16a4d5","#0094c4","#0084b2","#00739e","#00638a","#005476","#004461","#00354d","#002638","#001623","#00070d","#000000"],success:["#ffffff","#e3f3dc","#c6e8b8","#a9dd94","#8ed171","#75c450","#61b635","#51a51f","#429304","#358100","#2a7000","#215f00","#194d00","#123c00","#0b2b00","#051a00","#010900","#000000"],warning:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],attention:["#ffffff","#ffeada","#ffd3b3","#ffbd8d","#ffa96b","#ff9853","#ec8640","#d77531","#c16523","#aa5718","#944a0f","#7e3d09","#673106","#512504","#3b1a03","#250e02","#0e0401","#000000"],error:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],danger:["#ffffff","#fce7e4","#fbcfca","#f8b7b0","#f59f96","#ef877e","#e86f67","#de5852","#d3403e","#c5282c","#b30a1b","#9e000b","#860001","#6c0000","#510000","#340000","#170000","#000000"],highlight:["#ffffff","#f9f5cd","#f4eb95","#efe05a","#e6d427","#d3c100","#bfad00","#ab9b00","#988900","#857700","#736600","#615600","#4f4600","#3e3600","#2c2700","#1b1700","#090700","#000000"],neutral:["#ffffff","#ededed","#dbdbdb","#cacaca","#bababa","#ababab","#9b9b9b","#8d8d8d","#7e7e7e","#707070","#636363","#565656","#484848","#383838","#282828","#181818","#080808","#000000"]},baseTones:{highlight:5,warning:6,attention:6,error:8,danger:8,secondary:8,primary:9,info:8,success:8,neutral:8},fontSizes:["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],densities:[.75,1,1.5,2,2.5],darkBias:1,custom:{}},Ue=jr,Gt=e=>JSON.parse(JSON.stringify(e)),Xo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),Re={light:Gt(Ue),dark:qr(Ue)},it=null,Wt=new Map;function Xt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Fr(e){for(let t in e)if(!Object.keys(Ue).includes(t))throw new Error(`Invalid key: ${t}`);if(e.fontSizes&&!Array.isArray(e.fontSizes))throw new Error("fontSize must be array of string");if(e.densities&&(!Array.isArray(e.densities)||e.densities.some(t=>typeof t!="number")))throw new Error("densities must be array of number");if("custom"in e){let t=e.custom;if(typeof t!="object"||t===null)throw new Error("Invalid custom property: must be an object")}if("colors"in e){let t=e.colors;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(n=>Array.isArray(n)&&n.every(o=>typeof o=="string"))))throw new Error("colors must be an object of string[]")}if("baseTones"in e){let t=e.baseTones;if(!(typeof t=="object"&&t!==null&&Object.values(t).every(n=>typeof n=="number")))throw new Error("baseTones must be an object of number")}if("direction"in e&&e.direction!=="lighten"&&e.direction!=="darken")throw new Error('direction must be "lighten" or "darken"')}function Zo(e,t){var n;for(let o of Object.keys(t))o==="__proto__"||o==="constructor"||o==="prototype"||(t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((n=e[o])!=null||(e[o]={}),Zo(e[o],t[o])):e[o]=t[o])}function Wr(e,t){let n={},o=Xt(t);for(let r in t){let a=t[r];if(r==="colors")for(let s in t.colors)[...Array(o).keys()].forEach(u=>n[`--${s}-${u}`]=t.colors[s][u]);else if(r==="fontSizes")[...Array(8).keys()].forEach(s=>n[`--fontSize-${s}`]=t.fontSizes[s]);else if(r==="custom"&&a&&typeof a=="object")for(let s in a)n[`--custom-${Xo(s)}`]=a[s]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
|
|
3
3
|
`;return`[data-theme="${e}"] {
|
|
4
4
|
${i}}`}function oe(e){if(!Re[e])throw Error(`Theme "${e}" not found`);return Re[e]}function Ur(e,t){Fr(t),Re[e]||(Re[e]=Gt(Ue)),Zo(Re[e],t),it=null,Wt.clear()}function qr(e){let t=Gt(e);t.direction="lighten";for(let n in t.colors)t.colors[n].reverse(),t.baseTones[n]=t.colors[n].length-1-t.baseTones[n];return t}function Jo(e){let t=Wt.get(e);if(t)return t;let n=oe(e),o=Xt(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let s in n.colors){let u={};[...Array(o).keys()].forEach(h=>u[h]=n.colors[s][h]),i[s]=u}else if(r==="fontSizes")i.fontSizes=n.fontSizes;else if(r==="densities")i.densities=n.densities;else if(r==="custom"&&(i.custom={},a&&typeof a=="object"))for(let s in a)i.custom[s]=a[s]}return Wt.set(e,i),i}function at(){if(it)return it;let e=oe("light"),t=Xt(e),n={};for(let o in e){let i=e[o];if(o==="colors")for(let r in e.colors){let a={};[...Array(t).keys()].forEach(s=>a[s]=`var(--${r}-${s})`),n[r]=a}else if(o==="fontSizes")n.fontSizes=[...Array(8).keys()].map(r=>`var(--fontSize-${r})`);else if(o==="custom"&&(n.custom={},i&&typeof i=="object"))for(let r in i)n.custom[r]=`var(--custom-${Xo(r)})`}return it=n,n}function Ut(){return Object.entries(Re).map(([e,t])=>Wr(e,t)).join(`
|
|
5
|
-
`)}function Kr(e){var t;if(typeof document!="undefined")if(e){e.textContent=Ut();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Ut(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Yr(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,s=i-a*n/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function Gr(e=document.documentElement,t={}){let{persist:n=!0,storageKey:o="dp-theme"}=t,i=()=>{if(n){let s=localStorage.getItem(o);if(s==="light"||s==="dark")return s}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let r=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!n||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}function lt(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let n="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(n=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),n}var Xr=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],qt=["inherit"];[...Array(5).keys()].forEach(e=>{qt.push(`decrease-${e}`),qt.push(`increase-${e}`)});function Zr(e,t="inherit"){if(!qt.includes(t))throw Error(`density name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(4,n))}function Jr(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(n=Zr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function b(e){let t=Jr(e);return oe(e?lt(e):"light").densities[t]}var Qr=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ei=[.75,1,1.5,2,2.5];function ti(e,t){let n=Ft(rt(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=qo(n,Ft(rt(e[r])));a<i&&(i=a,o=r)}return o}function oi(e,t={}){var n,o,i,r,a,s;let u=(n=t.steps)!=null?n:18,h={},m={};for(let[d,p]of Object.entries(e)){let v=Yo(p,u);h[d]=v,m[d]=ti(v,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:h,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:Qr,densities:(r=t.densities)!=null?r:ei,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Kt=["inherit"];[...Array(8).keys()].forEach(e=>{Kt.push(`decrease-${e}`),Kt.push(`increase-${e}`)});function Qo(e,t="inherit"){if(!Kt.includes(t))throw Error(`size name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(7,n))}function ni(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(n=Qo(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function x(e,t="inherit"){let n=Qo(ni(e),t);return at().fontSizes[n]}var he=Ue.colors.neutral.length,Yt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},We=["inherit","base",...Object.keys(Yt)];[...Array(he).keys()].forEach(e=>{We.push(`decrease-${e}`),We.push(`increase-${e}`),We.push(`shift-${e}`)});function Go(e,t){if(e<0||e>he-1)return e;let n=e+t;return n=Math.max(0,Math.min(he-1,n)),n}function ri(e,t){if(e<0||e>he-1)return e;let n=Math.floor((he-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(he-1,o)),o}function qe(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!We.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Yt&&(t=Yt[t]),t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Go(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Go(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return ri(e,n)}else return e}function en(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let n=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(n=qe(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function tn(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===he-1?he-1-n:e}function l(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let s=at()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[oe("light").baseTones[o]]:s[qe(0,t)]}let i=lt(e),r;if(t==="base")r=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);r=qe(u,t)}let a=at()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Zt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?lt(e):"light",r=Jo(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[oe("light").baseTones[o]]:r[qe(0,t)];let a;if(t==="base")a=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);a=qe(u,t)}return r[a]}var Ct={};et(Ct,{abbreviation:()=>ii,accordion:()=>ai,alert:()=>li,avatar:()=>si,badge:()=>ci,blockquote:()=>ui,breadcrumb:()=>mi,breadcrumbEllipsis:()=>hi,button:()=>pi,buttonGhost:()=>Jt,buttonSwitch:()=>gi,card:()=>yi,code:()=>bi,combobox:()=>sa,command:()=>ca,commandItem:()=>ma,commandSearch:()=>ua,datePicker:()=>da,descriptionList:()=>ga,details:()=>ya,dialog:()=>ba,divider:()=>va,drawer:()=>Sa,emphasis:()=>xa,empty:()=>wa,errorBoundary:()=>Ca,fab:()=>Ea,figure:()=>_a,formGroup:()=>Ta,heading:()=>Ma,horizontalRule:()=>Pa,icon:()=>Da,image:()=>La,inputCheckbox:()=>Ra,inputColor:()=>$a,inputDateTime:()=>Ia,inputFile:()=>za,inputNumber:()=>Aa,inputOTP:()=>Ha,inputPassword:()=>Na,inputRadio:()=>ja,inputRange:()=>Fa,inputSearch:()=>Wa,inputSwitch:()=>Ua,inputText:()=>qa,keyboard:()=>Ka,label:()=>Ya,link:()=>Ga,linkButton:()=>Xa,list:()=>Za,listItem:()=>Ja,listItemButton:()=>Qa,mark:()=>el,menu:()=>tl,motion:()=>ol,orderedList:()=>nl,pagination:()=>il,panelSection:()=>al,paragraph:()=>ll,popover:()=>sl,popoverArrow:()=>uo,preformated:()=>cl,progress:()=>ul,rating:()=>dl,ringProgress:()=>fl,row:()=>mo,scrollArea:()=>pl,segmented:()=>gl,select:()=>yl,selectBox:()=>bl,selectItem:()=>vl,selectList:()=>Sl,skeleton:()=>xl,small:()=>wl,spinner:()=>Cl,splitter:()=>kl,splitterHandle:()=>_l,splitterPanel:()=>El,stack:()=>Tl,steps:()=>Ol,strong:()=>Ml,subscript:()=>Pl,superscript:()=>Dl,table:()=>Ll,tabs:()=>Rl,tag:()=>Ge,textarea:()=>$l,timeline:()=>Il,timelineItem:()=>zl,toast:()=>Al,toggleGroup:()=>Vl,toolbar:()=>Bl,toolbarSpacer:()=>Nl,tooltip:()=>Hl,transitionGroup:()=>jl,unorderedList:()=>Fl});function ii(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:r=>x(r),backgroundColor:r=>l(r),color:r=>l(r,"shift-10",t.get(r)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:r=>l(r,"shift-7",t.get(r)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:r=>l(r,"shift-11",n.get(r)),textDecorationColor:r=>l(r,"shift-9",n.get(r))}}}}function ai(e={}){var i,r;let{type:t="single"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=h=>{let m=h.target.closest("summary");if(!m)return;let d=m.closest("details");!d||d.parentElement!==s||d.open||Array.from(s.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`}}}}function li(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function si(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function ci(e={}){var i;let{label:t=999}=e,n=g(t),o=g((i=e.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:r=>`"${n.get(r)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1),minWidth:c(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>x(r,"decrease-1"),borderRadius:c(999),backgroundColor:r=>l(r,"shift-9",o.get(r)),color:r=>l(r,"shift-0",o.get(r))}}}}function ui(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function mi(e={}){var o;let{separator:t="/"}=e,n=g((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>l(i,"text",n.get(i)),backgroundColor:i=>l(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",n.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function hi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"muted",t.get(o)),borderRadius:c(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:c(.5)}}}}var ct={small:"decrease-1",medium:"inherit",large:"increase-1"};function $(e,t="primary"){return`0 0 0 2px ${l(e,"shift-6",t)}`}var di={small:.5,medium:1,large:1.5};function Jt(e={}){var i,r,a;let t=g((i=e.color)!=null?i:"neutral","color"),n=di[(r=e.size)!=null?r:"medium"],o=ct[(a=e.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>x(s,o),paddingBlock:s=>c(b(s)*n),paddingInline:s=>c(b(s)*n),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>l(s,"shift-6",t.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"hover",t.get(s))},"&:focus-visible":{boxShadow:s=>$(s,t.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>l(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var fi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function pi(e={}){var a,s,u,h;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return Jt({color:e.color,size:e.size});let n=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=fi[(u=e.size)!=null?u:"medium"],r=ct[(h=e.size)!=null?h:"medium"];return{_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:m=>x(m,r),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${l(m,"border-strong",n.get(m))}`,color:m=>o?l(m,"shift-0",n.get(m)):l(m,"text",n.get(m)),backgroundColor:m=>o?l(m,"shift-9",n.get(m)):l(m,"inherit",n.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?l(m,"shift-0",n.get(m)):l(m,"shift-10",n.get(m)),backgroundColor:m=>o?l(m,"shift-10",n.get(m)):l(m,"hover",n.get(m))},"&:focus-visible":{boxShadow:m=>$(m,n.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function gi(e={}){var r,a;let{checked:t=!1}=e,n=g(t),o=g((r=e.color)!=null?r:"neutral","color"),i=g((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>x(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${l(s,"border",o.get(s))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>l(s,"inherit",o.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:s=>l(s,"text"),backgroundColor:s=>l(s,"decrease-2",o.get(s))},"&[aria-checked=true]":{backgroundColor:s=>l(s,"increase-3",i.get(s)),outline:"none",color:s=>l(s,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function yi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(b(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function bi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var vi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function A(e){return vi[e]}var Si=Object.defineProperty,xi=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,on=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))dn.call(t,n)&&on(e,n,t[n]);if(mt)for(var n of mt(t))fn.call(t,n)&&on(e,n,t[n]);return e},we=(e,t)=>xi(e,wi(t)),pn=(e,t)=>{var n={};for(var o in e)dn.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&mt)for(var o of mt(e))t.indexOf(o)<0&&fn.call(e,o)&&(n[o]=e[o]);return n},Ee=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{s(n.next(u))}catch(h){i(h)}},a=u=>{try{s(n.throw(u))}catch(h){i(h)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);s((n=n.apply(e,t)).next())}),Ci=["top","right","bottom","left"],nn=["start","end"],Qs=Ci.reduce((e,t)=>e.concat(t,`${t}-${nn[0]}`,`${t}-${nn[1]}`),[]),ht=Math.min,xe=Math.max,dt=Math.round,ut=Math.floor,ne=e=>({x:e,y:e}),ki={left:"right",right:"left",bottom:"top",top:"bottom"};function rn(e,t,n){return xe(e,ht(t,n))}function gt(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function gn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function de(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function bn(e){return gn(de(e))}function Ei(e,t,n=!1){let o=yt(e),i=bn(e),r=yn(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ft(a)),[a,ft(a)]}function _i(e){let t=ft(e);return[to(e),t,to(t)]}function to(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var an=["left","right"],ln=["right","left"],Ti=["top","bottom"],Oi=["bottom","top"];function Mi(e,t,n){switch(e){case"top":case"bottom":return n?t?ln:an:t?an:ln;case"left":case"right":return t?Ti:Oi;default:return[]}}function Pi(e,t,n,o){let i=yt(e),r=Mi(Ce(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(to)))),r}function ft(e){let t=Ce(e);return ki[t]+e.slice(t.length)}function Di(e){return J({top:0,right:0,bottom:0,left:0},e)}function Li(e){return typeof e!="number"?Di(e):{top:e,right:e,bottom:e,left:e}}function pt(e){let{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function sn({reference:e,floating:t},n,o){let i=de(n),r=bn(n),a=yn(r),s=Ce(n),u=i==="y",h=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(s){case"top":p={x:h,y:e.y-t.height};break;case"bottom":p={x:h,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:m};break;case"left":p={x:e.x-t.width,y:m};break;default:p={x:e.x,y:e.y}}switch(yt(n)){case"start":p[r]-=d*(o&&u?-1:1);break;case"end":p[r]+=d*(o&&u?-1:1);break;default:}return p}function Ri(e){return Ee(this,arguments,function*(t,n={}){var o,i,r,a,s,u;let{x:h,y:m,platform:d,rects:p,elements:v,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:S="viewport",elementContext:C="floating",altBoundary:E=!1,padding:w=0}=gt(n,t),O=Li(w),M=v[E?C==="floating"?"reference":"floating":C],_=pt(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,M))==null||i?M:M.contextElement||(yield(r=d.getDocumentElement)==null?void 0:r.call(d,v.floating)),boundary:y,rootBoundary:S,strategy:f})),D=C==="floating"?{x:h,y:m,width:p.floating.width,height:p.floating.height}:p.reference,B=yield(a=d.getOffsetParent)==null?void 0:a.call(d,v.floating),H=(yield(s=d.isElement)==null?void 0:s.call(d,B))?(yield(u=d.getScale)==null?void 0:u.call(d,B))||{x:1,y:1}:{x:1,y:1},j=pt(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:v,rect:D,offsetParent:B,strategy:f}):D);return{top:(_.top-j.top+O.top)/H.y,bottom:(j.bottom-_.bottom+O.bottom)/H.y,left:(_.left-j.left+O.left)/H.x,right:(j.right-_.right+O.right)/H.x}})}var $i=50,Ii=(e,t,n)=>Ee(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,u=s.detectOverflow?s:we(J({},s),{detectOverflow:Ri}),h=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=sn(m,i,h),v=i,f=0,y={};for(let S=0;S<a.length;S++){let C=a[S];if(!C)continue;let{name:E,fn:w}=C,{x:O,y:M,data:_,reset:D}=yield w({x:d,y:p,initialPlacement:i,placement:v,strategy:r,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});d=O!=null?O:d,p=M!=null?M:p,y[E]=J(J({},y[E]),_),D&&f<$i&&(f++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(m=D.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:r}):D.rects),{x:d,y:p}=sn(m,v,h)),S=-1)}return{x:d,y:p,placement:v,strategy:r,middlewareData:y}});var zi=(e={})=>({name:"flip",options:e,fn(t){return Ee(this,null,function*(){var n,o,i,r,a,s;let{placement:u,middlewareData:h,rects:m,initialPlacement:d,platform:p,elements:v}=t,f=gt(e,t),{mainAxis:y=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,M=pn(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=h.arrow)!=null&&n.alignmentOffset)return{};let _=Ce(u),D=de(d),B=Ce(d)===d,H=yield(o=p.isRTL)==null?void 0:o.call(p,v.floating),j=C||(B||!O?[ft(d)]:_i(d)),pe=w!=="none";!C&&pe&&j.push(...Pi(d,O,w,H));let Te=[d,...j],ce=yield p.detectOverflow(t,M),W=[],ae=((i=h.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ce[_]),S){let le=Ei(u,m,H);W.push(ce[le[0]],ce[le[1]])}if(ae=[...ae,{placement:u,overflows:W}],!W.every(le=>le<=0)){let le=(((r=h.flip)==null?void 0:r.index)||0)+1,Be=Te[le];if(Be&&(!(S==="alignment"&&D!==de(Be))||ae.every(q=>de(q.placement)===D?q.overflows[0]>0:!0)))return{data:{index:le,overflows:ae},reset:{placement:Be}};let ge=(a=ae.filter(q=>q.overflows[0]<=0).sort((q,X)=>q.overflows[1]-X.overflows[1])[0])==null?void 0:a.placement;if(!ge)switch(E){case"bestFit":{let q=(s=ae.filter(X=>{if(pe){let Z=de(X.placement);return Z===D||Z==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Z=>Z>0).reduce((Z,Ne)=>Z+Ne,0)]).sort((X,Z)=>X[1]-Z[1])[0])==null?void 0:s[0];q&&(ge=q);break}case"initialPlacement":ge=d;break;default:}if(u!==ge)return{reset:{placement:ge}}}return{}})}});var Ai=new Set(["left","top"]);function Vi(e,t){return Ee(this,null,function*(){var n;let{placement:o,platform:i,elements:r}=e,a=yield(n=i.isRTL)==null?void 0:n.call(i,r.floating),s=Ce(o),u=yt(o),h=de(o)==="y",m=Ai.has(s)?-1:1,d=a&&h?-1:1,p=gt(t,e),{mainAxis:v,crossAxis:f,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(f=u==="end"?y*-1:y),h?{x:f*d,y:v*m}:{x:v*m,y:f*d}})}var Bi=(e=0)=>({name:"offset",options:e,fn(t){return Ee(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:s}=t,u=yield Vi(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:we(J({},u),{placement:a})}})}}),Ni=(e={})=>({name:"shift",options:e,fn(t){return Ee(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=gt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:h={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=pn(a,["mainAxis","crossAxis","limiter"]),d={x:n,y:o},p=yield r.detectOverflow(t,m),v=de(Ce(i)),f=gn(v),y=d[f],S=d[v];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],M=y-p[w];y=rn(O,y,M)}if(u){let E=v==="y"?"top":"left",w=v==="y"?"bottom":"right",O=S+p[E],M=S-p[w];S=rn(O,S,M)}let C=h.fn(we(J({},t),{[f]:y,[v]:S}));return we(J({},C),{data:{x:C.x-n,y:C.y-o,enabled:{[f]:s,[v]:u}}})})}});function bt(){return typeof window!="undefined"}function ze(e){return vn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function re(e){var t;return(t=(vn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vn(e){return bt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return bt()?e instanceof Element||e instanceof Y(e).Element:!1}function se(e){return bt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function cn(e){return!bt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ye(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function Hi(e){return/^(table|td|th)$/.test(ze(e))}function vt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var ji=/transform|translate|scale|rotate|perspective|filter/,Fi=/paint|layout|strict|content/,Se=e=>!!e&&e!=="none",Qt;function no(e){let t=Q(e)?ee(e):e;return Se(t.transform)||Se(t.translate)||Se(t.scale)||Se(t.rotate)||Se(t.perspective)||!ro()&&(Se(t.backdropFilter)||Se(t.filter))||ji.test(t.willChange||"")||Fi.test(t.contain||"")}function Wi(e){let t=fe(e);for(;se(t)&&!Ie(t);){if(no(t))return t;if(vt(t))return null;t=fe(t)}return null}function ro(){return Qt==null&&(Qt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qt}function Ie(e){return/^(html|body|#document)$/.test(ze(e))}function ee(e){return Y(e).getComputedStyle(e)}function St(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ze(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cn(e)&&e.host||re(e);return cn(t)?t.host:t}function Sn(e){let t=fe(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ye(t)?t:Sn(t)}function Ke(e,t=[],n=!0){var o;let i=Sn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(r){let s=oo(a);return t.concat(a,a.visualViewport||[],Ye(i)?i:[],s&&n?Ke(s):[])}else return t.concat(i,Ke(i,[],n))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){let t=ee(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=se(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,s=dt(n)!==r||dt(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function io(e){return Q(e)?e:e.contextElement}function $e(e){let t=io(e);if(!se(t))return ne(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=xn(t),a=(r?dt(n.width):n.width)/o,s=(r?dt(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Ui=ne(0);function wn(e){let t=Y(e);return!ro()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qi(e,t=!1,n){return!n||t&&n!==Y(e)?!1:t}function ke(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=io(e),a=ne(1);t&&(o?Q(o)&&(a=$e(o)):a=$e(e));let s=qi(r,n,o)?wn(r):ne(0),u=(i.left+s.x)/a.x,h=(i.top+s.y)/a.y,m=i.width/a.x,d=i.height/a.y;if(r){let p=Y(r),v=o&&Q(o)?Y(o):o,f=p,y=oo(f);for(;y&&o&&v!==f;){let S=$e(y),C=y.getBoundingClientRect(),E=ee(y),w=C.left+(y.clientLeft+parseFloat(E.paddingLeft))*S.x,O=C.top+(y.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,h*=S.y,m*=S.x,d*=S.y,u+=w,h+=O,f=Y(y),y=oo(f)}}return pt({width:m,height:d,x:u,y:h})}function xt(e,t){let n=St(e).scrollLeft;return t?t.left+n:ke(re(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-xt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Ki({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=re(n),a=e?vt(e.floating):!1;if(n===r||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),h=ne(0),m=se(n);if((m||!m&&!i)&&((ze(n)!=="body"||Ye(r))&&(s=St(n)),m)){let p=ke(n);u=$e(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}let d=r&&!m&&!i?Cn(r,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+h.x+d.x,y:t.y*u.y-s.scrollTop*u.y+h.y+d.y}}function Yi(e){return Array.from(e.getClientRects())}function Gi(e){let t=re(e),n=St(e),o=e.ownerDocument.body,i=xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+xt(e),s=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=xe(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}var un=25;function Xi(e,t){let n=Y(e),o=re(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){r=i.width,a=i.height;let m=ro();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let h=xt(o);if(h<=0){let m=o.ownerDocument,d=m.body,p=getComputedStyle(d),v=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-d.clientWidth-v);f<=un&&(r-=f)}else h<=un&&(r+=h);return{width:r,height:a,x:s,y:u}}function Zi(e,t){let n=ke(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=se(e)?$e(e):ne(1),a=e.clientWidth*r.x,s=e.clientHeight*r.y,u=i*r.x,h=o*r.y;return{width:a,height:s,x:u,y:h}}function mn(e,t,n){let o;if(t==="viewport")o=Xi(e,n);else if(t==="document")o=Gi(re(e));else if(Q(t))o=Zi(t,n);else{let i=wn(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return pt(o)}function kn(e,t){let n=fe(e);return n===t||!Q(n)||Ie(n)?!1:ee(n).position==="fixed"||kn(n,t)}function Ji(e,t){let n=t.get(e);if(n)return n;let o=Ke(e,[],!1).filter(s=>Q(s)&&ze(s)!=="body"),i=null,r=ee(e).position==="fixed",a=r?fe(e):e;for(;Q(a)&&!Ie(a);){let s=ee(a),u=no(a);!u&&s.position==="fixed"&&(i=null),(r?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ye(a)&&!u&&kn(e,a))?o=o.filter(h=>h!==a):i=s,a=fe(a)}return t.set(e,o),o}function Qi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?vt(e)?[]:Ji(e,this._c):[].concat(t),n],r=mn(e,i[0],o),a=r.top,s=r.right,u=r.bottom,h=r.left;for(let m=1;m<i.length;m++){let d=mn(e,i[m],o);a=xe(d.top,a),s=ht(d.right,s),u=ht(d.bottom,u),h=xe(d.left,h)}return{width:s-h,height:u-a,x:h,y:a}}function ea(e){let{width:t,height:n}=xn(e);return{width:t,height:n}}function ta(e,t,n){let o=se(t),i=re(t),r=n==="fixed",a=ke(e,!0,r,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function h(){u.x=xt(i)}if(o||!o&&!r)if((ze(t)!=="body"||Ye(i))&&(s=St(t)),o){let v=ke(t,!0,r,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else i&&h();r&&!o&&i&&h();let m=i&&!o&&!r?Cn(i,s):ne(0),d=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:d,y:p,width:a.width,height:a.height}}function eo(e){return ee(e).position==="static"}function hn(e,t){if(!se(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return re(e)===n&&(n=n.ownerDocument.body),n}function En(e,t){let n=Y(e);if(vt(e))return n;if(!se(e)){let i=fe(e);for(;i&&!Ie(i);){if(Q(i)&&!eo(i))return i;i=fe(i)}return n}let o=hn(e,t);for(;o&&Hi(o)&&eo(o);)o=hn(o,t);return o&&Ie(o)&&eo(o)&&!no(o)?n:o||Wi(e)||n}var oa=function(e){return Ee(this,null,function*(){let t=this.getOffsetParent||En,n=this.getDimensions,o=yield n(e.floating);return{reference:ta(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function na(e){return ee(e).direction==="rtl"}var ra={convertOffsetParentRelativeRectToViewportRelativeRect:Ki,getDocumentElement:re,getClippingRect:Qi,getOffsetParent:En,getElementRects:oa,getClientRects:Yi,getDimensions:ea,getScale:$e,isElement:Q,isRTL:na};function _n(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ia(e,t){let n=null,o,i=re(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(s=!1,u=1){r();let h=e.getBoundingClientRect(),{left:m,top:d,width:p,height:v}=h;if(s||t(),!p||!v)return;let f=ut(d),y=ut(i.clientWidth-(m+p)),S=ut(i.clientHeight-(d+v)),C=ut(m),E={rootMargin:`${-f}px ${-y}px ${-S}px ${-C}px`,threshold:xe(0,ht(1,u))||1},w=!0;function O(M){let _=M[0].intersectionRatio;if(_!==u){if(!w)return a();_?a(!1,_):o=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!_n(h,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(O,we(J({},E),{root:i.ownerDocument}))}catch(M){n=new IntersectionObserver(O,E)}n.observe(e)}return a(!0),r}function Tn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,h=io(e),m=i||r?[...h?Ke(h):[],...t?Ke(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),r&&C.addEventListener("resize",n)});let d=h&&s?ia(h,n):null,p=-1,v=null;a&&(v=new ResizeObserver(([C])=>{C&&C.target===h&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{v==null||v.observe(t)})),n()}),h&&!u&&v.observe(h),t&&v.observe(t));let f,y=u?ke(e):null;u&&S();function S(){let C=ke(e);y&&!_n(y,C)&&n(),y=C,f=requestAnimationFrame(S)}return n(),()=>{m.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),d==null||d(),v==null||v.disconnect(),v=null,u&&cancelAnimationFrame(f)}}var On=Bi;var Mn=Ni,Pn=zi;var Dn=(e,t,n)=>{let o=new Map,i=J({platform:ra},n),r=we(J({},i.platform),{_c:o});return Ii(e,t,we(J({},i),{platform:r}))};function aa(e,t){var M;let{openState:n,placement:o,content:i,keepOpenOnContentHover:r}=t,a=null,s=null,u=null,h=null,m=!1,d=e.domElement,p=e.getRoot(),v={style:{position:"fixed",pointerEvents:"auto",visibility:_=>n.get(_)?"visible":"hidden"},onKeyDown:_=>{_.key==="Escape"&&w()},onMouseEnter:()=>r&&E(),onMouseLeave:()=>r&&w(),_onMount:_=>{var D;if(u=_.domElement,d&&u&&!u.hasAttribute("data-theme")){let B=(D=d.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");B&&u.setAttribute("data-theme",B)}},_portal:_=>{let D=_.domElement.querySelector("#domphy-floating");if(!D){let B={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};D=_.children.insert(B).domElement}return D}},f=_=>I(_,v);f(i);let y=()=>{m||(m=!0,h=p.children.insert(i))},S=()=>{y(),d&&u&&(s==null||s(),s=Tn(d,u,()=>{Dn(d,u,{placement:o.get(),middleware:[On(12),Pn(),Mn()],strategy:"fixed"}).then(({x:_,y:D,placement:B})=>{u&&(Object.assign(u.style,{left:`${_}px`,top:`${D}px`}),o.set(B))})}),n.set(!0))},C=()=>{s==null||s(),s=null,h&&(h.remove(),h=null),u=null,m=!1,n.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(C,100)},O=_=>{if(!n.get()||!d||!u)return;let D=_.target;!d.contains(D)&&!u.contains(D)&&w()};return(M=p.domElement)==null||M.addEventListener("click",O),{show:E,hide:w,update(_){n=_.openState,o=_.placement,i=_.content,r=_.keepOpenOnContentHover,f(i),h&&h.patch(i)},destroy(){var _;a&&clearTimeout(a),s==null||s(),h==null||h.remove(),(_=p.domElement)==null||_.removeEventListener("click",O)}}}function ie(e){let{kind:t,open:n=!1,placement:o}=e,i=g(n),r=`floating:${t}`,a=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.show()},s=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.hide()},u=N({onKeyDown:(h,m)=>h.key==="Escape"&&s(m)},Nt(r,aa,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var la='<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 Ge(e={}){var o;let{removable:t=!1}=e,n=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let r={span:la,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,"&:hover":{backgroundColor:a=>l(a,"shift-4",n.get(a))}}};t&&i.children.insert(r)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(1),paddingInlineStart:c(2),paddingInlineEnd:t?c(1):c(2),gap:c(2),fontSize:i=>x(i,"inherit"),backgroundColor:i=>l(i,"inherit",n.get(i)),color:i=>l(i,"text",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",n.get(i))}`}}}function sa(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"combobox",open:s,placement:g(n),content:e.content}),d={onClick:(S,C)=>!r&&h(C),dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)},v;if(e.input){let S={onFocus:(C,E)=>u(E),style:p,_key:"combobox-input"};I(e.input,S),v=e.input}else v={input:null,onFocus:(S,C)=>u(C),value:S=>(a.get(S),""),style:p,_key:"combobox-input"};let f={div:S=>{let C=a.get(S),E=Array.isArray(C)?C:[C],O=t.filter(M=>E.includes(M.value)).map(M=>({span:M.label,$:[Ge({color:o,removable:!0})],_key:M.value,_onRemove:_=>{let D=a.get(),H=(Array.isArray(D)?D:[D]).filter(j=>j!==M.value);r?a.set(H):a.set(H[0])}}));return O.push(v),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},y={_onInsert:S=>{S.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:S=>S.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:S=>`1px solid ${l(S,"border-strong","neutral")}`,paddingBlock:S=>c(b(S)*1),paddingInline:S=>c(b(S)*1),borderRadius:S=>c(b(S)*1.5),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)}};return I(m,y),m}function ca(){return{_onSchedule:(e,t)=>{I(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ua(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let r=o.domElement,a=()=>i.query.set(r.value);r.addEventListener("input",a),o.addHook("Remove",()=>r.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"border",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},"&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",n)}}}}function ma(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var h,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let r=o.domElement,a=(m=(h=r.textContent)==null?void 0:h.toLowerCase())!=null?m:"",s=d=>{r.hidden=d.length>0&&!a.includes(d.toLowerCase())};s(i.query.get());let u=i.query.addListener(s);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",n)}`,outlineOffset:`-${c(.5)}`}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),_e=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),ao=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Xe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),lo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,so=(e,t)=>_e(e,-((e.getDay()-t+7)%7));function ha(e){var t,n;try{let o=new Intl.Locale(e),i=(n=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?n:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function da(e={}){var ho,fo,po,go;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,h=(ho=e.weekStartsOn)!=null?ho:ha(a),m=g((fo=e.accentColor)!=null?fo:"primary","accentColor"),d=g((po=e.placement)!=null?po:"bottom-start"),p=g((go=e.value)!=null?go:t==="range"?[null,null]:null),v=u?p.addListener(k=>u(k)):null,f=(()=>{let k=p.get(),T=t==="range"?k==null?void 0:k[0]:k;return T instanceof Date?T:new Date})(),y=g(f.getFullYear(),"viewYear"),S=g(f.getMonth(),"viewMonth"),C=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),M=null,_=new Intl.DateTimeFormat(a,N({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),B=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=k=>k?_.format(k):"",pe=k=>{if(s)return s(k);if(t==="range"){let[T,P]=k!=null?k:[null,null];return T?`${j(T)} \u2013 ${j(P)}`:""}return j(k)},Te=Array.from({length:7},(k,T)=>B.format(new Date(2023,0,1+(T+h)%7))),ce=k=>!!o&&F(k)<F(o)||!!i&&F(k)>F(i)||!!r&&r(k),W=k=>{if(!n)return F(k);let T=F(k);return T.setHours(w.get(),O.get(),0,0),T},ae=k=>{var L;if(ce(k))return;if(t==="single"){p.set(W(k)),n||Et();return}let[T,P]=(L=p.get())!=null?L:[null,null];!T||T&&P?p.set([W(k),null]):F(k)<F(T)?(p.set([W(k),W(T)]),n||Et()):(p.set([T,W(k)]),n||Et())},le=()=>{var k;if(n)if(t==="single"){let T=p.get();T&&p.set(W(T))}else{let[T,P]=(k=p.get())!=null?k:[null,null];p.set([T&&W(T),P&&W(P)])}},Be=(k,T)=>{var Oe;if(t!=="range")return!1;let[P,L]=(Oe=p.get(T))!=null?Oe:[null,null],z=L!=null?L:E.get(T);if(!P||!z)return!1;let R=F(P)<=F(z)?P:z,G=F(P)<=F(z)?z:P,K=F(k);return K>=F(R)&&K<=F(G)},ge=(k,T)=>{let P=p.get(T);if(t==="range"){let[L,z]=P!=null?P:[null,null];return Xe(k,L)||Xe(k,z)}return Xe(k,P)},q=k=>{y.set(k.getFullYear()),S.set(k.getMonth())},X=k=>{let T=ao(new Date(y.get(),S.get(),1),k);q(T)},Z=k=>y.set(y.get()+k),Ne=()=>{setTimeout(()=>{var k;(k=M==null?void 0:M.querySelector(`[data-date="${lo(C.get())}"]`))==null||k.focus()},0)},Nn=Un(),{show:Hn,hide:jn,anchorPartial:kt}=ie({kind:"datePicker",open:!1,placement:d,content:Nn});function Et(){jn()}kt.onClick=()=>{};let Fn={type:"text",readonly:!0,value:k=>pe(p.get(k)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(k,T)=>{_t(T)},onFocus:(k,T)=>{_t(T)},onKeyDown:(k,T)=>{let P=k.key;(P==="ArrowDown"||P==="Enter")&&(k.preventDefault(),_t(T))},_onMount:k=>v&&k.addHook("Remove",()=>{v()})};function _t(k){var P;let T=(P=Wn())!=null?P:new Date;C.set(F(T)),q(T),Hn(k),Ne()}function Wn(){var T;let k=p.get();return t==="range"?(T=k==null?void 0:k[0])!=null?T:null:k!=null?k:null}return I(kt,Fn),kt;function Un(){let k=(R,G,K)=>({button:R,type:"button",ariaLabel:G,onClick:K,style:fa()}),T={div:[k("\xAB","Previous year",()=>Z(-1)),k("\u2039","Previous month",()=>X(-1)),{div:R=>D.format(new Date(y.get(R),S.get(R),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:R=>x(R)}},k("\u203A","Next month",()=>X(1)),k("\xBB","Next year",()=>Z(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},P={div:Te.map((R,G)=>({div:R,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"600",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:Ln()},L={div:R=>qn(R),role:"grid",ariaLabel:"Calendar",onKeyDown:Xn,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},z=[T,P,L];return n&&z.push(Yn()),z.push(Gn()),{div:z,role:"dialog",ariaModal:"false",_onMount:R=>{M=R.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:R=>c(b(R)*2),backgroundColor:R=>l(R,"base"),color:R=>l(R,"shift-10"),border:R=>`1px solid ${l(R,"border-strong")}`,boxShadow:A("medium")}}}function qn(k){let T=new Date(y.get(k),S.get(k),1),P=S.get(k),L=so(T,h),z=[];for(let R=0;R<6;R++){let G=[];for(let K=0;K<7;K++){let Oe=_e(L,R*7+K);G.push(Kn(Oe,P,k))}z.push({div:G,role:"row",style:Ln(),_key:R})}return z}function Kn(k,T,P){let L=ce(k),z=ge(k,P),R=Be(k,P),G=k.getMonth()!==T,K=Xe(k,C.get(P)),Oe=Xe(k,new Date);return{button:String(k.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:z,ariaDisabled:L,disabled:L,ariaLabel:H.format(k),dataDate:lo(k),onClick:()=>ae(k),onMouseEnter:()=>t==="range"&&E.set(k),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:V=>x(V),fontFamily:"inherit",opacity:L?.35:G?.5:1,backgroundColor:V=>z?l(V,"shift-7",m.get(V)):R?l(V,"hover",m.get(V)):"transparent",color:V=>z?l(V,"shift-0",m.get(V)):l(V,"text"),outline:Oe?V=>`1px solid ${l(V,"shift-6",m.get(V))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:V=>z?l(V,"shift-7",m.get(V)):l(V,"shift-3",m.get(V))},"&:focus-visible":{outline:V=>`2px solid ${l(V,"shift-6",m.get(V))}`}},_key:lo(k)}}function Yn(){let k=(T,P,L)=>({select:Array.from({length:T},(z,R)=>({option:String(R).padStart(2,"0"),value:String(R),selected:G=>P.get(G)===R,_key:R})),ariaLabel:L,onChange:z=>{P.set(Number(z.target.value)),le()},style:pa()});return{div:[k(24,w,"Hour"),{span:":",style:{fontWeight:"600"}},k(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Gn(){let k=(T,P)=>({button:T,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>x(L,"decrease-1"),color:L=>l(L,"muted",m.get(L)),padding:c(1)}});return{div:[k("Today",()=>{let T=new Date;C.set(F(T)),q(T),Ne()}),k("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:T=>`1px solid ${l(T,"border")}`}}}function Xn(k){let T=k,P=C.get(),L=null;switch(T.key){case"ArrowLeft":L=_e(P,-1);break;case"ArrowRight":L=_e(P,1);break;case"ArrowUp":L=_e(P,-7);break;case"ArrowDown":L=_e(P,7);break;case"Home":L=so(P,h);break;case"End":L=_e(so(P,h),6);break;case"PageUp":L=ao(P,T.shiftKey?-12:-1);break;case"PageDown":L=ao(P,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),ae(P);return;default:return}T.preventDefault(),C.set(L),q(L),Ne()}}function Ln(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function fa(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>l(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function pa(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${l(e,"border-strong")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"text")}}function ga(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}}function ya(e={}){var i,r;let{duration:t=240}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",n.get(a)),color:a=>l(a,"shift-10",n.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(b(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:`-${c(.5)}`,borderInlineEnd:a=>`${c(.5)} solid ${l(a,"shift-9",n.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(b(a)*2),outlineOffset:`-${c(.5)}`,outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:c(250),opacity:1,paddingTop:a=>c(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var Ze=0;function wt(){Ze++,Ze===1&&(document.body.style.overflow="hidden")}function Ae(){Ze=Math.max(0,Ze-1),Ze===0&&(document.body.style.overflow="")}var Rn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ba(e={}){let{color:t="neutral",open:n=!1}=e,o=g(n),i=null,r=!1,a=!1,s=u=>{r=!1,u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Ae(),a=!1),i==null||i.focus(),i=null};return{_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(u,h)=>{if(u.target!==h.domElement)return;let m=h.domElement.getBoundingClientRect();u.clientX>=m.left&&u.clientX<=m.right&&u.clientY>=m.top&&u.clientY<=m.bottom||o.set(!1)},onTransitionEnd:(u,h)=>{r&&u.target===h.domElement&&u.propertyName==="opacity"&&s(h.domElement)},_onMount:u=>{let h=u.domElement;h.setAttribute("aria-modal","true");let m=null,d=y=>{if(y.key!=="Tab")return;let S=Array.from(h.querySelectorAll(Rn)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!S.length){y.preventDefault();return}let C=S[0],E=S[S.length-1];y.shiftKey?(document.activeElement===C||document.activeElement===h)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),C.focus())},p=y=>{y.preventDefault(),o.set(!1)};h.addEventListener("cancel",p);let v=y=>{y?(i=document.activeElement,h.style.visibility="visible",h.style.pointerEvents="auto",h.showModal(),a||(wt(),a=!0),h.addEventListener("keydown",d),requestAnimationFrame(()=>{h.style.opacity="1";let S=h.querySelector(Rn);S==null||S.focus()})):(r=!0,h.style.opacity="0",h.removeEventListener("keydown",d),m=setTimeout(()=>{m=null,r&&s(h)},350))};v(o.get());let f=o.addListener(v);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),h.removeEventListener("cancel",p),a&&(Ae(),a=!1),h.removeEventListener("keydown",d),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:u=>x(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",borderRadius:u=>c(b(u)*2),padding:u=>c(b(u)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function va(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},$n={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Je=e=>e==="left"||e==="right";function In(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Sa(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=g(n),a=o==="start"||o==="end",s=In(o,!1),u=Je(s)?c(80):c(64),h=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,d)=>{m.target===d.domElement&&r.set(!1)},_onMount:m=>{let d=m.domElement;d.setAttribute("aria-modal","true");let p=_=>{_.preventDefault(),r.set(!1)};d.addEventListener("cancel",p);let v=a&&(d.ownerDocument.documentElement.dir==="rtl"||d.ownerDocument.dir==="rtl"),f=In(o,v);a&&(d.style.transform=co[f],d.style.margin=$n[f],d.style.width=Je(f)?h:"100dvw",d.style.height=Je(f)?"100dvh":h);let y=!1,S=!1,C=null,E=()=>{C=null,y&&(y=!1,d.close(),d.style.visibility="hidden",d.style.pointerEvents="none",S&&(Ae(),S=!1))},w=_=>{_.target===d&&_.propertyName==="transform"&&E()};d.addEventListener("transitionend",w);let O=_=>{_?(y=!1,d.style.visibility="visible",d.style.pointerEvents="auto",d.showModal(),S||(wt(),S=!0),requestAnimationFrame(()=>{d.style.transform="translate(0, 0)"})):(y=!0,d.style.transform=co[f],C=setTimeout(E,350))};O(r.get());let M=r.addListener(O);m.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),M(),d.removeEventListener("cancel",p),d.removeEventListener("transitionend",w),S&&(Ae(),S=!1)})},style:{transform:co[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>c(b(m)*3),margin:$n[s],width:Je(s)?h:"100dvw",height:Je(s)?"100dvh":h,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function xa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function wa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>l(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o))}}}}function Ca(e={}){return{_onError:(t,n,o)=>{var r,a;(r=e.onError)==null||r.call(e,n);let i=typeof e.fallback=="function"?e.fallback(n,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var ka={small:8,medium:10,large:14};function Ea(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=c(ka[(i=e.size)!=null?i:"medium"]);return{_onInsert:r=>{r.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r,"shift-9",t.get(r)),color:r=>l(r,"shift-0",t.get(r)),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>l(r,"shift-10",t.get(r)),boxShadow:A("medium")},"&:focus-visible":{boxShadow:r=>`${A("medium")}, ${$(r,t.get(r))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function _a(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>l(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>l(o,"muted",t.get(o)),lineHeight:1.45}}}}function Ta(e={}){var i;let{layout:t="horizontal"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:r=>{r.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*3),border:"none",borderRadius:r=>c(b(r)*2),fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r,"inherit",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>x(r,"inherit"),fontWeight:600,paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*2),color:r=>l(r,"text",n.get(r)),backgroundColor:r=>l(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?0:c(b(r)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:r=>x(r,"decrease-1"),color:r=>l(r,"text",n.get(r))}}}}var Oa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ma(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Oa[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Pa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function Da(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.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:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>l(o,"text",t.get(o))}}}function La(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>l(o,"inherit",t.get(o))}}}function Ra(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:r=>x(r,"inherit"),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:r=>`${c(.5)} solid ${l(r,"inherit",n.get(r))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-3",n.get(r))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:c(1.5),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function $a(e={}){return{type:"color",_onSchedule:(t,n)=>{t.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>x(t,"inherit"),paddingBlock:t=>c(b(t)*1),paddingInline:t=>c(b(t)*1),blockSize:t=>c(6+b(t)*2),inlineSize:t=>c(6+b(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>c(b(t)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>l(t,"shift-2","neutral"),outline:t=>`1px solid ${l(t,"border-strong","neutral")}`}}}}function Ia(e={}){var i,r;let{mode:t="datetime-local"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{type:t,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"text",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,borderRadius:a=>c(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>$(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-6","error")}`}}}}function za(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:r=>c(b(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:r=>l(r,"shift-11",t.get(r)),backgroundColor:r=>l(r,"surface",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,backgroundColor:r=>l(r,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-3","neutral")}}}}function Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:r=>c(b(r)*3),paddingInlineEnd:r=>c(b(r)*1.5),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")}}}}var Va='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ba='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Na(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((r=e.accentColor)!=null?r:"primary","accentColor"),o=g(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:h=>o.get(h)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:h=>o.get(h)?Ba:Va,type:"button",ariaLabel:h=>o.get(h)?"Hide password":"Show password",onClick:()=>o.set(!o.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,color:a=>l(a,"text",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${l(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>$(a,n.get(a))}}}}function Ha(){return{style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let s=n(),u=a.target,h=s.indexOf(u);u.value&&h<s.length-1&&s[h+1].focus()},i=a=>{let s=n(),u=a.target,h=s.indexOf(u);a.key==="Backspace"&&!u.value&&h>0&&s[h-1].focus(),a.key==="ArrowLeft"&&h>0&&s[h-1].focus(),a.key==="ArrowRight"&&h<s.length-1&&s[h+1].focus()},r=a=>{var p,v,f;a.preventDefault();let s=(v=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?v:"",u=n(),h=u.indexOf(a.target),m=h===-1?0:h;[...s].forEach((y,S)=>{u[m+S]&&(u[m+S].value=y)});let d=Math.min(m+s.length-1,u.length-1);(f=u[d])==null||f.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",r),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",r)})}}}function ja(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:r=>{if(r.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:r=>x(r,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(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:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:"50%",outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Fa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:r=>l(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:r=>l(r,"shift-9",n.get(r))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:r=>l(r,"shift-10",n.get(r))},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`,outlineOffset:c(1),borderRadius:c(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Wa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),minWidth:c(32),paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(r,"shift-7",t.get(r))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`}}}}function Ua(e={}){var n;let t=g((n=e.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function qa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>l(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","warning")}`}}}}function Ka(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`}}}function Ya(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text",t.get(r)),cursor:"pointer","&:focus-within":{color:r=>l(r,"shift-10",n.get(r))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Ga(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=g((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:r=>{r.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r),color:r=>l(r,"text",t.get(r)),textDecoration:"none","&:visited":{color:r=>l(r,"text",n.get(r))},"&:hover:not([disabled])":{color:r=>l(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:c(1),outlineOffset:c(1),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Xa(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:o=>x(o,"inherit"),textDecoration:"none",paddingBlock:o=>c(b(o)*1),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>c(b(o)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>$(o,t.get(o))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,color:o=>l(o,"muted","neutral")}}}}function Za(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ja(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>c(b(n)*2),paddingBlock:n=>c(t?1:b(n)*2),paddingInline:n=>c(b(n)*3),fontSize:n=>x(n,"inherit")}}}function Qa(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=(r=e.accentColor)!=null?r:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(a)*1.5),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",n),color:a=>l(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${l(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function el(e={}){var n;let t=g((n=e.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function tl(e={items:[]}){var a;let{items:t=[],selectable:n=!0,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,u)=>{if(t.length===0)return;let h=s.nodeId,m=t.map((d,p)=>{var f;let v=(f=d.key)!=null?f:p;return Me(N({button:typeof d.label=="string"?[{span:d.label}]:[d.label],_key:v,type:"button",id:`menuitem${h}${v}`,role:"menuitem"},n?{ariaCurrent:y=>r.get(y)===v||void 0}:{}),{onClick:()=>{var y;n&&r.set(v),(y=d.onClick)==null||y.call(d)},onKeyDown:y=>{var O;let S=y.key;if(S==="Enter"||S===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(S))return;y.preventDefault();let C=t.map((M,_)=>{var D;return(D=M.key)!=null?D:_}),E=C.indexOf(v),w=E;S==="ArrowDown"?w=(E+1)%C.length:S==="ArrowUp"?w=(E-1+C.length)%C.length:S==="Home"?w=0:S==="End"&&(w=C.length-1),(O=document.getElementById(`menuitem${h}${C[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{outline:y=>`${c(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${c(.5)}`}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:A("medium")}}}var zn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,Ve=e=>{let t={},n=[];for(let o in e){let i=e[o];o==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?n.push(`scale(${i})`):o==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return n.length&&(t.transform=n.join(" ")),t};function ol(e={}){var a,s,u,h;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(u=i.easing)!=null?u:"ease",iterations:(h=i.iterations)!=null?h:1,fill:"both"};return{_onMount:m=>{let d=m.domElement;if(!d||typeof d.animate!="function")return;let p=zn(n)?n.get():n;if(p?d.animate(t?[Ve(t),Ve(p)]:[Ve(p)],r):t&&Object.assign(d.style,Ve(t)),zn(n)){let v=n.addListener(f=>{d.animate([Ve(f)],r)});m.setMetadata("motionRelease",v)}},_onBeforeRemove:(m,d)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([Ve(o)],r).finished.then(d,d)},_onRemove:m=>{let d=m.getMetadata("motionRelease");d==null||d()}}}function nl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function rl(e,t){if(t<=7)return Array.from({length:t},(r,a)=>a+1);let n=[1];e>3&&n.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let r=o;r<=i;r++)n.push(r);return e<t-2&&n.push("..."),n.push(t),n}function il(e){var s;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"text",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:u=>l(u,"hover",n)},"&:focus-visible":{boxShadow:u=>$(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Me(N({},r),{backgroundColor:u=>l(u,"shift-6",o),color:u=>l(u,"shift-11",o),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-6",o)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let h={div:m=>{let d=i.get(m),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:d<=1,onClick:()=>d>1&&i.set(d-1),style:r});let v=0;for(let f of rl(d,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${v++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",n)}});else{let y=f===d;p.push({button:String(f),_key:`page-${f}`,type:"button",ariaLabel:`Page ${f}`,ariaCurrent:y?"page":void 0,disabled:y,onClick:()=>i.set(f),style:y?a:r})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:d>=t,onClick:()=>d<t&&i.set(d+1),style:r}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(h)},style:{display:"inline-flex"}}}function al(e={}){var i;let{padding:t=4,divider:n=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:N({padding:r=>c(b(r)*t)},n?{borderBottom:r=>`1px solid ${l(r,"border",o.get(r))}`}:{})}}function ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function sl(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=g(t),a=g(n),{show:s,hide:u,anchorPartial:h}=ie({kind:"popover",open:r,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")},_onInsert:v=>{let f=v.attributes.get("id");i=f||v.nodeId,!f&&v.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),I(h,{ariaHaspopup:"dialog",ariaExpanded:v=>r.get(v),onMouseEnter:(v,f)=>o==="hover"&&s(f),onMouseLeave:(v,f)=>o==="hover"&&u(f),onClick:(v,f)=>{o==="click"&&(r.get()?u(f):s(f))},onKeyDown:(v,f)=>{v.key==="Escape"&&r.get()&&u(f)},onFocus:(v,f)=>o==="hover"&&s(f),onBlur:(v,f)=>{let y=v.relatedTarget,S=f.getRoot().domElement,C=i?S.querySelector(`#${CSS.escape(i)}`):null;y&&(C!=null&&C.contains(y))||u(f)},_onMount:v=>i&&v.attributes.set("ariaControls",i)}),h}function uo(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=c(6),bordered:i=!0}=e,r=g(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=m=>{var d;return(d=a[r.get(m)])!=null?d:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",h=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>x(m),backgroundColor:m=>l(m),color:m=>l(m,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",n),borderWidth:i?"1px":0,borderColor:m=>l(m,"inherit",n),borderTopStyle:m=>{let d=s(m);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:m=>{let d=s(m);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:m=>{let d=s(m);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:m=>{let d=s(m);return d.includes("right")?0:d.includes("left")?"auto":h(d)},bottom:m=>{let d=s(m);return d.includes("bottom")?0:d.includes("top")?"auto":h(d)},left:m=>{let d=s(m);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:m=>{let d=s(m),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",v=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${v}) rotate(45deg)`}}}}}function cl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function ul(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:r=>l(r,"shift-3",t.get(r)),"&::-webkit-progress-bar":{backgroundColor:r=>l(r,"shift-3",t.get(r)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:r=>l(r,"shift-9",n.get(r)),borderRadius:c(999),transition:"width 220ms ease"}}}}var ml='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',hl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function dl(e={}){var u,h;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=g((h=e.value)!=null?h:0),a=g(0),s=m=>{let d=a.get(m);return d>0?d:r.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let d=1;d<=t;d++){let p=d,v=n?{}:{onClick:()=>{let y=p===r.get()?0:p;r.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let S=r.get(),C=S;if(y.key==="ArrowRight"||y.key==="ArrowUp")C=Math.min(t,S+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")C=Math.max(0,S-1),y.preventDefault();else return;r.set(C),o==null||o(C);let E=C>0?C-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=Me(N({button:y=>p<=s(y)?ml:hl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},v),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:y=>$(y,i)}}});m.children.insert(f)}}}}function fl(e={}){var u,h,m;let{size:t=16,thickness:n=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((h=e.color)!=null?h:"primary","color"),r=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:d=>String(Math.round(o.get(d))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:d=>{d.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:c(t),height:c(t),borderRadius:"50%",background:d=>`conic-gradient(from -90deg, ${l(d,"shift-9",i.get(d))} ${o.get(d)}%, ${l(d,"shift-3",r.get(d))} 0%)`,WebkitMask:s,mask:s}}}function mo(e={}){let{gap:t=4,align:n="center",justify:o,wrap:i=!1}=e;return{style:N(N({display:"flex",alignItems:n,gap:r=>c(b(r)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function pl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>l(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${l(o,"shift-5",t.get(o))} transparent`}}}function gl(e={items:[]}){var r,a,s;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=g((s=(a=e.value)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,h)=>{let m=t.map((d,p)=>{var y;let v=(y=d.key)!=null?y:String(p);return{button:[typeof d.label=="string"?{span:d.label}:d.label],_key:v,type:"button",role:"radio",ariaChecked:S=>i.get(S)===v,onClick:()=>i.set(v),style:{cursor:"pointer",fontSize:S=>x(S,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:S=>l(S,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:S=>l(S,"shift-3",n)},"&[aria-checked=true]":{backgroundColor:S=>l(S,"shift-0",o),color:S=>l(S,"shift-10",o)},"&:focus-visible":{boxShadow:S=>$(S,o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});h[u.tagName]=m},style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"shift-2",n)}}}function yl(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"border-strong",t)}`,borderRadius:o=>c(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Zt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",n)}`},"&:focus-visible":{boxShadow:o=>$(o,n)},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"muted","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function bl(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"selectBox",open:s,placement:g(n),content:e.content}),d={onClick:(f,y)=>!r&&h(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={div:f=>{let y=a.get(f),S=Array.isArray(y)?y:[y];return t.filter(E=>S.includes(E.value)).map(E=>({span:E.label,$:[Ge({color:o,removable:r})],_key:E.value,_onRemove:w=>{let O=a.get(),_=(Array.isArray(O)?O:[O]).filter(D=>D!==E.value);r?a.set(_):a.set(_[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},v={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?h(y):u(y),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o)}};return I(m,v),m}function vl(e={}){let{accentColor:t="primary",color:n="neutral",value:o=null}=e;return{role:"option",_onInit:r=>{r.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=r.getContext("select");if(a){let s=a.value;r.attributes.set("ariaSelected",u=>{let h=s.get(u);return a.multiple?h.includes(o):h===o}),r.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(h=>h!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>x(r,"inherit"),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*3),border:"none",outline:"none",color:r=>l(r,"text",n),backgroundColor:r=>l(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>l(r,"hover",n)},"&[aria-selected=true]":{backgroundColor:r=>l(r,"shift-6",t),color:r=>l(r,"shift-11")},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",t)}`,outlineOffset:`-${c(.5)}`}}}}function Sl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=g((a=e.value)!=null?a:n?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t)}}}function xl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Le(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>x(r),color:r=>l(r,"text",t.get(r)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:r=>l(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function wl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}var Vn={to:{transform:"rotate(360deg)"}},An=Le(JSON.stringify(Vn));function Cl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${l(o,"border-strong",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${An} 0.7s linear infinite`,[`@keyframes ${An}`]:Vn}}}function kl(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{I(a,{_context:{splitter:{direction:t,size:g(n),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function El(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,r=s=>{n.style[o]=`${i?s:100-s}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function _l(){return{role:"separator",tabindex:0,_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal";n.style.cursor=o?"col-resize":"row-resize",n.setAttribute("aria-orientation",o?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(t.min)),n.setAttribute("aria-valuemax",String(t.max)),n.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{n.setAttribute("aria-valuenow",String(Math.round(u)))}),r=u=>{let h=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-h,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-h,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,s=u=>{u.preventDefault();let h=n.parentElement,m=p=>{let v=h.getBoundingClientRect(),f=o?(p.clientX-v.left)/v.width*100:(p.clientY-v.top)/v.height*100;t.size.set(Math.min(Math.max(f,t.min),t.max))},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",d)};n.addEventListener("keydown",r),n.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"shift-2"),"&:hover":{backgroundColor:e=>l(e,"shift-3")},"&:focus-visible":{outline:e=>`2px solid ${l(e,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Tl(e={}){let{gap:t=3,align:n}=e;return{style:N({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},n?{alignItems:n}:{})}}function Ol(e={items:[]}){var a;let{items:t=[],direction:n="horizontal",color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.current)!=null?a:0);return{_context:{steps:{current:r,direction:n,color:o,accentColor:i}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var v;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(v=m.key)!=null?v:d,dataStep:String(d+1),dataStatus:f=>{let y=r.get(f);return d<y?"done":d===y?"active":"pending"},ariaCurrent:f=>r.get(f)===d?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:f=>x(f,"decrease-1"),fontWeight:"600",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-6",i),borderColor:f=>l(f,"shift-6",i),color:f=>l(f,"shift-15",i)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-3",o),borderColor:f=>l(f,"border",o),color:f=>l(f,"text",o)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-3",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-6",i)},"&[data-status=pending]":{color:f=>l(f,"shift-7")},"&[data-status=active]":{color:f=>l(f,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:f=>l(f,"muted")}}}});u[s.tagName]=h},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function Ml(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Pl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Dl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"hover")}}}}function Rl(e={items:[]}){var r,a,s;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=g((s=(a=e.activeKey)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:0);return{_onSchedule:(u,h)=>{let m=u.nodeId,p={div:t.map((f,y)=>{var E;let S=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:S,type:"button",role:"tab",id:`tab${m}${S}`,ariaControls:`panel${m}${S}`,ariaSelected:w=>i.get(w)===S,onClick:()=>i.set(S),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let M=t.map((B,H)=>{var j;return(j=B.key)!=null?j:H}),_=M.indexOf(S),D=_;O==="ArrowRight"?D=(_+1)%M.length:O==="ArrowLeft"?D=(_-1+M.length)%M.length:O==="Home"?D=0:O==="End"&&(D=M.length-1),i.set(M[D])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"text"),backgroundColor:w=>l(w,"inherit"),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",n)}`},"&:focus-visible":{boxShadow:w=>$(w,n)}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},v=t.map((f,y)=>{var C;let S=(C=f.key)!=null?C:y;return{div:[f.content],_key:S,role:"tabpanel",id:`panel${m}${S}`,ariaLabelledby:`tab${m}${S}`,hidden:E=>i.get(E)!==S,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});h[u.tagName]=[p,...v]}}}function $l(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((r=e.accentColor)!=null?r:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let s=a.domElement;s.style.overflow="hidden";let u=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",u),u(),a.addHook("Remove",()=>s.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>$(a,n.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function Il(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function zl(e={}){var r,a,s;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((s=e.active)!=null?s:!1);return{style:N({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(u,"shift-8",i.get(u)?o:n),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>`-${c(b(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",n)}})}}function Al(e={}){let{position:t="top-center",color:n="neutral"}=e,o=g(!1),i=t.startsWith("top"),r=t.endsWith("center"),a=t.endsWith("right"),s={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let h=u.domElement.querySelector(`#domphy-toast-${t}`);return h||(h=u.children.insert(s).domElement),h},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",n),backgroundColor:u=>l(u,"inherit",n),boxShadow:A("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,h)=>{let m=!1,d=null,p=()=>{m||(m=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",v),h())},v=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",v),d=setTimeout(p,350),u.addHook("Remove",()=>{var f;d&&(clearTimeout(d),d=null),(f=u.domElement)==null||f.removeEventListener("transitionend",v)}),o.set(!1)}}}function Vl(e={items:[]}){var a;let{items:t=[],multiple:n=!1,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:r,multiple:n}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var f;let p=(f=m.key)!=null?f:String(d);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:p,type:"button",role:"button",ariaPressed:y=>{let S=r.get(y);return Array.isArray(S)?S.includes(p):S===p},onClick:()=>{let y=r.get();if(n){let S=Array.isArray(y)?[...y]:[];r.set(S.includes(p)?S.filter(C=>C!==p):[...S,p])}else r.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{boxShadow:y=>$(y,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=h},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function Bl(e={}){return mo({gap:e.gap})}function Nl(){return{div:null,style:{flex:"1 1 0"}}}function Hl(e={}){let{open:t=!1,placement:n="top",content:o="Tooltip Content"}=e,i=g(n),r=g(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:v=>r.get(v),id:a},{show:u,hide:h,anchorPartial:m}=ie({kind:"tooltip",open:t,placement:i,content:s}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*3),borderRadius:v=>c(b(v)*1.5),color:v=>l(v,"text"),backgroundColor:v=>l(v),fontSize:v=>x(v,"inherit"),boxShadow:A("low")},$:[uo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(d),I(m,{ariaDescribedby:a,onMouseEnter:(v,f)=>u(f),onMouseLeave:(v,f)=>h(f),onFocus:(v,f)=>u(f),onBlur:(v,f)=>h(f),onKeyDown:(v,f)=>v.key==="Escape"&&h(f)}),m}function Bn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function jl(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of r)clearTimeout(u);r.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,h)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Bn(u,h),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,h)=>{var M;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let d=Bn(u,h),p=o.get(d);if(!p)return;let v=m.getBoundingClientRect(),f=p.left-v.left,y=p.top-v.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(M=i.get(m))==null||M(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),m.style.transition=`transform ${t}ms ease ${n}ms`,m.style.transform="translate(0px, 0px)"});a.add(S);let C=!1,E=null,w=()=>{C||(C=!0,E&&(r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=_=>{_.propertyName==="transform"&&w()};i.set(m,()=>{C=!0,E&&(clearTimeout(E),r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+n+34),r.add(E)}),o.clear()}}}function Fl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return nr(Wl);})();
|
|
5
|
+
`)}function Kr(e){var t;if(typeof document!="undefined")if(e){e.textContent=Ut();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Ut(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Yr(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,s=i-a*n/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function Gr(e=document.documentElement,t={}){let{persist:n=!0,storageKey:o="dp-theme"}=t,i=()=>{if(n){let s=localStorage.getItem(o);if(s==="light"||s==="dark")return s}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let r=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!n||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}function lt(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let n="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(n=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),n}var Xr=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],qt=["inherit"];[...Array(5).keys()].forEach(e=>{qt.push(`decrease-${e}`),qt.push(`increase-${e}`)});function Zr(e,t="inherit"){if(!qt.includes(t))throw Error(`density name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(4,n))}function Jr(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataDensity"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(n=Zr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function b(e){let t=Jr(e);return oe(e?lt(e):"light").densities[t]}var Qr=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ei=[.75,1,1.5,2,2.5];function ti(e,t){let n=Ft(rt(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=qo(n,Ft(rt(e[r])));a<i&&(i=a,o=r)}return o}function oi(e,t={}){var n,o,i,r,a,s;let u=(n=t.steps)!=null?n:18,h={},m={};for(let[d,p]of Object.entries(e)){let v=Yo(p,u);h[d]=v,m[d]=ti(v,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:h,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:Qr,densities:(r=t.densities)!=null?r:ei,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Kt=["inherit"];[...Array(8).keys()].forEach(e=>{Kt.push(`decrease-${e}`),Kt.push(`increase-${e}`)});function Qo(e,t="inherit"){if(!Kt.includes(t))throw Error(`size name "${t}" invalid`);let n;if(t==="inherit")n=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);n=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);n=e-o}else n=e;return Math.max(0,Math.min(7,n))}function ni(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let n=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(n=Qo(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function x(e,t="inherit"){let n=Qo(ni(e),t);return at().fontSizes[n]}var he=Ue.colors.neutral.length,Yt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},We=["inherit","base",...Object.keys(Yt)];[...Array(he).keys()].forEach(e=>{We.push(`decrease-${e}`),We.push(`increase-${e}`),We.push(`shift-${e}`)});function Go(e,t){if(e<0||e>he-1)return e;let n=e+t;return n=Math.max(0,Math.min(he-1,n)),n}function ri(e,t){if(e<0||e>he-1)return e;let n=Math.floor((he-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(he-1,o)),o}function qe(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!We.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Yt&&(t=Yt[t]),t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Go(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Go(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return ri(e,n)}else return e}function en(e){if(!e)return 0;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTone"));)t=t.parent;let n=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(n=qe(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function tn(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===he-1?he-1-n:e}function l(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let s=at()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[oe("light").baseTones[o]]:s[qe(0,t)]}let i=lt(e),r;if(t==="base")r=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);r=qe(u,t)}let a=at()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Zt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?lt(e):"light",r=Jo(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[oe("light").baseTones[o]]:r[qe(0,t)];let a;if(t==="base")a=oe(i).baseTones[o];else{let s=oe(i),u=tn(en(e),s.direction,s.darkBias);a=qe(u,t)}return r[a]}var Ct={};et(Ct,{abbreviation:()=>ii,accordion:()=>ai,alert:()=>li,avatar:()=>si,badge:()=>ci,blockquote:()=>ui,breadcrumb:()=>mi,breadcrumbEllipsis:()=>hi,button:()=>pi,buttonGhost:()=>Jt,buttonSwitch:()=>gi,card:()=>yi,code:()=>bi,combobox:()=>sa,command:()=>ca,commandItem:()=>ma,commandSearch:()=>ua,datePicker:()=>da,descriptionList:()=>ga,details:()=>ya,dialog:()=>ba,divider:()=>va,drawer:()=>Sa,emphasis:()=>xa,empty:()=>wa,errorBoundary:()=>Ca,fab:()=>Ea,figure:()=>_a,formGroup:()=>Ta,heading:()=>Ma,horizontalRule:()=>Pa,icon:()=>Da,image:()=>La,inputCheckbox:()=>Ra,inputColor:()=>$a,inputDateTime:()=>Ia,inputFile:()=>za,inputNumber:()=>Aa,inputOTP:()=>Ha,inputPassword:()=>Na,inputRadio:()=>ja,inputRange:()=>Fa,inputSearch:()=>Wa,inputSwitch:()=>Ua,inputText:()=>qa,keyboard:()=>Ka,label:()=>Ya,link:()=>Ga,linkButton:()=>Xa,list:()=>Za,listItem:()=>Ja,listItemButton:()=>Qa,mark:()=>el,menu:()=>tl,motion:()=>ol,orderedList:()=>nl,pagination:()=>il,panelSection:()=>al,paragraph:()=>ll,popover:()=>sl,popoverArrow:()=>uo,preformated:()=>cl,progress:()=>ul,rating:()=>dl,ringProgress:()=>fl,row:()=>mo,scrollArea:()=>pl,segmented:()=>gl,select:()=>yl,selectBox:()=>bl,selectItem:()=>vl,selectList:()=>Sl,skeleton:()=>xl,small:()=>wl,spinner:()=>Cl,splitter:()=>kl,splitterHandle:()=>_l,splitterPanel:()=>El,stack:()=>Tl,steps:()=>Ol,strong:()=>Ml,subscript:()=>Pl,superscript:()=>Dl,table:()=>Ll,tabs:()=>Rl,tag:()=>Ge,textarea:()=>$l,timeline:()=>Il,timelineItem:()=>zl,toast:()=>Al,toggleGroup:()=>Vl,toolbar:()=>Bl,toolbarSpacer:()=>Nl,tooltip:()=>Hl,transitionGroup:()=>jl,unorderedList:()=>Fl});function ii(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:r=>x(r),backgroundColor:r=>l(r),color:r=>l(r,"shift-10",t.get(r)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:r=>l(r,"shift-7",t.get(r)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:r=>l(r,"shift-11",n.get(r)),textDecorationColor:r=>l(r,"shift-9",n.get(r))}}}}function ai(e={}){var i,r;let{type:t="single"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=h=>{let m=h.target.closest("summary");if(!m)return;let d=m.closest("details");!d||d.parentElement!==s||d.open||Array.from(s.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`}}}}function li(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function si(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function ci(e={}){var i;let{label:t=999}=e,n=g(t),o=g((i=e.color)!=null?i:"danger","color");return{style:{position:"relative","&::after":{content:r=>`"${n.get(r)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1),minWidth:c(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>x(r,"decrease-1"),borderRadius:c(999),backgroundColor:r=>l(r,"shift-9",o.get(r)),color:r=>l(r,"shift-0",o.get(r))}}}}function ui(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function mi(e={}){var o;let{separator:t="/"}=e,n=g((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>l(i,"text",n.get(i)),backgroundColor:i=>l(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",n.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function hi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"muted",t.get(o)),borderRadius:c(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:c(.5)}}}}var ct={small:"decrease-1",medium:"inherit",large:"increase-1"};function $(e,t="primary"){return`0 0 0 2px ${l(e,"shift-6",t)}`}var di={small:.5,medium:1,large:1.5};function Jt(e={}){var i,r,a;let t=g((i=e.color)!=null?i:"neutral","color"),n=di[(r=e.size)!=null?r:"medium"],o=ct[(a=e.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>x(s,o),paddingBlock:s=>c(b(s)*n),paddingInline:s=>c(b(s)*n),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>l(s,"shift-6",t.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"hover",t.get(s))},"&:focus-visible":{boxShadow:s=>$(s,t.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>l(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var fi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function pi(e={}){var a,s,u,h;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return Jt({color:e.color,size:e.size});let n=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=fi[(u=e.size)!=null?u:"medium"],r=ct[(h=e.size)!=null?h:"medium"];return{_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:m=>x(m,r),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${l(m,"border-strong",n.get(m))}`,color:m=>o?l(m,"shift-0",n.get(m)):l(m,"text",n.get(m)),backgroundColor:m=>o?l(m,"shift-9",n.get(m)):l(m,"inherit",n.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?l(m,"shift-0",n.get(m)):l(m,"shift-10",n.get(m)),backgroundColor:m=>o?l(m,"shift-10",n.get(m)):l(m,"hover",n.get(m))},"&:focus-visible":{boxShadow:m=>$(m,n.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function gi(e={}){var r,a;let{checked:t=!1}=e,n=g(t),o=g((r=e.color)!=null?r:"neutral","color"),i=g((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>n.get(s),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>x(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${l(s,"border",o.get(s))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:s=>l(s,"inherit",o.get(s)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:s=>l(s,"text"),backgroundColor:s=>l(s,"decrease-2",o.get(s))},"&[aria-checked=true]":{backgroundColor:s=>l(s,"increase-3",i.get(s)),outline:"none",color:s=>l(s,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function yi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(b(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function bi(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var vi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function A(e){return vi[e]}var Si=Object.defineProperty,xi=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,on=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))dn.call(t,n)&&on(e,n,t[n]);if(mt)for(var n of mt(t))fn.call(t,n)&&on(e,n,t[n]);return e},we=(e,t)=>xi(e,wi(t)),pn=(e,t)=>{var n={};for(var o in e)dn.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&mt)for(var o of mt(e))t.indexOf(o)<0&&fn.call(e,o)&&(n[o]=e[o]);return n},Ee=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{s(n.next(u))}catch(h){i(h)}},a=u=>{try{s(n.throw(u))}catch(h){i(h)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);s((n=n.apply(e,t)).next())}),Ci=["top","right","bottom","left"],nn=["start","end"],Qs=Ci.reduce((e,t)=>e.concat(t,`${t}-${nn[0]}`,`${t}-${nn[1]}`),[]),ht=Math.min,xe=Math.max,dt=Math.round,ut=Math.floor,ne=e=>({x:e,y:e}),ki={left:"right",right:"left",bottom:"top",top:"bottom"};function rn(e,t,n){return xe(e,ht(t,n))}function gt(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function gn(e){return e==="x"?"y":"x"}function yn(e){return e==="y"?"height":"width"}function de(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function bn(e){return gn(de(e))}function Ei(e,t,n=!1){let o=yt(e),i=bn(e),r=yn(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ft(a)),[a,ft(a)]}function _i(e){let t=ft(e);return[to(e),t,to(t)]}function to(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var an=["left","right"],ln=["right","left"],Ti=["top","bottom"],Oi=["bottom","top"];function Mi(e,t,n){switch(e){case"top":case"bottom":return n?t?ln:an:t?an:ln;case"left":case"right":return t?Ti:Oi;default:return[]}}function Pi(e,t,n,o){let i=yt(e),r=Mi(Ce(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(to)))),r}function ft(e){let t=Ce(e);return ki[t]+e.slice(t.length)}function Di(e){return J({top:0,right:0,bottom:0,left:0},e)}function Li(e){return typeof e!="number"?Di(e):{top:e,right:e,bottom:e,left:e}}function pt(e){let{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function sn({reference:e,floating:t},n,o){let i=de(n),r=bn(n),a=yn(r),s=Ce(n),u=i==="y",h=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(s){case"top":p={x:h,y:e.y-t.height};break;case"bottom":p={x:h,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:m};break;case"left":p={x:e.x-t.width,y:m};break;default:p={x:e.x,y:e.y}}switch(yt(n)){case"start":p[r]-=d*(o&&u?-1:1);break;case"end":p[r]+=d*(o&&u?-1:1);break;default:}return p}function Ri(e){return Ee(this,arguments,function*(t,n={}){var o,i,r,a,s,u;let{x:h,y:m,platform:d,rects:p,elements:v,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:S="viewport",elementContext:C="floating",altBoundary:E=!1,padding:w=0}=gt(n,t),O=Li(w),M=v[E?C==="floating"?"reference":"floating":C],_=pt(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,M))==null||i?M:M.contextElement||(yield(r=d.getDocumentElement)==null?void 0:r.call(d,v.floating)),boundary:y,rootBoundary:S,strategy:f})),D=C==="floating"?{x:h,y:m,width:p.floating.width,height:p.floating.height}:p.reference,B=yield(a=d.getOffsetParent)==null?void 0:a.call(d,v.floating),H=(yield(s=d.isElement)==null?void 0:s.call(d,B))?(yield(u=d.getScale)==null?void 0:u.call(d,B))||{x:1,y:1}:{x:1,y:1},j=pt(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:v,rect:D,offsetParent:B,strategy:f}):D);return{top:(_.top-j.top+O.top)/H.y,bottom:(j.bottom-_.bottom+O.bottom)/H.y,left:(_.left-j.left+O.left)/H.x,right:(j.right-_.right+O.right)/H.x}})}var $i=50,Ii=(e,t,n)=>Ee(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:s}=n,u=s.detectOverflow?s:we(J({},s),{detectOverflow:Ri}),h=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=sn(m,i,h),v=i,f=0,y={};for(let S=0;S<a.length;S++){let C=a[S];if(!C)continue;let{name:E,fn:w}=C,{x:O,y:M,data:_,reset:D}=yield w({x:d,y:p,initialPlacement:i,placement:v,strategy:r,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});d=O!=null?O:d,p=M!=null?M:p,y[E]=J(J({},y[E]),_),D&&f<$i&&(f++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(m=D.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:r}):D.rects),{x:d,y:p}=sn(m,v,h)),S=-1)}return{x:d,y:p,placement:v,strategy:r,middlewareData:y}});var zi=(e={})=>({name:"flip",options:e,fn(t){return Ee(this,null,function*(){var n,o,i,r,a,s;let{placement:u,middlewareData:h,rects:m,initialPlacement:d,platform:p,elements:v}=t,f=gt(e,t),{mainAxis:y=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,M=pn(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=h.arrow)!=null&&n.alignmentOffset)return{};let _=Ce(u),D=de(d),B=Ce(d)===d,H=yield(o=p.isRTL)==null?void 0:o.call(p,v.floating),j=C||(B||!O?[ft(d)]:_i(d)),pe=w!=="none";!C&&pe&&j.push(...Pi(d,O,w,H));let Te=[d,...j],ce=yield p.detectOverflow(t,M),W=[],ae=((i=h.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ce[_]),S){let le=Ei(u,m,H);W.push(ce[le[0]],ce[le[1]])}if(ae=[...ae,{placement:u,overflows:W}],!W.every(le=>le<=0)){let le=(((r=h.flip)==null?void 0:r.index)||0)+1,Be=Te[le];if(Be&&(!(S==="alignment"&&D!==de(Be))||ae.every(q=>de(q.placement)===D?q.overflows[0]>0:!0)))return{data:{index:le,overflows:ae},reset:{placement:Be}};let ge=(a=ae.filter(q=>q.overflows[0]<=0).sort((q,X)=>q.overflows[1]-X.overflows[1])[0])==null?void 0:a.placement;if(!ge)switch(E){case"bestFit":{let q=(s=ae.filter(X=>{if(pe){let Z=de(X.placement);return Z===D||Z==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(Z=>Z>0).reduce((Z,Ne)=>Z+Ne,0)]).sort((X,Z)=>X[1]-Z[1])[0])==null?void 0:s[0];q&&(ge=q);break}case"initialPlacement":ge=d;break;default:}if(u!==ge)return{reset:{placement:ge}}}return{}})}});var Ai=new Set(["left","top"]);function Vi(e,t){return Ee(this,null,function*(){var n;let{placement:o,platform:i,elements:r}=e,a=yield(n=i.isRTL)==null?void 0:n.call(i,r.floating),s=Ce(o),u=yt(o),h=de(o)==="y",m=Ai.has(s)?-1:1,d=a&&h?-1:1,p=gt(t,e),{mainAxis:v,crossAxis:f,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof y=="number"&&(f=u==="end"?y*-1:y),h?{x:f*d,y:v*m}:{x:v*m,y:f*d}})}var Bi=(e=0)=>({name:"offset",options:e,fn(t){return Ee(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:s}=t,u=yield Vi(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:we(J({},u),{placement:a})}})}}),Ni=(e={})=>({name:"shift",options:e,fn(t){return Ee(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=gt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:h={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=pn(a,["mainAxis","crossAxis","limiter"]),d={x:n,y:o},p=yield r.detectOverflow(t,m),v=de(Ce(i)),f=gn(v),y=d[f],S=d[v];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],M=y-p[w];y=rn(O,y,M)}if(u){let E=v==="y"?"top":"left",w=v==="y"?"bottom":"right",O=S+p[E],M=S-p[w];S=rn(O,S,M)}let C=h.fn(we(J({},t),{[f]:y,[v]:S}));return we(J({},C),{data:{x:C.x-n,y:C.y-o,enabled:{[f]:s,[v]:u}}})})}});function bt(){return typeof window!="undefined"}function ze(e){return vn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function re(e){var t;return(t=(vn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vn(e){return bt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return bt()?e instanceof Element||e instanceof Y(e).Element:!1}function se(e){return bt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function cn(e){return!bt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ye(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function Hi(e){return/^(table|td|th)$/.test(ze(e))}function vt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var ji=/transform|translate|scale|rotate|perspective|filter/,Fi=/paint|layout|strict|content/,Se=e=>!!e&&e!=="none",Qt;function no(e){let t=Q(e)?ee(e):e;return Se(t.transform)||Se(t.translate)||Se(t.scale)||Se(t.rotate)||Se(t.perspective)||!ro()&&(Se(t.backdropFilter)||Se(t.filter))||ji.test(t.willChange||"")||Fi.test(t.contain||"")}function Wi(e){let t=fe(e);for(;se(t)&&!Ie(t);){if(no(t))return t;if(vt(t))return null;t=fe(t)}return null}function ro(){return Qt==null&&(Qt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qt}function Ie(e){return/^(html|body|#document)$/.test(ze(e))}function ee(e){return Y(e).getComputedStyle(e)}function St(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ze(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cn(e)&&e.host||re(e);return cn(t)?t.host:t}function Sn(e){let t=fe(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ye(t)?t:Sn(t)}function Ke(e,t=[],n=!0){var o;let i=Sn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(r){let s=oo(a);return t.concat(a,a.visualViewport||[],Ye(i)?i:[],s&&n?Ke(s):[])}else return t.concat(i,Ke(i,[],n))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){let t=ee(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=se(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,s=dt(n)!==r||dt(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function io(e){return Q(e)?e:e.contextElement}function $e(e){let t=io(e);if(!se(t))return ne(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=xn(t),a=(r?dt(n.width):n.width)/o,s=(r?dt(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Ui=ne(0);function wn(e){let t=Y(e);return!ro()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qi(e,t=!1,n){return!n||t&&n!==Y(e)?!1:t}function ke(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=io(e),a=ne(1);t&&(o?Q(o)&&(a=$e(o)):a=$e(e));let s=qi(r,n,o)?wn(r):ne(0),u=(i.left+s.x)/a.x,h=(i.top+s.y)/a.y,m=i.width/a.x,d=i.height/a.y;if(r){let p=Y(r),v=o&&Q(o)?Y(o):o,f=p,y=oo(f);for(;y&&o&&v!==f;){let S=$e(y),C=y.getBoundingClientRect(),E=ee(y),w=C.left+(y.clientLeft+parseFloat(E.paddingLeft))*S.x,O=C.top+(y.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,h*=S.y,m*=S.x,d*=S.y,u+=w,h+=O,f=Y(y),y=oo(f)}}return pt({width:m,height:d,x:u,y:h})}function xt(e,t){let n=St(e).scrollLeft;return t?t.left+n:ke(re(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-xt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Ki({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=re(n),a=e?vt(e.floating):!1;if(n===r||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),h=ne(0),m=se(n);if((m||!m&&!i)&&((ze(n)!=="body"||Ye(r))&&(s=St(n)),m)){let p=ke(n);u=$e(n),h.x=p.x+n.clientLeft,h.y=p.y+n.clientTop}let d=r&&!m&&!i?Cn(r,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+h.x+d.x,y:t.y*u.y-s.scrollTop*u.y+h.y+d.y}}function Yi(e){return Array.from(e.getClientRects())}function Gi(e){let t=re(e),n=St(e),o=e.ownerDocument.body,i=xe(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=xe(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+xt(e),s=-n.scrollTop;return ee(o).direction==="rtl"&&(a+=xe(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}var un=25;function Xi(e,t){let n=Y(e),o=re(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){r=i.width,a=i.height;let m=ro();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let h=xt(o);if(h<=0){let m=o.ownerDocument,d=m.body,p=getComputedStyle(d),v=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-d.clientWidth-v);f<=un&&(r-=f)}else h<=un&&(r+=h);return{width:r,height:a,x:s,y:u}}function Zi(e,t){let n=ke(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=se(e)?$e(e):ne(1),a=e.clientWidth*r.x,s=e.clientHeight*r.y,u=i*r.x,h=o*r.y;return{width:a,height:s,x:u,y:h}}function mn(e,t,n){let o;if(t==="viewport")o=Xi(e,n);else if(t==="document")o=Gi(re(e));else if(Q(t))o=Zi(t,n);else{let i=wn(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return pt(o)}function kn(e,t){let n=fe(e);return n===t||!Q(n)||Ie(n)?!1:ee(n).position==="fixed"||kn(n,t)}function Ji(e,t){let n=t.get(e);if(n)return n;let o=Ke(e,[],!1).filter(s=>Q(s)&&ze(s)!=="body"),i=null,r=ee(e).position==="fixed",a=r?fe(e):e;for(;Q(a)&&!Ie(a);){let s=ee(a),u=no(a);!u&&s.position==="fixed"&&(i=null),(r?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ye(a)&&!u&&kn(e,a))?o=o.filter(h=>h!==a):i=s,a=fe(a)}return t.set(e,o),o}function Qi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?vt(e)?[]:Ji(e,this._c):[].concat(t),n],r=mn(e,i[0],o),a=r.top,s=r.right,u=r.bottom,h=r.left;for(let m=1;m<i.length;m++){let d=mn(e,i[m],o);a=xe(d.top,a),s=ht(d.right,s),u=ht(d.bottom,u),h=xe(d.left,h)}return{width:s-h,height:u-a,x:h,y:a}}function ea(e){let{width:t,height:n}=xn(e);return{width:t,height:n}}function ta(e,t,n){let o=se(t),i=re(t),r=n==="fixed",a=ke(e,!0,r,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function h(){u.x=xt(i)}if(o||!o&&!r)if((ze(t)!=="body"||Ye(i))&&(s=St(t)),o){let v=ke(t,!0,r,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else i&&h();r&&!o&&i&&h();let m=i&&!o&&!r?Cn(i,s):ne(0),d=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:d,y:p,width:a.width,height:a.height}}function eo(e){return ee(e).position==="static"}function hn(e,t){if(!se(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return re(e)===n&&(n=n.ownerDocument.body),n}function En(e,t){let n=Y(e);if(vt(e))return n;if(!se(e)){let i=fe(e);for(;i&&!Ie(i);){if(Q(i)&&!eo(i))return i;i=fe(i)}return n}let o=hn(e,t);for(;o&&Hi(o)&&eo(o);)o=hn(o,t);return o&&Ie(o)&&eo(o)&&!no(o)?n:o||Wi(e)||n}var oa=function(e){return Ee(this,null,function*(){let t=this.getOffsetParent||En,n=this.getDimensions,o=yield n(e.floating);return{reference:ta(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function na(e){return ee(e).direction==="rtl"}var ra={convertOffsetParentRelativeRectToViewportRelativeRect:Ki,getDocumentElement:re,getClippingRect:Qi,getOffsetParent:En,getElementRects:oa,getClientRects:Yi,getDimensions:ea,getScale:$e,isElement:Q,isRTL:na};function _n(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ia(e,t){let n=null,o,i=re(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(s=!1,u=1){r();let h=e.getBoundingClientRect(),{left:m,top:d,width:p,height:v}=h;if(s||t(),!p||!v)return;let f=ut(d),y=ut(i.clientWidth-(m+p)),S=ut(i.clientHeight-(d+v)),C=ut(m),E={rootMargin:`${-f}px ${-y}px ${-S}px ${-C}px`,threshold:xe(0,ht(1,u))||1},w=!0;function O(M){let _=M[0].intersectionRatio;if(_!==u){if(!w)return a();_?a(!1,_):o=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!_n(h,e.getBoundingClientRect())&&a(),w=!1}try{n=new IntersectionObserver(O,we(J({},E),{root:i.ownerDocument}))}catch(M){n=new IntersectionObserver(O,E)}n.observe(e)}return a(!0),r}function Tn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,h=io(e),m=i||r?[...h?Ke(h):[],...t?Ke(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),r&&C.addEventListener("resize",n)});let d=h&&s?ia(h,n):null,p=-1,v=null;a&&(v=new ResizeObserver(([C])=>{C&&C.target===h&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{v==null||v.observe(t)})),n()}),h&&!u&&v.observe(h),t&&v.observe(t));let f,y=u?ke(e):null;u&&S();function S(){let C=ke(e);y&&!_n(y,C)&&n(),y=C,f=requestAnimationFrame(S)}return n(),()=>{m.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),d==null||d(),v==null||v.disconnect(),v=null,u&&cancelAnimationFrame(f)}}var On=Bi;var Mn=Ni,Pn=zi;var Dn=(e,t,n)=>{let o=new Map,i=J({platform:ra},n),r=we(J({},i.platform),{_c:o});return Ii(e,t,we(J({},i),{platform:r}))};function aa(e,t){var M;let{openState:n,placement:o,content:i,keepOpenOnContentHover:r}=t,a=null,s=null,u=null,h=null,m=!1,d=e.domElement,p=e.getRoot(),v={style:{position:"fixed",pointerEvents:"auto",visibility:_=>n.get(_)?"visible":"hidden"},onKeyDown:_=>{_.key==="Escape"&&w()},onMouseEnter:()=>r&&E(),onMouseLeave:()=>r&&w(),_onMount:_=>{var D;if(u=_.domElement,d&&u&&!u.hasAttribute("data-theme")){let B=(D=d.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");B&&u.setAttribute("data-theme",B)}},_portal:_=>{let D=_.domElement.querySelector("#domphy-floating");if(!D){let B={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};D=_.children.insert(B).domElement}return D}},f=_=>I(_,v);f(i);let y=()=>{m||(m=!0,h=p.children.insert(i))},S=()=>{y(),d&&u&&(s==null||s(),s=Tn(d,u,()=>{Dn(d,u,{placement:o.get(),middleware:[On(12),Pn(),Mn()],strategy:"fixed"}).then(({x:_,y:D,placement:B})=>{u&&(Object.assign(u.style,{left:`${_}px`,top:`${D}px`}),o.set(B))})}),n.set(!0))},C=()=>{s==null||s(),s=null,h&&(h.remove(),h=null),u=null,m=!1,n.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(C,100)},O=_=>{if(!n.get()||!d||!u)return;let D=_.target;!d.contains(D)&&!u.contains(D)&&w()};return(M=p.domElement)==null||M.addEventListener("click",O),{show:E,hide:w,update(_){n=_.openState,o=_.placement,i=_.content,r=_.keepOpenOnContentHover,f(i),h&&h.patch(i)},destroy(){var _;a&&clearTimeout(a),s==null||s(),h==null||h.remove(),(_=p.domElement)==null||_.removeEventListener("click",O)}}}function ie(e){let{kind:t,open:n=!1,placement:o}=e,i=g(n),r=`floating:${t}`,a=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.show()},s=h=>{var m;return(m=h==null?void 0:h.getBehavior(r))==null?void 0:m.hide()},u=N({onKeyDown:(h,m)=>h.key==="Escape"&&s(m)},Nt(r,aa,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var la='<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 Ge(e={}){var o;let{removable:t=!1}=e,n=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let r={span:la,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,"&:hover":{backgroundColor:a=>l(a,"shift-4",n.get(a))}}};t&&i.children.insert(r)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(1),paddingInlineStart:c(2),paddingInlineEnd:t?c(1):c(2),gap:c(2),fontSize:i=>x(i,"inherit"),backgroundColor:i=>l(i,"inherit",n.get(i)),color:i=>l(i,"text",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",n.get(i))}`}}}function sa(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"combobox",open:s,placement:g(n),content:e.content}),d={onClick:(S,C)=>!r&&h(C),dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)},v;if(e.input){let S={onFocus:(C,E)=>u(E),style:p,_key:"combobox-input"};I(e.input,S),v=e.input}else v={input:null,onFocus:(S,C)=>u(C),value:S=>(a.get(S),""),style:p,_key:"combobox-input"};let f={div:S=>{let C=a.get(S),E=Array.isArray(C)?C:[C],O=t.filter(M=>E.includes(M.value)).map(M=>({span:M.label,$:[Ge({color:o,removable:!0})],_key:M.value,_onRemove:_=>{let D=a.get(),H=(Array.isArray(D)?D:[D]).filter(j=>j!==M.value);r?a.set(H):a.set(H[0])}}));return O.push(v),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},y={_onInsert:S=>{S.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:S=>S.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:S=>`1px solid ${l(S,"border-strong","neutral")}`,paddingBlock:S=>c(b(S)*1),paddingInline:S=>c(b(S)*1),borderRadius:S=>c(b(S)*1.5),fontSize:S=>x(S,"inherit"),color:S=>l(S,"text",o),backgroundColor:S=>l(S,"inherit",o)}};return I(m,y),m}function ca(){return{_onSchedule:(e,t)=>{I(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ua(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:o=>{let i=o.getContext("command");if(!i){console.warn('"commandSearch" patch must be used inside a "command"');return}let r=o.domElement,a=()=>i.query.set(r.value);r.addEventListener("input",a),o.addHook("Remove",()=>r.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"border",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},"&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",n)}}}}function ma(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var h,m;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let r=o.domElement,a=(m=(h=r.textContent)==null?void 0:h.toLowerCase())!=null?m:"",s=d=>{r.hidden=d.length>0&&!a.includes(d.toLowerCase())};s(i.query.get());let u=i.query.addListener(s);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{outline:o=>`${c(.5)} solid ${l(o,"shift-6",n)}`,outlineOffset:`-${c(.5)}`}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),_e=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),ao=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Xe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),lo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,so=(e,t)=>_e(e,-((e.getDay()-t+7)%7));function ha(e){var t,n;try{let o=new Intl.Locale(e),i=(n=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?n:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function da(e={}){var ho,fo,po,go;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,h=(ho=e.weekStartsOn)!=null?ho:ha(a),m=g((fo=e.accentColor)!=null?fo:"primary","accentColor"),d=g((po=e.placement)!=null?po:"bottom-start"),p=g((go=e.value)!=null?go:t==="range"?[null,null]:null),v=u?p.addListener(k=>u(k)):null,f=(()=>{let k=p.get(),T=t==="range"?k==null?void 0:k[0]:k;return T instanceof Date?T:new Date})(),y=g(f.getFullYear(),"viewYear"),S=g(f.getMonth(),"viewMonth"),C=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),M=null,_=new Intl.DateTimeFormat(a,N({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),B=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=k=>k?_.format(k):"",pe=k=>{if(s)return s(k);if(t==="range"){let[T,P]=k!=null?k:[null,null];return T?`${j(T)} \u2013 ${j(P)}`:""}return j(k)},Te=Array.from({length:7},(k,T)=>B.format(new Date(2023,0,1+(T+h)%7))),ce=k=>!!o&&F(k)<F(o)||!!i&&F(k)>F(i)||!!r&&r(k),W=k=>{if(!n)return F(k);let T=F(k);return T.setHours(w.get(),O.get(),0,0),T},ae=k=>{var L;if(ce(k))return;if(t==="single"){p.set(W(k)),n||Et();return}let[T,P]=(L=p.get())!=null?L:[null,null];!T||T&&P?p.set([W(k),null]):F(k)<F(T)?(p.set([W(k),W(T)]),n||Et()):(p.set([T,W(k)]),n||Et())},le=()=>{var k;if(n)if(t==="single"){let T=p.get();T&&p.set(W(T))}else{let[T,P]=(k=p.get())!=null?k:[null,null];p.set([T&&W(T),P&&W(P)])}},Be=(k,T)=>{var Oe;if(t!=="range")return!1;let[P,L]=(Oe=p.get(T))!=null?Oe:[null,null],z=L!=null?L:E.get(T);if(!P||!z)return!1;let R=F(P)<=F(z)?P:z,G=F(P)<=F(z)?z:P,K=F(k);return K>=F(R)&&K<=F(G)},ge=(k,T)=>{let P=p.get(T);if(t==="range"){let[L,z]=P!=null?P:[null,null];return Xe(k,L)||Xe(k,z)}return Xe(k,P)},q=k=>{y.set(k.getFullYear()),S.set(k.getMonth())},X=k=>{let T=ao(new Date(y.get(),S.get(),1),k);q(T)},Z=k=>y.set(y.get()+k),Ne=()=>{setTimeout(()=>{var k;(k=M==null?void 0:M.querySelector(`[data-date="${lo(C.get())}"]`))==null||k.focus()},0)},Nn=Un(),{show:Hn,hide:jn,anchorPartial:kt}=ie({kind:"datePicker",open:!1,placement:d,content:Nn});function Et(){jn()}kt.onClick=()=>{};let Fn={type:"text",readonly:!0,value:k=>pe(p.get(k)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(k,T)=>{_t(T)},onFocus:(k,T)=>{_t(T)},onKeyDown:(k,T)=>{let P=k.key;(P==="ArrowDown"||P==="Enter")&&(k.preventDefault(),_t(T))},_onMount:k=>v&&k.addHook("Remove",()=>{v()})};function _t(k){var P;let T=(P=Wn())!=null?P:new Date;C.set(F(T)),q(T),Hn(k),Ne()}function Wn(){var T;let k=p.get();return t==="range"?(T=k==null?void 0:k[0])!=null?T:null:k!=null?k:null}return I(kt,Fn),kt;function Un(){let k=(R,G,K)=>({button:R,type:"button",ariaLabel:G,onClick:K,style:fa()}),T={div:[k("\xAB","Previous year",()=>Z(-1)),k("\u2039","Previous month",()=>X(-1)),{div:R=>D.format(new Date(y.get(R),S.get(R),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:R=>x(R)}},k("\u203A","Next month",()=>X(1)),k("\xBB","Next year",()=>Z(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},P={div:Te.map((R,G)=>({div:R,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"600",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:Ln()},L={div:R=>qn(R),role:"grid",ariaLabel:"Calendar",onKeyDown:Xn,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},z=[T,P,L];return n&&z.push(Yn()),z.push(Gn()),{div:z,role:"dialog",ariaModal:"false",_onMount:R=>{M=R.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:R=>c(b(R)*2),backgroundColor:R=>l(R,"base"),color:R=>l(R,"shift-10"),border:R=>`1px solid ${l(R,"border-strong")}`,boxShadow:A("medium")}}}function qn(k){let T=new Date(y.get(k),S.get(k),1),P=S.get(k),L=so(T,h),z=[];for(let R=0;R<6;R++){let G=[];for(let K=0;K<7;K++){let Oe=_e(L,R*7+K);G.push(Kn(Oe,P,k))}z.push({div:G,role:"row",style:Ln(),_key:R})}return z}function Kn(k,T,P){let L=ce(k),z=ge(k,P),R=Be(k,P),G=k.getMonth()!==T,K=Xe(k,C.get(P)),Oe=Xe(k,new Date);return{button:String(k.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:z,ariaDisabled:L,disabled:L,ariaLabel:H.format(k),dataDate:lo(k),onClick:()=>ae(k),onMouseEnter:()=>t==="range"&&E.set(k),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:V=>x(V),fontFamily:"inherit",opacity:L?.35:G?.5:1,backgroundColor:V=>z?l(V,"shift-7",m.get(V)):R?l(V,"hover",m.get(V)):"transparent",color:V=>z?l(V,"shift-0",m.get(V)):l(V,"text"),outline:Oe?V=>`1px solid ${l(V,"shift-6",m.get(V))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:V=>z?l(V,"shift-7",m.get(V)):l(V,"shift-3",m.get(V))},"&:focus-visible":{outline:V=>`2px solid ${l(V,"shift-6",m.get(V))}`}},_key:lo(k)}}function Yn(){let k=(T,P,L)=>({select:Array.from({length:T},(z,R)=>({option:String(R).padStart(2,"0"),value:String(R),selected:G=>P.get(G)===R,_key:R})),ariaLabel:L,onChange:z=>{P.set(Number(z.target.value)),le()},style:pa()});return{div:[k(24,w,"Hour"),{span:":",style:{fontWeight:"600"}},k(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Gn(){let k=(T,P)=>({button:T,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>x(L,"decrease-1"),color:L=>l(L,"muted",m.get(L)),padding:c(1)}});return{div:[k("Today",()=>{let T=new Date;C.set(F(T)),q(T),Ne()}),k("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:T=>`1px solid ${l(T,"border")}`}}}function Xn(k){let T=k,P=C.get(),L=null;switch(T.key){case"ArrowLeft":L=_e(P,-1);break;case"ArrowRight":L=_e(P,1);break;case"ArrowUp":L=_e(P,-7);break;case"ArrowDown":L=_e(P,7);break;case"Home":L=so(P,h);break;case"End":L=_e(so(P,h),6);break;case"PageUp":L=ao(P,T.shiftKey?-12:-1);break;case"PageDown":L=ao(P,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),ae(P);return;default:return}T.preventDefault(),C.set(L),q(L),Ne()}}function Ln(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function fa(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>l(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function pa(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${l(e,"border-strong")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"text")}}function ga(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}}function ya(e={}){var i,r;let{duration:t=240}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",n.get(a)),color:a=>l(a,"shift-10",n.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(b(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:`-${c(.5)}`,borderInlineEnd:a=>`${c(.5)} solid ${l(a,"shift-9",n.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(b(a)*2),outlineOffset:`-${c(.5)}`,outline:a=>`${c(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:c(250),opacity:1,paddingTop:a=>c(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var Ze=0;function wt(){Ze++,Ze===1&&(document.body.style.overflow="hidden")}function Ae(){Ze=Math.max(0,Ze-1),Ze===0&&(document.body.style.overflow="")}var Rn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ba(e={}){let{color:t="neutral",open:n=!1}=e,o=g(n),i=null,r=!1,a=!1,s=u=>{r=!1,typeof u.close=="function"&&u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Ae(),a=!1),i==null||i.focus(),i=null};return{_onInsert:u=>{u.tagName!=="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(u,h)=>{if(u.target!==h.domElement)return;let m=h.domElement.getBoundingClientRect();u.clientX>=m.left&&u.clientX<=m.right&&u.clientY>=m.top&&u.clientY<=m.bottom||o.set(!1)},onTransitionEnd:(u,h)=>{r&&u.target===h.domElement&&u.propertyName==="opacity"&&s(h.domElement)},_onMount:u=>{let h=u.domElement;h.setAttribute("aria-modal","true");let m=null,d=y=>{if(y.key!=="Tab")return;let S=Array.from(h.querySelectorAll(Rn)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!S.length){y.preventDefault();return}let C=S[0],E=S[S.length-1];y.shiftKey?(document.activeElement===C||document.activeElement===h)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),C.focus())},p=y=>{y.preventDefault(),o.set(!1)};h.addEventListener("cancel",p);let v=y=>{y?(i=document.activeElement,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),a||(wt(),a=!0),h.addEventListener("keydown",d),requestAnimationFrame(()=>{h.style.opacity="1";let S=h.querySelector(Rn);S==null||S.focus()})):(r=!0,h.style.opacity="0",h.removeEventListener("keydown",d),m=setTimeout(()=>{m=null,r&&s(h)},350))};v(o.get());let f=o.addListener(v);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),h.removeEventListener("cancel",p),a&&(Ae(),a=!1),h.removeEventListener("keydown",d),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:u=>x(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",borderRadius:u=>c(b(u)*2),padding:u=>c(b(u)*3),boxShadow:A("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function va(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},$n={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Je=e=>e==="left"||e==="right";function In(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Sa(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=g(n),a=o==="start"||o==="end",s=In(o,!1),u=Je(s)?c(80):c(64),h=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,d)=>{m.target===d.domElement&&r.set(!1)},_onMount:m=>{let d=m.domElement;d.setAttribute("aria-modal","true");let p=_=>{_.preventDefault(),r.set(!1)};d.addEventListener("cancel",p);let v=a&&(d.ownerDocument.documentElement.dir==="rtl"||d.ownerDocument.dir==="rtl"),f=In(o,v);a&&(d.style.transform=co[f],d.style.margin=$n[f],d.style.width=Je(f)?h:"100dvw",d.style.height=Je(f)?"100dvh":h);let y=!1,S=!1,C=null,E=()=>{C=null,y&&(y=!1,typeof d.close=="function"&&d.close(),d.style.visibility="hidden",d.style.pointerEvents="none",S&&(Ae(),S=!1))},w=_=>{_.target===d&&_.propertyName==="transform"&&E()};d.addEventListener("transitionend",w);let O=_=>{_?(y=!1,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),S||(wt(),S=!0),requestAnimationFrame(()=>{d.style.transform="translate(0, 0)"})):(y=!0,d.style.transform=co[f],C=setTimeout(E,350))};O(r.get());let M=r.addListener(O);m.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),M(),d.removeEventListener("cancel",p),d.removeEventListener("transitionend",w),S&&(Ae(),S=!1)})},style:{transform:co[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>c(b(m)*3),margin:$n[s],width:Je(s)?h:"100dvw",height:Je(s)?"100dvh":h,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:A("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function xa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function wa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>l(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o))}}}}function Ca(e={}){return{_onError:(t,n,o)=>{var r,a;(r=e.onError)==null||r.call(e,n);let i=typeof e.fallback=="function"?e.fallback(n,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var ka={small:8,medium:10,large:14};function Ea(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=c(ka[(i=e.size)!=null?i:"medium"]);return{_onInsert:r=>{r.tagName!=="button"&&console.warn('"fab" patch must use button tag')},style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:n,height:n,borderRadius:"50%",fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r,"shift-9",t.get(r)),color:r=>l(r,"shift-0",t.get(r)),boxShadow:A("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>l(r,"shift-10",t.get(r)),boxShadow:A("medium")},"&:focus-visible":{boxShadow:r=>`${A("medium")}, ${$(r,t.get(r))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function _a(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>l(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>l(o,"muted",t.get(o)),lineHeight:1.45}}}}function Ta(e={}){var i;let{layout:t="horizontal"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:r=>{r.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*3),border:"none",borderRadius:r=>c(b(r)*2),fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r,"inherit",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>x(r,"inherit"),fontWeight:600,paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*2),color:r=>l(r,"text",n.get(r)),backgroundColor:r=>l(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?0:c(b(r)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:r=>x(r,"decrease-1"),color:r=>l(r,"text",n.get(r))}}}}var Oa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ma(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Oa[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Pa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function Da(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.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:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>l(o,"text",t.get(o))}}}function La(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>l(o,"inherit",t.get(o))}}}function Ra(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:r=>x(r,"inherit"),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:r=>`${c(.5)} solid ${l(r,"inherit",n.get(r))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`,backgroundColor:r=>l(r,"shift-3",n.get(r))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:c(1.5),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function $a(e={}){return{type:"color",_onSchedule:(t,n)=>{t.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),n.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>x(t,"inherit"),paddingBlock:t=>c(b(t)*1),paddingInline:t=>c(b(t)*1),blockSize:t=>c(6+b(t)*2),inlineSize:t=>c(6+b(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>c(b(t)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>l(t,"shift-2","neutral"),outline:t=>`1px solid ${l(t,"border-strong","neutral")}`}}}}function Ia(e={}){var i,r;let{mode:t="datetime-local"}=e,n=g((i=e.color)!=null?i:"neutral","color"),o=g((r=e.accentColor)!=null?r:"primary","accentColor");return{type:t,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"text",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",n.get(a))}`,borderRadius:a=>c(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>$(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-6","error")}`}}}}function za(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:r=>c(b(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:r=>l(r,"shift-11",t.get(r)),backgroundColor:r=>l(r,"surface",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,backgroundColor:r=>l(r,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-3","neutral")}}}}function Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:r=>c(b(r)*3),paddingInlineEnd:r=>c(b(r)*1.5),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")}}}}var Va='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>',Ba='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>';function Na(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((r=e.accentColor)!=null?r:"primary","accentColor"),o=g(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type:h=>o.get(h)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:h=>o.get(h)?Ba:Va,type:"button",ariaLabel:h=>o.get(h)?"Hide password":"Show password",onClick:()=>o.set(!o.get()),style:{background:"none",border:"none",padding:0,margin:0,cursor:"pointer",color:"inherit",display:"flex",alignItems:"center",flexShrink:0,opacity:.6}};a.children.insert(s),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,color:a=>l(a,"text",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${l(a,"shift-5",n.get(a))}`},"&:focus-within":{boxShadow:a=>$(a,n.get(a))}}}}function Ha(){return{style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let s=n(),u=a.target,h=s.indexOf(u);u.value&&h<s.length-1&&s[h+1].focus()},i=a=>{let s=n(),u=a.target,h=s.indexOf(u);a.key==="Backspace"&&!u.value&&h>0&&s[h-1].focus(),a.key==="ArrowLeft"&&h>0&&s[h-1].focus(),a.key==="ArrowRight"&&h<s.length-1&&s[h+1].focus()},r=a=>{var p,v,f;a.preventDefault();let s=(v=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?v:"",u=n(),h=u.indexOf(a.target),m=h===-1?0:h;[...s].forEach((y,S)=>{u[m+S]&&(u[m+S].value=y)});let d=Math.min(m+s.length-1,u.length-1);(f=u[d])==null||f.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",r),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",r)})}}}function ja(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:r=>{if(r.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:r=>x(r,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(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:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:r=>l(r,"hover",t.get(r))},"&:checked::before":{outline:r=>`1px solid ${l(r,"shift-6",n.get(r))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:r=>l(r,"shift-8",n.get(r))},"&:checked:hover:not([disabled])::before":{backgroundColor:r=>l(r,"shift-7",n.get(r))},"&:focus-visible":{borderRadius:"50%",outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:r=>l(r,"shift-4","neutral"),pointerEvents:"none"}}}}function Fa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:r=>{r.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:r=>l(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:r=>l(r,"shift-9",n.get(r))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:r=>l(r,"shift-10",n.get(r))},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`,outlineOffset:c(1),borderRadius:c(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Wa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>x(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,borderRadius:r=>c(b(r)*1.5),minWidth:c(32),paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(r,"shift-7",t.get(r))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral"),backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`}}}}function Ua(e={}){var n;let t=g((n=e.accentColor)!=null?n:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function qa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:r=>c(b(r)*3),paddingBlock:r=>c(b(r)*1),borderRadius:r=>c(b(r)*1.5),fontSize:r=>x(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"border-strong",t.get(r))}`,color:r=>l(r,"text",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:r=>l(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>l(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:r=>`1px solid ${l(r,"shift-5",n.get(r))}`},"&:focus-visible":{boxShadow:r=>$(r,n.get(r))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"border-strong","neutral")}`,color:r=>l(r,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${c(.5)} solid ${l(r,"shift-6","warning")}`}}}}function Ka(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`}}}function Ya(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text",t.get(r)),cursor:"pointer","&:focus-within":{color:r=>l(r,"shift-10",n.get(r))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Ga(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=g((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:r=>{r.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:r=>x(r,"inherit"),backgroundColor:r=>l(r),color:r=>l(r,"text",t.get(r)),textDecoration:"none","&:visited":{color:r=>l(r,"text",n.get(r))},"&:hover:not([disabled])":{color:r=>l(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:c(1),outlineOffset:c(1),outline:r=>`${c(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"muted","neutral")}}}}function Xa(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:o=>x(o,"inherit"),textDecoration:"none",paddingBlock:o=>c(b(o)*1),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>c(b(o)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>$(o,t.get(o))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,color:o=>l(o,"muted","neutral")}}}}function Za(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ja(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>c(b(n)*2),paddingBlock:n=>c(t?1:b(n)*2),paddingInline:n=>c(b(n)*3),fontSize:n=>x(n,"inherit")}}}function Qa(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=(r=e.accentColor)!=null?r:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(a)*1.5),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",n),color:a=>l(a,"shift-12",n)},"&:focus-visible":{outline:a=>`2px solid ${l(a,"shift-6",n)}`,outlineOffset:"-2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function el(e={}){var n;let t=g((n=e.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function tl(e={items:[]}){var a;let{items:t=[],selectable:n=!0,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,u)=>{if(t.length===0)return;let h=s.nodeId,m=t.map((d,p)=>{var f;let v=(f=d.key)!=null?f:p;return Me(N({button:typeof d.label=="string"?[{span:d.label}]:[d.label],_key:v,type:"button",id:`menuitem${h}${v}`,role:"menuitem"},n?{ariaCurrent:y=>r.get(y)===v||void 0}:{}),{onClick:()=>{var y;n&&r.set(v),(y=d.onClick)==null||y.call(d)},onKeyDown:y=>{var O;let S=y.key;if(S==="Enter"||S===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(S))return;y.preventDefault();let C=t.map((M,_)=>{var D;return(D=M.key)!=null?D:_}),E=C.indexOf(v),w=E;S==="ArrowDown"?w=(E+1)%C.length:S==="ArrowUp"?w=(E-1+C.length)%C.length:S==="Home"?w=0:S==="End"&&(w=C.length-1),(O=document.getElementById(`menuitem${h}${C[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{outline:y=>`${c(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${c(.5)}`}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:A("medium")}}}var zn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,Ve=e=>{let t={},n=[];for(let o in e){let i=e[o];o==="x"?n.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?n.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?n.push(`scale(${i})`):o==="rotate"?n.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return n.length&&(t.transform=n.join(" ")),t};function ol(e={}){var a,s,u,h;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s:0,easing:(u=i.easing)!=null?u:"ease",iterations:(h=i.iterations)!=null?h:1,fill:"both"};return{_onMount:m=>{let d=m.domElement;if(!d||typeof d.animate!="function")return;let p=zn(n)?n.get():n;if(p?d.animate(t?[Ve(t),Ve(p)]:[Ve(p)],r):t&&Object.assign(d.style,Ve(t)),zn(n)){let v=n.addListener(f=>{d.animate([Ve(f)],r)});m.setMetadata("motionRelease",v)}},_onBeforeRemove:(m,d)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([Ve(o)],r).finished.then(d,d)},_onRemove:m=>{let d=m.getMetadata("motionRelease");d==null||d()}}}function nl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function rl(e,t){if(t<=7)return Array.from({length:t},(r,a)=>a+1);let n=[1];e>3&&n.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let r=o;r<=i;r++)n.push(r);return e<t-2&&n.push("..."),n.push(t),n}function il(e){var s;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"text",n),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:u=>l(u,"hover",n)},"&:focus-visible":{boxShadow:u=>$(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Me(N({},r),{backgroundColor:u=>l(u,"shift-6",o),color:u=>l(u,"shift-11",o),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-6",o)}});return{role:"navigation",ariaLabel:"Pagination",_onInsert:u=>{u.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:u=>{let h={div:m=>{let d=i.get(m),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:d<=1,onClick:()=>d>1&&i.set(d-1),style:r});let v=0;for(let f of rl(d,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${v++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",n)}});else{let y=f===d;p.push({button:String(f),_key:`page-${f}`,type:"button",ariaLabel:`Page ${f}`,ariaCurrent:y?"page":void 0,disabled:y,onClick:()=>i.set(f),style:y?a:r})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:d>=t,onClick:()=>d<t&&i.set(d+1),style:r}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(h)},style:{display:"inline-flex"}}}function al(e={}){var i;let{padding:t=4,divider:n=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:N({padding:r=>c(b(r)*t)},n?{borderBottom:r=>`1px solid ${l(r,"border",o.get(r))}`}:{})}}function ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function sl(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=g(t),a=g(n),{show:s,hide:u,anchorPartial:h}=ie({kind:"popover",open:r,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")},_onInsert:v=>{let f=v.attributes.get("id");i=f||v.nodeId,!f&&v.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),I(h,{ariaHaspopup:"dialog",ariaExpanded:v=>r.get(v),onMouseEnter:(v,f)=>o==="hover"&&s(f),onMouseLeave:(v,f)=>o==="hover"&&u(f),onClick:(v,f)=>{o==="click"&&(r.get()?u(f):s(f))},onKeyDown:(v,f)=>{v.key==="Escape"&&r.get()&&u(f)},onFocus:(v,f)=>o==="hover"&&s(f),onBlur:(v,f)=>{let y=v.relatedTarget,S=f.getRoot().domElement,C=i?S.querySelector(`#${CSS.escape(i)}`):null;y&&(C!=null&&C.contains(y))||u(f)},_onMount:v=>i&&v.attributes.set("ariaControls",i)}),h}function uo(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=c(6),bordered:i=!0}=e,r=g(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=m=>{var d;return(d=a[r.get(m)])!=null?d:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",h=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>x(m),backgroundColor:m=>l(m),color:m=>l(m,"text",n),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",n),borderWidth:i?"1px":0,borderColor:m=>l(m,"inherit",n),borderTopStyle:m=>{let d=s(m);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:m=>{let d=s(m);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:m=>{let d=s(m);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:m=>{let d=s(m);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:m=>{let d=s(m);return d.includes("right")?0:d.includes("left")?"auto":h(d)},bottom:m=>{let d=s(m);return d.includes("bottom")?0:d.includes("top")?"auto":h(d)},left:m=>{let d=s(m);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:m=>{let d=s(m),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",v=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${v}) rotate(45deg)`}}}}}function cl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function ul(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),n=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:r=>{r.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:r=>l(r,"shift-3",t.get(r)),"&::-webkit-progress-bar":{backgroundColor:r=>l(r,"shift-3",t.get(r)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:r=>l(r,"shift-9",n.get(r)),borderRadius:c(999),transition:"width 220ms ease"}}}}var ml='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>',hl='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="1em" height="1em"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></svg>';function dl(e={}){var u,h;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=g((h=e.value)!=null?h:0),a=g(0),s=m=>{let d=a.get(m);return d>0?d:r.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let d=1;d<=t;d++){let p=d,v=n?{}:{onClick:()=>{let y=p===r.get()?0:p;r.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let S=r.get(),C=S;if(y.key==="ArrowRight"||y.key==="ArrowUp")C=Math.min(t,S+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")C=Math.max(0,S-1),y.preventDefault();else return;r.set(C),o==null||o(C);let E=C>0?C-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=Me(N({button:y=>p<=s(y)?ml:hl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},v),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:y=>$(y,i)}}});m.children.insert(f)}}}}function fl(e={}){var u,h,m;let{size:t=16,thickness:n=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((h=e.color)!=null?h:"primary","color"),r=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-n)*100),s=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:d=>String(Math.round(o.get(d))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:d=>{d.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:c(t),height:c(t),borderRadius:"50%",background:d=>`conic-gradient(from -90deg, ${l(d,"shift-9",i.get(d))} ${o.get(d)}%, ${l(d,"shift-3",r.get(d))} 0%)`,WebkitMask:s,mask:s}}}function mo(e={}){let{gap:t=4,align:n="center",justify:o,wrap:i=!1}=e;return{style:N(N({display:"flex",alignItems:n,gap:r=>c(b(r)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function pl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>l(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${l(o,"shift-5",t.get(o))} transparent`}}}function gl(e={items:[]}){var r,a,s;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=g((s=(a=e.value)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,h)=>{let m=t.map((d,p)=>{var y;let v=(y=d.key)!=null?y:String(p);return{button:[typeof d.label=="string"?{span:d.label}:d.label],_key:v,type:"button",role:"radio",ariaChecked:S=>i.get(S)===v,onClick:()=>i.set(v),style:{cursor:"pointer",fontSize:S=>x(S,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:S=>l(S,"text",n),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:S=>l(S,"shift-3",n)},"&[aria-checked=true]":{backgroundColor:S=>l(S,"shift-0",o),color:S=>l(S,"shift-10",o)},"&:focus-visible":{boxShadow:S=>$(S,o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});h[u.tagName]=m},style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"shift-2",n)}}}function yl(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"border-strong",t)}`,borderRadius:o=>c(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Zt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",n)}`},"&:focus-visible":{boxShadow:o=>$(o,n)},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"muted","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function bl(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),s=g(i),{show:u,hide:h,anchorPartial:m}=ie({kind:"selectBox",open:s,placement:g(n),content:e.content}),d={onClick:(f,y)=>!r&&h(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:A("medium")}};I(e.content,d);let p={div:f=>{let y=a.get(f),S=Array.isArray(y)?y:[y];return t.filter(E=>S.includes(E.value)).map(E=>({span:E.label,$:[Ge({color:o,removable:r})],_key:E.value,_onRemove:w=>{let O=a.get(),_=(Array.isArray(O)?O:[O]).filter(D=>D!==E.value);r?a.set(_):a.set(_[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},v={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?h(y):u(y),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o)}};return I(m,v),m}function vl(e={}){let{accentColor:t="primary",color:n="neutral",value:o=null}=e;return{role:"option",_onInit:r=>{r.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=r.getContext("select");if(a){let s=a.value;r.attributes.set("ariaSelected",u=>{let h=s.get(u);return a.multiple?h.includes(o):h===o}),r.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(h=>h!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>x(r,"inherit"),height:r=>c(6+b(r)*2),paddingInline:r=>c(b(r)*3),border:"none",outline:"none",color:r=>l(r,"text",n),backgroundColor:r=>l(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>l(r,"hover",n)},"&[aria-selected=true]":{backgroundColor:r=>l(r,"shift-6",t),color:r=>l(r,"shift-11")},"&:focus-visible":{outline:r=>`${c(.5)} solid ${l(r,"shift-6",t)}`,outlineOffset:`-${c(.5)}`}}}}function Sl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=g((a=e.value)!=null?a:n?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:n}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t)}}}function xl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Le(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>x(r),color:r=>l(r,"text",t.get(r)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:r=>l(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function wl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}var Vn={to:{transform:"rotate(360deg)"}},An=Le(JSON.stringify(Vn));function Cl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${l(o,"border-strong",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${An} 0.7s linear infinite`,[`@keyframes ${An}`]:Vn}}}function kl(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{I(a,{_context:{splitter:{direction:t,size:g(n),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function El(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,r=s=>{n.style[o]=`${i?s:100-s}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function _l(){return{role:"separator",tabindex:0,_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=e.domElement,o=t.direction==="horizontal";n.style.cursor=o?"col-resize":"row-resize",n.setAttribute("aria-orientation",o?"vertical":"horizontal"),n.setAttribute("aria-valuemin",String(t.min)),n.setAttribute("aria-valuemax",String(t.max)),n.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{n.setAttribute("aria-valuenow",String(Math.round(u)))}),r=u=>{let h=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-h,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+h,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-h,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,s=u=>{u.preventDefault();let h=n.parentElement,m=p=>{let v=h.getBoundingClientRect(),f=o?(p.clientX-v.left)/v.width*100:(p.clientY-v.top)/v.height*100;t.size.set(Math.min(Math.max(f,t.min),t.max))},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",d)};n.addEventListener("keydown",r),n.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",s)})},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"shift-2"),"&:hover":{backgroundColor:e=>l(e,"shift-3")},"&:focus-visible":{outline:e=>`2px solid ${l(e,"shift-6")}`,outlineOffset:"2px"},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Tl(e={}){let{gap:t=3,align:n}=e;return{style:N({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},n?{alignItems:n}:{})}}function Ol(e={items:[]}){var a;let{items:t=[],direction:n="horizontal",color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.current)!=null?a:0);return{_context:{steps:{current:r,direction:n,color:o,accentColor:i}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var v;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(v=m.key)!=null?v:d,dataStep:String(d+1),dataStatus:f=>{let y=r.get(f);return d<y?"done":d===y?"active":"pending"},ariaCurrent:f=>r.get(f)===d?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:f=>x(f,"decrease-1"),fontWeight:"600",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-6",i),borderColor:f=>l(f,"shift-6",i),color:f=>l(f,"shift-15",i)},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-3",o),borderColor:f=>l(f,"border",o),color:f=>l(f,"text",o)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-3",o)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-6",i)},"&[data-status=pending]":{color:f=>l(f,"shift-7")},"&[data-status=active]":{color:f=>l(f,"shift-10"),fontWeight:"600"},"&[data-status=done]":{color:f=>l(f,"muted")}}}});u[s.tagName]=h},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function Ml(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Pl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Dl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"hover")}}}}function Rl(e={items:[]}){var r,a,s;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=g((s=(a=e.activeKey)!=null?a:(r=t[0])==null?void 0:r.key)!=null?s:0);return{_onSchedule:(u,h)=>{let m=u.nodeId,p={div:t.map((f,y)=>{var E;let S=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:S,type:"button",role:"tab",id:`tab${m}${S}`,ariaControls:`panel${m}${S}`,ariaSelected:w=>i.get(w)===S,onClick:()=>i.set(S),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let M=t.map((B,H)=>{var j;return(j=B.key)!=null?j:H}),_=M.indexOf(S),D=_;O==="ArrowRight"?D=(_+1)%M.length:O==="ArrowLeft"?D=(_-1+M.length)%M.length:O==="Home"?D=0:O==="End"&&(D=M.length-1),i.set(M[D])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"text"),backgroundColor:w=>l(w,"inherit"),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",n)}`},"&:focus-visible":{boxShadow:w=>$(w,n)}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},v=t.map((f,y)=>{var C;let S=(C=f.key)!=null?C:y;return{div:[f.content],_key:S,role:"tabpanel",id:`panel${m}${S}`,ariaLabelledby:`tab${m}${S}`,hidden:E=>i.get(E)!==S,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});h[u.tagName]=[p,...v]}}}function $l(e={}){var i,r;let t=g((i=e.color)!=null?i:"neutral","color"),n=g((r=e.accentColor)!=null?r:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let s=a.domElement;s.style.overflow="hidden";let u=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",u),u(),a.addHook("Remove",()=>s.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",n.get(a))}`},"&:focus-visible":{boxShadow:a=>$(a,n.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function Il(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function zl(e={}){var r,a,s;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((s=e.active)!=null?s:!1);return{style:N({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:"0.25em",transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(u,"shift-8",i.get(u)?o:n),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>`-${c(b(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",n)}})}}function Al(e={}){let{position:t="top-center",color:n="neutral"}=e,o=g(!1),i=t.startsWith("top"),r=t.endsWith("center"),a=t.endsWith("right"),s={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let h=u.domElement.querySelector(`#domphy-toast-${t}`);return h||(h=u.children.insert(s).domElement),h},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",n),backgroundColor:u=>l(u,"inherit",n),boxShadow:A("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,h)=>{let m=!1,d=null,p=()=>{m||(m=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",v),h())},v=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",v),d=setTimeout(p,350),u.addHook("Remove",()=>{var f;d&&(clearTimeout(d),d=null),(f=u.domElement)==null||f.removeEventListener("transitionend",v)}),o.set(!1)}}}function Vl(e={items:[]}){var a;let{items:t=[],multiple:n=!1,color:o="neutral",accentColor:i="primary"}=e,r=g((a=e.value)!=null?a:n?[]:"");return{role:"group",_context:{toggleGroup:{value:r,multiple:n}},_onSchedule:(s,u)=>{let h=t.map((m,d)=>{var f;let p=(f=m.key)!=null?f:String(d);return{button:[typeof m.label=="string"?{span:m.label}:m.label],_key:p,type:"button",role:"button",ariaPressed:y=>{let S=r.get(y);return Array.isArray(S)?S.includes(p):S===p},onClick:()=>{let y=r.get();if(n){let S=Array.isArray(y)?[...y]:[];r.set(S.includes(p)?S.filter(C=>C!==p):[...S,p])}else r.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{boxShadow:y=>$(y,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=h},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function Bl(e={}){return mo({gap:e.gap})}function Nl(){return{div:null,style:{flex:"1 1 0"}}}function Hl(e={}){let{open:t=!1,placement:n="top",content:o="Tooltip Content"}=e,i=g(n),r=g(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:v=>r.get(v),id:a},{show:u,hide:h,anchorPartial:m}=ie({kind:"tooltip",open:t,placement:i,content:s}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*3),borderRadius:v=>c(b(v)*1.5),color:v=>l(v,"text"),backgroundColor:v=>l(v),fontSize:v=>x(v,"inherit"),boxShadow:A("low")},$:[uo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(d),I(m,{ariaDescribedby:a,onMouseEnter:(v,f)=>u(f),onMouseLeave:(v,f)=>h(f),onFocus:(v,f)=>u(f),onBlur:(v,f)=>h(f),onKeyDown:(v,f)=>v.key==="Escape"&&h(f)}),m}function Bn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function jl(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of r)clearTimeout(u);r.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,h)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Bn(u,h),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,h)=>{var M;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let d=Bn(u,h),p=o.get(d);if(!p)return;let v=m.getBoundingClientRect(),f=p.left-v.left,y=p.top-v.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(M=i.get(m))==null||M(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),m.style.transition=`transform ${t}ms ease ${n}ms`,m.style.transform="translate(0px, 0px)"});a.add(S);let C=!1,E=null,w=()=>{C||(C=!0,E&&(r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=_=>{_.propertyName==="transform"&&w()};i.set(m,()=>{C=!0,E&&(clearTimeout(E),r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+n+34),r.add(E)}),o.clear()}}}function Fl(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return nr(Wl);})();
|
|
6
6
|
//# sourceMappingURL=core-theme-ui.global.js.map
|