@domphy/ui 0.20.8 → 0.20.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/core-theme-ui.global.js +4 -4
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var Domphy=(()=>{var et=Object.defineProperty,Xr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptor,Qr=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertyNames,bo=Object.getOwnPropertySymbols;var So=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable;var vo=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))So.call(t,r)&&vo(e,r,t[r]);if(bo)for(var r of bo(t))tn.call(t,r)&&vo(e,r,t[r]);return e},te=(e,t)=>Xr(e,Qr(t));var tt=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0})},on=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of en(t))!So.call(e,i)&&i!==r&&et(e,i,{get:()=>t[i],enumerable:!(o=Jr(t,i))||o.enumerable});return e};var rn=e=>on(et({},"__esModule",{value:!0}),e);var Kl={};tt(Kl,{core:()=>nt,theme:()=>ct,ui:()=>kt});var nt={};tt(nt,{AttributeList:()=>No,BooleanAttributes:()=>zt,CamelAttributes:()=>_o,ElementList:()=>jo,ElementNode:()=>U,HtmlAttributeNames:()=>Tt,HtmlTags:()=>At,Notifier:()=>We,PrefixCSS:()=>ve,RecordState:()=>Rn,State:()=>Dt,SvgTags:()=>To,VoidTags:()=>Mo,_microtask:()=>Bt,_resetKeylessWarnings:()=>kn,batch:()=>On,behavior:()=>Nt,computed:()=>Mn,configure:()=>sn,effect:()=>Uo,effectScope:()=>Tn,flushPendingNotifiers:()=>Io,flushSync:()=>Cn,hasPendingNotifiers:()=>Ro,hashString:()=>Re,isState:()=>dn,merge:()=>z,nextTick:()=>Ln,readonly:()=>fn,runBatched:()=>Lo,toState:()=>g,untrack:()=>Dn,watch:()=>Pn});var nn=Object.defineProperty,xo=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,wo=(e,t,r)=>t in e?nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ko=(e,t)=>{for(var r in t||(t={}))an.call(t,r)&&wo(e,r,t[r]);if(xo)for(var r of xo(t))ln.call(t,r)&&wo(e,r,t[r]);return e},zt=["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"],_o=["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"],Tt={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"},At=["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"],ve={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"]},To=["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"],Mo=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],Oo={};function sn(e){Object.assign(Oo,e)}function cn(){return Oo}var mn=["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"],un=mn.reduce((e,t)=>{let r=t.slice(2).toLowerCase();return e[r]=t,e},{}),Do=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=r=>{this._releases.add(r)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},je=[],Mt=0;function Vt(){return Mt>0?null:je.length?je[je.length-1]:null}function Po(e,t){je.push(e);try{return t()}finally{je.pop()}}function hn(e){Mt++;try{return e()}finally{Mt--}}var oe=[],Bt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},Co=100,rt=0,Ot=new Set,Le=new Set;function Lo(e){rt++;try{return e()}finally{if(rt--,rt===0){let t=Ot;Ot=new Set;for(let r of t)r._scheduleFlush()}}}var We=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 r=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(r)),r}removeListener(e,t){if(!this._listeners)return;let r=this._listeners[e];r&&r.has(t)&&(r.delete(t),r.size===0&&delete this._listeners[e])}listenerCount(e){var t,r,o;return(o=(r=(t=this._listeners)==null?void 0:t[e])==null?void 0:r.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let r=oe.length?oe[oe.length-1]:null;if(r&&r[0]===this&&r[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=Co){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${Co} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...oe]})}rt>0?Ot.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Le.add(this),Bt(()=>this._flushAll()))}_isCircular(e){let t=oe.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let r=[...oe.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
|
|
2
|
-
${r.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Le.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:r,chain:o}]of e)oe=o,this._flush(t,r);oe=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let r=this._listeners[e];if(r){oe.push([this,e]),this._flushing.set(e,t);for(let o of[...r])if(r.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),oe.pop()}}};function Ro(){return Le.size>0}function Io(){let e=0;for(;Le.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Le];Le.clear();for(let r of t)r._flushAll()}}var Dt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new We,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Vt();t&&this.addListener(t.handler)}return this._value}set(e){this._notifier&&(this._value=e,this._notifier.notify(this.name,e))}reset(){this.set(this.initialValue)}addListener(e){return this._notifier?this._notifier.addListener(this.name,e):()=>{}}removeListener(e){this._notifier&&this._notifier.removeListener(this.name,e)}_dispose(){this._notifier&&(this._notifier._dispose(),this._notifier=null)}};function z(e={},t={}){let r=["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=de(t));for(let n in t){let a=t[n];if(a!=null)if(typeof a=="object"&&!Array.isArray(a))typeof e[n]=="object"?e[n]=z(e[n],a):e[n]=a;else if(r.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(", ")}}else e[n]=[e[n],a].filter(s=>s).join(", ");else if(i.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join("")}}else e[n]=[e[n],a].filter(s=>s).join("");else if(o.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(" ")}}else e[n]=[e[n],a].filter(s=>s).join(" ");else if(n.startsWith("on")){let s=n.replace("on","").toLowerCase();gn(e,s,a)}else if(n.startsWith("_on")){let s=n.replace("_on","");pn(e,s,a)}else e[n]=a}return e}function Re(e=""){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function g(e,t){return e instanceof Dt||e!=null&&e._isState?e:new Dt(e,t)}function dn(e){return typeof e=="object"&&e!==null&&e._isState===!0}function fn(e){return{_isState:!0,get(t){return e.get(t)}}}function Nt(e,t,r){return{_behaviors:{[e]:{attach:t,props:r}}}}function pn(e,t,r){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...n)=>{i(...n),r(...n)}:e[o]=r}function gn(e,t,r){let o=un[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(n,a)=>{i(n,a),r(n,a)}:e[o]=r}function de(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e)){r=[],t.set(e,r);for(let i of e)r.push(de(i,t));return r}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){r=new Map,t.set(e,r);for(let[i,n]of e)r.set(de(i,t),de(n,t));return r}if(e instanceof Set){r=new Set,t.set(e,r);for(let i of e)r.add(de(i,t));return r}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;r=Object.create(o),t.set(e,r);for(let i of Reflect.ownKeys(e))r[i]=de(e[i],t);return r}function $o(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let r=Object.keys(e);if(r.length===0&&!t)throw Error("element object has no tag key");for(let o=0;o<r.length;o++){let i=r[o],n=e[i];if(o===0&&!At.includes(i)&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&n&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"style" must be a object');if(i==="$")e.$.forEach(a=>$o(a,!0));else{if(i.startsWith("_on")&&typeof n!="function")throw Error(`hook ${i} value "${n}" must be a function `);if(i.startsWith("on")&&typeof n!="function")throw Error(`event ${i} value "${n}" must be a function `);if(i==="_portal"&&typeof n!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof n!="string"&&typeof n!="number")throw Error('"_key" must be a string or number')}}return!0}function ot(e){return new RegExp("<([a-z][\\w-]*)(\\s[^>]*)?>.*<\\/\\1>|<([a-z][\\w-]*)(\\s[^>]*)?\\/>","is").test(e.trim())}function yn(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 zo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ao(e){return Object.keys(e).find(t=>At.includes(t))}function Vo(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function bn(e){if(e.indexOf("@")===0)return[e];for(var t=[],r=0,o=0,i="",n=0,a=e.length;n<a;n++){var s=e[n];if(s==="(")r+=1;else if(s===")")r-=1;else if(s==="[")o+=1;else if(s==="]")o-=1;else if(s===","&&!r&&!o){t.push(i.trim()),i="";continue}i+=s}return t.push(i.trim()),t}function Pt(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 vn(e,t){for(let r=0;r<e.length;r++){let o=e[r],i=null;typeof o.selectorText=="string"?i=Pt(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=Pt(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Bo(e,t){var r;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:cn().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((r=o.sheet)==null||r.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var Lt=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(r=>z(t,Lt(r))),delete e.$,z(t,e),t}else return e},Sn={translate:["yes","no"],autoCapitalize:["on","off"]},xn=class{constructor(e,t,r){this.declaredValue=void 0,this._notifier=new We,this._releases=[],this._removeHooked=!1,this.parent=r,this.isBoolean=zt.includes(e),this.enumeratedBoolean=Sn[e],_o.includes(e)?this.name=e:Object.hasOwn(Tt,e)?this.name=Tt[e]:this.name=Vo(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,r;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 n=this.value;this.value=this.isBoolean?!!e(i):this.normalize(e(i)),this.render(),n!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(r=this.parent)==null?void 0:r.nodeId} attribute:${this.name}`,i.onSubscribe=n=>{this._releases.push(n),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=r=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",r)},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 r=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${zo(String(r))}"`}},No=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 xn(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,r;if(!this.items)return;let o=(r=(t=this.items[e])==null?void 0:t.name)!=null?r:e;this.items[e]&&(this.items[e]._dispose(),delete this.items[e]),this.parent&&this.parent.domElement&&this.parent.domElement instanceof Element&&this.parent.domElement.removeAttribute(o)}_dispose(){if(this.items)for(let e in this.items)this.items[e]._dispose();this.items=null,this.parent=null}toggle(e,t){if(!zt.includes(e))throw Error(`${e} is not a boolean attribute`);t===!0?this.set(e,!0):t===!1?this.remove(e):this.has(e)?this.remove(e):this.set(e,!0)}addClass(e){var t,r;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=(r=(t=this.items)==null?void 0:t.class)==null?void 0:r.declaredValue,n=typeof i=="function",a=n?i:this.get("class"),s=typeof e=="function";if(!n&&!s){this.set("class",o(a,e));return}this.set("class",u=>o(n?a(u):a,s?e(u):e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(r=>r).filter(r=>r!==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))}},Se=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",wn=class{constructor(e,t,r){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:Vo(e),this.parentRule=r,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)),ve[this.name]&&ve[this.name].forEach(r=>{t.setProperty(`-${r}-${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,r,o,i;if(this._releases.length){for(let n of this._releases)n();this._releases=[]}if(typeof e=="function"){let n=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(n),this._domUpdate())});n.onSubscribe=a=>{this._releases.push(a)},n.elementNode=this.parentRule.root,n.debug=`class:${(r=(t=this.parentRule)==null?void 0:t.root)==null?void 0:r.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(n)}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),ve[this.name]&&ve[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 ve[this.name]&&ve[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},he=class Rt{constructor(t,r){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Ho(this),this.parent=r}_dispose(){if(this.styleBlock)for(let t of Object.values(this.styleBlock))t._dispose();this.styleList&&this.styleList._dispose(),this.styleBlock=null,this.styleList=null,this.domRule=null,this.parent=null}get root(){let t=this.parent;for(;t instanceof Rt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof Rt;)t=t.parent;return t}insertStyle(t,r){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(r):this.styleBlock[t]=new wn(t,r,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(";"),r=this.styleList.cssText();return`${this.selectorText} { ${t} ${r} } `}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,r=t.cssRules;for(let o=0;o<r.length;o++)if(r[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let r=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),n=t.cssRules[i];this.mount(n)}}else{let o=`${this.selectorText} { ${r} }`,i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];n&&"selectorText"in n&&this.mount(n)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},Ho=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof he;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let r={},o=[];function i(n,a){return n.startsWith("&")?`${a}${n.slice(1)}`:`${a} ${n}`}for(let n in e){let a=e[n],s=bn(n);for(let u of s){let d=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new he(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new he(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new he(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 he(d,this.parent);this.items.push(m);for(let[h,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let S=i(h,d);this.addCSS(p,S)}else m.insertStyle(h,p)}else r[u]=a}}if(Object.keys(r).length){let n=new he(t,this.parent);for(let a in r)n.insertStyle(a,r[a]);this.items.push(n)}for(let n of o)this.items.push(n)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}patchCSS(e,t=""){var r;if(!this.items||!this.parent)return;let o={};for(let s in e){let u=e[s];typeof u=="object"&&u!=null||(o[s]=u)}let i=this.items.find(s=>s.selectorText===t);i||(i=new he(t,this.parent),this.items.push(i));let n=new Set(Object.keys(o));for(let s in o)i.insertStyle(s,o[s]);if(i.styleBlock)for(let s of Object.keys(i.styleBlock))n.has(s)||i.removeStyle(s);let a=(r=this.domStyle)==null?void 0:r.sheet;!i.domRule&&a&&i.render(a)}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(r=>r.selectorText===e);return t||(t=new he(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let r=e.get(Pt(t.selectorText));r&&t.mount(r)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,r=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let n=i-t,a=e[n];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==r(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},U=class Pe{constructor(t,r=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 jo(this),this.styles=new Ho(this),this.attributes=new No(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,n;t=de(t),$o(t),t.style=t.style||{},this.parent=r,this.tagName=Ao(t),t=Lt(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(n=this.parent)==null?void 0:n.nodeId}.${o}`,s=JSON.stringify(t.style||{},(d,m)=>typeof m=="function"?a:m);this.nodeId=Re(a+s),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];u!=null&&(typeof u=="function"?this._setupFunctionChildren(u):this.children.update(Array.isArray(u)?u:[u])),this._hooks.Init&&this._hooks.Init(this)}_setupFunctionChildren(t){let r=()=>{if(!this._disposed)try{let i=t(r);this.children.update(Array.isArray(i)?i:[i])}catch(i){this._handleError(i)}};r.elementNode=this,r.debug=`class:${this.tagName}_${this.nodeId} children`;let o=[];r.onSubscribe=i=>{o.push(i),this._childrenRelease=()=>{for(let n of o)n();o.length=0,r=null},this._childrenReleaseHooked||(this._childrenReleaseHooked=!0,this.addHook("BeforeRemove",()=>{var n;(n=this._childrenRelease)==null||n.call(this),this._childrenRelease=void 0}))},r()}_createDOMNode(){let t=To.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 r in this._events)this._bindEvent(r);return this.attributes&&Object.values(this.attributes.items).forEach(r=>r.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let r=o=>{var i,n;return(n=(i=this._events)==null?void 0:i[t])==null?void 0:n.call(i,o,this)};this.domElement.addEventListener(t,r),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,r),r=null})}_dispose(){var t,r,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(r=(t=this._hooks).BeforeRemove)==null||r.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(n=>n.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){z(this._context,t._context),z(this._metadata,t._metadata),this._processBehaviors(t._behaviors);let r=Object.keys(t);for(let o=0;o<r.length;o++){let i=r[o],n=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),n):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),n):i==="_portal"?this._portal=n:i==="class"?(typeof n=="string"||typeof n=="function")&&this.attributes.addClass(n):this.attributes.set(i,n))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){var r;let o=de(t);o.style=o.style||{},o=Lt(o);let i=o[this.tagName];if(typeof i=="function")(r=this._childrenRelease)==null||r.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&&z(this._context,o._context),o._metadata&&z(this._metadata,o._metadata),this._processBehaviors(o._behaviors),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let n=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName],s=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),d=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||s.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=>`${n} ${m(h)}`)}else this.attributes.set("class",d?`${n} ${d}`:n);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 r=this;for(;r;){if(r._hooks.Error){let o=r;r._hooks.Error(o,t,()=>{o.children.update([])});return}r=r.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,r){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,n)=>{o(i,n),r(i,n)}:this._events[t]=r}addHook(t,r){let o=this._hooks[t];if(typeof o=="function"){let i=((...n)=>{o(...n),r(...n)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,r.length),configurable:!0})}catch(n){}this._hooks[t]=i}else this._hooks[t]=r}getRoot(){let t=this;for(;t&&t instanceof Pe&&t.parent;)t=t.parent;return t}_processBehaviors(t){var r;if(t)for(let o of Object.keys(t)){let i=t[o],n=this._behaviorInstances.get(o);n?(r=n.update)==null||r.call(n,i.props):this.domElement?this._attachBehaviorNow(o,i):(this._pendingBehaviors.set(o,i),this._ensureBehaviorMountHook())}}_attachBehaviorNow(t,r){let o=r.attach(this,r.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((r,o)=>this._attachBehaviorNow(o,r))}))}_ensureBehaviorTeardownHook(){this._behaviorTeardownHooked||(this._behaviorTeardownHooked=!0,this.addHook("BeforeRemove",()=>{this._behaviorInstances.forEach(t=>{var r;return(r=t.destroy)==null?void 0:r.call(t)}),this._behaviorInstances.clear()}))}getBehavior(t){let r=this;for(;r;){let o=r._behaviorInstances.get(t);if(o)return o;r=r.parent}}getContext(t){let r=this;for(;r&&(!r._context||!Object.hasOwn(r._context,t));)r=r.parent;return r&&r._context?r._context[t]:void 0}setContext(t,r){this._context=this._context||{},this._context[t]=r}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,r){this._metadata=this._metadata||{},this._metadata[t]=r}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(r=>r instanceof Pe?r.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(Mo.includes(this.tagName))return`<${this.tagName}${t}>`;let r=this.children.generateHTML();return`<${this.tagName}${t}>${r}</${this.tagName}>`}mount(t,r){if(!t)throw new Error("Missing dom node on bind");if(Se&&!r&&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 n=t.childNodes[i];n&&(o instanceof Pe?o.mount(n):o.domText=n)}),r){let o=r.sheet;o&&this._hydrateStyles(vn(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var r;if((r=this.styles)==null||r.hydrate(t),this.children)for(let o of this.children.items)o instanceof Pe&&o._hydrateStyles(t)}render(t){let r=this._createDOMNode();t.appendChild(r),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),n=i instanceof ShadowRoot?i:document.head;return o||(o=Bo(n)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Pe&&a._portal){let s=a._portal(this.getRoot());s&&a.render(s)}else a.render(r)}),r}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var r;(r=this.domElement)==null||r.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let r=!1,o=()=>{r||(r=!0,t())},i=this._hooks.BeforeRemove;this._beforeRemoveFired=!0,i(this,o),i.length<2&&!r?o():Se&&!r&&setTimeout(()=>{r||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()}}},Eo=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.text=e===""?"\u200B":String(e)}_createDOMNode(){let e;if(ot(this.text)){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(r=>{for(let o of Array.from(r.attributes))/^on/i.test(o.name)?r.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&r.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 r=e===""?"\u200B":String(e);if(r===this.text&&this.domText)return;let o=ot(this.text);if(this.text=r,!this.domText)return;if(!o&&!ot(r)&&this.domText.nodeType===3){this.domText.nodeValue=r;return}let i=this.domText,n=this._createDOMNode();(t=i.parentNode)==null||t.replaceChild(n,i)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text==="\u200B"?"​":ot(this.text)?yn(this.text):zo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},It=new Set;function kn(){It.clear()}var jo=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new Eo(e==null?"":String(e),this.owner)}_domReferenceAfter(e){let t=this.owner.domElement;if(!t)return null;for(let r=e;r<this.items.length;r++){let o=this.items[r],i=o instanceof U?o.domElement:o.domText;if(i&&i.parentNode===t)return i}return null}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText;if(!o)return;let i=this._domReferenceAfter(t+1);o!==i&&r.insertBefore(o,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText,i=t instanceof U?t.domElement:t.domText;if(!o||!i)return;let n=o.nextSibling,a=i.nextSibling;r.insertBefore(o,a),r.insertBefore(i,n)}update(e,t=!0,r=!1){var o,i,n,a;if(this.items.some(f=>f._imperative)){let f=this.items.filter(v=>!v._imperative),y=this.items.filter(v=>v._imperative);this.items=f.concat(y)}let s=this.items.slice(),u=new Map;for(let f of s)f instanceof U&&f.key!==null&&f.key!==void 0&&!f._imperative&&!f._beforeRemoveFired&&u.set(f.key,f);!r&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let d=new Set(s),m=new Set,h=0,p=Se&&s.length>0?e.length!==s.length:!1;for(let f=0;f<e.length;f++){let y=e[f],v=typeof y=="object"&&y!==null,k=v?y._key:void 0,E=v?Ao(y):void 0;if(Se&&v&&k===void 0&&h++,k!==void 0){let w=u.get(k);if(w instanceof U&&w.tagName===E){u.delete(k);let O=this.items.indexOf(w);if(O!==f&&O>=0){let D=!!w._portal;this.move(O,f,D?!1:t,!0)}w.parent=this.owner,w.patch(y),m.add(w);continue}}else if(v){let w=this.items[f];if(w instanceof U&&w.key==null&&w.tagName===E&&d.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(y),m.add(w);continue}}else{let w=this.items[f];if(w instanceof Eo&&d.has(w)&&!m.has(w)&&!w._imperative){w.setText(y==null?"":y),m.add(w);continue}}m.add(this.insert(y,f,t,!0,!0))}let S=this.items.slice(e.length);for(let f of S)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),Se&&s.length>0&&h>0&&p){let f=this.owner.nodeId;if(!It.has(f)){It.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)}}r||(a=(n=this.owner._hooks)==null?void 0:n.Update)==null||a.call(n,this.owner)}insert(e,t,r=!0,o=!1,i=!1){let n=this.items.length,a=typeof t!="number"||Number.isNaN(t)||t<0||t>n?n:t,s=this._createNode(e);if(s._imperative=!i,this.items.splice(a,0,s),s instanceof U){s._hooks.Insert&&s._hooks.Insert(s);let u=this.owner.domElement;if(r&&u)if(s._portal){let d=s._portal(this.owner.getRoot());d&&s.render(d)}else{let d=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);let h=u.getRootNode(),p=h instanceof ShadowRoot?h:document.head,S=Bo(p);s.styles.render(S),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(f=>{if(f instanceof U&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(d)})}}else{let u=this.owner.domElement;if(r&&u){let d=s._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),s}remove(e,t=!0,r=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof U){if(e._beforeRemoveFired)return;let i=()=>{let n=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&n&&n.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let n=!1,a=()=>{n||(n=!0,i())},s=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,s(e,a),s.length<2&&!n?a():Se&&!n&&setTimeout(()=>{n||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()}!r&&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 r=this.items.slice();for(let o of r)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,r=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],n=this.items[t];this.items[e]=n,this.items[t]=i,r&&this._swapDomElement(i,n),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,r=!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),r&&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}},xe=new Set,$t=!1;function Fo(e){xe.add(e),!$t&&($t=!0,Bt(Wo))}function Wo(){for($t=!1;xe.size>0;){let e=[...xe];xe.clear();for(let t of e)try{t()}catch(r){console.error("[Domphy] Uncaught error in effect:",r)}}}function Cn(){let e=0;for(;Ro()||xe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}Io(),Wo()}}var Fe=[];function En(){return Fe.length?Fe[Fe.length-1]:null}function Ht(e){let t=En();t&&t._add(e)}var _n=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 Se&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();Fe.push(this);try{return e()}finally{Fe.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Tn(){let e=new _n;return Ht(()=>e.stop()),e}function Uo(e){let t=!1,r=!1,o=()=>{t||n()},i=new Do(()=>{t||Fo(o)}),n=()=>{if(!(t||r)){r=!0,i.reset();try{Po(i,e)}finally{r=!1}}},a=()=>{t||(t=!0,i.reset(),xe.delete(o))};return Ht(a),n(),a}function Mn(e){let t="computed",r=new We,o,i=!0,n=!1,a=()=>{i&&r.listenerCount(t)>0&&d()},s=new Do(()=>{i||(i=!0,Fo(a))}),u=()=>{s.reset(),o=Po(s,e),i=!1,n=!0},d=()=>{let h=o,p=n;u(),!(p&&o===h)&&r.notify(t,o)},m=h=>{if(h)r.addListener(t,h);else{let p=Vt();p&&r.addListener(t,p.handler)}return i&&(n&&r.listenerCount(t)>0?d():u()),o};return Ht(()=>{s.reset(),xe.delete(a),r._dispose()}),{_isState:!0,_notifier:r,get:m}}function On(e){return Lo(e)}function Dn(e){return hn(e)}function Pn(e,t,r){let o,i=!0;return Uo(()=>{let n=typeof e=="function"?e():e.get();(!i||r!=null&&r.immediate)&&t(n,o),o=n,i=!1})}function Ln(e){return e?Promise.resolve().then(e):Promise.resolve()}var Rn=class{constructor(e){this._notifier=new We,this.initialRecord=ko({},e),this._record=ko({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let r=Vt();r&&this._notifier.addListener(e,r.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 ct={};tt(ct,{COLOR_ROLES:()=>Xn,ElementTones:()=>Ue,applySystemTheme:()=>Zn,generateTheme:()=>ri,getTheme:()=>re,setTheme:()=>qn,themeApply:()=>Yn,themeCSS:()=>Ut,themeColor:()=>l,themeColorToken:()=>Xt,themeDensity:()=>b,themeFluidSpacing:()=>Gn,themeName:()=>st,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>Qo,themeVars:()=>lt});var In=e=>{let t=r=>{let o=Math.max(0,Math.min(1,r)),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)},$n=e=>{let t=r=>r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;return e.map(t)},zn=e=>{let[t,r,o]=In(e);return t=t.toString(16).padStart(2,"0"),r=r.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),`#${t}${r}${o}`},it=e=>{let t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return $n([t,r,o])},An=e=>{let t=.4122214708*e[0]+.5363325363*e[1]+.0514459929*e[2],r=.2119034982*e[0]+.6806995451*e[1]+.1073969566*e[2],o=.0883024619*e[0]+.2817188376*e[1]+.6299787005*e[2],i=Math.cbrt(t),n=Math.cbrt(r),a=Math.cbrt(o);return[.2104542553*i+.793617785*n-.0040720468*a,1.9779984951*i-2.428592205*n+.4505937099*a,.0259040371*i+.7827717662*n-.808675766*a]},Vn=e=>{let[t,r,o]=e,i=t+.3963377774*r+.2158037573*o,n=t-.1055613458*r-.0638541728*o,a=t-.0894841775*r-1.291485548*o,s=i*i*i,u=n*n*n,d=a*a*a;return[4.0767416621*s-3.3077115913*u+.2309699292*d,-1.2684380046*s+2.6097574011*u-.3413193965*d,-.0041960863*s-.7034186147*u+1.707614701*d]};var Ft=e=>{let[t,r,o]=e,i=.4124564*t+.3575761*r+.1804375*o,n=.2126729*t+.7151522*r+.072175*o,a=.0193339*t+.119192*r+.9503041*o,s=.95047,u=1,d=1.08883,m=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,h=m(i/s),p=m(n/u),S=m(a/d);return[116*p-16,500*(h-p),200*(p-S)]};var Ko=(e,t)=>{let[r,o,i]=e,[n,a,s]=t,u=(r+n)/2,d=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+s*s),h=(d+m)/2,p=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),S=o*(1+p),f=a*(1+p),y=Math.sqrt(S*S+i*i),v=Math.sqrt(f*f+s*s),k=(y+v)/2,E=Math.atan2(i,S)*180/Math.PI+(Math.atan2(i,S)<0?360:0),w=Math.atan2(s,f)*180/Math.PI+(Math.atan2(s,f)<0?360:0),O=w-E;Math.abs(O)>180&&(O+=w<=E?360:-360);let D=Math.abs(E-w)>180?(E+w+360)/2:(E+w)/2,T=1-.17*Math.cos((D-30)*Math.PI/180)+.24*Math.cos(2*D*Math.PI/180)+.32*Math.cos((3*D+6)*Math.PI/180)-.2*Math.cos((4*D-63)*Math.PI/180),L=n-r,N=v-y,H=2*Math.sqrt(y*v)*Math.sin(O/2*Math.PI/180),j=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),ye=1+.045*k,Oe=1+.015*k*T,ue=30*Math.exp(-Math.pow((D-275)/25,2)),W=-(2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))))*Math.sin(2*ue*Math.PI/180);return Math.sqrt(Math.pow(L/j,2)+Math.pow(N/ye,2)+Math.pow(H/Oe,2)+W*(N/ye)*(H/Oe))};var qo=e=>{if(e.length<1)return d=>0;let t=[...e].sort((d,m)=>d[0]-m[0]),r=[];for(let d=0;d<t.length;d++)(d===0||t[d][0]!==t[d-1][0])&&r.push(t[d]);let o=r.length;if(o===1)return d=>r[0][1];let i=r.map(d=>d[0]),n=r.map(d=>d[1]),a=[],s=[];for(let d=0;d<o-1;d++)a[d]=i[d+1]-i[d],s[d]=(n[d+1]-n[d])/a[d];let u=new Array(o);u[0]=s[0],u[o-1]=s[o-2];for(let d=1;d<o-1;d++){let m=s[d-1],h=s[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 n[0];if(d>=i[o-1])return n[o-1];let m=0,h=o-2,p=0;for(;m<=h;){let w=Math.floor((m+h)/2);if(d>=i[w]&&d<=i[w+1]){p=w;break}d<i[w]?h=w-1:m=w+1}let S=a[p],f=(d-i[p])/S,y=f*f,v=y*f,k=u[p]*S,E=u[p+1]*S;return(2*v-3*y+1)*n[p]+(v-2*y+f)*k+(-2*v+3*y)*n[p+1]+(v-y)*E}};var Yo=.605,jt=.685;function Bn(e){let t=Math.pow(e,Yo);return t/(1+jt*(1-t))}function Nn(e){let t=e*(1+jt)/(1+e*jt);return Math.pow(t,1/Yo)}function Hn(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 jn(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>An(p)).sort((p,S)=>p[0]-S[0]),r=t.map(p=>p[0]),o=t.map(p=>p[1]),i=t.map(p=>p[2]),n=[0],a=0;for(let p=1;p<t.length;p++)a+=Hn(t[p],t[p-1]),n.push(a);let s=n.map(p=>Nn(a>0?p/a:0)),u=e.length===1?0:s[1],d=e.length===1?1:s[s.length-2],m=qo(s.map((p,S)=>[p,o[S]])),h=qo(s.map((p,S)=>[p,i[S]]));return{colorAtParam:p=>{let S=Bn(p),f=u+S*(d-u),y=0;for(let T=0;T<s.length-1;T++)if(f<=s[T+1]){y=T;break}let v=s[y],k=s[y+1],E=(f-v)/(k-v||1),w=r[y]+E*(r[y+1]-r[y]),O=m(f),D=h(f);return Vn([w,O,D])},parameters:s.slice(1,-1).map(p=>(p-u)/(d-u))}}function Go(e,t){let r=Array.isArray(e)?e:[e];if(r.length===0)throw new Error("generateRamp requires at least one anchor color");if(t<=0)return[];if(t===1)return[r[0]];let{colorAtParam:o,parameters:i}=jn(r.map(it)),n=[],a=[0,...i,1],s=a.map(d=>Math.round(d*(t-1))),u=0;for(let d=0;d<t;d++){for(;u<s.length-2&&d>s[u+1];)u++;let m=s[u],h=s[u+1],p=a[u],S=a[u+1],f;if(h<=m)f=p;else{let y=(d-m)/(h-m);f=p+y*(S-p)}n.push(zn(o(f)))}return n.reverse()}var Fn={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:{}},qe=Fn,Gt=e=>JSON.parse(JSON.stringify(e)),Xo=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),Ie={light:Gt(qe),dark:Kn(qe)},at=null,Wt=new Map;function Zt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Wn(e){for(let t in e)if(!Object.keys(qe).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(r=>Array.isArray(r)&&r.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(r=>typeof r=="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 Jo(e,t){var r;for(let o of Object.keys(t))o==="__proto__"||o==="constructor"||o==="prototype"||(t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((r=e[o])!=null||(e[o]={}),Jo(e[o],t[o])):e[o]=t[o])}function Un(e,t){let r={},o=Zt(t);for(let n in t){let a=t[n];if(n==="colors")for(let s in t.colors)[...Array(o).keys()].forEach(u=>r[`--${s}-${u}`]=t.colors[s][u]);else if(n==="fontSizes")[...Array(8).keys()].forEach(s=>r[`--fontSize-${s}`]=t.fontSizes[s]);else if(n==="custom"&&a&&typeof a=="object")for(let s in a)r[`--custom-${Xo(s)}`]=a[s]}let i="";for(let n in r)i+=` ${n}: ${r[n]};
|
|
1
|
+
"use strict";var Domphy=(()=>{var ot=Object.defineProperty,en=Object.defineProperties,tn=Object.getOwnPropertyDescriptor,on=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertyNames,xo=Object.getOwnPropertySymbols;var ko=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable;var wo=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))ko.call(t,r)&&wo(e,r,t[r]);if(xo)for(var r of xo(t))nn.call(t,r)&&wo(e,r,t[r]);return e},te=(e,t)=>en(e,on(t));var rt=(e,t)=>{for(var r in t)ot(e,r,{get:t[r],enumerable:!0})},an=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rn(t))!ko.call(e,i)&&i!==r&&ot(e,i,{get:()=>t[i],enumerable:!(o=tn(t,i))||o.enumerable});return e};var ln=e=>an(ot({},"__esModule",{value:!0}),e);var Zl={};rt(Zl,{core:()=>it,theme:()=>mt,ui:()=>Ct});var it={};rt(it,{AttributeList:()=>jo,BooleanAttributes:()=>Bt,CamelAttributes:()=>Mo,ElementList:()=>Uo,ElementNode:()=>U,HtmlAttributeNames:()=>Dt,HtmlTags:()=>Nt,Notifier:()=>qe,PrefixCSS:()=>ve,RawHTML:()=>Wo,RecordState:()=>zn,State:()=>Rt,SvgTags:()=>Oo,VoidTags:()=>Do,_microtask:()=>jt,_resetKeylessWarnings:()=>_n,batch:()=>Ln,behavior:()=>Ft,computed:()=>Pn,configure:()=>un,effect:()=>Yo,effectScope:()=>Dn,flushPendingNotifiers:()=>zo,flushSync:()=>Tn,hasPendingNotifiers:()=>$o,hashString:()=>Ie,isRawHTML:()=>Ue,isState:()=>gn,merge:()=>z,nextTick:()=>$n,rawHtml:()=>we,readonly:()=>yn,runBatched:()=>Io,toState:()=>g,untrack:()=>Rn,watch:()=>In});var sn=Object.defineProperty,Co=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Eo=(e,t,r)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_o=(e,t)=>{for(var r in t||(t={}))cn.call(t,r)&&Eo(e,r,t[r]);if(Co)for(var r of Co(t))mn.call(t,r)&&Eo(e,r,t[r]);return e},Bt=["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"],Mo=["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"],Dt={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"},Nt=["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"],ve={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"]},Oo=["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"],Do=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],Po={};function un(e){Object.assign(Po,e)}function hn(){return Po}var dn=["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"],fn=dn.reduce((e,t)=>{let r=t.slice(2).toLowerCase();return e[r]=t,e},{}),Lo=class{constructor(e){this._releases=new Set;let t=(()=>e());t.onSubscribe=r=>{this._releases.add(r)},this.handler=t}reset(){for(let e of this._releases)e();this._releases.clear()}get dependencyCount(){return this._releases.size}},Fe=[],Pt=0;function Ht(){return Pt>0?null:Fe.length?Fe[Fe.length-1]:null}function Ro(e,t){Fe.push(e);try{return t()}finally{Fe.pop()}}function pn(e){Pt++;try{return e()}finally{Pt--}}var oe=[],jt=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e).catch(t=>{setTimeout(()=>{throw t},0)})},To=100,nt=0,Lt=new Set,Re=new Set;function Io(e){nt++;try{return e()}finally{if(nt--,nt===0){let t=Lt;Lt=new Set;for(let r of t)r._scheduleFlush()}}}var qe=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 r=()=>this.removeListener(e,t);return this._listeners[e].has(t)||(this._listeners[e].add(t),typeof t.onSubscribe=="function"&&t.onSubscribe(r)),r}removeListener(e,t){if(!this._listeners)return;let r=this._listeners[e];r&&r.has(t)&&(r.delete(t),r.size===0&&delete this._listeners[e])}listenerCount(e){var t,r,o;return(o=(r=(t=this._listeners)==null?void 0:t[e])==null?void 0:r.size)!=null?o:0}notify(e,...t){if(!this._listeners||!this._listeners[e])return;let r=oe.length?oe[oe.length-1]:null;if(r&&r[0]===this&&r[1]===e){let o=this._flushing.get(e);if(o&&o[0]===t[0])return;if(this._selfDepth>=To){console.error(`[Domphy] Runaway self-update on "${e}" \u2014 stopped after ${To} iterations`);return}this._selfDepth++,this._pending.set(e,{args:t,chain:[]})}else{if(this._isCircular(e))return;this._pending.set(e,{args:t,chain:[...oe]})}nt>0?Lt.add(this):this._scheduleFlush()}_scheduleFlush(){this._scheduled||(this._scheduled=!0,Re.add(this),jt(()=>this._flushAll()))}_isCircular(e){let t=oe.findIndex(([o,i])=>o===this&&i===e);if(t===-1)return!1;let r=[...oe.slice(t).map(([,o])=>o),e];return console.error(`[Domphy] Circular dependency detected:
|
|
2
|
+
${r.join(" \u2192 ")}`),!0}_flushAll(){this._scheduled=!1,Re.delete(this);let e=this._pending;this._pending=new Map;for(let[t,{args:r,chain:o}]of e)oe=o,this._flush(t,r);oe=[],this._pending.size===0&&(this._selfDepth=0)}_flush(e,t){if(!this._listeners)return;let r=this._listeners[e];if(r){oe.push([this,e]),this._flushing.set(e,t);for(let o of[...r])if(r.has(o))try{o(...t)}catch(i){console.error(i)}this._flushing.delete(e),oe.pop()}}};function $o(){return Re.size>0}function zo(){let e=0;for(;Re.size>0;){if(e++>1e4){console.error("[Domphy] flushSync: notifier queue did not settle");break}let t=[...Re];Re.clear();for(let r of t)r._flushAll()}}var Rt=class{constructor(e,t=typeof e){this.name=t,this._isState=!0,this._notifier=new qe,this.initialValue=e,this._value=e}get(e){if(e)this.addListener(e);else{let t=Ht();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 z(e={},t={}){let r=["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=de(t));for(let n in t){let a=t[n];if(a!=null)if(typeof a=="object"&&!Array.isArray(a))typeof e[n]=="object"?e[n]=z(e[n],a):e[n]=a;else if(r.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(", ")}}else e[n]=[e[n],a].filter(s=>s).join(", ");else if(i.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join("")}}else e[n]=[e[n],a].filter(s=>s).join("");else if(o.includes(n))if(typeof e[n]=="function"||typeof a=="function"){let s=e[n];e[n]=u=>{let d=typeof s=="function"?s(u):s,m=typeof a=="function"?a(u):a;return[d,m].filter(h=>h).join(" ")}}else e[n]=[e[n],a].filter(s=>s).join(" ");else if(n.startsWith("on")){let s=n.replace("on","").toLowerCase();vn(e,s,a)}else if(n.startsWith("_on")){let s=n.replace("_on","");bn(e,s,a)}else e[n]=a}return e}function Ie(e=""){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return String.fromCharCode(97+t%26)+t.toString(16)}function g(e,t){return e instanceof Rt||e!=null&&e._isState?e:new Rt(e,t)}function gn(e){return typeof e=="object"&&e!==null&&e._isState===!0}function yn(e){return{_isState:!0,get(t){return e.get(t)}}}function Ft(e,t,r){return{_behaviors:{[e]:{attach:t,props:r}}}}function bn(e,t,r){let o=`_on${t}`,i=e[o];typeof i=="function"?e[o]=(...n)=>{i(...n),r(...n)}:e[o]=r}function vn(e,t,r){let o=fn[t];if(!o)throw Error(`invalid event name "${t}"`);let i=e[o];typeof i=="function"?e[o]=(n,a)=>{i(n,a),r(n,a)}:e[o]=r}function de(e,t=new WeakMap){if(e===null||typeof e!="object"||typeof e=="function")return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e)){r=[],t.set(e,r);for(let i of e)r.push(de(i,t));return r}if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(e instanceof Map){r=new Map,t.set(e,r);for(let[i,n]of e)r.set(de(i,t),de(n,t));return r}if(e instanceof Set){r=new Set,t.set(e,r);for(let i of e)r.add(de(i,t));return r}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;r=Object.create(o),t.set(e,r);for(let i of Reflect.ownKeys(e))r[i]=de(e[i],t);return r}function Ao(e,t=!1){if(Object.prototype.toString.call(e)!=="[object Object]")throw Error(`typeof ${e} is invalid DomphyElement`);let r=Object.keys(e);if(r.length===0&&!t)throw Error("element object has no tag key");for(let o=0;o<r.length;o++){let i=r[o],n=e[i];if(o===0&&!Nt.includes(i)&&!t)throw Error(`key ${i} is not valid HTML tag name`);if(i==="style"&&n&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"style" must be a object');if(i==="$")e.$.forEach(a=>Ao(a,!0));else{if(i.startsWith("_on")&&typeof n!="function")throw Error(`hook ${i} value "${n}" must be a function `);if(i.startsWith("on")&&typeof n!="function")throw Error(`event ${i} value "${n}" must be a function `);if(i==="_portal"&&typeof n!="function")throw Error('"_portal" must be a function return HTMLElement');if(i==="_context"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_context" must be a object');if(i==="_metadata"&&Object.prototype.toString.call(n)!=="[object Object]")throw Error('"_metadata" must be a object');if(i==="_key"&&typeof n!="string"&&typeof n!="number")throw Error('"_key" must be a string or number')}}return!0}function Sn(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 Vo(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Bo(e){return Object.keys(e).find(t=>Nt.includes(t))}function No(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function xn(e){if(e.indexOf("@")===0)return[e];for(var t=[],r=0,o=0,i="",n=0,a=e.length;n<a;n++){var s=e[n];if(s==="(")r+=1;else if(s===")")r-=1;else if(s==="[")o+=1;else if(s==="]")o-=1;else if(s===","&&!r&&!o){t.push(i.trim()),i="";continue}i+=s}return t.push(i.trim()),t}function It(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 wn(e,t){for(let r=0;r<e.length;r++){let o=e[r],i=null;typeof o.selectorText=="string"?i=It(o.selectorText):typeof o.cssText=="string"&&o.cssText.startsWith("@")&&(i=It(o.cssText.split("{")[0])),i&&!t.has(i)&&t.set(i,o)}return t}function Ho(e,t){var r;let o=e.querySelector("#domphy-style");if(!o){o=document.createElement("style"),o.id="domphy-style";let i=t!=null?t:hn().cspNonce;i&&(o.nonce=i),e.appendChild(o)}return o.dataset.domphyBase!=="true"&&((r=o.sheet)==null||r.insertRule("[hidden] { display: none !important; }",0),o.dataset.domphyBase="true"),o}var $t=e=>{if(Array.isArray(e.$)){let t={};return e.$.forEach(r=>z(t,$t(r))),delete e.$,z(t,e),t}else return e},kn={translate:["yes","no"],autoCapitalize:["on","off"]},Cn=class{constructor(e,t,r){this.declaredValue=void 0,this._notifier=new qe,this._releases=[],this._removeHooked=!1,this.parent=r,this.isBoolean=Bt.includes(e),this.enumeratedBoolean=kn[e],Mo.includes(e)?this.name=e:Object.hasOwn(Dt,e)?this.name=Dt[e]:this.name=No(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,r;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 n=this.value;this.value=this.isBoolean?!!e(i):this.normalize(e(i)),this.render(),n!==this.value&&this._notifier.notify(this.name,this.value)};i.elementNode=this.parent,i.debug=`class:${(t=this.parent)==null?void 0:t.tagName}_${(r=this.parent)==null?void 0:r.nodeId} attribute:${this.name}`,i.onSubscribe=n=>{this._releases.push(n),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=r=>{var o;return(o=this.parent)==null?void 0:o.addHook("BeforeRemove",r)},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 r=Array.isArray(t)?JSON.stringify(t):t;return`${e}="${Vo(String(r))}"`}},jo=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 Cn(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,r;if(!this.items)return;let o=(r=(t=this.items[e])==null?void 0:t.name)!=null?r: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(!Bt.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,r;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=(r=(t=this.items)==null?void 0:t.class)==null?void 0:r.declaredValue,n=typeof i=="function",a=n?i:this.get("class"),s=typeof e=="function";if(!n&&!s){this.set("class",o(a,e));return}this.set("class",u=>o(n?a(u):a,s?e(u):e))}hasClass(e){return!e||typeof e!="string"?!1:(this.get("class")||"").split(" ").filter(t=>t).includes(e)}toggleClass(e){!e||typeof e!="string"||(this.hasClass(e)?this.removeClass(e):this.addClass(e))}removeClass(e){if(!e||typeof e!="string")return;let t=(this.get("class")||"").split(" ").filter(r=>r).filter(r=>r!==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))}},Se=typeof process!="undefined"&&process.env!=null&&process.env.NODE_ENV!=="production",En=class{constructor(e,t,r){this.value="",this._releases=[],this.name=e,this.cssName=e.startsWith("--")?e:No(e),this.parentRule=r,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)),ve[this.name]&&ve[this.name].forEach(r=>{t.setProperty(`-${r}-${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,r,o,i;if(this._releases.length){for(let n of this._releases)n();this._releases=[]}if(typeof e=="function"){let n=(()=>{var a;!this.parentRule||(a=this.parentRule.parentNode)!=null&&a._disposed||(this.value=e(n),this._domUpdate())});n.onSubscribe=a=>{this._releases.push(a)},n.elementNode=this.parentRule.root,n.debug=`class:${(r=(t=this.parentRule)==null?void 0:t.root)==null?void 0:r.tagName}_${(i=(o=this.parentRule)==null?void 0:o.root)==null?void 0:i.nodeId} style:${this.name}`,this.value=e(n)}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),ve[this.name]&&ve[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 ve[this.name]&&ve[this.name].forEach(t=>{e+=`; -${t}-${this.cssName}: ${this.value}`}),e}},he=class zt{constructor(t,r){this.domRule=null,this.styleBlock={},this.selectorText=t,this.styleList=new Fo(this),this.parent=r}_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 zt;)t=t.parent;return t}get parentNode(){let t=this.parent;for(;t&&t instanceof zt;)t=t.parent;return t}insertStyle(t,r){this.styleBlock&&(this.styleBlock[t]?this.styleBlock[t].set(r):this.styleBlock[t]=new En(t,r,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(";"),r=this.styleList.cssText();return`${this.selectorText} { ${t} ${r} } `}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,r=t.cssRules;for(let o=0;o<r.length;o++)if(r[o]===this.domRule){t.deleteRule(o);break}}this._dispose()}render(t){if(!this.styleBlock||!this.styleList)return;let r=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),n=t.cssRules[i];this.mount(n)}}else{let o=`${this.selectorText} { ${r} }`,i=t.insertRule(o,t.cssRules.length),n=t.cssRules[i];n&&"selectorText"in n&&this.mount(n)}}catch(o){console.warn("Failed to insert rule:",this.selectorText,o)}}},Fo=class{constructor(e){this.items=[],this.domStyle=null,this.parent=e}get parentNode(){let e=this.parent;for(;e&&e instanceof he;)e=e.parent;return e}addCSS(e,t=""){if(!this.items||!this.parent)return;let r={},o=[];function i(n,a){return n.startsWith("&")?`${a}${n.slice(1)}`:`${a} ${n}`}for(let n in e){let a=e[n],s=xn(n);for(let u of s){let d=i(u,t);if(/^@(container|layer|supports|media)\b/.test(u)){if(typeof a=="object"&&a!=null){let m=new he(u,this.parent);m.styleList.addCSS(a,t),o.push(m)}}else if(u.startsWith("@keyframes")){let m=new he(u,this.parent);m.styleList.addCSS(a,""),this.items.push(m)}else if(u.startsWith("@font-face")){let m=new he(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 he(d,this.parent);this.items.push(m);for(let[h,p]of Object.entries(a))if(typeof p=="object"&&p!=null){let S=i(h,d);this.addCSS(p,S)}else m.insertStyle(h,p)}else r[u]=a}}if(Object.keys(r).length){let n=new he(t,this.parent);for(let a in r)n.insertStyle(a,r[a]);this.items.push(n)}for(let n of o)this.items.push(n)}cssText(){return this.items?this.items.map(e=>e.cssText()).join(""):""}patchCSS(e,t=""){var r;if(!this.items||!this.parent)return;let o={};for(let s in e){let u=e[s];typeof u=="object"&&u!=null||(o[s]=u)}let i=this.items.find(s=>s.selectorText===t);i||(i=new he(t,this.parent),this.items.push(i));let n=new Set(Object.keys(o));for(let s in o)i.insertStyle(s,o[s]);if(i.styleBlock)for(let s of Object.keys(i.styleBlock))n.has(s)||i.removeStyle(s);let a=(r=this.domStyle)==null?void 0:r.sheet;!i.domRule&&a&&i.render(a)}insertRule(e){if(!this.items||!this.parent)return null;let t=this.items.find(r=>r.selectorText===e);return t||(t=new he(e,this.parent),this.items.push(t)),t}hydrate(e){if(this.items)for(let t of this.items){let r=e.get(It(t.selectorText));r&&t.mount(r)}}mount(e){if(!this.items)return;if(!e)throw Error("Require domRuleList argument");let t=0,r=o=>o.replace("(odd)","(2n+1)").replace("(even)","(2n)");this.items.forEach((o,i)=>{let n=i-t,a=e[n];a&&(o.selectorText.startsWith("@")&&a instanceof CSSKeyframesRule||"keyText"in a?o.mount(a):"selectorText"in a?a.selectorText!==r(o.selectorText)?t+=1:o.mount(a):"cssRules"in a&&o.mount(a))})}render(e){e instanceof HTMLStyleElement?(this.domStyle=e,this.items.forEach(t=>t.render(e.sheet))):e instanceof CSSGroupingRule&&this.items.forEach(t=>t.render(e))}_dispose(){if(this.items)for(let e=0;e<this.items.length;e++)this.items[e]._dispose();this.items=[],this.parent=null,this.domStyle=null}},U=class Le{constructor(t,r=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 Uo(this),this.styles=new Fo(this),this.attributes=new jo(this),this.domElement=null,this._hooks={},this._events=null,this._boundEvents=new Set,this._context={},this._metadata={},this.key=null;var i,n;t=de(t),Ao(t),t.style=t.style||{},this.parent=r,this.tagName=Bo(t),t=$t(t),this.key=(i=t._key)!=null?i:null,this._context=t._context||{},this._metadata=t._metadata||{};let a=`${(n=this.parent)==null?void 0:n.nodeId}.${o}`,s=JSON.stringify(t.style||{},(d,m)=>typeof m=="function"?a:m);this.nodeId=Ie(a+s),this.attributes.addClass(`${this.tagName}_${this.nodeId}`),t._onSchedule&&t._onSchedule(this,t),this.merge(t);let u=t[this.tagName];u!=null&&(typeof u=="function"?this._setupFunctionChildren(u):this.children.update(Array.isArray(u)?u:[u])),this._hooks.Init&&this._hooks.Init(this)}_setupFunctionChildren(t){let r=()=>{if(!this._disposed)try{let i=t(r);this.children.update(Array.isArray(i)?i:[i])}catch(i){this._handleError(i)}};r.elementNode=this,r.debug=`class:${this.tagName}_${this.nodeId} children`;let o=[];r.onSubscribe=i=>{o.push(i),this._childrenRelease=()=>{for(let n of o)n();o.length=0,r=null},this._childrenReleaseHooked||(this._childrenReleaseHooked=!0,this.addHook("BeforeRemove",()=>{var n;(n=this._childrenRelease)==null||n.call(this),this._childrenRelease=void 0}))},r()}_createDOMNode(){let t=Oo.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 r in this._events)this._bindEvent(r);return this.attributes&&Object.values(this.attributes.items).forEach(r=>r.render()),t}_bindEvent(t){if(!this.domElement||this._boundEvents.has(t))return;this._boundEvents.add(t);let r=o=>{var i,n;return(n=(i=this._events)==null?void 0:i[t])==null?void 0:n.call(i,o,this)};this.domElement.addEventListener(t,r),this.addHook("BeforeRemove",o=>{var i;(i=o.domElement)==null||i.removeEventListener(t,r),r=null})}_dispose(){var t,r,o,i;this._disposed||(this._disposed=!0,this._beforeRemoveFired||(this._beforeRemoveFired=!0,(r=(t=this._hooks).BeforeRemove)==null||r.call(t,this,()=>{})),this.children&&this.children._dispose(),this.styles&&(this.styles.items.forEach(n=>n.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){z(this._context,t._context),z(this._metadata,t._metadata),this._processBehaviors(t._behaviors);let r=Object.keys(t);for(let o=0;o<r.length;o++){let i=r[o],n=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),n):i.startsWith("on")?this.addEvent(i.substring(2).toLowerCase(),n):i==="_portal"?this._portal=n:i==="class"?(typeof n=="string"||typeof n=="function")&&this.attributes.addClass(n):this.attributes.set(i,n))}t.style&&this.styles.addCSS(t.style||{},`.${`${this.tagName}_${this.nodeId}`}`)}patch(t){var r;let o=de(t);o.style=o.style||{},o=$t(o);let i=o[this.tagName];if(typeof i=="function")(r=this._childrenRelease)==null||r.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&&z(this._context,o._context),o._metadata&&z(this._metadata,o._metadata),this._processBehaviors(o._behaviors),this.styles.patchCSS(o.style||{},`.${this.tagName}_${this.nodeId}`);let n=`${this.tagName}_${this.nodeId}`,a=["$","_onSchedule","_key","_context","_metadata","_behaviors","style",this.tagName],s=["_onInit","_onInsert","_onMount","_onBeforeUpdate","_onUpdate","_onBeforeRemove","_onRemove","_onError"],u=new Set(["class"]),d=null;this._events={};for(let m of Object.keys(o)){if(a.includes(m)||s.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=>`${n} ${m(h)}`)}else this.attributes.set("class",d?`${n} ${d}`:n);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 r=this;for(;r;){if(r._hooks.Error){let o=r;r._hooks.Error(o,t,()=>{o.children.update([])});return}r=r.parent}console.error("[Domphy] Unhandled error in reactive child:",t)}addEvent(t,r){this._events=this._events||{};let o=this._events[t];typeof o=="function"?this._events[t]=(i,n)=>{o(i,n),r(i,n)}:this._events[t]=r}addHook(t,r){let o=this._hooks[t];if(typeof o=="function"){let i=((...n)=>{o(...n),r(...n)});try{Object.defineProperty(i,"length",{value:Math.max(o.length,r.length),configurable:!0})}catch(n){}this._hooks[t]=i}else this._hooks[t]=r}getRoot(){let t=this;for(;t&&t instanceof Le&&t.parent;)t=t.parent;return t}_processBehaviors(t){var r;if(t)for(let o of Object.keys(t)){let i=t[o],n=this._behaviorInstances.get(o);n?(r=n.update)==null||r.call(n,i.props):this.domElement?this._attachBehaviorNow(o,i):(this._pendingBehaviors.set(o,i),this._ensureBehaviorMountHook())}}_attachBehaviorNow(t,r){let o=r.attach(this,r.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((r,o)=>this._attachBehaviorNow(o,r))}))}_ensureBehaviorTeardownHook(){this._behaviorTeardownHooked||(this._behaviorTeardownHooked=!0,this.addHook("BeforeRemove",()=>{this._behaviorInstances.forEach(t=>{var r;return(r=t.destroy)==null?void 0:r.call(t)}),this._behaviorInstances.clear()}))}getBehavior(t){let r=this;for(;r;){let o=r._behaviorInstances.get(t);if(o)return o;r=r.parent}}getContext(t){let r=this;for(;r&&(!r._context||!Object.hasOwn(r._context,t));)r=r.parent;return r&&r._context?r._context[t]:void 0}setContext(t,r){this._context=this._context||{},this._context[t]=r}getMetadata(t){return this._metadata?this._metadata[t]:void 0}setMetadata(t,r){this._metadata=this._metadata||{},this._metadata[t]=r}generateCSS(){if(!this.styles||!this.children)return"";let t=this.styles.cssText();return t+=this.children.items.map(r=>r instanceof Le?r.generateCSS():"").join(""),t}generateHTML(){if(!this.children||!this.attributes)return"";let t=this.attributes.generateHTML();if(Do.includes(this.tagName))return`<${this.tagName}${t}>`;let r=this.children.generateHTML();return`<${this.tagName}${t}>${r}</${this.tagName}>`}mount(t,r){if(!t)throw new Error("Missing dom node on bind");if(Se&&!r&&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 n=t.childNodes[i];n&&(o instanceof Le?o.mount(n):o.domText=n)}),r){let o=r.sheet;o&&this._hydrateStyles(wn(o.cssRules,new Map))}this._hooks.Mount&&this._hooks.Mount(this)}_hydrateStyles(t){var r;if((r=this.styles)==null||r.hydrate(t),this.children)for(let o of this.children.items)o instanceof Le&&o._hydrateStyles(t)}render(t){let r=this._createDOMNode();t.appendChild(r),this._hooks.Mount&&this._hooks.Mount(this);let o=this.getRoot().styles.domStyle,i=t.getRootNode(),n=i instanceof ShadowRoot?i:document.head;return o||(o=Ho(n)),this.styles.render(o),this.children.items.forEach(a=>{if(a instanceof Le&&a._portal){let s=a._portal(this.getRoot());s&&a.render(s)}else a.render(r)}),r}remove(){if(this.parent)this.parent.children.remove(this);else{let t=()=>{var r;(r=this.domElement)==null||r.remove(),this._dispose()};if(this._hooks.BeforeRemove&&this.domElement){let r=!1,o=()=>{r||(r=!0,t())},i=this._hooks.BeforeRemove;this._beforeRemoveFired=!0,i(this,o),i.length<2&&!r?o():Se&&!r&&setTimeout(()=>{r||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()}}},Wo=class{constructor(e){this.__domphyRawHTML=!0,this.html=e}};function we(e){return new Wo(e)}function Ue(e){return typeof e=="object"&&e!==null&&e.__domphyRawHTML===!0}var Mt="\u200B",Ot=class{constructor(e,t){this.type="TextNode",this._imperative=!1,this.parent=t,this.html=Ue(e);let r=this.html?e.html:e;this.text=r===""?Mt:String(r)}_createDOMNode(){let e;if(this.html){let t=document.createElement("template");t.innerHTML=this.text.trim(),t.content.querySelectorAll("*").forEach(r=>{for(let o of Array.from(r.attributes))/^on/i.test(o.name)?r.removeAttribute(o.name):/^(?:href|src|action|formaction)$/i.test(o.name)&&/^\s*javascript:/i.test(o.value)&&r.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 r=Ue(e),o=r?e.html:e,i=o===""?Mt:String(o);if(i===this.text&&r===this.html&&this.domText)return;let n=this.html;if(this.text=i,this.html=r,!this.domText)return;if(!n&&!r&&this.domText.nodeType===3){this.domText.nodeValue=i;return}let a=this.domText,s=this._createDOMNode();(t=a.parentNode)==null||t.replaceChild(s,a)}_dispose(){this.domText=void 0,this.text=""}generateHTML(){return this.text===Mt?"​":this.html?Sn(this.text):Vo(this.text)}render(e){let t=this._createDOMNode();e.appendChild(t)}},At=new Set;function _n(){At.clear()}var Uo=class{constructor(e){this.items=[],this._nextKey=0,this.owner=e}_createNode(e){return Ue(e)?new Ot(e,this.owner):typeof e=="object"&&e!==null?new U(e,this.owner,this._nextKey++):new Ot(e==null?"":String(e),this.owner)}_domReferenceAfter(e){let t=this.owner.domElement;if(!t)return null;for(let r=e;r<this.items.length;r++){let o=this.items[r],i=o instanceof U?o.domElement:o.domText;if(i&&i.parentNode===t)return i}return null}_moveDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText;if(!o)return;let i=this._domReferenceAfter(t+1);o!==i&&r.insertBefore(o,i)}_swapDomElement(e,t){if(!this.owner||!this.owner.domElement)return;let r=this.owner.domElement,o=e instanceof U?e.domElement:e.domText,i=t instanceof U?t.domElement:t.domText;if(!o||!i)return;let n=o.nextSibling,a=i.nextSibling;r.insertBefore(o,a),r.insertBefore(i,n)}update(e,t=!0,r=!1){var o,i,n,a;if(this.items.some(f=>f._imperative)){let f=this.items.filter(v=>!v._imperative),y=this.items.filter(v=>v._imperative);this.items=f.concat(y)}let s=this.items.slice(),u=new Map;for(let f of s)f instanceof U&&f.key!==null&&f.key!==void 0&&!f._imperative&&!f._beforeRemoveFired&&u.set(f.key,f);!r&&this.owner.domElement&&((i=(o=this.owner._hooks)==null?void 0:o.BeforeUpdate)==null||i.call(o,this.owner,e));let d=new Set(s),m=new Set,h=0,p=Se&&s.length>0?e.length!==s.length:!1;for(let f=0;f<e.length;f++){let y=e[f],v=typeof y=="object"&&y!==null&&!Ue(y),k=v?y._key:void 0,E=v?Bo(y):void 0;if(Se&&v&&k===void 0&&h++,k!==void 0){let w=u.get(k);if(w instanceof U&&w.tagName===E){u.delete(k);let O=this.items.indexOf(w);if(O!==f&&O>=0){let D=!!w._portal;this.move(O,f,D?!1:t,!0)}w.parent=this.owner,w.patch(y),m.add(w);continue}}else if(v){let w=this.items[f];if(w instanceof U&&w.key==null&&w.tagName===E&&d.has(w)&&!m.has(w)&&!w._imperative&&!w._beforeRemoveFired){w.parent=this.owner,w.patch(y),m.add(w);continue}}else{let w=this.items[f];if(w instanceof Ot&&d.has(w)&&!m.has(w)&&!w._imperative){w.setText(y==null?"":y),m.add(w);continue}}m.add(this.insert(y,f,t,!0,!0))}let S=this.items.slice(e.length);for(let f of S)f._imperative||this.remove(f,t,!0);if(u.forEach(f=>this.remove(f,t,!0)),Se&&s.length>0&&h>0&&p){let f=this.owner.nodeId;if(!At.has(f)){At.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)}}r||(a=(n=this.owner._hooks)==null?void 0:n.Update)==null||a.call(n,this.owner)}insert(e,t,r=!0,o=!1,i=!1){let n=this.items.length,a=typeof t!="number"||Number.isNaN(t)||t<0||t>n?n:t,s=this._createNode(e);if(s._imperative=!i,this.items.splice(a,0,s),s instanceof U){s._hooks.Insert&&s._hooks.Insert(s);let u=this.owner.domElement;if(r&&u)if(s._portal){let d=s._portal(this.owner.getRoot());d&&s.render(d)}else{let d=s._createDOMNode(),m=this._domReferenceAfter(a+1);u.insertBefore(d,m);let h=u.getRootNode(),p=h instanceof ShadowRoot?h:document.head,S=Ho(p);s.styles.render(S),s._hooks.Mount&&s._hooks.Mount(s),s.children.items.forEach(f=>{if(f instanceof U&&f._portal){let y=f._portal(f.getRoot());y&&f.render(y)}else f.render(d)})}}else{let u=this.owner.domElement;if(r&&u){let d=s._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),s}remove(e,t=!0,r=!1){let o=this.items.indexOf(e);if(!(o<0)){if(e instanceof U){if(e._beforeRemoveFired)return;let i=()=>{let n=e.domElement,a=this.items.indexOf(e);a>=0&&this.items.splice(a,1),t&&n&&n.remove(),e._dispose()};if(e._hooks.BeforeRemove&&e.domElement){let n=!1,a=()=>{n||(n=!0,i())},s=e._hooks.BeforeRemove;e._beforeRemoveFired=!0,s(e,a),s.length<2&&!n?a():Se&&!n&&setTimeout(()=>{n||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()}!r&&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 r=this.items.slice();for(let o of r)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,r=!0,o=!1){if(e<0||t<0||e>=this.items.length||t>=this.items.length||e===t)return;let i=this.items[e],n=this.items[t];this.items[e]=n,this.items[t]=i,r&&this._swapDomElement(i,n),!o&&this.owner.domElement&&this.owner._hooks.Update&&this.owner._hooks.Update(this.owner)}move(e,t,r=!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),r&&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}},xe=new Set,Vt=!1;function qo(e){xe.add(e),!Vt&&(Vt=!0,jt(Ko))}function Ko(){for(Vt=!1;xe.size>0;){let e=[...xe];xe.clear();for(let t of e)try{t()}catch(r){console.error("[Domphy] Uncaught error in effect:",r)}}}function Tn(){let e=0;for(;$o()||xe.size>0;){if(e++>1e4){console.error("[Domphy] flushSync did not settle");break}zo(),Ko()}}var We=[];function Mn(){return We.length?We[We.length-1]:null}function Wt(e){let t=Mn();t&&t._add(e)}var On=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 Se&&console.warn("[Domphy] effectScope.run() called after stop() \u2014 resources created inside are registered to the enclosing scope instead of this stopped one."),e();We.push(this);try{return e()}finally{We.pop()}}stop(){if(!this._stopped){this._stopped=!0;for(let e of this._disposers)e();this._disposers.clear()}}};function Dn(){let e=new On;return Wt(()=>e.stop()),e}function Yo(e){let t=!1,r=!1,o=()=>{t||n()},i=new Lo(()=>{t||qo(o)}),n=()=>{if(!(t||r)){r=!0,i.reset();try{Ro(i,e)}finally{r=!1}}},a=()=>{t||(t=!0,i.reset(),xe.delete(o))};return Wt(a),n(),a}function Pn(e){let t="computed",r=new qe,o,i=!0,n=!1,a=()=>{i&&r.listenerCount(t)>0&&d()},s=new Lo(()=>{i||(i=!0,qo(a))}),u=()=>{s.reset(),o=Ro(s,e),i=!1,n=!0},d=()=>{let h=o,p=n;u(),!(p&&o===h)&&r.notify(t,o)},m=h=>{if(h)r.addListener(t,h);else{let p=Ht();p&&r.addListener(t,p.handler)}return i&&(n&&r.listenerCount(t)>0?d():u()),o};return Wt(()=>{s.reset(),xe.delete(a),r._dispose()}),{_isState:!0,_notifier:r,get:m}}function Ln(e){return Io(e)}function Rn(e){return pn(e)}function In(e,t,r){let o,i=!0;return Yo(()=>{let n=typeof e=="function"?e():e.get();(!i||r!=null&&r.immediate)&&t(n,o),o=n,i=!1})}function $n(e){return e?Promise.resolve().then(e):Promise.resolve()}var zn=class{constructor(e){this._notifier=new qe,this.initialRecord=_o({},e),this._record=_o({},e)}get(e,t){if(t)this._notifier.addListener(e,t);else{let r=Ht();r&&this._notifier.addListener(e,r.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 mt={};rt(mt,{COLOR_ROLES:()=>ei,ElementTones:()=>Ke,applySystemTheme:()=>Qn,generateTheme:()=>ai,getTheme:()=>re,setTheme:()=>Gn,themeApply:()=>Xn,themeCSS:()=>Yt,themeColor:()=>l,themeColorToken:()=>eo,themeDensity:()=>b,themeFluidSpacing:()=>Jn,themeName:()=>ct,themeSize:()=>x,themeSpacing:()=>c,themeTokens:()=>or,themeVars:()=>st});var An=e=>{let t=r=>{let o=Math.max(0,Math.min(1,r)),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)},Vn=e=>{let t=r=>r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;return e.map(t)},Bn=e=>{let[t,r,o]=An(e);return t=t.toString(16).padStart(2,"0"),r=r.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),`#${t}${r}${o}`},at=e=>{let t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255;return Vn([t,r,o])},Nn=e=>{let t=.4122214708*e[0]+.5363325363*e[1]+.0514459929*e[2],r=.2119034982*e[0]+.6806995451*e[1]+.1073969566*e[2],o=.0883024619*e[0]+.2817188376*e[1]+.6299787005*e[2],i=Math.cbrt(t),n=Math.cbrt(r),a=Math.cbrt(o);return[.2104542553*i+.793617785*n-.0040720468*a,1.9779984951*i-2.428592205*n+.4505937099*a,.0259040371*i+.7827717662*n-.808675766*a]},Hn=e=>{let[t,r,o]=e,i=t+.3963377774*r+.2158037573*o,n=t-.1055613458*r-.0638541728*o,a=t-.0894841775*r-1.291485548*o,s=i*i*i,u=n*n*n,d=a*a*a;return[4.0767416621*s-3.3077115913*u+.2309699292*d,-1.2684380046*s+2.6097574011*u-.3413193965*d,-.0041960863*s-.7034186147*u+1.707614701*d]};var qt=e=>{let[t,r,o]=e,i=.4124564*t+.3575761*r+.1804375*o,n=.2126729*t+.7151522*r+.072175*o,a=.0193339*t+.119192*r+.9503041*o,s=.95047,u=1,d=1.08883,m=f=>f>.008856?Math.cbrt(f):7.787*f+16/116,h=m(i/s),p=m(n/u),S=m(a/d);return[116*p-16,500*(h-p),200*(p-S)]};var Zo=(e,t)=>{let[r,o,i]=e,[n,a,s]=t,u=(r+n)/2,d=Math.sqrt(o*o+i*i),m=Math.sqrt(a*a+s*s),h=(d+m)/2,p=.5*(1-Math.sqrt(Math.pow(h,7)/(Math.pow(h,7)+Math.pow(25,7)))),S=o*(1+p),f=a*(1+p),y=Math.sqrt(S*S+i*i),v=Math.sqrt(f*f+s*s),k=(y+v)/2,E=Math.atan2(i,S)*180/Math.PI+(Math.atan2(i,S)<0?360:0),w=Math.atan2(s,f)*180/Math.PI+(Math.atan2(s,f)<0?360:0),O=w-E;Math.abs(O)>180&&(O+=w<=E?360:-360);let D=Math.abs(E-w)>180?(E+w+360)/2:(E+w)/2,T=1-.17*Math.cos((D-30)*Math.PI/180)+.24*Math.cos(2*D*Math.PI/180)+.32*Math.cos((3*D+6)*Math.PI/180)-.2*Math.cos((4*D-63)*Math.PI/180),L=n-r,N=v-y,H=2*Math.sqrt(y*v)*Math.sin(O/2*Math.PI/180),j=1+.015*Math.pow(u-50,2)/Math.sqrt(20+Math.pow(u-50,2)),ye=1+.045*k,De=1+.015*k*T,ue=30*Math.exp(-Math.pow((D-275)/25,2)),W=-(2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))))*Math.sin(2*ue*Math.PI/180);return Math.sqrt(Math.pow(L/j,2)+Math.pow(N/ye,2)+Math.pow(H/De,2)+W*(N/ye)*(H/De))};var Go=e=>{if(e.length<1)return d=>0;let t=[...e].sort((d,m)=>d[0]-m[0]),r=[];for(let d=0;d<t.length;d++)(d===0||t[d][0]!==t[d-1][0])&&r.push(t[d]);let o=r.length;if(o===1)return d=>r[0][1];let i=r.map(d=>d[0]),n=r.map(d=>d[1]),a=[],s=[];for(let d=0;d<o-1;d++)a[d]=i[d+1]-i[d],s[d]=(n[d+1]-n[d])/a[d];let u=new Array(o);u[0]=s[0],u[o-1]=s[o-2];for(let d=1;d<o-1;d++){let m=s[d-1],h=s[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 n[0];if(d>=i[o-1])return n[o-1];let m=0,h=o-2,p=0;for(;m<=h;){let w=Math.floor((m+h)/2);if(d>=i[w]&&d<=i[w+1]){p=w;break}d<i[w]?h=w-1:m=w+1}let S=a[p],f=(d-i[p])/S,y=f*f,v=y*f,k=u[p]*S,E=u[p+1]*S;return(2*v-3*y+1)*n[p]+(v-2*y+f)*k+(-2*v+3*y)*n[p+1]+(v-y)*E}};var Xo=.605,Ut=.685;function jn(e){let t=Math.pow(e,Xo);return t/(1+Ut*(1-t))}function Fn(e){let t=e*(1+Ut)/(1+e*Ut);return Math.pow(t,1/Xo)}function Wn(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 Un(e){let t=[[0,0,0],...e,[1,1,1]].map(p=>Nn(p)).sort((p,S)=>p[0]-S[0]),r=t.map(p=>p[0]),o=t.map(p=>p[1]),i=t.map(p=>p[2]),n=[0],a=0;for(let p=1;p<t.length;p++)a+=Wn(t[p],t[p-1]),n.push(a);let s=n.map(p=>Fn(a>0?p/a:0)),u=e.length===1?0:s[1],d=e.length===1?1:s[s.length-2],m=Go(s.map((p,S)=>[p,o[S]])),h=Go(s.map((p,S)=>[p,i[S]]));return{colorAtParam:p=>{let S=jn(p),f=u+S*(d-u),y=0;for(let T=0;T<s.length-1;T++)if(f<=s[T+1]){y=T;break}let v=s[y],k=s[y+1],E=(f-v)/(k-v||1),w=r[y]+E*(r[y+1]-r[y]),O=m(f),D=h(f);return Hn([w,O,D])},parameters:s.slice(1,-1).map(p=>(p-u)/(d-u))}}function Jo(e,t){let r=Array.isArray(e)?e:[e];if(r.length===0)throw new Error("generateRamp requires at least one anchor color");if(t<=0)return[];if(t===1)return[r[0]];let{colorAtParam:o,parameters:i}=Un(r.map(at)),n=[],a=[0,...i,1],s=a.map(d=>Math.round(d*(t-1))),u=0;for(let d=0;d<t;d++){for(;u<s.length-2&&d>s[u+1];)u++;let m=s[u],h=s[u+1],p=a[u],S=a[u+1],f;if(h<=m)f=p;else{let y=(d-m)/(h-m);f=p+y*(S-p)}n.push(Bn(o(f)))}return n.reverse()}var qn={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","#ffe5e5","#ffcaca","#ffaeae","#ff9191","#ff7474","#ff5757","#f93a3a","#e82222","#d40f0f","#b80000","#9c0000","#800000","#640000","#480000","#2c0000","#140000","#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:{}},Ye=qn,Jt=e=>JSON.parse(JSON.stringify(e)),er=e=>e.replace(/[^a-zA-Z0-9_-]/g,"_"),$e={light:Jt(Ye),dark:Zn(Ye)},lt=null,Kt=new Map;function Qt(e){let t=Object.keys(e.colors)[0];return t?e.colors[t].length:0}function Kn(e){for(let t in e)if(!Object.keys(Ye).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(r=>Array.isArray(r)&&r.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(r=>typeof r=="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 tr(e,t){var r;for(let o of Object.keys(t))o==="__proto__"||o==="constructor"||o==="prototype"||(t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?((r=e[o])!=null||(e[o]={}),tr(e[o],t[o])):e[o]=t[o])}function Yn(e,t){let r={},o=Qt(t);for(let n in t){let a=t[n];if(n==="colors")for(let s in t.colors)[...Array(o).keys()].forEach(u=>r[`--${s}-${u}`]=t.colors[s][u]);else if(n==="fontSizes")[...Array(8).keys()].forEach(s=>r[`--fontSize-${s}`]=t.fontSizes[s]);else if(n==="custom"&&a&&typeof a=="object")for(let s in a)r[`--custom-${er(s)}`]=a[s]}let i="";for(let n in r)i+=` ${n}: ${r[n]};
|
|
3
3
|
`;return`[data-theme="${e}"] {
|
|
4
|
-
${i}}`}function re(e){if(
|
|
5
|
-
`)}function Yn(e){var t;if(typeof document!="undefined")if(e){e.textContent=Ut();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Ut(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Gn(e,t,r=320,o=1280){let i=e/4,n=t/4,a=(n-i)/(o-r)*100,s=i-a*r/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${n}em)`}function Zn(e=document.documentElement,t={}){let{persist:r=!0,storageKey:o="dp-theme"}=t,i=()=>{if(r){let s=localStorage.getItem(o);if(s==="light"||s==="dark")return s}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let n=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!r||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return n.addEventListener("change",a),()=>n.removeEventListener("change",a)}function st(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let r="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(r=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),r}var Xn=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],qt=["inherit"];[...Array(5).keys()].forEach(e=>{qt.push(`decrease-${e}`),qt.push(`increase-${e}`)});function Jn(e,t="inherit"){if(!qt.includes(t))throw Error(`density name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(4,r))}function Qn(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 r=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(r=Jn(r,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),r}function b(e){let t=Qn(e);return re(e?st(e):"light").densities[t]}var ei=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ti=[.75,1,1.5,2,2.5];function oi(e,t){let r=Ft(it(t)),o=0,i=1/0;for(let n=0;n<e.length;n++){let a=Ko(r,Ft(it(e[n])));a<i&&(i=a,o=n)}return o}function ri(e,t={}){var r,o,i,n,a,s;let u=(r=t.steps)!=null?r:18,d={},m={};for(let[h,p]of Object.entries(e)){let S=Go(p,u);d[h]=S,m[h]=oi(S,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:ei,densities:(n=t.densities)!=null?n:ti,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Kt=["inherit"];[...Array(8).keys()].forEach(e=>{Kt.push(`decrease-${e}`),Kt.push(`increase-${e}`)});function er(e,t="inherit"){if(!Kt.includes(t))throw Error(`size name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(7,r))}function ni(e){if(!e)return 2;let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataSize"));)t=t.parent;let r=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(r=er(r,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),r}function x(e,t="inherit"){let r=er(ni(e),t);return lt().fontSizes[r]}var fe=qe.colors.neutral.length,Yt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},Ue=["inherit","base",...Object.keys(Yt)];[...Array(fe).keys()].forEach(e=>{Ue.push(`decrease-${e}`),Ue.push(`increase-${e}`),Ue.push(`shift-${e}`)});function Zo(e,t){if(e<0||e>fe-1)return e;let r=e+t;return r=Math.max(0,Math.min(fe-1,r)),r}function ii(e,t){if(e<0||e>fe-1)return e;let r=Math.floor((fe-1)/2),o=e<=r?e+t:e-t;return o=Math.max(0,Math.min(fe-1,o)),o}function Ke(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!Ue.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Yt&&(t=Yt[t]),t.startsWith("increase-")){let r=parseInt(t.replace("increase-",""),10);return Zo(e,r)}else if(t.startsWith("decrease-")){let r=parseInt(t.replace("decrease-",""),10);return Zo(e,-r)}else if(t.startsWith("shift-")){let r=parseInt(t.replace("shift-",""),10);return ii(e,r)}else return e}function tr(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 r=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(r=Ke(r,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),r}function or(e,t,r){return r<=0?e:t==="lighten"&&e===0?r:t==="darken"&&e===fe-1?fe-1-r:e}function l(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r;if(!e){let s=lt()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[re("light").baseTones[o]]:s[Ke(0,t)]}let i=st(e),n;if(t==="base")n=re(i).baseTones[o];else{let s=re(i),u=or(tr(e),s.direction,s.darkBias);n=Ke(u,t)}let a=lt()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[n]}function Xt(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r,i=e?st(e):"light",n=Qo(i)[o];if(!n)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?n[re("light").baseTones[o]]:n[Ke(0,t)];let a;if(t==="base")a=re(i).baseTones[o];else{let s=re(i),u=or(tr(e),s.direction,s.darkBias);a=Ke(u,t)}return n[a]}var kt={};tt(kt,{abbreviation:()=>ai,accordion:()=>li,alert:()=>si,avatar:()=>ci,badge:()=>mi,blockquote:()=>ui,breadcrumb:()=>hi,breadcrumbEllipsis:()=>di,button:()=>gi,buttonGhost:()=>Jt,buttonSwitch:()=>yi,card:()=>vi,code:()=>Si,combobox:()=>ca,command:()=>ma,commandItem:()=>ha,commandSearch:()=>ua,datePicker:()=>fa,descriptionList:()=>ya,details:()=>ba,dialog:()=>va,divider:()=>Sa,drawer:()=>xa,emphasis:()=>wa,empty:()=>ka,errorBoundary:()=>Ca,fab:()=>_a,figure:()=>Ta,formGroup:()=>Ma,heading:()=>Da,horizontalRule:()=>Pa,icon:()=>La,image:()=>Ra,inputCheckbox:()=>Ia,inputColor:()=>$a,inputDateTime:()=>za,inputFile:()=>Aa,inputNumber:()=>Va,inputOTP:()=>Ba,inputPassword:()=>ja,inputRadio:()=>Fa,inputRange:()=>Wa,inputSearch:()=>Ua,inputSwitch:()=>qa,inputText:()=>Ka,keyboard:()=>Ya,label:()=>Ga,link:()=>Za,linkButton:()=>Qa,list:()=>el,listItem:()=>tl,listItemButton:()=>ol,mark:()=>rl,menu:()=>nl,motion:()=>il,orderedList:()=>al,pagination:()=>sl,panelSection:()=>cl,paragraph:()=>ml,popover:()=>ul,popoverArrow:()=>uo,preformated:()=>hl,progress:()=>dl,rating:()=>gl,ringProgress:()=>yl,row:()=>ho,scrollArea:()=>bl,segmented:()=>vl,select:()=>Sl,selectBox:()=>xl,selectItem:()=>wl,selectList:()=>kl,skeleton:()=>Cl,small:()=>El,spinner:()=>_l,splitter:()=>Tl,splitterHandle:()=>Ol,splitterPanel:()=>Ml,stack:()=>Dl,steps:()=>Pl,strong:()=>Ll,subscript:()=>Rl,superscript:()=>Il,table:()=>$l,tabs:()=>zl,tag:()=>Ze,textarea:()=>Al,timeline:()=>Vl,timelineItem:()=>Bl,toast:()=>Nl,toggleGroup:()=>Hl,toolbar:()=>jl,toolbarSpacer:()=>Fl,tooltip:()=>Wl,transitionGroup:()=>Ul,unorderedList:()=>ql});function ai(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:n=>x(n),backgroundColor:n=>l(n),color:n=>l(n,"shift-10",t.get(n)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:n=>l(n,"shift-7",t.get(n)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:n=>l(n,"shift-11",r.get(n)),textDecorationColor:n=>l(n,"shift-9",r.get(n))}}}}function _(e,t="primary"){let r=l(e,"surface"),o=l(e,"shift-9",t);return`0 0 0 2px ${r}, 0 0 0 4px ${o}`}function li(e={}){var i,n;let{type:t="single"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=d=>{let m=d.target.closest("summary");if(!m)return;let h=m.closest("details");!h||h.parentElement!==s||h.open||Array.from(s.querySelectorAll(":scope > details")).forEach(p=>{p!==h&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,outlineOffset:"-1px",color:a=>l(a,"text",r.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",r.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>_(a,o.get(a))}}}}function si(e={}){var r;let t=g((r=e.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderRadius:o=>c(b(o)*1.5),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function ci(e={}){var r;let t=g((r=e.color)!=null?r:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),boxShadow:o=>`0 0 0 1px ${l(o,"border",t.get(o))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function mi(e={}){var i;let{label:t=999}=e,r=g(t),o=g((i=e.color)!=null?i:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:n=>`"${r.get(n)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1.5),minWidth:c(5),height:c(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:n=>x(n,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:c(999),backgroundColor:n=>l(n,"shift-9",o.get(n)),color:n=>l(n,"shift-0",o.get(n)),boxShadow:n=>`0 0 0 1px ${l(n,"shift-0",o.get(n))}`}}}}function ui(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function hi(e={}){var o;let{separator:t="/"}=e,r=g((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>l(i,"text",r.get(i)),backgroundColor:i=>l(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",r.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",r.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}function di(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"muted",t.get(o)),borderRadius:c(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>_(o,t.get(o))}}}}var $e={small:"decrease-1",medium:"inherit",large:"increase-1"};var fi={small:.5,medium:1,large:1.5};function Jt(e={}){var i,n,a;let t=g((i=e.color)!=null?i:"neutral","color"),r=fi[(n=e.size)!=null?n:"medium"],o=$e[(a=e.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>x(s,o),paddingBlock:s=>c(b(s)*r),paddingInline:s=>c(b(s)*r),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>l(s,"shift-6",t.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"hover",t.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"increase-2",t.get(s))},"&:focus-visible":{boxShadow:s=>_(s,t.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>l(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var pi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function gi(e={}){var a,s,u,d;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return Jt({color:e.color,size:e.size});let r=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=pi[(u=e.size)!=null?u:"medium"],n=$e[(d=e.size)!=null?d:"medium"];return te(A({_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},o?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:m=>x(m,n),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>o?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>o?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:m=>o?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(m,r.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}function yi(e={}){var n,a;let{checked:t=!1}=e,r=g(t),o=g((n=e.color)!=null?n:"neutral","color"),i=g((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>r.get(s),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>x(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${l(s,"border",o.get(s))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>l(s,"inherit",o.get(s)),color:s=>l(s,"text",o.get(s)),"&:focus-visible":{boxShadow:s=>_(s,i.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:s=>l(s,"text"),backgroundColor:s=>l(s,"decrease-2",o.get(s))},"&[aria-checked=true]":{backgroundColor:s=>l(s,"increase-3",i.get(s)),outline:"none",color:s=>l(s,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var bi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function $(e){return bi[e]}function vi(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(b(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",boxShadow:$("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",color:o=>l(o,"shift-11",t.get(o)),margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),paddingBottom:o=>c(b(o)*2),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function Si(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var xi=Object.defineProperty,wi=Object.defineProperties,ki=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,rr=(e,t,r)=>t in e?xi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))dr.call(t,r)&&rr(e,r,t[r]);if(ut)for(var r of ut(t))fr.call(t,r)&&rr(e,r,t[r]);return e},Ce=(e,t)=>wi(e,ki(t)),pr=(e,t)=>{var r={};for(var o in e)dr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&ut)for(var o of ut(e))t.indexOf(o)<0&&fr.call(e,o)&&(r[o]=e[o]);return r},Te=(e,t,r)=>new Promise((o,i)=>{var n=u=>{try{s(r.next(u))}catch(d){i(d)}},a=u=>{try{s(r.throw(u))}catch(d){i(d)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(n,a);s((r=r.apply(e,t)).next())}),Ci=["top","right","bottom","left"],nr=["start","end"],lc=Ci.reduce((e,t)=>e.concat(t,`${t}-${nr[0]}`,`${t}-${nr[1]}`),[]),ht=Math.min,ke=Math.max,dt=Math.round,mt=Math.floor,ne=e=>({x:e,y:e}),Ei={left:"right",right:"left",bottom:"top",top:"bottom"};function ir(e,t,r){return ke(e,ht(t,r))}function gt(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function gr(e){return e==="x"?"y":"x"}function yr(e){return e==="y"?"height":"width"}function pe(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function br(e){return gr(pe(e))}function _i(e,t,r=!1){let o=yt(e),i=br(e),n=yr(i),a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=ft(a)),[a,ft(a)]}function Ti(e){let t=ft(e);return[to(e),t,to(t)]}function to(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var ar=["left","right"],lr=["right","left"],Mi=["top","bottom"],Oi=["bottom","top"];function Di(e,t,r){switch(e){case"top":case"bottom":return r?t?lr:ar:t?ar:lr;case"left":case"right":return t?Mi:Oi;default:return[]}}function Pi(e,t,r,o){let i=yt(e),n=Di(Ee(e),r==="start",o);return i&&(n=n.map(a=>`${a}-${i}`),t&&(n=n.concat(n.map(to)))),n}function ft(e){let t=Ee(e);return Ei[t]+e.slice(t.length)}function Li(e){return J({top:0,right:0,bottom:0,left:0},e)}function Ri(e){return typeof e!="number"?Li(e):{top:e,right:e,bottom:e,left:e}}function pt(e){let{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function sr({reference:e,floating:t},r,o){let i=pe(r),n=br(r),a=yr(n),s=Ee(r),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(s){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(yt(r)){case"start":p[n]-=h*(o&&u?-1:1);break;case"end":p[n]+=h*(o&&u?-1:1);break;default:}return p}function Ii(e){return Te(this,arguments,function*(t,r={}){var o,i,n,a,s,u;let{x:d,y:m,platform:h,rects:p,elements:S,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:k="floating",altBoundary:E=!1,padding:w=0}=gt(r,t),O=Ri(w),D=S[E?k==="floating"?"reference":"floating":k],T=pt(yield h.getClippingRect({element:(i=yield(o=h.isElement)==null?void 0:o.call(h,D))==null||i?D:D.contextElement||(yield(n=h.getDocumentElement)==null?void 0:n.call(h,S.floating)),boundary:y,rootBoundary:v,strategy:f})),L=k==="floating"?{x:d,y:m,width:p.floating.width,height:p.floating.height}:p.reference,N=yield(a=h.getOffsetParent)==null?void 0:a.call(h,S.floating),H=(yield(s=h.isElement)==null?void 0:s.call(h,N))?(yield(u=h.getScale)==null?void 0:u.call(h,N))||{x:1,y:1}:{x:1,y:1},j=pt(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:S,rect:L,offsetParent:N,strategy:f}):L);return{top:(T.top-j.top+O.top)/H.y,bottom:(j.bottom-T.bottom+O.bottom)/H.y,left:(T.left-j.left+O.left)/H.x,right:(j.right-T.right+O.right)/H.x}})}var $i=50,zi=(e,t,r)=>Te(null,null,function*(){var o;let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,u=s.detectOverflow?s:Ce(J({},s),{detectOverflow:Ii}),d=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:p}=sr(m,i,d),S=i,f=0,y={};for(let v=0;v<a.length;v++){let k=a[v];if(!k)continue;let{name:E,fn:w}=k,{x:O,y:D,data:T,reset:L}=yield w({x:h,y:p,initialPlacement:i,placement:S,strategy:n,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});h=O!=null?O:h,p=D!=null?D:p,y[E]=J(J({},y[E]),T),L&&f<$i&&(f++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(m=L.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:n}):L.rects),{x:h,y:p}=sr(m,S,d)),v=-1)}return{x:h,y:p,placement:S,strategy:n,middlewareData:y}});var Ai=(e={})=>({name:"flip",options:e,fn(t){return Te(this,null,function*(){var r,o,i,n,a,s;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:p,elements:S}=t,f=gt(e,t),{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:k,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,D=pr(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=d.arrow)!=null&&r.alignmentOffset)return{};let T=Ee(u),L=pe(h),N=Ee(h)===h,H=yield(o=p.isRTL)==null?void 0:o.call(p,S.floating),j=k||(N||!O?[ft(h)]:Ti(h)),ye=w!=="none";!k&&ye&&j.push(...Pi(h,O,w,H));let Oe=[h,...j],ue=yield p.detectOverflow(t,D),W=[],se=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ue[T]),v){let ce=_i(u,m,H);W.push(ue[ce[0]],ue[ce[1]])}if(se=[...se,{placement:u,overflows:W}],!W.every(ce=>ce<=0)){let ce=(((n=d.flip)==null?void 0:n.index)||0)+1,Ne=Oe[ce];if(Ne&&(!(v==="alignment"&&L!==pe(Ne))||se.every(q=>pe(q.placement)===L?q.overflows[0]>0:!0)))return{data:{index:ce,overflows:se},reset:{placement:Ne}};let be=(a=se.filter(q=>q.overflows[0]<=0).sort((q,Z)=>q.overflows[1]-Z.overflows[1])[0])==null?void 0:a.placement;if(!be)switch(E){case"bestFit":{let q=(s=se.filter(Z=>{if(ye){let X=pe(Z.placement);return X===L||X==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(X=>X>0).reduce((X,He)=>X+He,0)]).sort((Z,X)=>Z[1]-X[1])[0])==null?void 0:s[0];q&&(be=q);break}case"initialPlacement":be=h;break;default:}if(u!==be)return{reset:{placement:be}}}return{}})}});var Vi=new Set(["left","top"]);function Bi(e,t){return Te(this,null,function*(){var r;let{placement:o,platform:i,elements:n}=e,a=yield(r=i.isRTL)==null?void 0:r.call(i,n.floating),s=Ee(o),u=yt(o),d=pe(o)==="y",m=Vi.has(s)?-1:1,h=a&&d?-1:1,p=gt(t,e),{mainAxis:S,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:S*m}:{x:S*m,y:f*h}})}var Ni=(e=0)=>({name:"offset",options:e,fn(t){return Te(this,null,function*(){var r,o;let{x:i,y:n,placement:a,middlewareData:s}=t,u=yield Bi(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:n+u.y,data:Ce(J({},u),{placement:a})}})}}),Hi=(e={})=>({name:"shift",options:e,fn(t){return Te(this,null,function*(){let{x:r,y:o,placement:i,platform:n}=t,a=gt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:d={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=pr(a,["mainAxis","crossAxis","limiter"]),h={x:r,y:o},p=yield n.detectOverflow(t,m),S=pe(Ee(i)),f=gr(S),y=h[f],v=h[S];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],D=y-p[w];y=ir(O,y,D)}if(u){let E=S==="y"?"top":"left",w=S==="y"?"bottom":"right",O=v+p[E],D=v-p[w];v=ir(O,v,D)}let k=d.fn(Ce(J({},t),{[f]:y,[S]:v}));return Ce(J({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[f]:s,[S]:u}}})})}});function bt(){return typeof window!="undefined"}function Ve(e){return vr(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(vr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vr(e){return bt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return bt()?e instanceof Element||e instanceof Y(e).Element:!1}function me(e){return bt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function cr(e){return!bt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ge(e){let{overflow:t,overflowX:r,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}function ji(e){return/^(table|td|th)$/.test(Ve(e))}function vt(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Fi=/transform|translate|scale|rotate|perspective|filter/,Wi=/paint|layout|strict|content/,we=e=>!!e&&e!=="none",Qt;function ro(e){let t=Q(e)?ee(e):e;return we(t.transform)||we(t.translate)||we(t.scale)||we(t.rotate)||we(t.perspective)||!no()&&(we(t.backdropFilter)||we(t.filter))||Fi.test(t.willChange||"")||Wi.test(t.contain||"")}function Ui(e){let t=ge(e);for(;me(t)&&!Ae(t);){if(ro(t))return t;if(vt(t))return null;t=ge(t)}return null}function no(){return Qt==null&&(Qt=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qt}function Ae(e){return/^(html|body|#document)$/.test(Ve(e))}function ee(e){return Y(e).getComputedStyle(e)}function St(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(Ve(e)==="html")return e;let t=e.assignedSlot||e.parentNode||cr(e)&&e.host||ie(e);return cr(t)?t.host:t}function Sr(e){let t=ge(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&Ge(t)?t:Sr(t)}function Ye(e,t=[],r=!0){var o;let i=Sr(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(n){let s=oo(a);return t.concat(a,a.visualViewport||[],Ge(i)?i:[],s&&r?Ye(s):[])}else return t.concat(i,Ye(i,[],r))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xr(e){let t=ee(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=me(e),n=i?e.offsetWidth:r,a=i?e.offsetHeight:o,s=dt(r)!==n||dt(o)!==a;return s&&(r=n,o=a),{width:r,height:o,$:s}}function io(e){return Q(e)?e:e.contextElement}function ze(e){let t=io(e);if(!me(t))return ne(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:n}=xr(t),a=(n?dt(r.width):r.width)/o,s=(n?dt(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var qi=ne(0);function wr(e){let t=Y(e);return!no()||!t.visualViewport?qi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ki(e,t=!1,r){return!r||t&&r!==Y(e)?!1:t}function _e(e,t=!1,r=!1,o){let i=e.getBoundingClientRect(),n=io(e),a=ne(1);t&&(o?Q(o)&&(a=ze(o)):a=ze(e));let s=Ki(n,r,o)?wr(n):ne(0),u=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(n){let p=Y(n),S=o&&Q(o)?Y(o):o,f=p,y=oo(f);for(;y&&o&&S!==f;){let v=ze(y),k=y.getBoundingClientRect(),E=ee(y),w=k.left+(y.clientLeft+parseFloat(E.paddingLeft))*v.x,O=k.top+(y.clientTop+parseFloat(E.paddingTop))*v.y;u*=v.x,d*=v.y,m*=v.x,h*=v.y,u+=w,d+=O,f=Y(y),y=oo(f)}}return pt({width:m,height:h,x:u,y:d})}function xt(e,t){let r=St(e).scrollLeft;return t?t.left+r:_e(ie(e)).left+r}function kr(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-xt(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Yi({elements:e,rect:t,offsetParent:r,strategy:o}){let i=o==="fixed",n=ie(r),a=e?vt(e.floating):!1;if(r===n||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),d=ne(0),m=me(r);if((m||!m&&!i)&&((Ve(r)!=="body"||Ge(n))&&(s=St(r)),m)){let p=_e(r);u=ze(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}let h=n&&!m&&!i?kr(n,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-s.scrollTop*u.y+d.y+h.y}}function Gi(e){return Array.from(e.getClientRects())}function Zi(e){let t=ie(e),r=St(e),o=e.ownerDocument.body,i=ke(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=ke(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+xt(e),s=-r.scrollTop;return ee(o).direction==="rtl"&&(a+=ke(t.clientWidth,o.clientWidth)-i),{width:i,height:n,x:a,y:s}}var mr=25;function Xi(e,t){let r=Y(e),o=ie(e),i=r.visualViewport,n=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){n=i.width,a=i.height;let m=no();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let d=xt(o);if(d<=0){let m=o.ownerDocument,h=m.body,p=getComputedStyle(h),S=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-h.clientWidth-S);f<=mr&&(n-=f)}else d<=mr&&(n+=d);return{width:n,height:a,x:s,y:u}}function Ji(e,t){let r=_e(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,n=me(e)?ze(e):ne(1),a=e.clientWidth*n.x,s=e.clientHeight*n.y,u=i*n.x,d=o*n.y;return{width:a,height:s,x:u,y:d}}function ur(e,t,r){let o;if(t==="viewport")o=Xi(e,r);else if(t==="document")o=Zi(ie(e));else if(Q(t))o=Ji(t,r);else{let i=wr(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return pt(o)}function Cr(e,t){let r=ge(e);return r===t||!Q(r)||Ae(r)?!1:ee(r).position==="fixed"||Cr(r,t)}function Qi(e,t){let r=t.get(e);if(r)return r;let o=Ye(e,[],!1).filter(s=>Q(s)&&Ve(s)!=="body"),i=null,n=ee(e).position==="fixed",a=n?ge(e):e;for(;Q(a)&&!Ae(a);){let s=ee(a),u=ro(a);!u&&s.position==="fixed"&&(i=null),(n?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Ge(a)&&!u&&Cr(e,a))?o=o.filter(d=>d!==a):i=s,a=ge(a)}return t.set(e,o),o}function ea({element:e,boundary:t,rootBoundary:r,strategy:o}){let i=[...t==="clippingAncestors"?vt(e)?[]:Qi(e,this._c):[].concat(t),r],n=ur(e,i[0],o),a=n.top,s=n.right,u=n.bottom,d=n.left;for(let m=1;m<i.length;m++){let h=ur(e,i[m],o);a=ke(h.top,a),s=ht(h.right,s),u=ht(h.bottom,u),d=ke(h.left,d)}return{width:s-d,height:u-a,x:d,y:a}}function ta(e){let{width:t,height:r}=xr(e);return{width:t,height:r}}function oa(e,t,r){let o=me(t),i=ie(t),n=r==="fixed",a=_e(e,!0,n,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function d(){u.x=xt(i)}if(o||!o&&!n)if((Ve(t)!=="body"||Ge(i))&&(s=St(t)),o){let S=_e(t,!0,n,t);u.x=S.x+t.clientLeft,u.y=S.y+t.clientTop}else i&&d();n&&!o&&i&&d();let m=i&&!o&&!n?kr(i,s):ne(0),h=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:h,y:p,width:a.width,height:a.height}}function eo(e){return ee(e).position==="static"}function hr(e,t){if(!me(e)||ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ie(e)===r&&(r=r.ownerDocument.body),r}function Er(e,t){let r=Y(e);if(vt(e))return r;if(!me(e)){let i=ge(e);for(;i&&!Ae(i);){if(Q(i)&&!eo(i))return i;i=ge(i)}return r}let o=hr(e,t);for(;o&&ji(o)&&eo(o);)o=hr(o,t);return o&&Ae(o)&&eo(o)&&!ro(o)?r:o||Ui(e)||r}var ra=function(e){return Te(this,null,function*(){let t=this.getOffsetParent||Er,r=this.getDimensions,o=yield r(e.floating);return{reference:oa(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function na(e){return ee(e).direction==="rtl"}var ia={convertOffsetParentRelativeRectToViewportRelativeRect:Yi,getDocumentElement:ie,getClippingRect:ea,getOffsetParent:Er,getElementRects:ra,getClientRects:Gi,getDimensions:ta,getScale:ze,isElement:Q,isRTL:na};function _r(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aa(e,t){let r=null,o,i=ie(e);function n(){clearTimeout(o),r==null||r.disconnect(),r=null}function a(s=!1,u=1){n();let d=e.getBoundingClientRect(),{left:m,top:h,width:p,height:S}=d;if(s||t(),!p||!S)return;let f=mt(h),y=mt(i.clientWidth-(m+p)),v=mt(i.clientHeight-(h+S)),k=mt(m),E={rootMargin:`${-f}px ${-y}px ${-v}px ${-k}px`,threshold:ke(0,ht(1,u))||1},w=!0;function O(D){let T=D[0].intersectionRatio;if(T!==u){if(!w)return a();T?a(!1,T):o=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!_r(d,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(O,Ce(J({},E),{root:i.ownerDocument}))}catch(D){r=new IntersectionObserver(O,E)}r.observe(e)}return a(!0),n}function Tr(e,t,r,o={}){let{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=io(e),m=i||n?[...d?Ye(d):[],...t?Ye(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",r,{passive:!0}),n&&k.addEventListener("resize",r)});let h=d&&s?aa(d,r):null,p=-1,S=null;a&&(S=new ResizeObserver(([k])=>{k&&k.target===d&&S&&t&&(S.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{S==null||S.observe(t)})),r()}),d&&!u&&S.observe(d),t&&S.observe(t));let f,y=u?_e(e):null;u&&v();function v(){let k=_e(e);y&&!_r(y,k)&&r(),y=k,f=requestAnimationFrame(v)}return r(),()=>{m.forEach(k=>{i&&k.removeEventListener("scroll",r),n&&k.removeEventListener("resize",r)}),h==null||h(),S==null||S.disconnect(),S=null,u&&cancelAnimationFrame(f)}}var Mr=Ni;var Or=Hi,Dr=Ai;var Pr=(e,t,r)=>{let o=new Map,i=J({platform:ia},r),n=Ce(J({},i.platform),{_c:o});return zi(e,t,Ce(J({},i),{platform:n}))};function la(e,t){var D;let{openState:r,placement:o,content:i,keepOpenOnContentHover:n}=t,a=null,s=null,u=null,d=null,m=!1,h=e.domElement,p=e.getRoot(),S={style:{position:"fixed",pointerEvents:"auto",visibility:T=>r.get(T)?"visible":"hidden"},onKeyDown:T=>{T.key==="Escape"&&w()},onMouseEnter:()=>n&&E(),onMouseLeave:()=>n&&w(),_onMount:T=>{var L;if(u=T.domElement,h&&u&&!u.hasAttribute("data-theme")){let N=(L=h.closest("[data-theme]"))==null?void 0:L.getAttribute("data-theme");N&&u.setAttribute("data-theme",N)}},_portal:T=>{let L=T.domElement.querySelector("#domphy-floating");if(!L){let N={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};L=T.children.insert(N).domElement}return L}},f=T=>z(T,S);f(i);let y=()=>{m||(m=!0,d=p.children.insert(i))},v=()=>{y(),h&&u&&(s==null||s(),s=Tr(h,u,()=>{Pr(h,u,{placement:o.get(),middleware:[Mr(12),Dr(),Or()],strategy:"fixed"}).then(({x:T,y:L,placement:N})=>{u&&(Object.assign(u.style,{left:`${T}px`,top:`${L}px`}),o.set(N))})}),r.set(!0))},k=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),u=null,m=!1,r.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(v,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(k,100)},O=T=>{if(!r.get()||!h||!u)return;let L=T.target;!h.contains(L)&&!u.contains(L)&&w()};return(D=p.domElement)==null||D.addEventListener("click",O),{show:E,hide:w,update(T){r=T.openState,o=T.placement,i=T.content,n=T.keepOpenOnContentHover,f(i),d&&d.patch(i)},destroy(){var T;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(T=p.domElement)==null||T.removeEventListener("click",O)}}}function ae(e){let{kind:t,open:r=!1,placement:o}=e,i=g(r),n=`floating:${t}`,a=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.show()},s=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.hide()},u=A({onKeyDown:(d,m)=>d.key==="Escape"&&s(m)},Nt(n,la,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var sa='<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 Ze(e={}){var o;let{removable:t=!1}=e,r=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let n={span:sa,onClick:a=>{a.stopPropagation(),i.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>l(a,"shift-4",r.get(a))},"&:focus-visible":{boxShadow:a=>_(a,r.get(a))}}};t&&i.children.insert(n)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(999),paddingInlineStart:c(2.5),paddingInlineEnd:t?c(1):c(2.5),gap:c(1.5),fontSize:i=>x(i,"decrease-1"),backgroundColor:i=>l(i,"inherit",r.get(i)),color:i=>l(i,"text",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",r.get(i))}`}}}function ca(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"combobox",open:s,placement:g(r),content:e.content}),h={onClick:(v,k)=>!n&&d(k),dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o)},S;if(e.input){let v={onFocus:(k,E)=>u(E),style:p,_key:"combobox-input"};z(e.input,v),S=e.input}else S={input:null,onFocus:(v,k)=>u(k),value:v=>(a.get(v),""),style:p,_key:"combobox-input"};let f={div:v=>{let k=a.get(v),E=Array.isArray(k)?k:[k],O=t.filter(D=>E.includes(D.value)).map(D=>({span:D.label,$:[Ze({color:o,removable:!0})],_key:D.value,_onRemove:T=>{let L=a.get(),H=(Array.isArray(L)?L:[L]).filter(j=>j!==D.value);n?a.set(H):a.set(H[0])}}));return O.push(S),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},y={_onInsert:v=>{v.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:v=>v.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:v=>`1px solid ${l(v,"border-strong","neutral")}`,paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*1),borderRadius:v=>c(b(v)*1.5),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:v=>_(v,o)}}};return z(m,y),m}function ma(){return{_onSchedule:(e,t)=>{z(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ua(e={}){let{color:t="neutral",accentColor:r="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 n=o.domElement,a=()=>i.query.set(n.value);n.addEventListener("input",a),o.addHook("Remove",()=>n.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"border",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",r),boxShadow:o=>_(o,r)}}}}function ha(e={}){let{color:t="neutral",accentColor:r="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 n=o.domElement,a=(m=(d=n.textContent)==null?void 0:d.toLowerCase())!=null?m:"",s=h=>{n.hidden=h.length>0&&!a.includes(h.toLowerCase())};s(i.query.get());let u=i.query.addListener(s);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"inherit",t),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{boxShadow:o=>_(o,r)}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Me=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),ao=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Xe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),lo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,so=(e,t)=>Me(e,-((e.getDay()-t+7)%7));function da(e){var t,r;try{let o=new Intl.Locale(e),i=(r=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?r:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function fa(e={}){var fo,po,go,yo;let{mode:t="single",time:r=!1,min:o,max:i,disabledDate:n,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,d=(fo=e.weekStartsOn)!=null?fo:da(a),m=g((po=e.accentColor)!=null?po:"primary","accentColor"),h=g((go=e.placement)!=null?go:"bottom-start"),p=g((yo=e.value)!=null?yo:t==="range"?[null,null]:null),S=u?p.addListener(C=>u(C)):null,f=(()=>{let C=p.get(),M=t==="range"?C==null?void 0:C[0]:C;return M instanceof Date?M:new Date})(),y=g(f.getFullYear(),"viewYear"),v=g(f.getMonth(),"viewMonth"),k=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),D=null,T=new Intl.DateTimeFormat(a,A({dateStyle:"medium"},r?{timeStyle:"short"}:{})),L=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),N=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=C=>C?T.format(C):"",ye=C=>{if(s)return s(C);if(t==="range"){let[M,P]=C!=null?C:[null,null];return M?`${j(M)} \u2013 ${j(P)}`:""}return j(C)},Oe=Array.from({length:7},(C,M)=>N.format(new Date(2023,0,1+(M+d)%7))),ue=C=>!!o&&F(C)<F(o)||!!i&&F(C)>F(i)||!!n&&n(C),W=C=>{if(!r)return F(C);let M=F(C);return M.setHours(w.get(),O.get(),0,0),M},se=C=>{var R;if(ue(C))return;if(t==="single"){p.set(W(C)),r||Et();return}let[M,P]=(R=p.get())!=null?R:[null,null];!M||M&&P?p.set([W(C),null]):F(C)<F(M)?(p.set([W(C),W(M)]),r||Et()):(p.set([M,W(C)]),r||Et())},ce=()=>{var C;if(r)if(t==="single"){let M=p.get();M&&p.set(W(M))}else{let[M,P]=(C=p.get())!=null?C:[null,null];p.set([M&&W(M),P&&W(P)])}},Ne=(C,M)=>{var De;if(t!=="range")return!1;let[P,R]=(De=p.get(M))!=null?De:[null,null],V=R!=null?R:E.get(M);if(!P||!V)return!1;let I=F(P)<=F(V)?P:V,G=F(P)<=F(V)?V:P,K=F(C);return K>=F(I)&&K<=F(G)},be=(C,M)=>{let P=p.get(M);if(t==="range"){let[R,V]=P!=null?P:[null,null];return Xe(C,R)||Xe(C,V)}return Xe(C,P)},q=C=>{y.set(C.getFullYear()),v.set(C.getMonth())},Z=C=>{let M=ao(new Date(y.get(),v.get(),1),C);q(M)},X=C=>y.set(y.get()+C),He=()=>{setTimeout(()=>{var C;(C=D==null?void 0:D.querySelector(`[data-date="${lo(k.get())}"]`))==null||C.focus()},0)},Nr=Ur(),{show:Hr,hide:jr,anchorPartial:Ct}=ae({kind:"datePicker",open:!1,placement:h,content:Nr});function Et(){jr()}Ct.onClick=()=>{};let Fr={type:"text",readonly:!0,value:C=>ye(p.get(C)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(C,M)=>{_t(M)},onFocus:(C,M)=>{_t(M)},onKeyDown:(C,M)=>{let P=C.key;(P==="ArrowDown"||P==="Enter")&&(C.preventDefault(),_t(M))},_onMount:C=>S&&C.addHook("Remove",()=>{S()})};function _t(C){var P;let M=(P=Wr())!=null?P:new Date;k.set(F(M)),q(M),Hr(C),He()}function Wr(){var M;let C=p.get();return t==="range"?(M=C==null?void 0:C[0])!=null?M:null:C!=null?C:null}return z(Ct,Fr),Ct;function Ur(){let C=(I,G,K)=>({button:I,type:"button",ariaLabel:G,onClick:K,style:pa()}),M={div:[C("\xAB","Previous year",()=>X(-1)),C("\u2039","Previous month",()=>Z(-1)),{div:I=>L.format(new Date(y.get(I),v.get(I),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:I=>x(I)}},C("\u203A","Next month",()=>Z(1)),C("\xBB","Next year",()=>X(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},P={div:Oe.map((I,G)=>({div:I,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"bold",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:Lr()},R={div:I=>qr(I),role:"grid",ariaLabel:"Calendar",onKeyDown:Zr,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},V=[M,P,R];return r&&V.push(Yr()),V.push(Gr()),{div:V,role:"dialog",ariaModal:"false",_onMount:I=>{D=I.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:I=>c(b(I)*2),backgroundColor:I=>l(I,"base"),color:I=>l(I,"shift-10"),border:I=>`1px solid ${l(I,"border-strong")}`,boxShadow:$("medium")}}}function qr(C){let M=new Date(y.get(C),v.get(C),1),P=v.get(C),R=so(M,d),V=[];for(let I=0;I<6;I++){let G=[];for(let K=0;K<7;K++){let De=Me(R,I*7+K);G.push(Kr(De,P,C))}V.push({div:G,role:"row",style:Lr(),_key:I})}return V}function Kr(C,M,P){let R=ue(C),V=be(C,P),I=Ne(C,P),G=C.getMonth()!==M,K=Xe(C,k.get(P)),De=Xe(C,new Date);return{button:String(C.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:V,ariaDisabled:R,disabled:R,ariaLabel:H.format(C),dataDate:lo(C),onClick:()=>se(C),onMouseEnter:()=>t==="range"&&E.set(C),style:{appearance:"none",border:"none",cursor:R?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:B=>x(B),fontFamily:"inherit",opacity:R?.35:G?.5:1,backgroundColor:B=>V?l(B,"shift-7",m.get(B)):I?l(B,"hover",m.get(B)):"transparent",color:B=>V?l(B,"shift-0",m.get(B)):l(B,"text"),outline:De?B=>`1px solid ${l(B,"shift-6",m.get(B))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:B=>V?l(B,"shift-7",m.get(B)):l(B,"shift-3",m.get(B))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:B=>_(B,m.get(B))}},_key:lo(C)}}function Yr(){let C=(M,P,R)=>({select:Array.from({length:M},(V,I)=>({option:String(I).padStart(2,"0"),value:String(I),selected:G=>P.get(G)===I,_key:I})),ariaLabel:R,onChange:V=>{P.set(Number(V.target.value)),ce()},style:ga()});return{div:[C(24,w,"Hour"),{span:":",style:{fontWeight:"bold"}},C(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Gr(){let C=(M,P)=>({button:M,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:R=>x(R,"decrease-1"),color:R=>l(R,"muted",m.get(R)),padding:c(1)}});return{div:[C("Today",()=>{let M=new Date;k.set(F(M)),q(M),He()}),C("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:M=>`1px solid ${l(M,"border")}`}}}function Zr(C){let M=C,P=k.get(),R=null;switch(M.key){case"ArrowLeft":R=Me(P,-1);break;case"ArrowRight":R=Me(P,1);break;case"ArrowUp":R=Me(P,-7);break;case"ArrowDown":R=Me(P,7);break;case"Home":R=so(P,d);break;case"End":R=Me(so(P,d),6);break;case"PageUp":R=ao(P,M.shiftKey?-12:-1);break;case"PageDown":R=ao(P,M.shiftKey?12:1);break;case"Enter":case" ":M.preventDefault(),se(P);return;default:return}M.preventDefault(),k.set(R),q(R),He()}}function Lr(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function pa(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>l(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function ga(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${l(e,"border-strong")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"text")}}function ya(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}}function ba(e={}){var i,n;let{duration:t=240}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",r.get(a)),color:a=>l(a,"shift-10",r.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(b(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:`-${c(.5)}`,borderInlineEnd:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(b(a)*2),boxShadow:a=>_(a,o.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:c(250),opacity:1,paddingTop:a=>c(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var Je=0;function wt(){Je++,Je===1&&(document.body.style.overflow="hidden")}function Be(){Je=Math.max(0,Je-1),Je===0&&(document.body.style.overflow="")}var Rr='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function va(e={}){let{color:t="neutral",open:r=!1}=e,o=g(r),i=null,n=!1,a=!1,s=u=>{n=!1,typeof u.close=="function"&&u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Be(),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)=>{n&&u.target===d.domElement&&u.propertyName==="opacity"&&s(d.domElement)},_onMount:u=>{let d=u.domElement;d.setAttribute("aria-modal","true");let m=null,h=y=>{if(y.key!=="Tab")return;let v=Array.from(d.querySelectorAll(Rr)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!v.length){y.preventDefault();return}let k=v[0],E=v[v.length-1];y.shiftKey?(document.activeElement===k||document.activeElement===d)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),k.focus())},p=y=>{y.preventDefault(),o.set(!1)};d.addEventListener("cancel",p);let S=y=>{y?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(wt(),a=!0),d.addEventListener("keydown",h),requestAnimationFrame(()=>{d.style.opacity="1";let v=d.querySelector(Rr);v==null||v.focus()})):(n=!0,d.style.opacity="0",d.removeEventListener("keydown",h),m=setTimeout(()=>{m=null,n&&s(d)},350))};S(o.get());let f=o.addListener(S);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),d.removeEventListener("cancel",p),a&&(Be(),a=!1),d.removeEventListener("keydown",h),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:u=>x(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",borderRadius:u=>c(b(u)*2),padding:u=>c(b(u)*3),boxShadow:$("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function Sa(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var co={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Ir={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Qe=e=>e==="left"||e==="right";function $r(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function xa(e={}){let{color:t="neutral",open:r=!1,placement:o="end",size:i}=e,n=g(r),a=o==="start"||o==="end",s=$r(o,!1),u=Qe(s)?c(80):c(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&&n.set(!1)},_onMount:m=>{let h=m.domElement;h.setAttribute("aria-modal","true");let p=T=>{T.preventDefault(),n.set(!1)};h.addEventListener("cancel",p);let S=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),f=$r(o,S);a&&(h.style.transform=co[f],h.style.margin=Ir[f],h.style.width=Qe(f)?d:"100dvw",h.style.height=Qe(f)?"100dvh":d);let y=!1,v=!1,k=null,E=()=>{k=null,y&&(y=!1,typeof h.close=="function"&&h.close(),h.style.visibility="hidden",h.style.pointerEvents="none",v&&(Be(),v=!1))},w=T=>{T.target===h&&T.propertyName==="transform"&&E()};h.addEventListener("transitionend",w);let O=T=>{T?(y=!1,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),v||(wt(),v=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(y=!0,h.style.transform=co[f],k=setTimeout(E,350))};O(n.get());let D=n.addListener(O);m.addHook("Remove",()=>{k&&(clearTimeout(k),k=null),D(),h.removeEventListener("cancel",p),h.removeEventListener("transitionend",w),v&&(Be(),v=!1)})},style:{transform:co[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>c(b(m)*3),margin:Ir[s],width:Qe(s)?d:"100dvw",height:Qe(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:$("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function wa(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function ka(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>l(o,"muted",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o)),opacity:.9},"& > :nth-child(2)":{color:o=>l(o,"text",t.get(o))}}}}function Ca(e={}){return{_onError:(t,r,o)=>{var n,a;(n=e.onError)==null||n.call(e,r);let i=typeof e.fallback=="function"?e.fallback(r,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var Ea={small:8,medium:10,large:14};function _a(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=c(Ea[(i=e.size)!=null?i:"medium"]);return{_onInsert:n=>{n.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"shift-13",t.get(n)),color:n=>l(n,"shift-0","neutral"),boxShadow:$("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:n=>l(n,"shift-14",t.get(n)),boxShadow:$("medium")},"&:active:not([disabled])":{backgroundColor:n=>l(n,"shift-15",t.get(n)),boxShadow:$("low")},"&:focus-visible":{boxShadow:n=>`${$("medium")}, ${_(n,t.get(n))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function Ta(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>l(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>l(o,"muted",t.get(o)),lineHeight:1.45}}}}function Ma(e={}){var i;let{layout:t="horizontal"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:n=>{n.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*3),border:"none",borderRadius:n=>c(b(n)*2),fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"inherit",r.get(n)),color:n=>l(n,"text",r.get(n)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:n=>x(n,"inherit"),fontWeight:600,paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*2),color:n=>l(n,"text",r.get(n)),backgroundColor:n=>l(n,"inherit",r.get(n))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:n=>o?0:c(b(n)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:n=>x(n,"decrease-1"),color:n=>l(n,"text",r.get(n))}}}}var Oa={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Da(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=Oa[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Pa(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function La(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>l(o,"text",t.get(o))}}}function Ra(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function Ia(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:n=>`${c(.5)} solid ${l(n,"inherit",r.get(n))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-3",r.get(n))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:c(1.5),boxShadow:n=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function $a(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{type:"color",_onSchedule:(o,i)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),paddingBlock:o=>c(b(o)*1),paddingInline:o=>c(b(o)*1),blockSize:o=>c(6+b(o)*2),inlineSize:o=>c(6+b(o)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:o=>c(b(o)*1.5),"&:focus-visible":{boxShadow:o=>_(o,t.get(o))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>c(b(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`}}}}function za(e={}){var i,n;let{mode:t="datetime-local"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{type:t,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,borderRadius:a=>c(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>_(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-6","error")}`}}}}function Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(b(n)*1.5),height:n=>c(6+b(n)*2),paddingInline:n=>c(b(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:n=>c(b(n)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:n=>l(n,"shift-11",t.get(n)),backgroundColor:n=>l(n,"surface",t.get(n))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,backgroundColor:n=>l(n,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-3","neutral")}}}}function Va(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:n=>c(b(n)*3),paddingInlineEnd:n=>c(b(n)*1.5),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")}}}}function Ba(){return{style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,r=()=>Array.from(t.querySelectorAll("input")),o=a=>{let s=r(),u=a.target,d=s.indexOf(u);u.value&&d<s.length-1&&s[d+1].focus()},i=a=>{let s=r(),u=a.target,d=s.indexOf(u);a.key==="Backspace"&&!u.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},n=a=>{var p,S,f;a.preventDefault();let s=(S=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?S:"",u=r(),d=u.indexOf(a.target),m=d===-1?0:d;[...s].forEach((y,v)=>{u[m+v]&&(u[m+v].value=y)});let h=Math.min(m+s.length-1,u.length-1);(f=u[h])==null||f.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",n),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",n)})}}}var Na='<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>',Ha='<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 ja(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((n=e.accentColor)!=null?n:"primary","accentColor"),o=g(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type: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)?Ha:Na,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(s),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,color:a=>l(a,"text",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-within":{boxShadow:a=>_(a,r.get(a))}}}}function Fa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:n=>{if(n.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:"50%",boxShadow:n=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Wa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:n=>l(n,"shift-3",t.get(n))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:n=>l(n,"shift-9",r.get(n))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:n=>l(n,"shift-10",r.get(n))},borderRadius:c(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ua(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(b(n)*1.5),minWidth:c(32),paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7",t.get(n))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`}}}}function qa(e={}){var r;let t=g((r=e.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit"),color:o=>l(o,"text"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),transition:"box-shadow 140ms ease",borderRadius:c(999),"&:focus-visible":{boxShadow:o=>_(o,t.get(o))},"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ka(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7")},"&:not(:placeholder-shown)":{color:n=>l(n,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=error]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=warning]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","warning")}`}}}}function Ya(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`}}}function Ga(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),cursor:"pointer","&:focus-within":{color:n=>l(n,"shift-10",r.get(n))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}function Za(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=g((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:n=>{n.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n),color:n=>l(n,"shift-13",t.get(n)),textDecoration:"none","&:visited":{color:n=>l(n,"shift-13",r.get(n))},"&:hover:not([disabled])":{color:n=>l(n,"shift-14",t.get(n)),textDecoration:"underline"},borderRadius:c(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}var Xa={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},Ja={small:.5,medium:1,large:1.5};function Qa(e={}){var s,u,d;let t=(s=e.variant)!=null?s:"outline",r=g((u=e.color)!=null?u:t==="ghost"?"neutral":"primary","color"),o=(d=e.size)!=null?d:"medium",i=$e[o];if(t==="ghost"){let m=Ja[o];return{_onInsert:h=>{h.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:h=>x(h,i),textDecoration:"none",paddingBlock:h=>c(b(h)*m),paddingInline:h=>c(b(h)*m),borderRadius:h=>c(b(h)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:h=>c(b(h)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:h=>l(h,"shift-6",r.get(h)),"&:hover:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"hover",r.get(h)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"increase-2",r.get(h))},"&:focus-visible":{boxShadow:h=>_(h,r.get(h))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:h=>l(h,"border-strong","neutral")}}}}let n=t==="solid",a=Xa[o];return te(A({_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},n?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:m=>x(m,i),textDecoration:"none",paddingBlock:m=>c(b(m)*a.block),paddingInline:m=>c(b(m)*a.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:n?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>n?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>n?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([aria-disabled=true])":{backgroundColor:m=>n?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(m,r.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")}}})}function el(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function tl(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:r=>c(b(r)*2),paddingBlock:r=>c(t?1:b(r)*2),paddingInline:r=>c(b(r)*3),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text")}}}function ol(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=(n=e.accentColor)!=null?n:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&:active:not([disabled])":{backgroundColor:a=>l(a,"increase-2",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",r),color:a=>l(a,"shift-12",r)},"&:focus-visible":{boxShadow:a=>_(a,r)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function rl(e={}){var r;let t=g((r=e.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function nl(e={items:[]}){var a;let{items:t=[],selectable:r=!0,color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-17",_onSchedule:(s,u)=>{if(t.length===0)return;let d=s.nodeId,m=t.map((h,p)=>{var f;let S=(f=h.key)!=null?f:p;return te(A({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:S,type:"button",id:`menuitem${d}${S}`,role:"menuitem"},r?{ariaCurrent:y=>n.get(y)===S||void 0}:{}),{onClick:()=>{var y;r&&n.set(S),(y=h.onClick)==null||y.call(h)},onKeyDown:y=>{var O;let v=y.key;if(v==="Enter"||v===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(v))return;y.preventDefault();let k=t.map((D,T)=>{var L;return(L=D.key)!=null?L:T}),E=k.indexOf(S),w=E;v==="ArrowDown"?w=(E+1)%k.length:v==="ArrowUp"?w=(E-1+k.length)%k.length:v==="Home"?w=0:v==="End"&&(w=k.length-1),(O=document.getElementById(`menuitem${d}${k[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"shift-17",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-13",i)},"&:focus-visible":{boxShadow:y=>_(y,i)}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:$("medium")}}}var mo=e=>!!e&&typeof e.get=="function"&&e._isState===!0,le=e=>{let t={},r=[];for(let o in e){let i=e[o];o==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?r.push(`scale(${i})`):o==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return r.length&&(t.transform=r.join(" ")),t};function zr(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function il(e={}){var a,s,u,d;let{initial:t,animate:r,exit:o,transition:i={}}=e,n={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s: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=mo(r)?r.get():r;if(zr()){if(p?Object.assign(h.style,le(p)):t&&Object.assign(h.style,le(t)),mo(r)){let S=r.addListener(f=>{Object.assign(h.style,le(f))});m.setMetadata("motionRelease",S)}return}if(p?h.animate(t?[le(t),le(p)]:[le(p)],n):t&&Object.assign(h.style,le(t)),mo(r)){let S=r.addListener(f=>{h.animate([le(f)],n)});m.setMetadata("motionRelease",S)}},_onBeforeRemove:(m,h)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return h();if(zr())return Object.assign(p.style,le(o)),h();p.animate([le(o)],n).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function al(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function ll(e,t){if(t<=7)return Array.from({length:t},(n,a)=>a+1);let r=[1];e>3&&r.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let n=o;n<=i;n++)r.push(n);return e<t-2&&r.push("..."),r.push(t),r}function sl(e){var s;let{total:t,color:r="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),n={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-13",r),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:u=>l(u,"shift-13",r),backgroundColor:u=>l(u,"hover",r)},"&:focus-visible":{boxShadow:u=>_(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=te(A({},n),{backgroundColor:u=>l(u,"shift-13",o),color:u=>l(u,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-13",o)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_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:n});let S=0;for(let f of ll(h,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${S++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",r)}});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:n})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:h>=t,onClick:()=>h<t&&i.set(h+1),style:n}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function cl(e={}){var i;let{padding:t=4,divider:r=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:A({padding:n=>c(b(n)*t)},r?{borderBottom:n=>`1px solid ${l(n,"border",o.get(n))}`}:{})}}function ml(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function ul(e){var p;let{open:t=!1,placement:r="bottom",openOn:o="click"}=e,i=null,n=g(t),a=g(r),{show:s,hide:u,anchorPartial:d}=ae({kind:"popover",open:n,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")},_onInsert:S=>{let f=S.attributes.get("id");i=f||S.nodeId,!f&&S.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),z(d,{ariaHaspopup:"dialog",ariaExpanded:S=>n.get(S),onMouseEnter:(S,f)=>o==="hover"&&s(f),onMouseLeave:(S,f)=>o==="hover"&&u(f),onClick:(S,f)=>{o==="click"&&(n.get()?u(f):s(f))},onKeyDown:(S,f)=>{S.key==="Escape"&&n.get()&&u(f)},onFocus:(S,f)=>o==="hover"&&s(f),onBlur:(S,f)=>{let y=S.relatedTarget,v=f.getRoot().domElement,k=i?v.querySelector(`#${CSS.escape(i)}`):null;y&&(k!=null&&k.contains(y))||u(f)},_onMount:S=>i&&S.attributes.set("ariaControls",i)}),d}function uo(e={}){let{placement:t="bottom-end",color:r="neutral",sideOffset:o=c(6),bordered:i=!0}=e,n=g(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=m=>{var h;return(h=a[n.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=>x(m),backgroundColor:m=>l(m),color:m=>l(m,"text",r),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",r),borderWidth:i?"1px":0,borderColor:m=>l(m,"inherit",r),borderTopStyle:m=>{let h=s(m);return h.includes("top")||h.includes("right")?"solid":"none"},borderBottomStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("left")?"solid":"none"},borderLeftStyle:m=>{let h=s(m);return h.includes("top")||h.includes("left")?"solid":"none"},borderRightStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("right")?"solid":"none"},top:m=>{let h=s(m);return h.includes("top")?0:h.includes("bottom")?"auto":u(h)},right:m=>{let h=s(m);return h.includes("right")?0:h.includes("left")?"auto":d(h)},bottom:m=>{let h=s(m);return h.includes("bottom")?0:h.includes("top")?"auto":d(h)},left:m=>{let h=s(m);return h.includes("left")?0:h.includes("right")?"auto":u(h)},transform:m=>{let h=s(m),p=h.includes("right")||h.includes("end")&&!h.includes("left")?"50%":"-50%",S=h.includes("bottom")||h.includes("end")&&!h.includes("top")?"50%":"-50%";return`translate(${p},${S}) rotate(45deg)`}}}}}function hl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function dl(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:n=>l(n,"inherit",t.get(n)),color:n=>l(n,"text",t.get(n)),"&::-webkit-progress-bar":{backgroundColor:n=>l(n,"inherit",t.get(n)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:n=>l(n,"shift-9",r.get(n)),borderRadius:c(999),transition:"width 220ms ease"}}}}var fl='<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>',pl='<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 gl(e={}){var u,d;let{max:t=5,readOnly:r=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",n=g((d=e.value)!=null?d:0),a=g(0),s=m=>{let h=a.get(m);return h>0?h:n.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:m=>x(m,"increase-1"),cursor:r?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let h=1;h<=t;h++){let p=h,S=r?{}:{onClick:()=>{let y=p===n.get()?0:p;n.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let v=n.get(),k=v;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(t,v+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(0,v-1),y.preventDefault();else return;n.set(k),o==null||o(k);let E=k>0?k-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=te(A({button:y=>p<=s(y)?fl:pl,_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},S),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:y=>_(y,i)}}});m.children.insert(f)}}}}function yl(e={}){var u,d,m;let{size:t=16,thickness:r=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((d=e.color)!=null?d:"primary","color"),n=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-r)*100),s=`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:c(t),height:c(t),borderRadius:"50%",color:h=>l(h,"shift-9",i.get(h)),background:h=>`conic-gradient(from -90deg, ${l(h,"shift-9",i.get(h))} ${o.get(h)}%, ${l(h,"shift-3",n.get(h))} 0%)`,WebkitMask:s,mask:s}}}function ho(e={}){let{gap:t=4,align:r="center",justify:o,wrap:i=!1}=e;return{style:A(A({display:"flex",alignItems:r,gap:n=>c(b(n)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function bl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{style:{overflow:"auto",color:o=>l(o,"text",t.get(o)),"&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>l(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${l(o,"shift-5",t.get(o))} transparent`}}}function vl(e={items:[]}){var n,a,s;let{items:t=[],color:r="neutral",accentColor:o="primary"}=e,i=g((s=(a=e.value)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,d)=>{let m=t.map((h,p)=>{var y;let S=(y=h.key)!=null?y:String(p);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:S,type:"button",role:"radio",ariaChecked:v=>i.get(v)===S,onClick:()=>i.set(S),style:{cursor:"pointer",fontSize:v=>x(v,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:v=>l(v,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"shift-3",r)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"increase-2",r)},"&[aria-checked=true]":{backgroundColor:v=>l(v,"shift-0",o),color:v=>l(v,"shift-10",o),boxShadow:$("low")},"&:focus-visible":{boxShadow:v=>_(v,o)},"&[aria-checked=true]:focus-visible":{boxShadow:v=>`${$("low")}, ${_(v,o)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[u.tagName]=m},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"inherit",r),color:u=>l(u,"text",r)}}}function Sl(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"border-strong",t)}`,borderRadius:o=>c(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Xt(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",r)}`},"&:focus-visible":{boxShadow:o=>_(o,r)},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"muted","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function xl(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"selectBox",open:s,placement:g(r),content:e.content}),h={onClick:(f,y)=>!n&&d(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={div:f=>{let y=a.get(f),v=Array.isArray(y)?y:[y];return t.filter(E=>v.includes(E.value)).map(E=>({span:E.label,$:[Ze({color:o,removable:n})],_key:E.value,_onRemove:w=>{let O=a.get(),T=(Array.isArray(O)?O:[O]).filter(L=>L!==E.value);n?a.set(T):a.set(T[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},S={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?d(y):u(y),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>_(f,o)}}};return z(m,S),m}function wl(e={}){let{accentColor:t="primary",color:r="neutral",value:o=null}=e;return{role:"option",_onInit:n=>{n.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=n.getContext("select");if(a){let s=a.value;n.attributes.set("ariaSelected",u=>{let d=s.get(u);return a.multiple?d.includes(o):d===o}),n.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(d=>d!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:n=>x(n,"inherit"),height:n=>c(6+b(n)*2),paddingInline:n=>c(b(n)*3),border:"none",outline:"none",color:n=>l(n,"text",r),backgroundColor:n=>l(n,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:n=>l(n,"hover",r)},"&[aria-selected=true]":{backgroundColor:n=>l(n,"shift-6",t),color:n=>l(n,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,t)}}}}function kl(e={}){var a;let{color:t="neutral",multiple:r=!1}=e,o=g((a=e.value)!=null?a:r?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:o,multiple:r}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t),color:s=>l(s,"text",t)}}}function Cl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),r={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},o=Re(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:n=>x(n),color:n=>l(n,"text",t.get(n)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:n=>l(n,"inherit",t.get(n)),backgroundImage:n=>`linear-gradient(90deg, ${l(n,"inherit",t.get(n))} 0%, ${l(n,"shift-4",t.get(n))} 50%, ${l(n,"inherit",t.get(n))} 100%)`,backgroundSize:"200% 100%",animation:`${o} 1.6s ease-in-out infinite`,[`@keyframes ${o}`]:r}}}function El(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))}}}var Vr={to:{transform:"rotate(360deg)"}},Ar=Re(JSON.stringify(Vr));function _l(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${l(o,"border-strong",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Ar} 0.7s linear infinite`,[`@keyframes ${Ar}`]:Vr}}}function Tl(e={}){let{direction:t="horizontal",defaultSize:r=50,min:o=10,max:i=90}=e;return{_onSchedule:(n,a)=>{z(a,{_context:{splitter:{direction:t,size:g(r),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function Ml(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,n=s=>{r.style[o]=`${i?s:100-s}%`};n(t.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let a=t.size.addListener(n);e.addHook("Remove",a)}}}function Ol(){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 r=e.domElement,o=t.direction==="horizontal";r.style.cursor=o?"col-resize":"row-resize",r.setAttribute("aria-orientation",o?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(t.min)),r.setAttribute("aria-valuemax",String(t.max)),r.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{r.setAttribute("aria-valuenow",String(Math.round(u)))}),n=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,s=u=>{u.preventDefault();let d=r.parentElement,m=p=>{let S=d.getBoundingClientRect(),f=o?(p.clientX-S.left)/S.width*100:(p.clientY-S.top)/S.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)};r.addEventListener("keydown",n),r.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),r.removeEventListener("keydown",n),r.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"inherit"),color:e=>l(e,"text"),"&:hover":{backgroundColor:e=>l(e,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:e=>_(e,"primary")},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Dl(e={}){let{gap:t=3,align:r}=e;return{style:A({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},r?{alignItems:r}:{})}}function Pl(e={items:[]}){var a;let{items:t=[],direction:r="horizontal",color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:n,direction:r,color:o,accentColor:i}},_onSchedule:(s,u)=>{let d=t.map((m,h)=>{var S;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(S=m.key)!=null?S:h,dataStep:String(h+1),dataStatus:f=>{let y=n.get(f);return h<y?"done":h===y?"active":"pending"},ariaCurrent:f=>n.get(f)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:f=>x(f,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i),boxShadow:f=>`0 0 0 3px ${l(f,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=pending]":{color:f=>l(f,"muted")},"&[data-status=active]":{color:f=>l(f,"shift-11",i),fontWeight:"bold"},"&[data-status=done]":{color:f=>l(f,"text",o)}}}});u[s.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function Ll(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:"bold",color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function Rl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Il(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function $l(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"hover")}}}}function zl(e={items:[]}){var n,a,s;let{items:t=[],accentColor:r="primary",color:o="neutral"}=e,i=g((s=(a=e.activeKey)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:0);return{_onSchedule:(u,d)=>{let m=u.nodeId,p={div:t.map((f,y)=>{var E;let v=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:v,type:"button",role:"tab",id:`tab${m}${v}`,ariaControls:`panel${m}${v}`,ariaSelected:w=>i.get(w)===v,onClick:()=>i.set(v),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let D=t.map((N,H)=>{var j;return(j=N.key)!=null?j:H}),T=D.indexOf(v),L=T;O==="ArrowRight"?L=(T+1)%D.length:O==="ArrowLeft"?L=(T-1+D.length)%D.length:O==="Home"?L=0:O==="End"&&(L=D.length-1),i.set(D[L])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"shift-13"),backgroundColor:w=>l(w,"inherit"),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:w=>l(w,"shift-13"),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{color:w=>l(w,"shift-13",r),boxShadow:w=>`inset 0 -${c(.5)} 0 0 ${l(w,"shift-8",r)}`},"&:focus-visible":{boxShadow:w=>_(w,r)},"&[aria-selected=true]:focus-visible":{boxShadow:w=>`${_(w,r)}, inset 0 -${c(.5)} 0 0 ${l(w,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},S=t.map((f,y)=>{var k;let v=(k=f.key)!=null?k:y;return{div:[f.content],_key:v,role:"tabpanel",id:`panel${m}${v}`,ariaLabelledby:`tab${m}${v}`,hidden:E=>i.get(E)!==v,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});d[u.tagName]=[p,...S]}}}function Al(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((n=e.accentColor)!=null?n:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let s=a.domElement;s.style.overflow="hidden";let u=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",u),u(),a.addHook("Remove",()=>s.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-visible":{boxShadow:a=>_(a,r.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function Vl(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function Bl(e={}){var n,a,s;let{last:t=!1}=e,r=(n=e.color)!=null?n:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((s=e.active)!=null?s:!1);return{style:A({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:c(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(u,"shift-8",i.get(u)?o:r),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>`-${c(b(u)*4)}`,width:"2px",backgroundColor:u=>l(u,"shift-3",r)}})}}function Nl(e={}){let{position:t="top-center",color:r="neutral"}=e,o=g(!1),i=t.startsWith("top"),n=t.endsWith("center"),a=t.endsWith("right"),s={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:n?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let d=u.domElement.querySelector(`#domphy-toast-${t}`);return d||(d=u.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",r),backgroundColor:u=>l(u,"inherit",r),boxShadow:$("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,d)=>{let m=!1,h=null,p=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",S),d())},S=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",S),h=setTimeout(p,350),u.addHook("Remove",()=>{var f;h&&(clearTimeout(h),h=null),(f=u.domElement)==null||f.removeEventListener("transitionend",S)}),o.set(!1)}}}function Hl(e={items:[]}){var a;let{items:t=[],multiple:r=!1,color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.value)!=null?a:r?[]:"");return{role:"group",_context:{toggleGroup:{value:n,multiple:r}},_onSchedule:(s,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 v=n.get(y);return Array.isArray(v)?v.includes(p):v===p},onClick:()=>{let y=n.get();if(r){let v=Array.isArray(y)?[...y]:[];n.set(v.includes(p)?v.filter(k=>k!==p):[...v,p])}else n.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"shift-13",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:y=>l(y,"shift-13",o),backgroundColor:y=>l(y,"hover",o)},"&:active:not([disabled])":{backgroundColor:y=>l(y,"increase-2",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-13",i)},"&:focus-visible":{boxShadow:y=>_(y,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=d},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function jl(e={}){return ho({gap:e.gap})}function Fl(){return{div:null,style:{flex:"1 1 0"}}}function Wl(e={}){let{open:t=!1,placement:r="top",content:o="Tooltip Content"}=e,i=g(r),n=g(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:S=>n.get(S),id:a},{show:u,hide:d,anchorPartial:m}=ae({kind:"tooltip",open:t,placement:i,content:s}),h={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:S=>c(b(S)*1),paddingInline:S=>c(b(S)*3),borderRadius:S=>c(b(S)*1.5),color:S=>l(S,"text"),backgroundColor:S=>l(S),fontSize:S=>x(S,"inherit"),boxShadow:$("low")},$:[uo({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(h),z(m,{ariaDescribedby:a,onMouseEnter:(S,f)=>u(f),onMouseLeave:(S,f)=>d(f),onFocus:(S,f)=>u(f),onBlur:(S,f)=>d(f),onKeyDown:(S,f)=>S.key==="Escape"&&d(f)}),m}function Br(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Ul(e={}){let{duration:t=300,delay:r=0}=e,o=new Map,i=new Map,n=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of n)clearTimeout(u);n.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,d)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(Br(u,d),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,d)=>{var D;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let h=Br(u,d),p=o.get(h);if(!p)return;let S=m.getBoundingClientRect(),f=p.left-S.left,y=p.top-S.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(D=i.get(m))==null||D(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),m.style.transition=`transform ${t}ms ease ${r}ms`,m.style.transform="translate(0px, 0px)"});a.add(v);let k=!1,E=null,w=()=>{k||(k=!0,E&&(n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=T=>{T.propertyName==="transform"&&w()};i.set(m,()=>{k=!0,E&&(clearTimeout(E),n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+r+34),n.add(E)}),o.clear()}}}function ql(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return rn(Kl);})();
|
|
4
|
+
${i}}`}function re(e){if(!$e[e])throw Error(`Theme "${e}" not found`);return $e[e]}function Gn(e,t){Kn(t),$e[e]||($e[e]=Jt(Ye)),tr($e[e],t),lt=null,Kt.clear()}function Zn(e){let t=Jt(e);t.direction="lighten";for(let r in t.colors)t.colors[r].reverse(),t.baseTones[r]=t.colors[r].length-1-t.baseTones[r];return t}function or(e){let t=Kt.get(e);if(t)return t;let r=re(e),o=Qt(r),i={};for(let n in r){let a=r[n];if(n==="colors")for(let s in r.colors){let u={};[...Array(o).keys()].forEach(d=>u[d]=r.colors[s][d]),i[s]=u}else if(n==="fontSizes")i.fontSizes=r.fontSizes;else if(n==="densities")i.densities=r.densities;else if(n==="custom"&&(i.custom={},a&&typeof a=="object"))for(let s in a)i.custom[s]=a[s]}return Kt.set(e,i),i}function st(){if(lt)return lt;let e=re("light"),t=Qt(e),r={};for(let o in e){let i=e[o];if(o==="colors")for(let n in e.colors){let a={};[...Array(t).keys()].forEach(s=>a[s]=`var(--${n}-${s})`),r[n]=a}else if(o==="fontSizes")r.fontSizes=[...Array(8).keys()].map(n=>`var(--fontSize-${n})`);else if(o==="custom"&&(r.custom={},i&&typeof i=="object"))for(let n in i)r.custom[n]=`var(--custom-${er(n)})`}return lt=r,r}function Yt(){return Object.entries($e).map(([e,t])=>Yn(e,t)).join(`
|
|
5
|
+
`)}function Xn(e){var t;if(typeof document!="undefined")if(e){e.textContent=Yt();return}else e=(t=document.getElementById("domphy-themes"))!=null?t:Object.assign(document.createElement("style"),{id:"domphy-themes"}),e.textContent=Yt(),document.head.appendChild(e)}function c(e){return`calc(${e/4}em)`}function Jn(e,t,r=320,o=1280){let i=e/4,n=t/4,a=(n-i)/(o-r)*100,s=i-a*r/100,u=parseFloat(s.toFixed(4))===0?`${a.toFixed(4)}vw`:`${s.toFixed(4)}em + ${a.toFixed(4)}vw`;return`clamp(${i}em, ${u}, ${n}em)`}function Qn(e=document.documentElement,t={}){let{persist:r=!0,storageKey:o="dp-theme"}=t,i=()=>{if(r){let s=localStorage.getItem(o);if(s==="light"||s==="dark")return s}return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};e.setAttribute("data-theme",i());let n=window.matchMedia("(prefers-color-scheme: dark)"),a=s=>{(!r||!localStorage.getItem(o))&&e.setAttribute("data-theme",s.matches?"dark":"light")};return n.addEventListener("change",a),()=>n.removeEventListener("change",a)}function ct(e){let t=typeof e=="function"?e.elementNode:e;for(;t&&(!t.attributes||!t.attributes.get("dataTheme"));)t=t.parent;let r="light";return t&&t.attributes&&t.attributes.has("dataTheme")&&(r=t.attributes.get("dataTheme"),typeof e=="function"&&t.attributes.addListener("dataTheme",e)),r}var ei=["neutral","primary","secondary","info","success","warning","attention","error","danger","highlight"],Gt=["inherit"];[...Array(5).keys()].forEach(e=>{Gt.push(`decrease-${e}`),Gt.push(`increase-${e}`)});function ti(e,t="inherit"){if(!Gt.includes(t))throw Error(`density name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(4,r))}function oi(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 r=2;return t&&t.attributes&&t.attributes.has("dataDensity")&&(r=ti(r,t.attributes.get("dataDensity")),typeof e=="function"&&t.attributes.addListener("dataDensity",e)),r}function b(e){let t=oi(e);return re(e?ct(e):"light").densities[t]}var ri=["0.75rem","0.875rem","1rem","1.25rem","1.5625rem","1.9375rem","2.4375rem","3.0625rem"],ni=[.75,1,1.5,2,2.5];function ii(e,t){let r=qt(at(t)),o=0,i=1/0;for(let n=0;n<e.length;n++){let a=Zo(r,qt(at(e[n])));a<i&&(i=a,o=n)}return o}function ai(e,t={}){var r,o,i,n,a,s;let u=(r=t.steps)!=null?r:18,d={},m={};for(let[h,p]of Object.entries(e)){let S=Jo(p,u);d[h]=S,m[h]=ii(S,p)}return{direction:(o=t.direction)!=null?o:"darken",colors:d,baseTones:m,fontSizes:(i=t.fontSizes)!=null?i:ri,densities:(n=t.densities)!=null?n:ni,darkBias:(a=t.darkBias)!=null?a:1,custom:(s=t.custom)!=null?s:{}}}var Zt=["inherit"];[...Array(8).keys()].forEach(e=>{Zt.push(`decrease-${e}`),Zt.push(`increase-${e}`)});function rr(e,t="inherit"){if(!Zt.includes(t))throw Error(`size name "${t}" invalid`);let r;if(t==="inherit")r=e;else if(t!=null&&t.startsWith("increase-")){let o=parseInt(t.replace("increase-",""),10);r=e+o}else if(t!=null&&t.startsWith("decrease-")){let o=parseInt(t.replace("decrease-",""),10);r=e-o}else r=e;return Math.max(0,Math.min(7,r))}function li(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 r=2;return t&&t.attributes&&t.attributes.has("dataSize")&&(r=rr(r,t.attributes.get("dataSize")),typeof e=="function"&&t.attributes.addListener("dataSize",e)),r}function x(e,t="inherit"){let r=rr(li(e),t);return st().fontSizes[r]}var fe=Ye.colors.neutral.length,Xt={surface:"shift-1",hover:"shift-2",border:"shift-3","border-strong":"shift-4",muted:"shift-8",text:"shift-9"},Ke=["inherit","base",...Object.keys(Xt)];[...Array(fe).keys()].forEach(e=>{Ke.push(`decrease-${e}`),Ke.push(`increase-${e}`),Ke.push(`shift-${e}`)});function Qo(e,t){if(e<0||e>fe-1)return e;let r=e+t;return r=Math.max(0,Math.min(fe-1,r)),r}function si(e,t){if(e<0||e>fe-1)return e;let r=Math.floor((fe-1)/2),o=e<=r?e+t:e-t;return o=Math.max(0,Math.min(fe-1,o)),o}function Ge(e,t="inherit"){if(typeof t=="number")return t;if(t==="inherit")return e;if(!Ke.includes(t))throw Error(`tone name "${t}" invalid`);if(t in Xt&&(t=Xt[t]),t.startsWith("increase-")){let r=parseInt(t.replace("increase-",""),10);return Qo(e,r)}else if(t.startsWith("decrease-")){let r=parseInt(t.replace("decrease-",""),10);return Qo(e,-r)}else if(t.startsWith("shift-")){let r=parseInt(t.replace("shift-",""),10);return si(e,r)}else return e}function nr(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 r=0;return t&&t.attributes&&t.attributes.has("dataTone")&&(r=Ge(r,t.attributes.get("dataTone")),typeof e=="function"&&t.attributes.addListener("dataTone",e)),r}function ir(e,t,r){return r<=0?e:t==="lighten"&&e===0?r:t==="darken"&&e===fe-1?fe-1-r:e}function l(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r;if(!e){let s=st()[o];if(!s)throw Error(`color "${o}" not found on theme "light"`);return t==="base"?s[re("light").baseTones[o]]:s[Ge(0,t)]}let i=ct(e),n;if(t==="base")n=re(i).baseTones[o];else{let s=re(i),u=ir(nr(e),s.direction,s.darkBias);n=Ge(u,t)}let a=st()[o];if(!a)throw Error(`color "${o}" not found on theme "${i}"`);return a[n]}function eo(e,t="inherit",r="inherit"){let o=r==="inherit"?"neutral":r,i=e?ct(e):"light",n=or(i)[o];if(!n)throw Error(`color "${o}" not found on theme "${i}"`);if(!e)return t==="base"?n[re("light").baseTones[o]]:n[Ge(0,t)];let a;if(t==="base")a=re(i).baseTones[o];else{let s=re(i),u=ir(nr(e),s.direction,s.darkBias);a=Ge(u,t)}return n[a]}var Ct={};rt(Ct,{abbreviation:()=>ci,accordion:()=>mi,alert:()=>ui,avatar:()=>hi,badge:()=>di,blockquote:()=>fi,breadcrumb:()=>pi,breadcrumbEllipsis:()=>gi,button:()=>vi,buttonGhost:()=>to,buttonSwitch:()=>Si,card:()=>wi,code:()=>ki,combobox:()=>ha,command:()=>da,commandItem:()=>pa,commandSearch:()=>fa,datePicker:()=>ya,descriptionList:()=>Sa,details:()=>xa,dialog:()=>wa,divider:()=>ka,drawer:()=>Ca,emphasis:()=>Ea,empty:()=>_a,errorBoundary:()=>Ta,fab:()=>Oa,figure:()=>Da,formGroup:()=>Pa,heading:()=>Ra,horizontalRule:()=>Ia,icon:()=>$a,image:()=>za,inputCheckbox:()=>Aa,inputColor:()=>Va,inputDateTime:()=>Ba,inputFile:()=>Na,inputNumber:()=>Ha,inputOTP:()=>ja,inputPassword:()=>Ua,inputRadio:()=>qa,inputRange:()=>Ka,inputSearch:()=>Ya,inputSwitch:()=>Ga,inputText:()=>Za,keyboard:()=>Xa,label:()=>Ja,link:()=>Qa,linkButton:()=>ol,list:()=>rl,listItem:()=>nl,listItemButton:()=>il,mark:()=>al,menu:()=>ll,motion:()=>sl,orderedList:()=>cl,pagination:()=>ul,panelSection:()=>hl,paragraph:()=>dl,popover:()=>fl,popoverArrow:()=>po,preformated:()=>pl,progress:()=>gl,rating:()=>vl,ringProgress:()=>Sl,row:()=>go,scrollArea:()=>xl,segmented:()=>wl,select:()=>kl,selectBox:()=>Cl,selectItem:()=>El,selectList:()=>_l,skeleton:()=>Tl,small:()=>Ml,spinner:()=>Ol,splitter:()=>Dl,splitterHandle:()=>Ll,splitterPanel:()=>Pl,stack:()=>Rl,steps:()=>Il,strong:()=>$l,subscript:()=>zl,superscript:()=>Al,table:()=>Vl,tabs:()=>Bl,tag:()=>Je,textarea:()=>Nl,timeline:()=>Hl,timelineItem:()=>jl,toast:()=>Fl,toggleGroup:()=>Wl,toolbar:()=>Ul,toolbarSpacer:()=>ql,tooltip:()=>Kl,transitionGroup:()=>Yl,unorderedList:()=>Gl});function ci(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:n=>x(n),backgroundColor:n=>l(n),color:n=>l(n,"shift-10",t.get(n)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:n=>l(n,"shift-7",t.get(n)),textUnderlineOffset:c(.72),cursor:"help","&:hover":{color:n=>l(n,"shift-11",r.get(n)),textDecorationColor:n=>l(n,"shift-9",r.get(n))}}}}function _(e,t="primary"){let r=l(e,"surface"),o=l(e,"shift-9",t);return`0 0 0 2px ${r}, 0 0 0 4px ${o}`}function mi(e={}){var i,n;let{type:t="single"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{_onMount:a=>{if(t!=="single")return;let s=a.domElement;if(!s)return;let u=d=>{let m=d.target.closest("summary");if(!m)return;let h=m.closest("details");!h||h.parentElement!==s||h.open||Array.from(s.querySelectorAll(":scope > details")).forEach(p=>{p!==h&&(p.open=!1)})};s.addEventListener("click",u),a.addHook("Remove",()=>s.removeEventListener("click",u))},style:{display:"flex",flexDirection:"column",borderRadius:a=>c(b(a)*1.5),outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,outlineOffset:"-1px",color:a=>l(a,"text",r.get(a)),overflow:"hidden","& > details":{borderBottom:a=>`1px solid ${l(a,"border-strong",r.get(a))}`},"& > details:last-child":{borderBottom:"none"},"& > details > summary:focus-visible":{boxShadow:a=>_(a,o.get(a))}}}}function ui(e={}){var r;let t=g((r=e.color)!=null?r:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:c(3),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderRadius:o=>c(b(o)*1.5),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-8",t.get(o))}`,backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),fontSize:o=>x(o,"inherit")}}}function hi(e={}){var r;let t=g((r=e.color)!=null?r:"primary","color");return{dataTone:"shift-2",_doctorDisable:"inline-typography",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:c(9),height:c(9),fontSize:o=>x(o,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-11",t.get(o)),boxShadow:o=>`0 0 0 1px ${l(o,"border",t.get(o))}`,"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}function di(e={}){var i;let{label:t=999}=e,r=g(t),o=g((i=e.color)!=null?i:"danger","color");return{_doctorDisable:"inline-typography",style:{position:"relative","&::after":{content:n=>`"${r.get(n)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:c(1.5),minWidth:c(5),height:c(5),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:n=>x(n,"decrease-2"),fontWeight:"600",lineHeight:1,borderRadius:c(999),backgroundColor:n=>l(n,"shift-9",o.get(n)),color:n=>l(n,"shift-0",o.get(n)),boxShadow:n=>`0 0 0 1px ${l(n,"shift-0",o.get(n))}`}}}}function fi(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset ${c(1)} 0 0 0 ${l(o,"shift-4",t.get(o))}`,border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),margin:0}}}function pi(e={}){var o;let{separator:t="/"}=e,r=g((o=e.color)!=null?o:"neutral","color");return{_onInsert:i=>{i.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:i=>x(i,"inherit"),gap:c(1),color:i=>l(i,"text",r.get(i)),backgroundColor:i=>l(i,"inherit",r.get(i)),"& > *":{display:"inline-flex",alignItems:"center",color:i=>l(i,"muted",r.get(i))},"& > *:not(:last-child)::after":{content:`"${t}"`,color:i=>l(i,"shift-4",r.get(i)),paddingInlineStart:c(1)},"& > [aria-current=page]":{color:i=>l(i,"shift-10",r.get(i)),pointerEvents:"none"}}}}function gi(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:o=>x(o,"inherit"),paddingInline:c(1),border:"none",background:"none",cursor:"pointer",color:o=>l(o,"muted",t.get(o)),borderRadius:c(1),transition:"color 140ms ease, background-color 140ms ease, box-shadow 140ms ease","&:hover":{color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"hover",t.get(o))},"&:focus-visible":{boxShadow:o=>_(o,t.get(o))}}}}var ze={small:"decrease-1",medium:"inherit",large:"increase-1"};var yi={small:.5,medium:1,large:1.5};function to(e={}){var i,n,a;let t=g((i=e.color)!=null?i:"neutral","color"),r=yi[(n=e.size)!=null?n:"medium"],o=ze[(a=e.size)!=null?a:"medium"];return{_onInsert:s=>{s.tagName!=="button"&&console.warn('"buttonGhost" primitive patch must use button tag')},style:{appearance:"none",fontSize:s=>x(s,o),paddingBlock:s=>c(b(s)*r),paddingInline:s=>c(b(s)*r),borderRadius:s=>c(b(s)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:s=>c(b(s)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:s=>l(s,"shift-6",t.get(s)),"&:hover:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"hover",t.get(s))},"&:active:not([disabled]):not([aria-busy=true])":{color:s=>l(s,"text",t.get(s)),backgroundColor:s=>l(s,"increase-2",t.get(s))},"&:focus-visible":{boxShadow:s=>_(s,t.get(s))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:s=>l(s,"border-strong","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}var bi={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}};function vi(e={}){var a,s,u,d;let t=(a=e.variant)!=null?a:"outline";if(t==="ghost")return to({color:e.color,size:e.size});let r=g((s=e.color)!=null?s:"primary","color"),o=t==="solid",i=bi[(u=e.size)!=null?u:"medium"],n=ze[(d=e.size)!=null?d:"medium"];return te(A({_onInsert:m=>{m.tagName!=="button"&&console.warn('"button" primitive patch must use button tag')}},o?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{appearance:"none",fontSize:m=>x(m,n),paddingBlock:m=>c(b(m)*i.block),paddingInline:m=>c(b(m)*i.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:o?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>o?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-busy=true])":{color:m=>o?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>o?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([disabled]):not([aria-busy=true])":{backgroundColor:m=>o?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(m,r.get(m))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}})}function Si(e={}){var n,a;let{checked:t=!1}=e,r=g(t),o=g((n=e.color)!=null?n:"neutral","color"),i=g((a=e.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:s=>{s.tagName!=="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:s=>r.get(s),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:s=>x(s),border:"none",outlineWidth:"1px",outline:s=>`1px solid ${l(s,"border",o.get(s))}`,minWidth:c(12),minHeight:c(6),borderRadius:c(999),paddingLeft:c(7),paddingRight:c(2),cursor:"pointer",transition:"padding-left 0.3s, padding-right 0.3s, background-color 140ms ease, box-shadow 140ms ease",backgroundColor:s=>l(s,"inherit",o.get(s)),color:s=>l(s,"text",o.get(s)),"&:focus-visible":{boxShadow:s=>_(s,i.get(s))},"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:c(5),height:c(5),borderRadius:c(999),color:s=>l(s,"text"),backgroundColor:s=>l(s,"decrease-2",o.get(s))},"&[aria-checked=true]":{backgroundColor:s=>l(s,"increase-3",i.get(s)),outline:"none",color:s=>l(s,"decrease-2"),paddingLeft:c(2),paddingRight:c(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${c(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}var xi={low:"0 1px 2px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.10)",medium:"0 2px 4px rgba(0,0,0,0.10), 0 10px 24px rgba(0,0,0,0.14)",high:"0 6px 12px rgba(0,0,0,0.14), 0 24px 48px rgba(0,0,0,0.20)"};function $(e){return xi[e]}function wi(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:o=>c(b(o)*2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"shift-10",t.get(o)),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`,outlineOffset:"-1px",boxShadow:$("low"),overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),fontWeight:"600",color:o=>l(o,"shift-11",t.get(o)),margin:0},"& > p":{gridArea:"desc",paddingInline:o=>c(b(o)*4),paddingBottom:o=>c(b(o)*2),color:o=>l(o,"text",t.get(o)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:o=>c(b(o)*2),height:"auto"},"& > div":{gridArea:"content",padding:o=>c(b(o)*4),color:o=>l(o,"shift-10",t.get(o))},"& > footer":{gridArea:"footer",display:"flex",gap:c(2),paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*4),borderTop:o=>`1px solid ${l(o,"border",t.get(o))}`}}}}function ki(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),paddingInline:c(1.5),borderRadius:c(1)}}}var Ci=Object.defineProperty,Ei=Object.defineProperties,_i=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,ar=(e,t,r)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J=(e,t)=>{for(var r in t||(t={}))gr.call(t,r)&&ar(e,r,t[r]);if(ht)for(var r of ht(t))yr.call(t,r)&&ar(e,r,t[r]);return e},Ee=(e,t)=>Ei(e,_i(t)),br=(e,t)=>{var r={};for(var o in e)gr.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&ht)for(var o of ht(e))t.indexOf(o)<0&&yr.call(e,o)&&(r[o]=e[o]);return r},Me=(e,t,r)=>new Promise((o,i)=>{var n=u=>{try{s(r.next(u))}catch(d){i(d)}},a=u=>{try{s(r.throw(u))}catch(d){i(d)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(n,a);s((r=r.apply(e,t)).next())}),Ti=["top","right","bottom","left"],lr=["start","end"],uc=Ti.reduce((e,t)=>e.concat(t,`${t}-${lr[0]}`,`${t}-${lr[1]}`),[]),dt=Math.min,Ce=Math.max,ft=Math.round,ut=Math.floor,ne=e=>({x:e,y:e}),Mi={left:"right",right:"left",bottom:"top",top:"bottom"};function sr(e,t,r){return Ce(e,dt(t,r))}function yt(e,t){return typeof e=="function"?e(t):e}function _e(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function vr(e){return e==="x"?"y":"x"}function Sr(e){return e==="y"?"height":"width"}function pe(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function xr(e){return vr(pe(e))}function Oi(e,t,r=!1){let o=bt(e),i=xr(e),n=Sr(i),a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=pt(a)),[a,pt(a)]}function Di(e){let t=pt(e);return[no(e),t,no(t)]}function no(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var cr=["left","right"],mr=["right","left"],Pi=["top","bottom"],Li=["bottom","top"];function Ri(e,t,r){switch(e){case"top":case"bottom":return r?t?mr:cr:t?cr:mr;case"left":case"right":return t?Pi:Li;default:return[]}}function Ii(e,t,r,o){let i=bt(e),n=Ri(_e(e),r==="start",o);return i&&(n=n.map(a=>`${a}-${i}`),t&&(n=n.concat(n.map(no)))),n}function pt(e){let t=_e(e);return Mi[t]+e.slice(t.length)}function $i(e){return J({top:0,right:0,bottom:0,left:0},e)}function zi(e){return typeof e!="number"?$i(e):{top:e,right:e,bottom:e,left:e}}function gt(e){let{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}function ur({reference:e,floating:t},r,o){let i=pe(r),n=xr(r),a=Sr(n),s=_e(r),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(s){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(bt(r)){case"start":p[n]-=h*(o&&u?-1:1);break;case"end":p[n]+=h*(o&&u?-1:1);break;default:}return p}function Ai(e){return Me(this,arguments,function*(t,r={}){var o,i,n,a,s,u;let{x:d,y:m,platform:h,rects:p,elements:S,strategy:f}=t,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:k="floating",altBoundary:E=!1,padding:w=0}=yt(r,t),O=zi(w),D=S[E?k==="floating"?"reference":"floating":k],T=gt(yield h.getClippingRect({element:(i=yield(o=h.isElement)==null?void 0:o.call(h,D))==null||i?D:D.contextElement||(yield(n=h.getDocumentElement)==null?void 0:n.call(h,S.floating)),boundary:y,rootBoundary:v,strategy:f})),L=k==="floating"?{x:d,y:m,width:p.floating.width,height:p.floating.height}:p.reference,N=yield(a=h.getOffsetParent)==null?void 0:a.call(h,S.floating),H=(yield(s=h.isElement)==null?void 0:s.call(h,N))?(yield(u=h.getScale)==null?void 0:u.call(h,N))||{x:1,y:1}:{x:1,y:1},j=gt(h.convertOffsetParentRelativeRectToViewportRelativeRect?yield h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:S,rect:L,offsetParent:N,strategy:f}):L);return{top:(T.top-j.top+O.top)/H.y,bottom:(j.bottom-T.bottom+O.bottom)/H.y,left:(T.left-j.left+O.left)/H.x,right:(j.right-T.right+O.right)/H.x}})}var Vi=50,Bi=(e,t,r)=>Me(null,null,function*(){var o;let{placement:i="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,u=s.detectOverflow?s:Ee(J({},s),{detectOverflow:Ai}),d=yield(o=s.isRTL)==null?void 0:o.call(s,t),m=yield s.getElementRects({reference:e,floating:t,strategy:n}),{x:h,y:p}=ur(m,i,d),S=i,f=0,y={};for(let v=0;v<a.length;v++){let k=a[v];if(!k)continue;let{name:E,fn:w}=k,{x:O,y:D,data:T,reset:L}=yield w({x:h,y:p,initialPlacement:i,placement:S,strategy:n,middlewareData:y,rects:m,platform:u,elements:{reference:e,floating:t}});h=O!=null?O:h,p=D!=null?D:p,y[E]=J(J({},y[E]),T),L&&f<Vi&&(f++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(m=L.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:n}):L.rects),{x:h,y:p}=ur(m,S,d)),v=-1)}return{x:h,y:p,placement:S,strategy:n,middlewareData:y}});var Ni=(e={})=>({name:"flip",options:e,fn(t){return Me(this,null,function*(){var r,o,i,n,a,s;let{placement:u,middlewareData:d,rects:m,initialPlacement:h,platform:p,elements:S}=t,f=yt(e,t),{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:k,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:O=!0}=f,D=br(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=d.arrow)!=null&&r.alignmentOffset)return{};let T=_e(u),L=pe(h),N=_e(h)===h,H=yield(o=p.isRTL)==null?void 0:o.call(p,S.floating),j=k||(N||!O?[pt(h)]:Di(h)),ye=w!=="none";!k&&ye&&j.push(...Ii(h,O,w,H));let De=[h,...j],ue=yield p.detectOverflow(t,D),W=[],se=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&W.push(ue[T]),v){let ce=Oi(u,m,H);W.push(ue[ce[0]],ue[ce[1]])}if(se=[...se,{placement:u,overflows:W}],!W.every(ce=>ce<=0)){let ce=(((n=d.flip)==null?void 0:n.index)||0)+1,He=De[ce];if(He&&(!(v==="alignment"&&L!==pe(He))||se.every(q=>pe(q.placement)===L?q.overflows[0]>0:!0)))return{data:{index:ce,overflows:se},reset:{placement:He}};let be=(a=se.filter(q=>q.overflows[0]<=0).sort((q,Z)=>q.overflows[1]-Z.overflows[1])[0])==null?void 0:a.placement;if(!be)switch(E){case"bestFit":{let q=(s=se.filter(Z=>{if(ye){let X=pe(Z.placement);return X===L||X==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(X=>X>0).reduce((X,je)=>X+je,0)]).sort((Z,X)=>Z[1]-X[1])[0])==null?void 0:s[0];q&&(be=q);break}case"initialPlacement":be=h;break;default:}if(u!==be)return{reset:{placement:be}}}return{}})}});var Hi=new Set(["left","top"]);function ji(e,t){return Me(this,null,function*(){var r;let{placement:o,platform:i,elements:n}=e,a=yield(r=i.isRTL)==null?void 0:r.call(i,n.floating),s=_e(o),u=bt(o),d=pe(o)==="y",m=Hi.has(s)?-1:1,h=a&&d?-1:1,p=yt(t,e),{mainAxis:S,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:S*m}:{x:S*m,y:f*h}})}var Fi=(e=0)=>({name:"offset",options:e,fn(t){return Me(this,null,function*(){var r,o;let{x:i,y:n,placement:a,middlewareData:s}=t,u=yield ji(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:n+u.y,data:Ee(J({},u),{placement:a})}})}}),Wi=(e={})=>({name:"shift",options:e,fn(t){return Me(this,null,function*(){let{x:r,y:o,placement:i,platform:n}=t,a=yt(e,t),{mainAxis:s=!0,crossAxis:u=!1,limiter:d={fn:({x:E,y:w})=>({x:E,y:w})}}=a,m=br(a,["mainAxis","crossAxis","limiter"]),h={x:r,y:o},p=yield n.detectOverflow(t,m),S=pe(_e(i)),f=vr(S),y=h[f],v=h[S];if(s){let E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",O=y+p[E],D=y-p[w];y=sr(O,y,D)}if(u){let E=S==="y"?"top":"left",w=S==="y"?"bottom":"right",O=v+p[E],D=v-p[w];v=sr(O,v,D)}let k=d.fn(Ee(J({},t),{[f]:y,[S]:v}));return Ee(J({},k),{data:{x:k.x-r,y:k.y-o,enabled:{[f]:s,[S]:u}}})})}});function vt(){return typeof window!="undefined"}function Be(e){return wr(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}function ie(e){var t;return(t=(wr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wr(e){return vt()?e instanceof Node||e instanceof Y(e).Node:!1}function Q(e){return vt()?e instanceof Element||e instanceof Y(e).Element:!1}function me(e){return vt()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function hr(e){return!vt()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Xe(e){let{overflow:t,overflowX:r,overflowY:o,display:i}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&i!=="inline"&&i!=="contents"}function Ui(e){return/^(table|td|th)$/.test(Be(e))}function St(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var qi=/transform|translate|scale|rotate|perspective|filter/,Ki=/paint|layout|strict|content/,ke=e=>!!e&&e!=="none",oo;function ao(e){let t=Q(e)?ee(e):e;return ke(t.transform)||ke(t.translate)||ke(t.scale)||ke(t.rotate)||ke(t.perspective)||!lo()&&(ke(t.backdropFilter)||ke(t.filter))||qi.test(t.willChange||"")||Ki.test(t.contain||"")}function Yi(e){let t=ge(e);for(;me(t)&&!Ve(t);){if(ao(t))return t;if(St(t))return null;t=ge(t)}return null}function lo(){return oo==null&&(oo=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),oo}function Ve(e){return/^(html|body|#document)$/.test(Be(e))}function ee(e){return Y(e).getComputedStyle(e)}function xt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(Be(e)==="html")return e;let t=e.assignedSlot||e.parentNode||hr(e)&&e.host||ie(e);return hr(t)?t.host:t}function kr(e){let t=ge(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:me(t)&&Xe(t)?t:kr(t)}function Ze(e,t=[],r=!0){var o;let i=kr(e),n=i===((o=e.ownerDocument)==null?void 0:o.body),a=Y(i);if(n){let s=io(a);return t.concat(a,a.visualViewport||[],Xe(i)?i:[],s&&r?Ze(s):[])}else return t.concat(i,Ze(i,[],r))}function io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cr(e){let t=ee(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,i=me(e),n=i?e.offsetWidth:r,a=i?e.offsetHeight:o,s=ft(r)!==n||ft(o)!==a;return s&&(r=n,o=a),{width:r,height:o,$:s}}function so(e){return Q(e)?e:e.contextElement}function Ae(e){let t=so(e);if(!me(t))return ne(1);let r=t.getBoundingClientRect(),{width:o,height:i,$:n}=Cr(t),a=(n?ft(r.width):r.width)/o,s=(n?ft(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Gi=ne(0);function Er(e){let t=Y(e);return!lo()||!t.visualViewport?Gi:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zi(e,t=!1,r){return!r||t&&r!==Y(e)?!1:t}function Te(e,t=!1,r=!1,o){let i=e.getBoundingClientRect(),n=so(e),a=ne(1);t&&(o?Q(o)&&(a=Ae(o)):a=Ae(e));let s=Zi(n,r,o)?Er(n):ne(0),u=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,m=i.width/a.x,h=i.height/a.y;if(n){let p=Y(n),S=o&&Q(o)?Y(o):o,f=p,y=io(f);for(;y&&o&&S!==f;){let v=Ae(y),k=y.getBoundingClientRect(),E=ee(y),w=k.left+(y.clientLeft+parseFloat(E.paddingLeft))*v.x,O=k.top+(y.clientTop+parseFloat(E.paddingTop))*v.y;u*=v.x,d*=v.y,m*=v.x,h*=v.y,u+=w,d+=O,f=Y(y),y=io(f)}}return gt({width:m,height:h,x:u,y:d})}function wt(e,t){let r=xt(e).scrollLeft;return t?t.left+r:Te(ie(e)).left+r}function _r(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-wt(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Xi({elements:e,rect:t,offsetParent:r,strategy:o}){let i=o==="fixed",n=ie(r),a=e?St(e.floating):!1;if(r===n||a&&i)return t;let s={scrollLeft:0,scrollTop:0},u=ne(1),d=ne(0),m=me(r);if((m||!m&&!i)&&((Be(r)!=="body"||Xe(n))&&(s=xt(r)),m)){let p=Te(r);u=Ae(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}let h=n&&!m&&!i?_r(n,s):ne(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+d.x+h.x,y:t.y*u.y-s.scrollTop*u.y+d.y+h.y}}function Ji(e){return Array.from(e.getClientRects())}function Qi(e){let t=ie(e),r=xt(e),o=e.ownerDocument.body,i=Ce(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),n=Ce(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),a=-r.scrollLeft+wt(e),s=-r.scrollTop;return ee(o).direction==="rtl"&&(a+=Ce(t.clientWidth,o.clientWidth)-i),{width:i,height:n,x:a,y:s}}var dr=25;function ea(e,t){let r=Y(e),o=ie(e),i=r.visualViewport,n=o.clientWidth,a=o.clientHeight,s=0,u=0;if(i){n=i.width,a=i.height;let m=lo();(!m||m&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}let d=wt(o);if(d<=0){let m=o.ownerDocument,h=m.body,p=getComputedStyle(h),S=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-h.clientWidth-S);f<=dr&&(n-=f)}else d<=dr&&(n+=d);return{width:n,height:a,x:s,y:u}}function ta(e,t){let r=Te(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,n=me(e)?Ae(e):ne(1),a=e.clientWidth*n.x,s=e.clientHeight*n.y,u=i*n.x,d=o*n.y;return{width:a,height:s,x:u,y:d}}function fr(e,t,r){let o;if(t==="viewport")o=ea(e,r);else if(t==="document")o=Qi(ie(e));else if(Q(t))o=ta(t,r);else{let i=Er(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return gt(o)}function Tr(e,t){let r=ge(e);return r===t||!Q(r)||Ve(r)?!1:ee(r).position==="fixed"||Tr(r,t)}function oa(e,t){let r=t.get(e);if(r)return r;let o=Ze(e,[],!1).filter(s=>Q(s)&&Be(s)!=="body"),i=null,n=ee(e).position==="fixed",a=n?ge(e):e;for(;Q(a)&&!Ve(a);){let s=ee(a),u=ao(a);!u&&s.position==="fixed"&&(i=null),(n?!u&&!i:!u&&s.position==="static"&&i&&(i.position==="absolute"||i.position==="fixed")||Xe(a)&&!u&&Tr(e,a))?o=o.filter(d=>d!==a):i=s,a=ge(a)}return t.set(e,o),o}function ra({element:e,boundary:t,rootBoundary:r,strategy:o}){let i=[...t==="clippingAncestors"?St(e)?[]:oa(e,this._c):[].concat(t),r],n=fr(e,i[0],o),a=n.top,s=n.right,u=n.bottom,d=n.left;for(let m=1;m<i.length;m++){let h=fr(e,i[m],o);a=Ce(h.top,a),s=dt(h.right,s),u=dt(h.bottom,u),d=Ce(h.left,d)}return{width:s-d,height:u-a,x:d,y:a}}function na(e){let{width:t,height:r}=Cr(e);return{width:t,height:r}}function ia(e,t,r){let o=me(t),i=ie(t),n=r==="fixed",a=Te(e,!0,n,t),s={scrollLeft:0,scrollTop:0},u=ne(0);function d(){u.x=wt(i)}if(o||!o&&!n)if((Be(t)!=="body"||Xe(i))&&(s=xt(t)),o){let S=Te(t,!0,n,t);u.x=S.x+t.clientLeft,u.y=S.y+t.clientTop}else i&&d();n&&!o&&i&&d();let m=i&&!o&&!n?_r(i,s):ne(0),h=a.left+s.scrollLeft-u.x-m.x,p=a.top+s.scrollTop-u.y-m.y;return{x:h,y:p,width:a.width,height:a.height}}function ro(e){return ee(e).position==="static"}function pr(e,t){if(!me(e)||ee(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ie(e)===r&&(r=r.ownerDocument.body),r}function Mr(e,t){let r=Y(e);if(St(e))return r;if(!me(e)){let i=ge(e);for(;i&&!Ve(i);){if(Q(i)&&!ro(i))return i;i=ge(i)}return r}let o=pr(e,t);for(;o&&Ui(o)&&ro(o);)o=pr(o,t);return o&&Ve(o)&&ro(o)&&!ao(o)?r:o||Yi(e)||r}var aa=function(e){return Me(this,null,function*(){let t=this.getOffsetParent||Mr,r=this.getDimensions,o=yield r(e.floating);return{reference:ia(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})};function la(e){return ee(e).direction==="rtl"}var sa={convertOffsetParentRelativeRectToViewportRelativeRect:Xi,getDocumentElement:ie,getClippingRect:ra,getOffsetParent:Mr,getElementRects:aa,getClientRects:Ji,getDimensions:na,getScale:Ae,isElement:Q,isRTL:la};function Or(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ca(e,t){let r=null,o,i=ie(e);function n(){clearTimeout(o),r==null||r.disconnect(),r=null}function a(s=!1,u=1){n();let d=e.getBoundingClientRect(),{left:m,top:h,width:p,height:S}=d;if(s||t(),!p||!S)return;let f=ut(h),y=ut(i.clientWidth-(m+p)),v=ut(i.clientHeight-(h+S)),k=ut(m),E={rootMargin:`${-f}px ${-y}px ${-v}px ${-k}px`,threshold:Ce(0,dt(1,u))||1},w=!0;function O(D){let T=D[0].intersectionRatio;if(T!==u){if(!w)return a();T?a(!1,T):o=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!Or(d,e.getBoundingClientRect())&&a(),w=!1}try{r=new IntersectionObserver(O,Ee(J({},E),{root:i.ownerDocument}))}catch(D){r=new IntersectionObserver(O,E)}r.observe(e)}return a(!0),n}function Dr(e,t,r,o={}){let{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=o,d=so(e),m=i||n?[...d?Ze(d):[],...t?Ze(t):[]]:[];m.forEach(k=>{i&&k.addEventListener("scroll",r,{passive:!0}),n&&k.addEventListener("resize",r)});let h=d&&s?ca(d,r):null,p=-1,S=null;a&&(S=new ResizeObserver(([k])=>{k&&k.target===d&&S&&t&&(S.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{S==null||S.observe(t)})),r()}),d&&!u&&S.observe(d),t&&S.observe(t));let f,y=u?Te(e):null;u&&v();function v(){let k=Te(e);y&&!Or(y,k)&&r(),y=k,f=requestAnimationFrame(v)}return r(),()=>{m.forEach(k=>{i&&k.removeEventListener("scroll",r),n&&k.removeEventListener("resize",r)}),h==null||h(),S==null||S.disconnect(),S=null,u&&cancelAnimationFrame(f)}}var Pr=Fi;var Lr=Wi,Rr=Ni;var Ir=(e,t,r)=>{let o=new Map,i=J({platform:sa},r),n=Ee(J({},i.platform),{_c:o});return Bi(e,t,Ee(J({},i),{platform:n}))};function ma(e,t){var D;let{openState:r,placement:o,content:i,keepOpenOnContentHover:n}=t,a=null,s=null,u=null,d=null,m=!1,h=e.domElement,p=e.getRoot(),S={style:{position:"fixed",pointerEvents:"auto",visibility:T=>r.get(T)?"visible":"hidden"},onKeyDown:T=>{T.key==="Escape"&&w()},onMouseEnter:()=>n&&E(),onMouseLeave:()=>n&&w(),_onMount:T=>{var L;if(u=T.domElement,h&&u&&!u.hasAttribute("data-theme")){let N=(L=h.closest("[data-theme]"))==null?void 0:L.getAttribute("data-theme");N&&u.setAttribute("data-theme",N)}},_portal:T=>{let L=T.domElement.querySelector("#domphy-floating");if(!L){let N={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};L=T.children.insert(N).domElement}return L}},f=T=>z(T,S);f(i);let y=()=>{m||(m=!0,d=p.children.insert(i))},v=()=>{y(),h&&u&&(s==null||s(),s=Dr(h,u,()=>{Ir(h,u,{placement:o.get(),middleware:[Pr(12),Rr(),Lr()],strategy:"fixed"}).then(({x:T,y:L,placement:N})=>{u&&(Object.assign(u.style,{left:`${T}px`,top:`${L}px`}),o.set(N))})}),r.set(!0))},k=()=>{s==null||s(),s=null,d&&(d.remove(),d=null),u=null,m=!1,r.set(!1)},E=()=>{a&&clearTimeout(a),a=setTimeout(v,100)},w=()=>{a&&clearTimeout(a),a=setTimeout(k,100)},O=T=>{if(!r.get()||!h||!u)return;let L=T.target;!h.contains(L)&&!u.contains(L)&&w()};return(D=p.domElement)==null||D.addEventListener("click",O),{show:E,hide:w,update(T){r=T.openState,o=T.placement,i=T.content,n=T.keepOpenOnContentHover,f(i),d&&d.patch(i)},destroy(){var T;a&&clearTimeout(a),s==null||s(),d==null||d.remove(),(T=p.domElement)==null||T.removeEventListener("click",O)}}}function ae(e){let{kind:t,open:r=!1,placement:o}=e,i=g(r),n=`floating:${t}`,a=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.show()},s=d=>{var m;return(m=d==null?void 0:d.getBehavior(n))==null?void 0:m.hide()},u=A({onKeyDown:(d,m)=>d.key==="Escape"&&s(m)},Ft(n,ma,{openState:i,placement:o,content:e.content,keepOpenOnContentHover:!!e.keepOpenOnContentHover}));return{show:a,hide:s,anchorPartial:u}}var ua='<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 Je(e={}){var o;let{removable:t=!1}=e,r=g((o=e.color)!=null?o:"neutral","color");return{dataTone:"shift-2",_onInit:i=>{let n={span:we(ua),onClick:a=>{a.stopPropagation(),i.remove()},tabindex:0,role:"button",ariaLabel:"Remove",style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:c(1),width:c(4),height:c(4),flexShrink:0,transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover":{backgroundColor:a=>l(a,"shift-4",r.get(a))},"&:focus-visible":{boxShadow:a=>_(a,r.get(a))}}};t&&i.children.insert(n)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:c(6),paddingBlock:0,borderRadius:c(999),paddingInlineStart:c(2.5),paddingInlineEnd:t?c(1):c(2.5),gap:c(1.5),fontSize:i=>x(i,"decrease-1"),backgroundColor:i=>l(i,"inherit",r.get(i)),color:i=>l(i,"text",r.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${l(i,"border-strong",r.get(i))}`}}}function ha(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"combobox",open:s,placement:g(r),content:e.content}),h={onClick:(v,k)=>!n&&d(k),dataTone:"shift-14",style:{backgroundColor:v=>l(v,"inherit"),borderRadius:v=>c(b(v)*2),outline:v=>`1px solid ${l(v,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:c(6),marginInlineStart:c(2),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o)},S;if(e.input){let v={onFocus:(k,E)=>u(E),style:p,_key:"combobox-input"};z(e.input,v),S=e.input}else S={input:null,onFocus:(v,k)=>u(k),value:v=>(a.get(v),""),style:p,_key:"combobox-input"};let f={div:v=>{let k=a.get(v),E=Array.isArray(k)?k:[k],O=t.filter(D=>E.includes(D.value)).map(D=>({span:D.label,$:[Je({color:o,removable:!0})],_key:D.value,_onRemove:T=>{let L=a.get(),H=(Array.isArray(L)?L:[L]).filter(j=>j!==D.value);n?a.set(H):a.set(H[0])}}));return O.push(S),O},style:{display:"flex",flexWrap:"wrap",gap:c(1)}},y={_onInsert:v=>{v.tagName!=="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:v=>v.children.insert(f),style:{minWidth:c(32),outlineOffset:"-1px",outline:v=>`1px solid ${l(v,"border-strong","neutral")}`,paddingBlock:v=>c(b(v)*1),paddingInline:v=>c(b(v)*1),borderRadius:v=>c(b(v)*1.5),fontSize:v=>x(v,"inherit"),color:v=>l(v,"text",o),backgroundColor:v=>l(v,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-within":{boxShadow:v=>_(v,o)}}};return z(m,y),m}function da(){return{_onSchedule:(e,t)=>{z(t,{_context:{command:{query:g("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function fa(e={}){let{color:t="neutral",accentColor:r="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 n=o.domElement,a=()=>i.query.set(n.value);n.addEventListener("input",a),o.addHook("Remove",()=>n.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:o=>x(o,"inherit"),paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*2),border:"none",borderBottom:o=>`1px solid ${l(o,"border",t)}`,outline:"none",color:o=>l(o,"shift-10",t),backgroundColor:o=>l(o,"inherit",t),"&::placeholder":{color:o=>l(o,"shift-7")},transition:"border-bottom-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{borderBottomColor:o=>l(o,"shift-6",r),boxShadow:o=>_(o,r)}}}}function pa(e={}){let{color:t="neutral",accentColor:r="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 n=o.domElement,a=(m=(d=n.textContent)==null?void 0:d.toLowerCase())!=null?m:"",s=h=>{n.hidden=h.length>0&&!a.includes(h.toLowerCase())};s(i.query.get());let u=i.query.addListener(s);o.addHook("Remove",u)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:o=>x(o,"inherit"),height:o=>c(6+b(o)*2),paddingInline:o=>c(b(o)*3),border:"none",outline:"none",color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"inherit",t),transition:"background-color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{color:o=>l(o,"shift-13",t),backgroundColor:o=>l(o,"hover",t)},"&:focus-visible":{boxShadow:o=>_(o,r)}}}}var F=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),Oe=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),co=(e,t)=>new Date(e.getFullYear(),e.getMonth()+t,e.getDate()),Qe=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),mo=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,uo=(e,t)=>Oe(e,-((e.getDay()-t+7)%7));function ga(e){var t,r;try{let o=new Intl.Locale(e),i=(r=(t=o.getWeekInfo)==null?void 0:t.call(o))!=null?r:o.weekInfo;if(i!=null&&i.firstDay)return i.firstDay%7}catch(o){}return 0}function ya(e={}){var yo,bo,vo,So;let{mode:t="single",time:r=!1,min:o,max:i,disabledDate:n,locale:a=typeof navigator!="undefined"?navigator.language:"en-US",format:s,onChange:u}=e,d=(yo=e.weekStartsOn)!=null?yo:ga(a),m=g((bo=e.accentColor)!=null?bo:"primary","accentColor"),h=g((vo=e.placement)!=null?vo:"bottom-start"),p=g((So=e.value)!=null?So:t==="range"?[null,null]:null),S=u?p.addListener(C=>u(C)):null,f=(()=>{let C=p.get(),M=t==="range"?C==null?void 0:C[0]:C;return M instanceof Date?M:new Date})(),y=g(f.getFullYear(),"viewYear"),v=g(f.getMonth(),"viewMonth"),k=g(F(f),"focused"),E=g(null,"hovered"),w=g(f.getHours(),"hour"),O=g(f.getMinutes(),"minute"),D=null,T=new Intl.DateTimeFormat(a,A({dateStyle:"medium"},r?{timeStyle:"short"}:{})),L=new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),N=new Intl.DateTimeFormat(a,{weekday:"short"}),H=new Intl.DateTimeFormat(a,{dateStyle:"full"}),j=C=>C?T.format(C):"",ye=C=>{if(s)return s(C);if(t==="range"){let[M,P]=C!=null?C:[null,null];return M?`${j(M)} \u2013 ${j(P)}`:""}return j(C)},De=Array.from({length:7},(C,M)=>N.format(new Date(2023,0,1+(M+d)%7))),ue=C=>!!o&&F(C)<F(o)||!!i&&F(C)>F(i)||!!n&&n(C),W=C=>{if(!r)return F(C);let M=F(C);return M.setHours(w.get(),O.get(),0,0),M},se=C=>{var R;if(ue(C))return;if(t==="single"){p.set(W(C)),r||_t();return}let[M,P]=(R=p.get())!=null?R:[null,null];!M||M&&P?p.set([W(C),null]):F(C)<F(M)?(p.set([W(C),W(M)]),r||_t()):(p.set([M,W(C)]),r||_t())},ce=()=>{var C;if(r)if(t==="single"){let M=p.get();M&&p.set(W(M))}else{let[M,P]=(C=p.get())!=null?C:[null,null];p.set([M&&W(M),P&&W(P)])}},He=(C,M)=>{var Pe;if(t!=="range")return!1;let[P,R]=(Pe=p.get(M))!=null?Pe:[null,null],V=R!=null?R:E.get(M);if(!P||!V)return!1;let I=F(P)<=F(V)?P:V,G=F(P)<=F(V)?V:P,K=F(C);return K>=F(I)&&K<=F(G)},be=(C,M)=>{let P=p.get(M);if(t==="range"){let[R,V]=P!=null?P:[null,null];return Qe(C,R)||Qe(C,V)}return Qe(C,P)},q=C=>{y.set(C.getFullYear()),v.set(C.getMonth())},Z=C=>{let M=co(new Date(y.get(),v.get(),1),C);q(M)},X=C=>y.set(y.get()+C),je=()=>{setTimeout(()=>{var C;(C=D==null?void 0:D.querySelector(`[data-date="${mo(k.get())}"]`))==null||C.focus()},0)},Fr=Yr(),{show:Wr,hide:Ur,anchorPartial:Et}=ae({kind:"datePicker",open:!1,placement:h,content:Fr});function _t(){Ur()}Et.onClick=()=>{};let qr={type:"text",readonly:!0,value:C=>ye(p.get(C)),ariaHaspopup:"dialog",ariaLabel:"Choose date",style:{cursor:"pointer"},onClick:(C,M)=>{Tt(M)},onFocus:(C,M)=>{Tt(M)},onKeyDown:(C,M)=>{let P=C.key;(P==="ArrowDown"||P==="Enter")&&(C.preventDefault(),Tt(M))},_onMount:C=>S&&C.addHook("Remove",()=>{S()})};function Tt(C){var P;let M=(P=Kr())!=null?P:new Date;k.set(F(M)),q(M),Wr(C),je()}function Kr(){var M;let C=p.get();return t==="range"?(M=C==null?void 0:C[0])!=null?M:null:C!=null?C:null}return z(Et,qr),Et;function Yr(){let C=(I,G,K)=>({button:I,type:"button",ariaLabel:G,onClick:K,style:ba()}),M={div:[C("\xAB","Previous year",()=>X(-1)),C("\u2039","Previous month",()=>Z(-1)),{div:I=>L.format(new Date(y.get(I),v.get(I),1)),ariaLive:"polite",style:{flex:"1",textAlign:"center",fontWeight:"bold",fontSize:I=>x(I)}},C("\u203A","Next month",()=>Z(1)),C("\xBB","Next year",()=>X(1))],style:{display:"flex",alignItems:"center",gap:c(1),marginBottom:c(2)}},P={div:De.map((I,G)=>({div:I,style:{textAlign:"center",fontSize:K=>x(K,"decrease-1"),fontWeight:"bold",color:K=>l(K,"shift-7"),paddingBlock:c(1)},_key:G})),role:"row",style:$r()},R={div:I=>Gr(I),role:"grid",ariaLabel:"Calendar",onKeyDown:Qr,onMouseLeave:()=>t==="range"&&E.set(null),style:{display:"flex",flexDirection:"column",gap:c(.5)}},V=[M,P,R];return r&&V.push(Xr()),V.push(Jr()),{div:V,role:"dialog",ariaModal:"false",_onMount:I=>{D=I.domElement},style:{minWidth:c(70),padding:c(3),borderRadius:I=>c(b(I)*2),backgroundColor:I=>l(I,"base"),color:I=>l(I,"shift-10"),border:I=>`1px solid ${l(I,"border-strong")}`,boxShadow:$("medium")}}}function Gr(C){let M=new Date(y.get(C),v.get(C),1),P=v.get(C),R=uo(M,d),V=[];for(let I=0;I<6;I++){let G=[];for(let K=0;K<7;K++){let Pe=Oe(R,I*7+K);G.push(Zr(Pe,P,C))}V.push({div:G,role:"row",style:$r(),_key:I})}return V}function Zr(C,M,P){let R=ue(C),V=be(C,P),I=He(C,P),G=C.getMonth()!==M,K=Qe(C,k.get(P)),Pe=Qe(C,new Date);return{button:String(C.getDate()),type:"button",role:"gridcell",tabIndex:K?0:-1,ariaSelected:V,ariaDisabled:R,disabled:R,ariaLabel:H.format(C),dataDate:mo(C),onClick:()=>se(C),onMouseEnter:()=>t==="range"&&E.set(C),style:{appearance:"none",border:"none",cursor:R?"not-allowed":"pointer",aspectRatio:"1",borderRadius:c(1),fontSize:B=>x(B),fontFamily:"inherit",opacity:R?.35:G?.5:1,backgroundColor:B=>V?l(B,"shift-7",m.get(B)):I?l(B,"hover",m.get(B)):"transparent",color:B=>V?l(B,"shift-0",m.get(B)):l(B,"text"),outline:Pe?B=>`1px solid ${l(B,"shift-6",m.get(B))}`:"none",outlineOffset:"-2px","&:hover:not([disabled])":{backgroundColor:B=>V?l(B,"shift-7",m.get(B)):l(B,"shift-3",m.get(B))},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:B=>_(B,m.get(B))}},_key:mo(C)}}function Xr(){let C=(M,P,R)=>({select:Array.from({length:M},(V,I)=>({option:String(I).padStart(2,"0"),value:String(I),selected:G=>P.get(G)===I,_key:I})),ariaLabel:R,onChange:V=>{P.set(Number(V.target.value)),ce()},style:va()});return{div:[C(24,w,"Hour"),{span:":",style:{fontWeight:"bold"}},C(60,O,"Minute")],style:{display:"flex",alignItems:"center",justifyContent:"center",gap:c(1),marginTop:c(3)}}}function Jr(){let C=(M,P)=>({button:M,type:"button",onClick:P,style:{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:R=>x(R,"decrease-1"),color:R=>l(R,"muted",m.get(R)),padding:c(1)}});return{div:[C("Today",()=>{let M=new Date;k.set(F(M)),q(M),je()}),C("Clear",()=>{p.set(t==="range"?[null,null]:null),E.set(null)})],style:{display:"flex",justifyContent:"space-between",marginTop:c(2),paddingTop:c(2),borderTop:M=>`1px solid ${l(M,"border")}`}}}function Qr(C){let M=C,P=k.get(),R=null;switch(M.key){case"ArrowLeft":R=Oe(P,-1);break;case"ArrowRight":R=Oe(P,1);break;case"ArrowUp":R=Oe(P,-7);break;case"ArrowDown":R=Oe(P,7);break;case"Home":R=uo(P,d);break;case"End":R=Oe(uo(P,d),6);break;case"PageUp":R=co(P,M.shiftKey?-12:-1);break;case"PageDown":R=co(P,M.shiftKey?12:1);break;case"Enter":case" ":M.preventDefault(),se(P);return;default:return}M.preventDefault(),k.set(R),q(R),je()}}function $r(){return{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:c(.5)}}function ba(){return{appearance:"none",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:e=>x(e),color:e=>l(e,"muted"),width:c(7),height:c(7),borderRadius:c(1),"&:hover":{backgroundColor:e=>l(e,"shift-3")}}}function va(){return{fontFamily:"inherit",fontSize:e=>x(e),padding:c(1),borderRadius:c(1),border:e=>`1px solid ${l(e,"border-strong")}`,backgroundColor:e=>l(e,"base"),color:e=>l(e,"text")}}function Sa(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},_doctorDisable:"inline-typography",style:{display:"grid",gridTemplateColumns:`minmax(${c(24)}, max-content) 1fr`,columnGap:c(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))},"& dd":{margin:0,fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o))}}}}function xa(e={}){var i,n;let{duration:t=240}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{_onInsert:a=>{a.tagName!=="details"&&console.warn('"details" primitive patch must use details tag')},_doctorDisable:"inline-typography",style:{fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>l(a,"shift-2",r.get(a)),color:a=>l(a,"shift-10",r.get(a)),fontSize:a=>x(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:c(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>c(b(a)*4),height:c(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:c(2),height:c(2),flexShrink:0,marginTop:c(-.5),borderInlineEnd:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,borderBottom:a=>`${c(.5)} solid ${l(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${t}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>l(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>c(b(a)*2),boxShadow:a=>_(a,o.get(a))},"& > :not(summary)":{maxHeight:0,opacity:0,overflow:"hidden",paddingInline:a=>c(b(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${t}ms ease, opacity ${t}ms ease, padding ${t}ms ease`},"&[open] > :not(summary)":{maxHeight:c(250),opacity:1,paddingTop:a=>c(b(a)*1),paddingBottom:a=>c(b(a)*3)}}}}var et=0;function kt(){et++,et===1&&(document.body.style.overflow="hidden")}function Ne(){et=Math.max(0,et-1),et===0&&(document.body.style.overflow="")}var zr='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), details, [tabindex]:not([tabindex="-1"])';function wa(e={}){let{color:t="neutral",open:r=!1}=e,o=g(r),i=null,n=!1,a=!1,s=u=>{n=!1,typeof u.close=="function"&&u.close(),u.style.visibility="hidden",u.style.pointerEvents="none",a&&(Ne(),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)=>{n&&u.target===d.domElement&&u.propertyName==="opacity"&&s(d.domElement)},_onMount:u=>{let d=u.domElement;d.setAttribute("aria-modal","true");let m=null,h=y=>{if(y.key!=="Tab")return;let v=Array.from(d.querySelectorAll(zr)).filter(w=>!w.closest("[aria-hidden='true']")&&w.offsetParent!==null);if(!v.length){y.preventDefault();return}let k=v[0],E=v[v.length-1];y.shiftKey?(document.activeElement===k||document.activeElement===d)&&(y.preventDefault(),E.focus()):document.activeElement===E&&(y.preventDefault(),k.focus())},p=y=>{y.preventDefault(),o.set(!1)};d.addEventListener("cancel",p);let S=y=>{y?(i=document.activeElement,d.style.visibility="visible",d.style.pointerEvents="auto",typeof d.showModal=="function"&&d.showModal(),a||(kt(),a=!0),d.addEventListener("keydown",h),requestAnimationFrame(()=>{d.style.opacity="1";let v=d.querySelector(zr);v==null||v.focus()})):(n=!0,d.style.opacity="0",d.removeEventListener("keydown",h),m=setTimeout(()=>{m=null,n&&s(d)},350))};S(o.get());let f=o.addListener(S);u.addHook("Remove",()=>{m&&(clearTimeout(m),m=null),f(),d.removeEventListener("cancel",p),a&&(Ne(),a=!1),d.removeEventListener("keydown",h),i==null||i.focus(),i=null})},style:{opacity:"0",visibility:"hidden",pointerEvents:"none",transition:"opacity 200ms ease",fontSize:u=>x(u,"inherit"),color:u=>l(u,"shift-10",t),backgroundColor:u=>l(u,"inherit",t),border:"none",borderRadius:u=>c(b(u)*2),padding:u=>c(b(u)*3),boxShadow:$("high"),"&::backdrop":{backgroundColor:u=>l(u,"shift-2","neutral"),opacity:.75}}}}function ka(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{role:"separator",_onInsert:o=>{o.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:c(2),fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:o=>l(o,"border-strong",t.get(o)),borderWidth:"1px",borderBottomStyle:"solid"}}}}var ho={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Ar={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},tt=e=>e==="left"||e==="right";function Vr(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Ca(e={}){let{color:t="neutral",open:r=!1,placement:o="end",size:i}=e,n=g(r),a=o==="start"||o==="end",s=Vr(o,!1),u=tt(s)?c(80):c(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&&n.set(!1)},_onMount:m=>{let h=m.domElement;h.setAttribute("aria-modal","true");let p=T=>{T.preventDefault(),n.set(!1)};h.addEventListener("cancel",p);let S=a&&(h.ownerDocument.documentElement.dir==="rtl"||h.ownerDocument.dir==="rtl"),f=Vr(o,S);a&&(h.style.transform=ho[f],h.style.margin=Ar[f],h.style.width=tt(f)?d:"100dvw",h.style.height=tt(f)?"100dvh":d);let y=!1,v=!1,k=null,E=()=>{k=null,y&&(y=!1,typeof h.close=="function"&&h.close(),h.style.visibility="hidden",h.style.pointerEvents="none",v&&(Ne(),v=!1))},w=T=>{T.target===h&&T.propertyName==="transform"&&E()};h.addEventListener("transitionend",w);let O=T=>{T?(y=!1,h.style.visibility="visible",h.style.pointerEvents="auto",typeof h.showModal=="function"&&h.showModal(),v||(kt(),v=!0),requestAnimationFrame(()=>{h.style.transform="translate(0, 0)"})):(y=!0,h.style.transform=ho[f],k=setTimeout(E,350))};O(n.get());let D=n.addListener(O);m.addHook("Remove",()=>{k&&(clearTimeout(k),k=null),D(),h.removeEventListener("cancel",p),h.removeEventListener("transitionend",w),v&&(Ne(),v=!1)})},style:{transform:ho[s],visibility:"hidden",pointerEvents:"none",transition:"transform 0.25s ease",fontSize:m=>x(m,"inherit"),color:m=>l(m,"shift-10",t),backgroundColor:m=>l(m,"inherit",t),border:"none",padding:m=>c(b(m)*3),margin:Ar[s],width:tt(s)?d:"100dvw",height:tt(s)?"100dvh":d,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:$("high"),"&::backdrop":{backgroundColor:m=>l(m,"shift-2","neutral"),opacity:.75}}}}function Ea(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:o=>x(o,"inherit"),fontStyle:"italic",color:o=>l(o,"shift-10",t.get(o))}}}function _a(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:c(3),paddingBlock:c(12),paddingInline:c(6),textAlign:"center",color:o=>l(o,"muted",t.get(o)),"& > :first-child":{color:o=>l(o,"shift-5",t.get(o)),opacity:.9},"& > :nth-child(2)":{color:o=>l(o,"text",t.get(o))}}}}function Ta(e={}){return{_onError:(t,r,o)=>{var n,a;(n=e.onError)==null||n.call(e,r);let i=typeof e.fallback=="function"?e.fallback(r,o):(a=e.fallback)!=null?a:{div:"An error occurred."};t.children.update([i])}}}var Ma={small:8,medium:10,large:14};function Oa(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=c(Ma[(i=e.size)!=null?i:"medium"]);return{_onInsert:n=>{n.tagName!=="button"&&console.warn('"fab" patch must use button tag')},_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"],style:{appearance:"none",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:r,height:r,borderRadius:"50%",fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"shift-13",t.get(n)),color:n=>l(n,"shift-0","neutral"),boxShadow:$("low"),transition:"background-color 200ms ease, box-shadow 200ms ease","&:hover:not([disabled])":{backgroundColor:n=>l(n,"shift-14",t.get(n)),boxShadow:$("medium")},"&:active:not([disabled])":{backgroundColor:n=>l(n,"shift-15",t.get(n)),boxShadow:$("low")},"&:focus-visible":{boxShadow:n=>`${$("medium")}, ${_(n,t.get(n))}`},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function Da(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:c(2),marginInline:0,marginTop:c(3),marginBottom:c(3),color:o=>l(o,"text",t.get(o)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:c(2)},"& figcaption":{fontSize:o=>x(o,"decrease-1"),color:o=>l(o,"muted",t.get(o)),lineHeight:1.45}}}}function Pa(e={}){var i;let{layout:t="horizontal"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=t==="vertical";return{_onInsert:n=>{n.tagName!=="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},_doctorDisable:"inline-typography",style:{margin:0,paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*3),border:"none",borderRadius:n=>c(b(n)*2),fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n,"inherit",r.get(n)),color:n=>l(n,"text",r.get(n)),display:"grid",gridTemplateColumns:o?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:c(4),rowGap:c(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:n=>x(n,"inherit"),fontWeight:600,paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*2),color:n=>l(n,"text",r.get(n)),backgroundColor:n=>l(n,"inherit",r.get(n))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:n=>o?0:c(b(n)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:o?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:o?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:o?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${c(2)} * -1)`,fontSize:n=>x(n,"decrease-1"),color:n=>l(n,"text",r.get(n))}}}}var La={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Ra(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{["h1","h2","h3","h4","h5","h6"].includes(o.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:o=>l(o,"shift-11",t.get(o)),marginTop:0,marginBottom:c(2),fontSize:o=>{let i=La[o.elementNode.tagName]||"inherit";return x(o,i)}}}}function Ia(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},dataTone:"shift-3",style:{border:0,height:"1px",marginInline:0,marginTop:c(3),marginBottom:c(3),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function $a(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:c(4),height:c(4),flexShrink:"0",fontSize:o=>x(o),backgroundColor:"transparent",color:o=>l(o,"text",t.get(o))}}}function za(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:c(2),backgroundColor:o=>l(o,"inherit",t.get(o)),color:o=>l(o,"text",t.get(o))}}}function Aa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"checkbox",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:c(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:n=>`${c(.5)} solid ${l(n,"inherit",r.get(n))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`,backgroundColor:n=>l(n,"shift-3",r.get(n))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:c(1.5),boxShadow:n=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Va(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{type:"color",_onSchedule:(o,i)=>{o.tagName!=="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),paddingBlock:o=>c(b(o)*1),paddingInline:o=>c(b(o)*1),blockSize:o=>c(6+b(o)*2),inlineSize:o=>c(6+b(o)*2),backgroundColor:"transparent",transition:"box-shadow 140ms ease",borderRadius:o=>c(b(o)*1.5),"&:focus-visible":{boxShadow:o=>_(o,t.get(o))},"&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:o=>c(b(o)*1.5)},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:o=>l(o,"shift-2","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`}}}}function Ba(e={}){var i,n;let{mode:t="datetime-local"}=e,r=g((i=e.color)!=null?i:"neutral","color"),o=g((n=e.accentColor)!=null?n:"primary","accentColor");return{type:t,_onSchedule:(a,s)=>{a.tagName!=="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),s.type=t},style:{fontFamily:"inherit",fontSize:a=>x(a,"inherit"),lineHeight:"inherit",color:a=>l(a,"text",r.get(a)),backgroundColor:a=>l(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",r.get(a))}`,borderRadius:a=>c(b(a)*1.5),paddingInline:a=>c(b(a)*3),height:a=>c(6+b(a)*2),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",o.get(a))}`},"&:focus-visible":{boxShadow:a=>_(a,o.get(a))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),backgroundColor:a=>l(a,"shift-2","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-6","error")}`}}}}function Na(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"file",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(b(n)*1.5),height:n=>c(6+b(n)*2),paddingInline:n=>c(b(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-file-upload-button":{marginTop:n=>c(b(n)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:c(1),height:c(6),paddingInline:c(2),cursor:"pointer",color:n=>l(n,"shift-11",t.get(n)),backgroundColor:n=>l(n,"surface",t.get(n))},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,backgroundColor:n=>l(n,"surface","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-3","neutral")}}}}function Ha(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"number",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInlineStart:n=>c(b(n)*3),paddingInlineEnd:n=>c(b(n)*1.5),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")}}}}function ja(){return{style:{display:"flex",alignItems:"center",gap:c(2),"& > *":{minWidth:`${c(9)}!important`}},_onMount:e=>{let t=e.domElement,r=()=>Array.from(t.querySelectorAll("input")),o=a=>{let s=r(),u=a.target,d=s.indexOf(u);u.value&&d<s.length-1&&s[d+1].focus()},i=a=>{let s=r(),u=a.target,d=s.indexOf(u);a.key==="Backspace"&&!u.value&&d>0&&s[d-1].focus(),a.key==="ArrowLeft"&&d>0&&s[d-1].focus(),a.key==="ArrowRight"&&d<s.length-1&&s[d+1].focus()},n=a=>{var p,S,f;a.preventDefault();let s=(S=(p=a.clipboardData)==null?void 0:p.getData("text"))!=null?S:"",u=r(),d=u.indexOf(a.target),m=d===-1?0:d;[...s].forEach((y,v)=>{u[m+v]&&(u[m+v].value=y)});let h=Math.min(m+s.length-1,u.length-1);(f=u[h])==null||f.focus()};t.addEventListener("input",o),t.addEventListener("keydown",i),t.addEventListener("paste",n),e.addHook("Remove",()=>{t.removeEventListener("input",o),t.removeEventListener("keydown",i),t.removeEventListener("paste",n)})}}}var Fa='<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>',Wa='<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 Ua(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((n=e.accentColor)!=null?n:"primary","accentColor"),o=g(!1);return{_onInsert:a=>{a.tagName!=="div"&&console.warn('"inputPassword" patch must use div tag')},_onInit:a=>{let s={input:null,type: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=>we(o.get(d)?Wa:Fa),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(s),a.children.insert(u)},style:{display:"flex",alignItems:"center",gap:a=>c(b(a)*1),paddingBlock:a=>c(b(a)*1),paddingInline:a=>c(b(a)*3),borderRadius:a=>c(b(a)*1.5),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,color:a=>l(a,"text",t.get(a)),backgroundColor:a=>l(a,"inherit",t.get(a)),fontSize:a=>x(a,"inherit"),transition:"outline-color 140ms ease, box-shadow 140ms ease","&:hover:not(:has([disabled])):not(:focus-within)":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-within":{boxShadow:a=>_(a,r.get(a))}}}}function qa(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"radio",_onInsert:n=>{if(n.tagName!=="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),appearance:"none",display:"inline-flex",position:"relative",width:c(6),height:c(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),width:c(4),height:c(4)},"&:hover::before":{backgroundColor:n=>l(n,"hover",t.get(n))},"&:checked::before":{outline:n=>`1px solid ${l(n,"shift-6",r.get(n))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:n=>l(n,"shift-8",r.get(n))},"&:checked:hover:not([disabled])::before":{backgroundColor:n=>l(n,"shift-7",r.get(n))},"&:focus-visible":{borderRadius:"50%",boxShadow:n=>_(n,r.get(n))},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:n=>l(n,"shift-4","neutral"),pointerEvents:"none"}}}}function Ka(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"range",_onInsert:n=>{n.tagName!=="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:c(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:c(1.5),borderRadius:c(999),backgroundColor:n=>l(n,"shift-3",t.get(n))},"&::-webkit-slider-thumb":{appearance:"none",width:c(4),height:c(4),borderRadius:c(999),border:"none",marginTop:`calc((${c(1.5)} - ${c(4)}) / 2)`,backgroundColor:n=>l(n,"shift-9",r.get(n))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:n=>l(n,"shift-10",r.get(n))},borderRadius:c(2),transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Ya(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"search",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:n=>x(n,"inherit"),lineHeight:"inherit",color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,borderRadius:n=>c(b(n)*1.5),minWidth:c(32),paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*1),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7",t.get(n))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral"),backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`}}}}function Ga(e={}){var r;let t=g((r=e.accentColor)!=null?r:"primary","accentColor");return{role:"switch",dataTone:"shift-2",type:"checkbox",_onSchedule:o=>{if(o.tagName!=="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o,"inherit"),color:o=>l(o,"text"),appearance:"none",position:"relative",display:"inline-flex",width:c(9),height:c(6),cursor:"pointer",margin:"0",paddingBlock:c(1),transition:"box-shadow 140ms ease",borderRadius:c(999),"&:focus-visible":{boxShadow:o=>_(o,t.get(o))},"&:checked":{"&::before":{backgroundColor:o=>l(o,"increase-3",t.get(o))},"&::after":{left:`calc(100% - ${c(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:c(3),height:c(3),borderRadius:c(999),left:c(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:o=>l(o,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:c(999),display:"inline-block",fontSize:o=>x(o,"inherit"),lineHeight:1,backgroundColor:o=>l(o)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}function Za(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{type:"text",_onSchedule:(n,a)=>{n.tagName!=="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:c(10),paddingInline:n=>c(b(n)*3),paddingBlock:n=>c(b(n)*1),borderRadius:n=>c(b(n)*1.5),fontSize:n=>x(n,"inherit"),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${l(n,"border-strong",t.get(n))}`,color:n=>l(n,"text",t.get(n)),backgroundColor:n=>l(n,"inherit",t.get(n)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:n=>l(n,"shift-7")},"&:not(:placeholder-shown)":{color:n=>l(n,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:n=>`1px solid ${l(n,"shift-5",r.get(n))}`},"&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:n=>l(n,"shift-2","neutral"),outline:n=>`1px solid ${l(n,"border-strong","neutral")}`,color:n=>l(n,"muted","neutral")},"&:invalid:not(:placeholder-shown)":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=error]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","error")}`},"&[data-status=warning]":{outline:n=>`${c(.5)} solid ${l(n,"shift-6","warning")}`}}}}function Xa(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),paddingBlock:c(.5),paddingInline:c(1.5),borderRadius:c(1),outline:o=>`1px solid ${l(o,"border-strong",t.get(o))}`}}}function Ja(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:c(2),fontSize:n=>x(n,"inherit"),color:n=>l(n,"text",t.get(n)),cursor:"pointer","&:focus-within":{color:n=>l(n,"shift-10",r.get(n))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}function Qa(e={}){var o,i;let t=g((o=e.color)!=null?o:"primary","color"),r=g((i=e.accentColor)!=null?i:"secondary","accentColor");return{_onInsert:n=>{n.tagName!=="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:n=>x(n,"inherit"),backgroundColor:n=>l(n),color:n=>l(n,"shift-13",t.get(n)),textDecoration:"none","&:visited":{color:n=>l(n,"shift-13",r.get(n))},"&:hover:not([disabled])":{color:n=>l(n,"shift-14",t.get(n)),textDecoration:"underline"},borderRadius:c(1),outline:"none",transition:"color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,r.get(n))},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:n=>l(n,"muted","neutral")}}}}var el={small:{block:.5,inline:2},medium:{block:1,inline:3},large:{block:1.5,inline:4}},tl={small:.5,medium:1,large:1.5};function ol(e={}){var s,u,d;let t=(s=e.variant)!=null?s:"outline",r=g((u=e.color)!=null?u:t==="ghost"?"neutral":"primary","color"),o=(d=e.size)!=null?d:"medium",i=ze[o];if(t==="ghost"){let m=tl[o];return{_onInsert:h=>{h.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')},style:{fontSize:h=>x(h,i),textDecoration:"none",paddingBlock:h=>c(b(h)*m),paddingInline:h=>c(b(h)*m),borderRadius:h=>c(b(h)*1.5),display:"inline-flex",justifyContent:"center",alignItems:"center",gap:h=>c(b(h)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",background:"none",outline:"none",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease",color:h=>l(h,"shift-6",r.get(h)),"&:hover:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"hover",r.get(h)),textDecoration:"none"},"&:active:not([aria-disabled=true])":{color:h=>l(h,"text",r.get(h)),backgroundColor:h=>l(h,"increase-2",r.get(h))},"&:focus-visible":{boxShadow:h=>_(h,r.get(h))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",color:h=>l(h,"border-strong","neutral")}}}}let n=t==="solid",a=el[o];return te(A({_onInsert:m=>{m.tagName!=="a"&&console.warn('"linkButton" primitive patch must use a tag')}},n?{_doctorDisable:["low-contrast","color-shift-minimum","tone-background-inherit"]}:{}),{style:{fontSize:m=>x(m,i),textDecoration:"none",paddingBlock:m=>c(b(m)*a.block),paddingInline:m=>c(b(m)*a.inline),borderRadius:m=>c(b(m)*1.5),width:"fit-content",display:"inline-flex",justifyContent:"center",alignItems:"center",gap:m=>c(b(m)*1),userSelect:"none",cursor:"pointer",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:n?"none":m=>`1px solid ${l(m,"border-strong",r.get(m))}`,color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-13",r.get(m)),backgroundColor:m=>n?l(m,"shift-13",r.get(m)):l(m,"inherit",r.get(m)),transition:"background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease","&:hover:not([aria-disabled=true])":{textDecoration:"none",color:m=>n?l(m,"shift-0","neutral"):l(m,"shift-14",r.get(m)),backgroundColor:m=>n?l(m,"shift-14",r.get(m)):l(m,"hover",r.get(m))},"&:active:not([aria-disabled=true])":{backgroundColor:m=>n?l(m,"shift-15",r.get(m)):l(m,"increase-2",r.get(m))},"&:focus-visible":{boxShadow:m=>_(m,r.get(m))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",pointerEvents:"none",backgroundColor:m=>l(m,"shift-2","neutral"),outline:m=>`1px solid ${l(m,"border-strong","neutral")}`,color:m=>l(m,"muted","neutral")}}})}function rl(e={}){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function nl(e={}){let{dense:t=!1}=e;return{style:{display:"flex",alignItems:"center",gap:r=>c(b(r)*2),paddingBlock:r=>c(t?1:b(r)*2),paddingInline:r=>c(b(r)*3),fontSize:r=>x(r,"inherit"),color:r=>l(r,"text")}}}function il(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=(n=e.accentColor)!=null?n:"primary",{dense:o=!1}=e;return{style:{cursor:"pointer",appearance:"none",border:"none",background:"transparent",textDecoration:"none",textAlign:"left",display:"flex",alignItems:"center",width:"100%",gap:a=>c(b(a)*2),paddingBlock:a=>c(o?1:b(a)*2),paddingInline:a=>c(b(a)*3),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),borderRadius:a=>c(b(a)*1.5),transition:"background-color 150ms ease, box-shadow 140ms ease","&:hover:not([disabled])":{backgroundColor:a=>l(a,"hover",t.get(a))},"&:active:not([disabled])":{backgroundColor:a=>l(a,"increase-2",t.get(a))},"&[aria-current=page], &[aria-selected=true]":{backgroundColor:a=>l(a,"shift-3",r),color:a=>l(a,"shift-12",r)},"&:focus-visible":{boxShadow:a=>_(a,r)},"&[disabled]":{opacity:.5,cursor:"not-allowed"}}}}function al(e={}){var r;let t=g((r=e.accentColor)!=null?r:"highlight","accentColor");return{_onInsert:o=>{o.tagName!=="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),height:c(6),borderRadius:c(1),paddingInline:c(1.5)}}}function ll(e={items:[]}){var a;let{items:t=[],selectable:r=!0,color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.activeKey)!=null?a:null);return{role:"menu",dataTone:"shift-0",_onSchedule:(s,u)=>{if(t.length===0)return;let d=s.nodeId,m=t.map((h,p)=>{var f;let S=(f=h.key)!=null?f:p;return te(A({button:typeof h.label=="string"?[{span:h.label}]:[h.label],_key:S,type:"button",id:`menuitem${d}${S}`,role:"menuitem"},r?{ariaCurrent:y=>n.get(y)===S||void 0}:{}),{onClick:()=>{var y;r&&n.set(S),(y=h.onClick)==null||y.call(h)},onKeyDown:y=>{var O;let v=y.key;if(v==="Enter"||v===" "){y.preventDefault(),y.target.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(v))return;y.preventDefault();let k=t.map((D,T)=>{var L;return(L=D.key)!=null?L:T}),E=k.indexOf(S),w=E;v==="ArrowDown"?w=(E+1)%k.length:v==="ArrowUp"?w=(E-1+k.length)%k.length:v==="Home"?w=0:v==="End"&&(w=k.length-1),(O=document.getElementById(`menuitem${d}${k[w]}`))==null||O.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:c(2),width:"100%",fontSize:y=>x(y,"inherit"),height:y=>c(6+b(y)*2),paddingInline:y=>c(b(y)*3),border:"none",outline:"none",color:y=>l(y,"text",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:y=>l(y,"hover",o)},"&[aria-current=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-13",i)},"&:focus-visible":{boxShadow:y=>_(y,i)}}})});u[s.tagName]=m},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),borderRadius:s=>c(b(s)*2),outline:s=>`1px solid ${l(s,"border-strong",o)}`,outlineOffset:"-1px",boxShadow:$("medium")}}}var fo=e=>!!e&&typeof e.get=="function"&&e._isState===!0,le=e=>{let t={},r=[];for(let o in e){let i=e[o];o==="x"?r.push(`translateX(${typeof i=="number"?`${i}px`:i})`):o==="y"?r.push(`translateY(${typeof i=="number"?`${i}px`:i})`):o==="scale"?r.push(`scale(${i})`):o==="rotate"?r.push(`rotate(${typeof i=="number"?`${i}deg`:i})`):t[o]=i}return r.length&&(t.transform=r.join(" ")),t};function Br(){if(typeof matchMedia!="function")return!1;try{return matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}function sl(e={}){var a,s,u,d;let{initial:t,animate:r,exit:o,transition:i={}}=e,n={duration:(a=i.duration)!=null?a:300,delay:(s=i.delay)!=null?s: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=fo(r)?r.get():r;if(Br()){if(p?Object.assign(h.style,le(p)):t&&Object.assign(h.style,le(t)),fo(r)){let S=r.addListener(f=>{Object.assign(h.style,le(f))});m.setMetadata("motionRelease",S)}return}if(p?h.animate(t?[le(t),le(p)]:[le(p)],n):t&&Object.assign(h.style,le(t)),fo(r)){let S=r.addListener(f=>{h.animate([le(f)],n)});m.setMetadata("motionRelease",S)}},_onBeforeRemove:(m,h)=>{let p=m.domElement;if(!p||!o||typeof p.animate!="function")return h();if(Br())return Object.assign(p.style,le(o)),h();p.animate([le(o)],n).finished.then(h,h)},_onRemove:m=>{let h=m.getMetadata("motionRelease");h==null||h()}}}function cl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"decimal",listStylePosition:"outside"}}}function ml(e,t){if(t<=7)return Array.from({length:t},(n,a)=>a+1);let r=[1];e>3&&r.push("...");let o=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let n=o;n<=i;n++)r.push(n);return e<t-2&&r.push("..."),r.push(t),r}function ul(e){var s;let{total:t,color:r="neutral",accentColor:o="primary"}=e,i=g((s=e.value)!=null?s:1),n={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:u=>c(6+b(u)*2),height:u=>c(6+b(u)*2),paddingInline:u=>c(b(u)*2),borderRadius:u=>c(b(u)*1.5),border:"none",cursor:"pointer",fontSize:u=>x(u,"inherit"),backgroundColor:"transparent",color:u=>l(u,"shift-13",r),transition:"background-color 140ms ease, box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled])":{color:u=>l(u,"shift-13",r),backgroundColor:u=>l(u,"hover",r)},"&:focus-visible":{boxShadow:u=>_(u,o)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=te(A({},n),{backgroundColor:u=>l(u,"shift-13",o),color:u=>l(u,"shift-0","neutral"),fontWeight:"bold",cursor:"default","&:hover:not([disabled])":{backgroundColor:u=>l(u,"shift-13",o)}});return{role:"navigation",ariaLabel:"Pagination",_doctorDisable:"inline-typography",_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:n});let S=0;for(let f of ml(h,t))if(f==="...")p.push({span:"\u2026",_key:`ellipsis-${S++}`,ariaHidden:"true",style:{display:"inline-flex",alignItems:"center",paddingInline:y=>c(b(y)*2),color:y=>l(y,"shift-7",r)}});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:n})}return p.push({button:"\u203A",_key:"next",type:"button",ariaLabel:"Next page",disabled:h>=t,onClick:()=>h<t&&i.set(h+1),style:n}),p},style:{display:"flex",alignItems:"center",gap:c(1)}};u.children.insert(d)},style:{display:"inline-flex"}}}function hl(e={}){var i;let{padding:t=4,divider:r=!1}=e,o=g((i=e.color)!=null?i:"neutral","color");return{style:A({padding:n=>c(b(n)*t)},r?{borderBottom:n=>`1px solid ${l(n,"border",o.get(n))}`}:{})}}function dl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),lineHeight:1.5,marginTop:0,marginBottom:0}}}function fl(e){var p;let{open:t=!1,placement:r="bottom",openOn:o="click"}=e,i=null,n=g(t),a=g(r),{show:s,hide:u,anchorPartial:d}=ae({kind:"popover",open:n,placement:a,content:e.content,keepOpenOnContentHover:o==="hover"}),m={role:"dialog",dataTone:"shift-14",style:{backgroundColor:S=>l(S,"inherit"),borderRadius:S=>c(b(S)*2),outline:S=>`1px solid ${l(S,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")},_onInsert:S=>{let f=S.attributes.get("id");i=f||S.nodeId,!f&&S.attributes.set("id",i)}};return(p=e.content).$||(p.$=[]),e.content.$.push(m),z(d,{ariaHaspopup:"dialog",ariaExpanded:S=>n.get(S),onMouseEnter:(S,f)=>o==="hover"&&s(f),onMouseLeave:(S,f)=>o==="hover"&&u(f),onClick:(S,f)=>{o==="click"&&(n.get()?u(f):s(f))},onKeyDown:(S,f)=>{S.key==="Escape"&&n.get()&&u(f)},onFocus:(S,f)=>o==="hover"&&s(f),onBlur:(S,f)=>{let y=S.relatedTarget,v=f.getRoot().domElement,k=i?v.querySelector(`#${CSS.escape(i)}`):null;y&&(k!=null&&k.contains(y))||u(f)},_onMount:S=>i&&S.attributes.set("ariaControls",i)}),d}function po(e={}){let{placement:t="bottom-end",color:r="neutral",sideOffset:o=c(6),bordered:i=!0}=e,n=g(t),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},s=m=>{var h;return(h=a[n.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=>x(m),backgroundColor:m=>l(m),color:m=>l(m,"text",r),position:"relative","&::after":{content:'""',position:"absolute",width:c(1.5),height:c(1.5),backgroundColor:m=>l(m,"inherit",r),borderWidth:i?"1px":0,borderColor:m=>l(m,"border-strong",r),borderTopStyle:m=>{let h=s(m);return h.includes("top")||h.includes("right")?"solid":"none"},borderBottomStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("left")?"solid":"none"},borderLeftStyle:m=>{let h=s(m);return h.includes("top")||h.includes("left")?"solid":"none"},borderRightStyle:m=>{let h=s(m);return h.includes("bottom")||h.includes("right")?"solid":"none"},top:m=>{let h=s(m);return h.includes("top")?0:h.includes("bottom")?"auto":u(h)},right:m=>{let h=s(m);return h.includes("right")?0:h.includes("left")?"auto":d(h)},bottom:m=>{let h=s(m);return h.includes("bottom")?0:h.includes("top")?"auto":d(h)},left:m=>{let h=s(m);return h.includes("left")?0:h.includes("right")?"auto":u(h)},transform:m=>{let h=s(m),p=h.includes("right")||h.includes("end")&&!h.includes("left")?"50%":"-50%",S=h.includes("bottom")||h.includes("end")&&!h.includes("top")?"50%":"-50%";return`translate(${p},${S}) rotate(45deg)`}}}}}function pl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:o=>{o.tagName!=="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),backgroundColor:o=>l(o,"inherit",t.get(o)),border:"none",paddingBlock:o=>c(b(o)*2),paddingInline:o=>c(b(o)*3),borderRadius:o=>c(b(o)*2)}}}function gl(e={}){var o,i;let t=g((o=e.color)!=null?o:"neutral","color"),r=g((i=e.accentColor)!=null?i:"primary","accentColor");return{_onInsert:n=>{n.tagName!=="progress"&&console.warn('"progress" primitive patch must use progress tag')},dataTone:"shift-3",style:{appearance:"none",width:"100%",height:c(2),border:0,borderRadius:c(999),overflow:"hidden",backgroundColor:n=>l(n,"inherit",t.get(n)),color:n=>l(n,"text",t.get(n)),"&::-webkit-progress-bar":{backgroundColor:n=>l(n,"inherit",t.get(n)),borderRadius:c(999)},"&::-webkit-progress-value":{backgroundColor:n=>l(n,"shift-9",r.get(n)),borderRadius:c(999),transition:"width 220ms ease"}}}}var yl='<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>',bl='<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 vl(e={}){var u,d;let{max:t=5,readOnly:r=!1,onChange:o}=e,i=(u=e.color)!=null?u:"warning",n=g((d=e.value)!=null?d:0),a=g(0),s=m=>{let h=a.get(m);return h>0?h:n.get(m)};return{role:"group",ariaLabel:"Rating",style:{display:"inline-flex",gap:c(.5),fontSize:m=>x(m,"increase-1"),cursor:r?"default":"pointer",color:m=>l(m,"muted",i)},_onInit:m=>{for(let h=1;h<=t;h++){let p=h,S=r?{}:{onClick:()=>{let y=p===n.get()?0:p;n.set(y),o==null||o(y),a.set(0)},onMouseEnter:()=>a.set(p),onMouseLeave:()=>a.set(0),onKeyDown:y=>{var w,O;let v=n.get(),k=v;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(t,v+1),y.preventDefault();else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(0,v-1),y.preventDefault();else return;n.set(k),o==null||o(k);let E=k>0?k-1:0;(O=(w=m.domElement)==null?void 0:w.children[E])==null||O.focus()}},f=te(A({button:y=>we(p<=s(y)?yl:bl),_key:p,type:"button",ariaLabel:`${p} star${p>1?"s":""}`},S),{style:{background:"none",border:"none",outline:"none",borderRadius:c(1),padding:0,cursor:"inherit",color:"inherit",fontSize:"inherit",display:"flex",alignItems:"center",transition:"box-shadow 140ms ease","&:focus-visible":{boxShadow:y=>_(y,i)}}});m.children.insert(f)}}}}function Sl(e={}){var u,d,m;let{size:t=16,thickness:r=.25}=e,o=g((u=e.value)!=null?u:0,"value"),i=g((d=e.color)!=null?d:"primary","color"),n=g((m=e.trackColor)!=null?m:"neutral","trackColor"),a=Math.round((1-r)*100),s=`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:c(t),height:c(t),borderRadius:"50%",color:h=>l(h,"shift-9",i.get(h)),background:h=>`conic-gradient(from -90deg, ${l(h,"shift-9",i.get(h))} ${o.get(h)}%, ${l(h,"shift-3",n.get(h))} 0%)`,WebkitMask:s,mask:s}}}function go(e={}){let{gap:t=4,align:r="center",justify:o,wrap:i=!1}=e;return{style:A(A({display:"flex",alignItems:r,gap:n=>c(b(n)*t)},o?{justifyContent:o}:{}),i?{flexWrap:"wrap"}:{})}}function xl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{style:{overflow:"auto",color:o=>l(o,"text",t.get(o)),"&::-webkit-scrollbar":{width:c(2),height:c(2)},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o=>l(o,"shift-5",t.get(o)),borderRadius:c(999),border:`${c(.5)} solid transparent`,backgroundClip:"content-box"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:o=>l(o,"shift-7",t.get(o))},scrollbarWidth:"thin",scrollbarColor:o=>`${l(o,"shift-5",t.get(o))} transparent`}}}function wl(e={items:[]}){var n,a,s;let{items:t=[],color:r="neutral",accentColor:o="primary"}=e,i=g((s=(a=e.value)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:"");return{role:"radiogroup",_context:{segmented:{value:i}},_onSchedule:(u,d)=>{let m=t.map((h,p)=>{var y;let S=(y=h.key)!=null?y:String(p);return{button:[typeof h.label=="string"?{span:h.label}:h.label],_key:S,type:"button",role:"radio",ariaChecked:v=>i.get(v)===S,onClick:()=>i.set(S),style:{cursor:"pointer",fontSize:v=>x(v,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(3),border:"none",borderRadius:c(10),color:v=>l(v,"text",r),backgroundColor:"transparent",transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"shift-3",r)},"&:active:not([disabled]):not([aria-checked=true])":{backgroundColor:v=>l(v,"increase-2",r)},"&[aria-checked=true]":{backgroundColor:v=>l(v,"shift-0",o),color:v=>l(v,"shift-10",o),boxShadow:$("low")},"&:focus-visible":{boxShadow:v=>_(v,o)},"&[aria-checked=true]:focus-visible":{boxShadow:v=>`${$("low")}, ${_(v,o)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});d[u.tagName]=m},dataTone:"shift-2",style:{display:"inline-flex",paddingBlock:c(1),paddingInline:c(1),gap:c(.5),borderRadius:c(10),backgroundColor:u=>l(u,"inherit",r),color:u=>l(u,"text",r)}}}function kl(e={}){let{color:t="neutral",accentColor:r="primary"}=e;return{_onInsert:o=>{o.tagName!=="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:o=>x(o,"inherit"),lineHeight:"inherit",color:o=>l(o,"text",t),backgroundColor:o=>l(o,"inherit",t),border:"none",outlineOffset:"-1px",outline:o=>`1px solid ${l(o,"border-strong",t)}`,borderRadius:o=>c(b(o)*1.5),paddingBlock:o=>c(b(o)*1),paddingLeft:o=>c(b(o)*3),paddingRight:o=>c(b(o)*5),backgroundImage:o=>{let i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${eo(o,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(i)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${c(2)} center`,backgroundSize:`${c(2.5)} ${c(1.5)}`,transition:"outline-color 140ms ease, box-shadow 140ms ease","&:not([multiple])":{height:o=>c(6+b(o)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:o=>`1px solid ${l(o,"shift-5",r)}`},"&:focus-visible":{boxShadow:o=>_(o,r)},"& optgroup":{color:o=>l(o,"shift-11",t)},"& option[disabled]":{color:o=>l(o,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:o=>l(o,"muted","neutral"),outline:o=>`1px solid ${l(o,"border-strong","neutral")}`,backgroundColor:o=>l(o,"shift-2","neutral")}}}}function Cl(e){let{options:t=[],placement:r="bottom",color:o="neutral",open:i=!1,multiple:n=!1}=e,a=g(e.value),s=g(i),{show:u,hide:d,anchorPartial:m}=ae({kind:"selectBox",open:s,placement:g(r),content:e.content}),h={onClick:(f,y)=>!n&&d(y),dataTone:"shift-14",style:{backgroundColor:f=>l(f,"inherit"),borderRadius:f=>c(b(f)*2),outline:f=>`1px solid ${l(f,"border-strong")}`,outlineOffset:"-1px",boxShadow:$("medium")}};z(e.content,h);let p={div:f=>{let y=a.get(f),v=Array.isArray(y)?y:[y];return t.filter(E=>v.includes(E.value)).map(E=>({span:E.label,$:[Je({color:o,removable:n})],_key:E.value,_onRemove:w=>{let O=a.get(),T=(Array.isArray(O)?O:[O]).filter(L=>L!==E.value);n?a.set(T):a.set(T[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:c(1),flex:1}},S={_onInsert:f=>{f.tagName!=="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:f=>f.children.insert(p),onClick:(f,y)=>s.get()?d(y):u(y),tabindex:0,style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:f=>c(6+b(f)*2),minWidth:c(32),outlineOffset:"-1px",outline:f=>`1px solid ${l(f,"border-strong","neutral")}`,paddingInline:f=>c(b(f)*2),borderRadius:f=>c(b(f)*1.5),fontSize:f=>x(f,"inherit"),color:f=>l(f,"text",o),backgroundColor:f=>l(f,"inherit",o),transition:"background-color 140ms ease, outline-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:f=>_(f,o)}}};return z(m,S),m}function El(e={}){let{accentColor:t="primary",color:r="neutral",value:o=null}=e;return{role:"option",_onInit:n=>{n.tagName!=="div"&&console.warn('"selectItem" patch must use div tag');let a=n.getContext("select");if(a){let s=a.value;n.attributes.set("ariaSelected",u=>{let d=s.get(u);return a.multiple?d.includes(o):d===o}),n.addEvent("click",()=>{let u=s.get();a.multiple?u.includes(o)?s.set(u.filter(d=>d!==o)):s.set(u.concat([o])):u!==o&&s.set(o)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:n=>x(n,"inherit"),height:n=>c(6+b(n)*2),paddingInline:n=>c(b(n)*3),border:"none",outline:"none",color:n=>l(n,"text",r),backgroundColor:n=>l(n,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:n=>l(n,"hover",r)},"&[aria-selected=true]":{backgroundColor:n=>l(n,"shift-6",t),color:n=>l(n,"shift-11")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:n=>_(n,t)}}}}function _l(e={}){var a;let{color:t="neutral",multiple:r=!1}=e,o=g((a=e.value)!=null?a:r?[]:null),i={div:s=>{let u=o.get(s);return(Array.isArray(u)?u:[u]).map(m=>({input:null,name:e.name,value:m==null?"":String(m)}))},hidden:!0};return{dataTone:"shift-0",_context:{select:{value:o,multiple:r}},_onInit:s=>{s.tagName!=="div"&&console.warn('"selectList" patch must use a div tag'),s.children.insert(i)},style:{display:"flex",flexDirection:"column",paddingBlock:s=>c(b(s)*2),paddingInline:s=>c(b(s)*2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",t),color:s=>l(s,"text",t)}}}function Tl(e={}){var i;let t=g((i=e.color)!=null?i:"neutral","color"),r={"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}},o=Ie(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-1",style:{fontSize:n=>x(n),color:n=>l(n,"text",t.get(n)),height:c(6),display:"block",borderRadius:c(1),backgroundColor:n=>l(n,"inherit",t.get(n)),backgroundImage:n=>`linear-gradient(90deg, ${l(n,"inherit",t.get(n))} 0%, ${l(n,"shift-2",t.get(n))} 50%, ${l(n,"inherit",t.get(n))} 100%)`,backgroundSize:"200% 100%",animation:`${o} 1.6s ease-in-out infinite`,[`@keyframes ${o}`]:r}}}function Ml(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="small"&&console.warn('"small" patch must use small tag')},dataSize:"decrease-1",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"shift-10",t.get(o))}}}var Hr={to:{transform:"rotate(360deg)"}},Nr=Ie(JSON.stringify(Hr));function Ol(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:o=>{o.tagName!=="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:o=>x(o),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),display:"inline-block",margin:0,flexShrink:0,width:c(6),height:c(6),borderRadius:"50%",border:o=>`${c(.5)} solid ${l(o,"border-strong",t.get(o))}`,borderTopColor:o=>l(o,"shift-9",t.get(o)),boxSizing:"border-box",padding:0,animation:`${Nr} 0.7s linear infinite`,[`@keyframes ${Nr}`]:Hr}}}function Dl(e={}){let{direction:t="horizontal",defaultSize:r=50,min:o=10,max:i=90}=e;return{_onSchedule:(n,a)=>{z(a,{_context:{splitter:{direction:t,size:g(r),min:o,max:i,panelCount:0}}})},style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",overflow:"hidden"}}}function Pl(){return{_onMount:e=>{let t=e.getContext("splitter");if(!t){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=e.domElement,o=t.direction==="horizontal"?"width":"height",i=t.panelCount++===0,n=s=>{r.style[o]=`${i?s:100-s}%`};n(t.size.get()),r.style.flexShrink="0",r.style.overflow="auto";let a=t.size.addListener(n);e.addHook("Remove",a)}}}function Ll(){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 r=e.domElement,o=t.direction==="horizontal";r.style.cursor=o?"col-resize":"row-resize",r.setAttribute("aria-orientation",o?"vertical":"horizontal"),r.setAttribute("aria-valuemin",String(t.min)),r.setAttribute("aria-valuemax",String(t.max)),r.setAttribute("aria-valuenow",String(Math.round(t.size.get())));let i=t.size.addListener(u=>{r.setAttribute("aria-valuenow",String(Math.round(u)))}),n=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,s=u=>{u.preventDefault();let d=r.parentElement,m=p=>{let S=d.getBoundingClientRect(),f=o?(p.clientX-S.left)/S.width*100:(p.clientY-S.top)/S.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)};r.addEventListener("keydown",n),r.addEventListener("mousedown",s),e.addHook("Remove",()=>{a==null||a(),i(),r.removeEventListener("keydown",n),r.removeEventListener("mousedown",s)})},dataTone:"shift-2",style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>l(e,"inherit"),color:e=>l(e,"text"),"&:hover":{backgroundColor:e=>l(e,"increase-1")},transition:"background-color 140ms ease, box-shadow 140ms ease","&:focus-visible":{boxShadow:e=>_(e,"primary")},"&::after":{content:'""',width:c(1),height:c(1),borderRadius:c(999),backgroundColor:e=>l(e,"shift-4")}}}}function Rl(e={}){let{gap:t=3,align:r}=e;return{style:A({display:"flex",flexDirection:"column",gap:o=>c(b(o)*t)},r?{alignItems:r}:{})}}function Il(e={items:[]}){var a;let{items:t=[],direction:r="horizontal",color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.current)!=null?a:0);return{_doctorDisable:"inline-typography",_context:{steps:{current:n,direction:r,color:o,accentColor:i}},_onSchedule:(s,u)=>{let d=t.map((m,h)=>{var S;return{li:[typeof m.label=="string"?{span:m.label}:m.label],_key:(S=m.key)!=null?S:h,dataStep:String(h+1),dataStatus:f=>{let y=n.get(f);return h<y?"done":h===y?"active":"pending"},ariaCurrent:f=>n.get(f)===h?"step":void 0,style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:c(1),flex:"1",fontSize:f=>x(f,"decrease-1"),textAlign:"center","&::before":{content:"attr(data-step)",display:"flex",alignItems:"center",justifyContent:"center",width:c(6),height:c(6),borderRadius:c(999),fontSize:f=>x(f,"decrease-1"),fontWeight:"bold",flexShrink:"0",border:f=>`2px solid ${l(f,"border-strong",o)}`,backgroundColor:f=>l(f,"inherit"),color:f=>l(f,"muted"),transition:"background-color 200ms ease, color 200ms ease, border-color 200ms ease",zIndex:"1"},"&:not(:first-child)::after":{content:'""',position:"absolute",top:c(3),right:`calc(50% + ${c(3)})`,left:`calc(-50% + ${c(3)})`,height:"2px",backgroundColor:f=>l(f,"shift-3",o),zIndex:"0"},"&[data-status=active]::before":{backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i),boxShadow:f=>`0 0 0 3px ${l(f,"shift-3",i)}`},"&[data-status=done]::before":{content:'"\u2713"',backgroundColor:f=>l(f,"shift-9",i),borderColor:f=>l(f,"shift-9",i),color:f=>l(f,"shift-0",i)},"&[data-status=done]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=active]:not(:first-child)::after":{backgroundColor:f=>l(f,"shift-9",i)},"&[data-status=pending]":{color:f=>l(f,"muted")},"&[data-status=active]":{color:f=>l(f,"shift-11",i),fontWeight:"bold"},"&[data-status=done]":{color:f=>l(f,"text",o)}}}});u[s.tagName]=d},style:{display:"flex",flexDirection:r==="vertical"?"column":"row",alignItems:r==="vertical"?"flex-start":"center",gap:c(2),listStyle:"none",margin:"0",padding:"0"}}}function $l(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:o=>x(o,"inherit"),fontWeight:"bold",color:o=>l(o,"shift-11",t.get(o)),backgroundColor:o=>l(o)}}}function zl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Al(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:o=>x(o,"decrease-1"),verticalAlign:"super",lineHeight:0,color:o=>l(o,"text",t.get(o))}}}function Vl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="table"&&console.warn('"table" primitive patch must use table tag')},_doctorDisable:"inline-typography",style:{fontSize:o=>x(o,"inherit"),color:o=>l(o,"text",t.get(o)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit")},"& td":{textAlign:"left",paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"text",t.get(o)),boxShadow:o=>`inset 0 1px 0 ${l(o,"shift-3",t.get(o))}`,fontSize:o=>x(o,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:o=>c(b(o)*3),paddingBlock:o=>c(b(o)*1),color:o=>l(o,"shift-10",t.get(o)),backgroundColor:o=>l(o,"inherit"),boxShadow:o=>`inset 0 -1px 0 ${l(o,"shift-4",t.get(o))}`},"& tr":{backgroundColor:o=>l(o,"inherit")},"& tbody tr:hover":{backgroundColor:o=>l(o,"hover")}}}}function Bl(e={items:[]}){var n,a,s;let{items:t=[],accentColor:r="primary",color:o="neutral"}=e,i=g((s=(a=e.activeKey)!=null?a:(n=t[0])==null?void 0:n.key)!=null?s:0);return{_onSchedule:(u,d)=>{let m=u.nodeId,p={div:t.map((f,y)=>{var E;let v=(E=f.key)!=null?E:y;return{button:[typeof f.label=="string"?{span:f.label}:f.label],_key:v,type:"button",role:"tab",id:`tab${m}${v}`,ariaControls:`panel${m}${v}`,ariaSelected:w=>i.get(w)===v,onClick:()=>i.set(v),onKeyDown:w=>{let O=w.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(O))return;w.preventDefault();let D=t.map((N,H)=>{var j;return(j=N.key)!=null?j:H}),T=D.indexOf(v),L=T;O==="ArrowRight"?L=(T+1)%D.length:O==="ArrowLeft"?L=(T-1+D.length)%D.length:O==="Home"?L=0:O==="End"&&(L=D.length-1),i.set(D[L])},style:{cursor:"pointer",fontSize:w=>x(w,"inherit"),height:w=>c(6+b(w)*2),paddingInline:w=>c(b(w)*4),border:"none",outline:"none",color:w=>l(w,"shift-13"),backgroundColor:w=>l(w,"inherit"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-1",o)}`,transition:"box-shadow 140ms ease, color 140ms ease","&:hover:not([disabled]):not([aria-selected=true])":{color:w=>l(w,"shift-13"),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-2",o)}`},"&[aria-selected=true]:not([disabled])":{color:w=>l(w,"shift-13",r),boxShadow:w=>`inset 0 ${c(-.5)} 0 0 ${l(w,"shift-8",r)}`},"&:focus-visible":{boxShadow:w=>_(w,r)},"&[aria-selected=true]:focus-visible":{boxShadow:w=>`${_(w,r)}, inset 0 ${c(-.5)} 0 0 ${l(w,"shift-6",r)}`}}}}),role:"tablist",ariaOrientation:"horizontal",style:{display:"flex"}},S=t.map((f,y)=>{var k;let v=(k=f.key)!=null?k:y;return{div:[f.content],_key:v,role:"tabpanel",id:`panel${m}${v}`,ariaLabelledby:`tab${m}${v}`,hidden:E=>i.get(E)!==v,style:{paddingBlock:E=>c(b(E)*2),paddingInline:E=>c(b(E)*2)}}});d[u.tagName]=[p,...S]}}}function Nl(e={}){var i,n;let t=g((i=e.color)!=null?i:"neutral","color"),r=g((n=e.accentColor)!=null?n:"primary","accentColor"),{autoResize:o=!1}=e;return{_onInsert:a=>{a.tagName!=="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(o){let s=a.domElement;s.style.overflow="hidden";let u=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};s.addEventListener("input",u),u(),a.addHook("Remove",()=>s.removeEventListener("input",u))}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>c(b(a)*2),paddingBlock:a=>c(b(a)*1.5),border:"none",borderRadius:a=>c(b(a)*1.5),fontSize:a=>x(a,"inherit"),color:a=>l(a,"text",t.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${l(a,"border-strong",t.get(a))}`,backgroundColor:a=>l(a,"inherit",t.get(a)),transition:"outline-color 140ms ease, box-shadow 140ms ease","&::placeholder":{color:a=>l(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`1px solid ${l(a,"shift-5",r.get(a))}`},"&:focus-visible":{boxShadow:a=>_(a,r.get(a))},"&:invalid":{outline:a=>`${c(.5)} solid ${l(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>l(a,"muted","neutral"),outline:a=>`1px solid ${l(a,"border-strong","neutral")}`,backgroundColor:a=>l(a,"shift-2","neutral")}}}}function Hl(){return{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column"}}}function jl(e={}){var n,a,s;let{last:t=!1}=e,r=(n=e.color)!=null?n:"neutral",o=(a=e.accentColor)!=null?a:"primary",i=g((s=e.active)!=null?s:!1);return{style:A({display:"grid",gridTemplateColumns:"2rem 1fr",columnGap:u=>c(b(u)*2),paddingBottom:u=>t?"0":c(b(u)*4),position:"relative","&::before":{content:'""',display:"block",width:"0.75rem",height:"0.75rem",borderRadius:"50%",justifySelf:"center",marginTop:c(1),transition:"background-color 200ms ease, opacity 200ms ease",backgroundColor:u=>l(u,"shift-8",i.get(u)?o:r),opacity:u=>i.get(u)?"1":"0.4"}},t?{}:{"&::after":{content:'""',position:"absolute",left:"calc(1rem - 1px)",top:"1.25rem",bottom:u=>c(b(u)*-4),width:"2px",backgroundColor:u=>l(u,"shift-3",r)}})}}function Fl(e={}){let{position:t="top-center",color:r="neutral"}=e,o=g(!1),i=t.startsWith("top"),n=t.endsWith("center"),a=t.endsWith("right"),s={div:[],id:`domphy-toast-${t}`,style:{position:"fixed",display:"flex",flexDirection:i?"column":"column-reverse",alignItems:n?"center":a?"end":"start",inset:0,gap:c(4),zIndex:30,padding:c(6),pointerEvents:"none"}};return{_portal:u=>{let d=u.domElement.querySelector(`#domphy-toast-${t}`);return d||(d=u.children.insert(s).domElement),d},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:c(32),pointerEvents:"auto",paddingBlock:u=>c(b(u)*2),paddingInline:u=>c(b(u)*4),borderRadius:u=>c(b(u)*2),fontSize:u=>x(u,"inherit"),color:u=>l(u,"text",r),backgroundColor:u=>l(u,"inherit",r),boxShadow:$("medium"),opacity:u=>Number(o.get(u)),transform:u=>o.get(u)?"translateY(0)":i?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>o.set(!0)),_onBeforeRemove:(u,d)=>{let m=!1,h=null,p=()=>{m||(m=!0,h&&(clearTimeout(h),h=null),u.domElement.removeEventListener("transitionend",S),d())},S=f=>{f.propertyName==="transform"&&p()};u.domElement.addEventListener("transitionend",S),h=setTimeout(p,350),u.addHook("Remove",()=>{var f;h&&(clearTimeout(h),h=null),(f=u.domElement)==null||f.removeEventListener("transitionend",S)}),o.set(!1)}}}function Wl(e={items:[]}){var a;let{items:t=[],multiple:r=!1,color:o="neutral",accentColor:i="primary"}=e,n=g((a=e.value)!=null?a:r?[]:"");return{role:"group",_context:{toggleGroup:{value:n,multiple:r}},_onSchedule:(s,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 v=n.get(y);return Array.isArray(v)?v.includes(p):v===p},onClick:()=>{let y=n.get();if(r){let v=Array.isArray(y)?[...y]:[];n.set(v.includes(p)?v.filter(k=>k!==p):[...v,p])}else n.set(y===p?"":p)},style:{cursor:"pointer",fontSize:y=>x(y,"inherit"),height:c(6),paddingBlock:c(1),paddingInline:c(2),border:"none",borderRadius:c(1.5),color:y=>l(y,"shift-13",o),backgroundColor:y=>l(y,"inherit",o),transition:"background-color 140ms ease, color 140ms ease, box-shadow 140ms ease","&:hover:not([disabled]):not([aria-pressed=true])":{color:y=>l(y,"shift-13",o),backgroundColor:y=>l(y,"hover",o)},"&:active:not([disabled])":{backgroundColor:y=>l(y,"increase-2",o)},"&[aria-pressed=true]":{backgroundColor:y=>l(y,"shift-3",i),color:y=>l(y,"shift-13",i)},"&:focus-visible":{boxShadow:y=>_(y,i)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}});u[s.tagName]=d},style:{display:"flex",paddingBlock:c(1),paddingInline:c(1),gap:c(1),borderRadius:c(2),fontSize:s=>x(s,"inherit"),backgroundColor:s=>l(s,"inherit",o),color:s=>l(s,"text",o),outline:s=>`1px solid ${l(s,"border",o)}`,outlineOffset:"-1px"}}}function Ul(e={}){return go({gap:e.gap})}function ql(){return{div:null,style:{flex:"1 1 0"}}}function Kl(e={}){let{open:t=!1,placement:r="top",content:o="Tooltip Content"}=e,i=g(r),n=g(o),a=`domphy-tt-${Math.random().toString(36).slice(2,9)}`,s={span:S=>n.get(S),id:a},{show:u,hide:d,anchorPartial:m}=ae({kind:"tooltip",open:t,placement:i,content:s}),h={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",style:{paddingBlock:S=>c(b(S)*1),paddingInline:S=>c(b(S)*3),borderRadius:S=>c(b(S)*1.5),color:S=>l(S,"text"),backgroundColor:S=>l(S),fontSize:S=>x(S,"inherit"),boxShadow:$("low")},$:[po({placement:i,bordered:!1})]};return s.$||(s.$=[]),s.$.push(h),z(m,{ariaDescribedby:a,onMouseEnter:(S,f)=>u(f),onMouseLeave:(S,f)=>d(f),onFocus:(S,f)=>u(f),onBlur:(S,f)=>d(f),onKeyDown:(S,f)=>S.key==="Escape"&&d(f)}),m}function jr(e,t){return e.key!==void 0&&e.key!==null?String(e.key):`index-${t}`}function Yl(e={}){let{duration:t=300,delay:r=0}=e,o=new Map,i=new Map,n=new Set,a=new Set;return{_onMount:s=>{s.addHook("Remove",()=>{for(let u of Array.from(i.values()))u();i.clear();for(let u of n)clearTimeout(u);n.clear();for(let u of a)cancelAnimationFrame(u);a.clear()})},_onBeforeUpdate:s=>{o=new Map,s.children.items.forEach((u,d)=>{if(!(u instanceof U))return;let m=u.domElement;m&&o.set(jr(u,d),m.getBoundingClientRect())})},_onUpdate:s=>{s.children.items.forEach((u,d)=>{var D;if(!(u instanceof U))return;let m=u.domElement;if(!m)return;let h=jr(u,d),p=o.get(h);if(!p)return;let S=m.getBoundingClientRect(),f=p.left-S.left,y=p.top-S.top;if(Math.abs(f)<.5&&Math.abs(y)<.5)return;(D=i.get(m))==null||D(),m.style.transition="none",m.style.transform=`translate(${f}px, ${y}px)`,m.getBoundingClientRect();let v=requestAnimationFrame(()=>{a.delete(v),m.style.transition=`transform ${t}ms ease ${r}ms`,m.style.transform="translate(0px, 0px)"});a.add(v);let k=!1,E=null,w=()=>{k||(k=!0,E&&(n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O),m.style.transition="",m.style.transform="")},O=T=>{T.propertyName==="transform"&&w()};i.set(m,()=>{k=!0,E&&(clearTimeout(E),n.delete(E),E=null),i.delete(m),m.removeEventListener("transitionend",O)}),m.addEventListener("transitionend",O),E=setTimeout(w,t+r+34),n.add(E)}),o.clear()}}}function Gl(e={}){var r;let t=g((r=e.color)!=null?r:"neutral","color");return{_onInsert:o=>{o.tagName!=="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:o=>x(o,"inherit"),backgroundColor:o=>l(o),color:o=>l(o,"text",t.get(o)),marginTop:0,marginBottom:0,paddingLeft:c(3),listStyleType:"disc",listStylePosition:"outside"}}}return ln(Zl);})();
|
|
6
6
|
//# sourceMappingURL=core-theme-ui.global.js.map
|