@domphy/ui 0.18.20 → 0.18.22

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.
@@ -1,6 +1,6 @@
1
- "use strict";var Domphy=(()=>{var Ze=Object.defineProperty,qn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptor,Yn=Object.getOwnPropertyDescriptors,Gn=Object.getOwnPropertyNames,uo=Object.getOwnPropertySymbols;var ho=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var mo=(e,t,n)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))ho.call(t,n)&&mo(e,n,t[n]);if(uo)for(var n of uo(t))Xn.call(t,n)&&mo(e,n,t[n]);return e},Te=(e,t)=>qn(e,Yn(t));var Je=(e,t)=>{for(var n in t)Ze(e,n,{get:t[n],enumerable:!0})},Zn=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Gn(t))!ho.call(e,i)&&i!==n&&Ze(e,i,{get:()=>t[i],enumerable:!(o=Kn(t,i))||o.enumerable});return e};var Jn=e=>Zn(Ze({},"__esModule",{value:!0}),e);var Il={};Je(Il,{core:()=>tt,theme:()=>at,ui:()=>wt});var tt={};Je(tt,{AttributeList:()=>$o,BooleanAttributes:()=>Rt,CamelAttributes:()=>vo,ElementList:()=>Io,ElementNode:()=>j,HtmlAttributeNames:()=>Et,HtmlTags:()=>It,Notifier:()=>He,PrefixCSS:()=>pe,RecordState:()=>Tr,State:()=>Mt,SvgTags:()=>So,VoidTags:()=>wo,_microtask:()=>At,_resetKeylessWarnings:()=>yr,batch:()=>Cr,computed:()=>xr,configure:()=>or,effect:()=>Vo,effectScope:()=>wr,flushPendingNotifiers:()=>To,flushSync:()=>br,hasPendingNotifiers:()=>_o,hashString:()=>Pe,isState:()=>lr,merge:()=>R,nextTick:()=>_r,readonly:()=>sr,runBatched:()=>Eo,toState:()=>g,untrack:()=>kr,watch:()=>Er});var Qn=Object.defineProperty,fo=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,po=(e,t,n)=>t in e?Qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,go=(e,t)=>{for(var n in t||(t={}))er.call(t,n)&&po(e,n,t[n]);if(fo)for(var n of fo(t))tr.call(t,n)&&po(e,n,t[n]);return e},Rt=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],vo=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits","baseFrequency","numOctaves","xChannelSelector","yChannelSelector","stdDeviation","colorInterpolationFilters","pathLength"],Et={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",contentEditable:"contenteditable",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",spellCheck:"spellcheck",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",accessKey:"accesskey",enterKeyHint:"enterkeyhint",inputMode:"inputmode",itemId:"itemid",itemProp:"itemprop",itemRef:"itemref",itemType:"itemtype",tabIndex:"tabindex",writingSuggestions:"writingsuggestions",charSet:"charset",hrefLang:"hreflang",crossOrigin:"crossorigin",aLink:"alink",bgColor:"bgcolor",vLink:"vlink",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formTarget:"formtarget",popoverTarget:"popovertarget",popoverTargetAction:"popovertargetaction",allowPaymentRequest:"allowpaymentrequest",allowUserMedia:"allowusermedia",frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",referrerPolicy:"referrerpolicy",srcDoc:"srcdoc",hSpace:"hspace",fetchPriority:"fetchpriority",srcSet:"srcset",srcLang:"srclang",useMap:"usemap",vSpace:"vspace",dirName:"dirname",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",classId:"classid",codeBase:"codebase",codeType:"codetype",valueType:"valuetype",shadowRootClonable:"shadowrootclonable",shadowRootDelegatesFocus:"shadowrootdelegatesfocus",shadowRootMode:"shadowrootmode",colSpan:"colspan",rowSpan:"rowspan",noWrap:"nowrap",vAlign:"valign",charOff:"charoff",maxLength:"maxlength",minLength:"minlength",autoComplete:"autocomplete",encType:"enctype",dateTime:"datetime"},It=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],pe={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},So=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","feTurbulence","feDisplacementMap","feComponentTransfer","feFuncR","feFuncG","feFuncB","feFuncA","foreignObject"],wo=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],xo={};function or(e){Object.assign(xo,e)}function nr(){return xo}var rr=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],ir=rr.reduce((e,t)=>{let n=t.slice(2).toLowerCase();return e[n]=t,e},{}),Co=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=n=>{this._releases.add(n)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},Ne=[],_t=0;function zt(){return _t>0?null:Ne.length?Ne[Ne.length-1]:null}function ko(e,t){Ne.push(e);try{return t()}finally{Ne.pop()}}function ar(e){_t++;try{return e()}finally{_t--}}var Q=[],At=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},yo=100,et=0,Tt=new Set,Oe=new Set;function Eo(e){et++;try{return e()}finally{if(et--,et===0){let t=Tt;Tt=new Set;for(let n of t)n._scheduleFlush()}}}var He=class{constructor(){this._listeners=Object.create(null),this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let n=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(n)),n}removeListener(e,t){if(!this._listeners)return;let n=this._listeners[e];n&&n.has(t)&&(n.delete(t),n.size===0&&delete this._listeners[e])}listenerCount(e){var t,n,o;return(o=(n=(t=this._listeners)==null?void 0:t[e])==null?void 0:n.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let n=Q.length?Q[Q.length-1]:null;if(n&&n[0]===this&&n[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=yo){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${yo} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...Q]})}et>0?Tt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Oe.add(this),At(()=>this._flushAll()))}_isCircular(e){let t=Q.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let n=[...Q.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
- ${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Oe.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)Q=o,this._flush(t,n);Q=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){Q.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),Q.pop()}}};function _o(){return Oe.size>0}function To(){let e=0;for(;Oe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Oe];Oe.clear();for(let n of t)n._flushAll()}}var Mt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new He,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=zt();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 R(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=ce(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]=R(e[r],a):e[r]=a;else if(n.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let d=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(", ")}}else e[r]=[e[r],a].filter(c=>c).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let d=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join("")}}else e[r]=[e[r],a].filter(c=>c).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let d=typeof c=="function"?c(u):c,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(" ")}}else e[r]=[e[r],a].filter(c=>c).join(" ");else if(r.startsWith("on")){let c=r.replace("on","").toLowerCase();ur(e,c,a)}else if(r.startsWith("_on")){let c=r.replace("_on","");cr(e,c,a)}else e[r]=a}return e}function Pe(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 Mt||e!=null&&e._isState?e:new Mt(e,t)}function lr(e){return typeof e=="object"&&e!==null&&e._isState===!0}function sr(e){return{_isState:!0,get(t){return e.get(t)}}}function cr(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function ur(e,t,n){let o=ir[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 ce(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(ce(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(ce(i,t),ce(r,t));return n}if(e instanceof Set){n=new Set,t.set(e,n);for(let i of e)n.add(ce(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]=ce(e[i],t);return n}function Mo(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&&!It.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=>Mo(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 Qe(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function mr(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 Oo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Po(e){return Object.keys(e).find(t=>It.includes(t))}function Do(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function hr(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var c=e[r];if(c==="(")n+=1;else if(c===")")n-=1;else if(c==="[")o+=1;else if(c==="]")o-=1;else if(c===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=c}return t.push(i.trim()),t}function Ot(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 dr(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=Ot(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Ot(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Lo(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:nr().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 Pt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>R(t,Pt(n))),delete e.$,R(t,e),t}else return e},fr={translate:["yes","no"],autoCapitalize:["on","off"]},pr=class{constructor(e,t,n){this.declaredValue=void 0,this._notifier=new He,this._releases=[],this._removeHooked=!1,this.parent=n,this.isBoolean=Rt.includes(e),this.enumeratedBoolean=fr[e],vo.includes(e)?this.name=e:Object.hasOwn(Et,e)?this.name=Et[e]:this.name=Do(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}="${Oo(String(n))}"`}},$o=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 pr(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(!Rt.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,d)=>{let m=(u||"").split(" ").filter(h=>h);return!m.includes(d)&&m.push(d),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"),c=typeof e=="function";if(!r&&!c){this.set("class",o(a,e));return}this.set("class",u=>o(r?a(u):a,c?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))}},ge=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",gr=class{constructor(e,t,n){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Do(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)),pe[this.name]&&pe[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),pe[this.name]&&pe[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 pe[this.name]&&pe[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},se=class Dt{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Ro(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 Dt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Dt;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new gr(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)}}},Ro=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof se;)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],c=hr(r);for(let u of c){let d=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new se(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new se(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new se(u,this.parent);for(let h in a)m.insertStyle(h,a[h]);this.items.push(m)}else if(typeof a=="object"&&a!=null){let m=new se(d,this.parent);this.items.push(m);for(let[h,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let b=i(h,d);this.addCSS(p,b)}else m.insertStyle(h,p)}else n[u]=a}}if(Object.keys(n).length){let r=new se(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 c in e){let u=e[c];typeof u=="object"&&u!=null||(o[c]=u)}let i=this.items.find(c=>c.selectorText===t);i||(i=new se(t,this.parent),this.items.push(i));let r=new Set(Object.keys(o));for(let c in o)i.insertStyle(c,o[c]);if(i.styleBlock)for(let c of Object.keys(i.styleBlock))r.has(c)||i.removeStyle(c);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 se(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(Ot(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}},j=class Me{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.children=new Io(this),this.styles=new Ro(this),this.attributes=new $o(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=ce(t),Mo(t),t.style=t.style||{},this.parent=n,this.tagName=Po(t),t=Pt(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}`,c=JSON.stringify(t.style||{},(d,m)=>typeof m=="function"?a:m);this.nodeId=Pe(a+c),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=So.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){R(this._context,t._context),R(this._metadata,t._metadata);let n=Object.keys(t);for(let o=0;o<n.length;o++){let i=n[o],r=t[i];["$","_onSchedule","_key","_context","_metadata","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=ce(t);o.style=o.style||{},o=Pt(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&&R(this._context,o._context),o._metadata&&R(this._metadata,o._metadata),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let r=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","style",this.tagName],c=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),d=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||c.includes(m)||m==="_portal")continue;let h=o[m];m.startsWith("on")&&typeof h=="function"?this.addEvent(m.substring(2).toLowerCase(),h):m==="class"&&(typeof h=="string"||typeof h=="function")?d=h:(this.attributes.set(m,h),u.add(m))}if(typeof d=="function"){let m=d;this.attributes.set("class",h=>`${r} ${m(h)}`)}else this.attributes.set("class",d?`${r} ${d}`: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 Me&&t.parent;)t=t.parent;return t}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 Me?n.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(wo.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(ge&&!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 Me?o.mount(r):o.domText=r)}),n){let o=n.sheet;o&&this._hydrateStyles(dr(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 Me&&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=Lo(r)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Me&&a._portal){let c=a._portal(this.getRoot());c&&a.render(c)}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():ge&&!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()}}},bo=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(Qe(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=Qe(this.text);if(this.text=n,!this.domText)return;if(!o&&!Qe(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"?"&#8203;":Qe(this.text)?mr(this.text):Oo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},Lt=new Set;function yr(){Lt.clear()}var Io=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new j(e,this.owner,this._nextKey++):new bo(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 j?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 j?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 j?e.domElement:e.domText,i=t instanceof j?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 c=this.items.slice(),u=new Map;for(let f of c)f instanceof j&&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 d=new Set(c),m=new Set,h=0,p=ge&&c.length>0?e.length!==c.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?Po(y):void 0;if(ge&&S&&C===void 0&&h++,C!==void 0){let x=u.get(C);if(x instanceof j&&x.tagName===E){u.delete(C);let M=this.items.indexOf(x);if(M!==f&&M>=0){let _=!!x._portal;this.move(M,f,_?!1:t,!0)}x.parent=this.owner,x.patch(y),m.add(x);continue}}else if(S){let x=this.items[f];if(x instanceof j&&x.key==null&&x.tagName===E&&d.has(x)&&!m.has(x)&&!x._imperative&&!x._beforeRemoveFired){x.parent=this.owner,x.patch(y),m.add(x);continue}}else{let x=this.items[f];if(x instanceof bo&&d.has(x)&&!m.has(x)&&!x._imperative){x.setText(y==null?"":y),m.add(x);continue}}m.add(this.insert(y,f,t,!0,!0))}let b=this.items.slice(e.length);for(let f of b)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),ge&&c.length>0&&h>0&&p){let f=this.owner.nodeId;if(!Lt.has(f)){Lt.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}>, ${h} unkeyed item${h===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,c=this._createNode(e);if(c._imperative=!i,this.items.splice(a,0,c),c instanceof j){c._hooks.Insert&&c._hooks.Insert(c);let u=this.owner.domElement;if(n&&u)if(c._portal){let d=c._portal(this.owner.getRoot());d&&c.render(d)}else{let d=c._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);let h=u.getRootNode(),p=h instanceof ShadowRoot?h:document.head,b=Lo(p);c.styles.render(b),c._hooks.Mount&&c._hooks.Mount(c),c.children.items.forEach(f=>{if(f instanceof j&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(d)})}}else{let u=this.owner.domElement;if(n&&u){let d=c._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),c}remove(e,t=!0,n=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof j){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())},c=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,c(e,a),c.length<2&&!r?a():ge&&!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}},ye=new Set,$t=!1;function zo(e){ye.add(e),!$t&&($t=!0,At(Ao))}function Ao(){for($t=!1;ye.size>0;){let e=[...ye];ye.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function br(){let e=0;for(;_o()||ye.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}To(),Ao()}}var Be=[];function vr(){return Be.length?Be[Be.length-1]:null}function Vt(e){let t=vr();t&&t._add(e)}var Sr=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 ge&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();Be.push(this);try{return e()}finally{Be.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function wr(){let e=new Sr;return Vt(()=>e.stop()),e}function Vo(e){let t=!1,n=!1,o=()=>{t||r()},i=new Co(()=>{t||zo(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{ko(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),ye.delete(o))};return Vt(a),r(),a}function xr(e){let t="computed",n=new He,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&d()},c=new Co(()=>{i||(i=!0,zo(a))}),u=()=>{c.reset(),o=ko(c,e),i=!1,r=!0},d=()=>{let h=o,p=r;u(),!(p&&o===h)&&n.notify(t,o)},m=h=>{if(h)n.addListener(t,h);else{let p=zt();p&&n.addListener(t,p.handler)}return i&&(r&&n.listenerCount(t)>0?d():u()),o};return Vt(()=>{c.reset(),ye.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:m}}function Cr(e){return Eo(e)}function kr(e){return ar(e)}function Er(e,t,n){let o,i=!0;return Vo(()=>{let r=typeof e=="function"?e():e.get();(!i||n!=null&&n.immediate)&&t(r,o),o=r,i=!1})}function _r(e){return e?Promise.resolve().then(e):Promise.resolve()}var Tr=class{constructor(e){this._notifier=new He,this.initialRecord=go({},e),this._record=go({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=zt();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 at={};Je(at,{COLOR_ROLES:()=>Ur,ElementTones:()=>je,applySystemTheme:()=>Wr,generateTheme:()=>Zr,getTheme:()=>ee,setTheme:()=>Br,themeApply:()=>jr,themeCSS:()=>jt,themeColor:()=>l,themeColorToken:()=>Kt,themeDensity:()=>v,themeFluidSpacing:()=>Fr,themeName:()=>it,themeSize:()=>w,themeSpacing:()=>s,themeTokens:()=>qo,themeVars:()=>rt});var Mr=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)},Or=e=>{let t=n=>n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;return e.map(t)},Pr=e=>{let[t,n,o]=Mr(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}`},ot=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 Or([t,n,o])},Dr=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]},Lr=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,c=i*i*i,u=r*r*r,d=a*a*a;return[4.0767416621*c-3.3077115913*u+.2309699292*d,-1.2684380046*c+2.6097574011*u-.3413193965*d,-.0041960863*c-.7034186147*u+1.707614701*d]};var Bt=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,c=.95047,u=1,d=1.08883,m=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,h=m(i/c),p=m(r/u),b=m(a/d);return[116*p-16,500*(h-p),200*(p-b)]};var Bo=(e,t)=>{let[n,o,i]=e,[r,a,c]=t,u=(n+r)/2,d=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+c*c),h=(d+m)/2,p=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),b=o*(1+p),f=a*(1+p),y=Math.sqrt(b*b+i*i),S=Math.sqrt(f*f+c*c),C=(y+S)/2,E=Math.atan2(i,b)*180/Math.PI+(Math.atan2(i,b)<0?360:0),x=Math.atan2(c,f)*180/Math.PI+(Math.atan2(c,f)<0?360:0),M=x-E;Math.abs(M)>180&&(M+=x<=E?360:-360);let _=Math.abs(E-x)>180?(E+x+360)/2:(E+x)/2,O=1-.17*Math.cos((_-30)*Math.PI/180)+.24*Math.cos(2*_*Math.PI/180)+.32*Math.cos((3*_+6)*Math.PI/180)-.2*Math.cos((4*_-63)*Math.PI/180),D=r-n,A=S-y,B=2*Math.sqrt(y*S)*Math.sin(M/2*Math.PI/180),V=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),de=1+.045*C,Ee=1+.015*C*O,le=30*Math.exp(-Math.pow((_-275)/25,2)),H=-(2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7))))*Math.sin(2*le*Math.PI/180);return Math.sqrt(Math.pow(D/V,2)+Math.pow(A/de,2)+Math.pow(B/Ee,2)+H*(A/de)*(B/Ee))};var No=e=>{if(e.length<1)return d=>0;let t=[...e].sort((d,m)=>d[0]-m[0]),n=[];for(let d=0;d<t.length;d++)(d===0||t[d][0]!==t[d-1][0])&&n.push(t[d]);let o=n.length;if(o===1)return d=>n[0][1];let i=n.map(d=>d[0]),r=n.map(d=>d[1]),a=[],c=[];for(let d=0;d<o-1;d++)a[d]=i[d+1]-i[d],c[d]=(r[d+1]-r[d])/a[d];let u=new Array(o);u[0]=c[0],u[o-1]=c[o-2];for(let d=1;d<o-1;d++){let m=c[d-1],h=c[d];if(m*h<=0)u[d]=0;else{let p=(1+a[d]/(a[d-1]+a[d]))/3;u[d]=m*h/((1-p)*m+p*h)}}return d=>{if(d<=i[0])return r[0];if(d>=i[o-1])return r[o-1];let m=0,h=o-2,p=0;for(;m<=h;){let x=Math.floor((m+h)/2);if(d>=i[x]&&d<=i[x+1]){p=x;break}d<i[x]?h=x-1:m=x+1}let b=a[p],f=(d-i[p])/b,y=f*f,S=y*f,C=u[p]*b,E=u[p+1]*b;return(2*S-3*y+1)*r[p]+(S-2*y+f)*C+(-2*S+3*y)*r[p+1]+(S-y)*E}};var Ho=.605,Nt=.685;function $r(e){let t=Math.pow(e,Ho);return t/(1+Nt*(1-t))}function Rr(e){let t=e*(1+Nt)/(1+e*Nt);return Math.pow(t,1/Ho)}function Ir(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 zr(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>Dr(p)).sort((p,b)=>p[0]-b[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+=Ir(t[p],t[p-1]),r.push(a);let c=r.map(p=>Rr(a>0?p/a:0)),u=e.length===1?0:c[1],d=e.length===1?1:c[c.length-2],m=No(c.map((p,b)=>[p,o[b]])),h=No(c.map((p,b)=>[p,i[b]]));return{colorAtParam:p=>{let b=$r(p),f=u+b*(d-u),y=0;for(let O=0;O<c.length-1;O++)if(f<=c[O+1]){y=O;break}let S=c[y],C=c[y+1],E=(f-S)/(C-S||1),x=n[y]+E*(n[y+1]-n[y]),M=m(f),_=h(f);return Lr([x,M,_])},parameters:c.slice(1,-1).map(p=>(p-u)/(d-u))}}function jo(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}=zr(n.map(ot)),r=[],a=[0,...i,1],c=a.map(d=>Math.round(d*(t-1))),u=0;for(let d=0;d<t;d++){for(;u<c.length-2&&d>c[u+1];)u++;let m=c[u],h=c[u+1],p=a[u],b=a[u+1],f;if(h<=m)f=p;else{let y=(d-m)/(h-m);f=p+y*(b-p)}r.push(Pr(o(f)))}return r.reverse()}var Ar={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:{}},Fe=Ar,Ut=e=>JSON.parse(JSON.stringify(e)),Wo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),De={light:Ut(Fe),dark:Hr(Fe)},nt=null,Ht=new Map;function qt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Vr(e){for(let t in e)if(!Object.keys(Fe).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 Uo(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]={}),Uo(e[o],t[o])):e[o]=t[o])}function Nr(e,t){let n={},o=qt(t);for(let r in t){let a=t[r];if(r==="colors")for(let c in t.colors)[...Array(o).keys()].forEach(u=>n[`--${c}-${u}`]=t.colors[c][u]);else if(r==="fontSizes")[...Array(8).keys()].forEach(c=>n[`--fontSize-${c}`]=t.fontSizes[c]);else if(r==="custom"&&a&&typeof a=="object")for(let c in a)n[`--custom-${Wo(c)}`]=a[c]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
1
+ "use strict";var Domphy=(()=>{var Je=Object.defineProperty,qn=Object.defineProperties,Un=Object.getOwnPropertyDescriptor,Kn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertyNames,uo=Object.getOwnPropertySymbols;var mo=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable;var ho=(e,t,n)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))mo.call(t,n)&&ho(e,n,t[n]);if(uo)for(var n of uo(t))Gn.call(t,n)&&ho(e,n,t[n]);return e},Te=(e,t)=>qn(e,Kn(t));var Ze=(e,t)=>{for(var n in t)Je(e,n,{get:t[n],enumerable:!0})},Xn=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Yn(t))!mo.call(e,i)&&i!==n&&Je(e,i,{get:()=>t[i],enumerable:!(o=Un(t,i))||o.enumerable});return e};var Jn=e=>Xn(Je({},"__esModule",{value:!0}),e);var Il={};Ze(Il,{core:()=>tt,theme:()=>at,ui:()=>St});var tt={};Ze(tt,{AttributeList:()=>$o,BooleanAttributes:()=>$t,CamelAttributes:()=>vo,ElementList:()=>Ro,ElementNode:()=>j,HtmlAttributeNames:()=>kt,HtmlTags:()=>It,Notifier:()=>He,PrefixCSS:()=>pe,RecordState:()=>_r,State:()=>Tt,SvgTags:()=>So,VoidTags:()=>wo,_microtask:()=>zt,_resetKeylessWarnings:()=>gr,batch:()=>xr,behavior:()=>At,computed:()=>wr,configure:()=>tr,effect:()=>Vo,effectScope:()=>Sr,flushPendingNotifiers:()=>To,flushSync:()=>yr,hasPendingNotifiers:()=>_o,hashString:()=>Pe,isState:()=>ar,merge:()=>I,nextTick:()=>Er,readonly:()=>lr,runBatched:()=>Eo,toState:()=>g,untrack:()=>Cr,watch:()=>kr});var Zn=Object.defineProperty,fo=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,po=(e,t,n)=>t in e?Zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,go=(e,t)=>{for(var n in t||(t={}))Qn.call(t,n)&&po(e,n,t[n]);if(fo)for(var n of fo(t))er.call(t,n)&&po(e,n,t[n]);return e},$t=["allowFullScreen","async","autoFocus","autoPlay","checked","compact","contentEditable","controls","declare","default","defer","disabled","formNoValidate","hidden","isMap","itemScope","loop","multiple","muted","noHref","noShade","noValidate","open","playsInline","readonly","required","reversed","scoped","selected","sortable","trueSpeed","typeMustMatch","wmode","spellCheck","inert","download","noModule","paused","autoPictureInPicture"],vo=["viewBox","preserveAspectRatio","gradientTransform","gradientUnits","spreadMethod","markerStart","markerMid","markerEnd","markerHeight","markerWidth","markerUnits","refX","refY","patternContentUnits","patternTransform","patternUnits","filterUnits","primitiveUnits","kernelUnitLength","clipPathUnits","maskContentUnits","maskUnits","baseFrequency","numOctaves","xChannelSelector","yChannelSelector","stdDeviation","colorInterpolationFilters","pathLength"],kt={htmlFor:"for",allowFullScreen:"allowfullscreen",autoFocus:"autofocus",autoPlay:"autoplay",contentEditable:"contenteditable",formNoValidate:"formnovalidate",isMap:"ismap",itemScope:"itemscope",noHref:"nohref",noShade:"noshade",noValidate:"novalidate",playsInline:"playsinline",trueSpeed:"truespeed",typeMustMatch:"typemustmatch",spellCheck:"spellcheck",noModule:"nomodule",autoPictureInPicture:"autopictureinpicture",autoCapitalize:"autocapitalize",accessKey:"accesskey",enterKeyHint:"enterkeyhint",inputMode:"inputmode",itemId:"itemid",itemProp:"itemprop",itemRef:"itemref",itemType:"itemtype",tabIndex:"tabindex",writingSuggestions:"writingsuggestions",charSet:"charset",hrefLang:"hreflang",crossOrigin:"crossorigin",aLink:"alink",bgColor:"bgcolor",vLink:"vlink",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formTarget:"formtarget",popoverTarget:"popovertarget",popoverTargetAction:"popovertargetaction",allowPaymentRequest:"allowpaymentrequest",allowUserMedia:"allowusermedia",frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",referrerPolicy:"referrerpolicy",srcDoc:"srcdoc",hSpace:"hspace",fetchPriority:"fetchpriority",srcSet:"srcset",srcLang:"srclang",useMap:"usemap",vSpace:"vspace",dirName:"dirname",imageSizes:"imagesizes",imageSrcSet:"imagesrcset",classId:"classid",codeBase:"codebase",codeType:"codetype",valueType:"valuetype",shadowRootClonable:"shadowrootclonable",shadowRootDelegatesFocus:"shadowrootdelegatesfocus",shadowRootMode:"shadowrootmode",colSpan:"colspan",rowSpan:"rowspan",noWrap:"nowrap",vAlign:"valign",charOff:"charoff",maxLength:"maxlength",minLength:"minlength",autoComplete:"autocomplete",encType:"enctype",dateTime:"datetime"},It=["a","abbr","address","article","aside","audio","b","base","blockquote","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","slot","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","bdi","bdo","math","menu","search","area","embed","hr","animate","animateMotion","animateTransform","circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","tbreak","text","textPath","tspan","use","view"],pe={transform:["webkit","ms"],transition:["webkit","ms"],animation:["webkit"],userSelect:["webkit","ms"],flexDirection:["webkit","ms"],flexWrap:["webkit","ms"],justifyContent:["webkit","ms"],alignItems:["webkit","ms"],alignSelf:["webkit","ms"],order:["webkit","ms"],flexGrow:["webkit","ms"],flexShrink:["webkit","ms"],flexBasis:["webkit","ms"],columns:["webkit"],columnCount:["webkit"],columnGap:["webkit"],columnRule:["webkit"],columnWidth:["webkit"],boxSizing:["webkit"],appearance:["webkit","moz"],filter:["webkit"],backdropFilter:["webkit"],clipPath:["webkit"],mask:["webkit"],maskImage:["webkit"],textSizeAdjust:["webkit","ms"],hyphens:["webkit","ms"],writingMode:["webkit","ms"],gridTemplateColumns:["ms"],gridTemplateRows:["ms"],gridAutoColumns:["ms"],gridAutoRows:["ms"],gridColumn:["ms"],gridRow:["ms"],marginInlineStart:["webkit"],marginInlineEnd:["webkit"],paddingInlineStart:["webkit"],paddingInlineEnd:["webkit"],minInlineSize:["webkit"],maxInlineSize:["webkit"],minBlockSize:["webkit"],maxBlockSize:["webkit"],inlineSize:["webkit"],blockSize:["webkit"],tabSize:["moz"],overscrollBehavior:["webkit","ms"],touchAction:["ms"],resize:["webkit"],printColorAdjust:["webkit"],backgroundClip:["webkit"],boxDecorationBreak:["webkit"],overflowScrolling:["webkit"]},So=["svg","circle","path","rect","ellipse","line","polyline","polygon","g","defs","use","symbol","linearGradient","radialGradient","stop","clipPath","mask","filter","text","tspan","textPath","image","pattern","marker","animate","animateTransform","animateMotion","feGaussianBlur","feComposite","feColorMatrix","feMerge","feMergeNode","feOffset","feFlood","feBlend","feTurbulence","feDisplacementMap","feComponentTransfer","feFuncR","feFuncG","feFuncB","feFuncA","foreignObject"],wo=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],xo={};function tr(e){Object.assign(xo,e)}function or(){return xo}var nr=["onAbort","onAuxClick","onBeforeMatch","onBeforeToggle","onBlur","onCancel","onCanPlay","onCanPlayThrough","onChange","onClick","onClose","onContextLost","onContextMenu","onContextRestored","onCopy","onCueChange","onCut","onDblClick","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onDurationChange","onEmptied","onEnded","onError","onFocus","onFormData","onInput","onInvalid","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadedData","onLoadedMetadata","onLoadStart","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","onPause","onPlay","onPlaying","onProgress","onRateChange","onReset","onResize","onScroll","onScrollEnd","onSecurityPolicyViolation","onSeeked","onSeeking","onSelect","onSlotChange","onStalled","onSubmit","onSuspend","onTimeUpdate","onToggle","onVolumeChange","onWaiting","onWheel","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onCompositionStart","onCompositionUpdate","onCompositionEnd","onTransitionEnd","onTransitionStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onFullscreenChange","onFullscreenError","onFocusIn","onFocusOut"],rr=nr.reduce((e,t)=>{let n=t.slice(2).toLowerCase();return e[n]=t,e},{}),Co=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=n=>{this._releases.add(n)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},Be=[],Et=0;function Rt(){return Et>0?null:Be.length?Be[Be.length-1]:null}function ko(e,t){Be.push(e);try{return t()}finally{Be.pop()}}function ir(e){Et++;try{return e()}finally{Et--}}var Q=[],zt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},yo=100,et=0,_t=new Set,Oe=new Set;function Eo(e){et++;try{return e()}finally{if(et--,et===0){let t=_t;_t=new Set;for(let n of t)n._scheduleFlush()}}}var He=class{constructor(){this._listeners=Object.create(null),this._pending=new Map,this._scheduled=!1,this._flushing=new Map,this._selfDepth=0}_dispose(){if(this._listeners)for(let e in this._listeners)this._listeners[e].clear();this._listeners=null}addListener(e,t){if(!this._listeners)return()=>{};if(typeof e!="string"||typeof t!="function")throw new Error("Event name must be a string, listener must be a function");this._listeners[e]||(this._listeners[e]=new Set);let n=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(n)),n}removeListener(e,t){if(!this._listeners)return;let n=this._listeners[e];n&&n.has(t)&&(n.delete(t),n.size===0&&delete this._listeners[e])}listenerCount(e){var t,n,o;return(o=(n=(t=this._listeners)==null?void 0:t[e])==null?void 0:n.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let n=Q.length?Q[Q.length-1]:null;if(n&&n[0]===this&&n[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=yo){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${yo} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...Q]})}et>0?_t.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Oe.add(this),zt(()=>this._flushAll()))}_isCircular(e){let t=Q.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let n=[...Q.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
2
+ ${n.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Oe.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:n,chain:o}]of e)Q=o,this._flush(t,n);Q=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let n=this._listeners[e];if(n){Q.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),Q.pop()}}};function _o(){return Oe.size>0}function To(){let e=0;for(;Oe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Oe];Oe.clear();for(let n of t)n._flushAll()}}var Tt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new He,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Rt();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=ce(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 c=e[r];e[r]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join(", ")}}else e[r]=[e[r],a].filter(c=>c).join(", ");else if(i.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join("")}}else e[r]=[e[r],a].filter(c=>c).join("");else if(o.includes(r))if(typeof e[r]=="function"||typeof a=="function"){let c=e[r];e[r]=u=>{let m=typeof c=="function"?c(u):c,h=typeof a=="function"?a(u):a;return[m,h].filter(d=>d).join(" ")}}else e[r]=[e[r],a].filter(c=>c).join(" ");else if(r.startsWith("on")){let c=r.replace("on","").toLowerCase();cr(e,c,a)}else if(r.startsWith("_on")){let c=r.replace("_on","");sr(e,c,a)}else e[r]=a}return e}function Pe(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 Tt||e!=null&&e._isState?e:new Tt(e,t)}function ar(e){return typeof e=="object"&&e!==null&&e._isState===!0}function lr(e){return{_isState:!0,get(t){return e.get(t)}}}function At(e,t,n){return{_behaviors:{[e]:{attach:t,props:n}}}}function sr(e,t,n){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...r)=>{i(...r),n(...r)}:e[o]=n}function cr(e,t,n){let o=rr[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 ce(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(ce(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(ce(i,t),ce(r,t));return n}if(e instanceof Set){n=new Set,t.set(e,n);for(let i of e)n.add(ce(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]=ce(e[i],t);return n}function Mo(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&&!It.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=>Mo(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 Qe(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function ur(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 Oo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Po(e){return Object.keys(e).find(t=>It.includes(t))}function Do(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function hr(e){if(e.indexOf("@")===0)return[e];for(var t=[],n=0,o=0,i="",r=0,a=e.length;r<a;r++){var c=e[r];if(c==="(")n+=1;else if(c===")")n-=1;else if(c==="[")o+=1;else if(c==="]")o-=1;else if(c===","&&!n&&!o){t.push(i.trim()),i="";continue}i+=c}return t.push(i.trim()),t}function Mt(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 mr(e,t){for(let n=0;n<e.length;n++){let o=e[n],i=null;typeof o.selectorText=="string"?i=Mt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Mt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Lo(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:or().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 Ot=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(n=>I(t,Ot(n))),delete e.$,I(t,e),t}else return e},dr={translate:["yes","no"],autoCapitalize:["on","off"]},fr=class{constructor(e,t,n){this.declaredValue=void 0,this._notifier=new He,this._releases=[],this._removeHooked=!1,this.parent=n,this.isBoolean=$t.includes(e),this.enumeratedBoolean=dr[e],vo.includes(e)?this.name=e:Object.hasOwn(kt,e)?this.name=kt[e]:this.name=Do(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}="${Oo(String(n))}"`}},$o=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 fr(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(!$t.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,m)=>{let h=(u||"").split(" ").filter(d=>d);return!h.includes(m)&&h.push(m),h.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"),c=typeof e=="function";if(!r&&!c){this.set("class",o(a,e));return}this.set("class",u=>o(r?a(u):a,c?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))}},ge=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",pr=class{constructor(e,t,n){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Do(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)),pe[this.name]&&pe[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),pe[this.name]&&pe[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 pe[this.name]&&pe[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},se=class Pt{constructor(t,n){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Io(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 Pt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Pt;)t=t.parent;return t}insertStyle(t,n){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(n):this.styleBlock[t]=new pr(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)}}},Io=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof se;)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],c=hr(r);for(let u of c){let m=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let h=new se(u,this.parent);h.styleList.addCSS(a,t),o.push(h)}}else if(u.startsWith("@keyframes")){let h=new se(u,this.parent);h.styleList.addCSS(a,""),this.items.push(h)}else if(u.startsWith("@font-face")){let h=new se(u,this.parent);for(let d in a)h.insertStyle(d,a[d]);this.items.push(h)}else if(typeof a=="object"&&a!=null){let h=new se(m,this.parent);this.items.push(h);for(let[d,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let b=i(d,m);this.addCSS(p,b)}else h.insertStyle(d,p)}else n[u]=a}}if(Object.keys(n).length){let r=new se(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 c in e){let u=e[c];typeof u=="object"&&u!=null||(o[c]=u)}let i=this.items.find(c=>c.selectorText===t);i||(i=new se(t,this.parent),this.items.push(i));let r=new Set(Object.keys(o));for(let c in o)i.insertStyle(c,o[c]);if(i.styleBlock)for(let c of Object.keys(i.styleBlock))r.has(c)||i.removeStyle(c);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 se(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let n=e.get(Mt(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}},j=class Me{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 Ro(this),this.styles=new Io(this),this.attributes=new $o(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,r;t=ce(t),Mo(t),t.style=t.style||{},this.parent=n,this.tagName=Po(t),t=Ot(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}`,c=JSON.stringify(t.style||{},(m,h)=>typeof h=="function"?a:h);this.nodeId=Pe(a+c),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=So.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=ce(t);o.style=o.style||{},o=Ot(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 h=Array.isArray(i)?i:[i];this.children.update(h,!!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],c=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),m=null;this._events={};for(let h of Object.keys(o)){if(a.includes(h)||c.includes(h)||h==="_portal")continue;let d=o[h];h.startsWith("on")&&typeof d=="function"?this.addEvent(h.substring(2).toLowerCase(),d):h==="class"&&(typeof d=="string"||typeof d=="function")?m=d:(this.attributes.set(h,d),u.add(h))}if(typeof m=="function"){let h=m;this.attributes.set("class",d=>`${r} ${h(d)}`)}else this.attributes.set("class",m?`${r} ${m}`:r);if(this.attributes.items)for(let h of Object.keys(this.attributes.items))u.has(h)||this.attributes.remove(h);if(this._events)for(let h in this._events)this._bindEvent(h)}_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 Me&&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 Me?n.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(wo.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(ge&&!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 Me?o.mount(r):o.domText=r)}),n){let o=n.sheet;o&&this._hydrateStyles(mr(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 Me&&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=Lo(r)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Me&&a._portal){let c=a._portal(this.getRoot());c&&a.render(c)}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():ge&&!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()}}},bo=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(Qe(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=Qe(this.text);if(this.text=n,!this.domText)return;if(!o&&!Qe(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"?"&#8203;":Qe(this.text)?ur(this.text):Oo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},Dt=new Set;function gr(){Dt.clear()}var Ro=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new j(e,this.owner,this._nextKey++):new bo(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 j?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 j?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 j?e.domElement:e.domText,i=t instanceof j?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 c=this.items.slice(),u=new Map;for(let f of c)f instanceof j&&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 m=new Set(c),h=new Set,d=0,p=ge&&c.length>0?e.length!==c.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?Po(y):void 0;if(ge&&S&&C===void 0&&d++,C!==void 0){let x=u.get(C);if(x instanceof j&&x.tagName===E){u.delete(C);let M=this.items.indexOf(x);if(M!==f&&M>=0){let O=!!x._portal;this.move(M,f,O?!1:t,!0)}x.parent=this.owner,x.patch(y),h.add(x);continue}}else if(S){let x=this.items[f];if(x instanceof j&&x.key==null&&x.tagName===E&&m.has(x)&&!h.has(x)&&!x._imperative&&!x._beforeRemoveFired){x.parent=this.owner,x.patch(y),h.add(x);continue}}else{let x=this.items[f];if(x instanceof bo&&m.has(x)&&!h.has(x)&&!x._imperative){x.setText(y==null?"":y),h.add(x);continue}}h.add(this.insert(y,f,t,!0,!0))}let b=this.items.slice(e.length);for(let f of b)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),ge&&c.length>0&&d>0&&p){let f=this.owner.nodeId;if(!Dt.has(f)){Dt.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,c=this._createNode(e);if(c._imperative=!i,this.items.splice(a,0,c),c instanceof j){c._hooks.Insert&&c._hooks.Insert(c);let u=this.owner.domElement;if(n&&u)if(c._portal){let m=c._portal(this.owner.getRoot());m&&c.render(m)}else{let m=c._createDOMNode(),h=this._domReferenceAfter(a+1);u.insertBefore(m,h);let d=u.getRootNode(),p=d instanceof ShadowRoot?d:document.head,b=Lo(p);c.styles.render(b),c._hooks.Mount&&c._hooks.Mount(c),c.children.items.forEach(f=>{if(f instanceof j&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(m)})}}else{let u=this.owner.domElement;if(n&&u){let m=c._createDOMNode(),h=this._domReferenceAfter(a+1);u.insertBefore(m,h)}}return!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner),c}remove(e,t=!0,n=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof j){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())},c=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,c(e,a),c.length<2&&!r?a():ge&&!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}},ye=new Set,Lt=!1;function zo(e){ye.add(e),!Lt&&(Lt=!0,zt(Ao))}function Ao(){for(Lt=!1;ye.size>0;){let e=[...ye];ye.clear();for(let t of e)try{t()}catch(n){console.error("[Domphy] Uncaught error in effect:",n)}}}function yr(){let e=0;for(;_o()||ye.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}To(),Ao()}}var Ne=[];function br(){return Ne.length?Ne[Ne.length-1]:null}function Vt(e){let t=br();t&&t._add(e)}var vr=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 ge&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();Ne.push(this);try{return e()}finally{Ne.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Sr(){let e=new vr;return Vt(()=>e.stop()),e}function Vo(e){let t=!1,n=!1,o=()=>{t||r()},i=new Co(()=>{t||zo(o)}),r=()=>{if(!(t||n)){n=!0,i.reset();try{ko(i,e)}finally{n=!1}}},a=()=>{t||(t=!0,i.reset(),ye.delete(o))};return Vt(a),r(),a}function wr(e){let t="computed",n=new He,o,i=!0,r=!1,a=()=>{i&&n.listenerCount(t)>0&&m()},c=new Co(()=>{i||(i=!0,zo(a))}),u=()=>{c.reset(),o=ko(c,e),i=!1,r=!0},m=()=>{let d=o,p=r;u(),!(p&&o===d)&&n.notify(t,o)},h=d=>{if(d)n.addListener(t,d);else{let p=Rt();p&&n.addListener(t,p.handler)}return i&&(r&&n.listenerCount(t)>0?m():u()),o};return Vt(()=>{c.reset(),ye.delete(a),n._dispose()}),{_isState:!0,_notifier:n,get:h}}function xr(e){return Eo(e)}function Cr(e){return ir(e)}function kr(e,t,n){let o,i=!0;return Vo(()=>{let r=typeof e=="function"?e():e.get();(!i||n!=null&&n.immediate)&&t(r,o),o=r,i=!1})}function Er(e){return e?Promise.resolve().then(e):Promise.resolve()}var _r=class{constructor(e){this._notifier=new He,this.initialRecord=go({},e),this._record=go({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let n=Rt();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 at={};Ze(at,{COLOR_ROLES:()=>Wr,ElementTones:()=>je,applySystemTheme:()=>Fr,generateTheme:()=>Xr,getTheme:()=>ee,setTheme:()=>Br,themeApply:()=>Hr,themeCSS:()=>jt,themeColor:()=>l,themeColorToken:()=>Kt,themeDensity:()=>v,themeFluidSpacing:()=>jr,themeName:()=>it,themeSize:()=>w,themeSpacing:()=>s,themeTokens:()=>Uo,themeVars:()=>rt});var Tr=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)},Mr=e=>{let t=n=>n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;return e.map(t)},Or=e=>{let[t,n,o]=Tr(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}`},ot=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 Mr([t,n,o])},Pr=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]},Dr=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,c=i*i*i,u=r*r*r,m=a*a*a;return[4.0767416621*c-3.3077115913*u+.2309699292*m,-1.2684380046*c+2.6097574011*u-.3413193965*m,-.0041960863*c-.7034186147*u+1.707614701*m]};var Nt=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,c=.95047,u=1,m=1.08883,h=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,d=h(i/c),p=h(r/u),b=h(a/m);return[116*p-16,500*(d-p),200*(p-b)]};var No=(e,t)=>{let[n,o,i]=e,[r,a,c]=t,u=(n+r)/2,m=Math.sqrt(o*o+i*i),h=Math.sqrt(a*a+c*c),d=(m+h)/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),b=o*(1+p),f=a*(1+p),y=Math.sqrt(b*b+i*i),S=Math.sqrt(f*f+c*c),C=(y+S)/2,E=Math.atan2(i,b)*180/Math.PI+(Math.atan2(i,b)<0?360:0),x=Math.atan2(c,f)*180/Math.PI+(Math.atan2(c,f)<0?360:0),M=x-E;Math.abs(M)>180&&(M+=x<=E?360:-360);let O=Math.abs(E-x)>180?(E+x+360)/2:(E+x)/2,_=1-.17*Math.cos((O-30)*Math.PI/180)+.24*Math.cos(2*O*Math.PI/180)+.32*Math.cos((3*O+6)*Math.PI/180)-.2*Math.cos((4*O-63)*Math.PI/180),D=r-n,A=S-y,V=2*Math.sqrt(y*S)*Math.sin(M/2*Math.PI/180),B=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),de=1+.045*C,Ee=1+.015*C*_,le=30*Math.exp(-Math.pow((O-275)/25,2)),H=-(2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7))))*Math.sin(2*le*Math.PI/180);return Math.sqrt(Math.pow(D/B,2)+Math.pow(A/de,2)+Math.pow(V/Ee,2)+H*(A/de)*(V/Ee))};var Bo=e=>{if(e.length<1)return m=>0;let t=[...e].sort((m,h)=>m[0]-h[0]),n=[];for(let m=0;m<t.length;m++)(m===0||t[m][0]!==t[m-1][0])&&n.push(t[m]);let o=n.length;if(o===1)return m=>n[0][1];let i=n.map(m=>m[0]),r=n.map(m=>m[1]),a=[],c=[];for(let m=0;m<o-1;m++)a[m]=i[m+1]-i[m],c[m]=(r[m+1]-r[m])/a[m];let u=new Array(o);u[0]=c[0],u[o-1]=c[o-2];for(let m=1;m<o-1;m++){let h=c[m-1],d=c[m];if(h*d<=0)u[m]=0;else{let p=(1+a[m]/(a[m-1]+a[m]))/3;u[m]=h*d/((1-p)*h+p*d)}}return m=>{if(m<=i[0])return r[0];if(m>=i[o-1])return r[o-1];let h=0,d=o-2,p=0;for(;h<=d;){let x=Math.floor((h+d)/2);if(m>=i[x]&&m<=i[x+1]){p=x;break}m<i[x]?d=x-1:h=x+1}let b=a[p],f=(m-i[p])/b,y=f*f,S=y*f,C=u[p]*b,E=u[p+1]*b;return(2*S-3*y+1)*r[p]+(S-2*y+f)*C+(-2*S+3*y)*r[p+1]+(S-y)*E}};var Ho=.605,Bt=.685;function Lr(e){let t=Math.pow(e,Ho);return t/(1+Bt*(1-t))}function $r(e){let t=e*(1+Bt)/(1+e*Bt);return Math.pow(t,1/Ho)}function Ir(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 Rr(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>Pr(p)).sort((p,b)=>p[0]-b[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+=Ir(t[p],t[p-1]),r.push(a);let c=r.map(p=>$r(a>0?p/a:0)),u=e.length===1?0:c[1],m=e.length===1?1:c[c.length-2],h=Bo(c.map((p,b)=>[p,o[b]])),d=Bo(c.map((p,b)=>[p,i[b]]));return{colorAtParam:p=>{let b=Lr(p),f=u+b*(m-u),y=0;for(let _=0;_<c.length-1;_++)if(f<=c[_+1]){y=_;break}let S=c[y],C=c[y+1],E=(f-S)/(C-S||1),x=n[y]+E*(n[y+1]-n[y]),M=h(f),O=d(f);return Dr([x,M,O])},parameters:c.slice(1,-1).map(p=>(p-u)/(m-u))}}function jo(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}=Rr(n.map(ot)),r=[],a=[0,...i,1],c=a.map(m=>Math.round(m*(t-1))),u=0;for(let m=0;m<t;m++){for(;u<c.length-2&&m>c[u+1];)u++;let h=c[u],d=c[u+1],p=a[u],b=a[u+1],f;if(d<=h)f=p;else{let y=(m-h)/(d-h);f=p+y*(b-p)}r.push(Or(o(f)))}return r.reverse()}var zr={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:{}},Fe=zr,qt=e=>JSON.parse(JSON.stringify(e)),Wo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),De={light:qt(Fe),dark:Nr(Fe)},nt=null,Ht=new Map;function Ut(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Ar(e){for(let t in e)if(!Object.keys(Fe).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 qo(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]={}),qo(e[o],t[o])):e[o]=t[o])}function Vr(e,t){let n={},o=Ut(t);for(let r in t){let a=t[r];if(r==="colors")for(let c in t.colors)[...Array(o).keys()].forEach(u=>n[`--${c}-${u}`]=t.colors[c][u]);else if(r==="fontSizes")[...Array(8).keys()].forEach(c=>n[`--fontSize-${c}`]=t.fontSizes[c]);else if(r==="custom"&&a&&typeof a=="object")for(let c in a)n[`--custom-${Wo(c)}`]=a[c]}let i="";for(let r in n)i+=` ${r}: ${n[r]};
3
3
  `;return`[data-theme="${e}"] {
4
- ${i}}`}function ee(e){if(!De[e])throw Error(`Theme "${e}" not found`);return De[e]}function Br(e,t){Vr(t),De[e]||(De[e]=Ut(Fe)),Uo(De[e],t),nt=null,Ht.clear()}function Hr(e){let t=Ut(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 qo(e){let t=Ht.get(e);if(t)return t;let n=ee(e),o=qt(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let c in n.colors){let u={};[...Array(o).keys()].forEach(d=>u[d]=n.colors[c][d]),i[c]=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 c in a)i.custom[c]=a[c]}return Ht.set(e,i),i}function rt(){if(nt)return nt;let e=ee("light"),t=qt(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(c=>a[c]=`var(--${r}-${c})`),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-${Wo(r)})`}return nt=n,n}function jt(){return Object.entries(De).map(([e,t])=>Nr(e,t)).join(`
5
- `)}function jr(e){var t;if(typeof document!="undefined")if(e){e.textContent=jt();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=jt(),document.head.appendChild(e)}function s(e){return`calc(${e/4}em)`}function Fr(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,c=i-a*n/100,u=parseFloat(c.toFixed(4))===0?`${a.toFixed(4)}vw`:`${c.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function Wr(e=document.documentElement,t={}){let{persist:n=!0,storageKey:o="dp-theme"}=t,i=()=>{if(n){let c=localStorage.getItem(o);if(c==="light"||c==="dark")return c}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let r=window.matchMedia("(prefers-color-scheme: dark)"),a=c=>{(!n||!localStorage.getItem(o))&&e.setAttribute("data-theme",c.matches?"dark":"light")};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}function it(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 Ur=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],Ft=["inherit"];[...Array(5).keys()].forEach(e=>{Ft.push(`decrease-${e}`),Ft.push(`increase-${e}`)});function qr(e,t="inherit"){if(!Ft.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 Kr(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=qr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function v(e){let t=Kr(e);return ee(e?it(e):"light").densities[t]}var Yr=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],Gr=[.75,1,1.5,2,2.5];function Xr(e,t){let n=Bt(ot(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=Bo(n,Bt(ot(e[r])));a<i&&(i=a,o=r)}return o}function Zr(e,t={}){var n,o,i,r,a,c;let u=(n=t.steps)!=null?n:18,d={},m={};for(let[h,p]of Object.entries(e)){let b=jo(p,u);d[h]=b,m[h]=Xr(b,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:Yr,densities:(r=t.densities)!=null?r:Gr,darkBias:(a=t.darkBias)!=null?a:1,custom:(c=t.custom)!=null?c:{}}}var Wt=["inherit"];[...Array(8).keys()].forEach(e=>{Wt.push(`decrease-${e}`),Wt.push(`increase-${e}`)});function Ko(e,t="inherit"){if(!Wt.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 Jr(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=Ko(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function w(e,t="inherit"){let n=Ko(Jr(e),t);return rt().fontSizes[n]}var ue=Fe.colors.neutral.length,je=["inherit","base"];[...Array(ue).keys()].forEach(e=>{je.push(`decrease-${e}`),je.push(`increase-${e}`),je.push(`shift-${e}`)});function Fo(e,t){if(e<0||e>ue-1)return e;let n=e+t;return n=Math.max(0,Math.min(ue-1,n)),n}function Qr(e,t){if(e<0||e>ue-1)return e;let n=Math.floor((ue-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(ue-1,o)),o}function We(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!je.includes(t))throw Error(`tone name "${t}" invalid`);if(t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Fo(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Fo(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return Qr(e,n)}else return e}function Yo(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=We(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function Go(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===ue-1?ue-1-n:e}function l(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let c=rt()[o];if(!c)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?c[ee("light").baseTones[o]]:c[We(0,t)]}let i=it(e),r;if(t==="base")r=ee(i).baseTones[o];else{let c=ee(i),u=Go(Yo(e),c.direction,c.darkBias);r=We(u,t)}let a=rt()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Kt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?it(e):"light",r=qo(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[ee("light").baseTones[o]]:r[We(0,t)];let a;if(t==="base")a=ee(i).baseTones[o];else{let c=ee(i),u=Go(Yo(e),c.direction,c.darkBias);a=We(u,t)}return r[a]}var wt={};Je(wt,{abbreviation:()=>ei,accordion:()=>ti,alert:()=>oi,avatar:()=>ni,badge:()=>ri,blockquote:()=>ii,breadcrumb:()=>ai,breadcrumbEllipsis:()=>li,button:()=>si,buttonGhost:()=>ci,buttonSwitch:()=>ui,card:()=>mi,code:()=>hi,combobox:()=>ta,command:()=>oa,commandItem:()=>ra,commandSearch:()=>na,datePicker:()=>aa,descriptionList:()=>ca,details:()=>ua,dialog:()=>ma,divider:()=>ha,drawer:()=>da,emphasis:()=>fa,empty:()=>pa,errorBoundary:()=>ga,fab:()=>ba,figure:()=>va,formGroup:()=>Sa,heading:()=>xa,horizontalRule:()=>Ca,icon:()=>ka,image:()=>Ea,inputCheckbox:()=>_a,inputColor:()=>Ta,inputDateTime:()=>Ma,inputFile:()=>Oa,inputNumber:()=>Pa,inputOTP:()=>Ra,inputPassword:()=>$a,inputRadio:()=>Ia,inputRange:()=>za,inputSearch:()=>Aa,inputSwitch:()=>Va,inputText:()=>Na,keyboard:()=>Ba,label:()=>Ha,link:()=>ja,linkButton:()=>Fa,list:()=>Wa,listItem:()=>Ua,listItemButton:()=>qa,mark:()=>Ka,menu:()=>Ya,motion:()=>Ga,orderedList:()=>Xa,pagination:()=>Ja,paragraph:()=>Qa,popover:()=>el,popoverArrow:()=>io,preformated:()=>tl,progress:()=>ol,rating:()=>il,ringProgress:()=>al,scrollArea:()=>ll,segmented:()=>sl,select:()=>cl,selectBox:()=>ul,selectItem:()=>ml,selectList:()=>hl,skeleton:()=>dl,small:()=>fl,spinner:()=>pl,splitter:()=>gl,splitterHandle:()=>bl,splitterPanel:()=>yl,steps:()=>vl,strong:()=>Sl,subscript:()=>wl,superscript:()=>xl,table:()=>Cl,tabs:()=>kl,tag:()=>Ke,textarea:()=>El,timeline:()=>_l,timelineItem:()=>Tl,toast:()=>Ml,toggleGroup:()=>Ol,toolbar:()=>Pl,toolbarSpacer:()=>Dl,tooltip:()=>Ll,transitionGroup:()=>$l,unorderedList:()=>Rl});function ei(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=>w(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:s(.72),cursor:"help","&:hover":{color:r=>l(r,"shift-11",n.get(r)),textDecorationColor:r=>l(r,"shift-9",n.get(r))}}}}function ti(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 c=a.domElement;if(!c)return;let u=d=>{let m=d.target.closest("summary");if(!m)return;let h=m.closest("details");!h||h.parentElement!==c||h.open||Array.from(c.querySelectorAll(":scope > details")).forEach(p=>{p!==h&&(p.open=!1)})};c.addEventListener("click",u),a.addHook("Remove",()=>c.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>s(v(a)*1),outline:a=>`1px solid ${l(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`}}}}function oi(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:s(3),paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),boxShadow:o=>`inset ${s(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=>w(o,"inherit")}}}function ni(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:s(9),height:s(9),fontSize:o=>w(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 ri(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:s(1),minWidth:s(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>w(r,"decrease-1"),borderRadius:s(999),backgroundColor:r=>l(r,"shift-9",o.get(r)),color:r=>l(r,"shift-0",o.get(r))}}}}function ii(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=>w(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${s(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),margin:0}}}function ai(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=>w(i,"inherit"),gap:s(1),color:i=>l(i,"shift-9",n.get(i)),backgroundColor:i=>l(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",n.get(i)),paddingInlineStart:s(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function li(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=>w(o,"inherit"),paddingInline:s(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"shift-8",t.get(o)),borderRadius:s(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:s(.5)}}}}function si(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>w(o,"inherit"),paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,color:o=>l(o,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function ci(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>w(o,"inherit"),paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*1),borderRadius:o=>s(v(o)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:o=>l(o,"shift-6",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function ui(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:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>n.get(c),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>w(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${l(c,"shift-3",o.get(c))}`,minWidth:s(12),minHeight:s(6),borderRadius:s(999),paddingLeft:s(7),paddingRight:s(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>l(c,"inherit",o.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:s(5),height:s(5),borderRadius:s(999),color:c=>l(c,"shift-9"),backgroundColor:c=>l(c,"decrease-2",o.get(c))},"&[aria-checked=true]":{backgroundColor:c=>l(c,"increase-3",i.get(c)),outline:"none",color:c=>l(c,"decrease-2"),paddingLeft:s(2),paddingRight:s(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${s(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function mi(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=>s(v(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,"shift-4",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=>s(v(o)*2),paddingInline:o=>s(v(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>s(v(o)*4),color:o=>l(o,"shift-9",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>s(v(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>s(v(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:s(2),paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),borderTop:o=>`1px solid ${l(o,"shift-3",t.get(o))}`}}}}function hi(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),paddingInline:s(1.5),borderRadius:s(1)}}}var di=Object.defineProperty,fi=Object.defineProperties,pi=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Xo=(e,t,n)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t)=>{for(var n in t||(t={}))ln.call(t,n)&&Xo(e,n,t[n]);if(st)for(var n of st(t))sn.call(t,n)&&Xo(e,n,t[n]);return e},Se=(e,t)=>fi(e,pi(t)),cn=(e,t)=>{var n={};for(var o in e)ln.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&st)for(var o of st(e))t.indexOf(o)<0&&sn.call(e,o)&&(n[o]=e[o]);return n},Ce=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{c(n.next(u))}catch(d){i(d)}},a=u=>{try{c(n.throw(u))}catch(d){i(d)}},c=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);c((n=n.apply(e,t)).next())}),gi=["top","right","bottom","left"],Zo=["start","end"],Is=gi.reduce((e,t)=>e.concat(t,`${t}-${Zo[0]}`,`${t}-${Zo[1]}`),[]),ct=Math.min,ve=Math.max,ut=Math.round,lt=Math.floor,te=e=>({x:e,y:e}),yi={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(e,t,n){return ve(e,ct(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function we(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function un(e){return e==="x"?"y":"x"}function mn(e){return e==="y"?"height":"width"}function me(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function hn(e){return un(me(e))}function bi(e,t,n=!1){let o=ft(e),i=hn(e),r=mn(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=mt(a)),[a,mt(a)]}function vi(e){let t=mt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Qo=["left","right"],en=["right","left"],Si=["top","bottom"],wi=["bottom","top"];function xi(e,t,n){switch(e){case"top":case"bottom":return n?t?en:Qo:t?Qo:en;case"left":case"right":return t?Si:wi;default:return[]}}function Ci(e,t,n,o){let i=ft(e),r=xi(we(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(Xt)))),r}function mt(e){let t=we(e);return yi[t]+e.slice(t.length)}function ki(e){return G({top:0,right:0,bottom:0,left:0},e)}function Ei(e){return typeof e!="number"?ki(e):{top:e,right:e,bottom:e,left:e}}function ht(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 tn({reference:e,floating:t},n,o){let i=me(n),r=hn(n),a=mn(r),c=we(n),u=i==="y",d=e.x+e.width/2-t.width/2,m=e.y+e.height/2-t.height/2,h=e[a]/2-t[a]/2,p;switch(c){case"top":p={x:d,y:e.y-t.height};break;case"bottom":p={x:d,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(ft(n)){case"start":p[r]-=h*(o&&u?-1:1);break;case"end":p[r]+=h*(o&&u?-1:1);break;default:}return p}function _i(e){return Ce(this,arguments,function*(t,n={}){var o,i,r,a,c,u;let{x:d,y:m,platform:h,rects:p,elements:b,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:S="viewport",elementContext:C="floating",altBoundary:E=!1,padding:x=0}=dt(n,t),M=Ei(x),_=b[E?C==="floating"?"reference":"floating":C],O=ht(yield h.getClippingRect({element:(i=yield(o=h.isElement)==null?void 0:o.call(h,_))==null||i?_:_.contextElement||(yield(r=h.getDocumentElement)==null?void 0:r.call(h,b.floating)),boundary:y,rootBoundary:S,strategy:f})),D=C==="floating"?{x:d,y:m,width:p.floating.width,height:p.floating.height}:p.reference,A=yield(a=h.getOffsetParent)==null?void 0:a.call(h,b.floating),B=(yield(c=h.isElement)==null?void 0:c.call(h,A))?(yield(u=h.getScale)==null?void 0:u.call(h,A))||{x:1,y:1}:{x:1,y:1},V=ht(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:D,offsetParent:A,strategy:f}):D);return{top:(O.top-V.top+M.top)/B.y,bottom:(V.bottom-O.bottom+M.bottom)/B.y,left:(O.left-V.left+M.left)/B.x,right:(V.right-O.right+M.right)/B.x}})}var Ti=50,Mi=(e,t,n)=>Ce(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:c}=n,u=c.detectOverflow?c:Se(G({},c),{detectOverflow:_i}),d=yield(o=c.isRTL)==null?void 0:o.call(c,t),m=yield c.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:p}=tn(m,i,d),b=i,f=0,y={};for(let S=0;S<a.length;S++){let C=a[S];if(!C)continue;let{name:E,fn:x}=C,{x:M,y:_,data:O,reset:D}=yield x({x:h,y:p,initialPlacement:i,placement:b,strategy:r,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});h=M!=null?M:h,p=_!=null?_:p,y[E]=G(G({},y[E]),O),D&&f<Ti&&(f++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(m=D.rects===!0?yield c.getElementRects({reference:e,floating:t,strategy:r}):D.rects),{x:h,y:p}=tn(m,b,d)),S=-1)}return{x:h,y:p,placement:b,strategy:r,middlewareData:y}});var Oi=(e={})=>({name:"flip",options:e,fn(t){return Ce(this,null,function*(){var n,o,i,r,a,c;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:p,elements:b}=t,f=dt(e,t),{mainAxis:y=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:M=!0}=f,_=cn(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=d.arrow)!=null&&n.alignmentOffset)return{};let O=we(u),D=me(h),A=we(h)===h,B=yield(o=p.isRTL)==null?void 0:o.call(p,b.floating),V=C||(A||!M?[mt(h)]:vi(h)),de=x!=="none";!C&&de&&V.push(...Ci(h,M,x,B));let Ee=[h,...V],le=yield p.detectOverflow(t,_),H=[],re=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&H.push(le[O]),S){let ie=bi(u,m,B);H.push(le[ie[0]],le[ie[1]])}if(re=[...re,{placement:u,overflows:H}],!H.every(ie=>ie<=0)){let ie=(((r=d.flip)==null?void 0:r.index)||0)+1,Ae=Ee[ie];if(Ae&&(!(S==="alignment"&&D!==me(Ae))||re.every(F=>me(F.placement)===D?F.overflows[0]>0:!0)))return{data:{index:ie,overflows:re},reset:{placement:Ae}};let fe=(a=re.filter(F=>F.overflows[0]<=0).sort((F,K)=>F.overflows[1]-K.overflows[1])[0])==null?void 0:a.placement;if(!fe)switch(E){case"bestFit":{let F=(c=re.filter(K=>{if(de){let Y=me(K.placement);return Y===D||Y==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(Y=>Y>0).reduce((Y,Ve)=>Y+Ve,0)]).sort((K,Y)=>K[1]-Y[1])[0])==null?void 0:c[0];F&&(fe=F);break}case"initialPlacement":fe=h;break;default:}if(u!==fe)return{reset:{placement:fe}}}return{}})}});var Pi=new Set(["left","top"]);function Di(e,t){return Ce(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),c=we(o),u=ft(o),d=me(o)==="y",m=Pi.has(c)?-1:1,h=a&&d?-1:1,p=dt(t,e),{mainAxis:b,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),d?{x:f*h,y:b*m}:{x:b*m,y:f*h}})}var Li=(e=0)=>({name:"offset",options:e,fn(t){return Ce(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:c}=t,u=yield Di(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:Se(G({},u),{placement:a})}})}}),$i=(e={})=>({name:"shift",options:e,fn(t){return Ce(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=dt(e,t),{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:({x:E,y:x})=>({x:E,y:x})}}=a,m=cn(a,["mainAxis","crossAxis","limiter"]),h={x:n,y:o},p=yield r.detectOverflow(t,m),b=me(we(i)),f=un(b),y=h[f],S=h[b];if(c){let E=f==="y"?"top":"left",x=f==="y"?"bottom":"right",M=y+p[E],_=y-p[x];y=Jo(M,y,_)}if(u){let E=b==="y"?"top":"left",x=b==="y"?"bottom":"right",M=S+p[E],_=S-p[x];S=Jo(M,S,_)}let C=d.fn(Se(G({},t),{[f]:y,[b]:S}));return Se(G({},C),{data:{x:C.x-n,y:C.y-o,enabled:{[f]:c,[b]:u}}})})}});function pt(){return typeof window!="undefined"}function Re(e){return dn(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(dn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dn(e){return pt()?e instanceof Node||e instanceof U(e).Node:!1}function X(e){return pt()?e instanceof Element||e instanceof U(e).Element:!1}function ae(e){return pt()?e instanceof HTMLElement||e instanceof U(e).HTMLElement:!1}function on(e){return!pt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof U(e).ShadowRoot}function qe(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function Ri(e){return/^(table|td|th)$/.test(Re(e))}function gt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Ii=/transform|translate|scale|rotate|perspective|filter/,zi=/paint|layout|strict|content/,be=e=>!!e&&e!=="none",Yt;function Jt(e){let t=X(e)?Z(e):e;return be(t.transform)||be(t.translate)||be(t.scale)||be(t.rotate)||be(t.perspective)||!Qt()&&(be(t.backdropFilter)||be(t.filter))||Ii.test(t.willChange||"")||zi.test(t.contain||"")}function Ai(e){let t=he(e);for(;ae(t)&&!$e(t);){if(Jt(t))return t;if(gt(t))return null;t=he(t)}return null}function Qt(){return Yt==null&&(Yt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yt}function $e(e){return/^(html|body|#document)$/.test(Re(e))}function Z(e){return U(e).getComputedStyle(e)}function yt(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if(Re(e)==="html")return e;let t=e.assignedSlot||e.parentNode||on(e)&&e.host||oe(e);return on(t)?t.host:t}function fn(e){let t=he(e);return $e(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&qe(t)?t:fn(t)}function Ue(e,t=[],n=!0){var o;let i=fn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=U(i);if(r){let c=Zt(a);return t.concat(a,a.visualViewport||[],qe(i)?i:[],c&&n?Ue(c):[])}else return t.concat(i,Ue(i,[],n))}function Zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pn(e){let t=Z(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=ae(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,c=ut(n)!==r||ut(o)!==a;return c&&(n=r,o=a),{width:n,height:o,$:c}}function eo(e){return X(e)?e:e.contextElement}function Le(e){let t=eo(e);if(!ae(t))return te(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=pn(t),a=(r?ut(n.width):n.width)/o,c=(r?ut(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}var Vi=te(0);function gn(e){let t=U(e);return!Qt()||!t.visualViewport?Vi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ni(e,t=!1,n){return!n||t&&n!==U(e)?!1:t}function xe(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=eo(e),a=te(1);t&&(o?X(o)&&(a=Le(o)):a=Le(e));let c=Ni(r,n,o)?gn(r):te(0),u=(i.left+c.x)/a.x,d=(i.top+c.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(r){let p=U(r),b=o&&X(o)?U(o):o,f=p,y=Zt(f);for(;y&&o&&b!==f;){let S=Le(y),C=y.getBoundingClientRect(),E=Z(y),x=C.left+(y.clientLeft+parseFloat(E.paddingLeft))*S.x,M=C.top+(y.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,d*=S.y,m*=S.x,h*=S.y,u+=x,d+=M,f=U(y),y=Zt(f)}}return ht({width:m,height:h,x:u,y:d})}function bt(e,t){let n=yt(e).scrollLeft;return t?t.left+n:xe(oe(e)).left+n}function yn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-bt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Bi({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=oe(n),a=e?gt(e.floating):!1;if(n===r||a&&i)return t;let c={scrollLeft:0,scrollTop:0},u=te(1),d=te(0),m=ae(n);if((m||!m&&!i)&&((Re(n)!=="body"||qe(r))&&(c=yt(n)),m)){let p=xe(n);u=Le(n),d.x=p.x+n.clientLeft,d.y=p.y+n.clientTop}let h=r&&!m&&!i?yn(r,c):te(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-c.scrollTop*u.y+d.y+h.y}}function Hi(e){return Array.from(e.getClientRects())}function ji(e){let t=oe(e),n=yt(e),o=e.ownerDocument.body,i=ve(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=ve(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+bt(e),c=-n.scrollTop;return Z(o).direction==="rtl"&&(a+=ve(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:c}}var nn=25;function Fi(e,t){let n=U(e),o=oe(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,c=0,u=0;if(i){r=i.width,a=i.height;let m=Qt();(!m||m&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}let d=bt(o);if(d<=0){let m=o.ownerDocument,h=m.body,p=getComputedStyle(h),b=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-h.clientWidth-b);f<=nn&&(r-=f)}else d<=nn&&(r+=d);return{width:r,height:a,x:c,y:u}}function Wi(e,t){let n=xe(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=ae(e)?Le(e):te(1),a=e.clientWidth*r.x,c=e.clientHeight*r.y,u=i*r.x,d=o*r.y;return{width:a,height:c,x:u,y:d}}function rn(e,t,n){let o;if(t==="viewport")o=Fi(e,n);else if(t==="document")o=ji(oe(e));else if(X(t))o=Wi(t,n);else{let i=gn(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ht(o)}function bn(e,t){let n=he(e);return n===t||!X(n)||$e(n)?!1:Z(n).position==="fixed"||bn(n,t)}function Ui(e,t){let n=t.get(e);if(n)return n;let o=Ue(e,[],!1).filter(c=>X(c)&&Re(c)!=="body"),i=null,r=Z(e).position==="fixed",a=r?he(e):e;for(;X(a)&&!$e(a);){let c=Z(a),u=Jt(a);!u&&c.position==="fixed"&&(i=null),(r?!u&&!i:!u&&c.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||qe(a)&&!u&&bn(e,a))?o=o.filter(d=>d!==a):i=c,a=he(a)}return t.set(e,o),o}function qi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?gt(e)?[]:Ui(e,this._c):[].concat(t),n],r=rn(e,i[0],o),a=r.top,c=r.right,u=r.bottom,d=r.left;for(let m=1;m<i.length;m++){let h=rn(e,i[m],o);a=ve(h.top,a),c=ct(h.right,c),u=ct(h.bottom,u),d=ve(h.left,d)}return{width:c-d,height:u-a,x:d,y:a}}function Ki(e){let{width:t,height:n}=pn(e);return{width:t,height:n}}function Yi(e,t,n){let o=ae(t),i=oe(t),r=n==="fixed",a=xe(e,!0,r,t),c={scrollLeft:0,scrollTop:0},u=te(0);function d(){u.x=bt(i)}if(o||!o&&!r)if((Re(t)!=="body"||qe(i))&&(c=yt(t)),o){let b=xe(t,!0,r,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else i&&d();r&&!o&&i&&d();let m=i&&!o&&!r?yn(i,c):te(0),h=a.left+c.scrollLeft-u.x-m.x,p=a.top+c.scrollTop-u.y-m.y;return{x:h,y:p,width:a.width,height:a.height}}function Gt(e){return Z(e).position==="static"}function an(e,t){if(!ae(e)||Z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function vn(e,t){let n=U(e);if(gt(e))return n;if(!ae(e)){let i=he(e);for(;i&&!$e(i);){if(X(i)&&!Gt(i))return i;i=he(i)}return n}let o=an(e,t);for(;o&&Ri(o)&&Gt(o);)o=an(o,t);return o&&$e(o)&&Gt(o)&&!Jt(o)?n:o||Ai(e)||n}var Gi=function(e){return Ce(this,null,function*(){let t=this.getOffsetParent||vn,n=this.getDimensions,o=yield n(e.floating);return{reference:Yi(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function Xi(e){return Z(e).direction==="rtl"}var Zi={convertOffsetParentRelativeRectToViewportRelativeRect:Bi,getDocumentElement:oe,getClippingRect:qi,getOffsetParent:vn,getElementRects:Gi,getClientRects:Hi,getDimensions:Ki,getScale:Le,isElement:X,isRTL:Xi};function Sn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ji(e,t){let n=null,o,i=oe(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(c=!1,u=1){r();let d=e.getBoundingClientRect(),{left:m,top:h,width:p,height:b}=d;if(c||t(),!p||!b)return;let f=lt(h),y=lt(i.clientWidth-(m+p)),S=lt(i.clientHeight-(h+b)),C=lt(m),E={rootMargin:`${-f}px ${-y}px ${-S}px ${-C}px`,threshold:ve(0,ct(1,u))||1},x=!0;function M(_){let O=_[0].intersectionRatio;if(O!==u){if(!x)return a();O?a(!1,O):o=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Sn(d,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(M,Se(G({},E),{root:i.ownerDocument}))}catch(_){n=new IntersectionObserver(M,E)}n.observe(e)}return a(!0),r}function wn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=eo(e),m=i||r?[...d?Ue(d):[],...t?Ue(t):[]]:[];m.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),r&&C.addEventListener("resize",n)});let h=d&&c?Ji(d,n):null,p=-1,b=null;a&&(b=new ResizeObserver(([C])=>{C&&C.target===d&&b&&t&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{b==null||b.observe(t)})),n()}),d&&!u&&b.observe(d),t&&b.observe(t));let f,y=u?xe(e):null;u&&S();function S(){let C=xe(e);y&&!Sn(y,C)&&n(),y=C,f=requestAnimationFrame(S)}return n(),()=>{m.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),h==null||h(),b==null||b.disconnect(),b=null,u&&cancelAnimationFrame(f)}}var xn=Li;var Cn=$i,kn=Oi;var En=(e,t,n)=>{let o=new Map,i=G({platform:Zi},n),r=Se(G({},i.platform),{_c:o});return Mi(e,t,Se(G({},i),{platform:r}))};var vt=new WeakMap;function _n(e,t,n){let o=vt.get(e);o||(o=new Map,vt.set(e,o));let i=o.get(t);i&&i!==n&&i(),o.set(t,n)}function Qi(e){let t=vt.get(e);t&&(vt.delete(e),t.forEach(n=>n()))}function ne(e){let{kind:t,open:n=!1,placement:o}=e,i=null,r=null,a=null,c=null,u=null,d=null,m=!1,h=g(n),p=()=>{i&&clearTimeout(i),i=null,r&&(r(),r=null),u&&(u.remove(),u=null),c=null,m=!1,h.set(!1)},b=_=>{_&&(d=_.getRoot(),a=_.domElement,a&&_n(a,t,p))},f=()=>{m||!d||(m=!0,u=d.children.insert(e.content))},y=()=>{f(),a&&c&&(r&&r(),r=wn(a,c,()=>{En(a,c,{placement:o.get(),middleware:[xn(12),kn(),Cn()],strategy:"fixed"}).then(({x:_,y:O,placement:D})=>{c&&(Object.assign(c.style,{left:`${_}px`,top:`${O}px`}),o.set(D))})}),h.set(!0))},S=()=>{r&&r(),r=null,h.set(!1)},C=_=>{b(_),i&&clearTimeout(i),i=setTimeout(y,100)},E=_=>{b(_),i&&clearTimeout(i),i=setTimeout(S,100)},x={style:{position:"fixed",pointerEvents:"auto",visibility:_=>h.get(_)?"visible":"hidden"},onKeyDown:_=>{_.key==="Escape"&&E()},_onMount:_=>{var O;if(c=_.domElement,a&&c&&!c.hasAttribute("data-theme")){let D=(O=a.closest("[data-theme]"))==null?void 0:O.getAttribute("data-theme");D&&c.setAttribute("data-theme",D)}},_portal:_=>{let O=_.domElement.querySelector("#domphy-floating");if(!O){let D={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};O=_.children.insert(D).domElement}return O}};return R(e.content,x),{show:C,hide:E,anchorPartial:{onKeyDown:_=>_.key==="Escape"&&E(),_onMount:_=>{d=_.getRoot(),a=_.domElement,a&&_n(a,t,p);let O=D=>{if(!h.get()||!a||!c)return;let A=D.target;!a.contains(A)&&!c.contains(A)&&E()};_.getRoot().domElement.addEventListener("click",O),_.addHook("BeforeRemove",()=>{a&&Qi(a),_.getRoot().domElement.removeEventListener("click",O)})}}}}var ea='<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 Ke(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:ea,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:s(1),width:s(4),height:s(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:s(6),paddingBlock:"0px",borderRadius:s(1),paddingInlineStart:s(2),paddingInlineEnd:t?s(1):s(2),gap:s(2),fontSize:i=>w(i,"inherit"),backgroundColor:i=>l(i,"inherit",n.get(i)),color:i=>l(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"shift-4",n.get(i))}`}}}function ta(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),c=g(i),{show:u,hide:d,anchorPartial:m}=ne({kind:"combobox",open:c,placement:g(n),content:e.content}),h={onClick:(S,C)=>!r&&d(C)};R(e.content,h);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:s(6),marginInlineStart:s(2),fontSize:S=>w(S,"inherit"),color:S=>l(S,"shift-9",o),backgroundColor:S=>l(S,"inherit",o)},b;if(e.input){let S={onFocus:(C,E)=>u(E),style:p,_key:"combobox-input"};R(e.input,S),b=e.input}else b={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],M=t.filter(_=>E.includes(_.value)).map(_=>({span:_.label,$:[Ke({color:o,removable:!0})],_key:_.value,_onRemove:O=>{let D=a.get(),B=(Array.isArray(D)?D:[D]).filter(V=>V!==_.value);r?a.set(B):a.set(B[0])}}));return M.push(b),M},style:{display:"flex",flexWrap:"wrap",gap:s(1)}},y={_onInsert:S=>{S.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:S=>S.children.insert(f),style:{minWidth:s(32),outlineOffset:"-1px",outline:S=>`1px solid ${l(S,"shift-4","neutral")}`,paddingBlock:S=>s(v(S)*1),paddingInline:S=>s(v(S)*1),borderRadius:S=>s(v(S)*1),fontSize:S=>w(S,"inherit"),color:S=>l(S,"shift-9",o),backgroundColor:S=>l(S,"inherit",o)}};return R(m,y),m}function oa(){return{_onSchedule:(e,t)=>{R(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function na(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=>w(o,"inherit"),paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"shift-3",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 ra(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var d,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=(d=r.textContent)==null?void 0:d.toLowerCase())!=null?m:"",c=h=>{r.hidden=h.length>0&&!a.includes(h.toLowerCase())};c(i.query.get());let u=i.query.addListener(c);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>w(o,"inherit"),height:o=>s(6+v(o)*2),paddingInline:o=>s(v(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"shift-2",t)},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",n)}`,outlineOffset:`-${s(.5)}`}}}}var N=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),ke=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),to=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Ye=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),oo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,no=(e,t)=>ke(e,-((e.getDay()-t+7)%7));function ia(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 aa(e={}){var ao,lo,so,co;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:u}=e,d=(ao=e.weekStartsOn)!=null?ao:ia(a),m=g((lo=e.accentColor)!=null?lo:"primary","accentColor"),h=g((so=e.placement)!=null?so:"bottom-start"),p=g((co=e.value)!=null?co:t==="range"?[null,null]:null),b=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(N(f),"focused"),E=g(null,"hovered"),x=g(f.getHours(),"hour"),M=g(f.getMinutes(),"minute"),_=null,O=new Intl.DateTimeFormat(a,J({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),A=new Intl.DateTimeFormat(a,{weekday:"short"}),B=new Intl.DateTimeFormat(a,{dateStyle:"full"}),V=k=>k?O.format(k):"",de=k=>{if(c)return c(k);if(t==="range"){let[T,P]=k!=null?k:[null,null];return T?`${V(T)} \u2013 ${V(P)}`:""}return V(k)},Ee=Array.from({length:7},(k,T)=>A.format(new Date(2023,0,1+(T+d)%7))),le=k=>!!o&&N(k)<N(o)||!!i&&N(k)>N(i)||!!r&&r(k),H=k=>{if(!n)return N(k);let T=N(k);return T.setHours(x.get(),M.get(),0,0),T},re=k=>{var L;if(le(k))return;if(t==="single"){p.set(H(k)),n||Ct();return}let[T,P]=(L=p.get())!=null?L:[null,null];!T||T&&P?p.set([H(k),null]):N(k)<N(T)?(p.set([H(k),H(T)]),n||Ct()):(p.set([T,H(k)]),n||Ct())},ie=()=>{var k;if(n)if(t==="single"){let T=p.get();T&&p.set(H(T))}else{let[T,P]=(k=p.get())!=null?k:[null,null];p.set([T&&H(T),P&&H(P)])}},Ae=(k,T)=>{var _e;if(t!=="range")return!1;let[P,L]=(_e=p.get(T))!=null?_e:[null,null],I=L!=null?L:E.get(T);if(!P||!I)return!1;let $=N(P)<=N(I)?P:I,q=N(P)<=N(I)?I:P,W=N(k);return W>=N($)&&W<=N(q)},fe=(k,T)=>{let P=p.get(T);if(t==="range"){let[L,I]=P!=null?P:[null,null];return Ye(k,L)||Ye(k,I)}return Ye(k,P)},F=k=>{y.set(k.getFullYear()),S.set(k.getMonth())},K=k=>{let T=to(new Date(y.get(),S.get(),1),k);F(T)},Y=k=>y.set(y.get()+k),Ve=()=>{setTimeout(()=>{var k;(k=_==null?void 0:_.querySelector(`[data-date="${oo(C.get())}"]`))==null||k.focus()},0)},In=Bn(),{show:zn,hide:An,anchorPartial:xt}=ne({kind:"datePicker",open:!1,placement:h,content:In});function Ct(){An()}xt.onClick=()=>{};let Vn={type:"text",readonly:!0,value:k=>de(p.get(k)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(k,T)=>{kt(T)},onFocus:(k,T)=>{kt(T)},onKeyDown:(k,T)=>{let P=k.key;(P==="ArrowDown"||P==="Enter")&&(k.preventDefault(),kt(T))},_onMount:k=>b&&k.addHook("Remove",()=>{b()})};function kt(k){var P;let T=(P=Nn())!=null?P:new Date;C.set(N(T)),F(T),zn(k),Ve()}function Nn(){var T;let k=p.get();return t==="range"?(T=k==null?void 0:k[0])!=null?T:null:k!=null?k:null}return R(xt,Vn),xt;function Bn(){let k=($,q,W)=>({button:$,type:"button",ariaLabel:q,onClick:W,style:la()}),T={div:[k("\xAB","Previous year",()=>Y(-1)),k("\u2039","Previous month",()=>K(-1)),{div:$=>D.format(new Date(y.get($),S.get($),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:$=>w($)}},k("\u203A","Next month",()=>K(1)),k("\xBB","Next year",()=>Y(1))],style:{display:"flex",alignItems:"center",gap:s(1),marginBottom:s(2)}},P={div:Ee.map(($,q)=>({div:$,style:{textAlign:"center",fontSize:W=>w(W,"decrease-1"),fontWeight:"600",color:W=>l(W,"shift-7"),paddingBlock:s(1)},_key:q})),role:"row",style:Tn()},L={div:$=>Hn($),role:"grid",ariaLabel:"Calendar",onKeyDown:Un,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:s(.5)}},I=[T,P,L];return n&&I.push(Fn()),I.push(Wn()),{div:I,role:"dialog",ariaModal:"false",_onMount:$=>{_=$.domElement},style:{minWidth:s(70),padding:s(3),borderRadius:s(2),backgroundColor:$=>l($,"base"),color:$=>l($,"shift-10"),border:$=>`1px solid ${l($,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Hn(k){let T=new Date(y.get(k),S.get(k),1),P=S.get(k),L=no(T,d),I=[];for(let $=0;$<6;$++){let q=[];for(let W=0;W<7;W++){let _e=ke(L,$*7+W);q.push(jn(_e,P,k))}I.push({div:q,role:"row",style:Tn(),_key:$})}return I}function jn(k,T,P){let L=le(k),I=fe(k,P),$=Ae(k,P),q=k.getMonth()!==T,W=Ye(k,C.get(P)),_e=Ye(k,new Date);return{button:String(k.getDate()),type:"button",role:"gridcell",tabIndex:W?0:-1,ariaSelected:I,ariaDisabled:L,disabled:L,ariaLabel:B.format(k),dataDate:oo(k),onClick:()=>re(k),onMouseEnter:()=>t==="range"&&E.set(k),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:s(1),fontSize:z=>w(z),fontFamily:"inherit",opacity:L?.35:q?.5:1,backgroundColor:z=>I?l(z,"shift-7",m.get(z)):$?l(z,"shift-2",m.get(z)):"transparent",color:z=>I?l(z,"shift-0",m.get(z)):l(z,"shift-9"),outline:_e?z=>`1px solid ${l(z,"shift-6",m.get(z))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:z=>I?l(z,"shift-7",m.get(z)):l(z,"shift-3",m.get(z))},"&:focus-visible":{outline:z=>`2px solid ${l(z,"shift-6",m.get(z))}`}},_key:oo(k)}}function Fn(){let k=(T,P,L)=>({select:Array.from({length:T},(I,$)=>({option:String($).padStart(2,"0"),value:String($),selected:q=>P.get(q)===$,_key:$})),ariaLabel:L,onChange:I=>{P.set(Number(I.target.value)),ie()},style:sa()});return{div:[k(24,x,"Hour"),{span:":",style:{fontWeight:"600"}},k(60,M,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:s(1),marginTop:s(3)}}}function Wn(){let k=(T,P)=>({button:T,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>w(L,"decrease-1"),color:L=>l(L,"shift-8",m.get(L)),padding:s(1)}});return{div:[k("Today",()=>{let T=new Date;C.set(N(T)),F(T),Ve()}),k("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:s(2),paddingTop:s(2),borderTop:T=>`1px solid ${l(T,"shift-3")}`}}}function Un(k){let T=k,P=C.get(),L=null;switch(T.key){case"ArrowLeft":L=ke(P,-1);break;case"ArrowRight":L=ke(P,1);break;case"ArrowUp":L=ke(P,-7);break;case"ArrowDown":L=ke(P,7);break;case"Home":L=no(P,d);break;case"End":L=ke(no(P,d),6);break;case"PageUp":L=to(P,T.shiftKey?-12:-1);break;case"PageDown":L=to(P,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),re(P);return;default:return}T.preventDefault(),C.set(L),F(L),Ve()}}function Tn(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:s(.5)}}function la(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>w(e),color:e=>l(e,"shift-8"),width:s(7),height:s(7),borderRadius:s(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function sa(){return{fontFamily:"inherit",fontSize:e=>w(e),padding:s(1),borderRadius:s(1),border:e=>`1px solid ${l(e,"shift-4")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"shift-9")}}function ca(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(${s(24)}, max-content) 1fr`,columnGap:s(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>w(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}}function ua(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=>w(a,"inherit"),color:a=>l(a,"shift-9",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=>w(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:s(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>s(v(a)*4),height:s(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:s(2),height:s(2),flexShrink:0,marginTop:`-${s(.5)}`,borderInlineEnd:a=>`${s(.5)} solid ${l(a,"shift-9",n.get(a))}`,borderBottom:a=>`${s(.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=>s(v(a)*2),outlineOffset:`-${s(.5)}`,outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>s(v(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:s(250),opacity:1,paddingTop:a=>s(v(a)*1),paddingBottom:a=>s(v(a)*3)}}}}var Ge=0;function St(){Ge++,Ge===1&&(document.body.style.overflow="hidden")}function Ie(){Ge=Math.max(0,Ge-1),Ge===0&&(document.body.style.overflow="")}var Mn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ma(e={}){let{color:t="neutral",open:n=!1}=e,o=g(n),i=null,r=!1,a=!1,c=u=>{r=!1,u.close(),a&&(Ie(),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,d)=>{if(u.target!==d.domElement)return;let m=d.domElement.getBoundingClientRect();u.clientX>=m.left&&u.clientX<=m.right&&u.clientY>=m.top&&u.clientY<=m.bottom||o.set(!1)},onTransitionEnd:(u,d)=>{r&&u.target===d.domElement&&u.propertyName==="opacity"&&c(d.domElement)},_onMount:u=>{let d=u.domElement;d.setAttribute("aria-modal","true");let m=null,h=y=>{if(y.key!=="Tab")return;let S=Array.from(d.querySelectorAll(Mn)).filter(x=>!x.closest("[aria-hidden='true']")&&x.offsetParent!==null);if(!S.length){y.preventDefault();return}let C=S[0],E=S[S.length-1];y.shiftKey?(document.activeElement===C||document.activeElement===d)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),C.focus())},p=y=>{y.preventDefault(),o.set(!1)};d.addEventListener("cancel",p);let b=y=>{y?(i=document.activeElement,d.showModal(),a||(St(),a=!0),d.addEventListener("keydown",h),requestAnimationFrame(()=>{d.style.opacity="1";let S=d.querySelector(Mn);S==null||S.focus()})):(r=!0,d.style.opacity="0",d.removeEventListener("keydown",h),m=setTimeout(()=>{m=null,r&&c(d)},350))};b(o.get());let f=o.addListener(b);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),d.removeEventListener("cancel",p),a&&(Ie(),a=!1),d.removeEventListener("keydown",h),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:u=>w(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",padding:u=>s(v(u)*3),boxShadow:u=>`0 ${s(9)} ${s(16)} ${l(u,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function ha(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:s(2),fontSize:o=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var ro={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},On={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Xe=e=>e==="left"||e==="right";function Pn(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function da(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=g(n),a=o==="start"||o==="end",c=Pn(o,!1),u=Xe(c)?s(80):s(64),d=i!=null?i:u;return{_onInsert:m=>{m.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(m,h)=>{m.target===h.domElement&&r.set(!1)},_onMount:m=>{let h=m.domElement;h.setAttribute("aria-modal","true");let p=O=>{O.preventDefault(),r.set(!1)};h.addEventListener("cancel",p);let b=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),f=Pn(o,b);a&&(h.style.transform=ro[f],h.style.margin=On[f],h.style.width=Xe(f)?d:"100dvw",h.style.height=Xe(f)?"100dvh":d);let y=!1,S=!1,C=null,E=()=>{C=null,y&&(y=!1,h.close(),S&&(Ie(),S=!1))},x=O=>{O.target===h&&O.propertyName==="transform"&&E()};h.addEventListener("transitionend",x);let M=O=>{O?(y=!1,h.showModal(),S||(St(),S=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(y=!0,h.style.transform=ro[f],C=setTimeout(E,350))};M(r.get());let _=r.addListener(M);m.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),_(),h.removeEventListener("cancel",p),h.removeEventListener("transitionend",x),S&&(Ie(),S=!1)})},style:{transform:ro[c],transition:"transform 0.25s ease",fontSize:m=>w(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>s(v(m)*3),margin:On[c],width:Xe(c)?d:"100dvw",height:Xe(c)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:m=>`0 ${s(4)} ${s(12)} ${l(m,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function fa(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=>w(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function pa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:s(3),paddingBlock:s(12),paddingInline:s(6),textAlign:"center",color:o=>l(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o))}}}}function ga(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 ya={small:8,medium:10,large:14};function ba(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=s(ya[(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=>w(r,"inherit"),backgroundColor:r=>l(r,"shift-9",t.get(r)),color:r=>l(r,"shift-0",t.get(r)),boxShadow:r=>`0 ${s(1)} ${s(4)} ${l(r,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>l(r,"shift-10",t.get(r)),boxShadow:r=>`0 ${s(2)} ${s(6)} ${l(r,"shift-5","neutral")}`},"&:focus-visible":{outline:r=>`2px solid ${l(r,"shift-6",t.get(r))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function va(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:s(2),marginInline:0,marginTop:s(3),marginBottom:s(3),color:o=>l(o,"shift-9",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:s(2)},"& figcaption":{fontSize:o=>w(o,"decrease-1"),color:o=>l(o,"shift-8",t.get(o)),lineHeight:1.45}}}}function Sa(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=>s(v(r)*3),paddingBlock:r=>s(v(r)*3),border:"none",borderRadius:r=>s(v(r)*2),fontSize:r=>w(r,"inherit"),backgroundColor:r=>l(r,"inherit",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:s(4),rowGap:s(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>w(r,"inherit"),fontWeight:600,paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*2),color:r=>l(r,"shift-9",n.get(r)),backgroundColor:r=>l(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?"0px":s(v(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(${s(2)} * -1)`,fontSize:r=>w(r,"decrease-1"),color:r=>l(r,"shift-9",n.get(r))}}}}var wa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function xa(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:s(2),fontSize:o=>{let i=wa[o.elementNode.tagName]||"inherit";return w(o,i)}}}}function Ca(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:s(3),marginBottom:s(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function ka(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:s(4),height:s(4),flexShrink:"0",fontSize:o=>w(o),backgroundColor:"transparent",color:o=>l(o,"shift-9",t.get(o))}}}function Ea(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:s(2),backgroundColor:o=>l(o,"inherit",t.get(o))}}}function _a(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=>w(r,"inherit"),display:"inline-flex",position:"relative",width:s(6),height:s(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:s(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:r=>l(r,"shift-2",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=>`${s(.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:s(1.5),outline:r=>`${s(.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 Ta(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=>w(t,"inherit"),paddingBlock:t=>s(v(t)*1),paddingInline:t=>s(v(t)*1),blockSize:t=>s(6+v(t)*2),inlineSize:t=>s(6+v(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>s(v(t)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>l(t,"shift-2","neutral"),outline:t=>`1px solid ${l(t,"shift-4","neutral")}`}}}}function Ma(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,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=t},style:{fontFamily:"inherit",fontSize:a=>w(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"shift-9",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",n.get(a))}`,borderRadius:a=>s(v(a)*1),paddingInline:a=>s(v(a)*3),height:a=>s(6+v(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-6","error")}`}}}}function Oa(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=>w(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,borderRadius:r=>s(v(r)*1),height:r=>s(6+v(r)*2),paddingInline:r=>s(v(r)*1),"&::-webkit-file-upload-button":{marginTop:r=>s(v(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:s(1),height:s(6),paddingInline:s(2),cursor:"pointer",color:r=>l(r,"shift-11",t.get(r)),backgroundColor:r=>l(r,"shift-1",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,backgroundColor:r=>l(r,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),backgroundColor:r=>l(r,"shift-3","neutral")}}}}function Pa(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:s(10),paddingInlineStart:r=>s(v(r)*3),paddingInlineEnd:r=>s(v(r)*1.5),paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*1),fontSize:r=>w(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,color:r=>l(r,"shift-8","neutral")}}}}var Da='<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>',La='<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 $a(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 c={input:null,type:d=>o.get(d)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:d=>o.get(d)?La:Da,type:"button",ariaLabel:d=>o.get(d)?"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(c),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>s(v(a)*1),paddingBlock:a=>s(v(a)*1),paddingInline:a=>s(v(a)*3),borderRadius:a=>s(v(a)*1),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",t.get(a))}`,color:a=>l(a,"shift-9",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>w(a,"inherit"),"&:focus-within":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",n.get(a))}`}}}}function Ra(){return{style:{display:"flex",alignItems:"center",gap:s(2),"& > *":{minWidth:`${s(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let c=n(),u=a.target,d=c.indexOf(u);u.value&&d<c.length-1&&c[d+1].focus()},i=a=>{let c=n(),u=a.target,d=c.indexOf(u);a.key==="Backspace"&&!u.value&&d>0&&c[d-1].focus(),a.key==="ArrowLeft"&&d>0&&c[d-1].focus(),a.key==="ArrowRight"&&d<c.length-1&&c[d+1].focus()},r=a=>{var p,b,f;a.preventDefault();let c=(b=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?b:"",u=n(),d=u.indexOf(a.target),m=d===-1?0:d;[...c].forEach((y,S)=>{u[m+S]&&(u[m+S].value=y)});let h=Math.min(m+c.length-1,u.length-1);(f=u[h])==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 Ia(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=>w(r,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:s(6),height:s(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,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:r=>l(r,"shift-2",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=>`${s(.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 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:"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:s(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:s(1.5),borderRadius:s(999),backgroundColor:r=>l(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:s(4),height:s(4),borderRadius:s(999),border:"none",marginTop:`calc((${s(1.5)} - ${s(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=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`,outlineOffset:s(1),borderRadius:s(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}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:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>w(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,borderRadius:r=>s(v(r)*1),minWidth:s(32),paddingInline:r=>s(v(r)*3),paddingBlock:r=>s(v(r)*1),"&::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]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`}}}}function Va(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=>w(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:s(9),height:s(6),cursor:"pointer",margin:"0",paddingBlock:s(1),"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${s(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:s(3),height:s(3),borderRadius:s(999),left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:s(999),display:"inline-block",fontSize:o=>w(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Na(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:s(10),paddingInline:r=>s(v(r)*3),paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*1),fontSize:r=>w(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),"&::placeholder":{color:r=>l(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>l(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,color:r=>l(r,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","warning")}`}}}}function Ba(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:s(.5),paddingInline:s(1.5),borderRadius:s(1),outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`}}}function Ha(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:s(2),fontSize:r=>w(r,"inherit"),color:r=>l(r,"shift-9",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,"shift-8","neutral")}}}}function ja(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=>w(r,"inherit"),backgroundColor:r=>l(r),color:r=>l(r,"shift-9",t.get(r)),textDecoration:"none","&:visited":{color:r=>l(r,"shift-9",n.get(r))},"&:hover:not([disabled])":{color:r=>l(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:s(1),outlineOffset:s(1),outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral")}}}}function Fa(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=>w(o,"inherit"),textDecoration:"none",paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",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,"shift-4","neutral")}`,color:o=>l(o,"shift-8","neutral")}}}}function Wa(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Ua(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>s(v(n)*2),paddingBlock:n=>s(t?1:v(n)*2),paddingInline:n=>s(v(n)*3),fontSize:n=>w(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=>s(v(a)*2),paddingBlock:a=>s(o?1:v(a)*2),paddingInline:a=>s(v(a)*3),fontSize:a=>w(a,"inherit"),color:a=>l(a,"shift-9",t.get(a)),borderRadius:a=>s(v(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"shift-2",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 Ka(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),borderRadius:s(1),paddingInline:s(1.5)}}}function Ya(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:(c,u)=>{if(t.length===0)return;let d=c.nodeId,m=t.map((h,p)=>{var f;let b=(f=h.key)!=null?f:p;return Te(J({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:b,type:"button",id:`menuitem${d}${b}`,role:"menuitem"},n?{ariaCurrent:y=>r.get(y)===b||void 0}:{}),{onClick:()=>{var y;n&&r.set(b),(y=h.onClick)==null||y.call(h)},onKeyDown:y=>{var M;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((_,O)=>{var D;return(D=_.key)!=null?D:O}),E=C.findIndex(_=>_===b),x=E;S==="ArrowDown"?x=(E+1)%C.length:S==="ArrowUp"?x=(E-1+C.length)%C.length:S==="Home"?x=0:S==="End"&&(x=C.length-1),(M=document.getElementById(`menuitem${d}${C[x]}`))==null||M.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:s(2),width:"100%",fontSize:y=>w(y,"inherit"),height:y=>s(6+v(y)*2),paddingInline:y=>s(v(y)*3),border:"none",outline:"none",color:y=>l(y,"shift-9",o),backgroundColor:y=>l(y,"inherit",o),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"shift-2",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{outline:y=>`${s(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${s(.5)}`}}})});u[c.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:c=>s(v(c)*2),paddingInline:c=>s(v(c)*2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",o)}}}var Dn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,ze=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 Ga(e={}){var a,c,u,d;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(u=i.easing)!=null?u:"ease",iterations:(d=i.iterations)!=null?d:1,fill:"both"};return{_onMount:m=>{let h=m.domElement;if(!h||typeof h.animate!="function")return;let p=Dn(n)?n.get():n;if(p?h.animate(t?[ze(t),ze(p)]:[ze(p)],r):t&&Object.assign(h.style,ze(t)),Dn(n)){let b=n.addListener(f=>{h.animate([ze(f)],r)});m.setMetadata("motionRelease",b)}},_onBeforeRemove:(m,h)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return h();p.animate([ze(o)],r).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function Xa(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=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"decimal",listStylePosition:"outside"}}}function Za(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 Ja(e){var c;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=g((c=e.value)!=null?c:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>s(6+v(u)*2),height:u=>s(6+v(u)*2),paddingInline:u=>s(v(u)*2),borderRadius:u=>s(v(u)*1),border:"none",cursor:"pointer",fontSize:u=>w(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Te(J({},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 d={div:m=>{let h=i.get(m),p=[];p.push({button:"\u2039",_key:"prev",type:"button",ariaLabel:"Previous page",disabled:h<=1,onClick:()=>h>1&&i.set(h-1),style:r});let b=0;for(let f of Za(h,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${b++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>s(v(y)*2),color:y=>l(y,"shift-7",n)}});else{let y=f===h;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:h>=t,onClick:()=>h<t&&i.set(h+1),style:r}),p},style:{display:"flex",alignItems:"center",gap:s(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function Qa(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function el(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=g(t),a=g(n),{show:c,hide:u,anchorPartial:d}=ne({kind:"popover",open:r,placement:a,content:e.content}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:b=>l(b,"inherit")},onMouseEnter:()=>o==="hover"&&c(),onMouseLeave:()=>o==="hover"&&u(),_onInsert:b=>{let f=b.attributes.get("id");i=f||b.nodeId,!f&&b.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),R(d,{ariaHaspopup:"dialog",ariaExpanded:b=>r.get(b),onMouseEnter:(b,f)=>o==="hover"&&c(f),onMouseLeave:(b,f)=>o==="hover"&&u(f),onClick:(b,f)=>{o==="click"&&(r.get()?u(f):c(f))},onKeyDown:(b,f)=>{b.key==="Escape"&&r.get()&&u(f)},onFocus:(b,f)=>o==="hover"&&c(f),onBlur:(b,f)=>{let y=b.relatedTarget,S=f.getRoot().domElement,C=i?S.querySelector(`#${CSS.escape(i)}`):null;y&&(C!=null&&C.contains(y))||u(f)},_onMount:b=>i&&b.attributes.set("ariaControls",i)}),d}function io(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=s(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"},c=m=>{var h;return(h=a[r.get(m)])!=null?h:a["bottom-end"]},u=m=>m.includes("start")?o:m.includes("end")?"auto":"50%",d=m=>m.includes("end")?o:m.includes("start")?"auto":"50%";return{style:{fontSize:m=>w(m),backgroundColor:m=>l(m),color:m=>l(m,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:s(1.5),height:s(1.5),backgroundColor:m=>l(m,"inherit",n),borderWidth:i?"1px":"0px",borderColor:m=>l(m,"inherit",n),borderTopStyle:m=>{let h=c(m);return h.includes("top")||h.includes("right")?"solid":"none"},borderBottomStyle:m=>{let h=c(m);return h.includes("bottom")||h.includes("left")?"solid":"none"},borderLeftStyle:m=>{let h=c(m);return h.includes("top")||h.includes("left")?"solid":"none"},borderRightStyle:m=>{let h=c(m);return h.includes("bottom")||h.includes("right")?"solid":"none"},top:m=>{let h=c(m);return h.includes("top")?0:h.includes("bottom")?"auto":u(h)},right:m=>{let h=c(m);return h.includes("right")?0:h.includes("left")?"auto":d(h)},bottom:m=>{let h=c(m);return h.includes("bottom")?0:h.includes("top")?"auto":d(h)},left:m=>{let h=c(m);return h.includes("left")?0:h.includes("right")?"auto":u(h)},transform:m=>{let h=c(m),p=h.includes("right")||h.includes("end")&&!h.includes("left")?"50%":"-50%",b=h.includes("bottom")||h.includes("end")&&!h.includes("top")?"50%":"-50%";return`translate(${p},${b}) rotate(45deg)`}}}}}function tl(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*2)}}}function ol(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:s(2),border:0,borderRadius:s(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:s(999)},"&::-webkit-progress-value":{backgroundColor:r=>l(r,"shift-9",n.get(r)),borderRadius:s(999),transition:"width 220ms ease"}}}}var nl='<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>',rl='<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 il(e={}){var u,d;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=g((d=e.value)!=null?d:0),a=g(0),c=m=>{let h=a.get(m);return h>0?h:r.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:s(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:m=>l(m,"shift-8",i)},_onInit:m=>{for(let h=1;h<=t;h++){let p=h,b=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 x,M;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;(M=(x=m.domElement)==null?void 0:x.children[E])==null||M.focus()}},f=Te(J({button:y=>p<=c(y)?nl:rl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},b),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});m.children.insert(f)}}}}function al(e={}){var u,d,m;let{size:t=16,thickness:n=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((d=e.color)!=null?d:"primary","color"),r=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-n)*100),c=`radial-gradient(circle closest-side, transparent ${a}%, black ${a}%)`;return{role:"progressbar",ariaValuenow:h=>String(Math.round(o.get(h))),ariaValuemin:"0",ariaValuemax:"100",_onInsert:h=>{h.tagName!=="div"&&console.warn('"ringProgress" patch must use div tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:s(t),height:s(t),borderRadius:"50%",background:h=>`conic-gradient(from -90deg, ${l(h,"shift-9",i.get(h))} ${o.get(h)}%, ${l(h,"shift-3",r.get(h))} 0%)`,WebkitMask:c,mask:c}}}function ll(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:s(2),height:s(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:s(999),border:`${s(.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 sl(e={items:[]}){var r,a,c;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=g((c=e.value)!=null?c:(a=(r=t[0])==null?void 0:r.key)!=null?a:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,d)=>{let m=t.map((h,p)=>{var y;let b=(y=h.key)!=null?y:String(p);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:b,type:"button",role:"radio",ariaChecked:S=>i.get(S)===b,onClick:()=>i.set(b),style:{cursor:"pointer",fontSize:S=>w(S,"inherit"),height:s(6),paddingBlock:s(1),paddingInline:s(3),border:"none",borderRadius:s(10),color:S=>l(S,"shift-9",n),backgroundColor:"transparent",transition:"background-color 300ms 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":{outline:S=>`${s(.5)} solid ${l(S,"shift-6",o)}`,outlineOffset:`-${s(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[u.tagName]=m},style:{display:"inline-flex",paddingBlock:s(1),paddingInline:s(1),gap:s(.5),borderRadius:s(10),backgroundColor:u=>l(u,"shift-2",n)}}}function cl(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=>w(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"shift-4",t)}`,borderRadius:o=>s(v(o)*1),paddingBlock:o=>s(v(o)*1),paddingLeft:o=>s(v(o)*3),paddingRight:o=>s(v(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="${Kt(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 ${s(2)} center`,backgroundSize:`${s(2.5)} ${s(1.5)}`,"&:not([multiple])":{height:o=>s(6+v(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`${s(.5)} solid ${l(o,"shift-5",n)}`},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",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,"shift-8","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function ul(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),c=g(i),{show:u,hide:d,anchorPartial:m}=ne({kind:"selectBox",open:c,placement:g(n),content:e.content}),h={onClick:(f,y)=>!r&&d(y)};R(e.content,h);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,$:[Ke({color:o,removable:r})],_key:E.value,_onRemove:x=>{let M=a.get(),O=(Array.isArray(M)?M:[M]).filter(D=>D!==E.value);r?a.set(O):a.set(O[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:s(1),flex:1}},b={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>c.get()?d(y):u(y),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>s(6+v(f)*2),minWidth:s(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"shift-4","neutral")}`,paddingInline:f=>s(v(f)*2),borderRadius:f=>s(v(f)*1),fontSize:f=>w(f,"inherit"),color:f=>l(f,"shift-9",o),backgroundColor:f=>l(f,"inherit",o)}};return R(m,b),m}function ml(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 c=a.value;r.attributes.set("ariaSelected",u=>{let d=c.get(u);return a.multiple?d.includes(o):d===o}),r.addEvent("click",()=>{let u=c.get();a.multiple?u.includes(o)?c.set(u.filter(d=>d!==o)):c.set(u.concat([o])):u!==o&&c.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>w(r,"inherit"),height:r=>s(6+v(r)*2),paddingInline:r=>s(v(r)*3),border:"none",outline:"none",color:r=>l(r,"shift-9",n),backgroundColor:r=>l(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>l(r,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:r=>l(r,"shift-6",t),color:r=>l(r,"shift-11")},"&:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",t)}`,outlineOffset:`-${s(.5)}`}}}}function hl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=g((a=e.value)!=null?a:n?[]:null),i={div:c=>{let u=o.get(c);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:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>s(v(c)*2),paddingInline:c=>s(v(c)*2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",t)}}}function dl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Pe(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>w(r),color:r=>l(r,"shift-9",t.get(r)),height:s(6),display:"block",borderRadius:s(1),backgroundColor:r=>l(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function fl(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}var $n={to:{transform:"rotate(360deg)"}},Ln=Pe(JSON.stringify($n));function pl(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=>w(o),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:s(6),height:s(6),borderRadius:"50%",border:o=>`${s(.5)} solid ${l(o,"shift-4",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Ln} 0.7s linear infinite`,[`@keyframes ${Ln}`]:$n}}}function gl(e={}){let{direction:t="horizontal",defaultSize:n=50,min:o=10,max:i=90}=e;return{_onSchedule:(r,a)=>{R(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 yl(){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=c=>{n.style[o]=`${i?c:100-c}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function bl(){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 d=u.shiftKey?10:1,m=null;o?u.key==="ArrowRight"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowLeft"&&(m=Math.max(t.size.get()-d,t.min)):u.key==="ArrowDown"?m=Math.min(t.size.get()+d,t.max):u.key==="ArrowUp"&&(m=Math.max(t.size.get()-d,t.min)),u.key==="Home"?m=t.min:u.key==="End"&&(m=t.max),m!==null&&(u.preventDefault(),t.size.set(m))},a=null,c=u=>{u.preventDefault();let d=n.parentElement,m=p=>{let b=d.getBoundingClientRect(),f=o?(p.clientX-b.left)/b.width*100:(p.clientY-b.top)/b.height*100;t.size.set(Math.min(Math.max(f,t.min),t.max))},h=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null};a=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),a=null},document.addEventListener("mousemove",m),document.addEventListener("mouseup",h)};n.addEventListener("keydown",r),n.addEventListener("mousedown",c),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",c)})},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:s(1),height:s(1),borderRadius:s(999),backgroundColor:e=>l(e,"shift-4")}}}}function vl(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:(c,u)=>{let d=t.map((m,h)=>{var b;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(b=m.key)!=null?b:h,dataStep:String(h+1),dataStatus:f=>{let y=r.get(f);return h<y?"done":h===y?"active":"pending"},ariaCurrent:f=>r.get(f)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:s(1),flex:"1",fontSize:f=>w(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:s(6),height:s(6),borderRadius:s(999),fontSize:f=>w(f,"decrease-1"),fontWeight:"600",flexShrink:"0",border:f=>`2px solid ${l(f,"shift-4",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:s(3),right:`calc(50% + ${s(3)})`,left:`calc(-50% + ${s(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,"shift-3",o),color:f=>l(f,"shift-9",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,"shift-8")}}}});u[c.tagName]=d},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:s(2),listStyle:"none",margin:"0",padding:"0"}}}function Sl(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=>w(o,"inherit"),fontWeight:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function wl(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=>w(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function xl(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=>w(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function Cl(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*1),color:o=>l(o,"shift-9",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>w(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(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,"shift-2")}!important`}}}}function kl(e={items:[]}){var r,a,c;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=g((c=e.activeKey)!=null?c:(a=(r=t[0])==null?void 0:r.key)!=null?a:0);return{_onSchedule:(u,d)=>{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:x=>i.get(x)===S,onClick:()=>i.set(S),onKeyDown:x=>{let M=x.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(M))return;x.preventDefault();let _=t.map((A,B)=>{var V;return(V=A.key)!=null?V:B}),O=_.findIndex(A=>A===S),D=O;M==="ArrowRight"?D=(O+1)%_.length:M==="ArrowLeft"?D=(O-1+_.length)%_.length:M==="Home"?D=0:M==="End"&&(D=_.length-1),i.set(_[D])},style:{cursor:"pointer",fontSize:x=>w(x,"inherit"),height:x=>s(6+v(x)*2),paddingInline:x=>s(v(x)*4),border:"none",outline:"none",color:x=>l(x,"shift-9"),backgroundColor:x=>l(x,"inherit"),boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-1",o)}`,"&:hover:not([disabled])":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-6",n)}`},"&:focus-visible":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},b=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=>s(v(E)*2),paddingInline:E=>s(v(E)*2)}}});d[u.tagName]=[p,...b]}}}function El(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 c=a.domElement;c.style.overflow="hidden";let u=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",u),u(),a.addHook("Remove",()=>c.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>s(v(a)*2),paddingBlock:a=>s(v(a)*1.5),border:"none",borderRadius:a=>s(v(a)*1.5),fontSize:a=>w(a,"inherit"),color:a=>l(a,"shift-9",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),"&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${s(.5)} solid ${l(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function _l(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Tl(e={}){var r,a,c;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((c=e.active)!=null?c:!1);return{style:J({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>s(v(u)*2),paddingBottom:u=>t?"0":s(v(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=>`-${s(v(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",n)}})}}function Ml(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"),c={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:s(4),zIndex:30,padding:s(6),pointerEvents:"none"}};return{_portal:u=>{let d=u.domElement.querySelector(`#domphy-toast-${t}`);return d||(d=u.children.insert(c).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:s(32),pointerEvents:"auto",paddingBlock:u=>s(v(u)*2),paddingInline:u=>s(v(u)*4),borderRadius:u=>s(v(u)*2),fontSize:u=>w(u,"inherit"),color:u=>l(u,"shift-9",n),backgroundColor:u=>l(u,"inherit",n),boxShadow:u=>`0 ${s(2)} ${s(9)} ${l(u,"shift-4","neutral")}`,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,d)=>{let m=!1,h=null,p=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",b),d())},b=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",b),h=setTimeout(p,350),u.addHook("Remove",()=>{var f;h&&(clearTimeout(h),h=null),(f=u.domElement)==null||f.removeEventListener("transitionend",b)}),o.set(!1)}}}function Ol(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:(c,u)=>{let d=t.map((m,h)=>{var f;let p=(f=m.key)!=null?f:String(h);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=>w(y,"inherit"),height:s(6),paddingBlock:s(1),paddingInline:s(2),border:"none",borderRadius:s(1),color:y=>l(y,"shift-9",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:y=>l(y,"shift-2",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{outline:y=>`${s(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${s(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[c.tagName]=d},style:{display:"flex",paddingBlock:s(1),paddingInline:s(1),gap:s(1),borderRadius:s(2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",o),outline:c=>`1px solid ${l(c,"shift-3",o)}`,outlineOffset:"-1px"}}}function Pl(e={}){var n;let t=(n=e.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:o=>s(v(o)*t)}}}function Dl(){return{div:null,style:{flex:"1 1 0"}}}function Ll(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)}`,c={span:b=>r.get(b),id:a},{show:u,hide:d,anchorPartial:m}=ne({kind:"tooltip",open:t,placement:i,content:c}),h={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:b=>s(v(b)*1),paddingInline:b=>s(v(b)*3),borderRadius:b=>s(v(b)*1),color:b=>l(b,"shift-9"),backgroundColor:b=>l(b),fontSize:b=>w(b,"inherit")},$:[io({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(h),R(m,{ariaDescribedby:a,onMouseEnter:(b,f)=>u(f),onMouseLeave:(b,f)=>d(f),onFocus:(b,f)=>u(f),onBlur:(b,f)=>d(f),onKeyDown:(b,f)=>b.key==="Escape"&&d(f)}),m}function Rn(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function $l(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=new Set,a=new Set;return{_onMount:c=>{c.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:c=>{o=new Map,c.children.items.forEach((u,d)=>{if(!(u instanceof j))return;let m=u.domElement;m&&o.set(Rn(u,d),m.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((u,d)=>{var _;if(!(u instanceof j))return;let m=u.domElement;if(!m)return;let h=Rn(u,d),p=o.get(h);if(!p)return;let b=m.getBoundingClientRect(),f=p.left-b.left,y=p.top-b.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(_=i.get(m))==null||_(),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,x=()=>{C||(C=!0,E&&(r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",M),m.style.transition="",m.style.transform="")},M=O=>{O.propertyName==="transform"&&x()};i.set(m,()=>{C=!0,E&&(clearTimeout(E),r.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",M)}),m.addEventListener("transitionend",M),E=setTimeout(x,t+n+34),r.add(E)}),o.clear()}}}function Rl(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=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"disc",listStylePosition:"outside"}}}return Jn(Il);})();
4
+ ${i}}`}function ee(e){if(!De[e])throw Error(`Theme "${e}" not found`);return De[e]}function Br(e,t){Ar(t),De[e]||(De[e]=qt(Fe)),qo(De[e],t),nt=null,Ht.clear()}function Nr(e){let t=qt(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 Uo(e){let t=Ht.get(e);if(t)return t;let n=ee(e),o=Ut(n),i={};for(let r in n){let a=n[r];if(r==="colors")for(let c in n.colors){let u={};[...Array(o).keys()].forEach(m=>u[m]=n.colors[c][m]),i[c]=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 c in a)i.custom[c]=a[c]}return Ht.set(e,i),i}function rt(){if(nt)return nt;let e=ee("light"),t=Ut(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(c=>a[c]=`var(--${r}-${c})`),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-${Wo(r)})`}return nt=n,n}function jt(){return Object.entries(De).map(([e,t])=>Vr(e,t)).join(`
5
+ `)}function Hr(e){var t;if(typeof document!="undefined")if(e){e.textContent=jt();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=jt(),document.head.appendChild(e)}function s(e){return`calc(${e/4}em)`}function jr(e,t,n=320,o=1280){let i=e/4,r=t/4,a=(r-i)/(o-n)*100,c=i-a*n/100,u=parseFloat(c.toFixed(4))===0?`${a.toFixed(4)}vw`:`${c.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${r}em)`}function Fr(e=document.documentElement,t={}){let{persist:n=!0,storageKey:o="dp-theme"}=t,i=()=>{if(n){let c=localStorage.getItem(o);if(c==="light"||c==="dark")return c}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let r=window.matchMedia("(prefers-color-scheme: dark)"),a=c=>{(!n||!localStorage.getItem(o))&&e.setAttribute("data-theme",c.matches?"dark":"light")};return r.addEventListener("change",a),()=>r.removeEventListener("change",a)}function it(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 Wr=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],Ft=["inherit"];[...Array(5).keys()].forEach(e=>{Ft.push(`decrease-${e}`),Ft.push(`increase-${e}`)});function qr(e,t="inherit"){if(!Ft.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 Ur(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=qr(n,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),n}function v(e){let t=Ur(e);return ee(e?it(e):"light").densities[t]}var Kr=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],Yr=[.75,1,1.5,2,2.5];function Gr(e,t){let n=Nt(ot(t)),o=0,i=1/0;for(let r=0;r<e.length;r++){let a=No(n,Nt(ot(e[r])));a<i&&(i=a,o=r)}return o}function Xr(e,t={}){var n,o,i,r,a,c;let u=(n=t.steps)!=null?n:18,m={},h={};for(let[d,p]of Object.entries(e)){let b=jo(p,u);m[d]=b,h[d]=Gr(b,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:m,baseTones:h,fontSizes:(i=t.fontSizes)!=null?i:Kr,densities:(r=t.densities)!=null?r:Yr,darkBias:(a=t.darkBias)!=null?a:1,custom:(c=t.custom)!=null?c:{}}}var Wt=["inherit"];[...Array(8).keys()].forEach(e=>{Wt.push(`decrease-${e}`),Wt.push(`increase-${e}`)});function Ko(e,t="inherit"){if(!Wt.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 Jr(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=Ko(n,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),n}function w(e,t="inherit"){let n=Ko(Jr(e),t);return rt().fontSizes[n]}var ue=Fe.colors.neutral.length,je=["inherit","base"];[...Array(ue).keys()].forEach(e=>{je.push(`decrease-${e}`),je.push(`increase-${e}`),je.push(`shift-${e}`)});function Fo(e,t){if(e<0||e>ue-1)return e;let n=e+t;return n=Math.max(0,Math.min(ue-1,n)),n}function Zr(e,t){if(e<0||e>ue-1)return e;let n=Math.floor((ue-1)/2),o=e<=n?e+t:e-t;return o=Math.max(0,Math.min(ue-1,o)),o}function We(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!je.includes(t))throw Error(`tone name "${t}" invalid`);if(t.startsWith("increase-")){let n=parseInt(t.replace("increase-",""),10);return Fo(e,n)}else if(t.startsWith("decrease-")){let n=parseInt(t.replace("decrease-",""),10);return Fo(e,-n)}else if(t.startsWith("shift-")){let n=parseInt(t.replace("shift-",""),10);return Zr(e,n)}else return e}function Yo(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=We(n,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),n}function Go(e,t,n){return n<=0?e:t==="lighten"&&e===0?n:t==="darken"&&e===ue-1?ue-1-n:e}function l(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n;if(!e){let c=rt()[o];if(!c)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?c[ee("light").baseTones[o]]:c[We(0,t)]}let i=it(e),r;if(t==="base")r=ee(i).baseTones[o];else{let c=ee(i),u=Go(Yo(e),c.direction,c.darkBias);r=We(u,t)}let a=rt()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[r]}function Kt(e,t="inherit",n="inherit"){let o=n==="inherit"?"neutral":n,i=e?it(e):"light",r=Uo(i)[o];if(!r)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?r[ee("light").baseTones[o]]:r[We(0,t)];let a;if(t==="base")a=ee(i).baseTones[o];else{let c=ee(i),u=Go(Yo(e),c.direction,c.darkBias);a=We(u,t)}return r[a]}var St={};Ze(St,{abbreviation:()=>Qr,accordion:()=>ei,alert:()=>ti,avatar:()=>oi,badge:()=>ni,blockquote:()=>ri,breadcrumb:()=>ii,breadcrumbEllipsis:()=>ai,button:()=>li,buttonGhost:()=>si,buttonSwitch:()=>ci,card:()=>ui,code:()=>hi,combobox:()=>ea,command:()=>ta,commandItem:()=>na,commandSearch:()=>oa,datePicker:()=>ia,descriptionList:()=>sa,details:()=>ca,dialog:()=>ua,divider:()=>ha,drawer:()=>ma,emphasis:()=>da,empty:()=>fa,errorBoundary:()=>pa,fab:()=>ya,figure:()=>ba,formGroup:()=>va,heading:()=>wa,horizontalRule:()=>xa,icon:()=>Ca,image:()=>ka,inputCheckbox:()=>Ea,inputColor:()=>_a,inputDateTime:()=>Ta,inputFile:()=>Ma,inputNumber:()=>Oa,inputOTP:()=>$a,inputPassword:()=>La,inputRadio:()=>Ia,inputRange:()=>Ra,inputSearch:()=>za,inputSwitch:()=>Aa,inputText:()=>Va,keyboard:()=>Ba,label:()=>Na,link:()=>Ha,linkButton:()=>ja,list:()=>Fa,listItem:()=>Wa,listItemButton:()=>qa,mark:()=>Ua,menu:()=>Ka,motion:()=>Ya,orderedList:()=>Ga,pagination:()=>Ja,paragraph:()=>Za,popover:()=>Qa,popoverArrow:()=>io,preformated:()=>el,progress:()=>tl,rating:()=>rl,ringProgress:()=>il,scrollArea:()=>al,segmented:()=>ll,select:()=>sl,selectBox:()=>cl,selectItem:()=>ul,selectList:()=>hl,skeleton:()=>ml,small:()=>dl,spinner:()=>fl,splitter:()=>pl,splitterHandle:()=>yl,splitterPanel:()=>gl,steps:()=>bl,strong:()=>vl,subscript:()=>Sl,superscript:()=>wl,table:()=>xl,tabs:()=>Cl,tag:()=>Ke,textarea:()=>kl,timeline:()=>El,timelineItem:()=>_l,toast:()=>Tl,toggleGroup:()=>Ml,toolbar:()=>Ol,toolbarSpacer:()=>Pl,tooltip:()=>Dl,transitionGroup:()=>Ll,unorderedList:()=>$l});function Qr(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=>w(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:s(.72),cursor:"help","&:hover":{color:r=>l(r,"shift-11",n.get(r)),textDecorationColor:r=>l(r,"shift-9",n.get(r))}}}}function ei(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 c=a.domElement;if(!c)return;let u=m=>{let h=m.target.closest("summary");if(!h)return;let d=h.closest("details");!d||d.parentElement!==c||d.open||Array.from(c.querySelectorAll(":scope > details")).forEach(p=>{p!==d&&(p.open=!1)})};c.addEventListener("click",u),a.addHook("Remove",()=>c.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>s(v(a)*1),outline:a=>`1px solid ${l(a,"shift-4",n.get(a))}`,outlineOffset:"-1px",overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"shift-4",n.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`}}}}function ti(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:s(3),paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),boxShadow:o=>`inset ${s(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=>w(o,"inherit")}}}function oi(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:s(9),height:s(9),fontSize:o=>w(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 ni(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:s(1),minWidth:s(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:r=>w(r,"decrease-1"),borderRadius:s(999),backgroundColor:r=>l(r,"shift-9",o.get(r)),color:r=>l(r,"shift-0",o.get(r))}}}}function ri(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=>w(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),boxShadow:o=>`inset ${s(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),margin:0}}}function ii(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=>w(i,"inherit"),gap:s(1),color:i=>l(i,"shift-9",n.get(i)),backgroundColor:i=>l(i,"inherit",n.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"shift-8",n.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",n.get(i)),paddingInlineStart:s(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",n.get(i)),pointerEvents:"none"}}}}function ai(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=>w(o,"inherit"),paddingInline:s(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"shift-8",t.get(o)),borderRadius:s(1),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",t.get(o))}`,outlineOffset:s(.5)}}}}function li(e={}){var n;let t=g((n=e.color)!=null?n:"primary","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>w(o,"inherit"),paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,color:o=>l(o,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function si(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:o=>w(o,"inherit"),paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*1),borderRadius:o=>s(v(o)*1),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",color:o=>l(o,"shift-6",t.get(o)),"&:hover:not([disabled]):not([aria-busy=true])":{color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",t.get(o))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"shift-4","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}function ci(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:c=>{c.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:c=>n.get(c),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:c=>w(c),border:"none",outlineWidth:"1px",outline:c=>`1px solid ${l(c,"shift-3",o.get(c))}`,minWidth:s(12),minHeight:s(6),borderRadius:s(999),paddingLeft:s(7),paddingRight:s(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:c=>l(c,"inherit",o.get(c)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:s(5),height:s(5),borderRadius:s(999),color:c=>l(c,"shift-9"),backgroundColor:c=>l(c,"decrease-2",o.get(c))},"&[aria-checked=true]":{backgroundColor:c=>l(c,"increase-3",i.get(c)),outline:"none",color:c=>l(c,"decrease-2"),paddingLeft:s(2),paddingRight:s(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${s(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function ui(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=>s(v(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,"shift-4",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=>s(v(o)*2),paddingInline:o=>s(v(o)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:o=>s(v(o)*4),color:o=>l(o,"shift-9",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>s(v(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>s(v(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:s(2),paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*4),borderTop:o=>`1px solid ${l(o,"shift-3",t.get(o))}`}}}}function hi(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),paddingInline:s(1.5),borderRadius:s(1)}}}var mi=Object.defineProperty,di=Object.defineProperties,fi=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Xo=(e,t,n)=>t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t)=>{for(var n in t||(t={}))ln.call(t,n)&&Xo(e,n,t[n]);if(st)for(var n of st(t))sn.call(t,n)&&Xo(e,n,t[n]);return e},Se=(e,t)=>di(e,fi(t)),cn=(e,t)=>{var n={};for(var o in e)ln.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&st)for(var o of st(e))t.indexOf(o)<0&&sn.call(e,o)&&(n[o]=e[o]);return n},Ce=(e,t,n)=>new Promise((o,i)=>{var r=u=>{try{c(n.next(u))}catch(m){i(m)}},a=u=>{try{c(n.throw(u))}catch(m){i(m)}},c=u=>u.done?o(u.value):Promise.resolve(u.value).then(r,a);c((n=n.apply(e,t)).next())}),pi=["top","right","bottom","left"],Jo=["start","end"],Is=pi.reduce((e,t)=>e.concat(t,`${t}-${Jo[0]}`,`${t}-${Jo[1]}`),[]),ct=Math.min,ve=Math.max,ut=Math.round,lt=Math.floor,te=e=>({x:e,y:e}),gi={left:"right",right:"left",bottom:"top",top:"bottom"};function Zo(e,t,n){return ve(e,ct(t,n))}function dt(e,t){return typeof e=="function"?e(t):e}function we(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function un(e){return e==="x"?"y":"x"}function hn(e){return e==="y"?"height":"width"}function he(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function mn(e){return un(he(e))}function yi(e,t,n=!1){let o=ft(e),i=mn(e),r=hn(i),a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=ht(a)),[a,ht(a)]}function bi(e){let t=ht(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Qo=["left","right"],en=["right","left"],vi=["top","bottom"],Si=["bottom","top"];function wi(e,t,n){switch(e){case"top":case"bottom":return n?t?en:Qo:t?Qo:en;case"left":case"right":return t?vi:Si;default:return[]}}function xi(e,t,n,o){let i=ft(e),r=wi(we(e),n==="start",o);return i&&(r=r.map(a=>`${a}-${i}`),t&&(r=r.concat(r.map(Xt)))),r}function ht(e){let t=we(e);return gi[t]+e.slice(t.length)}function Ci(e){return X({top:0,right:0,bottom:0,left:0},e)}function ki(e){return typeof e!="number"?Ci(e):{top:e,right:e,bottom:e,left:e}}function mt(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 tn({reference:e,floating:t},n,o){let i=he(n),r=mn(n),a=hn(r),c=we(n),u=i==="y",m=e.x+e.width/2-t.width/2,h=e.y+e.height/2-t.height/2,d=e[a]/2-t[a]/2,p;switch(c){case"top":p={x:m,y:e.y-t.height};break;case"bottom":p={x:m,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:h};break;case"left":p={x:e.x-t.width,y:h};break;default:p={x:e.x,y:e.y}}switch(ft(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 Ei(e){return Ce(this,arguments,function*(t,n={}){var o,i,r,a,c,u;let{x:m,y:h,platform:d,rects:p,elements:b,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:S="viewport",elementContext:C="floating",altBoundary:E=!1,padding:x=0}=dt(n,t),M=ki(x),O=b[E?C==="floating"?"reference":"floating":C],_=mt(yield d.getClippingRect({element:(i=yield(o=d.isElement)==null?void 0:o.call(d,O))==null||i?O:O.contextElement||(yield(r=d.getDocumentElement)==null?void 0:r.call(d,b.floating)),boundary:y,rootBoundary:S,strategy:f})),D=C==="floating"?{x:m,y:h,width:p.floating.width,height:p.floating.height}:p.reference,A=yield(a=d.getOffsetParent)==null?void 0:a.call(d,b.floating),V=(yield(c=d.isElement)==null?void 0:c.call(d,A))?(yield(u=d.getScale)==null?void 0:u.call(d,A))||{x:1,y:1}:{x:1,y:1},B=mt(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:D,offsetParent:A,strategy:f}):D);return{top:(_.top-B.top+M.top)/V.y,bottom:(B.bottom-_.bottom+M.bottom)/V.y,left:(_.left-B.left+M.left)/V.x,right:(B.right-_.right+M.right)/V.x}})}var _i=50,Ti=(e,t,n)=>Ce(null,null,function*(){var o;let{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:c}=n,u=c.detectOverflow?c:Se(X({},c),{detectOverflow:Ei}),m=yield(o=c.isRTL)==null?void 0:o.call(c,t),h=yield c.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=tn(h,i,m),b=i,f=0,y={};for(let S=0;S<a.length;S++){let C=a[S];if(!C)continue;let{name:E,fn:x}=C,{x:M,y:O,data:_,reset:D}=yield x({x:d,y:p,initialPlacement:i,placement:b,strategy:r,middlewareData:y,rects:h,platform:u,elements:{reference:e,floating:t}});d=M!=null?M:d,p=O!=null?O:p,y[E]=X(X({},y[E]),_),D&&f<_i&&(f++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(h=D.rects===!0?yield c.getElementRects({reference:e,floating:t,strategy:r}):D.rects),{x:d,y:p}=tn(h,b,m)),S=-1)}return{x:d,y:p,placement:b,strategy:r,middlewareData:y}});var Mi=(e={})=>({name:"flip",options:e,fn(t){return Ce(this,null,function*(){var n,o,i,r,a,c;let{placement:u,middlewareData:m,rects:h,initialPlacement:d,platform:p,elements:b}=t,f=dt(e,t),{mainAxis:y=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:M=!0}=f,O=cn(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((n=m.arrow)!=null&&n.alignmentOffset)return{};let _=we(u),D=he(d),A=we(d)===d,V=yield(o=p.isRTL)==null?void 0:o.call(p,b.floating),B=C||(A||!M?[ht(d)]:bi(d)),de=x!=="none";!C&&de&&B.push(...xi(d,M,x,V));let Ee=[d,...B],le=yield p.detectOverflow(t,O),H=[],re=((i=m.flip)==null?void 0:i.overflows)||[];if(y&&H.push(le[_]),S){let ie=yi(u,h,V);H.push(le[ie[0]],le[ie[1]])}if(re=[...re,{placement:u,overflows:H}],!H.every(ie=>ie<=0)){let ie=(((r=m.flip)==null?void 0:r.index)||0)+1,Ae=Ee[ie];if(Ae&&(!(S==="alignment"&&D!==he(Ae))||re.every(F=>he(F.placement)===D?F.overflows[0]>0:!0)))return{data:{index:ie,overflows:re},reset:{placement:Ae}};let fe=(a=re.filter(F=>F.overflows[0]<=0).sort((F,Y)=>F.overflows[1]-Y.overflows[1])[0])==null?void 0:a.placement;if(!fe)switch(E){case"bestFit":{let F=(c=re.filter(Y=>{if(de){let G=he(Y.placement);return G===D||G==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(G=>G>0).reduce((G,Ve)=>G+Ve,0)]).sort((Y,G)=>Y[1]-G[1])[0])==null?void 0:c[0];F&&(fe=F);break}case"initialPlacement":fe=d;break;default:}if(u!==fe)return{reset:{placement:fe}}}return{}})}});var Oi=new Set(["left","top"]);function Pi(e,t){return Ce(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),c=we(o),u=ft(o),m=he(o)==="y",h=Oi.has(c)?-1:1,d=a&&m?-1:1,p=dt(t,e),{mainAxis:b,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),m?{x:f*d,y:b*h}:{x:b*h,y:f*d}})}var Di=(e=0)=>({name:"offset",options:e,fn(t){return Ce(this,null,function*(){var n,o;let{x:i,y:r,placement:a,middlewareData:c}=t,u=yield Pi(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:r+u.y,data:Se(X({},u),{placement:a})}})}}),Li=(e={})=>({name:"shift",options:e,fn(t){return Ce(this,null,function*(){let{x:n,y:o,placement:i,platform:r}=t,a=dt(e,t),{mainAxis:c=!0,crossAxis:u=!1,limiter:m={fn:({x:E,y:x})=>({x:E,y:x})}}=a,h=cn(a,["mainAxis","crossAxis","limiter"]),d={x:n,y:o},p=yield r.detectOverflow(t,h),b=he(we(i)),f=un(b),y=d[f],S=d[b];if(c){let E=f==="y"?"top":"left",x=f==="y"?"bottom":"right",M=y+p[E],O=y-p[x];y=Zo(M,y,O)}if(u){let E=b==="y"?"top":"left",x=b==="y"?"bottom":"right",M=S+p[E],O=S-p[x];S=Zo(M,S,O)}let C=m.fn(Se(X({},t),{[f]:y,[b]:S}));return Se(X({},C),{data:{x:C.x-n,y:C.y-o,enabled:{[f]:c,[b]:u}}})})}});function pt(){return typeof window!="undefined"}function Ie(e){return dn(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(dn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dn(e){return pt()?e instanceof Node||e instanceof q(e).Node:!1}function J(e){return pt()?e instanceof Element||e instanceof q(e).Element:!1}function ae(e){return pt()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function on(e){return!pt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Ue(e){let{overflow:t,overflowX:n,overflowY:o,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function $i(e){return/^(table|td|th)$/.test(Ie(e))}function gt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Ii=/transform|translate|scale|rotate|perspective|filter/,Ri=/paint|layout|strict|content/,be=e=>!!e&&e!=="none",Yt;function Zt(e){let t=J(e)?Z(e):e;return be(t.transform)||be(t.translate)||be(t.scale)||be(t.rotate)||be(t.perspective)||!Qt()&&(be(t.backdropFilter)||be(t.filter))||Ii.test(t.willChange||"")||Ri.test(t.contain||"")}function zi(e){let t=me(e);for(;ae(t)&&!$e(t);){if(Zt(t))return t;if(gt(t))return null;t=me(t)}return null}function Qt(){return Yt==null&&(Yt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Yt}function $e(e){return/^(html|body|#document)$/.test(Ie(e))}function Z(e){return q(e).getComputedStyle(e)}function yt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function me(e){if(Ie(e)==="html")return e;let t=e.assignedSlot||e.parentNode||on(e)&&e.host||oe(e);return on(t)?t.host:t}function fn(e){let t=me(e);return $e(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ue(t)?t:fn(t)}function qe(e,t=[],n=!0){var o;let i=fn(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=q(i);if(r){let c=Jt(a);return t.concat(a,a.visualViewport||[],Ue(i)?i:[],c&&n?qe(c):[])}else return t.concat(i,qe(i,[],n))}function Jt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pn(e){let t=Z(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=ae(e),r=i?e.offsetWidth:n,a=i?e.offsetHeight:o,c=ut(n)!==r||ut(o)!==a;return c&&(n=r,o=a),{width:n,height:o,$:c}}function eo(e){return J(e)?e:e.contextElement}function Le(e){let t=eo(e);if(!ae(t))return te(1);let n=t.getBoundingClientRect(),{width:o,height:i,$:r}=pn(t),a=(r?ut(n.width):n.width)/o,c=(r?ut(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}var Ai=te(0);function gn(e){let t=q(e);return!Qt()||!t.visualViewport?Ai:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vi(e,t=!1,n){return!n||t&&n!==q(e)?!1:t}function xe(e,t=!1,n=!1,o){let i=e.getBoundingClientRect(),r=eo(e),a=te(1);t&&(o?J(o)&&(a=Le(o)):a=Le(e));let c=Vi(r,n,o)?gn(r):te(0),u=(i.left+c.x)/a.x,m=(i.top+c.y)/a.y,h=i.width/a.x,d=i.height/a.y;if(r){let p=q(r),b=o&&J(o)?q(o):o,f=p,y=Jt(f);for(;y&&o&&b!==f;){let S=Le(y),C=y.getBoundingClientRect(),E=Z(y),x=C.left+(y.clientLeft+parseFloat(E.paddingLeft))*S.x,M=C.top+(y.clientTop+parseFloat(E.paddingTop))*S.y;u*=S.x,m*=S.y,h*=S.x,d*=S.y,u+=x,m+=M,f=q(y),y=Jt(f)}}return mt({width:h,height:d,x:u,y:m})}function bt(e,t){let n=yt(e).scrollLeft;return t?t.left+n:xe(oe(e)).left+n}function yn(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-bt(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Bi({elements:e,rect:t,offsetParent:n,strategy:o}){let i=o==="fixed",r=oe(n),a=e?gt(e.floating):!1;if(n===r||a&&i)return t;let c={scrollLeft:0,scrollTop:0},u=te(1),m=te(0),h=ae(n);if((h||!h&&!i)&&((Ie(n)!=="body"||Ue(r))&&(c=yt(n)),h)){let p=xe(n);u=Le(n),m.x=p.x+n.clientLeft,m.y=p.y+n.clientTop}let d=r&&!h&&!i?yn(r,c):te(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-c.scrollLeft*u.x+m.x+d.x,y:t.y*u.y-c.scrollTop*u.y+m.y+d.y}}function Ni(e){return Array.from(e.getClientRects())}function Hi(e){let t=oe(e),n=yt(e),o=e.ownerDocument.body,i=ve(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=ve(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-n.scrollLeft+bt(e),c=-n.scrollTop;return Z(o).direction==="rtl"&&(a+=ve(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:c}}var nn=25;function ji(e,t){let n=q(e),o=oe(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,c=0,u=0;if(i){r=i.width,a=i.height;let h=Qt();(!h||h&&t==="fixed")&&(c=i.offsetLeft,u=i.offsetTop)}let m=bt(o);if(m<=0){let h=o.ownerDocument,d=h.body,p=getComputedStyle(d),b=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-d.clientWidth-b);f<=nn&&(r-=f)}else m<=nn&&(r+=m);return{width:r,height:a,x:c,y:u}}function Fi(e,t){let n=xe(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=ae(e)?Le(e):te(1),a=e.clientWidth*r.x,c=e.clientHeight*r.y,u=i*r.x,m=o*r.y;return{width:a,height:c,x:u,y:m}}function rn(e,t,n){let o;if(t==="viewport")o=ji(e,n);else if(t==="document")o=Hi(oe(e));else if(J(t))o=Fi(t,n);else{let i=gn(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return mt(o)}function bn(e,t){let n=me(e);return n===t||!J(n)||$e(n)?!1:Z(n).position==="fixed"||bn(n,t)}function Wi(e,t){let n=t.get(e);if(n)return n;let o=qe(e,[],!1).filter(c=>J(c)&&Ie(c)!=="body"),i=null,r=Z(e).position==="fixed",a=r?me(e):e;for(;J(a)&&!$e(a);){let c=Z(a),u=Zt(a);!u&&c.position==="fixed"&&(i=null),(r?!u&&!i:!u&&c.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ue(a)&&!u&&bn(e,a))?o=o.filter(m=>m!==a):i=c,a=me(a)}return t.set(e,o),o}function qi({element:e,boundary:t,rootBoundary:n,strategy:o}){let i=[...t==="clippingAncestors"?gt(e)?[]:Wi(e,this._c):[].concat(t),n],r=rn(e,i[0],o),a=r.top,c=r.right,u=r.bottom,m=r.left;for(let h=1;h<i.length;h++){let d=rn(e,i[h],o);a=ve(d.top,a),c=ct(d.right,c),u=ct(d.bottom,u),m=ve(d.left,m)}return{width:c-m,height:u-a,x:m,y:a}}function Ui(e){let{width:t,height:n}=pn(e);return{width:t,height:n}}function Ki(e,t,n){let o=ae(t),i=oe(t),r=n==="fixed",a=xe(e,!0,r,t),c={scrollLeft:0,scrollTop:0},u=te(0);function m(){u.x=bt(i)}if(o||!o&&!r)if((Ie(t)!=="body"||Ue(i))&&(c=yt(t)),o){let b=xe(t,!0,r,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else i&&m();r&&!o&&i&&m();let h=i&&!o&&!r?yn(i,c):te(0),d=a.left+c.scrollLeft-u.x-h.x,p=a.top+c.scrollTop-u.y-h.y;return{x:d,y:p,width:a.width,height:a.height}}function Gt(e){return Z(e).position==="static"}function an(e,t){if(!ae(e)||Z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function vn(e,t){let n=q(e);if(gt(e))return n;if(!ae(e)){let i=me(e);for(;i&&!$e(i);){if(J(i)&&!Gt(i))return i;i=me(i)}return n}let o=an(e,t);for(;o&&$i(o)&&Gt(o);)o=an(o,t);return o&&$e(o)&&Gt(o)&&!Zt(o)?n:o||zi(e)||n}var Yi=function(e){return Ce(this,null,function*(){let t=this.getOffsetParent||vn,n=this.getDimensions,o=yield n(e.floating);return{reference:Ki(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function Gi(e){return Z(e).direction==="rtl"}var Xi={convertOffsetParentRelativeRectToViewportRelativeRect:Bi,getDocumentElement:oe,getClippingRect:qi,getOffsetParent:vn,getElementRects:Yi,getClientRects:Ni,getDimensions:Ui,getScale:Le,isElement:J,isRTL:Gi};function Sn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ji(e,t){let n=null,o,i=oe(e);function r(){clearTimeout(o),n==null||n.disconnect(),n=null}function a(c=!1,u=1){r();let m=e.getBoundingClientRect(),{left:h,top:d,width:p,height:b}=m;if(c||t(),!p||!b)return;let f=lt(d),y=lt(i.clientWidth-(h+p)),S=lt(i.clientHeight-(d+b)),C=lt(h),E={rootMargin:`${-f}px ${-y}px ${-S}px ${-C}px`,threshold:ve(0,ct(1,u))||1},x=!0;function M(O){let _=O[0].intersectionRatio;if(_!==u){if(!x)return a();_?a(!1,_):o=setTimeout(()=>{a(!1,1e-7)},1e3)}_===1&&!Sn(m,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(M,Se(X({},E),{root:i.ownerDocument}))}catch(O){n=new IntersectionObserver(M,E)}n.observe(e)}return a(!0),r}function wn(e,t,n,o={}){let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,m=eo(e),h=i||r?[...m?qe(m):[],...t?qe(t):[]]:[];h.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),r&&C.addEventListener("resize",n)});let d=m&&c?Ji(m,n):null,p=-1,b=null;a&&(b=new ResizeObserver(([C])=>{C&&C.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{b==null||b.observe(t)})),n()}),m&&!u&&b.observe(m),t&&b.observe(t));let f,y=u?xe(e):null;u&&S();function S(){let C=xe(e);y&&!Sn(y,C)&&n(),y=C,f=requestAnimationFrame(S)}return n(),()=>{h.forEach(C=>{i&&C.removeEventListener("scroll",n),r&&C.removeEventListener("resize",n)}),d==null||d(),b==null||b.disconnect(),b=null,u&&cancelAnimationFrame(f)}}var xn=Di;var Cn=Li,kn=Mi;var En=(e,t,n)=>{let o=new Map,i=X({platform:Xi},n),r=Se(X({},i.platform),{_c:o});return Ti(e,t,Se(X({},i),{platform:r}))};function Zi(e,t){var O;let{openState:n,placement:o,content:i,keepOpenOnContentHover:r}=t,a=null,c=null,u=null,m=null,h=!1,d=e.domElement,p=e.getRoot(),b={style:{position:"fixed",pointerEvents:"auto",visibility:_=>n.get(_)?"visible":"hidden"},onKeyDown:_=>{_.key==="Escape"&&x()},onMouseEnter:()=>r&&E(),onMouseLeave:()=>r&&x(),_onMount:_=>{var D;if(u=_.domElement,d&&u&&!u.hasAttribute("data-theme")){let A=(D=d.closest("[data-theme]"))==null?void 0:D.getAttribute("data-theme");A&&u.setAttribute("data-theme",A)}},_portal:_=>{let D=_.domElement.querySelector("#domphy-floating");if(!D){let A={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};D=_.children.insert(A).domElement}return D}},f=_=>I(_,b);f(i);let y=()=>{h||(h=!0,m=p.children.insert(i))},S=()=>{y(),d&&u&&(c==null||c(),c=wn(d,u,()=>{En(d,u,{placement:o.get(),middleware:[xn(12),kn(),Cn()],strategy:"fixed"}).then(({x:_,y:D,placement:A})=>{u&&(Object.assign(u.style,{left:`${_}px`,top:`${D}px`}),o.set(A))})}),n.set(!0))},C=()=>{c==null||c(),c=null,m&&(m.remove(),m=null),u=null,h=!1,n.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(S,100)},x=()=>{a&&clearTimeout(a),a=setTimeout(C,100)},M=_=>{if(!n.get()||!d||!u)return;let D=_.target;!d.contains(D)&&!u.contains(D)&&x()};return(O=p.domElement)==null||O.addEventListener("click",M),{show:E,hide:x,update(_){n=_.openState,o=_.placement,i=_.content,r=_.keepOpenOnContentHover,f(i),m&&m.patch(i)},destroy(){var _;a&&clearTimeout(a),c==null||c(),m==null||m.remove(),(_=p.domElement)==null||_.removeEventListener("click",M)}}}function ne(e){let{kind:t,open:n=!1,placement:o}=e,i=g(n),r=`floating:${t}`,a=m=>{var h;return(h=m==null?void 0:m.getBehavior(r))==null?void 0:h.show()},c=m=>{var h;return(h=m==null?void 0:m.getBehavior(r))==null?void 0:h.hide()},u=K({onKeyDown:(m,h)=>m.key==="Escape"&&c(h)},At(r,Zi,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:c,anchorPartial:u}}var Qi='<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 Ke(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:Qi,onClick:a=>{a.stopPropagation(),i.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:s(1),width:s(4),height:s(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:s(6),paddingBlock:0,borderRadius:s(1),paddingInlineStart:s(2),paddingInlineEnd:t?s(1):s(2),gap:s(2),fontSize:i=>w(i,"inherit"),backgroundColor:i=>l(i,"inherit",n.get(i)),color:i=>l(i,"shift-9",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"shift-4",n.get(i))}`}}}function ea(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),c=g(i),{show:u,hide:m,anchorPartial:h}=ne({kind:"combobox",open:c,placement:g(n),content:e.content}),d={onClick:(S,C)=>!r&&m(C)};I(e.content,d);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:s(6),marginInlineStart:s(2),fontSize:S=>w(S,"inherit"),color:S=>l(S,"shift-9",o),backgroundColor:S=>l(S,"inherit",o)},b;if(e.input){let S={onFocus:(C,E)=>u(E),style:p,_key:"combobox-input"};I(e.input,S),b=e.input}else b={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],M=t.filter(O=>E.includes(O.value)).map(O=>({span:O.label,$:[Ke({color:o,removable:!0})],_key:O.value,_onRemove:_=>{let D=a.get(),V=(Array.isArray(D)?D:[D]).filter(B=>B!==O.value);r?a.set(V):a.set(V[0])}}));return M.push(b),M},style:{display:"flex",flexWrap:"wrap",gap:s(1)}},y={_onInsert:S=>{S.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:S=>S.children.insert(f),style:{minWidth:s(32),outlineOffset:"-1px",outline:S=>`1px solid ${l(S,"shift-4","neutral")}`,paddingBlock:S=>s(v(S)*1),paddingInline:S=>s(v(S)*1),borderRadius:S=>s(v(S)*1),fontSize:S=>w(S,"inherit"),color:S=>l(S,"shift-9",o),backgroundColor:S=>l(S,"inherit",o)}};return I(h,y),h}function ta(){return{_onSchedule:(e,t)=>{I(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function oa(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=>w(o,"inherit"),paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"shift-3",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 na(e={}){let{color:t="neutral",accentColor:n="primary"}=e;return{role:"option",_onMount:o=>{var m,h;let i=o.getContext("command");if(!i){console.warn('"commandItem" patch must be used inside a "command"');return}let r=o.domElement,a=(h=(m=r.textContent)==null?void 0:m.toLowerCase())!=null?h:"",c=d=>{r.hidden=d.length>0&&!a.includes(d.toLowerCase())};c(i.query.get());let u=i.query.addListener(c);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>w(o,"inherit"),height:o=>s(6+v(o)*2),paddingInline:o=>s(v(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),"&:hover:not([disabled])":{backgroundColor:o=>l(o,"shift-2",t)},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",n)}`,outlineOffset:`-${s(.5)}`}}}}var N=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),ke=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),to=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Ye=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),oo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,no=(e,t)=>ke(e,-((e.getDay()-t+7)%7));function ra(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 ia(e={}){var ao,lo,so,co;let{mode:t="single",time:n=!1,min:o,max:i,disabledDate:r,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:c,onChange:u}=e,m=(ao=e.weekStartsOn)!=null?ao:ra(a),h=g((lo=e.accentColor)!=null?lo:"primary","accentColor"),d=g((so=e.placement)!=null?so:"bottom-start"),p=g((co=e.value)!=null?co:t==="range"?[null,null]:null),b=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(N(f),"focused"),E=g(null,"hovered"),x=g(f.getHours(),"hour"),M=g(f.getMinutes(),"minute"),O=null,_=new Intl.DateTimeFormat(a,K({dateStyle:"medium"},n?{timeStyle:"short"}:{})),D=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),A=new Intl.DateTimeFormat(a,{weekday:"short"}),V=new Intl.DateTimeFormat(a,{dateStyle:"full"}),B=k=>k?_.format(k):"",de=k=>{if(c)return c(k);if(t==="range"){let[T,P]=k!=null?k:[null,null];return T?`${B(T)} \u2013 ${B(P)}`:""}return B(k)},Ee=Array.from({length:7},(k,T)=>A.format(new Date(2023,0,1+(T+m)%7))),le=k=>!!o&&N(k)<N(o)||!!i&&N(k)>N(i)||!!r&&r(k),H=k=>{if(!n)return N(k);let T=N(k);return T.setHours(x.get(),M.get(),0,0),T},re=k=>{var L;if(le(k))return;if(t==="single"){p.set(H(k)),n||xt();return}let[T,P]=(L=p.get())!=null?L:[null,null];!T||T&&P?p.set([H(k),null]):N(k)<N(T)?(p.set([H(k),H(T)]),n||xt()):(p.set([T,H(k)]),n||xt())},ie=()=>{var k;if(n)if(t==="single"){let T=p.get();T&&p.set(H(T))}else{let[T,P]=(k=p.get())!=null?k:[null,null];p.set([T&&H(T),P&&H(P)])}},Ae=(k,T)=>{var _e;if(t!=="range")return!1;let[P,L]=(_e=p.get(T))!=null?_e:[null,null],R=L!=null?L:E.get(T);if(!P||!R)return!1;let $=N(P)<=N(R)?P:R,U=N(P)<=N(R)?R:P,W=N(k);return W>=N($)&&W<=N(U)},fe=(k,T)=>{let P=p.get(T);if(t==="range"){let[L,R]=P!=null?P:[null,null];return Ye(k,L)||Ye(k,R)}return Ye(k,P)},F=k=>{y.set(k.getFullYear()),S.set(k.getMonth())},Y=k=>{let T=to(new Date(y.get(),S.get(),1),k);F(T)},G=k=>y.set(y.get()+k),Ve=()=>{setTimeout(()=>{var k;(k=O==null?void 0:O.querySelector(`[data-date="${oo(C.get())}"]`))==null||k.focus()},0)},In=Bn(),{show:Rn,hide:zn,anchorPartial:wt}=ne({kind:"datePicker",open:!1,placement:d,content:In});function xt(){zn()}wt.onClick=()=>{};let An={type:"text",readonly:!0,value:k=>de(p.get(k)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(k,T)=>{Ct(T)},onFocus:(k,T)=>{Ct(T)},onKeyDown:(k,T)=>{let P=k.key;(P==="ArrowDown"||P==="Enter")&&(k.preventDefault(),Ct(T))},_onMount:k=>b&&k.addHook("Remove",()=>{b()})};function Ct(k){var P;let T=(P=Vn())!=null?P:new Date;C.set(N(T)),F(T),Rn(k),Ve()}function Vn(){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(wt,An),wt;function Bn(){let k=($,U,W)=>({button:$,type:"button",ariaLabel:U,onClick:W,style:aa()}),T={div:[k("\xAB","Previous year",()=>G(-1)),k("\u2039","Previous month",()=>Y(-1)),{div:$=>D.format(new Date(y.get($),S.get($),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"600",fontSize:$=>w($)}},k("\u203A","Next month",()=>Y(1)),k("\xBB","Next year",()=>G(1))],style:{display:"flex",alignItems:"center",gap:s(1),marginBottom:s(2)}},P={div:Ee.map(($,U)=>({div:$,style:{textAlign:"center",fontSize:W=>w(W,"decrease-1"),fontWeight:"600",color:W=>l(W,"shift-7"),paddingBlock:s(1)},_key:U})),role:"row",style:_n()},L={div:$=>Nn($),role:"grid",ariaLabel:"Calendar",onKeyDown:Wn,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:s(.5)}},R=[T,P,L];return n&&R.push(jn()),R.push(Fn()),{div:R,role:"dialog",ariaModal:"false",_onMount:$=>{O=$.domElement},style:{minWidth:s(70),padding:s(3),borderRadius:s(2),backgroundColor:$=>l($,"base"),color:$=>l($,"shift-10"),border:$=>`1px solid ${l($,"shift-4")}`,boxShadow:"0 8px 24px rgba(0,0,0,0.18)"}}}function Nn(k){let T=new Date(y.get(k),S.get(k),1),P=S.get(k),L=no(T,m),R=[];for(let $=0;$<6;$++){let U=[];for(let W=0;W<7;W++){let _e=ke(L,$*7+W);U.push(Hn(_e,P,k))}R.push({div:U,role:"row",style:_n(),_key:$})}return R}function Hn(k,T,P){let L=le(k),R=fe(k,P),$=Ae(k,P),U=k.getMonth()!==T,W=Ye(k,C.get(P)),_e=Ye(k,new Date);return{button:String(k.getDate()),type:"button",role:"gridcell",tabIndex:W?0:-1,ariaSelected:R,ariaDisabled:L,disabled:L,ariaLabel:V.format(k),dataDate:oo(k),onClick:()=>re(k),onMouseEnter:()=>t==="range"&&E.set(k),style:{appearance:"none",border:"none",cursor:L?"not-allowed":"pointer",aspectRatio:"1",borderRadius:s(1),fontSize:z=>w(z),fontFamily:"inherit",opacity:L?.35:U?.5:1,backgroundColor:z=>R?l(z,"shift-7",h.get(z)):$?l(z,"shift-2",h.get(z)):"transparent",color:z=>R?l(z,"shift-0",h.get(z)):l(z,"shift-9"),outline:_e?z=>`1px solid ${l(z,"shift-6",h.get(z))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:z=>R?l(z,"shift-7",h.get(z)):l(z,"shift-3",h.get(z))},"&:focus-visible":{outline:z=>`2px solid ${l(z,"shift-6",h.get(z))}`}},_key:oo(k)}}function jn(){let k=(T,P,L)=>({select:Array.from({length:T},(R,$)=>({option:String($).padStart(2,"0"),value:String($),selected:U=>P.get(U)===$,_key:$})),ariaLabel:L,onChange:R=>{P.set(Number(R.target.value)),ie()},style:la()});return{div:[k(24,x,"Hour"),{span:":",style:{fontWeight:"600"}},k(60,M,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:s(1),marginTop:s(3)}}}function Fn(){let k=(T,P)=>({button:T,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:L=>w(L,"decrease-1"),color:L=>l(L,"shift-8",h.get(L)),padding:s(1)}});return{div:[k("Today",()=>{let T=new Date;C.set(N(T)),F(T),Ve()}),k("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:s(2),paddingTop:s(2),borderTop:T=>`1px solid ${l(T,"shift-3")}`}}}function Wn(k){let T=k,P=C.get(),L=null;switch(T.key){case"ArrowLeft":L=ke(P,-1);break;case"ArrowRight":L=ke(P,1);break;case"ArrowUp":L=ke(P,-7);break;case"ArrowDown":L=ke(P,7);break;case"Home":L=no(P,m);break;case"End":L=ke(no(P,m),6);break;case"PageUp":L=to(P,T.shiftKey?-12:-1);break;case"PageDown":L=to(P,T.shiftKey?12:1);break;case"Enter":case" ":T.preventDefault(),re(P);return;default:return}T.preventDefault(),C.set(L),F(L),Ve()}}function _n(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:s(.5)}}function aa(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>w(e),color:e=>l(e,"shift-8"),width:s(7),height:s(7),borderRadius:s(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function la(){return{fontFamily:"inherit",fontSize:e=>w(e),padding:s(1),borderRadius:s(1),border:e=>`1px solid ${l(e,"shift-4")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"shift-9")}}function sa(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(${s(24)}, max-content) 1fr`,columnGap:s(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>w(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}}function ca(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=>w(a,"inherit"),color:a=>l(a,"shift-9",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=>w(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:s(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>s(v(a)*4),height:s(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:s(2),height:s(2),flexShrink:0,marginTop:`-${s(.5)}`,borderInlineEnd:a=>`${s(.5)} solid ${l(a,"shift-9",n.get(a))}`,borderBottom:a=>`${s(.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=>s(v(a)*2),outlineOffset:`-${s(.5)}`,outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>s(v(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:s(250),opacity:1,paddingTop:a=>s(v(a)*1),paddingBottom:a=>s(v(a)*3)}}}}var Ge=0;function vt(){Ge++,Ge===1&&(document.body.style.overflow="hidden")}function Re(){Ge=Math.max(0,Ge-1),Ge===0&&(document.body.style.overflow="")}var Tn='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function ua(e={}){let{color:t="neutral",open:n=!1}=e,o=g(n),i=null,r=!1,a=!1,c=u=>{r=!1,u.close(),a&&(Re(),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,m)=>{if(u.target!==m.domElement)return;let h=m.domElement.getBoundingClientRect();u.clientX>=h.left&&u.clientX<=h.right&&u.clientY>=h.top&&u.clientY<=h.bottom||o.set(!1)},onTransitionEnd:(u,m)=>{r&&u.target===m.domElement&&u.propertyName==="opacity"&&c(m.domElement)},_onMount:u=>{let m=u.domElement;m.setAttribute("aria-modal","true");let h=null,d=y=>{if(y.key!=="Tab")return;let S=Array.from(m.querySelectorAll(Tn)).filter(x=>!x.closest("[aria-hidden='true']")&&x.offsetParent!==null);if(!S.length){y.preventDefault();return}let C=S[0],E=S[S.length-1];y.shiftKey?(document.activeElement===C||document.activeElement===m)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),C.focus())},p=y=>{y.preventDefault(),o.set(!1)};m.addEventListener("cancel",p);let b=y=>{y?(i=document.activeElement,m.showModal(),a||(vt(),a=!0),m.addEventListener("keydown",d),requestAnimationFrame(()=>{m.style.opacity="1";let S=m.querySelector(Tn);S==null||S.focus()})):(r=!0,m.style.opacity="0",m.removeEventListener("keydown",d),h=setTimeout(()=>{h=null,r&&c(m)},350))};b(o.get());let f=o.addListener(b);u.addHook("Remove",()=>{h&&(clearTimeout(h),h=null),f(),m.removeEventListener("cancel",p),a&&(Re(),a=!1),m.removeEventListener("keydown",d),i==null||i.focus(),i=null})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:u=>w(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",padding:u=>s(v(u)*3),boxShadow:u=>`0 ${s(9)} ${s(16)} ${l(u,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function ha(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:s(2),fontSize:o=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"shift-4",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var ro={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Mn={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Xe=e=>e==="left"||e==="right";function On(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function ma(e={}){let{color:t="neutral",open:n=!1,placement:o="end",size:i}=e,r=g(n),a=o==="start"||o==="end",c=On(o,!1),u=Xe(c)?s(80):s(64),m=i!=null?i:u;return{_onInsert:h=>{h.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(h,d)=>{h.target===d.domElement&&r.set(!1)},_onMount:h=>{let d=h.domElement;d.setAttribute("aria-modal","true");let p=_=>{_.preventDefault(),r.set(!1)};d.addEventListener("cancel",p);let b=a&&(d.ownerDocument.documentElement.dir==="rtl"||d.ownerDocument.dir==="rtl"),f=On(o,b);a&&(d.style.transform=ro[f],d.style.margin=Mn[f],d.style.width=Xe(f)?m:"100dvw",d.style.height=Xe(f)?"100dvh":m);let y=!1,S=!1,C=null,E=()=>{C=null,y&&(y=!1,d.close(),S&&(Re(),S=!1))},x=_=>{_.target===d&&_.propertyName==="transform"&&E()};d.addEventListener("transitionend",x);let M=_=>{_?(y=!1,d.showModal(),S||(vt(),S=!0),requestAnimationFrame(()=>{d.style.transform="translate(0, 0)"})):(y=!0,d.style.transform=ro[f],C=setTimeout(E,350))};M(r.get());let O=r.addListener(M);h.addHook("Remove",()=>{C&&(clearTimeout(C),C=null),O(),d.removeEventListener("cancel",p),d.removeEventListener("transitionend",x),S&&(Re(),S=!1)})},style:{transform:ro[c],transition:"transform 0.25s ease",fontSize:h=>w(h,"inherit"),color:h=>l(h,"shift-10",t),backgroundColor:h=>l(h,"inherit",t),border:"none",padding:h=>s(v(h)*3),margin:Mn[c],width:Xe(c)?m:"100dvw",height:Xe(c)?"100dvh":m,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:h=>`0 ${s(4)} ${s(12)} ${l(h,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:h=>l(h,"shift-2","neutral"),opacity:.75}}}}function da(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=>w(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function fa(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:s(3),paddingBlock:s(12),paddingInline:s(6),textAlign:"center",color:o=>l(o,"shift-6",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o))}}}}function pa(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 ga={small:8,medium:10,large:14};function ya(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),n=s(ga[(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=>w(r,"inherit"),backgroundColor:r=>l(r,"shift-9",t.get(r)),color:r=>l(r,"shift-0",t.get(r)),boxShadow:r=>`0 ${s(1)} ${s(4)} ${l(r,"shift-4","neutral")}`,transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:r=>l(r,"shift-10",t.get(r)),boxShadow:r=>`0 ${s(2)} ${s(6)} ${l(r,"shift-5","neutral")}`},"&:focus-visible":{outline:r=>`2px solid ${l(r,"shift-6",t.get(r))}`,outlineOffset:"2px"},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function ba(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:s(2),marginInline:0,marginTop:s(3),marginBottom:s(3),color:o=>l(o,"shift-9",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:s(2)},"& figcaption":{fontSize:o=>w(o,"decrease-1"),color:o=>l(o,"shift-8",t.get(o)),lineHeight:1.45}}}}function va(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=>s(v(r)*3),paddingBlock:r=>s(v(r)*3),border:"none",borderRadius:r=>s(v(r)*2),fontSize:r=>w(r,"inherit"),backgroundColor:r=>l(r,"inherit",n.get(r)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:s(4),rowGap:s(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:r=>w(r,"inherit"),fontWeight:600,paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*2),color:r=>l(r,"shift-9",n.get(r)),backgroundColor:r=>l(r,"inherit",n.get(r))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:r=>o?0:s(v(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(${s(2)} * -1)`,fontSize:r=>w(r,"decrease-1"),color:r=>l(r,"shift-9",n.get(r))}}}}var Sa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function wa(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:s(2),fontSize:o=>{let i=Sa[o.elementNode.tagName]||"inherit";return w(o,i)}}}}function xa(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:s(3),marginBottom:s(3),backgroundColor:o=>l(o,"shift-4",t.get(o))}}}function Ca(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:s(4),height:s(4),flexShrink:"0",fontSize:o=>w(o),backgroundColor:"transparent",color:o=>l(o,"shift-9",t.get(o))}}}function ka(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:s(2),backgroundColor:o=>l(o,"inherit",t.get(o))}}}function Ea(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=>w(r,"inherit"),display:"inline-flex",position:"relative",width:s(6),height:s(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:s(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:r=>l(r,"shift-2",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=>`${s(.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:s(1.5),outline:r=>`${s(.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=>w(t,"inherit"),paddingBlock:t=>s(v(t)*1),paddingInline:t=>s(v(t)*1),blockSize:t=>s(6+v(t)*2),inlineSize:t=>s(6+v(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>s(v(t)*1)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>l(t,"shift-2","neutral"),outline:t=>`1px solid ${l(t,"shift-4","neutral")}`}}}}function Ta(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,c)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),c.type=t},style:{fontFamily:"inherit",fontSize:a=>w(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"shift-9",n.get(a)),backgroundColor:a=>l(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",n.get(a))}`,borderRadius:a=>s(v(a)*1),paddingInline:a=>s(v(a)*3),height:a=>s(6+v(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",o.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-6","error")}`}}}}function Ma(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=>w(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,borderRadius:r=>s(v(r)*1),height:r=>s(6+v(r)*2),paddingInline:r=>s(v(r)*1),"&::-webkit-file-upload-button":{marginTop:r=>s(v(r)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:s(1),height:s(6),paddingInline:s(2),cursor:"pointer",color:r=>l(r,"shift-11",t.get(r)),backgroundColor:r=>l(r,"shift-1",t.get(r))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,backgroundColor:r=>l(r,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),backgroundColor:r=>l(r,"shift-3","neutral")}}}}function Oa(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:s(10),paddingInlineStart:r=>s(v(r)*3),paddingInlineEnd:r=>s(v(r)*1.5),paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*1),fontSize:r=>w(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,color:r=>l(r,"shift-8","neutral")}}}}var Pa='<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>',Da='<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 La(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 c={input:null,type:m=>o.get(m)?"text":"password",style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",padding:0,margin:0,font:"inherit",color:"inherit"}},u={button:m=>o.get(m)?Da:Pa,type:"button",ariaLabel:m=>o.get(m)?"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(c),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>s(v(a)*1),paddingBlock:a=>s(v(a)*1),paddingInline:a=>s(v(a)*3),borderRadius:a=>s(v(a)*1),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",t.get(a))}`,color:a=>l(a,"shift-9",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>w(a,"inherit"),"&:focus-within":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",n.get(a))}`}}}}function $a(){return{style:{display:"flex",alignItems:"center",gap:s(2),"& > *":{minWidth:`${s(9)}!important`}},_onMount:e=>{let t=e.domElement,n=()=>Array.from(t.querySelectorAll("input")),o=a=>{let c=n(),u=a.target,m=c.indexOf(u);u.value&&m<c.length-1&&c[m+1].focus()},i=a=>{let c=n(),u=a.target,m=c.indexOf(u);a.key==="Backspace"&&!u.value&&m>0&&c[m-1].focus(),a.key==="ArrowLeft"&&m>0&&c[m-1].focus(),a.key==="ArrowRight"&&m<c.length-1&&c[m+1].focus()},r=a=>{var p,b,f;a.preventDefault();let c=(b=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?b:"",u=n(),m=u.indexOf(a.target),h=m===-1?0:m;[...c].forEach((y,S)=>{u[h+S]&&(u[h+S].value=y)});let d=Math.min(h+c.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 Ia(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=>w(r,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:s(6),height:s(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,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),width:s(4),height:s(4)},"&:hover::before":{backgroundColor:r=>l(r,"shift-2",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=>`${s(.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 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:"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:s(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:s(1.5),borderRadius:s(999),backgroundColor:r=>l(r,"shift-3",t.get(r))},"&::-webkit-slider-thumb":{appearance:"none",width:s(4),height:s(4),borderRadius:s(999),border:"none",marginTop:`calc((${s(1.5)} - ${s(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=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`,outlineOffset:s(1),borderRadius:s(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}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:"search",_onSchedule:(r,a)=>{r.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:r=>w(r,"inherit"),lineHeight:"inherit",color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,borderRadius:r=>s(v(r)*1),minWidth:s(32),paddingInline:r=>s(v(r)*3),paddingBlock:r=>s(v(r)*1),"&::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]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral"),backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`}}}}function Aa(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=>w(o,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:s(9),height:s(6),cursor:"pointer",margin:"0",paddingBlock:s(1),"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${s(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:s(3),height:s(3),borderRadius:s(999),left:s(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:s(999),display:"inline-block",fontSize:o=>w(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Va(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:s(10),paddingInline:r=>s(v(r)*3),paddingBlock:r=>s(v(r)*1),borderRadius:r=>s(v(r)*1),fontSize:r=>w(r,"inherit"),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${l(r,"shift-4",t.get(r))}`,color:r=>l(r,"shift-9",t.get(r)),backgroundColor:r=>l(r,"inherit",t.get(r)),"&::placeholder":{color:r=>l(r,"shift-7")},"&:not(:placeholder-shown)":{color:r=>l(r,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:r=>l(r,"shift-2","neutral"),outline:r=>`1px solid ${l(r,"shift-4","neutral")}`,color:r=>l(r,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=error]":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","error")}`},"&[data-status=warning]":{outline:r=>`${s(.5)} solid ${l(r,"shift-6","warning")}`}}}}function Ba(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:s(.5),paddingInline:s(1.5),borderRadius:s(1),outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`}}}function Na(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:s(2),fontSize:r=>w(r,"inherit"),color:r=>l(r,"shift-9",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,"shift-8","neutral")}}}}function Ha(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=>w(r,"inherit"),backgroundColor:r=>l(r),color:r=>l(r,"shift-9",t.get(r)),textDecoration:"none","&:visited":{color:r=>l(r,"shift-9",n.get(r))},"&:hover:not([disabled])":{color:r=>l(r,"shift-10",t.get(r)),textDecoration:"underline"},"&:focus-visible":{borderRadius:s(1),outlineOffset:s(1),outline:r=>`${s(.5)} solid ${l(r,"shift-6",n.get(r))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:r=>l(r,"shift-8","neutral")}}}}function ja(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=>w(o,"inherit"),textDecoration:"none",paddingBlock:o=>s(v(o)*1),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*1),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:o=>s(v(o)*1),userSelect:"none",cursor:"pointer",outlineOffset:"-1px",outlineWidth:"1px",outline:o=>`1px solid ${l(o,"shift-4",t.get(o))}`,color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),"&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"shift-2",t.get(o))},"&:focus-visible":{boxShadow:o=>`inset 0 0 0 ${s(.5)} ${l(o,"shift-6",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,"shift-4","neutral")}`,color:o=>l(o,"shift-8","neutral")}}}}function Fa(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Wa(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:n=>s(v(n)*2),paddingBlock:n=>s(t?1:v(n)*2),paddingInline:n=>s(v(n)*3),fontSize:n=>w(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=>s(v(a)*2),paddingBlock:a=>s(o?1:v(a)*2),paddingInline:a=>s(v(a)*3),fontSize:a=>w(a,"inherit"),color:a=>l(a,"shift-9",t.get(a)),borderRadius:a=>s(v(a)*1),transition:"background-color 150ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"shift-2",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 Ua(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:s(6),borderRadius:s(1),paddingInline:s(1.5)}}}function Ka(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:(c,u)=>{if(t.length===0)return;let m=c.nodeId,h=t.map((d,p)=>{var f;let b=(f=d.key)!=null?f:p;return Te(K({button:typeof d.label=="string"?[{span:d.label}]:[d.label],_key:b,type:"button",id:`menuitem${m}${b}`,role:"menuitem"},n?{ariaCurrent:y=>r.get(y)===b||void 0}:{}),{onClick:()=>{var y;n&&r.set(b),(y=d.onClick)==null||y.call(d)},onKeyDown:y=>{var M;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((O,_)=>{var D;return(D=O.key)!=null?D:_}),E=C.indexOf(b),x=E;S==="ArrowDown"?x=(E+1)%C.length:S==="ArrowUp"?x=(E-1+C.length)%C.length:S==="Home"?x=0:S==="End"&&(x=C.length-1),(M=document.getElementById(`menuitem${m}${C[x]}`))==null||M.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:s(2),width:"100%",fontSize:y=>w(y,"inherit"),height:y=>s(6+v(y)*2),paddingInline:y=>s(v(y)*3),border:"none",outline:"none",color:y=>l(y,"shift-9",o),backgroundColor:y=>l(y,"inherit",o),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"shift-2",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-10")},"&:focus-visible":{outline:y=>`${s(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${s(.5)}`}}})});u[c.tagName]=h},style:{display:"flex",flexDirection:"column",paddingBlock:c=>s(v(c)*2),paddingInline:c=>s(v(c)*2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",o)}}}var Pn=e=>!!e&&typeof e.get=="function"&&e._isState===!0,ze=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 Ya(e={}){var a,c,u,m;let{initial:t,animate:n,exit:o,transition:i={}}=e,r={duration:(a=i.duration)!=null?a:300,delay:(c=i.delay)!=null?c:0,easing:(u=i.easing)!=null?u:"ease",iterations:(m=i.iterations)!=null?m:1,fill:"both"};return{_onMount:h=>{let d=h.domElement;if(!d||typeof d.animate!="function")return;let p=Pn(n)?n.get():n;if(p?d.animate(t?[ze(t),ze(p)]:[ze(p)],r):t&&Object.assign(d.style,ze(t)),Pn(n)){let b=n.addListener(f=>{d.animate([ze(f)],r)});h.setMetadata("motionRelease",b)}},_onBeforeRemove:(h,d)=>{let p=h.domElement;if(!p||!o||typeof p.animate!="function")return d();p.animate([ze(o)],r).finished.then(d,d)},_onRemove:h=>{let d=h.getMetadata("motionRelease");d==null||d()}}}function Ga(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=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"decimal",listStylePosition:"outside"}}}function Xa(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 Ja(e){var c;let{total:t,color:n="neutral",accentColor:o="primary"}=e,i=g((c=e.value)!=null?c:1),r={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>s(6+v(u)*2),height:u=>s(6+v(u)*2),paddingInline:u=>s(v(u)*2),borderRadius:u=>s(v(u)*1),border:"none",cursor:"pointer",fontSize:u=>w(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Te(K({},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 m={div:h=>{let d=i.get(h),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 b=0;for(let f of Xa(d,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${b++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>s(v(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:s(1)}};u.children.insert(m)},style:{display:"inline-flex"}}}function Za(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function Qa(e){var p;let{open:t=!1,placement:n="bottom",openOn:o="click"}=e,i=null,r=g(t),a=g(n),{show:c,hide:u,anchorPartial:m}=ne({kind:"popover",open:r,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),h={role:"dialog",dataTone:"shift-14",style:{backgroundColor:b=>l(b,"inherit")},_onInsert:b=>{let f=b.attributes.get("id");i=f||b.nodeId,!f&&b.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(h),I(m,{ariaHaspopup:"dialog",ariaExpanded:b=>r.get(b),onMouseEnter:(b,f)=>o==="hover"&&c(f),onMouseLeave:(b,f)=>o==="hover"&&u(f),onClick:(b,f)=>{o==="click"&&(r.get()?u(f):c(f))},onKeyDown:(b,f)=>{b.key==="Escape"&&r.get()&&u(f)},onFocus:(b,f)=>o==="hover"&&c(f),onBlur:(b,f)=>{let y=b.relatedTarget,S=f.getRoot().domElement,C=i?S.querySelector(`#${CSS.escape(i)}`):null;y&&(C!=null&&C.contains(y))||u(f)},_onMount:b=>i&&b.attributes.set("ariaControls",i)}),m}function io(e={}){let{placement:t="bottom-end",color:n="neutral",sideOffset:o=s(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"},c=h=>{var d;return(d=a[r.get(h)])!=null?d:a["bottom-end"]},u=h=>h.includes("start")?o:h.includes("end")?"auto":"50%",m=h=>h.includes("end")?o:h.includes("start")?"auto":"50%";return{style:{fontSize:h=>w(h),backgroundColor:h=>l(h),color:h=>l(h,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:s(1.5),height:s(1.5),backgroundColor:h=>l(h,"inherit",n),borderWidth:i?"1px":0,borderColor:h=>l(h,"inherit",n),borderTopStyle:h=>{let d=c(h);return d.includes("top")||d.includes("right")?"solid":"none"},borderBottomStyle:h=>{let d=c(h);return d.includes("bottom")||d.includes("left")?"solid":"none"},borderLeftStyle:h=>{let d=c(h);return d.includes("top")||d.includes("left")?"solid":"none"},borderRightStyle:h=>{let d=c(h);return d.includes("bottom")||d.includes("right")?"solid":"none"},top:h=>{let d=c(h);return d.includes("top")?0:d.includes("bottom")?"auto":u(d)},right:h=>{let d=c(h);return d.includes("right")?0:d.includes("left")?"auto":m(d)},bottom:h=>{let d=c(h);return d.includes("bottom")?0:d.includes("top")?"auto":m(d)},left:h=>{let d=c(h);return d.includes("left")?0:d.includes("right")?"auto":u(d)},transform:h=>{let d=c(h),p=d.includes("right")||d.includes("end")&&!d.includes("left")?"50%":"-50%",b=d.includes("bottom")||d.includes("end")&&!d.includes("top")?"50%":"-50%";return`translate(${p},${b}) rotate(45deg)`}}}}}function el(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>s(v(o)*2),paddingInline:o=>s(v(o)*3),borderRadius:o=>s(v(o)*2)}}}function tl(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:s(2),border:0,borderRadius:s(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:s(999)},"&::-webkit-progress-value":{backgroundColor:r=>l(r,"shift-9",n.get(r)),borderRadius:s(999),transition:"width 220ms ease"}}}}var ol='<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>',nl='<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 rl(e={}){var u,m;let{max:t=5,readOnly:n=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",r=g((m=e.value)!=null?m:0),a=g(0),c=h=>{let d=a.get(h);return d>0?d:r.get(h)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:s(.5),fontSize:"1.5rem",cursor:n?"default":"pointer",color:h=>l(h,"shift-8",i)},_onInit:h=>{for(let d=1;d<=t;d++){let p=d,b=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 x,M;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;(M=(x=h.domElement)==null?void 0:x.children[E])==null||M.focus()}},f=Te(K({button:y=>p<=c(y)?ol:nl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},b),{style:{background:"none",border:"none",padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center"}});h.children.insert(f)}}}}function il(e={}){var u,m,h;let{size:t=16,thickness:n=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((m=e.color)!=null?m:"primary","color"),r=g((h=e.trackColor)!=null?h:"neutral","trackColor"),a=Math.round((1-n)*100),c=`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:s(t),height:s(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:c,mask:c}}}function al(e={}){var n;let t=g((n=e.color)!=null?n:"neutral","color");return{style:{overflow:"auto","&::-webkit-scrollbar":{width:s(2),height:s(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:s(999),border:`${s(.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 ll(e={items:[]}){var r,a,c;let{items:t=[],color:n="neutral",accentColor:o="primary"}=e,i=g((c=(a=e.value)!=null?a:(r=t[0])==null?void 0:r.key)!=null?c:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,m)=>{let h=t.map((d,p)=>{var y;let b=(y=d.key)!=null?y:String(p);return{button:[typeof d.label=="string"?{span:d.label}:d.label],_key:b,type:"button",role:"radio",ariaChecked:S=>i.get(S)===b,onClick:()=>i.set(b),style:{cursor:"pointer",fontSize:S=>w(S,"inherit"),height:s(6),paddingBlock:s(1),paddingInline:s(3),border:"none",borderRadius:s(10),color:S=>l(S,"shift-9",n),backgroundColor:"transparent",transition:"background-color 300ms 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":{outline:S=>`${s(.5)} solid ${l(S,"shift-6",o)}`,outlineOffset:`-${s(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});m[u.tagName]=h},style:{display:"inline-flex",paddingBlock:s(1),paddingInline:s(1),gap:s(.5),borderRadius:s(10),backgroundColor:u=>l(u,"shift-2",n)}}}function sl(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=>w(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"shift-9",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"shift-4",t)}`,borderRadius:o=>s(v(o)*1),paddingBlock:o=>s(v(o)*1),paddingLeft:o=>s(v(o)*3),paddingRight:o=>s(v(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="${Kt(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 ${s(2)} center`,backgroundSize:`${s(2.5)} ${s(1.5)}`,"&:not([multiple])":{height:o=>s(6+v(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`${s(.5)} solid ${l(o,"shift-5",n)}`},"&:focus-visible":{outline:o=>`${s(.5)} solid ${l(o,"shift-6",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,"shift-8","neutral"),outline:o=>`1px solid ${l(o,"shift-4","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function cl(e){let{options:t=[],placement:n="bottom",color:o="neutral",open:i=!1,multiple:r=!1}=e,a=g(e.value),c=g(i),{show:u,hide:m,anchorPartial:h}=ne({kind:"selectBox",open:c,placement:g(n),content:e.content}),d={onClick:(f,y)=>!r&&m(y)};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,$:[Ke({color:o,removable:r})],_key:E.value,_onRemove:x=>{let M=a.get(),_=(Array.isArray(M)?M:[M]).filter(D=>D!==E.value);r?a.set(_):a.set(_[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:s(1),flex:1}},b={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>c.get()?m(y):u(y),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>s(6+v(f)*2),minWidth:s(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"shift-4","neutral")}`,paddingInline:f=>s(v(f)*2),borderRadius:f=>s(v(f)*1),fontSize:f=>w(f,"inherit"),color:f=>l(f,"shift-9",o),backgroundColor:f=>l(f,"inherit",o)}};return I(h,b),h}function ul(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 c=a.value;r.attributes.set("ariaSelected",u=>{let m=c.get(u);return a.multiple?m.includes(o):m===o}),r.addEvent("click",()=>{let u=c.get();a.multiple?u.includes(o)?c.set(u.filter(m=>m!==o)):c.set(u.concat([o])):u!==o&&c.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:r=>w(r,"inherit"),height:r=>s(6+v(r)*2),paddingInline:r=>s(v(r)*3),border:"none",outline:"none",color:r=>l(r,"shift-9",n),backgroundColor:r=>l(r,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:r=>l(r,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:r=>l(r,"shift-6",t),color:r=>l(r,"shift-11")},"&:focus-visible":{outline:r=>`${s(.5)} solid ${l(r,"shift-6",t)}`,outlineOffset:`-${s(.5)}`}}}}function hl(e={}){var a;let{color:t="neutral",multiple:n=!1}=e,o=g((a=e.value)!=null?a:n?[]:null),i={div:c=>{let u=o.get(c);return(Array.isArray(u)?u:[u]).map(h=>({input:null,name:e.name,value:h==null?"":String(h)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:n}},_onInit:c=>{c.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),c.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:c=>s(v(c)*2),paddingInline:c=>s(v(c)*2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",t)}}}function ml(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},o=Pe(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:r=>w(r),color:r=>l(r,"shift-9",t.get(r)),height:s(6),display:"block",borderRadius:s(1),backgroundColor:r=>l(r,"inherit",t.get(r)),animation:`${o} 1.5s ease-in-out infinite`,[`@keyframes ${o}`]:n}}}function dl(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o))}}}var Ln={to:{transform:"rotate(360deg)"}},Dn=Pe(JSON.stringify(Ln));function fl(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=>w(o),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:s(6),height:s(6),borderRadius:"50%",border:o=>`${s(.5)} solid ${l(o,"shift-4",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Dn} 0.7s linear infinite`,[`@keyframes ${Dn}`]:Ln}}}function pl(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 gl(){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=c=>{n.style[o]=`${i?c:100-c}%`};r(t.size.get()),n.style.flexShrink="0",n.style.overflow="auto";let a=t.size.addListener(r);e.addHook("Remove",a)}}}function yl(){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 m=u.shiftKey?10:1,h=null;o?u.key==="ArrowRight"?h=Math.min(t.size.get()+m,t.max):u.key==="ArrowLeft"&&(h=Math.max(t.size.get()-m,t.min)):u.key==="ArrowDown"?h=Math.min(t.size.get()+m,t.max):u.key==="ArrowUp"&&(h=Math.max(t.size.get()-m,t.min)),u.key==="Home"?h=t.min:u.key==="End"&&(h=t.max),h!==null&&(u.preventDefault(),t.size.set(h))},a=null,c=u=>{u.preventDefault();let m=n.parentElement,h=p=>{let b=m.getBoundingClientRect(),f=o?(p.clientX-b.left)/b.width*100:(p.clientY-b.top)/b.height*100;t.size.set(Math.min(Math.max(f,t.min),t.max))},d=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",d),a=null};a=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",d),a=null},document.addEventListener("mousemove",h),document.addEventListener("mouseup",d)};n.addEventListener("keydown",r),n.addEventListener("mousedown",c),e.addHook("Remove",()=>{a==null||a(),i(),n.removeEventListener("keydown",r),n.removeEventListener("mousedown",c)})},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:s(1),height:s(1),borderRadius:s(999),backgroundColor:e=>l(e,"shift-4")}}}}function bl(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:(c,u)=>{let m=t.map((h,d)=>{var b;return{li:[typeof h.label=="string"?{span:h.label}:h.label],_key:(b=h.key)!=null?b: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:s(1),flex:"1",fontSize:f=>w(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:s(6),height:s(6),borderRadius:s(999),fontSize:f=>w(f,"decrease-1"),fontWeight:"600",flexShrink:"0",border:f=>`2px solid ${l(f,"shift-4",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"shift-8"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:s(3),right:`calc(50% + ${s(3)})`,left:`calc(-50% + ${s(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,"shift-3",o),color:f=>l(f,"shift-9",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,"shift-8")}}}});u[c.tagName]=m},style:{display:"flex",flexDirection:n==="vertical"?"column":"row",alignItems:n==="vertical"?"flex-start":"center",gap:s(2),listStyle:"none",margin:"0",padding:"0"}}}function vl(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=>w(o,"inherit"),fontWeight:700,color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Sl(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=>w(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function wl(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=>w(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"shift-9",t.get(o))}}}function xl(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=>w(o,"inherit"),color:o=>l(o,"shift-9",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(o)*1),color:o=>l(o,"shift-9",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>w(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>s(v(o)*3),paddingBlock:o=>s(v(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,"shift-2")}}}}function Cl(e={items:[]}){var r,a,c;let{items:t=[],accentColor:n="primary",color:o="neutral"}=e,i=g((c=(a=e.activeKey)!=null?a:(r=t[0])==null?void 0:r.key)!=null?c:0);return{_onSchedule:(u,m)=>{let h=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${h}${S}`,ariaControls:`panel${h}${S}`,ariaSelected:x=>i.get(x)===S,onClick:()=>i.set(S),onKeyDown:x=>{let M=x.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(M))return;x.preventDefault();let O=t.map((A,V)=>{var B;return(B=A.key)!=null?B:V}),_=O.indexOf(S),D=_;M==="ArrowRight"?D=(_+1)%O.length:M==="ArrowLeft"?D=(_-1+O.length)%O.length:M==="Home"?D=0:M==="End"&&(D=O.length-1),i.set(O[D])},style:{cursor:"pointer",fontSize:x=>w(x,"inherit"),height:x=>s(6+v(x)*2),paddingInline:x=>s(v(x)*4),border:"none",outline:"none",color:x=>l(x,"shift-9"),backgroundColor:x=>l(x,"inherit"),boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-1",o)}`,"&:hover:not([disabled])":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-6",n)}`},"&:focus-visible":{boxShadow:x=>`inset 0 -${s(.5)} 0 0 ${l(x,"shift-6",n)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},b=t.map((f,y)=>{var C;let S=(C=f.key)!=null?C:y;return{div:[f.content],_key:S,role:"tabpanel",id:`panel${h}${S}`,ariaLabelledby:`tab${h}${S}`,hidden:E=>i.get(E)!==S,style:{paddingBlock:E=>s(v(E)*2),paddingInline:E=>s(v(E)*2)}}});m[u.tagName]=[p,...b]}}}function kl(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 c=a.domElement;c.style.overflow="hidden";let u=()=>{c.style.height="auto",c.style.height=`${c.scrollHeight}px`};c.addEventListener("input",u),u(),a.addHook("Remove",()=>c.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>s(v(a)*2),paddingBlock:a=>s(v(a)*1.5),border:"none",borderRadius:a=>s(v(a)*1.5),fontSize:a=>w(a,"inherit"),color:a=>l(a,"shift-9",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"shift-4",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),"&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${s(.5)} solid ${l(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${s(.5)} solid ${l(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${s(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"shift-8","neutral"),outline:a=>`1px solid ${l(a,"shift-4","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function El(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function _l(e={}){var r,a,c;let{last:t=!1}=e,n=(r=e.color)!=null?r:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((c=e.active)!=null?c:!1);return{style:K({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>s(v(u)*2),paddingBottom:u=>t?"0":s(v(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=>`-${s(v(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",n)}})}}function Tl(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"),c={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:r?"center":a?"end":"start",inset:0,gap:s(4),zIndex:30,padding:s(6),pointerEvents:"none"}};return{_portal:u=>{let m=u.domElement.querySelector(`#domphy-toast-${t}`);return m||(m=u.children.insert(c).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:s(32),pointerEvents:"auto",paddingBlock:u=>s(v(u)*2),paddingInline:u=>s(v(u)*4),borderRadius:u=>s(v(u)*2),fontSize:u=>w(u,"inherit"),color:u=>l(u,"shift-9",n),backgroundColor:u=>l(u,"inherit",n),boxShadow:u=>`0 ${s(2)} ${s(9)} ${l(u,"shift-4","neutral")}`,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,m)=>{let h=!1,d=null,p=()=>{h||(h=!0,d&&(clearTimeout(d),d=null),u.domElement.removeEventListener("transitionend",b),m())},b=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",b),d=setTimeout(p,350),u.addHook("Remove",()=>{var f;d&&(clearTimeout(d),d=null),(f=u.domElement)==null||f.removeEventListener("transitionend",b)}),o.set(!1)}}}function Ml(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:(c,u)=>{let m=t.map((h,d)=>{var f;let p=(f=h.key)!=null?f:String(d);return{button:[typeof h.label=="string"?{span:h.label}:h.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=>w(y,"inherit"),height:s(6),paddingBlock:s(1),paddingInline:s(2),border:"none",borderRadius:s(1),color:y=>l(y,"shift-9",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:y=>l(y,"shift-2",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-12",i)},"&:focus-visible":{outline:y=>`${s(.5)} solid ${l(y,"shift-6",i)}`,outlineOffset:`-${s(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[c.tagName]=m},style:{display:"flex",paddingBlock:s(1),paddingInline:s(1),gap:s(1),borderRadius:s(2),fontSize:c=>w(c,"inherit"),backgroundColor:c=>l(c,"inherit",o),outline:c=>`1px solid ${l(c,"shift-3",o)}`,outlineOffset:"-1px"}}}function Ol(e={}){var n;let t=(n=e.gap)!=null?n:4;return{style:{display:"flex",alignItems:"center",gap:o=>s(v(o)*t)}}}function Pl(){return{div:null,style:{flex:"1 1 0"}}}function Dl(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)}`,c={span:b=>r.get(b),id:a},{show:u,hide:m,anchorPartial:h}=ne({kind:"tooltip",open:t,placement:i,content:c}),d={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:b=>s(v(b)*1),paddingInline:b=>s(v(b)*3),borderRadius:b=>s(v(b)*1),color:b=>l(b,"shift-9"),backgroundColor:b=>l(b),fontSize:b=>w(b,"inherit")},$:[io({placement:i,bordered:!1})]};return c.$||(c.$=[]),c.$.push(d),I(h,{ariaDescribedby:a,onMouseEnter:(b,f)=>u(f),onMouseLeave:(b,f)=>m(f),onFocus:(b,f)=>u(f),onBlur:(b,f)=>m(f),onKeyDown:(b,f)=>b.key==="Escape"&&m(f)}),h}function $n(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Ll(e={}){let{duration:t=300,delay:n=0}=e,o=new Map,i=new Map,r=new Set,a=new Set;return{_onMount:c=>{c.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:c=>{o=new Map,c.children.items.forEach((u,m)=>{if(!(u instanceof j))return;let h=u.domElement;h&&o.set($n(u,m),h.getBoundingClientRect())})},_onUpdate:c=>{c.children.items.forEach((u,m)=>{var O;if(!(u instanceof j))return;let h=u.domElement;if(!h)return;let d=$n(u,m),p=o.get(d);if(!p)return;let b=h.getBoundingClientRect(),f=p.left-b.left,y=p.top-b.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(O=i.get(h))==null||O(),h.style.transition="none",h.style.transform=`translate(${f}px, ${y}px)`,h.getBoundingClientRect();let S=requestAnimationFrame(()=>{a.delete(S),h.style.transition=`transform ${t}ms ease ${n}ms`,h.style.transform="translate(0px, 0px)"});a.add(S);let C=!1,E=null,x=()=>{C||(C=!0,E&&(r.delete(E),E=null),i.delete(h),h.removeEventListener("transitionend",M),h.style.transition="",h.style.transform="")},M=_=>{_.propertyName==="transform"&&x()};i.set(h,()=>{C=!0,E&&(clearTimeout(E),r.delete(E),E=null),i.delete(h),h.removeEventListener("transitionend",M)}),h.addEventListener("transitionend",M),E=setTimeout(x,t+n+34),r.add(E)}),o.clear()}}}function $l(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=>w(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"shift-9",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:s(3),listStyleType:"disc",listStylePosition:"outside"}}}return Jn(Il);})();
6
6
  //# sourceMappingURL=core-theme-ui.global.js.map