const V=[],Z=new WeakSet,P=navigator.userAgent.includes("Chrome");navigator.userAgent.includes("Firefox");navigator.userAgent.includes("Safari");navigator.userAgent.includes("Windows");const G=navigator.userAgent.includes("Macintosh");navigator.userAgent.includes("Linux");navigator.userAgent.includes("Android");const Q=/iPad|iPhone|iPod/.test(navigator.userAgent);function bt(){return window==null?void 0:window.matchMedia("(prefers-color-scheme: dark)").matches}async function J(t){await new Promise(n=>setTimeout(n,t))}function kt(){return"fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t==="x"?n:n&3|8).toString(16)})}function h(t,n){try{return typeof t=="string"?(n??document).querySelector(t):t}catch{return null}}function a(t,n){try{return typeof t=="string"?(n??document).querySelectorAll(t):t??V}catch{return V}}function u(t,n){return(t==null?void 0:t.classList.contains(n))??!1}function y(t,n){var e;return((e=t==null?void 0:t.tagName)==null?void 0:e.toLowerCase())===n}function w(t,n){var e;return((e=t==null?void 0:t.type)==null?void 0:e.toLowerCase())===n}function g(t,n){if(t instanceof NodeList)for(let e=0;e label");for(let n=0;n input:not([type=file], [type=color], [type=range])");for(let n=0;n select");for(let n=0;n input[type=file]");for(let n=0;n input[type=color]");for(let n=0;n textarea");for(let n=0;ni.name).join(", "):"",e.readOnly=!0,r(e,"keydown",Pt,!1),L(e))}function W(t,n){if((n==null?void 0:n.key)==="Enter"){const i=F(t);if(!w(i,"color"))return;i.click();return}const e=$(t);w(e,"text")&&(e.readOnly=!0,e.value=t.value,r(e,"keydown",It,!1),L(e))}function et(t){if(nt(t),t.hasAttribute("rows"))return;const n=tt();t.style.blockSize="auto",t.style.blockSize=`${t.scrollHeight-n}px`}function Rt(){_t(),Ot(),Ft(),$t(),zt(),Nt(),qt()}function H(t){const n=t.target;!y(n,"input")&&!y(n,"select")||(n.type==="range"?(n.focus(),ot(n)):it())}function Wt(t){const n=t.target;requestAnimationFrame(()=>n.blur())}function it(){const t=document.body,n=a(".slider > input[type=range]");n.length?C(t,"input",H,!1):I(t,"input",H,!1);for(let e=0;e1&&(f=Math.abs(o[1]-o[0]),v=o[1]>o[0]?o[0]:o[1],E=100-v-f,m>k&&(k=l[1]||0,m=l[0])),n.style.setProperty("--_start",`${v}%`),n.style.setProperty("--_end",`${E}%`),n.style.setProperty("--_value1",`'${k}'`),n.style.setProperty("--_value2",`'${m}'`)}function jt(){it()}const d={light:"",dark:""};function O(){var t;return(t=document==null?void 0:document.body)!=null&&t.classList.contains("dark")?"dark":"light"}function Bt(){if(d.light&&d.dark)return d;const t=document.body,n=document.createElement("body");n.className="light",t.appendChild(n);const e=document.createElement("body");e.className="dark",t.appendChild(e);const i=getComputedStyle(n),s=getComputedStyle(e),c=["--primary","--on-primary","--primary-container","--on-primary-container","--secondary","--on-secondary","--secondary-container","--on-secondary-container","--tertiary","--on-tertiary","--tertiary-container","--on-tertiary-container","--error","--on-error","--error-container","--on-error-container","--background","--on-background","--surface","--on-surface","--surface-variant","--on-surface-variant","--outline","--outline-variant","--shadow","--scrim","--inverse-surface","--inverse-on-surface","--inverse-primary","--surface-dim","--surface-bright","--surface-container-lowest","--surface-container-low","--surface-container","--surface-container-high","--surface-container-highest"];for(let o=0,l=c.length;o{const c=o=>{let l="";for(let f=0,v=Object.keys(o),E=v.length;f{const n=h(".field > input",t);n?n.focus():t.focus()},90)}function lt(t,n,e){D&&clearTimeout(D),D=setTimeout(()=>{C(document.body,"click",ut),y(document.activeElement,"input")||z();const i=u(n,"active"),s=(e==null?void 0:e.target)===t,c=!!t.closest("menu");if(!i&&c||i&&s){p(n,"active");return}p(a("menu.active"),"active"),g(n,"active"),Ht(n)},90)}let A;function Xt(t){const n=t.currentTarget;p(n,"active"),A&&clearTimeout(A)}function Yt(t,n){z();const e=a(".snackbar.active");for(let i=0;i{p(t,"active")},n??6e3))}function Gt(t){const n=T(t);n&&p(a(":scope > .page",n),"active"),g(t,"active")}function Qt(t){Jt(t)}function Jt(t){const n=t.currentTarget,e=n.getBoundingClientRect(),i=Math.max(e.width,e.height),s=i/2,c=t.clientX-e.left-s,o=t.clientY-e.top-s,l=document.createElement("div");l.className="ripple-js";const f=document.createElement("div");f.style.inlineSize=f.style.blockSize=`${i}px`,f.style.left=`${c}px`,f.style.top=`${o}px`,f.addEventListener("animationend",()=>{l.remove()}),l.appendChild(f),n.appendChild(l)}function tn(){const t=a(".slow-ripple, .ripple, .fast-ripple");for(let n=0;nawait yt(),180)}async function j(t,n,e,i){if(!n&&(n=h(t.getAttribute("data-ui")),!n)){t.classList.toggle("active");return}if(Ct(t),y(n,"dialog")){await st(t,n);return}if(y(n,"menu")){lt(t,n,i);return}if(u(n,"snackbar")){Yt(n,e);return}if(u(n,"page")){Gt(n);return}if(u(n,"active")){p(t,"active"),p(n,"active");return}g(n,"active")}function nn(t){j(t.currentTarget,null,null,t)}function en(t){t.key==="Enter"&&j(t.currentTarget,null,null,t)}function pt(){x.ui||_||!x.MutationObserver||(_=new MutationObserver(Y),_.observe(document.body,{childList:!0,subtree:!0}),Y())}function on(){const t=a("[data-ui]");for(let n=0,e=t.length;n